Permalink
Commits on Nov 28, 2009
  1. bump the posix reference in STANDARDS to IEEE Std 1003.1-2008, with a…

    Jason McIntyre authored and howardjp committed Feb 8, 2009
    … few
    
    updates to follow;
  2. two globals not needed in NOZ mode

    Theo de Raadt authored and howardjp committed Oct 16, 2008
  3. Process patterns containing $ end ^ (but not as last or first char)

    omoerbeek authored and howardjp committed Oct 2, 2007
    using regcomp() instead of fastcomp(). ok millert@
  4. use calloc() to avoid malloc(n * m) overflows; checked by djm canacar…

    Theo de Raadt authored and howardjp committed Sep 2, 2007
    … jsg
  5. convert to new .Dd format;

    Jason McIntyre authored and howardjp committed May 31, 2007
  6. - use a consistent text for STANDARDS

    Jason McIntyre authored and howardjp committed May 30, 2007
    - note which options are extensions to POSIX
  7. - Be explicit on command line checking, instead of relying on patterns,

    mkilian authored and howardjp committed Feb 13, 2007
      which may be NULL (e.g. -e '').
    - let add_pattern() decide how to deal with empty patterns, don't do
      magic in read_patterns().
    
    This unbreaks stuff like grep -e '', and makes grep -f <file> more
    POSIX compliant. Semantics for grep -f /dev/null (or any other empty
    file) may be questionable, but this case isn't specified by POSIX,
    and matching nothing at all seems to be sane.
    
    Thanks to otto@, who mentioned potential problems related to the
    -x option with the first patch i sent.
    
    ok jaredy@ (some time ago), otto@, millert@
  8. Reset the number of lines of tail context left to print

    Jared Yanovich authored and howardjp committed Nov 17, 2006
    before processing each file to avoid printing lines
    intended from the previous file.
    
    Reported and fix by Charles Longeau <chl@tuxfamily.org>
    via tech@.
    
    ok otto millert
  9. Check length before checking index of len - 1.

    raylai authored and howardjp committed Nov 2, 2006
    OK moritz@.
  10. Allow zero-length patterns with -x so

    Jared Yanovich authored and howardjp committed Sep 26, 2006
      $ grep -x ""
    
    matches empty lines as reported on misc@ by
    Martin Marusak <marusak@fhpv.unipo.sk>.
    Initial diff by otto@ with tweaks by me.
    
    ok otto
  11. That should be S_ISREG, dunno why I committed this wrong version;

    omoerbeek authored and howardjp committed Sep 20, 2006
    spotted by hshoexer@
  12. Use S_IS* macros insted of masking with S_IF* flags. The latter may

    omoerbeek authored and howardjp committed Sep 19, 2006
    have multiple bits set, which lead to surprising results. Spotted by
    Paul Stoeber, more to come. ok millert@ pedro@ jaredy@ djm@
  13. Break patterns containing newlines into multiple patterns like POSIX …

    omoerbeek authored and howardjp committed Mar 7, 2006
    …says.
    
    Report by Ralf dot Wildenhues at gmx dot de;
    testing by jmc@ ok beck@ millert@
  14. -nv is a valid combination; confirmed by otto

    Jason McIntyre authored and howardjp committed Mar 7, 2006
  15. restore cosmic balance by plugging a mem leak; problem reported by

    omoerbeek authored and howardjp committed Feb 7, 2006
    Benjamin Pineau in PR 5008; ok weingart@
  16. s/-p1003.1-2003/-p1003.1-2004/g

    Jason McIntyre authored and howardjp committed Jun 5, 2005
  17. - use size_t where appropriate.

    omoerbeek authored and howardjp committed Apr 25, 2005
    - check for <= 0 in gzread; it returns -1 on error.
    From christos@netbsd; ok millert@
  18. Make the processing of patterns collected from files specified by -f

    Jared Yanovich authored and howardjp committed Apr 3, 2005
    delayed so options that affect pattern-building (such as -w) can be
    applied evenly to all such patterns.
    
    ok and help otto, ok millert
  19. Protect begin and end of word markers added to the pattern when

    omoerbeek authored and howardjp committed Apr 3, 2005
    using the -w option with parentheses, to avoid operators in the
    expressions binding to the markers. Compare [[:<:]]foo|bar[[:>:]]
    and [[:<:]](foo|bar)[[:>:]]. Problem spotted by aaron@; ok millert@
    aaron@ jaredy@
  20. Due to a braindead zlib, the test for seekability of a gzstream using

    omoerbeek authored and howardjp committed Feb 7, 2005
    gzseek(f, 0L, SEEK_CUR) does not work as expected. Instead test the
    underlying stream and remember that. This repairs echo foo | gzip | zgrep foo.
    Problem spotted by Han Boetes in PR 4089; ok millert@
  21. replace 0 with STDIN_FILENO. from han boetes and jared yanovich

    Ted Unangst authored and howardjp committed Feb 2, 2005
  22. clarify what -a does;

    Jason McIntyre authored and howardjp committed Jan 6, 2005
    prod and ok deraadt@
  23. remove the section on extended regular expressions, and point

    Jason McIntyre authored and howardjp committed Oct 4, 2004
    people instead to re_format.7: there is now a list of EREs there;
  24. Remove block based mmap optimization. There are newline problems

    omoerbeek authored and howardjp committed Oct 3, 2004
    (PR 3940, 3941) which can be fixed, but if a match starts at the
    end of a block and continues into the next block, no match will be
    found.  Measurements by millert@ showed that the improvements of
    this optimization are non-measurable anyway. Diff from Alexander Taler.
    
    ok millert@
  25. when stdin is searched, -L and -l print `(standard input)', not `-';

    Jason McIntyre authored and howardjp committed Sep 28, 2004
    from alexander taler (pr #3937);
  26. various fixes to make this page a bit clearer and hopefully a bit

    Jason McIntyre authored and howardjp committed Sep 28, 2004
    more helpful;
    
    this includes some ideas/fixes from otto and jared;
  27. unused variables; otto ok

    Theo de Raadt authored and howardjp committed Sep 16, 2004
  28. cast offset value correctly for gzseek

    Theo de Raadt authored and howardjp committed Sep 15, 2004
  29. spacing

    Theo de Raadt authored and howardjp committed Aug 5, 2004
  30. Make grep -w behave the same for the fastcomp and the regex case,

    omoerbeek authored and howardjp committed May 7, 2004
    by teaching fastcomp what word boundaries are according to regex.
    
    ok millert@
  31. Add a new past path for fgrep that is just a simplified version of

    Todd Miller authored and howardjp committed May 7, 2004
    fastcomp.  This makes fgrep faster and fixes the -w flag w/ fgrep.
    Also remove free_patterns() since calling free right before exit
    is silly.  Problem noticed by espie@
  32. Don't fseek() on stdin if it is a terminal. It does not fail, but

    omoerbeek authored and howardjp committed May 6, 2004
    what's more more important, it does not work either.
    
    ok millert@ tedu@