aboutsummaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorkraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-01-18 02:57:08 +0000
committerkraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-01-18 02:57:08 +0000
commitc6ef1fa2e2efac74e46c8fefcc0555d7a6dbe950 (patch)
tree06f9de2e4c7d33d29a448fb1c42ed1beafe18e6e /util-linux
parentb98bab804589df1be486044538dcc05e315376d7 (diff)
downloadbusybox-w32-c6ef1fa2e2efac74e46c8fefcc0555d7a6dbe950.tar.gz
busybox-w32-c6ef1fa2e2efac74e46c8fefcc0555d7a6dbe950.tar.bz2
busybox-w32-c6ef1fa2e2efac74e46c8fefcc0555d7a6dbe950.zip
Eliminate calls of the form "fprintf(stdout,". Thanks for the idea to
Vladimir N. Oleynik. git-svn-id: svn://busybox.net/trunk/busybox@1616 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/more.c12
-rw-r--r--util-linux/rdate.c2
2 files changed, 7 insertions, 7 deletions
diff --git a/util-linux/more.c b/util-linux/more.c
index 9310cf930..538708caa 100644
--- a/util-linux/more.c
+++ b/util-linux/more.c
@@ -54,8 +54,8 @@ static struct termios initial_settings, new_settings;
54static void gotsig(int sig) 54static void gotsig(int sig)
55{ 55{
56 setTermSettings(fileno(cin), &initial_settings); 56 setTermSettings(fileno(cin), &initial_settings);
57 fprintf(stdout, "\n"); 57 putchar('\n');
58 exit(TRUE); 58 exit(EXIT_FAILURE);
59} 59}
60#endif /* BB_FEATURE_USE_TERMIOS */ 60#endif /* BB_FEATURE_USE_TERMIOS */
61 61
@@ -117,19 +117,19 @@ extern int more_main(int argc, char **argv)
117 117
118 please_display_more_prompt = 0; 118 please_display_more_prompt = 0;
119 lines = 0; 119 lines = 0;
120 len = fprintf(stdout, "--More-- "); 120 len = printf("--More-- ");
121 if (file != stdin) { 121 if (file != stdin) {
122#if _FILE_OFFSET_BITS == 64 122#if _FILE_OFFSET_BITS == 64
123 len += fprintf(stdout, "(%d%% of %lld bytes)", 123 len += printf("(%d%% of %lld bytes)",
124#else 124#else
125 len += fprintf(stdout, "(%d%% of %ld bytes)", 125 len += printf("(%d%% of %ld bytes)",
126#endif 126#endif
127 (int) (100 * 127 (int) (100 *
128 ((double) ftell(file) / 128 ((double) ftell(file) /
129 (double) st.st_size)), 129 (double) st.st_size)),
130 st.st_size); 130 st.st_size);
131 } 131 }
132 len += fprintf(stdout, "%s", 132 len += printf("%s",
133#ifdef BB_FEATURE_USE_TERMIOS 133#ifdef BB_FEATURE_USE_TERMIOS
134 "" 134 ""
135#else 135#else
diff --git a/util-linux/rdate.c b/util-linux/rdate.c
index 03f7f2de3..bb5392746 100644
--- a/util-linux/rdate.c
+++ b/util-linux/rdate.c
@@ -126,7 +126,7 @@ int rdate_main(int argc, char **argv)
126 perror_msg_and_die("Could not set time of day"); 126 perror_msg_and_die("Could not set time of day");
127 } 127 }
128 if (printdate) { 128 if (printdate) {
129 fprintf(stdout, "%s", ctime(&time)); 129 printf("%s", ctime(&time));
130 } 130 }
131 131
132 return EXIT_SUCCESS; 132 return EXIT_SUCCESS;