Skip to content
This repository

Jun 09, 2010

  1. James Howard

    Version bump to 1.1

  2. James Howard

    Do not grep directories when recursing

    --- util.c.orig	Tue Feb  3 13:36:42 2004
    +++ util.c	Tue Feb  3 13:39:49 2004
    @@ -72,10 +72,11 @@
     	while ((p = fts_read(fts)) != NULL) {
     		switch (p->fts_info) {
     		case FTS_DNR:
    -			break;
    +			/* FALL THROUGH */
     		case FTS_ERR:
     			errx(1, "%s: %s", p->fts_path, strerror(p->fts_errno));
    +		case FTS_D:
     		case FTS_DP:

Jun 08, 2010

  1. James Howard

    Move -lz out of the Minix special case, where it doesn't belong

    and back into the general case.
  2. James Howard

    Restructure the Makefile so that multiple operating system

    checks are not necessary.  It may be prudent, at this time, to
    redevelop the build system based on autoconf.
  3. gautambt

    Removed the dependecy on libz from the Makefile

    gautambt authored

Jun 07, 2010

  1. gautambt


    gautambt authored
  2. gautambt

    Last commit was incomplete.

    gautambt authored
  3. gautambt

    Minix specific changes - Quick and dirty.

    gautambt authored

Dec 09, 2009

  1. James Howard

    Add a file for GitHub to display


Dec 08, 2009

  1. James Howard

    Include unistd.h to fix some compile-time errors on FreeBSD 8-STABLE.

    Signed-off-by: James P. Howard, II <>

Nov 28, 2009

  1. James Howard

    This removes the include to <sys/limits.h> in grep.c which is not

    necessary since grep.h includes it but also replaces that include
    with an include to <limits.h> for portability, or something
    approaching it.
  2. James Howard

    Merge branch 'openbsd'

  3. bump the posix reference in STANDARDS to IEEE Std 1003.1-2008, with a…

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

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

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

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

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

    - note which options are extensions to POSIX
    Jason McIntyre authored committed
  9. Matthias Kilian

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Ted Unangst authored committed
Something went wrong with that request. Please try again.