mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 00:02:28 +00:00
Refactor out some duplicated code
This commit is contained in:
parent
e963d9c8e3
commit
579b597ded
58 changed files with 1110 additions and 3214 deletions
3
third_party/getopt/getopt.c
vendored
3
third_party/getopt/getopt.c
vendored
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue