summaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/du.c8
-rw-r--r--coreutils/env.c3
-rw-r--r--coreutils/od_bloaty.c3
-rw-r--r--coreutils/sort.c5
-rw-r--r--coreutils/split.c4
-rw-r--r--coreutils/tail.c4
-rw-r--r--coreutils/uniq.c3
7 files changed, 13 insertions, 17 deletions
diff --git a/coreutils/du.c b/coreutils/du.c
index 1240bcb..5f10473 100644
--- a/coreutils/du.c
+++ b/coreutils/du.c
@@ -226,8 +226,8 @@ int du_main(int argc UNUSED_PARAM, char **argv)
* ignore -a. This is consistent with -s being equivalent to -d 0.
*/
#if ENABLE_FEATURE_HUMAN_READABLE
- opt_complementary = "h-km:k-hm:m-hk:H-L:L-H:s-d:d-s:d+";
- opt = getopt32(argv, "aHkLsx" "d:" "lc" "hm", &G.max_print_depth);
+ opt_complementary = "h-km:k-hm:m-hk:H-L:L-H:s-d:d-s";
+ opt = getopt32(argv, "aHkLsx" "d:+" "lc" "hm", &G.max_print_depth);
argv += optind;
if (opt & OPT_h_for_humans) {
G.disp_unit = 0;
@@ -239,8 +239,8 @@ int du_main(int argc UNUSED_PARAM, char **argv)
G.disp_unit = 1024;
}
#else
- opt_complementary = "H-L:L-H:s-d:d-s:d+";
- opt = getopt32(argv, "aHkLsx" "d:" "lc", &G.max_print_depth);
+ opt_complementary = "H-L:L-H:s-d:d-s";
+ opt = getopt32(argv, "aHkLsx" "d:+" "lc", &G.max_print_depth);
argv += optind;
#if !ENABLE_FEATURE_DU_DEFAULT_BLOCKSIZE_1K
if (opt & OPT_k_kbytes) {
diff --git a/coreutils/env.c b/coreutils/env.c
index 807ef13..cdfc30e 100644
--- a/coreutils/env.c
+++ b/coreutils/env.c
@@ -54,11 +54,10 @@ int env_main(int argc UNUSED_PARAM, char **argv)
unsigned opts;
llist_t *unset_env = NULL;
- opt_complementary = "u::";
#if ENABLE_FEATURE_ENV_LONG_OPTIONS
applet_long_options = env_longopts;
#endif
- opts = getopt32(argv, "+iu:", &unset_env);
+ opts = getopt32(argv, "+iu:+", &unset_env);
argv += optind;
if (argv[0] && LONE_DASH(argv[0])) {
opts |= 1;
diff --git a/coreutils/od_bloaty.c b/coreutils/od_bloaty.c
index c8a6541..f13bdfc 100644
--- a/coreutils/od_bloaty.c
+++ b/coreutils/od_bloaty.c
@@ -62,7 +62,7 @@ enum {
};
#define OD_GETOPT32() getopt32(argv, \
- "A:N:abcdfhij:lot:vxsS:w::", \
+ "A:N:abcdfhij:lot:*vxsS:w:+:", \
/* -w with optional param */ \
/* -S was -s and also had optional parameter */ \
/* but in coreutils 6.3 it was renamed and now has */ \
@@ -1212,7 +1212,6 @@ int od_main(int argc UNUSED_PARAM, char **argv)
address_pad_len_char = '7';
/* Parse command line */
- opt_complementary = "w+:t::"; /* -w N, -t is a list */
#if ENABLE_LONG_OPTS
applet_long_options = od_longopts;
#endif
diff --git a/coreutils/sort.c b/coreutils/sort.c
index 9139d9f..34a4199 100644
--- a/coreutils/sort.c
+++ b/coreutils/sort.c
@@ -73,7 +73,7 @@
*/
/* These are sort types */
-static const char OPT_STR[] ALIGN1 = "ngMucszbrdfimS:T:o:k:t:";
+static const char OPT_STR[] ALIGN1 = "ngMucszbrdfimS:T:o:k:*t:";
enum {
FLAG_n = 1, /* Numeric sort */
FLAG_g = 2, /* Sort using strtod() */
@@ -358,8 +358,7 @@ int sort_main(int argc UNUSED_PARAM, char **argv)
/* Parse command line options */
/* -o and -t can be given at most once */
- opt_complementary = "o--o:t--t:" /* -t, -o: at most one of each */
- "k::"; /* -k takes list */
+ opt_complementary = "o--o:t--t"; /* -t, -o: at most one of each */
opts = getopt32(argv, OPT_STR, &str_ignored, &str_ignored, &str_o, &lst_k, &str_t);
/* global b strips leading and trailing spaces */
if (opts & FLAG_b)
diff --git a/coreutils/split.c b/coreutils/split.c
index e67c3de..19d58a2 100644
--- a/coreutils/split.c
+++ b/coreutils/split.c
@@ -81,8 +81,8 @@ int split_main(int argc UNUSED_PARAM, char **argv)
setup_common_bufsiz();
- opt_complementary = "?2:a+"; /* max 2 args; -a N */
- opt = getopt32(argv, "l:b:a:", &count_p, &count_p, &suffix_len);
+ opt_complementary = "?2"; /* max 2 args; -a N */
+ opt = getopt32(argv, "l:b:a:+", &count_p, &count_p, &suffix_len);
if (opt & SPLIT_OPT_l)
cnt = XATOOFF(count_p);
diff --git a/coreutils/tail.c b/coreutils/tail.c
index 39f8767..57ad0f3 100644
--- a/coreutils/tail.c
+++ b/coreutils/tail.c
@@ -121,8 +121,8 @@ int tail_main(int argc, char **argv)
#endif
/* -s NUM, -F imlies -f */
- IF_FEATURE_FANCY_TAIL(opt_complementary = "s+:Ff";)
- opt = getopt32(argv, "fc:n:" IF_FEATURE_FANCY_TAIL("qs:vF"),
+ IF_FEATURE_FANCY_TAIL(opt_complementary = "Ff";)
+ opt = getopt32(argv, "fc:n:" IF_FEATURE_FANCY_TAIL("qs:+vF"),
&str_c, &str_n IF_FEATURE_FANCY_TAIL(,&sleep_period));
#define FOLLOW (opt & 0x1)
#define COUNT_BYTES (opt & 0x2)
diff --git a/coreutils/uniq.c b/coreutils/uniq.c
index e013399..ec7bde4 100644
--- a/coreutils/uniq.c
+++ b/coreutils/uniq.c
@@ -50,8 +50,7 @@ int uniq_main(int argc UNUSED_PARAM, char **argv)
skip_fields = skip_chars = 0;
max_chars = INT_MAX;
- opt_complementary = "f+:s+:w+";
- opt = getopt32(argv, "cduf:s:w:", &skip_fields, &skip_chars, &max_chars);
+ opt = getopt32(argv, "cduf:+s:+w:+", &skip_fields, &skip_chars, &max_chars);
argv += optind;
input_filename = argv[0];