aboutsummaryrefslogtreecommitdiff
path: root/toys/posix/grep.c
AgeCommit message (Collapse)Author
2014-12-31Redo option parsing infrastructure so #define FORCE_FLAGS can unzero flag ↵Rob Landley
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.
2014-04-16Revert lots of half-finished local debris I didn't mean to check in with ↵Rob Landley
Isaac's roadmap update. Mercurial's "import" command is still broken, committing local tree changes to files that weren't even touched by the patch because the hg developers inisist, when I point out how stupid it is, that they meant to do that. (hg record can do hunks, but import can't even track _files_.)
2014-04-12roadmap: describe glibc commands.Isaac Dunham
Some glibc commands are irrelevant because they're for functionality that is excluded from musl (mtrace, rpc*, localedef, iconvconfig, nscd). getconf and catchsegv look like candidates for the development toolchain; locale and iconv were already triaged. getent is pretty lame, but it and the timezone stuff (tzselect zic zdump) are the only new possibly interesting commands.
2013-12-29Add -zZ support to grep (NUL delimited input/output).Rob Landley
2013-12-27Pass through all the readfile() arguments from xreadfile().Rob Landley
2013-11-09grep doesn't allocate enough spaceWilliam Haddon
Grep miscalculates the amount of memory it needs to allocate when "converting strings to one big regex" when the -e flag is not specified. Since in this case "\|" is inserted between strings rather than "|", two extra bytes rather than one need to be provided for each string. I noticed this because it caused grep to seg-fault on musl when a regex of exactly seven characters is provided.
2013-08-21Fix bug where exit code was only correct for -q.Rob Landley
2013-08-19Move grep from pending to posix, switch default to y.Rob Landley