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:
parent
4f1889c2cb
commit
f5c35fccca
75 changed files with 642 additions and 644 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue