diff options
author | Matt Kraai | 2000-07-19 19:24:01 +0000 |
---|---|---|
committer | Matt Kraai | 2000-07-19 19:24:01 +0000 |
commit | 27a804246af28c5d3d1f69d93049e3e21492bc48 (patch) | |
tree | 1532267f0161afd05240909eafea4283247df356 /coreutils | |
parent | 869057238b4ae1544ee9df28fca4157b041175f9 (diff) | |
download | busybox-27a804246af28c5d3d1f69d93049e3e21492bc48.zip busybox-27a804246af28c5d3d1f69d93049e3e21492bc48.tar.gz |
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 8b28fff..4907ed9 100644 --- a/coreutils/cut.c +++ b/coreutils/cut.c @@ -211,9 +211,6 @@ int cut_main(int argc, char **argv) int i = 1; int numberFilenames = 0; - if (argc == 1 || strcmp(argv[1], dash_dash_help)==0) - usage(cut_usage); - while (i < argc) { if (argv[i][0] == '-') { switch (argv[i++][1]) { diff --git a/coreutils/hostid.c b/coreutils/hostid.c index 3bf79de..f1010a6 100644 --- a/coreutils/hostid.c +++ b/coreutils/hostid.c @@ -25,9 +25,6 @@ extern int hostid_main(int argc, char **argv) { - if (argc > 1 && strcmp(argv[1], "--help") == 0) - usage(hostid_usage); - printf("%lx\n", gethostid()); return(TRUE); } diff --git a/coreutils/pwd.c b/coreutils/pwd.c index 1a023d3..f0c923b 100644 --- a/coreutils/pwd.c +++ b/coreutils/pwd.c @@ -30,9 +30,6 @@ extern int pwd_main(int argc, char **argv) { char buf[BUFSIZ + 1]; - if (argc > 1 && strcmp(argv[1], "--help") == 0) - usage(pwd_usage); - if (getcwd(buf, sizeof(buf)) == NULL) fatalError("%s\n", strerror(errno)); diff --git a/coreutils/test.c b/coreutils/test.c index 9a1888b..818b3db 100644 --- a/coreutils/test.c +++ b/coreutils/test.c @@ -188,9 +188,6 @@ test_main(int argc, char** argv) fatalError("missing ]\n"); argv[argc] = NULL; } - if (strcmp(argv[1], dash_dash_help) == 0) - usage(test_usage); - /* Implement special cases from POSIX.2, section 4.62.4 */ switch (argc) { case 1: |