OpenBSD CVS

CVS log for src/usr.bin/grep/grep.c


[BACK] Up to [local] / src / usr.bin / grep

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.67 / (download) - annotate - [select for diffs], Sun Jun 26 18:48:10 2022 UTC (22 months, 3 weeks ago) by op
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, HEAD
Changes since 1.66: +3 -2 lines
Diff to previous 1.66 (colored)

add --null to usage() forgot in previous commit.  reminded by jmc@, thanks!

Revision 1.66 / (download) - annotate - [select for diffs], Sun Jun 26 10:57:36 2022 UTC (22 months, 3 weeks ago) by op
Branch: MAIN
Changes since 1.65: +7 -1 lines
Diff to previous 1.65 (colored)

grep: add --null flag

makes grep print an ASCII NUL byte after the file name to make the
output unambiguous even in the presence of file names with funny
characters.

A previous iteration of this diff was improved by benno@ and tedu@ and
discussed also with sthen@ and deraadt@.  deraadt@ also improved the
manpage changes in this version of the diff.

OK deraadt@

Revision 1.65 / (download) - annotate - [select for diffs], Thu Jul 23 20:19:27 2020 UTC (3 years, 9 months ago) by martijn
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.64: +2 -2 lines
Diff to previous 1.64 (colored)

Change line counter from int to unsigned long long to reduce overflow.
In case unsigned long long is miraculously still too small add an
additional overflow detection so we stop counting and add a marker to
couter output.

Input on earlier diff guenther@
OK millert

Revision 1.64 / (download) - annotate - [select for diffs], Tue Dec 3 09:14:37 2019 UTC (4 years, 5 months ago) by jca
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.63: +2 -8 lines
Diff to previous 1.63 (colored)

With -R and an implicit ".", don't prepend file paths with "./"

Looks nicer and matches the output of GNU grep.
ok millert@ deraadt@ visa@ miod@

Revision 1.63 / (download) - annotate - [select for diffs], Mon Dec 2 21:50:11 2019 UTC (4 years, 5 months ago) by jca
Branch: MAIN
Changes since 1.62: +7 -3 lines
Diff to previous 1.62 (colored)

With -R assume that "." was passed instead of printing a warning

Saner default behavior that matches GNU grep.  Diff from miod@, support
from espie@, ok visa@ millert@

Revision 1.62 / (download) - annotate - [select for diffs], Mon Oct 7 20:04:00 2019 UTC (4 years, 7 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.61: +2 -2 lines
Diff to previous 1.61 (colored)

add --label to usage. thx jmc

Revision 1.61 / (download) - annotate - [select for diffs], Mon Oct 7 17:47:32 2019 UTC (4 years, 7 months ago) by tedu
Branch: MAIN
Changes since 1.60: +13 -2 lines
Diff to previous 1.60 (colored)

two compat features to allow the zstdgrep script to work.
add --label option to prefix the output instead of filename.
allow using - to mean stdin.
ok deraadt

Revision 1.60 / (download) - annotate - [select for diffs], Thu Jul 18 15:32:50 2019 UTC (4 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.59: +2 -2 lines
Diff to previous 1.59 (colored)

Delete documentation of --max-count, which is merely an alias of
the documented -m.  As a rule, we only document long options when
users can't avoid them because they lack a short version.

As suggested by tedu@, as an exception, leave --context documented
because -C is awkward in so far as it takes an optional option
argument, which is fragile and error-prone and hence generally
discouraged, including by POSIX.

Two years ago, kettenis@, deraadt@, and tedu@ all agreed that this
is what should be done, and jmc@ was happy to accept the direction,
but somehow everybody forgot to commit.

Revision 1.59 / (download) - annotate - [select for diffs], Thu Jan 31 01:30:46 2019 UTC (5 years, 3 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.58: +7 -3 lines
Diff to previous 1.58 (colored)

convert fgetln to getline. this improves portability and sets a good
better example for other code to follow. in the common case, grep uses
mmap anyway (so no functional change). despite fgetln doing sneaky things
with stdio internals, preliminary analysis by lauri suggests this may
actually reduce the number of allocations.
from Lauri Tirkkonen.

Revision 1.58 / (download) - annotate - [select for diffs], Wed Jan 23 23:00:54 2019 UTC (5 years, 3 months ago) by tedu
Branch: MAIN
Changes since 1.57: +1 -3 lines
Diff to previous 1.57 (colored)

rework grep_open to be more careful about directories.
cleaner, but should be no functional change.
from Lauri Tirkkonen

Revision 1.57 / (download) - annotate - [select for diffs], Sun Dec 10 09:17:24 2017 UTC (6 years, 5 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.56: +6 -5 lines
Diff to previous 1.56 (colored)

- add max-count to SYNOPSIS
- list long options with short, where they have an equivalent
- sync usage()
- minor tweaks

Revision 1.56 / (download) - annotate - [select for diffs], Sat Dec 9 18:38:37 2017 UTC (6 years, 5 months ago) by pirofti
Branch: MAIN
Changes since 1.55: +18 -5 lines
Diff to previous 1.55 (colored)

Add support for the non-standard grep -m extension.

grep -m num stops after a maximum of num matches are found.
We support -m0 to match GNU behaviour, but we do not allow negative
numbers.

Manpage help from jmc@, OK deraadt@.

Revision 1.55 / (download) - annotate - [select for diffs], Sat Nov 28 01:17:12 2015 UTC (8 years, 5 months ago) by gsoares
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.54: +2 -2 lines
Diff to previous 1.54 (colored)

fix exit status on pledge(2) error, where it should be >1

OK millert@ deraadt@

Revision 1.54 / (download) - annotate - [select for diffs], Fri Oct 9 01:37:07 2015 UTC (8 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.53: +3 -3 lines
Diff to previous 1.53 (colored)

Change all tame callers to namechange to pledge(2).

Revision 1.53 / (download) - annotate - [select for diffs], Sat Oct 3 05:36:34 2015 UTC (8 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.52: +4 -1 lines
Diff to previous 1.52 (colored)

grep only opens files read-only, reads via stdio or other methods, performs
computation, and outputs result to stdout.  (note: in the tame model,
malloc is implicit because stdio needs it, and mmap is implicit since
malloc needs it; libz is satisfied by this environment also).

this tame change consists of 1 line, setting "stdio rpath" before
getopt.  this protection is fairly strict.  grep could be improved
further by computing a wpathlist based on argv, keeping -R in mind.
feel free to take a shot at it.

grep was an early target of capsicum also.  know anyone running capsicum grep?

ok doug

Revision 1.52 / (download) - annotate - [select for diffs], Thu Aug 27 05:11:39 2015 UTC (8 years, 8 months ago) by dlg
Branch: MAIN
Changes since 1.51: +9 -10 lines
Diff to previous 1.51 (colored)

use strtonum to parse the number of lines of context.

this provides better error messages.

ok deraadt@ guenther@

Revision 1.51 / (download) - annotate - [select for diffs], Thu Apr 30 13:49:04 2015 UTC (9 years ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.50: +3 -1 lines
Diff to previous 1.50 (colored)

Add warning when user specifies -R but no files, like GNU grep.
OK schwarze@ ian@

Revision 1.50 / (download) - annotate - [select for diffs], Mon Mar 16 13:27:59 2015 UTC (9 years, 2 months ago) by millert
Branch: MAIN
Changes since 1.49: +1 -2 lines
Diff to previous 1.49 (colored)

Don't include limits.h or sys/limits.h since grep.h already does it
for us.

Revision 1.49 / (download) - annotate - [select for diffs], Sat Jan 10 13:48:02 2015 UTC (9 years, 4 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.48: +13 -21 lines
Diff to previous 1.48 (colored)

1. They're flags, not counters. Set to one instead of incrementing.
2. The G flag is useless and never checked. Remove it.
ok millert

Revision 1.48 / (download) - annotate - [select for diffs], Mon Dec 1 06:36:04 2014 UTC (9 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.47: +4 -3 lines
Diff to previous 1.47 (colored)

use reallocarray()

Revision 1.47 / (download) - annotate - [select for diffs], Wed Nov 26 18:34:51 2014 UTC (9 years, 5 months ago) by millert
Branch: MAIN
Changes since 1.46: +2 -2 lines
Diff to previous 1.46 (colored)

Prefer setvbuf() to setlinebuf() for portability; ok deraadt@

Revision 1.46 / (download) - annotate - [select for diffs], Wed Nov 26 17:26:40 2014 UTC (9 years, 5 months ago) by millert
Branch: MAIN
Changes since 1.45: +4 -4 lines
Diff to previous 1.45 (colored)

Make option string/struct const (since it is...).  I've had this
in my tree for ages.

Revision 1.45 / (download) - annotate - [select for diffs], Sat Dec 29 01:32:44 2012 UTC (11 years, 4 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.44: +3 -2 lines
Diff to previous 1.44 (colored)

Fix exit status when there is an error reading a file.
Reported by Jeramey Crawford, fix adapted from FreeBSD.
OK guenther@

Revision 1.44 / (download) - annotate - [select for diffs], Fri Jul 8 01:20:24 2011 UTC (12 years, 10 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.43: +9 -5 lines
Diff to previous 1.43 (colored)

add support for -o to only print the match.
reminded this was useful by ajcoutot

Revision 1.43 / (download) - annotate - [select for diffs], Fri Mar 4 03:11:23 2011 UTC (13 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.42: +11 -6 lines
Diff to previous 1.42 (colored)

add -H (opposite of -h) to always print name. ok deraadt millert

Revision 1.42 / (download) - annotate - [select for diffs], Fri Jul 2 22:18:03 2010 UTC (13 years, 10 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.41: +12 -2 lines
Diff to previous 1.41 (colored)

Remove the "fast" grep code if SMALL.  This has the side effect of breaking
fgrep -w, but oh well.  ok deraadt millert

Revision 1.41 / (download) - annotate - [select for diffs], Tue Apr 20 15:58:08 2010 UTC (14 years, 1 month ago) by jacekm
Branch: MAIN
Changes since 1.40: +17 -4 lines
Diff to previous 1.40 (colored)

Fix "grep -e foo -w" crash.  The problem lies in 'e' getopt clause
calling add_pattern, which in turn assumes that the getopt phase
has already finished.

OK otto@

Revision 1.40 / (download) - annotate - [select for diffs], Mon Apr 5 03:03:55 2010 UTC (14 years, 1 month ago) by tedu
Branch: MAIN
Changes since 1.39: +6 -25 lines
Diff to previous 1.39 (colored)

remove some non-POSIX standard non-GNU defacto standard options, mostly
relating to symlinks that you can get with find.  And a bonus fts flag fix.
With a small tweak by guenther.  ok deraadt guenther jmc millert nicm

Revision 1.39 / (download) - annotate - [select for diffs], Sun Sep 2 15:19:32 2007 UTC (16 years, 8 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.38: +3 -3 lines
Diff to previous 1.38 (colored)

use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsg

Revision 1.38 / (download) - annotate - [select for diffs], Tue Feb 13 21:48:20 2007 UTC (17 years, 3 months ago) by kili
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.37: +9 -18 lines
Diff to previous 1.37 (colored)


- 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@

Revision 1.37 / (download) - annotate - [select for diffs], Thu Nov 2 18:00:03 2006 UTC (17 years, 6 months ago) by ray
Branch: MAIN
Changes since 1.36: +2 -2 lines
Diff to previous 1.36 (colored)

Check length before checking index of len - 1.

OK moritz@.

Revision 1.36 / (download) - annotate - [select for diffs], Tue Sep 26 15:55:17 2006 UTC (17 years, 7 months ago) by jaredy
Branch: MAIN
Changes since 1.35: +3 -3 lines
Diff to previous 1.35 (colored)

Allow zero-length patterns with -x so

  $ 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

Revision 1.35 / (download) - annotate - [select for diffs], Tue Mar 7 20:59:56 2006 UTC (18 years, 2 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.34: +15 -3 lines
Diff to previous 1.34 (colored)

Break patterns containing newlines into multiple patterns like POSIX says.
Report by Ralf dot Wildenhues at gmx dot de;
testing by jmc@ ok beck@ millert@

Revision 1.34 / (download) - annotate - [select for diffs], Thu Feb 9 09:54:46 2006 UTC (18 years, 3 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.33: +1 -3 lines
Diff to previous 1.33 (colored)

delint; remove redundant vars and functions; ok jaredy@

Revision 1.33 / (download) - annotate - [select for diffs], Sun Apr 3 19:18:33 2005 UTC (19 years, 1 month ago) by jaredy
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.32: +21 -3 lines
Diff to previous 1.32 (colored)

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

Revision 1.32 / (download) - annotate - [select for diffs], Sun Apr 3 19:12:40 2005 UTC (19 years, 1 month ago) by otto
Branch: MAIN
Changes since 1.31: +11 -6 lines
Diff to previous 1.31 (colored)

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@

Revision 1.31 / (download) - annotate - [select for diffs], Sun Oct 3 19:23:02 2004 UTC (19 years, 7 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.30: +1 -6 lines
Diff to previous 1.30 (colored)

Remove block based mmap optimization. There are newline problems
(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@

Revision 1.30 / (download) - annotate - [select for diffs], Tue Sep 28 20:51:15 2004 UTC (19 years, 7 months ago) by jmc
Branch: MAIN
Changes since 1.29: +5 -5 lines
Diff to previous 1.29 (colored)

various fixes to make this page a bit clearer and hopefully a bit
more helpful;

this includes some ideas/fixes from otto and jared;

Revision 1.29 / (download) - annotate - [select for diffs], Thu Aug 5 21:47:33 2004 UTC (19 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.28: +2 -2 lines
Diff to previous 1.28 (colored)

spacing

Revision 1.28 / (download) - annotate - [select for diffs], Fri May 7 14:51:42 2004 UTC (20 years ago) by millert
Branch: MAIN
Changes since 1.27: +14 -31 lines
Diff to previous 1.27 (colored)

Add a new past path for fgrep that is just a simplified version of
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@

Revision 1.27 / (download) - annotate - [select for diffs], Fri Apr 2 18:39:36 2004 UTC (20 years, 1 month ago) by otto
Branch: MAIN
Changes since 1.26: +12 -3 lines
Diff to previous 1.26 (colored)

Implement --line-buffered
ok millert@ tedu@

Revision 1.26 / (download) - annotate - [select for diffs], Wed Feb 4 18:38:52 2004 UTC (20 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.25: +10 -3 lines
Diff to previous 1.25 (colored)

Fix anchors (^ or $) in -w mode broken by the last commit's -w overhaul.
With this change we pass the updated regress.  Tested and OK by ho@

Revision 1.25 / (download) - annotate - [select for diffs], Sun Jan 25 21:36:00 2004 UTC (20 years, 3 months ago) by millert
Branch: MAIN
Changes since 1.24: +10 -4 lines
Diff to previous 1.24 (colored)

Previously, in -w mode, for each match on a line grep would check
to see if the match was on a word boundary.  However, this missed
lines where the first match was not on a word boundary but a
subsequent match was.  Problem originally spotted by miod@

We fix this by using the [[:<:]] and [[:>:]] character classes for
the slow path and by checking the word boundaries in grep_search()
for the fast path instead of doing the checks after running
regexec() or grep_search().

With this change, grep passes the new regress tests 15 and 16.
problem originally spotted by espie@.

Revision 1.24 / (download) - annotate - [select for diffs], Thu Dec 11 20:49:20 2003 UTC (20 years, 5 months ago) by mcbride
Branch: MAIN
Changes since 1.23: +5 -4 lines
Diff to previous 1.23 (colored)

Sync usage() with SYNOPSIS in grep(1).

ok deraadt@ jmc@

Revision 1.23 / (download) - annotate - [select for diffs], Sun Sep 7 19:40:54 2003 UTC (20 years, 8 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.22: +10 -10 lines
Diff to previous 1.22 (colored)

Fix "grep -number" support for multi-digit numbers.  At issue is
the fact that optind refers to the *next* argument to be consumed
by getopt(), not the current one.  This means we have to keep track
of when we are working with a new argv entry by hand.  OK hugh@

Revision 1.22 / (download) - annotate - [select for diffs], Wed Jul 16 19:08:21 2003 UTC (20 years, 10 months ago) by millert
Branch: MAIN
Changes since 1.21: +3 -3 lines
Diff to previous 1.21 (colored)

When reallocing pattern, use sizeof(*pattern) not sizeof(int).
Fixes a problem on sparc64 where sizeof(int) != sizeof(pointer).
Based on a patch from Brian Poole; tedu@ OK

Revision 1.21 / (download) - annotate - [select for diffs], Mon Jul 14 23:22:35 2003 UTC (20 years, 10 months ago) by millert
Branch: MAIN
Changes since 1.20: +22 -8 lines
Diff to previous 1.20 (colored)

range-check numeric arguments (-num, -A num, -B num)

Revision 1.20 / (download) - annotate - [select for diffs], Thu Jul 10 17:02:48 2003 UTC (20 years, 10 months ago) by millert
Branch: MAIN
Changes since 1.19: +4 -4 lines
Diff to previous 1.19 (colored)

grep should exit(2) on error, not exit(1) (1 means no matches found).
deraadt@ OK

Revision 1.19 / (download) - annotate - [select for diffs], Thu Jul 10 16:51:12 2003 UTC (20 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.18: +33 -33 lines
Diff to previous 1.18 (colored)

knf

Revision 1.18 / (download) - annotate - [select for diffs], Thu Jul 10 16:49:12 2003 UTC (20 years, 10 months ago) by millert
Branch: MAIN
Changes since 1.17: +10 -8 lines
Diff to previous 1.17 (colored)

Fix parsing of -NUMBER.  We now do things a digit at a time and
keep track of what the last char from getopt was as well as the
previous value of optind so we know when a new number has started.

Revision 1.17 / (download) - annotate - [select for diffs], Wed Jun 25 17:28:00 2003 UTC (20 years, 10 months ago) by millert
Branch: MAIN
Changes since 1.16: +8 -8 lines
Diff to previous 1.16 (colored)

o remove useless cast to int from gzread() call
o maxPatternLen should be size_t since that's what it is compared against
o remove useless casts of NULL to various pointer types

Revision 1.16 / (download) - annotate - [select for diffs], Tue Jun 24 18:45:30 2003 UTC (20 years, 11 months ago) by tedu
Branch: MAIN
Changes since 1.15: +36 -30 lines
Diff to previous 1.15 (colored)

actually do fgrep.  -G -F and -E are now mutally exclusive, and override
the program name as expected.  ok millert@

Revision 1.15 / (download) - annotate - [select for diffs], Mon Jun 23 22:32:48 2003 UTC (20 years, 11 months ago) by tedu
Branch: MAIN
Changes since 1.14: +3 -2 lines
Diff to previous 1.14 (colored)

strncpy -> memcpy per deraadt suggestion.
also add a note why we can't use strlcpy.

Revision 1.14 / (download) - annotate - [select for diffs], Mon Jun 23 22:27:09 2003 UTC (20 years, 11 months ago) by tedu
Branch: MAIN
Changes since 1.13: +3 -2 lines
Diff to previous 1.13 (colored)

go back to using strncpy.  for long patterns, strlcpy reads too much
of a potentially nontermined src.

Revision 1.13 / (download) - annotate - [select for diffs], Mon Jun 23 22:05:23 2003 UTC (20 years, 11 months ago) by tedu
Branch: MAIN
Changes since 1.12: +38 -5 lines
Diff to previous 1.12 (colored)

faster grep for simple patterns.  derived from a patch by sean farley.
this makes searching for constant strings much faster by avoiding regex.
ok deraadt@

Revision 1.12 / (download) - annotate - [select for diffs], Mon Jun 23 07:52:18 2003 UTC (20 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.11: +3 -2 lines
Diff to previous 1.11 (colored)

minor tweaks

Revision 1.11 / (download) - annotate - [select for diffs], Mon Jun 23 03:23:40 2003 UTC (20 years, 11 months ago) by tedu
Branch: MAIN
Changes since 1.10: +4 -5 lines
Diff to previous 1.10 (colored)

use strlcpy, not strncpy.  ok deraadt@ millert@

Revision 1.10 / (download) - annotate - [select for diffs], Mon Jun 23 02:02:41 2003 UTC (20 years, 11 months ago) by tedu
Branch: MAIN
Changes since 1.9: +2 -2 lines
Diff to previous 1.9 (colored)

spelling

Revision 1.9 / (download) - annotate - [select for diffs], Mon Jun 23 00:55:09 2003 UTC (20 years, 11 months ago) by tedu
Branch: MAIN
Changes since 1.8: +43 -15 lines
Diff to previous 1.8 (colored)

better detetection/handling of binary files.
make -a do the right thing, doc and implement -U, -I.
add --help and --mmap for compatibility.
some other minor fixes.

some from NetBSD.  ok deraadt@

Revision 1.8 / (download) - annotate - [select for diffs], Sun Jun 22 23:51:22 2003 UTC (20 years, 11 months ago) by tedu
Branch: MAIN
Changes since 1.7: +5 -10 lines
Diff to previous 1.7 (colored)

use __progname instead of progname.  ok deraadt

Revision 1.7 / (download) - annotate - [select for diffs], Sun Jun 22 23:12:38 2003 UTC (20 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored)

fix usage

Revision 1.6 / (download) - annotate - [select for diffs], Sun Jun 22 22:38:50 2003 UTC (20 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)

proper $OpenBSD$

Revision 1.5 / (download) - annotate - [select for diffs], Sun Jun 22 22:24:13 2003 UTC (20 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.4: +25 -11 lines
Diff to previous 1.4 (colored)

-DNOZ flag to be used by install media for removing z*grep support, if
needed.  (and knf)

Revision 1.4 / (download) - annotate - [select for diffs], Sun Jun 22 22:23:06 2003 UTC (20 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.3: +12 -1 lines
Diff to previous 1.3 (colored)

support z{e,f}grep

Revision 1.3 / (download) - annotate - [select for diffs], Sun Jun 22 22:20:07 2003 UTC (20 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.2: +267 -504 lines
Diff to previous 1.2 (colored)

freegrep 0.16

Revision 1.2 / (download) - annotate - [select for diffs], Sun Feb 16 03:46:04 2003 UTC (21 years, 3 months ago) by cloder
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3
Changes since 1.1: +3 -3 lines
Diff to previous 1.1 (colored)

Fix format string bug.  I believe this grep is currently not used (in
favor of the GNU version), but it gets fixed anyways.  ok mickey@

Revision 1.1 / (download) - annotate - [select for diffs], Fri Sep 21 23:12:00 2001 UTC (22 years, 8 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_2_BASE, OPENBSD_3_2, OPENBSD_3_1_BASE, OPENBSD_3_1, OPENBSD_3_0_BASE, OPENBSD_3_0

complete grep clone by harding@motd.ca; everything is there, but it is
slow because libc regexp is slow.  Anyone out there have the balls to sit
down and optimize libc regexp?

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.