aboutsummaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-06-19 12:10:38 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-06-19 12:10:38 +0200
commitf3b92d385695aecefd93d5f199be1f64270c2687 (patch)
tree5d6b2308ceafea6040bd78ea8401a91eb65d376b /coreutils
parente2e4cc249dc1bd4b280846f55a36208674eadd55 (diff)
downloadbusybox-w32-f3b92d385695aecefd93d5f199be1f64270c2687.tar.gz
busybox-w32-f3b92d385695aecefd93d5f199be1f64270c2687.tar.bz2
busybox-w32-f3b92d385695aecefd93d5f199be1f64270c2687.zip
getopt: FEATURE_GETOPT_LONG for -l; rename GETOPT_LONG to LONG_OPTS
Signed-off-by: Colin Watson <cjwatson@ubuntu.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/Config.in16
-rw-r--r--coreutils/od_bloaty.c12
-rw-r--r--coreutils/touch.c4
-rw-r--r--coreutils/uname.c4
4 files changed, 18 insertions, 18 deletions
diff --git a/coreutils/Config.in b/coreutils/Config.in
index 88642d71e..f9db0671d 100644
--- a/coreutils/Config.in
+++ b/coreutils/Config.in
@@ -204,7 +204,7 @@ config ENV
204config FEATURE_ENV_LONG_OPTIONS 204config FEATURE_ENV_LONG_OPTIONS
205 bool "Enable long options" 205 bool "Enable long options"
206 default n 206 default n
207 depends on ENV && GETOPT_LONG 207 depends on ENV && LONG_OPTS
208 help 208 help
209 Support long options for the env applet. 209 Support long options for the env applet.
210 210
@@ -217,7 +217,7 @@ config EXPAND
217config FEATURE_EXPAND_LONG_OPTIONS 217config FEATURE_EXPAND_LONG_OPTIONS
218 bool "Enable long options" 218 bool "Enable long options"
219 default n 219 default n
220 depends on EXPAND && GETOPT_LONG 220 depends on EXPAND && LONG_OPTS
221 help 221 help
222 Support long options for the expand applet. 222 Support long options for the expand applet.
223 223
@@ -291,7 +291,7 @@ config INSTALL
291config FEATURE_INSTALL_LONG_OPTIONS 291config FEATURE_INSTALL_LONG_OPTIONS
292 bool "Enable long options" 292 bool "Enable long options"
293 default n 293 default n
294 depends on INSTALL && GETOPT_LONG 294 depends on INSTALL && LONG_OPTS
295 help 295 help
296 Support long options for the install applet. 296 Support long options for the install applet.
297 297
@@ -364,7 +364,7 @@ config FEATURE_LS_USERNAME
364config FEATURE_LS_COLOR 364config FEATURE_LS_COLOR
365 bool "Allow use of color to identify file types" 365 bool "Allow use of color to identify file types"
366 default y 366 default y
367 depends on LS && GETOPT_LONG 367 depends on LS && LONG_OPTS
368 help 368 help
369 This enables the --color option to ls. 369 This enables the --color option to ls.
370 370
@@ -394,7 +394,7 @@ config MKDIR
394config FEATURE_MKDIR_LONG_OPTIONS 394config FEATURE_MKDIR_LONG_OPTIONS
395 bool "Enable long options" 395 bool "Enable long options"
396 default n 396 default n
397 depends on MKDIR && GETOPT_LONG 397 depends on MKDIR && LONG_OPTS
398 help 398 help
399 Support long options for the mkdir applet. 399 Support long options for the mkdir applet.
400 400
@@ -421,7 +421,7 @@ config MV
421config FEATURE_MV_LONG_OPTIONS 421config FEATURE_MV_LONG_OPTIONS
422 bool "Enable long options" 422 bool "Enable long options"
423 default n 423 default n
424 depends on MV && GETOPT_LONG 424 depends on MV && LONG_OPTS
425 help 425 help
426 Support long options for the mv applet. 426 Support long options for the mv applet.
427 427
@@ -498,7 +498,7 @@ config RMDIR
498config FEATURE_RMDIR_LONG_OPTIONS 498config FEATURE_RMDIR_LONG_OPTIONS
499 bool "Enable long options" 499 bool "Enable long options"
500 default n 500 default n
501 depends on RMDIR && GETOPT_LONG 501 depends on RMDIR && LONG_OPTS
502 help 502 help
503 Support long options for the rmdir applet, including 503 Support long options for the rmdir applet, including
504 --ignore-fail-on-non-empty for compatibility with GNU rmdir. 504 --ignore-fail-on-non-empty for compatibility with GNU rmdir.
@@ -732,7 +732,7 @@ config UNEXPAND
732config FEATURE_UNEXPAND_LONG_OPTIONS 732config FEATURE_UNEXPAND_LONG_OPTIONS
733 bool "Enable long options" 733 bool "Enable long options"
734 default n 734 default n
735 depends on UNEXPAND && GETOPT_LONG 735 depends on UNEXPAND && LONG_OPTS
736 help 736 help
737 Support long options for the unexpand applet. 737 Support long options for the unexpand applet.
738 738
diff --git a/coreutils/od_bloaty.c b/coreutils/od_bloaty.c
index eb4579857..00efec51c 100644
--- a/coreutils/od_bloaty.c
+++ b/coreutils/od_bloaty.c
@@ -832,7 +832,7 @@ format_address_std(off_t address, char c)
832 printf(address_fmt, address); 832 printf(address_fmt, address);
833} 833}
834 834
835#if ENABLE_GETOPT_LONG 835#if ENABLE_LONG_OPTS
836/* only used with --traditional */ 836/* only used with --traditional */
837static void 837static void
838format_address_paren(off_t address, char c) 838format_address_paren(off_t address, char c)
@@ -953,7 +953,7 @@ get_lcm(void)
953 return l_c_m; 953 return l_c_m;
954} 954}
955 955
956#if ENABLE_GETOPT_LONG 956#if ENABLE_LONG_OPTS
957/* If S is a valid traditional offset specification with an optional 957/* If S is a valid traditional offset specification with an optional
958 leading '+' return nonzero and set *OFFSET to the offset it denotes. */ 958 leading '+' return nonzero and set *OFFSET to the offset it denotes. */
959 959
@@ -1199,9 +1199,9 @@ int od_main(int argc, char **argv)
1199 OPT_s = 1 << 15, 1199 OPT_s = 1 << 15,
1200 OPT_S = 1 << 16, 1200 OPT_S = 1 << 16,
1201 OPT_w = 1 << 17, 1201 OPT_w = 1 << 17,
1202 OPT_traditional = (1 << 18) * ENABLE_GETOPT_LONG, 1202 OPT_traditional = (1 << 18) * ENABLE_LONG_OPTS,
1203 }; 1203 };
1204#if ENABLE_GETOPT_LONG 1204#if ENABLE_LONG_OPTS
1205 static const char od_longopts[] ALIGN1 = 1205 static const char od_longopts[] ALIGN1 =
1206 "skip-bytes\0" Required_argument "j" 1206 "skip-bytes\0" Required_argument "j"
1207 "address-radix\0" Required_argument "A" 1207 "address-radix\0" Required_argument "A"
@@ -1235,7 +1235,7 @@ int od_main(int argc, char **argv)
1235 1235
1236 /* Parse command line */ 1236 /* Parse command line */
1237 opt_complementary = "w+:t::"; /* -w N, -t is a list */ 1237 opt_complementary = "w+:t::"; /* -w N, -t is a list */
1238#if ENABLE_GETOPT_LONG 1238#if ENABLE_LONG_OPTS
1239 applet_long_options = od_longopts; 1239 applet_long_options = od_longopts;
1240#endif 1240#endif
1241 opt = getopt32(argv, "A:N:abcdfhij:lot:vxsS:" 1241 opt = getopt32(argv, "A:N:abcdfhij:lot:vxsS:"
@@ -1306,7 +1306,7 @@ int od_main(int argc, char **argv)
1306 * FIXME: POSIX 1003.1-2001 with XSI requires support for the 1306 * FIXME: POSIX 1003.1-2001 with XSI requires support for the
1307 * traditional syntax even if --traditional is not given. */ 1307 * traditional syntax even if --traditional is not given. */
1308 1308
1309#if ENABLE_GETOPT_LONG 1309#if ENABLE_LONG_OPTS
1310 if (opt & OPT_traditional) { 1310 if (opt & OPT_traditional) {
1311 off_t o1, o2; 1311 off_t o1, o2;
1312 1312
diff --git a/coreutils/touch.c b/coreutils/touch.c
index 1d5541710..7d434a233 100644
--- a/coreutils/touch.c
+++ b/coreutils/touch.c
@@ -41,7 +41,7 @@ int touch_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
41int touch_main(int argc UNUSED_PARAM, char **argv) 41int touch_main(int argc UNUSED_PARAM, char **argv)
42{ 42{
43#if ENABLE_DESKTOP 43#if ENABLE_DESKTOP
44#if ENABLE_GETOPT_LONG 44#if ENABLE_LONG_OPTS
45 static const char longopts[] ALIGN1 = 45 static const char longopts[] ALIGN1 =
46 /* name, has_arg, val */ 46 /* name, has_arg, val */
47 "no-create\0" No_argument "c" 47 "no-create\0" No_argument "c"
@@ -59,7 +59,7 @@ int touch_main(int argc UNUSED_PARAM, char **argv)
59 int opts; 59 int opts;
60 60
61#if ENABLE_DESKTOP 61#if ENABLE_DESKTOP
62#if ENABLE_GETOPT_LONG 62#if ENABLE_LONG_OPTS
63 applet_long_options = longopts; 63 applet_long_options = longopts;
64#endif 64#endif
65#endif 65#endif
diff --git a/coreutils/uname.c b/coreutils/uname.c
index 5a790fb70..df4566063 100644
--- a/coreutils/uname.c
+++ b/coreutils/uname.c
@@ -73,7 +73,7 @@ static const unsigned short utsname_offset[] = {
73int uname_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 73int uname_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
74int uname_main(int argc UNUSED_PARAM, char **argv) 74int uname_main(int argc UNUSED_PARAM, char **argv)
75{ 75{
76#if ENABLE_GETOPT_LONG 76#if ENABLE_LONG_OPTS
77 static const char longopts[] ALIGN1 = 77 static const char longopts[] ALIGN1 =
78 /* name, has_arg, val */ 78 /* name, has_arg, val */
79 "all\0" No_argument "a" 79 "all\0" No_argument "a"
@@ -97,7 +97,7 @@ int uname_main(int argc UNUSED_PARAM, char **argv)
97 const unsigned short *delta; 97 const unsigned short *delta;
98 unsigned toprint; 98 unsigned toprint;
99 99
100 IF_GETOPT_LONG(applet_long_options = longopts); 100 IF_LONG_OPTS(applet_long_options = longopts);
101 toprint = getopt32(argv, options); 101 toprint = getopt32(argv, options);
102 102
103 if (argv[optind]) { /* coreutils-6.9 compat */ 103 if (argv[optind]) { /* coreutils-6.9 compat */