Eliminate calls of the form "fprintf(stdout,". Thanks for the idea to
Vladimir N. Oleynik.
diff --git a/util-linux/more.c b/util-linux/more.c
index 9310cf9..538708c 100644
--- a/util-linux/more.c
+++ b/util-linux/more.c
@@ -54,8 +54,8 @@
static void gotsig(int sig)
{
setTermSettings(fileno(cin), &initial_settings);
- fprintf(stdout, "\n");
- exit(TRUE);
+ putchar('\n');
+ exit(EXIT_FAILURE);
}
#endif /* BB_FEATURE_USE_TERMIOS */
@@ -117,19 +117,19 @@
please_display_more_prompt = 0;
lines = 0;
- len = fprintf(stdout, "--More-- ");
+ len = printf("--More-- ");
if (file != stdin) {
#if _FILE_OFFSET_BITS == 64
- len += fprintf(stdout, "(%d%% of %lld bytes)",
+ len += printf("(%d%% of %lld bytes)",
#else
- len += fprintf(stdout, "(%d%% of %ld bytes)",
+ len += printf("(%d%% of %ld bytes)",
#endif
(int) (100 *
((double) ftell(file) /
(double) st.st_size)),
st.st_size);
}
- len += fprintf(stdout, "%s",
+ len += printf("%s",
#ifdef BB_FEATURE_USE_TERMIOS
""
#else