aboutsummaryrefslogtreecommitdiff
path: root/findutils/grep.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* fixes up to 1.6.1Nguyễn Thái Ngọc Duy2009-04-231-16/+16
|
* usage.c: remove reference to busybox.hvda2007-05-261-1/+1
| | | | | | | | *: s/include "busybox.h"/include "libbb.h" git-svn-id: svn://busybox.net/trunk/busybox@18696 69ca8d6d-28ef-0310-b511-8ec308f3f277
* make sure we free the grep data as wellvapier2007-04-121-0/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@18419 69ca8d6d-28ef-0310-b511-8ec308f3f277
* find: fix handling of -prunevda2007-04-081-3/+3
| | | | | | | recursive_actions: uppercase flag constants git-svn-id: svn://busybox.net/trunk/busybox@18362 69ca8d6d-28ef-0310-b511-8ec308f3f277
* - sed -e "s/char[[:space:]]*\*[[:space:]]*argv\[\]/char **argv/g"aldot2007-04-041-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@18327 69ca8d6d-28ef-0310-b511-8ec308f3f277
* - fold recurse, depthFirst and dereference params into one param flags.aldot2007-03-291-3/+3
| | | | | | | Minor size improvement (-16b for size, -24b according to bloat-o-meter). git-svn-id: svn://busybox.net/trunk/busybox@18271 69ca8d6d-28ef-0310-b511-8ec308f3f277
* grep: "implement" -a and -I by ignoring themvda2007-02-251-0/+3
| | | | git-svn-id: svn://busybox.net/trunk/busybox@17976 69ca8d6d-28ef-0310-b511-8ec308f3f277
* grep: implement -wvda2007-02-251-76/+96
| | | | git-svn-id: svn://busybox.net/trunk/busybox@17975 69ca8d6d-28ef-0310-b511-8ec308f3f277
* ash: replace xstrdup (shell shall not die)vda2007-02-251-52/+52
| | | | | | | grep: fix mis-indented block git-svn-id: svn://busybox.net/trunk/busybox@17974 69ca8d6d-28ef-0310-b511-8ec308f3f277
* suppress warnings about easch <applet>_main() havingvda2007-02-031-0/+1
| | | | | | | no preceding prototype git-svn-id: svn://busybox.net/trunk/busybox@17740 69ca8d6d-28ef-0310-b511-8ec308f3f277
* remove useless casts (type*) xzalloc(...)vda2006-12-221-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@17059 69ca8d6d-28ef-0310-b511-8ec308f3f277
* recursive_action: add depth paramvda2006-10-271-2/+3
| | | | | | | chmod: match coreutils versus following links git-svn-id: svn://busybox.net/trunk/busybox@16462 69ca8d6d-28ef-0310-b511-8ec308f3f277
* rename functions to more understandable namesvda2006-10-261-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@16447 69ca8d6d-28ef-0310-b511-8ec308f3f277
* grep: "grep -h pattern file1 file2" ignored -hvda2006-10-221-14/+14
| | | | | | | (precluded kernel's "make modules") git-svn-id: svn://busybox.net/trunk/busybox@16422 69ca8d6d-28ef-0310-b511-8ec308f3f277
* grep: -r didn't close files, producing "Too many open files"vda2006-10-151-1/+2
| | | | git-svn-id: svn://busybox.net/trunk/busybox@16392 69ca8d6d-28ef-0310-b511-8ec308f3f277
* grep: fix combination of -r and -hvda2006-10-141-1/+2
| | | | git-svn-id: svn://busybox.net/trunk/busybox@16382 69ca8d6d-28ef-0310-b511-8ec308f3f277
* grep: add support for -rvda2006-10-141-72/+107
| | | | git-svn-id: svn://busybox.net/trunk/busybox@16381 69ca8d6d-28ef-0310-b511-8ec308f3f277
* bb_get_[chomped]line_from_file wasn't descriptive enough.vda2006-10-121-2/+2
| | | | | | | Renaming... git-svn-id: svn://busybox.net/trunk/busybox@16375 69ca8d6d-28ef-0310-b511-8ec308f3f277
* bb_applet_name -> applet_namevda2006-10-031-2/+2
| | | | git-svn-id: svn://busybox.net/trunk/busybox@16306 69ca8d6d-28ef-0310-b511-8ec308f3f277
* getopt_ulflags -> getopt32.vda2006-10-031-5/+5
| | | | | | | | | | | It is impossible to formulate sane ABI based on size of ulong because it can be 32-bit or 64-bit. Basically it means that you cannot portably use more that 32 option chars in one call anyway... Make it explicit. git-svn-id: svn://busybox.net/trunk/busybox@16305 69ca8d6d-28ef-0310-b511-8ec308f3f277
* lots of silly indent fixesvda2006-10-031-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@16302 69ca8d6d-28ef-0310-b511-8ec308f3f277
* grep: add help text; fix stylevda2006-09-291-25/+25
| | | | git-svn-id: svn://busybox.net/trunk/busybox@16262 69ca8d6d-28ef-0310-b511-8ec308f3f277
* grep: implement -o option. Patch by Jac Goudsmit.vda2006-09-291-22/+34
| | | | git-svn-id: svn://busybox.net/trunk/busybox@16261 69ca8d6d-28ef-0310-b511-8ec308f3f277
* fix 'grep -C' which requires an argumentandersen2006-09-251-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@16220 69ca8d6d-28ef-0310-b511-8ec308f3f277
* - fix copy'n paste errors that got introduced when switching to the shorter ↵aldot2006-09-131-1/+1
| | | | | | | | | boilerplate. No object code changes. git-svn-id: svn://busybox.net/trunk/busybox@16113 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Remove xcalloc() and convert its callers to xzalloc(). About half of themlandley2006-08-031-1/+1
| | | | | | | | were using "1" as one of the arguments anyway, and as for the rest a multiply and a push isn't noticeably bigger than pushing two arguments on the stack. git-svn-id: svn://busybox.net/trunk/busybox@15771 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Remove bb_ prefixes from xfuncs.c (and a few other places), consolidatelandley2006-08-031-7/+2
| | | | | | | | | | | | | things like xasprintf() into xfuncs.c, remove xprint_file_by_name() (it only had one user), clean up lots of #includes... General cleanup pass. What I've been doing for the last couple days. And it conflicts! I've removed httpd.c from this checkin due to somebody else touching that file. It builds for me. I have to catch a bus. (Now you know why I'm looking forward to Mercurial.) git-svn-id: svn://busybox.net/trunk/busybox@15767 69ca8d6d-28ef-0310-b511-8ec308f3f277
* - reuse strings and messages. Saves about 600Baldot2006-06-071-2/+2
| | | | git-svn-id: svn://busybox.net/trunk/busybox@15325 69ca8d6d-28ef-0310-b511-8ec308f3f277
* - move #include busybox.h to the very top so we pull in the configaldot2006-06-021-1/+1
| | | | | | | and eventual platform specific includes in early. git-svn-id: svn://busybox.net/trunk/busybox@15267 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Change llist_add_* to take the address of the list rather than returning the newlandley2006-05-261-2/+2
| | | | | | | head, and change all the callers. git-svn-id: svn://busybox.net/trunk/busybox@15199 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Robert P. Day removed 8 gazillion occurrences of "extern" on functionlandley2006-03-061-1/+1
| | | | | | | definitions. (That should only be on prototypes.) git-svn-id: svn://busybox.net/trunk/busybox@14457 69ca8d6d-28ef-0310-b511-8ec308f3f277
* make grep faster (close bug 758), reduce small memory leak in ↵vodz2006-02-281-16/+62
| | | | | | CONFIG_FEATURE_CLEANUP mode git-svn-id: svn://busybox.net/trunk/busybox@14361 69ca8d6d-28ef-0310-b511-8ec308f3f277
* - new bb_opt_complementally syntax, use [-:?] only - 'free' charsvodz2005-10-141-2/+2
| | | | | | | - new bb_getopt_ulflags features: check max and min args, convert first argv to options special for ar and tar applets - use bb_default_error_retval for env applet git-svn-id: svn://busybox.net/trunk/busybox@11859 69ca8d6d-28ef-0310-b511-8ec308f3f277
* - replace variables by defines to save spacealdot2005-09-231-71/+57
| | | | | | | | - rename string denoting stdin from "-" to "(standard input)" to match GNU grep. git-svn-id: svn://busybox.net/trunk/busybox@11594 69ca8d6d-28ef-0310-b511-8ec308f3f277
* SUSv3 -q compatibily exit status correction for grep againvodz2005-09-231-2/+4
| | | | git-svn-id: svn://busybox.net/trunk/busybox@11593 69ca8d6d-28ef-0310-b511-8ec308f3f277
* SUSv3 -q compatibily exit status correction for grepvodz2005-09-231-3/+3
| | | | git-svn-id: svn://busybox.net/trunk/busybox@11592 69ca8d6d-28ef-0310-b511-8ec308f3f277
* grep must have exit code >1 if input file not found. Small indent correcion ↵vodz2005-09-231-2/+6
| | | | | | also. git-svn-id: svn://busybox.net/trunk/busybox@11591 69ca8d6d-28ef-0310-b511-8ec308f3f277
* split libbb: moved xregcomp separatelly for speed up recompilevodz2005-09-141-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@11464 69ca8d6d-28ef-0310-b511-8ec308f3f277
* removed strange extern void xregcomp(... from some applets, but declared ↵vodz2005-09-141-2/+0
| | | | | | from libbb.h git-svn-id: svn://busybox.net/trunk/busybox@11463 69ca8d6d-28ef-0310-b511-8ec308f3f277
* 1) bb_opt_complementaly -> bb_opt_complementallyvodz2005-09-051-2/+2
| | | | | | | 2) better support long options 3) new flag '!' for bb_opt_complementally: produce bb_show_usage() if BB_GETOPT_ERROR internally git-svn-id: svn://busybox.net/trunk/busybox@11332 69ca8d6d-28ef-0310-b511-8ec308f3f277
* patch by srowe in Bug 359 to fix fgrep aliasingvapier2005-07-311-0/+5
| | | | git-svn-id: svn://busybox.net/trunk/busybox@11001 69ca8d6d-28ef-0310-b511-8ec308f3f277
* In Bug 78, shortkey points out:vapier2005-04-161-2/+2
| | | | | | | | | If you run `grep -h . file1 file2 file3 ...`, the output is not prefixed with the filename. If you run `grep -h . file1` however, the filename will incorrectly prefix the output. git-svn-id: svn://busybox.net/trunk/busybox@10115 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Hiroshi Ito writes:andersen2004-10-081-4/+4
| | | | | | | | | | | | | | | | | | | | | | | Hello I'm using busy box on mipsel machine. "grep -f file" will cause segmentation fault. Vladimir N. Oleynik writes: Hiroshi, Thank for bug report, but your patch is full broken. Worked patch attached. (really changes is zero initialize, and indent correcting). --w vodz git-svn-id: svn://busybox.net/trunk/busybox@9324 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Make the grep option values a bit less horribleandersen2004-05-261-18/+18
| | | | git-svn-id: svn://busybox.net/trunk/busybox@8875 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Rick Richardson writes:andersen2004-05-261-8/+16
| | | | | | | | | | | | | | Here is a patch that adds egrep -L support (the opposite of egrep -l). I realize this is probably too late for 1.0. But I offer it for your future consideration. egrep -L is used in some networking startup scripts I inherited. -Rick git-svn-id: svn://busybox.net/trunk/busybox@8874 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch from vodz to correct 'grep -e pattern1 -e pattern2' logicandersen2004-05-261-5/+3
| | | | git-svn-id: svn://busybox.net/trunk/busybox@8868 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Larry Doolittle writes:andersen2004-04-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | This is a bulk spelling fix patch against busybox-1.00-pre10. If anyone gets a corrupted copy (and cares), let me know and I will make alternate arrangements. Erik - please apply. Authors - please check that I didn't corrupt any meaning. Package importers - see if any of these changes should be passed to the upstream authors. I glossed over lots of sloppy capitalizations, missing apostrophes, mixed American/British spellings, and German-style compound words. What is "pretect redefined for test" in cmdedit.c? Good luck on the 1.00 release! - Larry git-svn-id: svn://busybox.net/trunk/busybox@8759 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Remove trailing whitespace. Update copyright to include 2004.andersen2004-03-151-4/+4
| | | | git-svn-id: svn://busybox.net/trunk/busybox@8630 69ca8d6d-28ef-0310-b511-8ec308f3f277
* last_patch89 from vodz:andersen2003-06-201-176/+179
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Manuel, I rewrite bb_getopt_ulflags() function for more universal usage. My version support now: - options with arguments (optional arg as GNU extension also) - complementaly and/or incomplementaly and/or incongruously and/or list options - long_opt (all applets may have long option, add supporting is trivial) This realisation full compatibile from your version. Code size grow 480 bytes, but only coreutils/* over compensate this size after using new function. Last patch reduced over 800 bytes and not full applied to all. "mkdir" and "mv" applets have long_opt now for demonstrate trivial addition support long_opt with usage new bb_getopt_ulflags(). Complementaly and/or incomplementaly and/or incongruously and/or list options logic is not trivial, but new "cut" and "grep" applets using this logic for examples with full demostrating. New "grep" applet reduced over 300 bytes. Mark, Also. I removed bug from "grep" applet. $ echo a b | busybox grep -e a b a b a b But right is printing one only. --w vodz git-svn-id: svn://busybox.net/trunk/busybox@6939 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix segfault when cleaning upbug12003-04-271-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@6819 69ca8d6d-28ef-0310-b511-8ec308f3f277