fputs instead of fprintf, when possible

This commit is contained in:
Matteo Bini 2024-08-26 10:10:31 +02:00
parent 0d10bc8b4d
commit a636fe0a1b
1 changed files with 19 additions and 19 deletions

View File

@ -1316,36 +1316,36 @@ void
print_help(void)
{
print_usage();
fprintf(stdout, "\n");
fprintf(stdout, "Without INPUT, the roff source code will be read from standard input.\n");
fprintf(stdout, "Without OUTPUT, the resulting HTML will be sent to standard output.\n");
fprintf(stdout, "To use a different output from stdout, you must specify the input first,\n");
fprintf(stdout, "or use shell redirection.\n");
fprintf(stdout, "\n");
fprintf(stdout, "\"" BIN " -h\" or \"--help\" prints this help text.\n");
fprintf(stdout, "\"" BIN " -v\" or \"--version\" prints version and license information.\n");
fprintf(stdout, "\n");
fprintf(stdout, BIN " exits with 0 only when it converts the input into HTML,\n");
fprintf(stdout, "otherwise it exits with 1.\n");
fputs("\n", stdout);
fputs("Without INPUT, the roff source code will be read from standard input.\n", stdout);
fputs("Without OUTPUT, the resulting HTML will be sent to standard output.\n", stdout);
fputs("To use a different output from stdout, you must specify the input first,\n", stdout);
fputs("or use shell redirection.\n", stdout);
fputs("\n", stdout);
fputs("\"" BIN " -h\" or \"--help\" prints this help text.\n", stdout);
fputs("\"" BIN " -v\" or \"--version\" prints version and license information.\n", stdout);
fputs("\n", stdout);
fputs(BIN " exits with 0 only when it converts the input into HTML,\n", stdout);
fputs("otherwise it exits with 1.\n", stdout);
exit(1);
}
void
print_usage(void)
{
fprintf(stdout, "Usage: " BIN " [INPUT [OUTPUT]]\n");
fputs("Usage: " BIN " [INPUT [OUTPUT]]\n", stdout);
}
void
print_version(void)
{
fprintf(stdout, BIN " " VERSION "\n");
fprintf(stdout, "Copyright (C) 2024 Matteo Bini\n");
fprintf(stdout, "License: GPLv3+ <http://www.gnu.org/licenses/gpl.html>.\n");
fprintf(stdout, "This is free software: you are free to change and redistribute it.\n");
fprintf(stdout, "There is NO WARRANTY, to the extent permitted by law.\n");
fprintf(stdout, "\n");
fprintf(stdout, "Written by Matteo Bini.\n");
fputs(BIN " " VERSION "\n", stdout);
fputs("Copyright (C) 2024 Matteo Bini\n", stdout);
fputs("License: GPLv3+ <http://www.gnu.org/licenses/gpl.html>.\n", stdout);
fputs("This is free software: you are free to change and redistribute it.\n", stdout);
fputs("There is NO WARRANTY, to the extent permitted by law.\n", stdout);
fputs("\n", stdout);
fputs("Written by Matteo Bini.\n", stdout);
exit(1);
}