mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:37:36 +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
|
@ -64,8 +64,7 @@ int main()
|
|||
|
||||
auto now = time(nullptr);
|
||||
|
||||
printf("\033[1m%-10s %-12s %-16s %-6s %s\033[0m\n",
|
||||
"USER", "TTY", "LOGIN@", "IDLE", "WHAT");
|
||||
outln("\033[1m{:10} {:12} {:16} {:6} {}\033[0m", "USER", "TTY", "LOGIN@", "IDLE", "WHAT");
|
||||
json.value().as_object().for_each_member([&](auto& tty, auto& value) {
|
||||
const JsonObject& entry = value.as_object();
|
||||
auto uid = entry.get("uid").to_u32();
|
||||
|
@ -99,12 +98,7 @@ int main()
|
|||
what = process.name;
|
||||
}
|
||||
|
||||
printf("%-10s %-12s %-16s %-6s %s\n",
|
||||
username.characters(),
|
||||
tty.characters(),
|
||||
login_at.characters(),
|
||||
idle_string.characters(),
|
||||
what.characters());
|
||||
outln("{:10} {:12} {:16} {:6} {}", username, tty, login_at, idle_string, what);
|
||||
});
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue