diff options
Diffstat (limited to 'editors/cmp.c')
-rw-r--r-- | editors/cmp.c | 10 |
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 // This fmt_l_opt uses gnu-isms. SUSv3 would be "%.0s%.0s%"OFF_FMT"u %o %o\n" static const char fmt_l_opt[] ALIGN1 = "%.0s%.0s%"OFF_FMT"u %3o %3o\n"; -static const char opt_chars[] ALIGN1 = "sl"; +#define OPT_STR "sl" #define CMP_OPT_s (1<<0) #define CMP_OPT_l (1<<1) @@ -52,11 +52,13 @@ int cmp_main(int argc UNUSED_PARAM, char **argv) unsigned opt; int retval = 0; - opt_complementary = "-1" + opt = getopt32(argv, "^" + OPT_STR + "\0" "-1" IF_DESKTOP(":?4") IF_NOT_DESKTOP(":?2") - ":l--s:s--l"; - opt = getopt32(argv, opt_chars); + ":l--s:s--l" + ); argv += optind; filename1 = *argv; |