projects
/
oweals
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Oops. Since dirent.h depends on BB_FEATURE_SH_TAB_COMPLETION, put it
[oweals/busybox.git]
/
cmp.c
diff --git
a/cmp.c
b/cmp.c
index 98b747eedb0f2c1a58649d23cb74faf42f84336a..24b6c3f925bcbe7dccd20b719290751ca58ae809 100644
(file)
--- a/
cmp.c
+++ b/
cmp.c
@@
-3,7
+3,7
@@
* Mini cmp implementation for busybox
*
*
* Mini cmp implementation for busybox
*
*
- * Copyright (C)
2000
by Lineo, inc.
+ * Copyright (C)
1999,2000,2001
by Lineo, inc.
* Written by Matt Kraai <kraai@alumni.carnegiemellon.edu>
*
* This program is free software; you can redistribute it and/or modify
* Written by Matt Kraai <kraai@alumni.carnegiemellon.edu>
*
* This program is free software; you can redistribute it and/or modify
@@
-22,10
+22,11
@@
*
*/
*
*/
-#include "busybox.h"
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
+#include <stdlib.h>
+#include "busybox.h"
int cmp_main(int argc, char **argv)
{
int cmp_main(int argc, char **argv)
{
@@
-35,7
+36,7
@@
int cmp_main(int argc, char **argv)
/* parse argv[] */
if (argc < 2 || 3 < argc)
/* parse argv[] */
if (argc < 2 || 3 < argc)
-
usage(cmp_usage
);
+
show_usage(
);
fp1 = xfopen(argv[1], "r");
if (argv[2] != NULL) {
fp1 = xfopen(argv[1], "r");
if (argv[2] != NULL) {
@@
-54,7
+55,7
@@
int cmp_main(int argc, char **argv)
else
printf("%s %s differ: char %d, line %d\n", filename1, filename2,
char_pos, line_pos);
else
printf("%s %s differ: char %d, line %d\n", filename1, filename2,
char_pos, line_pos);
- return
1
;
+ return
EXIT_FAILURE
;
}
char_pos++;
if (c1 == '\n')
}
char_pos++;
if (c1 == '\n')