diff options
author | bug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2005-12-11 03:09:05 +0000 |
---|---|---|
committer | bug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2005-12-11 03:09:05 +0000 |
commit | b4278a33a965c9c950574c829265edd018dbe4fc (patch) | |
tree | c6410295b7270b93ffab84419419b9b05586e370 /coreutils/head.c | |
parent | 9ce34d9eb4a006d94cb631c54a5f1bda9b79356f (diff) | |
download | busybox-w32-b4278a33a965c9c950574c829265edd018dbe4fc.tar.gz busybox-w32-b4278a33a965c9c950574c829265edd018dbe4fc.tar.bz2 busybox-w32-b4278a33a965c9c950574c829265edd018dbe4fc.zip |
Add build options to control SuS compatability, allows numeric
option handling to be disabled.
Defaults to enabled, so no changes in default behaviour
git-svn-id: svn://busybox.net/trunk/busybox@12835 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'coreutils/head.c')
-rw-r--r-- | coreutils/head.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/coreutils/head.c b/coreutils/head.c index dab4de11b..a20873333 100644 --- a/coreutils/head.c +++ b/coreutils/head.c | |||
@@ -56,6 +56,7 @@ int head_main(int argc, char **argv) | |||
56 | int c; | 56 | int c; |
57 | int retval = EXIT_SUCCESS; | 57 | int retval = EXIT_SUCCESS; |
58 | 58 | ||
59 | #if defined CONFIG_FEATURE_SUSv2 || defined CONFIG_FEATURE_FANCY_HEAD | ||
59 | /* Allow legacy syntax of an initial numeric option without -n. */ | 60 | /* Allow legacy syntax of an initial numeric option without -n. */ |
60 | if ((argc > 1) && (argv[1][0] == '-') | 61 | if ((argc > 1) && (argv[1][0] == '-') |
61 | /* && (isdigit)(argv[1][1]) */ | 62 | /* && (isdigit)(argv[1][1]) */ |
@@ -66,7 +67,9 @@ int head_main(int argc, char **argv) | |||
66 | p = (*argv) + 1; | 67 | p = (*argv) + 1; |
67 | goto GET_COUNT; | 68 | goto GET_COUNT; |
68 | } | 69 | } |
70 | #endif | ||
69 | 71 | ||
72 | /* No size benefit in converting this to bb_getopt_ulflags */ | ||
70 | while ((opt = getopt(argc, argv, head_opts)) > 0) { | 73 | while ((opt = getopt(argc, argv, head_opts)) > 0) { |
71 | switch(opt) { | 74 | switch(opt) { |
72 | #ifdef CONFIG_FEATURE_FANCY_HEAD | 75 | #ifdef CONFIG_FEATURE_FANCY_HEAD |