1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:57:44 +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

@ -78,16 +78,16 @@ int head(const String& filename, bool print_filename, ssize_t line_count, ssize_
} else {
fd = open(filename.characters(), O_RDONLY);
if (fd < 0) {
fprintf(stderr, "can't open %s for reading: %s\n", filename.characters(), strerror(errno));
warnln("Failed to open {}: {}", filename, strerror(errno));
return 1;
}
}
if (print_filename) {
if (is_stdin) {
puts("==> standard input <==");
outln("==> standard input <==");
} else {
printf("==> %s <==\n", filename.characters());
outln("==> {} <==", filename);
}
}