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