aboutsummaryrefslogtreecommitdiff
path: root/findutils/grep.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Fixup CLEANUP behaviorEric Andersen2001-11-191-1/+1
|
* Convert strdup call to xstrdup, and calloc calls to xcalloc (patch fromMatt Kraai2001-11-121-3/+3
| | | | Steve Merrifield).
* Add in grep -E supportEric Andersen2001-11-101-0/+8
|
* Make egrep only set REG_EXTENDED flag.Matt Kraai2001-10-311-1/+0
|
* Patch from Charles Steinkuehler <charles@steinkuehler.net>Eric Andersen2001-10-311-0/+1
| | | | to properly handle extended regexps for egrep
* Use extended regular expressions when invoked as egrep (noted and initialMatt Kraai2001-10-291-0/+5
| | | | patch by Charles Steinkuehler).
* Major rework of the directory structure and the entire build system.Eric Andersen2001-10-241-18/+18
| | | | -Erik
* Scrub up some function prototypes.Eric Andersen2001-10-181-1/+0
| | | | -Erik
* Fix behavior of grep -lc to match GNU grep. SuS2 is ambiguousEric Andersen2001-07-311-1/+4
| | | | | on the correct behavior, so acting like GNU grep seems best -Erik
* grep failed to compile when BB_FEATURE_CLEAN_UP was defined -- types were wrong.Eric Andersen2001-05-291-2/+2
|
* Added support for grep -e and grep -f, closes bug #1164. Also added someMark Whitley2001-05-241-95/+142
| | | | testcases for these new features.
* Fixed extra -- lines (noted by Christophe Boyanique).Matt Kraai2001-05-221-1/+2
|
* Fixed mishandling of -c & -l options and accounted for case when we'reMark Whitley2001-05-211-7/+16
| | | | grepping only one file.
* Change 'printf("%s\n", ...)' into 'puts(...)'. Noted and patched in hostname.cMatt Kraai2001-05-161-1/+1
| | | | by Larry Doolittle.
* Fixed a subtle bug in the handling of -l and -c flags.Mark Whitley2001-05-141-19/+19
|
* The tiniest of bracket-placement fixes.Mark Whitley2001-04-171-5/+2
|
* Make 'grep -l' workEric Andersen2001-04-091-5/+16
|
* Fixed option parsing. Grep would continue grepping, even when given a bad /Mark Whitley2001-04-091-0/+2
| | | | invalid option. Closes bug #1146.
* This patch, put together by Manuel Novoa III, is a merge of workEric Andersen2001-02-141-1/+1
| | | | | | done by Evin Robertson (bug#1105) and work from Manuel to make usage messages occupy less space and simplify how usage messages are displayed.
* Implemented -A, -B, and -C flags with BB_FEATURE_GREP_CONTEXT option set.Mark Whitley2001-02-091-14/+125
|
* Tightened things up a bit, saved 20 bytes, and made the code a bit clearer inMark Whitley2001-02-011-29/+14
| | | | the process.
* Fix wget error message and add (and use) chomp library function.Matt Kraai2001-02-011-2/+1
|
* Fix up copyright msgs. Bump version to 0.49 in preparation for0_49Eric Andersen2001-01-271-1/+1
| | | | | a release. Update the website with release details. -Erik
* Fix header file usage -- there were many unnecessary header files included inEric Andersen2001-01-271-0/+2
| | | | | | | busybox.h which slowed compiles. I left only what was needed and then fixed up all the apps to include their own header files. I also fixed naming for pwd.h and grp.h functions. Tested to compile and run with libc5, glibc, and uClibc. -Erik
* Changed email address to codepoet.org, updated list of applets / docs IMark Whitley2001-01-041-1/+1
| | | | maintain in AUTHORS.
* Fixed -qv interaction (thanks to a report and patch from David Douthitt).Matt Kraai2001-01-041-0/+5
|
* Change calls to error_msg.* and strerror to use perror_msg.*.Matt Kraai2000-12-181-1/+1
|
* Changed names of functions in utility.c and all affected files, to makeMark Whitley2000-12-071-1/+1
| | | | compliant with the style guide. Everybody rebuild your tags file!
* Fix handling of ^$ by removing the newline from input lines and by notMatt Kraai2000-10-131-2/+4
| | | | compiling with REG_NEWLINE.
* Renamed "internal.h" to the more sensible "busybox.h".Eric Andersen2000-09-251-1/+1
| | | | -Erik
* Exit with the appropriate value when grepping multiple files.Matt Kraai2000-08-061-4/+6
|
* Centralize handling of --help.Matt Kraai2000-07-191-4/+0
|
* Consolodated some common code into print_matched_line to make 'grep_file' aMark Whitley2000-07-181-10/+11
| | | | little more terse & clean. Also made a few minor formatting changes.
* Added support for the -c (count matches) option. Made it so it works just likeMark Whitley2000-07-181-3/+22
| | | | GNU grep.
* Extract usage information into a separate file.Matt Kraai2000-07-161-15/+0
|
* Use errorMsg rather than fprintf.Matt Kraai2000-07-141-1/+1
|
* Changed bb_regcomp to xregcomp and #if 0'ed out destroy_cmd_strs in sed.cMark Whitley2000-07-121-2/+1
| | | | (maybe I'll remove it later).
* Applied patch from Matt Kraai which does the following:Mark Whitley2000-07-111-14/+1
| | | | | | | - adds case-insensitive matching in sed s/// epxressions - consolodates common regcomp code in grep & sed into bb_regcomp and put in utility.c - cleans up a bunch of cruft
* Applied patch from Matt Kraai as per his email:Mark Whitley2000-07-101-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | However, the case of grep foo$ file didn't work, due to a problem with the flags used in regular expression compilation. The attached patch fixes this problem. ---patch------- Index: grep.c =================================================================== RCS file: /var/cvs/busybox/grep.c,v retrieving revision 1.30 diff -u -r1.30 grep.c --- grep.c 2000/07/04 22:17:01 1.30 +++ grep.c 2000/07/10 08:57:04 @@ -141,8 +141,10 @@ if (argv[optind] == NULL) usage(grep_usage); - /* compile the regular expression */ - reflags = REG_NOSUB; /* we're not going to mess with sub-expressions */ + /* compile the regular expression + * we're not going to mess with sub-expressions, and we need to + * treat newlines right. */ + reflags = REG_NOSUB | REG_NEWLINE; if (ignore_case) reflags |= REG_ICASE; if ((ret = regcomp(&regex, argv[optind], reflags)) != 0) { ---patch------- Thanks, Matt, it works great.
* include getopt.hEric Andersen2000-07-091-1/+1
| | | | -Erik
* Some cosmetic updates. Changed "OPTIONS" to "Options".Eric Andersen2000-07-041-1/+1
| | | | -Erik
* Fixed comment.Mark Whitley2000-06-281-2/+2
|
* Added support for reading from stdin with '-' as file name arg.Mark Whitley2000-06-281-1/+1
|
* Yanked out the cstring_alloc() and cstring_lineFromFile() functions fromMark Whitley2000-06-281-31/+0
| | | | | | | utility.c and replaced them with get_line_from_file() from the new grep.c. Also changed declaration in internal.h and replaced instances of cstring_lineFromFile() in dc.c and sort.c with get_line_from_file(). Tested them and they worked fine.
* Brand, spankin', new grep that uses libc regex routines instead of theMark Whitley2000-06-281-100/+155
| | | | | hand-rolled ones. Sed still needs to be replaced and then the regexp stuff can be axed.
* Updates to a number of apps to remove warnings/compile errors under libc5.Eric Andersen2000-06-191-1/+1
| | | | | Tested under both libc5 and libc6 and all seems well with these fixes. -Erik
* Fix some spelling errors in the source as well.Eric Andersen2000-06-161-2/+2
| | | | -Erik
* + removed some cruft left over from when lines could be too long.John Beppu2000-06-141-3/+0
|
* Fix a bug pointed out by Michal Jaegermann <michal@ellpspace.math.ualberta.ca>Eric Andersen2000-06-131-9/+13
| | | | | | | | where you used to see: ./grep -q -i B some_file B: No such file or directory This is now fixed. -Erik
* + utility.cJohn Beppu2000-06-121-5/+3
| | | | | | | CSTRING_BUFFER_LENGTH = 1024 /* so it recurses less often */ + grep.c uses cstring_lineFromFile(), and doesn't ever say Line is too long, anymore