summaryrefslogtreecommitdiff
path: root/coreutils/cmp.c
diff options
context:
space:
mode:
authorRob Landley2006-08-03 15:41:12 +0000
committerRob Landley2006-08-03 15:41:12 +0000
commitd921b2ecc0d294ad4bf8c7458fc52a60c28727d2 (patch)
treee4a2769349867c441cf2983d83097bb66701a733 /coreutils/cmp.c
parent6dce0b6fa79f2d4bb7e9d90e1fbc0f6beb25f855 (diff)
downloadbusybox-d921b2ecc0d294ad4bf8c7458fc52a60c28727d2.zip
busybox-d921b2ecc0d294ad4bf8c7458fc52a60c28727d2.tar.gz
Remove bb_ prefixes from xfuncs.c (and a few other places), consolidate
things like xasprintf() into xfuncs.c, remove xprint_file_by_name() (it only had one user), clean up lots of #includes... General cleanup pass. What I've been doing for the last couple days. And it conflicts! I've removed httpd.c from this checkin due to somebody else touching that file. It builds for me. I have to catch a bus. (Now you know why I'm looking forward to Mercurial.)
Diffstat (limited to 'coreutils/cmp.c')
-rw-r--r--coreutils/cmp.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/coreutils/cmp.c b/coreutils/cmp.c
index 016158b..a569eb3 100644
--- a/coreutils/cmp.c
+++ b/coreutils/cmp.c
@@ -21,9 +21,6 @@
* in the '-l' case.
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
#include "busybox.h"
static FILE *cmp_xfopen_input(const char *filename)
@@ -105,12 +102,12 @@ int cmp_main(int argc, char **argv)
c1 = c2;
}
if (c1 == EOF) {
- bb_xferror(fp1, filename1);
+ xferror(fp1, filename1);
fmt = fmt_eof; /* Well, no error, so it must really be EOF. */
outfile = stderr;
/* There may have been output to stdout (option -l), so
* make sure we fflush before writing to stderr. */
- bb_xfflush_stdout();
+ xfflush_stdout();
}
if (opt_flags != OPT_s) {
if (opt_flags == OPT_l) {
@@ -129,8 +126,8 @@ int cmp_main(int argc, char **argv)
}
} while (c1 != EOF);
- bb_xferror(fp1, filename1);
- bb_xferror(fp2, filename2);
+ xferror(fp1, filename1);
+ xferror(fp2, filename2);
bb_fflush_stdout_and_exit(exit_val);
}