Refactor out some duplicated code

This commit is contained in:
Justine Tunney 2021-08-14 06:17:56 -07:00
parent e963d9c8e3
commit 579b597ded
58 changed files with 1110 additions and 3214 deletions

View file

@ -156,9 +156,10 @@ int getopt(int nargc, char *const nargv[], const char *ostr) {
/* option-argument absent */
getopt_place = kGetoptEmsg;
if (*ostr == ':') return (BADARG);
if (opterr)
if (opterr) {
fprintf(stderr, "%s%s%c\n", program_invocation_name,
": option requires an argument -- ", optopt);
}
return (BADCH);
}
getopt_place = kGetoptEmsg;