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

@ -51,7 +51,7 @@ int main(int argc, char* argv[])
success = file->open(Core::OpenMode::ReadOnly);
}
if (!success) {
fprintf(stderr, "Error: %s\n", file->error_string());
warnln("Error: {}", file->error_string());
return 1;
}
@ -67,10 +67,10 @@ int main(int argc, char* argv[])
auto document = Markdown::Document::parse(input);
if (!document) {
fprintf(stderr, "Error parsing\n");
warnln("Error parsing");
return 1;
}
String res = html ? document->render_to_html() : document->render_for_terminal(view_width);
printf("%s", res.characters());
out("{}", res);
}