1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 09:34:59 +00:00

Userland: Replace most printf-style APIs with AK::Format APIs :^)

This commit is contained in:
Linus Groh 2021-05-31 15:43:25 +01:00
parent 4f1889c2cb
commit f5c35fccca
75 changed files with 642 additions and 644 deletions

View file

@ -27,15 +27,15 @@ static void print_buffer(ReadonlyBytes buffer, int split)
for (size_t i = 0; i < buffer.size(); ++i) {
if (split > 0) {
if (i % split == 0 && i) {
printf(" ");
out(" ");
for (size_t j = i - split; j < i; ++j) {
auto ch = buffer[j];
printf("%c", ch >= 32 && ch <= 127 ? ch : '.'); // silly hack
out("{:c}", ch >= 32 && ch <= 127 ? ch : '.'); // silly hack
}
puts("");
outln();
}
}
printf("%02x ", buffer[i]);
out("{:02x} ", buffer[i]);
}
puts("");
}