Get rid of long stale usage message code.

-Erik
This commit is contained in:
Eric Andersen 2001-02-17 16:52:35 +00:00
parent 3d20f772c2
commit b50da53e0c
4 changed files with 12 additions and 20 deletions

View File

@ -85,7 +85,7 @@ extern int df_main(int argc, char **argv)
int opt = 0; int opt = 0;
int i = 0; int i = 0;
while ((opt = getopt(argc, argv, "?" while ((opt = getopt(argc, argv,
#ifdef BB_FEATURE_HUMAN_READABLE #ifdef BB_FEATURE_HUMAN_READABLE
"hm" "hm"
#endif #endif
@ -100,7 +100,8 @@ extern int df_main(int argc, char **argv)
#else #else
case 'k': break; case 'k': break;
#endif #endif
case '?': goto print_df_usage; break; default:
show_usage();
} }
} }
@ -141,10 +142,6 @@ extern int df_main(int argc, char **argv)
} }
return status; return status;
print_df_usage:
show_usage();
return(FALSE);
} }
/* /*

9
df.c
View File

@ -85,7 +85,7 @@ extern int df_main(int argc, char **argv)
int opt = 0; int opt = 0;
int i = 0; int i = 0;
while ((opt = getopt(argc, argv, "?" while ((opt = getopt(argc, argv,
#ifdef BB_FEATURE_HUMAN_READABLE #ifdef BB_FEATURE_HUMAN_READABLE
"hm" "hm"
#endif #endif
@ -100,7 +100,8 @@ extern int df_main(int argc, char **argv)
#else #else
case 'k': break; case 'k': break;
#endif #endif
case '?': goto print_df_usage; break; default:
show_usage();
} }
} }
@ -141,10 +142,6 @@ extern int df_main(int argc, char **argv)
} }
return status; return status;
print_df_usage:
show_usage();
return(FALSE);
} }
/* /*

View File

@ -670,11 +670,8 @@ extern int sed_main(int argc, char **argv)
#endif #endif
/* do normal option parsing */ /* do normal option parsing */
while ((opt = getopt(argc, argv, "hne:f:")) > 0) { while ((opt = getopt(argc, argv, "ne:f:")) > 0) {
switch (opt) { switch (opt) {
case 'h':
show_usage();
break;
case 'n': case 'n':
be_quiet++; be_quiet++;
break; break;
@ -684,6 +681,8 @@ extern int sed_main(int argc, char **argv)
case 'f': case 'f':
load_cmd_file(optarg); load_cmd_file(optarg);
break; break;
default:
show_usage();
} }
} }

7
sed.c
View File

@ -670,11 +670,8 @@ extern int sed_main(int argc, char **argv)
#endif #endif
/* do normal option parsing */ /* do normal option parsing */
while ((opt = getopt(argc, argv, "hne:f:")) > 0) { while ((opt = getopt(argc, argv, "ne:f:")) > 0) {
switch (opt) { switch (opt) {
case 'h':
show_usage();
break;
case 'n': case 'n':
be_quiet++; be_quiet++;
break; break;
@ -684,6 +681,8 @@ extern int sed_main(int argc, char **argv)
case 'f': case 'f':
load_cmd_file(optarg); load_cmd_file(optarg);
break; break;
default:
show_usage();
} }
} }