projects
/
platform
/
upstream
/
toybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
63e042c
)
Ashwini Sharma pointed out that my previous tweak to [!abc] groups still didn't get...
author
Rob Landley
<rob@landley.net>
Sat, 29 Dec 2012 09:18:34 +0000
(
03:18
-0600)
committer
Rob Landley
<rob@landley.net>
Sat, 29 Dec 2012 09:18:34 +0000
(
03:18
-0600)
lib/args.c
patch
|
blob
|
history
diff --git
a/lib/args.c
b/lib/args.c
index
e4b774b
..
67c7788
100644
(file)
--- a/
lib/args.c
+++ b/
lib/args.c
@@
-132,8
+132,10
@@
static int gotflag(struct getoptflagstate *gof, struct opts *opt)
struct opts *bad;
unsigned i = 1;
- for (bad=gof->opts; opt == bad || !(gof->excludes & i); bad = bad->next)
- i<<=1;
+ for (bad=gof->opts, i=1; ;bad = bad->next, i<<=1) {
+ if (opt == bad || !(i & toys.optflags)) continue;
+ if (toys.optflags & bad->dex[2]) break;
+ }
error_exit("No '%c' with '%c'", opt->c, bad->c);
}