diff options
author | Matt Kraai <kraai@debian.org> | 2000-07-19 19:24:01 +0000 |
---|---|---|
committer | Matt Kraai <kraai@debian.org> | 2000-07-19 19:24:01 +0000 |
commit | 27a804246af28c5d3d1f69d93049e3e21492bc48 (patch) | |
tree | 1532267f0161afd05240909eafea4283247df356 /coreutils | |
parent | 869057238b4ae1544ee9df28fca4157b041175f9 (diff) | |
download | busybox-w32-27a804246af28c5d3d1f69d93049e3e21492bc48.tar.gz busybox-w32-27a804246af28c5d3d1f69d93049e3e21492bc48.tar.bz2 busybox-w32-27a804246af28c5d3d1f69d93049e3e21492bc48.zip |
Centralize handling of --help.
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/cut.c | 3 | ||||
-rw-r--r-- | coreutils/hostid.c | 3 | ||||
-rw-r--r-- | coreutils/pwd.c | 3 | ||||
-rw-r--r-- | coreutils/test.c | 3 |
4 files changed, 0 insertions, 12 deletions
diff --git a/coreutils/cut.c b/coreutils/cut.c index 8b28fff7a..4907ed935 100644 --- a/coreutils/cut.c +++ b/coreutils/cut.c | |||
@@ -211,9 +211,6 @@ int cut_main(int argc, char **argv) | |||
211 | int i = 1; | 211 | int i = 1; |
212 | int numberFilenames = 0; | 212 | int numberFilenames = 0; |
213 | 213 | ||
214 | if (argc == 1 || strcmp(argv[1], dash_dash_help)==0) | ||
215 | usage(cut_usage); | ||
216 | |||
217 | while (i < argc) { | 214 | while (i < argc) { |
218 | if (argv[i][0] == '-') { | 215 | if (argv[i][0] == '-') { |
219 | switch (argv[i++][1]) { | 216 | switch (argv[i++][1]) { |
diff --git a/coreutils/hostid.c b/coreutils/hostid.c index 3bf79de47..f1010a65d 100644 --- a/coreutils/hostid.c +++ b/coreutils/hostid.c | |||
@@ -25,9 +25,6 @@ | |||
25 | 25 | ||
26 | extern int hostid_main(int argc, char **argv) | 26 | extern int hostid_main(int argc, char **argv) |
27 | { | 27 | { |
28 | if (argc > 1 && strcmp(argv[1], "--help") == 0) | ||
29 | usage(hostid_usage); | ||
30 | |||
31 | printf("%lx\n", gethostid()); | 28 | printf("%lx\n", gethostid()); |
32 | return(TRUE); | 29 | return(TRUE); |
33 | } | 30 | } |
diff --git a/coreutils/pwd.c b/coreutils/pwd.c index 1a023d383..f0c923b7b 100644 --- a/coreutils/pwd.c +++ b/coreutils/pwd.c | |||
@@ -30,9 +30,6 @@ extern int pwd_main(int argc, char **argv) | |||
30 | { | 30 | { |
31 | char buf[BUFSIZ + 1]; | 31 | char buf[BUFSIZ + 1]; |
32 | 32 | ||
33 | if (argc > 1 && strcmp(argv[1], "--help") == 0) | ||
34 | usage(pwd_usage); | ||
35 | |||
36 | if (getcwd(buf, sizeof(buf)) == NULL) | 33 | if (getcwd(buf, sizeof(buf)) == NULL) |
37 | fatalError("%s\n", strerror(errno)); | 34 | fatalError("%s\n", strerror(errno)); |
38 | 35 | ||
diff --git a/coreutils/test.c b/coreutils/test.c index 9a1888b28..818b3db12 100644 --- a/coreutils/test.c +++ b/coreutils/test.c | |||
@@ -188,9 +188,6 @@ test_main(int argc, char** argv) | |||
188 | fatalError("missing ]\n"); | 188 | fatalError("missing ]\n"); |
189 | argv[argc] = NULL; | 189 | argv[argc] = NULL; |
190 | } | 190 | } |
191 | if (strcmp(argv[1], dash_dash_help) == 0) | ||
192 | usage(test_usage); | ||
193 | |||
194 | /* Implement special cases from POSIX.2, section 4.62.4 */ | 191 | /* Implement special cases from POSIX.2, section 4.62.4 */ |
195 | switch (argc) { | 192 | switch (argc) { |
196 | case 1: | 193 | case 1: |