aboutsummaryrefslogtreecommitdiff
path: root/editors/cmp.c
diff options
context:
space:
mode:
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;