From 27a804246af28c5d3d1f69d93049e3e21492bc48 Mon Sep 17 00:00:00 2001 From: Matt Kraai Date: Wed, 19 Jul 2000 19:24:01 +0000 Subject: Centralize handling of --help. --- coreutils/cut.c | 3 --- coreutils/hostid.c | 3 --- coreutils/pwd.c | 3 --- coreutils/test.c | 3 --- 4 files changed, 12 deletions(-) (limited to 'coreutils') 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) 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 3bf79de47..f1010a65d 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 1a023d383..f0c923b7b 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 9a1888b28..818b3db12 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: -- cgit v1.2.3