treewide: get rid of remaing getopt/getopt_long stuff
This commit is contained in:
@@ -31,7 +31,7 @@ int parse_boolean_argument(const char *optname, const char *s, bool *ret) {
|
||||
*ret = r;
|
||||
return r;
|
||||
} else {
|
||||
/* s may be NULL. This is controlled by getopt_long() parameters. */
|
||||
/* s may be NULL. This is controlled by OPTION flags. */
|
||||
if (ret)
|
||||
*ret = true;
|
||||
return true;
|
||||
@@ -42,10 +42,10 @@ int parse_tristate_argument_with_auto(const char *optname, const char *s, int *r
|
||||
int r;
|
||||
|
||||
assert(optname);
|
||||
assert(s); /* We refuse NULL optarg here, since that would be ambiguous on cmdline:
|
||||
for --enable-a[=BOOL], --enable-a is intuitively interpreted as true rather than "auto"
|
||||
(parse_boolean_argument() does exactly that). IOW, tristate options should require
|
||||
arguments. */
|
||||
assert(s); /* We refuse NULL arg here, since that would be ambiguous on cmdline: for
|
||||
* --enable-a[=BOOL], --enable-a is intuitively interpreted as true rather than "auto"
|
||||
* (parse_boolean_argument() does exactly that). IOW, tristate options should require
|
||||
* arguments. */
|
||||
|
||||
r = parse_tristate_full(s, "auto", ret);
|
||||
if (r < 0)
|
||||
|
||||
Reference in New Issue
Block a user