Replacing GNU grep revisited

Ted Unangst tedu at stanford.edu
Sun Jun 22 20:34:04 PDT 2003


your handling of -i at least is incorrect.  after patching, i get very
wrong results.  results vary depending on length of string.

reuelos:/tmp/grep-0.16> ./grep -i fastgrep *
grep.c:fastgrep_t       *fg_pattern;

reuelos:/tmp/grep-0.16> ./grep fastgrep *
grep.c:fastgrep_t       *fg_pattern;
grep.h:} fastgrep_t;
grep.h:extern fastgrep_t        *fg_pattern;
grep.h:int               fastcomp(fastgrep_t *fg, const char *pattern);
util.c:static int       grep_search(fastgrep_t *fg, unsigned char *data,
int dataLen);
util.c:int fastcomp(fastgrep_t *fg,
util.c:static int grep_search(fastgrep_t *fg,


-- 
"I am making this trip to Africa because Washington is an international
city, just like Tokyo, Nigeria or Israel.  As mayor, I am an
international symbol.  Can you deny that to Africa?"
      - M. Barry, Mayor of Washington, DC



More information about the freebsd-hackers mailing list