Centralize handling of --help.
This commit is contained in:
@@ -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]) {
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -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));
|
||||
|
||||
|
@@ -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:
|
||||
|
Reference in New Issue
Block a user