diff options
author | Rob Landley <rob@landley.net> | 2014-12-31 21:30:59 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2014-12-31 21:30:59 -0600 |
commit | f3e56f4e4ff773de95fa2c9daf979734d826fc33 (patch) | |
tree | 8a8e75b3530b504569ebe4fae09020073534c6db /toys/posix/grep.c | |
parent | 5834ddd6df659d9c9dc7333284fc86762dea061a (diff) | |
download | toybox-f3e56f4e4ff773de95fa2c9daf979734d826fc33.tar.gz |
Redo option parsing infrastructure so #define FORCE_FLAGS can unzero flag macros for a disabled command (needed when multiple commands share infrastructure with a common set of flags).
This means the flag space is no longer packed, but leaves gaps where the zeroes
go. (Actual flag bit positions are the same for all configs.) Since the
option parsing needs to know where the holes are, the OPTSTR values are
now generated as part of flags.h with ascii 1 values for the disabled values.
(So generated/oldflags.h went away.)
This also means that the option string argument for OLDTOY() went away, it now
uses the same arguments as the NEWTOY() it references.
Diffstat (limited to 'toys/posix/grep.c')
-rw-r--r-- | toys/posix/grep.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/toys/posix/grep.c b/toys/posix/grep.c index aba70878..18a27e3e 100644 --- a/toys/posix/grep.c +++ b/toys/posix/grep.c @@ -5,8 +5,8 @@ * See http://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html USE_GREP(NEWTOY(grep, "ZzEFHabhinorsvwclqe*f*m#x[!wx][!EFw]", TOYFLAG_BIN)) -USE_GREP(OLDTOY(egrep, grep, OPTSTR_grep, TOYFLAG_BIN)) -USE_GREP(OLDTOY(fgrep, grep, OPTSTR_grep, TOYFLAG_BIN)) +USE_GREP(OLDTOY(egrep, grep, TOYFLAG_BIN)) +USE_GREP(OLDTOY(fgrep, grep, TOYFLAG_BIN)) config GREP bool "grep" |