aboutsummaryrefslogtreecommitdiff
path: root/coreutils/head.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-10-26 23:21:47 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-10-26 23:21:47 +0000
commitf0ed376eda5d5c25d270e5100a881fb2d801bee6 (patch)
tree79166b700c497fbe798b6031e5bbff97e0933573 /coreutils/head.c
parent670a6626cabc1498f32b35f959591f8621d8447e (diff)
downloadbusybox-w32-f0ed376eda5d5c25d270e5100a881fb2d801bee6.tar.gz
busybox-w32-f0ed376eda5d5c25d270e5100a881fb2d801bee6.tar.bz2
busybox-w32-f0ed376eda5d5c25d270e5100a881fb2d801bee6.zip
remove bb_printf and the like
Diffstat (limited to 'coreutils/head.c')
-rw-r--r--coreutils/head.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/coreutils/head.c b/coreutils/head.c
index 060febcf7..2e9000df4 100644
--- a/coreutils/head.c
+++ b/coreutils/head.c
@@ -112,12 +112,13 @@ int head_main(int argc, char **argv)
112#endif 112#endif
113 113
114 do { 114 do {
115 if ((fp = bb_wfopen_input(*argv)) != NULL) { 115 fp = bb_wfopen_input(*argv);
116 if (fp) {
116 if (fp == stdin) { 117 if (fp == stdin) {
117 *argv = (char *) bb_msg_standard_input; 118 *argv = (char *) bb_msg_standard_input;
118 } 119 }
119 if (header_threshhold) { 120 if (header_threshhold) {
120 bb_printf(fmt, *argv); 121 printf(fmt, *argv);
121 } 122 }
122 i = count; 123 i = count;
123 while (i && ((c = getc(fp)) != EOF)) { 124 while (i && ((c = getc(fp)) != EOF)) {
@@ -130,10 +131,10 @@ int head_main(int argc, char **argv)
130 bb_perror_msg("%s", *argv); /* Avoid multibyte problems. */ 131 bb_perror_msg("%s", *argv); /* Avoid multibyte problems. */
131 retval = EXIT_FAILURE; 132 retval = EXIT_FAILURE;
132 } 133 }
133 xferror_stdout(); 134 die_if_ferror_stdout();
134 } 135 }
135 fmt = header_fmt_str; 136 fmt = header_fmt_str;
136 } while (*++argv); 137 } while (*++argv);
137 138
138 bb_fflush_stdout_and_exit(retval); 139 fflush_stdout_and_exit(retval);
139} 140}