aboutsummaryrefslogtreecommitdiff
path: root/editors/cmp.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2017-08-22 14:56:12 +0100
committerRon Yorston <rmy@pobox.com>2017-08-22 14:56:12 +0100
commitce9af1cc5ea23f754587448cf35b5120c77bfeef (patch)
tree69e5eaba5e75ab909ed92d5045393471b8ff3c13 /editors/cmp.c
parentc170026700eabb10147dd848c45c06995b43a32e (diff)
parente837a0dbbebf4229306df98fe9ee3b9bb30630c4 (diff)
downloadbusybox-w32-ce9af1cc5ea23f754587448cf35b5120c77bfeef.tar.gz
busybox-w32-ce9af1cc5ea23f754587448cf35b5120c77bfeef.tar.bz2
busybox-w32-ce9af1cc5ea23f754587448cf35b5120c77bfeef.zip
Merge branch 'busybox' into merge
Diffstat (limited to 'editors/cmp.c')
-rw-r--r--editors/cmp.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/editors/cmp.c b/editors/cmp.c
index f53d9603c..ec86c0ce2 100644
--- a/editors/cmp.c
+++ b/editors/cmp.c
@@ -36,7 +36,7 @@ static const char fmt_differ[] ALIGN1 = "%s %s differ: char %"OFF_FMT"u, line %u
36// This fmt_l_opt uses gnu-isms. SUSv3 would be "%.0s%.0s%"OFF_FMT"u %o %o\n" 36// This fmt_l_opt uses gnu-isms. SUSv3 would be "%.0s%.0s%"OFF_FMT"u %o %o\n"
37static const char fmt_l_opt[] ALIGN1 = "%.0s%.0s%"OFF_FMT"u %3o %3o\n"; 37static const char fmt_l_opt[] ALIGN1 = "%.0s%.0s%"OFF_FMT"u %3o %3o\n";
38 38
39static const char opt_chars[] ALIGN1 = "sl"; 39#define OPT_STR "sl"
40#define CMP_OPT_s (1<<0) 40#define CMP_OPT_s (1<<0)
41#define CMP_OPT_l (1<<1) 41#define CMP_OPT_l (1<<1)
42 42
@@ -52,11 +52,13 @@ int cmp_main(int argc UNUSED_PARAM, char **argv)
52 unsigned opt; 52 unsigned opt;
53 int retval = 0; 53 int retval = 0;
54 54
55 opt_complementary = "-1" 55 opt = getopt32(argv, "^"
56 OPT_STR
57 "\0" "-1"
56 IF_DESKTOP(":?4") 58 IF_DESKTOP(":?4")
57 IF_NOT_DESKTOP(":?2") 59 IF_NOT_DESKTOP(":?2")
58 ":l--s:s--l"; 60 ":l--s:s--l"
59 opt = getopt32(argv, opt_chars); 61 );
60 argv += optind; 62 argv += optind;
61 63
62 filename1 = *argv; 64 filename1 = *argv;