diff options
-rw-r--r-- | editors/cmp.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/editors/cmp.c b/editors/cmp.c index 6d2b0c6c3..b89e519ad 100644 --- a/editors/cmp.c +++ b/editors/cmp.c | |||
@@ -54,6 +54,7 @@ int cmp_main(int argc UNUSED_PARAM, char **argv) | |||
54 | int retval = 0; | 54 | int retval = 0; |
55 | int max_count = -1; | 55 | int max_count = -1; |
56 | 56 | ||
57 | #if !ENABLE_LONG_OPTS | ||
57 | opt = getopt32(argv, "^" | 58 | opt = getopt32(argv, "^" |
58 | OPT_STR | 59 | OPT_STR |
59 | "\0" "-1" | 60 | "\0" "-1" |
@@ -62,6 +63,23 @@ int cmp_main(int argc UNUSED_PARAM, char **argv) | |||
62 | ":l--s:s--l", | 63 | ":l--s:s--l", |
63 | &max_count | 64 | &max_count |
64 | ); | 65 | ); |
66 | #else | ||
67 | static const char cmp_longopts[] ALIGN1 = | ||
68 | "bytes\0" Required_argument "n" | ||
69 | "quiet\0" No_argument "s" | ||
70 | "silent\0" No_argument "s" | ||
71 | "verbose\0" No_argument "l" | ||
72 | ; | ||
73 | opt = getopt32long(argv, "^" | ||
74 | OPT_STR | ||
75 | "\0" "-1" | ||
76 | IF_DESKTOP(":?4") | ||
77 | IF_NOT_DESKTOP(":?2") | ||
78 | ":l--s:s--l", | ||
79 | cmp_longopts, | ||
80 | &max_count | ||
81 | ); | ||
82 | #endif | ||
65 | argv += optind; | 83 | argv += optind; |
66 | 84 | ||
67 | filename1 = *argv; | 85 | filename1 = *argv; |