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

@ -15,20 +15,20 @@ static int handle_show_all()
{
Core::DirIterator di("/res/wallpapers", Core::DirIterator::SkipDots);
if (di.has_error()) {
fprintf(stderr, "DirIterator: %s\n", di.error_string());
warnln("DirIterator: {}", di.error_string());
return 1;
}
while (di.has_next()) {
String name = di.next_path();
printf("%s\n", name.characters());
outln("{}", name);
}
return 0;
}
static int handle_show_current()
{
printf("%s\n", GUI::Desktop::the().wallpaper().characters());
outln("{}", GUI::Desktop::the().wallpaper());
return 0;
}
@ -39,7 +39,7 @@ static int handle_set_pape(const String& name)
builder.append(name);
String path = builder.to_string();
if (!GUI::Desktop::the().set_wallpaper(path)) {
fprintf(stderr, "pape: Failed to set wallpaper %s\n", path.characters());
warnln("pape: Failed to set wallpaper {}", path);
return 1;
}
return 0;