OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.19 / (download) - annotate - [select for diffs], Sun Jan 27 14:43:09 2019 UTC (5 years, 3 months ago) by deraadt
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, 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, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, HEAD
Changes since 1.18: +2 -1 lines
Diff to previous 1.18 (colored)

mmap support was broken in previous submitted diff from lauri tirkkonen

Revision 1.18 / (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.17: +7 -19 lines
Diff to previous 1.17 (colored)

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

Revision 1.17 / (download) - annotate - [select for diffs], Fri Feb 6 23:21:59 2015 UTC (9 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, 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, OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored)

SIZE_MAX is standard, we should be using it in preference to the
obsolete SIZE_T_MAX.  OK miod@ beck@

Revision 1.16 / (download) - annotate - [select for diffs], Fri Jan 16 06:40:08 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.15: +1 -2 lines
Diff to previous 1.15 (colored)

Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible.  Annotate <sys/param.h> lines with their current reasons.  Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc.  Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution.  These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)

Revision 1.15 / (download) - annotate - [select for diffs], Sat Nov 8 22:13:47 2014 UTC (9 years, 6 months ago) by brad
Branch: MAIN
Changes since 1.14: +3 -3 lines
Diff to previous 1.14 (colored)

Check the mode flag being passed in to mmopen() instead of ignoring it.

Pointed out by LLVM.

mmfile.c:51:7: warning: explicitly assigning a variable of type 'char *' to itself [-Wself-assign]

ok millert@

Revision 1.14 / (download) - annotate - [select for diffs], Sun Jul 17 12:17:10 2011 UTC (12 years, 10 months ago) by aschrijver
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, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.13: +4 -4 lines
Diff to previous 1.13 (colored)

Fix spacing

OK otto@

Revision 1.13 / (download) - annotate - [select for diffs], Fri Jul 2 20:48:48 2010 UTC (13 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.12: +5 -1 lines
Diff to previous 1.12 (colored)

Do not include mmap support with -DSMALL.

ok millert

Revision 1.12 / (download) - annotate - [select for diffs], Wed Sep 20 14:29:03 2006 UTC (17 years, 8 months ago) by otto
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, OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.11: +2 -2 lines
Diff to previous 1.11 (colored)

That should be S_ISREG, dunno why I committed this wrong version;
spotted by hshoexer@

Revision 1.11 / (download) - annotate - [select for diffs], Tue Sep 19 05:52:23 2006 UTC (17 years, 8 months ago) by otto
Branch: MAIN
Changes since 1.10: +2 -2 lines
Diff to previous 1.10 (colored)

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@

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

delint; remove redundant vars and functions; ok jaredy@

Revision 1.9 / (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_8_BASE, OPENBSD_3_8, OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.8: +4 -18 lines
Diff to previous 1.8 (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.8 / (download) - annotate - [select for diffs], Sun Jan 18 19:05:24 2004 UTC (20 years, 4 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored)

Unbreak *grep -w -l. ok millert@

Revision 1.7 / (download) - annotate - [select for diffs], Tue Sep 9 05:04:27 2003 UTC (20 years, 8 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored)

mmap returns MAP_FAILED on failure.  fixes hugh@'s crash.  ok deraadt@

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

tweak boolean test to be clear

Revision 1.5 / (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.4: +19 -4 lines
Diff to previous 1.4 (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.4 / (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.3: +3 -3 lines
Diff to previous 1.3 (colored)

minor tweaks

Revision 1.3 / (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.2: +2 -2 lines
Diff to previous 1.2 (colored)

proper $OpenBSD$

Revision 1.2 / (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.1: +4 -4 lines
Diff to previous 1.1 (colored)

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

Revision 1.1 / (download) - annotate - [select for diffs], Sun Jun 22 22:20:07 2003 UTC (20 years, 11 months ago) by deraadt
Branch: MAIN

freegrep 0.16

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.