mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:27:45 +00:00
Userland: Replace most printf-style APIs with AK::Format APIs :^)
This commit is contained in:
parent
4f1889c2cb
commit
f5c35fccca
75 changed files with 642 additions and 644 deletions
|
@ -85,18 +85,18 @@ int main(int argc, char** argv)
|
|||
|
||||
auto print_column = [](auto& column, auto& string) {
|
||||
if (!column.width) {
|
||||
printf("%s", string.characters());
|
||||
out("{}", string);
|
||||
return;
|
||||
}
|
||||
if (column.alignment == Alignment::Right)
|
||||
printf("%*s ", column.width, string.characters());
|
||||
out("{1:>{0}} ", column.width, string);
|
||||
else
|
||||
printf("%-*s ", column.width, string.characters());
|
||||
out("{1:{0}} ", column.width, string);
|
||||
};
|
||||
|
||||
for (auto& column : columns)
|
||||
print_column(column, column.title);
|
||||
printf("\n");
|
||||
outln();
|
||||
|
||||
auto processes = Core::ProcessStatisticsReader::get_all();
|
||||
if (!processes.has_value())
|
||||
|
@ -132,7 +132,7 @@ int main(int argc, char** argv)
|
|||
|
||||
for (auto& column : columns)
|
||||
print_column(column, column.buffer);
|
||||
printf("\n");
|
||||
outln();
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue