Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Nov 28, 2009
  1. bump the posix reference in STANDARDS to IEEE Std 1003.1-2008, with a…

    Jason McIntyre authored committed
    … few
    updates to follow;
  2. two globals not needed in NOZ mode

    Theo de Raadt authored committed
  3. Process patterns containing $ end ^ (but not as last or first char)

    Otto Moerbeek authored committed
    using regcomp() instead of fastcomp(). ok millert@
  4. use calloc() to avoid malloc(n * m) overflows; checked by djm canacar…

    Theo de Raadt authored committed
    … jsg
  5. convert to new .Dd format;

    Jason McIntyre authored committed
  6. - use a consistent text for STANDARDS

    Jason McIntyre authored committed
    - note which options are extensions to POSIX
  7. @mkilian

    - Be explicit on command line checking, instead of relying on patterns,

    mkilian authored committed
      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. fts_read returning NULL and errno set is an error. ok ray@

    Otto Moerbeek authored committed
  9. Reset the number of lines of tail context left to print

    Jared Yanovich authored committed
    before processing each file to avoid printing lines
    intended from the previous file.
    Reported and fix by Charles Longeau <>
    via tech@.
    ok otto millert
  10. Check length before checking index of len - 1.

    Ray Lai authored committed
    OK moritz@.
  11. Allow zero-length patterns with -x so

    Jared Yanovich authored committed
      $ grep -x ""
    matches empty lines as reported on misc@ by
    Martin Marusak <>.
    Initial diff by otto@ with tweaks by me.
    ok otto
  12. That should be S_ISREG, dunno why I committed this wrong version;

    Otto Moerbeek authored committed
    spotted by hshoexer@
  13. Use S_IS* macros insted of masking with S_IF* flags. The latter may

    Otto Moerbeek authored committed
    have multiple bits set, which lead to surprising results. Spotted by
    Paul Stoeber, more to come. ok millert@ pedro@ jaredy@ djm@
  14. Break patterns containing newlines into multiple patterns like POSIX …

    Otto Moerbeek authored committed
    Report by Ralf dot Wildenhues at gmx dot de;
    testing by jmc@ ok beck@ millert@
  15. -nv is a valid combination; confirmed by otto

    Jason McIntyre authored committed
  16. delint; remove redundant vars and functions; ok jaredy@

    Otto Moerbeek authored committed
  17. restore cosmic balance by plugging a mem leak; problem reported by

    Otto Moerbeek authored committed
    Benjamin Pineau in PR 5008; ok weingart@
  18. s/-p1003.1-2003/-p1003.1-2004/g

    Jason McIntyre authored committed
  19. - use size_t where appropriate.

    Otto Moerbeek authored committed
    - check for <= 0 in gzread; it returns -1 on error.
    From christos@netbsd; ok millert@
  20. Make the processing of patterns collected from files specified by -f

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

    Otto Moerbeek authored committed
    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@
  22. Due to a braindead zlib, the test for seekability of a gzstream using

    Otto Moerbeek authored committed
    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@
  23. replace 0 with STDIN_FILENO. from han boetes and jared yanovich

    Ted Unangst authored committed
  24. clarify what -a does;

    Jason McIntyre authored committed
    prod and ok deraadt@
  25. remove the section on extended regular expressions, and point

    Jason McIntyre authored committed
    people instead to re_format.7: there is now a list of EREs there;
  26. Remove block based mmap optimization. There are newline problems

    Otto Moerbeek authored committed
    (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@
  27. when stdin is searched, -L and -l print `(standard input)', not `-';

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

    Jason McIntyre authored committed
    more helpful;
    this includes some ideas/fixes from otto and jared;
  29. unused variables; otto ok

    Theo de Raadt authored committed
  30. cast offset value correctly for gzseek

    Theo de Raadt authored committed
  31. Stop search when -q option is given and a match is found. Found by jmc@

    Otto Moerbeek authored committed
    ok millert@
  32. spacing

    Theo de Raadt authored committed
  33. Make grep -w behave the same for the fastcomp and the regex case,

    Otto Moerbeek authored committed
    by teaching fastcomp what word boundaries are according to regex.
    ok millert@
  34. Add a new past path for fgrep that is just a simplified version of

    Todd Miller authored committed
    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@
  35. Don't fseek() on stdin if it is a terminal. It does not fail, but

    Otto Moerbeek authored committed
    what's more more important, it does not work either.
    ok millert@ tedu@
Something went wrong with that request. Please try again.