summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen2001-02-17 16:52:35 +0000
committerEric Andersen2001-02-17 16:52:35 +0000
commitb50da53e0c6e07bbf69ac7ec1730087edf6815a1 (patch)
tree6eddca7dd6a5a4a4e11ffee856d408067fdc576f
parent3d20f772c2dc55acdc5f3503e7e308c387e4e15c (diff)
downloadbusybox-b50da53e0c6e07bbf69ac7ec1730087edf6815a1.zip
busybox-b50da53e0c6e07bbf69ac7ec1730087edf6815a1.tar.gz
Get rid of long stale usage message code.
-Erik
-rw-r--r--coreutils/df.c9
-rw-r--r--df.c9
-rw-r--r--editors/sed.c7
-rw-r--r--sed.c7
4 files changed, 12 insertions, 20 deletions
diff --git a/coreutils/df.c b/coreutils/df.c
index 8b6726b..692205a 100644
--- a/coreutils/df.c
+++ b/coreutils/df.c
@@ -85,7 +85,7 @@ extern int df_main(int argc, char **argv)
int opt = 0;
int i = 0;
- while ((opt = getopt(argc, argv, "?"
+ while ((opt = getopt(argc, argv,
#ifdef BB_FEATURE_HUMAN_READABLE
"hm"
#endif
@@ -100,7 +100,8 @@ extern int df_main(int argc, char **argv)
#else
case 'k': break;
#endif
- case '?': goto print_df_usage; break;
+ default:
+ show_usage();
}
}
@@ -141,10 +142,6 @@ extern int df_main(int argc, char **argv)
}
return status;
-
-print_df_usage:
- show_usage();
- return(FALSE);
}
/*
diff --git a/df.c b/df.c
index 8b6726b..692205a 100644
--- a/df.c
+++ b/df.c
@@ -85,7 +85,7 @@ extern int df_main(int argc, char **argv)
int opt = 0;
int i = 0;
- while ((opt = getopt(argc, argv, "?"
+ while ((opt = getopt(argc, argv,
#ifdef BB_FEATURE_HUMAN_READABLE
"hm"
#endif
@@ -100,7 +100,8 @@ extern int df_main(int argc, char **argv)
#else
case 'k': break;
#endif
- case '?': goto print_df_usage; break;
+ default:
+ show_usage();
}
}
@@ -141,10 +142,6 @@ extern int df_main(int argc, char **argv)
}
return status;
-
-print_df_usage:
- show_usage();
- return(FALSE);
}
/*
diff --git a/editors/sed.c b/editors/sed.c
index 3901813..0f0f4a2 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -670,11 +670,8 @@ extern int sed_main(int argc, char **argv)
#endif
/* do normal option parsing */
- while ((opt = getopt(argc, argv, "hne:f:")) > 0) {
+ while ((opt = getopt(argc, argv, "ne:f:")) > 0) {
switch (opt) {
- case 'h':
- show_usage();
- break;
case 'n':
be_quiet++;
break;
@@ -684,6 +681,8 @@ extern int sed_main(int argc, char **argv)
case 'f':
load_cmd_file(optarg);
break;
+ default:
+ show_usage();
}
}
diff --git a/sed.c b/sed.c
index 3901813..0f0f4a2 100644
--- a/sed.c
+++ b/sed.c
@@ -670,11 +670,8 @@ extern int sed_main(int argc, char **argv)
#endif
/* do normal option parsing */
- while ((opt = getopt(argc, argv, "hne:f:")) > 0) {
+ while ((opt = getopt(argc, argv, "ne:f:")) > 0) {
switch (opt) {
- case 'h':
- show_usage();
- break;
case 'n':
be_quiet++;
break;
@@ -684,6 +681,8 @@ extern int sed_main(int argc, char **argv)
case 'f':
load_cmd_file(optarg);
break;
+ default:
+ show_usage();
}
}