mirror of
https://git.lain.church/bake/bake.git
synced 2025-05-18 17:36:43 +00:00
longopt select fix
This commit is contained in:
parent
c791f9f82b
commit
b3633108b2
2
bake.l
2
bake.l
@ -146,7 +146,7 @@ int main (int ac, char ** av) {
|
||||
if (!strcmp(av[0]+2, "dry-run")) { i = strlen(av[0]); goto opt_dry_run; }
|
||||
if (!strcmp(av[0]+2, "color")) { i = strlen(av[0]); goto opt_color; }
|
||||
if (!strcmp(av[0]+2, "expunge")) { i = strlen(av[0]); goto opt_expunge; }
|
||||
if (!strcmp(av[0]+2, "select" )) { if (!ac-1 || isdigit(av[1][0])) { goto opt_arg; }
|
||||
if (!strcmp(av[0]+2, "select" )) { if (!(ac-1) || !isdigit(av[1][0])) { goto opt_arg; }
|
||||
++av, --ac; i = strlen(av[0]); goto opt_select; }
|
||||
if (!strcmp(av[0]+2, "list" )) { i = strlen(av[0]); goto opt_list; }
|
||||
if (!strcmp(av[0]+2, "help" )) { goto opt_help; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user