VirtualBox

source: kBuild/vendor/grep/current/ChangeLog-2009@ 3630

Last change on this file since 3630 was 3529, checked in by bird, 3 years ago

Imported grep 3.7 from grep-3.7.tar.gz (sha256: c22b0cf2d4f6bbe599c902387e8058990e1eee99aef333a203829e5fd3dbb342), applying minimal auto-props.

File size: 140.0 KB
Line 
12009-11-26 Paolo Bonzini <[email protected]>
2
3 * bootstrap.conf: Add binary-io, dirname.
4 * configure.ac: Remove check for setmode, AC_DOSFILE.
5 * m4/dosfile.m4: Remove.
6 * src/grep.c: Adjust for dirname.h.
7 * src/system.h: Adjust for new gnulib modules.
8
92009-11-26 Paolo Bonzini <[email protected]>
10
11 * bootstrap.conf: Add gnulib modules for replacement functions and
12 headers.
13 * configure.ac: Remove macros subsumed by gnulib.
14 * lib/hard-locale.c: Remove guards for headers/functions provided by gnulib.
15 * lib/regex.c: Likewise.
16 * lib/savedir.c: Likewise.
17 * src/dfa.c: Likewise.
18 * src/grep.c: Likewise.
19 * src/mbsupport.h: Likewise.
20 * src/system.h: Likewise.
21
22 * src/dfa.h: Do not look at PROTOTYPES.
23
24 * m4/mbstate_t.m4: Remove.
25 * src/getpagesize.h: Remove.
26
272009-11-26 Paolo Bonzini <[email protected]>
28
29 * bootstrap.conf: Add gnulib modules and build libgreputils.a.
30 * configure.ac: Remove macros subsumed by gnulib.
31 * lib/Makefile.am: Remove files subsumed by gnulib.
32 * lib/alloca.c: Remove.
33 * lib/atexit.c: Remove.
34 * lib/error.c: Remove.
35 * lib/error.h: Remove.
36 * lib/fnmatch.c: Remove.
37 * lib/fnmatch.h: Remove.
38 * lib/getopt.c: Remove.
39 * lib/getopt.h: Remove.
40 * lib/getopt1.c: Remove.
41 * lib/gettext.h: Remove.
42 * lib/malloc.c: Remove.
43 * lib/memchr.c: Remove.
44 * lib/obstack.c: Remove.
45 * lib/obstack.h: Remove.
46 * lib/quotearg.c: Remove.
47 * lib/quotearg.h: Remove.
48 * lib/realloc.c: Remove.
49 * lib/stpcpy.c: Remove.
50 * lib/strtol.c: Remove.
51 * lib/strtoul.c: Remove.
52 * lib/strtoull.c: Remove.
53 * lib/xalloc.h: Remove.
54 * lib/xmalloc.c: Remove.
55 * lib/xstrtol.c: Remove.
56 * lib/xstrtol.h: Remove.
57 * lib/xstrtoumax.c: Remove.
58 * m4/error.m4: Remove.
59 * m4/inttypes_h.m4: Remove.
60 * m4/malloc.m4: Remove.
61 * m4/realloc.m4: Remove.
62 * m4/uintmax_t.m4: Remove.
63 * m4/ulonglong.m4: Remove.
64 * m4/xstrtoumax.m4: Remove.
65 * src/system.h: Remove strerror, sys_nerr, sys_errlist.
66
672009-11-26 Paolo Bonzini <[email protected]>
68
69 * bootstrap: Use gnulib's build-aux/bootstrap.
70 * configure.ac: Add gl_INIT and gl_EARLY.
71
722009-11-26 Paolo Bonzini <[email protected]>
73
74 * configure.ac: Bump AC_PREREQ to 2.59.
75
762009-11-26 Paolo Bonzini <[email protected]>
77
78 * lib/savedir.c: Do not use NAMLEN.
79
802009-11-21 Paolo Bonzini <[email protected]>
81
82 * configure.ac: Remove AC_SEP.
83 * m4/envsep.m4: Remove.
84
852009-11-20 Paolo Bonzini <[email protected]>
86
87 * configure.ac: Do not generate lib/posix/Makefile.
88 * lib/Makefile.am: Remove SUBDIRS.
89 * lib/posix/Makefile.am: Remove.
90 * lib/posix/regex.h: Overwrite...
91 * lib/regex.h: ... this.
92
932009-11-20 Paolo Bonzini <[email protected]>
94
95 * doc/Makefile.am: Remove AUTOMAKE_OPTIONS.
96 * lib/posix/Makefile.am: Remove AUTOMAKE_OPTIONS.
97 * vms/Makefile.am: Remove AUTOMAKE_OPTIONS.
98
992009-11-20 Paolo Bonzini <[email protected]>
100
101 * Makefile.cvs: Remove.
102
1032009-11-20 Paolo Bonzini <[email protected]>
104
105 * m4/largefile.m4: Remove.
106 * m4/lib-ld.m4: Remove.
107 * m4/lib-prefix.m4: Remove.
108 * m4/missing.m4: Remove.
109 * m4/nls.m4: Remove.
110 * m4/progtest.m4: Remove.
111
1122009-11-20 Paolo Bonzini <[email protected]>
113
114 * bootstrap: Add autopoint invocation and fetching of .po files.
115 * configure.ac: Bump to GNU gettext 0.17.
116
117 * ABOUT-NLS: Remove.
118 * m4/gettext.m4: Remove.
119 * m4/iconv.m4: Remove.
120 * m4/lib-link.m4: Remove.
121 * m4/po.m4: Remove.
122 * po/*.po: Remove.
123
1242009-11-20 Paolo Bonzini <[email protected]>
125
126 * autogen.sh: Rename to...
127 * bootstrap: ... this.
128
1292009-11-20 Paolo Bonzini <[email protected]>
130
131 * bootstrap/*: Remove.
132 * configure.ac: Do not create bootstrap/Makefile.
133 * Makefile.am: Do not recurse into bootstrap, distribute new files.
134 * Makefile.boot: Move from bootstrap/Makefile.try.
135 * README-boot: Move from bootstrap/README.
136
1372009-11-20 Paolo Bonzini <[email protected]>
138
139 * lib/Makefile.am: Distribute gettext.h.
140 * lib/closeout.c: Use it.
141 * lib/gettext.h: New.
142 * lib/quotearg.c: Use it.
143 * lib/xmalloc.c: Use it.
144 * src/dfa.c: Use it.
145 * src/system.h: Use it.
146
1472009-11-20 Paolo Bonzini <[email protected]>
148
149 * configure.ac.in: Rename...
150 * configure.ac: ... to this. Remove ALL_LINGUAS definition.
151 * autogen.sh: Generate po/LINGUAS instead of configure.ac.
152
1532009-11-20 Paolo Bonzini <[email protected]>
154
155 * configure.ac.in: Remove pointless (?) stamp-h rule.
156
1572009-11-20 Paolo Bonzini <[email protected]>
158
159 * configure.ac.in: Remove m4/Makefile creation.
160 * Makefile.am: Remove m4 subdirectory.
161 * m4/Makefile.am: Remove.
162 * m4/codeset.m4: Remove.
163 * m4/glibc.m4: Remove.
164 * m4/glibc21.m4: Remove.
165 * m4/header.m4: Remove.
166 * m4/install.m4: Remove.
167 * m4/isc-posix.m4: Remove.
168 * m4/lcmessage.m4: Remove.
169 * m4/sanity.m4: Remove.
170
1712009-11-20 Paolo Bonzini <[email protected]>
172
173 * configure.ac.in (AM_GNU_GETTEXT_VERSION): Bump to 0.17.
174 * Makefile.am (EXTRA_DIST): Add build-aux/config.rpath.
175 * intl/*: Remove.
176 * m4/gettext.m4: Upgrade to gettext-0.17.
177 * m4/iconv.m4: Upgrade to gettext-0.17.
178 * m4/lib-ld.m4: New file, from gettext-0.17.
179 * m4/lib-link.m4: New file, from gettext-0.17.
180 * m4/lib-prefix.m4: New file, from gettext-0.17.
181 * m4/nls.m4: New file, from gettext-0.17.
182 * m4/po.m4: New file, from gettext-0.17.
183 * m4/progtest.m4: Upgrade to gettext-0.17.
184 * m4/Makefile.am (EXTRA_DIST): Add the new files.
185 * po/Makefile.in.in: Upgrade to gettext-0.17.
186 * po/Makevars: New.
187 * po/cat-id-tbl.c: New.
188 * src/Makefile.am: Replace @INTLLIBS@ with @LIBINTL@.
189
1902009-11-20 Paolo Bonzini <[email protected]>
191
192 * configure.ac.in: Test for limits.h, locale.h, stddef.h, mempcpy
193 and setlocale, though already done implicitly via AM_GNU_GETTEXT.
194
1952009-11-20 Paolo Bonzini <[email protected]>
196
197 * bootstrap/Makefile.try: Adjust.
198 * lib/savedir.c: Avoid using stpcpy, so that bootstrapping does not
199 need it.
200
2012009-11-20 Paolo Bonzini <[email protected]>
202
203 * configure.ac: Slightly modernize.
204 * Makefile.am: Modernize, use dependencies.
205 * Makefile.am: Modernize, use dependencies.
206 * lib/Makefile.am: Remove ansi2knr.
207 * src/Makefile.am: Remove ansi2knr.
208
209 * .gitignore: Add INSTALL
210 * build-aux/.gitignore: New.
211
2122009-11-20 Paolo Bonzini <[email protected]>
213
214 * autogen.sh: Remove what is useless with git.
215
2162009-02-10 Tony Abou-Assaleh <[email protected]>
217
218 * po/*.po: update from the Translation Project
219
220 * configure.ac.in: update version to 2.6-cvs
221
2222009-02-02 Karl Berry <[email protected]>
223
224 * configure.ac.in (pcre): set CPPFLAGS, not CFLAGS.
225
2262009-02-01 Tony Abou-Assaleh <[email protected]>
227
228 * po/*.po: update from the Translation Project
229
230 * po/Makefile.in.in: Remove deleted file ChangeLog from DISTFILES
231
232 * configure.ac.in: Replace obsolete macro AC_OUTPUT with modern equivalent
233
2342009-02-01 Karl Berry <[email protected]>
235
236 * missing: re-add (from gnulib), since it's missing.
237
238 * src/grep.c (usage): consistent punctuation.
239
2402009-01-31 Tony Abou-Assaleh <[email protected]>
241
242 * m4/*.m4: quote underquoted definitions
243 * m4/codeset.m4: serial AM1 -> serial 1
244 * m4/iconv.m4: serial AM2 -> serial 2
245 * m4/header.m4: m4_regexp -> m4_bregexp, m4_patsubst -> m4_bpatsubst
246
2472009-01-29 Karl Berry <[email protected]>
248
249 * src/grep.c (usage): mention gnu.org/s/grep and gnu.org/gethelp.
250
251 Update and/or add copyright notices:
252 * ABOUT-NLS
253 * AUTHORS
254 * ChangeLog
255 * Makefile.am
256 * NEWS
257 * README
258 * README-alpha
259 * README.DOS
260 * THANKS
261 * autogen.sh
262 * configure.ac.in
263 * bootstrap/Makefile.am
264 * bootstrap/Makefile.try
265 * bootstrap/README
266 * doc/Makefile.am
267 * doc/grep.texi
268 * lib/Makefile.am
269 * m4/Makefile.am
270 * po/POTFILES.in
271 * src/Makefile.am
272 * src/dfa.h
273 * src/dosbuf.c
274 * src/grep.h
275 * src/kwset.c
276 * src/kwset.h
277 * src/mbsupport.h
278 * src/search.c
279 * src/system.h
280 * src/vms_fab.c
281 * src/vms_fab.h
282 * tests/Makefile.am
283 * tests/backref.sh
284 * tests/bre.awk
285 * tests/bre.sh
286 * tests/empty.sh
287 * tests/ere.awk
288 * tests/ere.sh
289 * tests/file.sh
290 * tests/fmbtest.sh
291 * tests/foad1.sh
292 * tests/khadafy.sh
293 * tests/options.sh
294 * tests/pcre.sh
295 * tests/spencer1.awk
296 * tests/spencer1.sh
297 * tests/spencer2.sh
298 * tests/status.sh
299 * tests/tests
300 * tests/warning.sh
301 * tests/yesno.sh
302 * vms/Makefile.am
303 * vms/config_vms.h
304
305 * po/ChangeLog: remove this file, just a bit of ancient cruft.
306
3072009-01-25 Tony Abou-Assaleh <[email protected]>
308
309 * README: updated "KNOWN BUGS" section
310
3112009-01-24 Bruno Haible <[email protected]>
312
313 * lib/posix/regex.h (__restrict, __restrict_arr): Remove macros.
314 (_Restrict_, _Restrict_arr_): New macros. From gnulib/lib/regex.h.
315 (regcomp, regexec): Update declarations to use them.
316
317 * lib/savedir.c (isdir): New declaration.
318
319 * src/dfa.c (update_mb_len_index): Change argument type to
320 'char const *'.
321 (match_mb_charset): Cast argument to strncpy.
322 (dfaexec): Add pointer cast.
323
324 * src/grep.c (parse_grep_colors): Add braces for disambiguation.
325
326 * src/kwset.c: Include xalloc.h instead of declaring xmalloc manually.
327
3282009-01-20 Tony Abou-Assaleh <[email protected]>
329
330 * tests/foad1.sh: disable tests that fail under cs_CZ.UTF-8.
331 * tests/fmbtest.sh: likewise
332 * README: added "KNOWN BUGS" section
333 * src/grep.c: updated copyright year
334
3352008-12-12 Karl Berry <[email protected]>
336
337 * doc/grep.texi (Exit Status, grep Programs): move these
338 nodes to under Invoking.
339
340 * doc/grep.texi: remove all remaining node pointers;
341 downcase cindex entries.
342
3432008-12-11 Karl Berry <[email protected]>
344
345 * doc/grep.texi (Copying): update url's.
346 (GNU General Public License): remove node.
347 (GNU Free Documentation License): @include fdl.texi instead.
348 (@copying): update to v1.3 or later.
349 * doc/fdl.texi: new file, copied from
350 https://www.gnu.org/licenses/fdl.texi.
351 * doc/Makefile.am (grep_TEXINFOS): new variable to get fdl.texi.
352 Also add usual GPL license statement.
353
354 * doc/grep.texi (Index): Merge in Concept Index node,
355 to have only one index. Arrange @syncodeindex's accordingly.
356
3572008-12-10 Karl Berry <[email protected]>
358
359 * doc/grep.texi (@copying): use @copying; move @contents to
360 beginning; rearrange other frontmatter in the conventional ways.
361
3622008-06-15 Tony Abou-Assaleh <[email protected]>
363
364 * src/ansi2knr.[1c]: Remove generated files (installed by
365 automake). Thanks to Emanuele Giaquinta for this.
366
3672008-02-14 Tony Abou-Assaleh <[email protected]>
368
369 * src/grep.c: Factor out copyright year in --version. Thanks to
370 Karl Berry for this.
371 * src/grep.c: Update copyright years
372
373 * po/POTFILES.in: +src/system.h +lib/closeout.c +lib/regex.c
374 +lib/xmalloc.c -lib/getopt1.c
375
3762008-02-09 Tony Abou-Assaleh <[email protected]>
377
378 * src/dfa.c: Replace a MALLOC and for loop with a CALLOC. Thanks to
379 Johan Walles for this. Patch #6288
380
381 * README-alpha: more info about CVS code
382 * README: pointer to README-alpha
383
384 * src/grep.c: Update grep copyright year
385
3862008-02-08 Reuben Thomas <[email protected]> (tiny change)
387
388 * .cvsignore: add configure.ac
389 * src/.cvsignore: add .deps
390
3912008-02-06 Tony Abou-Assaleh <[email protected]>
392
393 * tests/foad1.sh: Comment out cases that are known to fail. These
394 should be uncommented after the 2.5.4 release.
395 * tests/yesno.sh: Likewise.
396 * doc/grep.1: Update description of -e PATTERN; from Benno Schulenberg
397 * doc/grep.texi: Likewise.
398
3992007-11-19 Tony Abou-Assaleh <[email protected]>
400
401 * m4/Makefile.am: Remove reference strerror_r.m4
402
4032007-11-16 Tony Abou-Assaleh <[email protected]>
404
405 * po/sk.po: updated from the translation project
406
4072007-11-03 Tony Abou-Assaleh <[email protected]>
408
409 * po/*.po: get latest translations
410 * po/no.po: removed
411 * po/ky.po: added
412 * po/sk.po: added
413
4142007-10-10 Tony Abou-Assaleh <[email protected]>
415
416 * configure.ac.in: update version to 2.6-dev
417
418 * src/grep.c: update --version message
419
4202007-10-07 Tony Abou-Assaleh <[email protected]>
421
422 * src/grep.c: When -h and -H are combined, use the last specified,
423 Bug #15620, Patch #4866
424 * tests/foad1.sh: add tests for -h and -H
425
426 * ChangeLog: Add a copyright notice (years taken from commit logs),
427 add a license notice (taken from gnulib ChangeLog)
428
429 * TODO: update the link to a list of other grep implementations
430
4312007-06-29 Bernhard Rosenkraenzer <[email protected]>
432
433 * all files: GPLv3
434 * configure.ac.in: Change version number
435
4362006-11-25 Bernhard Rosenkraenzer <[email protected]>
437
438 * configure.ac.in: Update version number for post-2.5.2 development
439
4402006-11-25 Bernhard Rosenkraenzer <[email protected]>
441
442 * configure.ac.in, grep.spec: Update version number
443
444 * Makefile.cvs: Update to work with current autoconf scripts
445
446 * po/Makefile.in.in: Adjust to work with automake 1.1x
447
4482006-08-19 Bernhard Rosenkraenzer <[email protected]>
449
450 * po/*: Sync with translation project
451
452 * doc/*: Assorted documentation updates, Patch #4610
453
454 * autogen.sh, configure.in, configure.ac.in: Autogenerate
455 ALL_LINGUAS variable
456
457 * m4/strerror_r.m4, configure.ac.in: Fix detection of strerror_r
458
459 * lib/error.c: Remove bogus warning
460
461 * lib/savedir.c, lib/savedir.h, src/grep.c, doc/*:
462 Add --exclude-dir option (patch #5051)
463
4642005-11-18 Charles Levert <[email protected]>
465
466 * tests/foad1.sh: Use ": ${VERBOSE=}" so that the caller can
467 set it without modifying the script; the usual caller (Makefile)
468 still leaves it untouched (usually unset, so it's off by default).
469 Modify "-m1 -A99 '^...$'" tests that failed so that their
470 expectation now corresponds to the output currently produced
471 by grep. Those tests used to expect that two selected (or
472 selectable) lines be output, even with -m1. Nothing was
473 modified with other similar tests that output _context_ lines
474 after one selected line has been output with -m1; they used to
475 and still succeed. Although tests/yesno.sh now provides a more
476 comprehensive framework for testing -m/-C feature interaction,
477 it doesn't exercise mixing them with anchors so the whole
478 relevant tests/foad1.sh test group is kept, notably to check
479 that grep doesn't crash when it is run.
480
4812005-11-17 Charles Levert <[email protected]>
482
483 On 2005-06-21, many changes were made that affected --color,
484 --only-matching, and --invert-match. Some of them introduced a
485 misunderstanding between the concepts of matched/non-matched and
486 selected/rejected lines. Furthermore, a few bugs with -v sneaked
487 in stemming from this. This set of changes aims to rectify most
488 of this situation. Some GREP_COLORS capabilities are also added
489 as a result of the clarification. (Further issues with -v/-o/-C
490 feature interaction still remain to be sorted out.)
491
492 * src/grep.c: Rename/add global variables, macros, and capabilities:
493 SEP_CHAR_MATCH --> SEP_CHAR_SELECTED
494 SEP_CHAR_CONTEXT --> SEP_CHAR_REJECTED
495 SEP_STR_CHUNK --> SEP_STR_GROUP
496 grep_color --> selected_match_color + context_match_color
497 mlines_color --> selected_line_color
498 context_color --> context_line_color
499 "ml" --> "sl"
500 "mt" --> "mt" = "ms" + "mc"
501 --> "rv" (reverse "sl"/"cx" when -v)
502 * src/grep.c (color_cap_mt_fct, color_cap_rv_fct): New functions.
503 * src/grep.c (print_line_tail): Renamed color argument to line_color.
504 * src/grep.c (print_line_middle, prline): Revert part of the logic to
505 a pre-2005-06-21 one so that lines with matches have their matched
506 parts properly handled again ("m?" colors or --only-matching),
507 whether or not -v is specified. Whole line colors ("sl", "cx")
508 follow a selected / rejected(context) logic, as opposed to a
509 matched / non-matched one (unless "rv"). Matched text colors ("ms",
510 "mc") always follow a selected / rejected(context) logic,
511 regardless of "rv", because only matched lines use them anyway.
512 pr_line_middle() now takes additional line_color and match_color
513 arguments computed by prline() prior to calling that function.
514 The old logic was a buggy hybrid matched / rejected(context) one.
515 * src/grep.c (prpending, prtext, grepfile): Renamed macro invocations.
516 * src/grep.c (parse_grep_colors): Update top comment.
517 * src/grep.c (main): GREP_COLOR (singular) now sets both
518 selected_match_color and context_match_color.
519
5202005-11-16 Charles Levert <[email protected]>
521
522 * src/search.c (Pcompile): Clarify message for the -P option
523 not being supported so that users don't assume it's a run-time
524 problem, but know that it's a compile-time configuration choice.
525 Based on an idea by: Benno Schulenberg <[email protected]>.
526
5272005-11-13 Charles Levert <[email protected]>
528
529 * tests/yesno.sh: New file. Test feature interaction
530 of -C, -v, -o, and -m. This reveals bugs, including some I
531 introduced on 2005-06-21, but also others.
532 * tests/Makefile.am (TESTS): Add yesno.sh.
533 * tests/Makefile.am (CLEANFILES): Add cspatfile and csinput, as
534 created by fmbtest.sh. Add yesno.txt, as created by yesno.sh.
535
5362005-11-11 Charles Levert <[email protected]>
537
538 * configure.in (ALL_LINGUAS): Add languages that were missing
539 from this variable (bg, ca, da, nb, tr), but that GNU grep supports
540 with a po/xx.po file. Reported by Tony Abou-Assaleh <[email protected]>.
541
542 * src/search.c (Pcompile): Abort in error if -P and multiple patterns
543 are specified, with an error message explaining the situation.
544 Fixing this won't be simple; the '\n' characters separating the
545 patterns cannot just be replaced by '|' to create an alternation as
546 back-references are assumed to be local to each individual pattern.
547
548 * src/grep.c (parse_grep_colors, main): Replace all uses of
549 fprintf(stderr, _("%s: foo\n"), program_name, ...) with
550 error(0, 0, _("foo"), ...) for uniformization and simplification
551 of warning messages that will be up for localization. (My bad.)
552
5532005-11-10 Charles Levert <[email protected]>
554
555 The introduction of the --only-matching and --color GNU extensions
556 to grep added the requirement that each execute() implementation
557 not only be able to identify matching lines as a whole, but also
558 individual "exact" matches within a line known to be matching,
559 from leftmost to rightmost match, when the output from matching
560 lines is actually produced. The interface and implementations
561 of execute() were not up to it. This set of changes aims to
562 rectify that situation. Previously failing tests relative to
563 left anchors (^ and \<) and -w should now pass. This fixes
564 <https://savannah.gnu.org/bugs/?func=detailitem&item_id=11579>,
565 <https://savannah.gnu.org/patch/?func=detailitem&item_id=1834>,
566 <https://savannah.gnu.org/bugs/?func=detailitem&item_id=8243>,
567 and possibly part of other, bigger, pending patches. The problem
568 was also compounded by the POSIX requirement to support a pattern
569 list instead of just an individual pattern (for -G and -E as well).
570
571 * tests/foad1.sh: Test for increasing/decreasing-length word
572 matches, given pattern order, and leftmost/longest match.
573 * tests/fmbtest.sh: Modify test #6 according to new expectations.
574 Better document what tests #6 and #7 are actually for. Eliminate
575 test #5 in favor of bringing tests #6 and #7 within the F G E loop.
576 * src/grep.h (EXECUTE_ARGS): Change last argument from "int exact"
577 to "char const *start_ptr". Testing for "start_ptr" being non-NULL
578 retains the same semantics as testing for "exact" being non-zero.
579 * src/grep.c (print_line_middle): Call execute() with whole
580 buffer to work on, but using current position as start_ptr.
581 * src/grep.c (prpending, grepbuf): Call execute() with NULL
582 as start_ptr.
583 * src/search.c (EGexecute, Fexecute, Pexecute): When start_ptr is
584 non-NULL, return first match from it as an offset relative to buf.
585 * src/search.c (EGexecute): Consider all patterns if many and,
586 for an exact match, return the best one (leftmost, then longest).
587 Don't explore worst solutions, of course (branch and bound).
588
5892005-11-10 Charles Levert <[email protected]>
590
591 * src/grep.c (main): Fix a subtle memory allocation bug introduced
592 with the mb_icase_keys() function, which can call xrealloc() or
593 free() on keys, by making sure keys is always dynamically allocated.
594
5952005-11-09 Charles Levert <[email protected]>
596
597 * doc/grep.1, doc/grep.texi: Advise users to test for
598 "exit_status > 1" instead of "exit_status == 2" in order to
599 detect errors, for portability with other POSIX-compliant
600 implementations.
601
6022005-11-09 Charles Levert <[email protected]>
603
604 The following set of changes aims to make "egrep" and "fgrep"
605 minimal executable programs for legacy applications, instead of
606 shell scripts. This "fgrep" is much smaller than "grep".
607 This set of changes appears more daunting than it really is.
608
609 * src/egrep.c, src/fgrep.c, src/esearch.c, src/fsearch.c: New files
610 that #define either EGREP_PROGRAM or FGREP_PROGRAM and #include
611 the corresponding generic (i.e., non e or f specific) *.c file.
612 * src/grepmat.c: Remove whole file.
613 * src/Makefile.am: Remove no-dependencies from AUTOMAKE_OPTIONS.
614 Add definitions to make "egrep" and "fgrep" specific standalone
615 executable programs that only use the source files they need.
616 Remove rules for "egrep" and "fgrep" shell scripts.
617 * src/grep.h: #define GREP_PROGRAM if both EGREP_PROGRAM and
618 FGREP_PROGRAM are #undef. Only declare matchers[] in this case
619 along with the compile_fp_t and execute_fp_t function pointers
620 typedefs, otherwise declare prototypes for straight compile()
621 and execute() functions for the specialized "egrep" and "fgrep"
622 programs. Remove the extern declaration for matcher.
623 Define COMPILE_RET, COMPILE_ARGS, EXECUTE_RET, EXECUTE_ARGS,
624 COMPILE_FCT, and EXECUTE_FCT helper preprocessor macros.
625 * src/grep.c (short_options, long_options, usage, main): Only
626 support -G, -E, -F, -P, and -X for GREP_PROGRAM, but not for
627 EGREP_PROGRAM or FGREP_PROGRAM. Customize usage messages.
628 * src/grep.c (set_limits): New function with unchanged code,
629 called from main(), because it shouldn't be in install_matcher()
630 since it was already matcher-independent.
631 * src/grep.c (matcher): Add as static, only for GREP_PROGRAM.
632 * src/grep.c (setmatcher, install_matcher): Only for GREP_PROGRAM.
633 * src/grep.c (main): Remove any tweaking and dependence on argv[0].
634 * src/grep.c (print_line_middle, prpending, grepbuf, main): Call
635 compile() and execute() directly, not through a function
636 pointer dereferencing notation, so that it works with both
637 straight functions (in EGREP_PROGRAM and FGREP_PROGRAM) and
638 function pointers (in GREP_PROGRAM).
639 * src/search.c (<regex.h>, "dfa.h", dfa, pattern0, patterns,
640 pcount, dfaerror, kwset_exact_matches, kwsmusts): Only
641 include/declare/define if not FGREP_PROGRAM.
642 * src/search.c: Remove function prototypes for all functions
643 that are not used before their definition, since this is just
644 a hassle now with their varying names and conditional definition.
645 * src/search.c (GEAcompile): Rename from Ecompile(). Add new
646 syntax_bits argument/variable. Use as compile() for EGREP_PROGRAM.
647 Put in the needed RE_ICASE fix, albeit commented-out for now.
648 Make sure to free() modified word/line pattern after use, if any.
649 * src/search.c (Gcompile): Merge with GEAcompile() then remove.
650 * src/search.c (Gcompile, Acompile, Ecompile): New small functions
651 that call GEAcompile(), now that matcher is not an extern variable.
652 * src/search.c (GEAcompile, Gcompile, Acompile, Ecompile,
653 Fcompile, Pcompile, EGexecute, Fexecute, Pexecute, matchers):
654 Only define when needed according to *GREP_PROGRAM, and rename
655 to just compile() and execute() when appropriate.
656 * grep/bootstrap/Makefile.try: Similar changes.
657
6582005-11-08 Charles Levert <[email protected]>
659
660 * README.DOS, TODO, grep.spec, doc/grep.1, doc/grep.texi,
661 src/grep.h, po/da.po, po/nb.po, po/no.po, po/sv.po:
662 Replace all capitalized "Grep" by a lowercase "grep", except
663 in citations. Reported by Benno Schulenberg <[email protected]>
664 from the <https://bugs.debian.org/190551>
665 entry in the Debian bug tracker.
666 * doc/grep.1, doc/grep.texi: Explain that the "egrep" and "fgrep"
667 commands are deprecated and provided for historical applications.
668 Replace some "egrep" uses by "grep -E" to promote the newer usage.
669 Typeset "zgrep" as a command. Fix some spacing and punctuation bugs.
670
6712005-11-08 Julian Foad <[email protected]>
672
673 * doc/grep.texi: Rewrite a poorly written usage example about
674 back-references, and tweak another. New text by Benno Schulenberg.
675
6762005-11-04 Charles Levert <[email protected]>
677
678 * src/grep.c (mb_icase_keys): New function to properly lowercase
679 keys if match_icase. The problem was that some multi-octet
680 characters can get longer or shorter upon this conversion, so that
681 it cannot just naively be done in place on the same memory buffer.
682 * src/grep.c (main): Call mb_icase_keys (and remove in-line code).
683
684 * tests/foad1.sh: Duplicate three "-o -b" tests for the "-F"
685 mode because it relies on a different code path that deserves
686 the same kind of testing.
687
6882005-09-27 Stepan Kasal <[email protected]>
689
690 * doc/grep.1: Fix a typo.
691
6922005-08-24 Charles Levert <[email protected]>
693
694 * src/grep.c (print_line_middle): In case of an empty match,
695 make minimal progress and continue instead of aborting process
696 of the remainder of the line, in case there's still an upcoming
697 non-empty match.
698 * tests/foad1.sh: Add two tests for this.
699 * doc/grep.texi, doc/grep.1: Document this behavior, since
700 --only-matching and --color are GNU extensions which are
701 otherwise unspecified by POSIX or other standards.
702
7032005-07-26 Charles Levert <[email protected]>
704
705 * tests/pcre.sh: New file. Add test 1.
706 * tests/Makefile.am: Add pcre.sh to TESTS.
707
7082005-07-07 Charles Levert <[email protected]>
709
710 * src/grep.c: Remove all xm capability code.
711
7122005-07-05 Charles Levert <[email protected]>
713
714 * doc/grep.texi: Add missing green color in GREP_COLORS description.
715 * doc/grep.1: Fix typo and reorganize GREP_COLORS documentation.
716
717 * src/kwset.c (DEPTH_SIZE): New macro to anticipate
718 architectures/compilers where CHAR_BIT is not 8 (we assume it
719 won't be less than 4, which would be non-standard and unlikely).
720 Checked to hold for CHAR_BIT up to 1023 (and maybe more)!
721 * src/kwset.c (kwsincr): Use DEPTH_SIZE in two array declarations.
722
723 * src/kwset.c (kwsincr): When a second obstack_alloc() call fails,
724 free what the first one successfully allocated by popping it
725 off the top of the obstack, before returning in error, just
726 to keep things clean.
727 * src/kwset.c (kwsprep): Verify return value of obstack_alloc()
728 and return a memory exhausted error if so. This function had
729 a prototype to return such errors, but never did.
730
7312005-07-04 Charles Levert <[email protected]>
732
733 * src/kwset.c: Readability changes.
734 Replace uses of 0 for pointer values by NULL.
735 Generalize use of existing U() macro to whole file.
736
737 * src/kwset.c (kwsprep): Use memset() and memcpy() when appropriate.
738
739 * src/kwset.c (kwsprep): Move three variable declarations to
740 the single {}-block where they are used.
741
742 * src/kwset.c (kwsprep): Optimize search for mind2 value by
743 starting from the end of the target[] array.
744
7452005-06-22 Charles Levert <[email protected]>
746
747 * grep/autogen.sh, grep/src/Makefile.am, grep/tests/backref.sh,
748 grep/tests/bre.sh, grep/tests/empty.sh, grep/tests/ere.sh,
749 grep/tests/file.sh, grep/tests/fmbtest.sh, grep/tests/foad1.sh,
750 grep/tests/khadafy.sh, grep/tests/options.sh,
751 grep/tests/spencer1.sh, grep/tests/spencer2.sh,
752 grep/tests/status.sh, grep/tests/warning.sh: As per autoconf's
753 "Portable Shell Programming" guidelines, replace all instances
754 of "#!/bin/sh" by "#! /bin/sh" (notice the space).
755
7562005-06-21 Charles Levert <[email protected]>
757
758 * src/grep.c (nlscan): Make this function more robust by removing
759 the undocumented assumption that its "lim" argument points
760 right after a line boundary. This will be used later to fix
761 --byte-offset's broken behavior. Patch #3769.
762
763 * src/grep.c (main): Add a test to check if -o/--only-matching
764 and context lines are both specified and if so, set both context
765 specifications (before and after) to zero then print an explicit
766 warning to stderr explaining what was done and why (as opposed
767 to drastically aborting the process in error). Patch #3768.
768 Other code needs this zero setting to work correctly without
769 having to repeatedly test for this conflictual condition.
770
771 * tests/foad1.sh: Add tests combining -o, -n/-b/-H, and -i,
772 since there are separate code paths for -i. Add tests combining
773 -o, -n/-b/-H, and -3, since any context line specification
774 should be ignored when combined with -o.
775 * src/grep.c (print_line_head): New function, culled off the
776 top content of prline(). Adds a guard against "lastnl" having
777 already reached "lim", which can happen when if the function
778 is called more than once per line.
779 * src/grep.c (prline): Now calls print_line_head(), not only at
780 the beginning to replace the moved code when -o is not
781 specified, but also for each match when -o is specified (two
782 code paths with this). Patch #3770, more or less. This makes
783 all tests combining -o and -n/-b/-H pass, which they didn't
784 before. Fixes bug #12727.
785
786 * src/grep.c (SEP_CHAR_MATCH, SEP_CHAR_CONTEXT, SEP_STR_CHUNK):
787 New macros for ':', '-', and "--". Used throughout the file.
788 Will be used even more in upcoming updates, so good to have now.
789
790 * src/grep.c: The new GREP_COLORS (plural) framework, only
791 partially used at this point to make for a simpler initial
792 patch in CVS. A subset of patch #3644 on Savannah.
793 * src/grep.c (color_cap_ne_fct, color_cap_xm_fct, print_filename,
794 print_sep, parse_grep_colors): New functions.
795 * src/grep.c (prtext, grepfile, main): Existing functions modified
796 to use the new framework.
797 * doc/grep.texi, doc/grep.1: Document GREP_COLORS.
798
799 * src/grep.c: The new -T/--initial-tab framework, only
800 partially used at this point to make for a simpler initial
801 patch in CVS. A subset of patch #3644 on Savannah.
802 The option name/calling convention is the same as for GNU diff.
803 * doc/grep.texi, doc/grep.1: Document -T/--initial-tab.
804
805 * src/grep.c (print_offset): Renamed print_offset_sep() to better
806 represent its new functionality; new calling convention.
807 * src/grep.c (print_offset, print_line_head): Use and implement
808 missing parts of the GREP_COLORS and -T/--initial-tab frameworks.
809
810 * src/grep.c (print_line_middle, print_line_tail): New functions,
811 unused for now, intended to allow a simplifying rewrite of
812 prline(). Adding them first will make for cleaner CVS patches.
813
814 * src/grep.c (prline): Simplifying rewrite using
815 print_line_middle() and print_line_tail(). No longer attempts
816 to find matches to colorize in context lines, thus avoiding
817 costly calls to (*execute)(), since we know by then that they
818 can't contain any by definition. There are no longer four
819 different code paths whether -o and -i are each specified
820 or not; they have been unified into one, which should help
821 avoid bugs similar to previous ones due to not updating all
822 code paths in a synchronized fashion. The -i code has been
823 explicitly marked since it doesn't belong there and should
824 be removed as soon as other -i code elsewhere is fixed.
825 The remaining GREP_COLORS functionality is implemented.
826 Savannah patch #3771 and patch #3644, heavily reworked.
827
828 * src/grep.c (color_cap_ne_fct, color_cap_xm_fct,
829 print_line_middle, print_line_tail): Make these four functions
830 static.
831
8322005-06-20 Charles Levert <[email protected]>
833
834 * src/grep.c: Extensively document the SGR/EL-to-Right issue.
835
836 * src/grep.c: Explain the context and logic for choosing default
837 --color screen attributes (SGR parameters).
838
8392005-06-15 Charles Levert <[email protected]>
840
841 * tests/foad1.sh: Since this script is run by /bin/sh, it
842 must work under posix mode. That means not using assignment
843 statements right before a function call (LC_ALL=... grep_test,
844 in this case), because it won't do the expected thing.
845
8462005-06-14 Charles Levert <[email protected]>
847
848 Fix bug #11022 (Line wrapping causes GREP_COLOR background
849 color to "smear") by outputting a "clear to end of line"
850 control sequence after each SGR (Select Graphic Rendition)
851 control sequence (START and END). This also avoid similar
852 problems with HT (tab) characters.
853
854 * src/grep.c (SGR_START, SGR_END, PR_SGR_FMT, PR_SGR_FMT_IF,
855 PR_SGR_START, PR_SGR_END, PR_SGR_START_IF, PR_SGR_END_IF):
856 New macros.
857 * src/grep.c (prline): Use the new macros.
858 * tests/fmbtest.sh, tests/foad1.sh: Adjust the regression tests
859 to expect the new control sequences.
860
8612005-05-06 Charles Levert <[email protected]>
862
863 * TODO: Add a few more projects and derived versions to check out.
864
8652005-05-05 Charles Levert <[email protected]>
866
867 * README-alpha: Document grep-commit mailing list.
868 * TODO: Add various stuff culled from the mailing list.
869
8702005-05-02 Charles Levert <[email protected]>
871
872 * 78 files: Update FSF's civic address, zip code,
873 and citizen relocation code.
874
8752005-04-29 Charles Levert <[email protected]>
876
877 * tests/foad1.sh: Add -b and tricky UTF-8 tests.
878 Display LC_ALL when its value is special. Patch #3962.
879
880 * ABOUT-NLS: Sync with CVS revision 1.9
881 of 2005-04-13T11:21:55Z from GNU gettext
882 on ":pserver:[email protected]:/cvs/gettext",
883 file "gettext/gettext-runtime/ABOUT-NLS".
884
8852005-04-29 Julian Foad <[email protected]>
886
887 * Makefile.am: Remove reference to long-gone files PATCHES.AC and
888 PATCHES.AM. Thanks to Tony Abou-Assaleh for this. Patch #3961.
889
8902005-04-29 Charles Levert <[email protected]>
891
892 * src/grep.c: Fix typo in prline()'s --only-matching --ignore-case
893 code path; this fixes bug #9768 and passes one more test
894 in tests/foad1.sh. This whole code path should be removed in
895 the future, when other --ignore-case issues are dealt with.
896
8972005-04-28 Julian Foad <[email protected]>
898
899 * tests/foad1.sh: Remove Bash-specific syntax.
900
901 * src/dfa.c: Fix a DFA bug whereby a bracket "[" was matched by the
902 pattern "[[:alpha:]]" in UTF-8 locales. Patch #3800, by Tim Waugh.
903 * tests/foad1.sh: Add a regression test for that.
904
9052005-04-27 Julian Foad <[email protected]>
906
907 Fix a bug reported by Elliott Hughes in patch #1834 whereby "grep -Fw"
908 would miss matches after a non-word occurrence of the pattern. Fix by
909 Gordon Lack; tests based on reproduction recipes by Gordon Lack.
910
911 * src/search.c (Fexecute): Fix the "match_words" case.
912 * tests/foad1.sh: Modify the test framework so that the "PATTERN"
913 argument is optional. Add a regression test and a test for
914 a similar case that other proposed patches have got wrong.
915
916 Add more tests, some initially failing.
917
918 * tests/foad1.sh: Add tests for "--color", most initially failing.
919 * tests/fmbtest.sh: New file of tests for "grep -i" with multi-byte
920 chars, by Jakub Jelinek, from patch #3808: Red Hat's "tests" patch.
921 Initially, test #4 fails (in all three modes).
922 * tests/Makefile.am: Include the new tests file "fmbtest.sh".
923
9242005-04-12 Julian Foad <[email protected]>
925
926 * tests/bre.tests: Enable a regression test for bug #9519.
927 * src/grep.c: Fix a seg-fault in "-o -i": patch #1939.
928 * tests/foad1.sh: New tests for "-o", initially all failing.
929 * tests/Makefile.am: Include the new tests file "foad1.sh".
930 * tests/spencer2.sh: Be consistent with "spencer1.sh" in the
931 naming of associated files.
932 * src/grep.c: Fix off-by-one error in prpending().
933 Patch #3840 by Claudio Fontana.
934 * tests/foad1.sh: Add tests by Pavol Gono for patch #3840.
935 Some of them still fail, but no longer seg-fault due to that bug.
936
9372005-04-11 Julian Foad <[email protected]>
938
939 * doc/grep.texi, doc/grep.1: Document USG grep -s too.
940 Based on a patch by Paul Eggert; suggested by Keith Marshall.
941 * src/dfa.c (lex): Fix bug #9519: "echo do^re | grep do^re" was
942 failing to find a match.
943
9442005-03-09 Stepan Kasal <[email protected]>
945
946 * src/search.c (EGexecute, Fexecute): Use xmalloc, not malloc.
947 (EGexecute): Handle the failure in one place, goto there.
948
9492005-02-26 Stepan Kasal <[email protected]>
950
951 * src/grep.c (get_nondigit_option): Don't give up too early.
952 * src/search.c (Pexecute): Add a comment explaining that this
953 situation should not happen.
954
9552005-02-22 Claudio Fontana <[email protected]> (tiny change)
956
957 * src/search.c (Pexecute): Consider eof case when delimiting
958 matching line. Fixes bug #4531.
959
9602005-02-23 Julian Foad <[email protected]>
961
962 * po/ko.po: Fix email address.
963 * README-alpha: Fix email addresses and clarify the notes.
964 * tests/backref.sh: Fix trivial typos.
965
9662005-02-08 Bruno Haible <[email protected]> (tiny change)
967
968 * src/kwset.h (kwsincr, kwsprep): Change return type to 'const char *'.
969 * src/kwset.c (kwsincr, kwsprep): Likewise.
970
9712005-02-08 Arnold D. Robbins <[email protected]>
972 Stepan Kasal <[email protected]>
973
974 * src/mbsupport.h: Don't say the file is part of GAWK.
975 Make wording in explanatory comment more generic.
976
9772005-02-07 Stepan Kasal <[email protected]>
978
979 * src/grep.c: Document that -X is undocumented.
980
9812005-01-16 Bruno Haible <[email protected]> (tiny change)
982 Stepan Kasal <[email protected]>
983
984 * configure.in: Add tests for iswctype, mbrlen, wcrtomb, wcscoll;
985 use AC_FUNC_MBRTOWC to check for mbrtowc and mbstate_t; move
986 AC_MBSTATE_T below it.
987 * src/grep.c: Include mbsupport.h to define MBS_SUPPORT uniformly.
988 * src/mbsupport.h: Don't test for HAVE_WCTYPE_T.
989
9902005-01-13 Arnold D. Robbins <[email protected]>
991
992 * src/dfa.c (dfaparse): Use LC_COLLATE whenever it is defined;
993 ENABLE_NLS has nothing to do with this.
994
9952005-01-07 Stepan Kasal <[email protected]>
996
997 * tests/status.sh: Added two tests--option '-s' should have no
998 influence on the exit status.
999
10002004-12-16 Stepan Kasal <[email protected]>
1001
1002 Cosmetic changes, mostly imported from gawk:
1003
1004 * src/dfa.c (lexstart): Removed unused variable.
1005 (parse_bracket_exp_mb): Don't initialize different pointers in one
1006 assignment
1007 (lex): Don't initialize automatic arrays, it's invalid in pre-C89
1008 compilers.
1009 Various other typos.
1010 * src/dfa.h, src/grep.c, src/search.c: Typos.
1011
10122004-12-16 Isamu Hasegawa <[email protected]>
1013
1014 From http://oss.software.ibm.com/linux/patches/?patch_id=25
1015
1016 * src/search.c: Patch for i18n correctness.
1017 * src/grep.c: Likewise.
1018 * src/dfa.c: Likewise.
1019 * lib/regex.c: Likewise.
1020
10212004-12-15 Julian Foad <[email protected]>
1022
1023 Changes to documentation and help text, mostly from Stepan Kasal.
1024
1025 * doc/grep.texi: Minor fixes of phrasing.
1026 * doc/grep.1: Likewise.
1027 * src/grep.c: Likewise.
1028
10292004-12-01 Stepan Kasal <[email protected]>
1030
1031 * src/grep.c (usage): Use "FILE_PATTERN" for --include and --exclude,
1032 change "only print" to "print only".
1033 * doc/grep.1: Likewise; state that wildcard matching is used.
1034 Move some options so that they are sorted alphabetically.
1035 * dfa.c, NEWS: Fix typos.
1036
10372004-11-28 Benno Schulenberg <[email protected]> (tiny change)
1038
1039 * src/grep.c (usage): Clean up several details in the usage string.
1040 * doc/grep.1: Fix descriptions of --include and --exclude.
1041 * doc/grep.texi: Likewise.
1042
10432004-11-23 Stepan Kasal <[email protected]>
1044
1045 * src/Makefile.am: The egrep and fgrep script now use their own
1046 path to construct the full pathname of grep.
1047
10482004-11-23 Stepan Kasal <[email protected]>
1049
1050 * src/Makefile.am: Merged the rules for creating the egrep and
1051 fgrep script.
1052
10532004-11-23 Stepan Kasal <[email protected]>
1054
1055 * src/grep.c (usage): Make sure both copies of the "usage"
1056 strings match. Add "(C)" to the copyright notice.
1057 * src/dfa.c: Changed "out of memory" to "memory exhausted" to
1058 match messages elsewhere in the source.
1059
10602004-11-22 Stepan Kasal <[email protected]>
1061
1062 * src/search.c: Use mbsupport.h .
1063 * src/dfa.c: Move the inclusion of mbsupport.h lower.
1064
10652004-11-22 Stepan Kasal <[email protected]>
1066
1067 * src/grep.c (main): Use PACKAGE_STRING for --version.
1068
10692004-11-20 Benno Schulenberg <[email protected]> (tiny change)
1070
1071 * src/grep.c (reset): Move the stat check ...
1072 (grepfile): ... here, and also check for a fifo.
1073
10742004-11-20 Stepan Kasal <[email protected]>
1075
1076 This change is based on a suggestion by Elliott Hughes.
1077
1078 * src/grep.c (usage): Use PACKAGE_BUGREPORT.
1079 * po/*.po: Hacked the current translation again.
1080
10812004-11-20 Stepan Kasal <[email protected]>
1082
1083 * configure.in: Added a copyright notice (using gawk as a template).
1084 (AC_INIT, AM_INIT_AUTOMAKE): Changed to the "new" form so that
1085 the PACKAGE_* symbols get defined correctly in config.h.
1086
10872004-11-20 Stepan Kasal <[email protected]>
1088
1089 * ./cvsignore: Amended several .cvsignore files and
1090 removed *.gmo, acinclude.m4 and stamp-h.in from the root one.
1091 * m4/init.m4: Nuked, it was breaking current automake.
1092 * m4/Makefile.m4: Removed init.m4.
1093 * autogen.m4: Drop support for legacy autoconf; tell whether the
1094 auto tools exited successfully or not; fix the permissions of
1095 tests/*.sh--CVS doesn't provide a way to fix it.
1096
10972004-11-19 Stepan Kasal <[email protected]>
1098
1099 * src/dfa.c: Removed old version of gofast patch, from 2003-05-30.
1100 * src/search.c (check_multibyte_string): Likewise.
1101
11022004-11-19 Stepan Kasal <[email protected]>
1103
1104 * src/dfa.c: Added some simple changes from gawk.
1105 * src/mbsupport.h: Imported from gawk.
1106
11072004-11-11 Stepan Kasal <[email protected]>
1108
1109 * tests/spencer1.awk: Use only lines with 3 fields.
1110 * tests/spencer1.tests: Disable #55 for now.
1111 * tests/ere.tests, tests/bre.tests: Add "TO CORRECT" to disabled
1112 tests which had empty $4.
1113 * tests/backref.sh: Modify #2 so that current glibc regex can
1114 handle it in finite time.
1115
11162004-11-12 Stepan Kasal <[email protected]>
1117
1118 Change bug-gnu-utils address to bug-grep, on many places; there
1119 is no need to have the word "grep" in subject then.
1120 Thanks to Tony Abou-Assaleh and Benno Schulenberg for pointing
1121 out this.
1122
11232004-11-02 Stepan Kasal <[email protected]>
1124
1125 * README-alpha: Remove obsolete instructions about CVS, redirect
1126 the reader to savannah web.
1127
11282004-09-26 Stepan Kasal <[email protected]>
1129
1130 * src/search.c (check_multibyte_string, Gcompile, Ecompile): Replace
1131 malloc with xmalloc.
1132 * src/dfa.c (dfamust): Replace two calls to 'malloc' by MALLOC.
1133
11342003-07-23 Stepan Kasal <[email protected]>
1135
1136 * src/Makefile.am: Add the egrep and fgrep scripts to CLEANFILES.
1137
11382003-07-23 Stepan Kasal <[email protected]>
1139 * tests/backref.sh: Messages fixed.
1140
11412003-07-08 David Kaelbling <[email protected]> (tiny change)
1142 * src/dfa.c: remove non-constant initializers from dfa.c
1143
11442003-06-16 Stepan Kasal <[email protected]>
1145 * doc/grep.1: two typos "--line-buffered [...] penalty"
1146 * doc/grep.texi: a typo
1147
11482003-06-12 Bernhard Rosenkraenzer <[email protected]>
1149 * README-alpha: Mention bug tracking system and grep-devel-list
1150 * tests/spencer1.tests: Fix test 55, as noted by Tim Waugh
1151 * src/search.c: Speed up multibyte support (Patch from Tim Waugh)
1152
11532003-06-05 Stepan Kasal <[email protected]>
1154 * tests/formatbre.awk, tests/formatere.awk: probably unused, so
1155 I've removed them.
1156
11572003-06-05 Stepan Kasal <[email protected]>
1158 * intl/Makefile: remove generated file.
1159
11602003-06-04 Stepan Kasal <[email protected]>
1161 * src/dfa.c: typos fixed.
1162
11632003-05-30 Bernhard Rosenkraenzer <[email protected]>
1164 * src/dfa.c: Speed up multibyte support (Patch from Tim Waugh)
1165
11662003-01-18 Bernhard Rosenkraenzer <[email protected]>
1167 * src/grep.c: Fix -i -o combination (Patch from Tim Waugh)
1168
11692002-03-26 Bernhard Rosenkraenzer <[email protected]>
1170
1171 * 2.5.1 Release.
1172
11732002-03-26 Bernhard Rosenkraenzer <[email protected]>
1174 * src/grep.c: Don't fail if we don't have an stdout fd and -q
1175 is used (happens e.g. on calls from hotplug scripts)
1176 * src/grep.c: Don't hang forever if fed with an empty string to
1177 grep for and --color enabled
1178 * src/grep.c: Fix infinite loop on
1179 echo "1 one" | grep -E "[0-9]*" -o
1180 echo "1 one" | grep -E "[0-9]*" --color
1181 * po/*: Sync with translation project
1182 * src/grep.c, src/Makefile.am, configure.in: Add patch from
1183 Paul Eggert <[email protected]> to comply with ridiculous
1184 guidelines (don't act differently if invoked as egrep or fgrep)
1185 * configure.in: Bump version number, require a recent autoconf
1186
11872002-03-14 Bernhard Rosenkraenzer <[email protected]>
1188 * src/Makefile.am, po/Makefile.in.in: Support DESTDIR properly
1189 * tests/bre.tests: Add fix from
1190 Peter Breitenlohner <[email protected]>
1191
11922002-03-13 Bernhard Rosenkraenzer <[email protected]>
1193 * configure.in, m4/regex.m4, m4/malloc.m4, m4/realloc.m4:
1194 Don't set LIBOBJS directly, autoconf 2.53 doesn't like it
1195 * intl/*: Sync with gettext 0.11
1196 * po/*: Sync with translation project
1197 * configure.in, src/Makefile.am: Don't duplicate code - make
1198 egrep and fgrep links to grep and set matcher based on
1199 application name, suggestion from
1200 Guillaume Cottenceau <[email protected]>
1201 * src/grep.c: (prline) Add fix for -i --color from
1202 Jim Meyering <[email protected]>
1203 * configure.in: Version 2.5; release
1204
12052002-01-23 Bernhard Rosenkraenzer <[email protected]>
1206 * configure.in: Version 2.5g
1207 * Makefile.cvs, grep.spec: Add packaging tools
1208 Merge djgpp changes from Andrew Cottrell <[email protected]>:
1209 * src/grep.c: Added conditional compilation for DJGPP
1210 * djgpp: remove directory as it is no longer required with DJGPP 2.03
1211 (or 2.04 when released)
1212 * README.DOS: Moved djgpp/readme to readme.dos
1213 * PATCHES.AC, PATCHES.AM: delete files - redundant
1214 * configure.in, Makefile.am: remove djgpp directory from list
1215
12162002-01-22 Bernhard Rosenkraenzer <[email protected]>
1217 * doc/grep.texi, doc/grep.1, NEWS: Document --label
1218 * po/ru.po: Sync with translation project
1219 * po/grep.pot: Sync with source
1220
12212002-01-18 Bernhard Rosenkraenzer <[email protected]>
1222 * src/grep.c: Add --label, based on patch from Stepan Koltsov
1223
12242001-11-20 Bernhard Rosenkraenzer <[email protected]>
1225 * autogen.sh: Don't hardcode aclocal dir
1226
12272001-11-19 Bernhard Rosenkraenzer <[email protected]>
1228 * src/grep.c: Add --only-matching (-o) switch (see NEWS)
1229 * doc/grep.texi, doc/grep.1, NEWS: Document changes
1230 * configure.in, lib/Makefile.am: Don't use internal getopt if
1231 we're on a system that provides a working getopt function
1232
12332001-09-25 Bernhard Rosenkraenzer <[email protected]>
1234 * configure.in: Detect pcre correctly even when it's in
1235 non-standard locations, using pcre-config
1236 * src/grep.c: Add --color={always,never,tty} argument (like in ls)
1237 * src/grep.c: Turn off blinking in the default colorization
1238 * src/grep.c: Add --devices (-D) switch (analogous to --directories)
1239 * src/dfa.c: Fix an i18n bug: echo "A" | grep '[A-Z0-9]' wouldn't work
1240 in non-C-Locales on systems using current versions of glibc.
1241 * AUTHORS: Change maintainer, credit Alain for his work until now
1242 * configure.in, m4/decl.m4, m4/dosfile.m4, m4/gettext.m4,
1243 m4/init.m4, m4/install.m4, m4/largefile.m4, m4/lcmessage.m4,
1244 m4/header.m4, m4/isc-posix.m4, m4/missing.m4, m4/progtest.m4,
1245 m4/sanity.m4:
1246 Fix build with autoconf 2.5x, retain 2.1x compatibility for now
1247 * autogen.sh: Add some crude hacks to make it possible to build with
1248 both autoconf 2.5x and 2.1x
1249 * acconfig.h: removed (no longer required)
1250 * Makefile.am: add cvs-clean target
1251 * doc/grep.texi, doc/grep.1, NEWS: Document changes
1252 (--color, --devices, -D)
1253 * src/dfa.c, src/grep.c: Add vim modelines
1254
12552001-08-30 Alain Magloire
1256
1257 * configure.in: Add gl in ALL_LINGUAS.
1258
12592001-08-30 Kurt D Schwehr
1260
1261 * doc/grep.1: Warn that grep insert a "--" between groups of matches,
1262 when using the context options.
1263 * doc/grep.texi: Likewised.
1264
12652001-08-25 Heikki Korpela
1266
1267 * doc/grep.texi: Point out that some Platforms do not support
1268 reading of directories and silently ignore them.
1269
12702001-08-21 Alain Magloire
1271
1272 * lib/malloc.c: New file:
1273 * lib/realloc.c: New file:
1274 * lib/Makefile.am: Add malloc.c and realloc.c in EXTRA_DIST.
1275
12762001-07-31 Alain Magloire
1277
1278 * po/*.po: New files from the translation team:
1279 grep-2.5e.de.po grep-2.5e.el.po grep-2.5e.eo.po grep-2.5e.es.po
1280 grep-2.5e.et.po grep-2.5e.fr.po grep-2.5e.gl.po grep-2.5e.it.po
1281 grep-2.5e.pl.po grep-2.5e.sl.po
1282
12832001-07-31 Andreas Schwab
1284
1285 * src/grep.c: Fix all uses of error to pass a proper format
1286 string.
1287
12882001-07-29 Alain Magloire
1289
1290 * grep/src/grep.c (usage): Typos corrected.
1291 Patches from Santiago Vila.
1292
12932001-07-29 Alain Magloire
1294
1295 David Clissold, wrote:
1296 a small bug in the GNU grep 2.4.2, which may have gone unnoticed
1297 because it only causes a failure if building on a system with large
1298 files enabled (e.g. an "off_t" is a "long long" rather than a "long").
1299 savedir() takes on off_t argument, but in grepdir() the parameter
1300 is cast to an (unsigned). Well, if an off_t is larger than an int,
1301 the value gets truncated. This would not normally have an effect on a
1302 little-endian platform (unless the file is >2GB), but on a big-endian
1303 system it will always fail. The external effect is that
1304 "grep -r foo dir_name" fails with ENOMEM (from malloc() within
1305 savedir()).
1306
1307 * grep/src/grep.c (grepdir): Remove the (unsigned) cast when calling
1308 savedir().
1309 Patch from David Clissold.
1310
13112001-07-29 Alain Magloire
1312
1313 * grep/doc/grep.texi: In Bugs report use {n,m} for consistency.
1314 * grep/doc/grep.1: Likewised.
1315 Noted by Steven Lucy.
1316
13172001-04-27 Isamu Hasegawa
1318
1319 * dfa.c (mblen_buf) : New variable contains the amount of remain
1320 byte of corresponding multibyte character in the input string.
1321 (SKIP_REMAIN_MB_IF_INITIAL_STATE) : Use mblen_buf.
1322 (match_anychar) : Use mblen_buf.
1323 (match_mb_charset) : Use mblen_buf.
1324 (transit_state_consume_1char) : Use mblen_buf.
1325 (transit_state) : Use inputwcs to get current (multibyte) character.
1326 (dfaexec) : Add initialization of mblen_buf.
1327
13282001-04-27 Isamu Hasegawa
1329
1330 * dfa.c (addtok) : Set appropriate value to multibyte_prop.
1331 (dfastate) : Add the initialization of the variable.
1332 (dfaexec) : Call transit_state if d->fail may transit by
1333 multibyte characters.
1334 (transit_state_singlebyte) : Clean up unnecessary code.
1335 (transit_state_consume_1char) : Likewise.
1336 (transit_state) : Add checking for word and newline.
1337
13382001-04-19 Isamu Hasegawa
1339
1340 * search.c (check_multibyte_string) : Check the case when mbclen == 0.
1341
13422001-04-11 Isamu Hasegawa
1343
1344 * search.c (check_multibyte_string) : Check the head of multibyte
1345 characters, and optimize a bit.
1346 (EGexecute) : Optimize a bit.
1347 (Fexecute) : Fix the index.
1348
13492001-04-02 Alain Magloire
1350
1351 * lib/regex.c: Update from GNU lib C, with the changes
1352 provided by Paul Eggert.
1353 * lib/posix/regex.h: Likewise.
1354
13552001-02-17 Paul Eggert
1356
1357 Stop trying to support hosts that have nonstandard declarations for
1358 mbrtowc and/or mbstate_t. It's not worth the portability hassle.
1359
1360 * lib/quotearg.c (mbrtowc, mbsinit): Remove workaround macros
1361 for hosts that have mbrtowc but not mbstate_t, as we now
1362 insist on proper declarations for both before using mbrtowc.
1363
13642001-03-18 Alain Magloire
1365
1366 * configure.in: Call AC_MBSTATE_T.
1367 * Makefile.am: Add mbstate_t.m4
1368 * m4/Makefile.am: Add mbstate_t.m4
1369 * m4/mbstate_t.m4: New m4 macro.
1370 * lib/strtol.c: Define CHAR_BITS.
1371 Uwe H. Steinfeld, Ruslan Ermilov, Volkert Bochert, noted
1372 that mbstate_t was not define for certain platforms.
1373
13742001-03-18 Paul Eggert
1375
1376 * src/grep.c (fillbuf): Fix storage allocation performance
1377 bug: buffer was doubling in size in many cases where it didn't
1378 have to.
1379
13802001-03-17 Paul Eggert
1381
1382 * src/grep.c (fillbuf): Avoid unnecessary division by 2.
1383 Don't check xrealloc return value; it's guaranteed to be nonzero.
1384 (fillbuf, grepdir): Use xalloc_die rather than error; it's shorter.
1385
13862001-03-17 Alain Magloire
1387
1388 * src/grep.c (context_length_arg): error () passing wrong format.
1389 Spotted by Jim Meyering.
1390
13912001-03-07 Alain Magloire
1392
1393 * README-alpha: Removed reference to GNU tar, add the location
1394 of the CVSROOT.
1395
13962001-03-06 Alain Magloire
1397
1398 Only the Regex patterns should be split in an array, patterns[].
1399 The dfa and KWset compiled patterns should remain global and the
1400 patterns compiled all at once.
1401
1402 * src/search.c: include "error.h" and "xalloc.h" to get prototyping
1403 of x*alloc() and error().
1404 (kwsinit): Reverse to previous behaviour and takes no argument.
1405 (kwsmusts): Likewised.
1406 (Gcompile): For the regex pattern, split them and each pattern
1407 is put in different compiled structure patterns[]. The patterns
1408 are given to dfacomp() and kwsmusts() as is.
1409 (Ecompile): Likewised.
1410 (Fcompile): Reverse to the old behaviour of compiling the enire
1411 patterns in one shot.
1412 (EGexecute): If falling to GNU regex for the matching, loop in the
1413 array of compile patterns[] to find a match.
1414 (error): Many error () were call with arguments in the wrong order.
1415 * tests/file.sh: Simple test to check for pattern in files.
1416
1417 Reaction to bug report fired by Greg Louis <[email protected]>
1418
14192001-03-06 Isamu Hasegawa
1420
1421 In multibyte environments, handle multibyte characters as single
1422 characters in bracket expressions.
1423
1424 * src/dfa.h (mb_char_classes) : new structure.
1425 (mbcsets): new variable.
1426 (nmbcsets): new variable.
1427 (mbcsets_alloc) : new variable.
1428 * src/dfa.c (prtok) : handle MBCSET.
1429 (fetch_wc): new function to fetch a wide character.
1430 (parse_bracket_exp_mb) : new function to handle multibyte character
1431 in lex().
1432 (lex): invoke parse_bracket_exp_mb() for multibyte bracket expression.
1433 (atom): handle MBCSET.
1434 (epsclosure): likewise.
1435 (dfaanalyze): likewise.
1436 (dfastate): likewise.
1437 (match_mb_charset): new function to judge whether a bracket match
1438 with a multibyte character.
1439 (check_matching_with_multibyte_ops) : handle MBCSET.
1440 (dfainit): initialize new variables.
1441 (dfafree): free new variables.
1442
14432001-03-04 Alain Magloire
1444
1445 To get more in sync with other GNU utilities like GNU tar and fetish
1446 all the supporting functions are now under lib.
1447 Thanks to Jim Meyering, Volkert Bochert and Paul Eggert for
1448 the code and the reminders.
1449
1450 * src/grep.c (fatal): Function removed, using error () from
1451 lib/error.c instead.
1452 (usage): Copyright updated.
1453 (error): Function removed, using error () from lib/error.c instead,
1454 adjust prototypes.
1455 (prog): Global variable rename to program_name, to work with new
1456 lib/error.c.
1457 (xrealloc): Removed using lib/xmalloc.c.
1458 (xmalloc): Removed using lib/xmalloc.c
1459 (main): Register with atexit() to check for error on stdout.
1460 * configure.in: Check for atexit(), call jm_MALLOC, jm_RELLOC and
1461 jm_PREREQ_ERROR.
1462 * tests/bre.awk: Removed the hack to drain the buffer since we
1463 always fclose(stdout) atexit.
1464 * tests/ere.awk: Likewise.
1465 * tests/spencer1.awk: Likewise.
1466 * bootstrap/Makefile.try: Update the Makefile to reflect the changes
1467 in the new hierarchy.
1468
1469 * README-alpha: New File.
1470 * m4/realloc.m4: New File.
1471 * m4/malloc.m4: New File.
1472 * m4/error.m4: New File.
1473 * m4/Makefile.am: Updated.
1474 * lib: New directory.
1475 * lib/Makefile.am: New file.
1476 * lib/closeout.c: New file.
1477 * lib/closeout.h: New file.
1478 * lib/fnmatch.c: New file.
1479 * lib/fnmatch.h: New file.
1480 * lib/atexit.c: New file.
1481 * lib/error.c: New file.
1482 * lib/error.h: New file.
1483 * lib/quotearg.h: New file.
1484 * lib/quotearg.c: New file.
1485 * lib/xmalloc.c: New file.
1486 * lib/posix: New directory.
1487 * lib/posix/Makefile.am: New file.
1488 * src/getopt.c: Moved to lib.
1489 * src/getopt1.c: Moved to lib.
1490 * src/getopt.h: Moved to lib.
1491 * src/alloca.c: Moved to lib.
1492 * src/exclude.c: Moved to lib.
1493 * src/exclude.h: Moved to lib.
1494 * src/hard-locale.h: Moved to lib.
1495 * src/hard-locale.c: Moved to lib.
1496 * src/isdir.c: Moved to lib.
1497 * src/mechr.c: Moved to lib.
1498 * src/obstack.c: Moved to lib.
1499 * src/obstack.h: Moved to lib.
1500 * src/regex.c: Moved to lib.
1501 * src/regex.h: Moved to lib.
1502 * src/posix: Moved to lib.
1503 * src/posix/regex.h: Moved to lib.
1504 * src/savedir.h: Moved to lib.
1505 * src/savedir.c: Moved to lib.
1506 * src/stpcpy.c: Moved to lib.
1507 * src/strtoul.c: Moved to lib.
1508 * src/strtol.c: Moved to lib.
1509 * src/strtoull.c: Moved to lib.
1510 * src/strtoumax.c: Moved to lib.
1511 * src/xstrtol.c: Moved to lib.
1512 * src/xstrtol.h: Moved to lib.
1513 * src/xstrtoumax.c: Moved to lib.
1514
15152001-03-01 Isamu Hasegawa
1516
1517 Implement the mechanism to match with multibyte characters,
1518 and use it for 'period' in multibyte environments.
1519
1520 * dfa.h (mbps): new variable.
1521 * dfa.c (prtok): handle ANYCHAR.
1522 (lex): use ANYCHAR for 'period' in multibyte environments.
1523 (atom): handle ANYCHAR.
1524 (state_index): initialize mbps in multibyte environments.
1525 (epsclosure): handle ANYCHAR.
1526 (dfaanalyze): handle ANYCHAR.
1527 (dfastate): handle ANYCHAR.
1528 (realloc_trans_if_necessary): new function.
1529 (transit_state_singlebyte): new function.
1530 (match_anychar): new function.
1531 (check_matching_with_multibyte_ops): new function.
1532 (transit_state_consume_1char): new function.
1533 (transit_state): new function.
1534 (dfaexec): invoke transit_state if expression can match with
1535 a multibyte character in multibyte environments.
1536 (dfamust): handle ANYCHAR.
1537
15382001-03-01 Alain Magloire
1539
1540 * src/exclude.c: New file.
1541 * src/exclude.h: New file.
1542 * src/grep.c (main): Took the GNU tar code to handle
1543 the option --include, --exclude, --exclude-from.
1544 Files are check for a match, with exlude_filename ().
1545 New option --exclude-from.
1546 * src/savedir.c: Call exclude_filename() to check for
1547 file pattern exclusion or inclusion.
1548 * configure.in: --disable-pcre rename to --disable-perl-regexp.
1549
1550
15512001-02-25 Alain Magloire
1552
1553 * src/dfa.c: Typo corrected.
1554 Noted by Isamu Hasegawa.
1555 * src/savedir.c: Typos corrected.
1556
15572001-02-22 Alain Magloire
1558
1559 * src/savedir.c (isdir1): New function, calling isdir with
1560 the correct pathname.
1561
15622001-02-19 Isamu Hasegawa
1563
1564 Avoid incorrect state transition in multibyte environments.
1565
1566 * dfa.h (nmultibyte_prop): new variable.
1567 (multibyte_prop): new variable.
1568 * dfa.c (addtok): set inputwcs.
1569 (dfastate): avoid incorrect state transition in multibyte
1570 environments.
1571 (dfaexec): likewise.
1572 (dfainit): init multibyte_prop.
1573 (dfafree): free multibyte_prop.
1574 (inputwcs): new variable.
1575
15762001-02-19 Isamu Hasegawa
1577
1578 Handle a multibyte character followed by '*', '+', and '{n,m}'
1579 correctly.
1580
1581 * dfa.c (update_mb_len_index): new function.
1582 Support for multibyte string.
1583 (FETCH): call update_mb_len_index.
1584 (lex): check cur_mb_index not to misunderstand multibyte characters.
1585 (atom): make a tree from a multibyte character.
1586 (dfaparse): initialize new variables.
1587 (mbs): new variable.
1588 (cur_mb_len): new variable.
1589 (cur_mb_index): new variable.
1590
15912001-02-18 Jim Meyering
1592
1593 * m4/dosfile.m4 (AC_DOSFILE): Move AC_DEFINEs out of AC_CACHE_CHECK.
1594
15952001-02-17 Alain Malgoire
1596
1597 * doc/grep.texi: Document the new options and the new behaviour
1598 back-references are local. Use excerpt from Karl Berry regex
1599 texinfo.
1600
1601 * bootstrap/Makefile.try: Added xstrtoumax.o xstrtoul.o hard-local.o
1602
16032001-02-17 Alain Magloire
1604
1605 From Guglielmo 'bond' Bondioni :
1606 The bug was that using a multi line file that contained REs (one per
1607 line), backreferences in the REs were considered global (to the file)
1608 and not local (to the line).
1609 That is, \1 in line n refers to the first \(.\) in the whole file,
1610 rather than in the line itself.
1611
1612 From Tapani Tarvainen :
1613 # Re: grep -e '\(a\)\1' -e '\(b\)\1'
1614 That's not the way it should work: multiple -e arguments
1615 should be treated as independent patterns and back references
1616 should not refer to previous ones.
1617
1618 From Paul Eggert :
1619 GNU grep currently does not issue
1620 diagnostics for the following two cases, both of which are erroneous:
1621 grep -e '[' -e ']'
1622 grep '[
1623 ]'
1624 POSIX requires a diagnostic in both cases because '[' is not a valid
1625 regular expression.
1626
1627 To overcome those problems, grep no longer pass the concatenate
1628 patterns to GNU regex but rather compile each patterns separately
1629 and keep the result in an array.
1630
1631 * src/search.c (patterns): New global variable; a structure array
1632 holding the compiled patterns.
1633 Declare function prototypes to minimize error.
1634 (dfa, kswset, regexbuf, regs): Removed, no longer static globals, but
1635 rather fields in patterns[] structure per motif.
1636 (Fcompile): Alloc an entry in patterns[] to hold the regex.
1637 (Ecompile): Alloc an entry per motif in the patterns[] array.
1638 (Gcompile): Likewise.
1639 (EGexecute): Loop through of array of patterns[] for a match.
1640
16412001-02-17 Alain Magloire
1642
1643 From Bernd Strieder :
1644 # tail -f logfile | grep important | do_something_urgent
1645 # tail -f logfile | grep important | do_something_taking_very_long
1646 If grep does full buffering in these cases then the urgent operation
1647 does not happen as it should in the first case, and in the second case
1648 time is lost due to waiting for the buffer to be filled.
1649 This is clearly spoken not grep's fault in the first place, but libc's.
1650 There is a heuristic in libc that make a stream line-buffered only if a
1651 terminal is on the other end. This doesn't take care of the cases where
1652 this connection is somehow indirect.
1653
1654 * src/grep.c (line_buffered): new option variable.
1655 (prline): if line_buffered is set fflush() is call.
1656 (usage): line_buffered new option.
1657 Input from Paul Eggert, doing setvbuf() may not be portable
1658 and breaks grep -z.
1659
16602001-02-16 Alain Magloire
1661
1662 Patch from Isamu Hasegawa, for multibyte support.
1663 This patch prevent kwset_matcher from following problems.
1664 For example, in SJIS encoding, one character has the codepoint 0x895c.
1665 So the second byte of the character can match with '\' incorrectly.
1666 And in eucJP encoding, there are the characters whose codepoints are
1667 0xa5b9, 0xa5c8. On the other hand, there is one character whose
1668 codepoint is 0xb9a5. So 0xb9a5 can match with 2nd byte of 0xa5b9
1669 and 1st byte of 0xa5c8.
1670
1671 * configure.in: Add check for mbrtowc.
1672 * src/search.c (check_multibyte_string): new function.
1673 Support for multibyte string.
1674 (EGexecute): call check_multibyte_string when kwset is set.
1675 (Fexecute): call to check_multibyte_string.
1676 (MBS_SUPPORT): new macro.
1677 (MB_CUR_MAX): new macro.
1678
16792001-02-16 Alain Magloire
1680
1681 * djgpp/config.bat: Fix for 4dos.com.
1682 * m4/dosfile.m4 (HAVE_DOS_FILE_CONTENTS): Was not set.
1683 Bugs noted and patched by Juan Manuel Guerrero.
1684
16852001-02-16 Alain Magloire
1686
1687 A much requested feature, the possibility to select
1688 files when doing recurse :
1689 # find . -name "*.c" | xargs grep main {}
1690 # grep --include=*.c main .
1691 # find . -not -name "*.c" | xargs grep main {}
1692 # grep --exclude=*.c main .
1693
1694 * src/grep.c (short_options): -R equivalent to -r.
1695 (#ifdef) : Fix some inconsistencies in the use of #ifdefs, prefer
1696 #if defined() wen possible.
1697 (long_options): Add --color, --include and exclude.
1698 (Usage): Description of new options.
1699 (color): Rename color variable to color_option.
1700 Removed 'always|never|auto' arguments, not necessary for grep.
1701 (exclude_pattern): new variable, holder for the file pattern.
1702 (include_pattern): new variable, hoder for the file pattern.
1703 * src/savedir.c: Signature change, take two new argmuments.
1704 * doc/grep.texi: Document, new options.
1705 * doc/grep.man: Document, new options.
1706
17072001-02-09 Alain Magloire
1708
1709 * src/grep.c (long_options): Added equivalent to -r with -R.
1710 * src/grep.c (usage): added --color and --colour.
1711 Noted with patch from, H.Merijn Brand and Wichert Akkerman.
1712
17132001-02-09 Alain Magloire
1714
1715 Patch from Ulrich Drepper to provide hilighting.
1716
1717 * src/grep.c: New option --color.
1718 (color): New static var.
1719 (COLOR_OPTION): new constant.
1720 (grep_color): new static var.
1721 (prline): Now when color is set prline() will call the current matcher
1722 to find the offset of the matching string.
1723 * src/savedir.c: Take advantage of _DIRENT_HAVE_TYPE if supported.
1724 * src/search.c (EGexecute, Fexecute, Pexecute): Take a new argument
1725 when doing exact match for the color hiligting.
1726
17272000-09-01 Brian Youmans
1728
1729 * doc/grep.texi: Typo fixes.
1730
17312000-08-30 Paul Eggert
1732
1733 * doc/grep.texi (Usage): Talk about what "grep -r hello *.c"
1734 means.
1735
17362000-08-20 Paul Eggert
1737
1738 Handle range expressions correctly even when they match
1739 strings with two or more characters.
1740
1741 * src/dfa.h (CRANGE): New enum value. Comment fix.
1742
1743 * src/dfa.c: Include <locale.h> if HAVE_SETLOCALE.
1744 Include "hard-locale.h".
1745 (prtok): Print CRANGE.
1746 (hard_LC_COLLATE): New static var.
1747 (lex): Return CRANGE when parsing a character range in a hard locale.
1748 Don't use strcoll; it's no longer needed and wasn't correct anyway.
1749 Use unsigned rather than token to hold unsigned chars.
1750 (addtok): Comment fix.
1751 (atom): Treat a CRANGE as if it were (.\1), approximately.
1752 (dfaparse): Initialize hard_LC_COLLATE.
1753
1754 * src/Makefile.am (base_sources): Add hard-locale.c, hard-locale.h.
1755
1756 * src/hard-locale.c, src/hard-locale.h: New files, taken from
1757 textutils.
1758
17592000-08-20 Paul Eggert
1760
1761 * tests/Makefile.am (TESTS_ENVIRONMENT): Add LC_ALL=C, since
1762 some of the tests assume the C locale.
1763
17642000-08-16 Paul Eggert
1765
1766 * src/search.c (Gcompile, Ecompile): -x overrides -w, for
1767 consistency with fgrep. Don't assume that sizes fit in 'int'.
1768 Fix comments to match code.
1769
17702000-06-06 Paul Eggert
1771
1772 * src/grep.c (grepdir): Don't look at st_dev when testing for
1773 Mingw32 bug.
1774
17752000-06-05 Paul Eggert
1776
1777 Port to Mingw32, based on suggestions from Christian Groessler
1778 <[email protected]>.
1779
1780 * src/isdir.c: New file, taken from fileutils.
1781
1782 * src/Makefile.am (base_sources): Add isdir.c.
1783
1784 * src/grep.c (grepfile): Use isdir instead of doing it inline.
1785 (grepdir): Suppress ancestor check if the directory's inode and device
1786 are both zero, as that occurs only on Mingw32 which doesn't support
1787 inode or device.
1788
1789 * src/system.h (isdir): New decl.
1790 (is_EISDIR): Depend on HAVE_DIR_EACCES_BUG, not D_OK.
1791 Use isdir, not access.
1792
17932000-06-02 Paul Eggert
1794
1795 Problen noted by Gerald Stoller <[email protected]>
1796
1797 * src/grep.c (main): POSIX says that -q overrides -l, which
1798 in turn overrides the other output options. Fix grep to
1799 behave that way.
1800
18012000-05-27 Paul Eggert
1802
1803 Simplify and tune the buffer allocation strategy. Do not reserve a
1804 large save area: reserve only enough bytes to hold the residue, plus
1805 page alignment. Put a newline sentinel before the buffer, for speed
1806 when searching backwards for newline.
1807
1808 * src/grep.c (ubuffer, bufsalloc, PREFERRED_SAVE_FACTOR, page_alloc):
1809 Remove. All uses changed.
1810 (INITIAL_BUFSIZE): New macro.
1811 (reset, fillbuf): Use simpler buffer allocation strategy.
1812 (reset): Check for preposterously large pagesize that would cause
1813 later calculations to overflow.
1814 (fillbuf): Do not resize buffer if there's room at the end for
1815 at least one more page. This greatly increases performance when
1816 reading from non-regular files that contain no newlines.
1817 When growing the buffer, double its size instead of using a
1818 more complicated algorithm.
1819 (prtext, grep): Speed up by relying on the newline sentinel before the
1820 start of the buffer.
1821 (grep): When looking backwards for the last newline in a buffer,
1822 stop when we hit the residue, since it can't contain a newline.
1823 This avoids an O(N**2) algorithm when reading binary data from
1824 a pipe. Use a sentinel to speed up the backward search for newline.
1825 (nlscan): Undo previous change; it wasn't needed and just complicates
1826 and slows down the code a tad.
1827
18282000-05-24 Paul Eggert
1829
1830 Handle very large input counts better. Bug noted by Jim Meyering.
1831
1832 * src/grep.c (totalcc, totalnl): Use uintmax_t, not off_t.
1833 (add_count): New function.
1834 (nlscan, prline, grep): Use it to check line and byte count overflows.
1835 (nlscan, grep): Don't keep track of counts when not asked to; this
1836 avoids unnecessary overflow diagnostics.
1837 (print_offset_sep): Now takes args of type uintmax_t and char,
1838 not off_t and int.
1839
18402000-05-16 Paul Eggert
1841
1842 Problem reported by Bob Proulx <[email protected]>, this patch
1843 is base on his finding, with appropriate corrections.
1844
1845 * src/grep.c (main): Fix bug: -x and -w matched even when no
1846 patterns were specified.
1847 * tests/empty.sh: Test for -x and -w bug in grep 2.4.2.
1848
18492000-04-24 Paul Eggert
1850
1851 POSIX conformance fixes: grep -q now exits with status zero
1852 if an input line is selected, even if an error also occurs.
1853 grep -s no longer affects exit status.
1854
1855 * src/grep.c (suppress_errors): Move definition earlier so
1856 that suppressible_error can use it.
1857 (suppressible_error): New function.
1858 (exit_on_match): New var.
1859 (grepbuf): If exit_on_match is nonzero, exit with status zero
1860 immediately.
1861 (grep, grepfile, grepdir): Invoke suppressible_error.
1862 (main): -q sets exit_on_match.
1863
1864 * doc/grep.1, doc/grep.texi, NEWS:
1865 Document -q's behavior as required by POSIX.
1866
1867 * tests/status.sh:
1868 Test for -q and -s behavior as conforming to POSIX.
1869
18702000-04-20 Paul Eggert
1871
1872 * tests/Makefile.am (TESTS_ENVIRONMENT):
1873 Set GREP_OPTIONS to the empty string.
1874
18752000-04-20 Paul Eggert
1876
1877 * tests/status.sh: Fix typo: test -b -> test -r.
1878
18792000-04-20 Paul Eggert
1880
1881 * src/dfa.c (lex):
1882 Do not assume that [c] is equivalent to [c-c]; this isn't true
1883 if LC_COLLATE specifies that some characters are equivalent.
1884 (setbit_case_fold): New function.
1885 (lex): Use it to simplify the code a bit.
1886
18872000-04-17 Paul Eggert
1888
1889 Do CRLF munging only if HAVE_DOS_FILE_CONTENTS, instead of
1890 having it depend on O_BINARY (which leads to incorrect results
1891 on BeOS, VMS, and MacOS).
1892
1893 * bootstrap/Makefile.try (DEFS): Add -DHAVE_DOS_FILE_CONTENTS.
1894 * src/system.h (SET_BINARY): Define only if HAVE_DOS_FILE_CONTENTS.
1895 (O_BINARY): Do not define.
1896
1897 * m4/dosfile.m4: Define HAVE_DOS_FILE_CONTENTS if it appears we're
1898 using DOS.
1899
1900 * src/grep.c (undossify_input, fillbuf, dosbuf.c, prline, main):
1901 Depend on HAVE_DOS_FILE_CONTENTS, not O_BINARY, when handling CRLF
1902 matters.
1903 (grepfile, main): Depend on SET_BINARY, not O_BINARY, when
1904 handling binary files on hosts that care about text versus binary.
1905
19062000-04-17 Paul Eggert
1907
1908 * lib/getpagesize.h (getpagesize): Define to B_PAGE_SIZE if
1909 __BEOS__ is defined. Based on a fix by Bruno Haible
1910 <[email protected]>.
1911
19122000-04-17 Bruno Haible
1913
1914 * src/system.h [BeOS]: Ignore O_BINARY.
1915 * src/getpagesize.h [BeOS]: Define getpagesize() as B_PAGE_SIZE.
1916
19172000-04-10 Paul Eggert
1918
1919 * doc/grep.1, doc/grep.texi, NEWS: -C now requires an operand.
1920 * src/grep.c (short_options, long_options, main, usage): Likewise.
1921 (context_length_arg): Renamed from ck_atoi. Now reports an error
1922 and exits if the number is out of range for a context length.
1923 (get_nondigit_option): New function, which checks for overflow
1924 correctly, and which does not parse nonadjacent strings of digits
1925 into a single number.
1926 (main): Use get_nondigit_option instead of doing the code inline.
1927 With -A, -B, and -C, optarg is now guaranteed to be nonzero.
1928
19292000-04-08 Paul Eggert
1930
1931 Now that we know that the input is always terminated by a
1932 newline before the matching algorithms see it, clean up the
1933 matching algorithms so that they no longer need to modify the
1934 input by inserting a sentinel newline, and no longer worry
1935 about running off the end of the buffer due to a missing sentinel.
1936
1937 * src/grep.c (nlscan, prpending, prtext, grepbuf): Do not
1938 worry about running off the end of the input buffer, since
1939 it's now guaranteed to end in the sentinel newline.
1940 * src/search.c (EGexecute, Pexecute): Likewise.
1941
1942 * src/dfa.c (prtok, dfasyntax, dfaparse, copy, merge, state_index,
1943 epsclosure, dfaexec, dfacomp):
1944 Change many instances of "T *" to "T const *", to catch
1945 any inadvertent programming errors made during this conversion.
1946 * src/dfa.h (dfacomp, dfaexec, dfaparse): Likewise.
1947 * src/grep.c (struct stats.parent, long_options, grepdir,
1948 compile, execute, fillbuf, lastnl, lastout, nlscan, prline,
1949 prpending, prtext, grepbuf, grep, grepfile, grepdir): Likewise.
1950 * src/grep.h (struct matcher.compile, struct matcher.execute):
1951 Likewise.
1952 * src/kwset.c (struct kwset.trans, kwsalloc, kwsincr, treefails,
1953 treedelta, hasevery, treenext, bmexec, cwexec, kwsexec): Likewise.
1954 * src/kwset.h (kwsalloc, kwsincr, kwsexec): Likewise.
1955 * src/search.c (kwsmusts, Gcompile, Ecompile, EGexecute, Pcompile,
1956 Pexecute): Likewise.
1957
1958 * src/dfa.c (dfaexec):
1959 Use size_t, not char *, to avoid worrisome casts to convert
1960 char const * to char *.
1961 * src/dfa.h (dfaexec): Likewise.
1962 * src/grep.c (execute): Likewise.
1963 * src/grep.h (execute): Likewise.
1964 * src/kwset.c (bmexec, cwexec, kwsexec): Likewise.
1965 * src/kwset.h (struct kwsmatch.offset, kwsalloc, kwsincr,
1966 kwsexec): Likewise.
1967 * src/search.c (EGexecute, Fexecute, Pexecute): Likewise.
1968
1969 * src/dfa.h (_PTR_T): Depend on defined __STDC__, not __STDC__.
1970 (PARAMS): Depend on PROTOTYPES, not __STDC__.
1971
1972 * src/dfa.c (dfasyntax): Last arg is unsigned char, not int.
1973 * src/dfa.h (dfasyntax): Likewise.
1974
1975 * src/dfa.h (struct dfa): Remove member newlines; no longer needed.
1976 * src/dfa.c (build_state, dfaexec, dfafree): Do not worry
1977 about special newline state.
1978
1979 * src/search.c (matchers): Move definition to end of file, so
1980 that we don't need forward decls.
1981 (lastexact): Remove.
1982 (kwset_exact_matches): New var; subsumes old lastexact var.
1983 All uses changed.
1984
1985 * src/dfa.c (index): Remove macro.
1986 (REALLOC_IF_NECESSARY): Skip unnecessary test.
1987 (tstbit, setbit, clrbit): Declare arg to be unsigned, to help compiler.
1988 (copyset, zeroset, equal): Use C builtin primitives, to help compiler.
1989 (dfaexec): Do not modify input string.
1990 Remove newline parameter; no longer needed.
1991 (comsubs): Use strchr, not index.
1992
1993 * src/grep.h (matchers): Use fixed name size, not pointer (as
1994 there's no need for the extra flexibility). All uses changed.
1995
1996 * src/kwset.h (struct kwsmatch.offset): Renamed from beg, with
1997 change of type to size_t. All uses changed.
1998
1999 * src/grep.c (reset): No longer need kludge for dfaexec. Simplify.
2000 (reset, grepbuf): Adjust to new interface for 'execute'.
2001 (install_matcher): List is now terminated by null compile,
2002 not null name.
2003 Do not invoke setrlimit if that wouldn't change the limit.
2004
2005 * src/dfa.c (xcalloc, xmalloc, xrealloc, prtok, tstbit, setbit,
2006 clrbit, copyset, zeroset, notset, equal, charclass_index,
2007 looking_at, lex, addtok, atom, nsubtoks, copytoks, closure,
2008 branch, regexp, copy, insert, merge, delete, state_index,
2009 build_state, build_state_zero, icatalloc, icpyalloc, istrstr,
2010 ifree, freelist, enlist, comsubs, addlists, inboth):
2011 Remove forward decls; no longer needed.
2012 * src/grep.c (ck_atoi, usage, error, setmatcher,
2013 install_matcher, prepend_args, prepend_default_options,
2014 page_alloc, reset, fillbuf, grepbuf, prtext, prpending, prline,
2015 print_offset_sep, nlscan, grep, grepfile): Likewise.
2016 * src/kwset.c (enqueue, treefails, treedelta, hasevery,
2017 treenext, bmexec, cwexec): Likewise.
2018 * src/search.c (Gcompile, Ecompile, EGexecute, Fcompile, Fexecute,
2019 Pcompile, Pexecute, kwsinit): Likewise.
2020
2021 * src/search.c (Pcompile): Do not assume newly allocated
2022 storage is zeroed.
2023
20242000-04-06 Paul Eggert
2025
2026 * doc/grep.1, doc/grep.texi, NEWS: Improve the explanation of
2027 locale-dependent behavior of range expressions. Mention
2028 LC_COLLATE, since this affects range expressions.
2029
20302000-03-26 Paul Eggert
2031
2032 * Makefile.am (ACINCLUDE_INPUTS): Add decl.m4, inttypes_h.m4,
2033 uintmax_t.m4, ulonglong.m4, xstrtoumax.m4.
2034 * m4/Makefile.am (EXTRA_DIST): Likewise.
2035
2036 * src/Makefile.am (base_sources):
2037 Add xstrtol.c, xstrtol.h, xstrtoumax.c.
2038 (EXTRA_DIST): Add strtol.c.
2039
2040 * configure.in (jm_AC_TYPE_UINTMAX_T, jm_AC_PREREQ_XSTRTOUMAX,
2041 HAVE_DECL_STRTOUL, HAVE_DECL_STRTOULL): Add.
2042 (AC_REPLACE_FUNCS): Add strtoul.
2043
2044 * src/grep.c: Include xstrtol.h.
2045 (ck_atio): Use xstrtoumax and do proper overflow checking.
2046 (max_count, outleft): Now off_t, not int.
2047 (main): Likewise. Use xstrtoumax to convert max_count from string.
2048
2049 * acconfig.h (HAVE_DECL_STRTOUL, HAVE_DECL_STRTOULL): New #undefs.
2050 (HAVE_STPCPY, ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT,
2051 HAVE_LC_MESSAGES): Remove.
2052
2053 * m4/decl.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4,
2054 m4/xstrtoumax.m4, src/strtol.c, src/strtoul.c, src/strtoull.c,
2055 src/strtoumax.c, src/xstrtol.c, src/xstrtol.h, src/xstrtoumax.c:
2056 New files, taken unchanged from textutils, fileutils, sh-utils
2057 and/or tar.
2058
20592000-03-23 Paul Eggert
2060
2061 * src/search.c (Pcompile): Add support for NUL bytes in
2062 Perl regular expressions.
2063
20642000-03-23 Paul Eggert
2065
2066 * NEWS, doc/grep.1, doc/grep.texi: Change --pcre to --perl-regexp.
2067 * src/grep.c (long_options, usage): Likewise.
2068
2069 * doc/grep.1, doc/grep.texi: Remove pgrep program.
2070 * src/Makefile.am (bin_PROGRAMS): Likewise.
2071 (pgrep_SOURCES): Remove.
2072
2073 * src/grep.c (main): Rename matcher from "pgrep" to "perl".
2074 * src/search.c (matchers): Likewise.
2075
2076 * src/search.c: Do not include stdio.h; no longer needed.
2077 (NILP): Remove.
2078 (sub): No longer static.
2079 (n_pcre): Remove.
2080 (cre): No longer an array. Present only if HAVE_LIBPCRE.
2081 (extra): New variable.
2082 (Pcompile): Use fatal to report errors.
2083 This also removes a possible core dump.
2084 Add checks (marked FIXME) for restrictions in pcre.
2085 Use pcre_maketables for proper localized behavior.
2086 (Pcompile, Pexecute): Use GNU coding style.
2087 The argument is a single pattern, not a list of patterns separated
2088 by newlines; this is for consistency with grep and egrep.
2089 Use pcre_study for speed.
2090 (Pexecute): Abort if we lack pcre.
2091 Abort if pcre_exec reports an impossible error.
2092 Use code similar to the rest of search.c
2093 to narrow down to the line we've found.
2094
20952000-03-21 Alain Magloire
2096
2097 * configure.in: added AC_CHECK_LIB(pcre, pcre_exec)
2098 * ChangeLog: Typos corrected.
2099 * src/search.c: new MACRO HAVE_LIBPCRE
2100
21012000-03-21 H.Merijn Brand
2102
2103 * src/Makefile.am(bin_PROGRAMS): added pgrep and new macro
2104 pgrep_SOURCES.
2105 * src/search.c: new functions Pcompile() and Pexecute()
2106 to support PCRE. Update matcher[] array for pgrep.
2107 * src/grep.c: new short and long option --pcre and -P.
2108 usage() updated.
2109
21102000-03-21 Bastiaan Stougie
2111
2112 Improvement of the -m or --max-count option. Now works for NUM > 1 and
2113 prints trailing context for the last matching line.
2114
2115 * src/grep.c
2116 (after_last_match): Is a new off_t variable that replaces inputhwm
2117 to retain the correct input offset even after a call to fillbuf. Note
2118 that after_last_match has a different meaning than inputhwm:
2119 it always points to the offset in the input of the first byte after
2120 the last matching line, and is 0 if no matching line has been found
2121 yet.
2122 (grep): Print trailing context after the NUMth match when the -m NUM
2123 option is used.
2124 (grep): Added comment. Should have been commented already.
2125 (grepbuf): Now updates outleft correctly. This fixes the bug that the
2126 -m NUM option did not stop after NUM lines for NUM greater than 1.
2127 (grepbuf, prtext): Now update after_last_match instead of inputhwm.
2128 (fillbuf): No longer updates inputhwm.
2129 (prpending): When outputting trailing context of the max_count-th
2130 matching line, stop at the first matching line.
2131 (grepfile): Seek to after_last_match or eof, depending on the values
2132 of outleft and bufmapped.
2133 (usage): added the -m or --max-count option to the help message.
2134 * doc/grep.texi, doc/grep.1: Document the change of the -m option.
2135
21362000-03-17 Paul Eggert
2137
2138 Add new -m or --max-count option, based on a suggestion by
2139 Bastiaan Stougie.
2140
2141 * doc/grep.texi, doc/grep.1: Document it.
2142 * src/grep.c (short_options, long_options, main): Add it.
2143 (inputhwm): New variable.
2144 (fillbuf, prtext, grepbuf): Set it.
2145 (bufmapped): Now a macro (defined to zero) if HAVE_MMAP is not defined.
2146 (max_count, outleft): New variables.
2147 (prtext, grepbuf, grep): Don't output more than outleft lines.
2148 (grepfile): If grepping standard input, seek to the limit of what
2149 we've read before exiting. This fixes a bug with mmapped input,
2150 and is needed for proper -m support.
2151 (main): Exit immediately if -m 0 is specified.
2152
21532000-03-08 Alain Magloire
2154
2155 * configure.in: version 2.4.2
2156
21572000-03-07 Paul Eggert
2158
2159 * Make intl subdirectory match fileutils, tar, etc.;
2160 see intl/ChangeLog for details.
2161
2162 * src/getpagesize.h: Reformat to match latest fileutils.
2163
2164 * src/savedir.c (savedir): Work even if directory size is
2165 negative; this can happen with some NFS screwups.
2166
21672000-03-03 Jim Meyering
2168
2169 * regex.m4: Make sure re_compile_pattern accepts patterns like '{1'.
2170
21712000-03-02 Alain Magloire
2172
2173 * 2.4.1 Release
2174
21752000-02-25 Paul Eggert
2176
2177 * configure.in (LIBOBJS): Work around automake 1.4 bug:
2178 regex.c wasn't being passed through ansi2knr on pre-ANSI hosts.
2179 (ac_use_included_regex): Fix typo in warning.
2180 * src/Makefile.am (EXTRA_DIST): Remove regex.c, as the LIBOBJS
2181 workaround means that automake now puts regex.c into DIST_COMMON.
2182
21832000-02-25 Alain Magloire
2184
2185 * po/*.po: update of the PO files.
2186
21872000-02-22 Eli Zaretskii
2188
2189 * doc/grep.1: Two small glitches(typos).
2190
21912000-02-18 Eli Zaretskii
2192
2193 * djgpp/config.site (prefix, INSTALL): Use /dev/env/DJDIR instead
2194 of ${DJDIR}, so that the produced Makefile's work on any DJGPP
2195 installation.
2196
21972000-01-30 Alain Magloire
2198
2199 * doc/grep.1: corrected typo.
2200 Noted by Ruslan Ermilov.
2201
22022000-01-30 Alain Magloire
2203
2204 * vms/Makefile.am: added config_vms.h to EXTRA_DIST.
2205 * vms/config_vms.h: New File, contains macros specific to VMS and
2206 avoid namespace collision with operating system supplied C library.
2207 * vms/make.com: Better compiler auto-detection; information for builds
2208 on pre-OpenVMS 7.x systems; general overhaul.
2209 * src/getpagesize.h: Reinstate support for different pagesizes on
2210 VAX and Alpha. Work around problem with DEC C compiler.
2211 * src/vms_fab.c: Cast to some assigments; fixed typo argcp vs. argp.
2212 * src/vms_fab.h: Added new include files to avoid warnings about
2213 undefined function prototypes.
2214 Those patches were provided by Martin P.J. Zinser ([email protected]).
2215
22162000-01-30 Paul Eggert
2217
2218 * src/grep.c (main): Update copyright notice.
2219
22202000-01-28 Alain Magloire
2221
2222 * src/grep.c (usage): The example "%s -i 'hello.*world' could
2223 lead to confusion when progname is 'fgrep.
2224 Noted by Akim Demaille.
2225
2226 * configure.in: Reenable, jm_INCLUDE_REGEX() since we now
2227 track GNU lib C.
2228 * src/Makefile.am: EXTRA_DIST new macros with regex.c regex.h.
2229 Requested By Ulrich Drepper.
2230
22312000-01-25 Paul Eggert
2232
2233 * src/grep.c (grep): If the final byte of an input file is not
2234 a newline, grep now silently supplies one.
2235 * doc/grep.texi, NEWS: Likewise.
2236
22372000-01-25 Paul Eggert
2238
2239 * NEWS, doc/grep.1, doc/grep.texi: Add -I option.
2240 * src/grep.c (short_options, usage, main): Likewise.
2241
2242 * doc/grep.texi: Fix some incorrect references to ASCII.
2243
22442000-01-25 Paul Eggert
2245
2246 * doc/grep.1: Simplify synopsis; sort options; mention
2247 environment variables; clean up some minor gaffes.
2248
22492000-01-25 Paul Eggert
2250
2251 * doc/grep.texi:
2252 Fix some errors in description of [:print:] and the like.
2253
22542000-01-23 Paul Eggert
2255
2256 * src/dfa.c (FETCH, lex): Put brackets around if-body to avoid
2257 GCC warning about ambiguous if-then-else.
2258
22592000-01-23 Paul Eggert
2260
2261 * src/regex.c (GET_UNSIGNED_NUMBER): Allow only ASCII digits.
2262 * src/dfa.c (ISASCIIDIGIT): New macro.
2263 (lex): Use it instead of ISDIGIT.
2264
22652000-01-23 Paul Eggert
2266
2267 The bug is that regular expression ranges like [a-z] compare raw
2268 byte codes to the range boundaries, whereas POSIX says that they
2269 should use the current collating sequence instead. For example,
2270 in Solaris 7 with LC_ALL=en_US, the command
2271 echo x | grep '[ -~]'
2272 outputs 'x', but it shouldn't output anything since ' ' and '~'
2273 sort before all letters in that locale.
2274
2275 * src/regex.c (compile_range): When matching a character
2276 range, use the current collating sequence, as POSIX requires.
2277 * src/dfa.c (lex): Likewise.
2278
22792000-01-20 Alain Magloire
2280
2281 * tests/Makefile.am (dist-hook): Added new rule to make sure
2282 that the shell scripts have the right permissions.
2283 * src/posix/Makefile.am (EXTRA_DIST): added regex.h in the
2284 distribution.
2285 * THANKS: updated.
2286
22872000-01-18 Alain Magloire
2288
2289 * Rectification the initial patch to add --binary-file option
2290 was done by Ruslan Ermilov.
2291
22922000-01-17 Paul Eggert
2293
2294 Sync with sources of fileutils 4.0n, tar 1.13.17, glibc 2.1.3a1.
2295 Convert to ANSI C prototypes (using ansi2knr for backwards
2296 compatibility), as this makes it easier to sync.
2297
2298 * configure.in (AC_OBJEXT): Spell in a funny way, to work around
2299 a bug in automake 1.4 with ansi2knr.
2300 (LIBOBJS): Add assignment so that .o files in LIBOBJS are also built
2301 via the ANSI2KNR-filtering rules.
2302 (AC_OUTPUT): Add src/posix/Makefile.
2303 * src/Makefile.am (AUTOMAKE_OPTIONS): Add ansi2knr.
2304 (SUBDIRS): New macro.
2305 * src/ansi2knr.1, src/ansi2knr.c, src/posix/Makefile.am: New files.
2306 * src/dfa.c, src/dosbuf.c, src/grep.c, src/kwset.c, src/search.c,
2307 src/vms_fab.c:
2308 Use prototypes for function definitions.
2309 * src/grep.c (main): Use int counter for default context,
2310 fixing an ANSI portability bug uncovered by the above changes.
2311
2312 * config.guess, config.sub, install-sh, missing, src/alloca.c,
2313 src/getpagesize.h, src/memchr.c, src/savedir.c, src/savedir.h,
2314 src/stpcpy.c:
2315 Upgrade to latest version from fileutils 4.0n.
2316
2317 * src/getopt.c, src/getopt.h, src/getopt1.c: Upgrade to latest
2318 version from tar 1.13.17.
2319
2320 * src/obstack.c, src/obstack.h, src/regex.c, src/regex.h:
2321 Upgrade to glibc 2.1.3 alpha 1, with K&R C portability fix.
2322 * src/posix/regex.h: New file, from glibc 2.1.3 alpha 1.
2323
23242000-01-04 Paul Eggert
2325
2326 Initial patch by Ruslan Ermilov.
2327
2328 Add --binary-files option.
2329 * NEWS, doc/grep.1, doc/grep.texi: Document it.
2330 * src/grep.c (BINARY_FILES_OPTION): New constant.
2331 (long_options, grep, usage, main): New --binary-files option.
2332 (binary_files): New var.
2333 * src/system.h (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, CHAR_MAX):
2334 New macros.
2335 (INT_MAX, UCHAR_MAX): Define in terms of TYPE_MAXIMUM.
2336
23372000-01-04 Paul Eggert
2338
2339 * savedir.c (savedir): Don't store past the end of an array if
2340 name_size is zero and the directory is empty.
2341 Reported by Dima Barsky <[email protected]>.
2342
23431999-12-03 Alain Magloire
2344
2345 * 2.4 Release.
2346
23471999-11-18 Paul Eggert
2348
2349 * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
2350 problem with the QNX 4.25 shell, which doesn't propagate exit
2351 status of failed commands inside shell assignments.
2352
23531999-11-13 Eli Zaretskii
2354
2355 * doc/grep.texi: Minor markup and spelling corrections. Use
2356 @noindent where appropriate.
2357
2358 * PATCHES-{AM,AC}: rename to PATCHES.{AM,AC}
2359
23601999-11-12 Eli Zaretskii
2361
2362 doc/grep.texi: Minor fixes and typos corrected.
2363 djgpp/README: Updated version.
2364
23651999-11-07 Paul Eggert
2366
2367 * src/grep.c (usage): Fix misspelling.
2368
23691999-11-07 Paul Eggert
2370
2371 Don't assume that the C library has re_set_syntax and friends.
2372 * src/Makefile.am (base_sources): Add regex.c, regex.h.
2373 (EXTRA_DIST): Remove regex.c, regex.h.
2374
2375 * src/grep.c (prtext): Use out_quiet, not not_text, to decide
2376 whether to set pending to zero at the end.
2377 (not_text): Remove static variable, undoing latest change.
2378 (grep): Likewise.
2379
2380 * doc/grep.texi: Tighten up the text, and fix some minor
2381 spelling and usage errors. Use @enumerate rather than @table
2382 @samp, since it's better for Q&A format. Add cross
2383 references.
2384
23851999-11-01 Alain Magloire
2386
2387 * src/search.c: Use the more portable [[:alnum:]]
2388 to define a word instead of Ascii dependent [0-9A-Za-z]
2389 * src/grep.c: make not_text global to not display text when
2390 the context switches -A/-B/-C are use on binary files.
2391 * make grep-2.3g available for testing.
2392 * configure.in: drop support for --without-included-regex.
2393 This was generating bogus bug reports, since many GNU/Linux
2394 users have different version of glibc. And glibc maintainers
2395 decided to drop k&r support.
2396
23971999-11-01 Arnold D. Robbins
2398
2399 * regex.c (init_syntax_once): move below definition of
2400 ISALNUM etc., then use ISALNUM to init the table, so that
2401 the word ops will work if i18n'ed.
2402 (SYNTAX): And subscript with 0xFF for Latin-1 characters.
2403
24041999-10-26 Alain Magloire
2405
2406 * src/regex.c: Merge changes from GNU lib C.
2407 * Updated the *.po files
2408
24091999-10-26 Paul Eggert
2410
2411 * src/grep.c (fillbuf): Don't report buffer size overflow if
2412 newalloc == save and maxalloc == save. This can happen
2413 e.g. when reading a large page-aligned file that contains
2414 no newlines.
2415
24161999-10-21 Paul Eggert
2417
2418 * src/grep.c (usage): Give example. Clarify -F.
2419 Explain exit status more clearly.
2420
24211999-10-12 Paul Eggert
2422
2423 * doc/grep.texi: Shorten the commentary about egrep and {.
2424 "BSD grep" -> "traditional grep".
2425 * doc/grep.1: Match recent changes to grep.texi.
2426
24271999-10-11 Paul Eggert
2428
2429 * NEWS, doc/grep.1, doc/grep.texi: New option --mmap.
2430 * src/grep.c (mmap_option): New variable.
2431 (long_options, reset, usage): Add --mmap.
2432 Default is now read, not mmap.
2433
2434 * doc/grep.1: Document -Z or --null.
2435
24361999-10-11 Paul Eggert
2437
2438 * doc/grep.texi: Fix texinfo glitches. POSIX -> POSIX where
2439 appropriate.
2440
24411999-10-11 Paul Eggert
2442
2443 * acconfig.h (ssize_t): New #undef.
2444
2445 * configure.in (AC_CHECK_TYPE): Add ssize_t.
2446
2447 * src/grep.c (PREFERRED_SAVE_FACTOR): New macro.
2448 (reset): If the buffer has already been allocated, set bufsalloc to
2449 be bufalloc / PREFERRED_SAVE_FACTOR. This avoids problems when
2450 bufsalloc == bufalloc (possible after reading a large binary file).
2451 (reset): Use PREFERRED_SAVE_FACTOR instead of magic constant.
2452 Do not set bufbeg; nobody uses it.
2453 Always set buflim.
2454 Check for lseek error.
2455 Use SEEK_CUR, not a magic constant.
2456 (fillbuf): Return an error indication, not a count.
2457 All callers changed.
2458 Do not assume ssize_t fits in int.
2459 Use PREFERRED_SAVE_FACTOR instead of magic constant.
2460 Clean up mmap code.
2461 Do not attempt to mmap zero bytes.
2462 Check for lseek error.
2463 Use SEEK_SET, not a magic constant.
2464 Work correctly if read is interrupted.
2465 (grepfile): Work correctly if open or close is interrupted.
2466
2467 * src/system.h (SEEK_SET, SEEK_CUR): New macros.
2468
24691999-10-02 Alain Magloire
2470
2471 * src/regex.[ch]: upgrade from GNU lib C source tree.
2472
2473 * make beta 2.3f available.
2474
24751999-10-02 Paul Eggert
2476
2477 * NEWS: egrep is now equivalent to 'grep -E'.
2478 The lower bound of an interval is not optional.
2479 You can specify a matcher multiple types without error.
2480 -u and -U are now allowed on non-DOS hosts, and have no effect.
2481 * doc/grep.texi: Likewise.
2482 * doc/grep.1: Likewise.
2483 Fix some troff bugs that prevented 'groff' from rendering the page.
2484
2485 * src/egrepmat.c, src/fgrepmat.c, src/grepmat.c (default_matcher):
2486 Remove.
2487 (matcher): Add.
2488 * src/grep.h (default_matcher): Remove.
2489 (matcher): Now exported from ?grepmat.c, not grep.c.
2490
2491 * src/dfa.c (lex): If { would start an invalid interval specification,
2492 treat it as a normal character.
2493 Remove (broken) support for {,M} meaning {0,M}.
2494 Diagnose bogus intervals like {1,0}.
2495 (closure): maxrep is now -1 to indicate no limit, not zero;
2496 zero is a valid value for maxrep, meaning an upper bound of zero.
2497
2498 * src/grep.c (short_options): New constant.
2499 (long_options, main): -u and -U are now supported on Unix,
2500 with no effect.
2501 (matcher): Removed; now defined by ?grepmat.c.
2502 (install_matcher): Renamed from setmatcher.
2503 (setmatcher): New function.
2504 (usage): Report new, more uniform option scheme.
2505 (main): Do not initialize matcher; ?grepmat.c now does this.
2506 Rely on setmatcher to catch matcher conflicts.
2507 Default matcher is "grep".
2508
2509 * src/search.c (matchers):
2510 Remove "posix-egrep" matcher; no longer needed.
2511 (Ecompile): Likewise.
2512 The egrep matcher now has POSIX behavior.
2513
2514 * tests/bre.tests: grep '\{' is no longer an error.
2515 Fix test for interval too large, and enable it.
2516 * tests/ere.tests: grep -E {1 is no longer an error
2517 Likewise for a{1, a{1a, a{1a}, a{1,x}.
2518
25191999-09-22 Paul Eggert
2520
2521 * largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
2522 2.95.1 bug with HP-UX 10.20.
2523
25241999-09-12 Paul Eggert
2525
2526 * src/grep.c (fillbuf): Fix typo: we sometimes reported
2527 arithmetic overflow even when there wasn't any.
2528
25291999-09-12 Paul Eggert
2530
2531 * configure.in (AC_CHECK_FUNCS): Add memmove.
2532
2533 * src/system.h (S_ISREG): New macro.
2534 (memmove): Define if ! defined HAVE_MEMMOVE && ! defined memmove,
2535 not if !defined STDC_HEADERS. This is needed for SunOS 4.1.4,
2536 which defines STDC_HEADERS but lacks memmove.
2537
2538 * src/grep.c (bufoffset): Needed even if !defined HAVE_MMAP.
2539 (reset): Always fstat the file, since we always need its size if it is
2540 regular.
2541 Similarly, get the buffer offset of every regular file.
2542 Set bufmapped to 0 if the file's initial offset is not a multiple
2543 of the page size.
2544 (fillbuf): Calculate an upper bound on how much memory we should
2545 allocate only for regular files, since we don't know the sizes of
2546 other files.
2547 Don't bother to check whether the file offset is a multiple of the page
2548 size, since we now do that just once in 'reset'.
2549 When an mmapped area would fall past the end of the file, trim it to
2550 just before instead of giving up immediately and doing a 'read';
2551 that avoids a worst-case behavior that could read half an mmapped file.
2552 Fix bug when computing offsets on hosts that don't have mmap.
2553
25541999-08-27 Paul Eggert
2555
2556 * src/system.h (memmove): New macro.
2557
2558 * src/grep.c (page_alloc): Reallocate the old buffer instead
2559 of having both old and new buffers active simultaneously.
2560 Remove valloc debugging variant, which no longer applies.
2561
2562 (fillbuf): Rejigger the buffer allocation mechanism. The old
2563 mechanism could allocate more than 10*N bytes for an N-byte
2564 file, which was excessive. Check for arithmetic overflow a
2565 bit more carefully.
2566
25671999-08-25 Paul Eggert
2568
2569 * src/grep.c (grepdir):
2570 Don't assume that st_ino and st_dev must be integers;
2571 POSIX allows them to be floating-point (!).
2572
2573 * src/vms_fab.h (arr_ptr): ':' -> ';' to fix typo.
2574
25751999-08-18 Alain Magloire
2576
2577 * 2.3e snapshot.
2578
25791999-08-18 Alain Magloire
2580
2581 * src/search.c: On a CRAY J90 system running UNICOS 8.0.
2582 Compilation of ./src/search.c failed because the declaration of
2583 the variable "regex":
2584 static struct re_pattern_buffer regex;
2585 conflicted with a previous declaration search.c #includes "system.h",
2586 which #includes <stdlib.h>, which declares :
2587 extern char *regex __((char *_Re, char *_Subject, ...));
2588 The declaration in search.c is local to that one source file.
2589 I just changed its name to something less likely to conflict.
2590 (I called it "regexbuf", but you could pick any name you want.)
2591 Excerpt email from Dean Kopesky.
2592
25931999-08-16 Paul Eggert
2594
2595 Upgrade large-file support to the version used in tar and
2596 textutils.
2597
2598 * Makefile.am (ACLOCAL_AMFLAGS): Define to be empty.
2599 (M4DIR, ACINCLUDE_INPUTS): New macros.
2600 ($(srcdir)/acinclude.m4): New rule.
2601
2602 * configure.in (AC_CANONICAL_HOST, AM_C_PROTOTYPES): Add.
2603 (AC_SYS_LARGEFILE): Renamed from AC_LFS, for compatibility
2604 with what should appear in the next autoconf release.
2605
2606 * m4/largefile.m4: Renamed from m4/lfs.m4.
2607
2608 * src/ansi2knr.1, src/ansi2knr.c, config.guess, config.sub:
2609 New files. config.guess and config.sub ar needed by the new
2610 AC_SYS_LARGEFILE. ansi2knr is needed by AM_C_PROTOTYPES,
2611 which in turn is needed by the new AC_SYS_LARGEFILE.
2612
26131999-08-16 Alain Magloire
2614
2615 * 2.3d snapshot on ftp server.
2616
26171999-07-26 Paul Eggert
2618
2619 Several GNU tools have options to process arbitrary file names, even
2620 file names that contain newline characters. These include 'find
2621 -print0', 'perl -0', 'sort -z', and 'xargs -0'. It'd be handy if GNU
2622 grep also processed such file names. Here's a proposed patch to do
2623 this, relative to grep 2.3c. This patch introduces two options, one
2624 for the data, and one for the file names. (Sometimes one wants
2625 null-terminated file names in the output, and sometimes one wants to
2626 process lists of null-terminated strings, and these are orthogonal
2627 axes.)
2628
2629 * NEWS, doc/grep.texi: New -z or --null-data and -Z or --null options.
2630 * src/grep.c (long_options, usage, main): Likewise.
2631
2632 * src/dfa.h (dfasyntax): New eol parameter.
2633 * src/dfa.c (eolbyte): New var.
2634 (dfasyntax): Set it from new parameter.
2635 (lex, dfastat, build_state, dfaexec): Use it instead of '\n'.
2636
2637 * src/grep.h (eolbyte): New decl.
2638 * src/grep.c (eolbyte): New var.
2639 (nlscan, prpending, prtext, grepbuf, grep): Use it instead of '\n'.
2640 (filename_mask): New var.
2641 (prline, grepfile): Output NUL separator if filename_mask is zero.
2642 (grep): Look for '\200' as the hallmark of a binary file, not '\0',
2643 if -z or --null-data is specified, since it implies that '\0' is
2644 expected as text.
2645
2646 * src/search.c (Gcompile, Ecompile): Pass eolbyte to dfasyntax.
2647 (EGexecute, Fexecute): Use eolbyte instead of '\n'.
2648
26491999-06-15 Alain Magloire
2650
2651 * src/grep.c, doc/grep{1,texi} :
2652 --revert-match should be --invert-match.
2653 Correction proposed by Karl Berry.
2654
26551999-06-12 Alain Magloire
2656
2657 * doc/grep.{1,texi}: add description for --with-filename.
2658 Noted missing by UEBAYASHI Masao.
2659
26601999-03-17 Paul Eggert
2661
2662 * NEWS: Add GREP_OPTIONS.
2663
2664 * doc/grep.texi: Document GREP_OPTIONS, and the other
2665 environment variables. Fix doc for [:blank:], [:cntrl:], [:punct:].
2666
2667 * src/grep.c (prepend_args, prepend_default_options): New functions.
2668 (main): Use them to implement GREP_OPTIONS.
2669 * src/system.h (getenv): New decl.
2670
26711999-03-16 Volker Borchert
2672
2673 * configure.in: Use case case ... esac for checking Visual C++.
2674 When ${CC} contains options it was not recognize.
2675
26761999-03-07 Paul Eggert
2677
2678 * src/grep.c (usage): Don't report -E, -F, and -G unless we're grep.
2679 (main): Don't match options -E, -F, and -G unless we're grep.
2680 Remove after-the-fact check for options -E, -F, and -G, since
2681 they're no longer needed.
2682
26831999-03-05 Eli Zaretskii
2684
2685 * src/grep.c (main): Print the name of the default matcher instead
2686 of just "grep".
2687
26881999-02-06 Alain Magloire
2689
2690 * tests/*.awk : Linux users are seeing "Broken Pipe" on make check.
2691 The problem is that grep does not drain its stdin, thus the previous
2692 process in the pipeline receives a SIGPIPE. Other shells are silent
2693 about this. There is actually no failure, since the broken pipe is
2694 expected. You can work around it by changing the pipeline, so that
2695 the input is drained, like this:
2696 status=`echo 'check' | { ${GREP} -E -e pattern >/dev/null 2>&1;
2697 echo $?; cat >/dev/null; }`; if test $status -ne $errnu then ... fi
2698 Excerpt email from Andreas Schwab.
2699
27001999-02-23 Alain Magloire
2701
2702 * src/grep.c : Restrict the use of -E, -F, -G
2703 to only grep driver, Posix behaviour. {f,e}grep
2704 the matcher is already set. This change may brake
2705 scripts, warn in NEWS.
2706
2707 * doc/grep.{1,texi} : -C takes arguments, upgrade manual.
2708
2709 * beta 2.3a
2710
27111999-02-23 Alain Magloire
2712
2713 * configure.in : Change the configure VC test from
2714 'test x$ac_cv_prog_CC = xcl;' to 'test x"$ac_cv_prog_CC" = xcl;'
2715 Email from Joshua R. Poulson.
2716
27171999-02-23 Paul Eggert
2718
2719 Fix porting bug reported by Amakawa Shuhei for SunOS 4.1.4-JL.
2720 The btowc.c shipped with grep 2.3 is incorrect for Solaris
2721 2.5.1 and earlier, as it assumes UTF8, which these OSes do not
2722 support. Solaris 7 supports btowc, so there's no need to ship
2723 a substitute for it. The only questionable case is Solaris
2724 2.6, which lacks btowc but does support UTF8. However, 2.6
2725 supports UTF8 but only as a demonstration (for an English
2726 locale!); Japanese Solaris 2.6 users typically use EUC, or
2727 sometimes shift-JIS, but they cannot use UTF8 since Japanese
2728 UTF8 is not supported. Hence there's no point to having grep
2729 substitute a btowc that uses UTF8, as it is either redundant,
2730 or it will almost invariably have incorrect behavior.
2731
2732 * configure.in (AC_CHECK_HEADERS): Don't set USE_WCHAR.
2733 (AC_CHECK_FUNCS): Add btowc, wctype.
2734 (AC_REPLACE_FUNCS): Don't replace btowc; our replacement is
2735 invariably doing the wrong thing anyway, at least on SunOS/Solaris.
2736 Don't bother to check for wctype in -lw, as we don't support
2737 wide characters on Solaris 2.5.1 or earlier anyway.
2738
2739 * bootstrap/Makefile.try (OBJS): Remove btowc.$(OBJEXT).
2740
2741 * src/btowc.c: Removed; no longer needed.
2742
27431999-02-19 Paul Eggert
2744
2745 * NEWS: Fix typo when talking about the old behavior of
2746 silently skipping directories; it was grep 2.1, not grep 2.2.
2747
27481999-02-15 Alain Magloire
2749
2750 * bootstrap/Makefile.try : add DJGPP DEFS.
2751 Done by Elie Zaretsckii.
2752
27531999-02-14 Alain Magloire
2754
2755 * m4/gettext.m4 : Guard [] with changequote.
2756 From Elie Zaretskii.
2757
2758 * djgpp/config.bat : Makefile.in.in --> Makefile.in-in
2759 From Elie Zaretskii.
2760
2761 * src/dosbuf: k&r function parameter.
2762
2763 * release of 2.3.
2764
27651999-02-10 Alain Magloire
2766
2767 * bootstrap/{Makefile{try,am},REAMDE} : skeleton
2768 provided for system lacking the tools to autoconfigure.
2769
2770 * src/{e,f,}grepmat.c: added guard [HAVE_CONFIG_H]
2771
27721999-02-10 Alain Magloire
2773
2774 * PATCHES-AC, PATCHES-AM: updated.
2775
2776 * m4/regex.m4 : updated.
2777
27781999-02-05 Eli Zaretskii
2779
2780 * m4/gettext.m4 : Support DOS-style D:/foo/bar absolute file
2781 names.
2782
2783 * aclocal.m4 (DJGPP) : Use $DJ_GPP instead, since changing the
2784 latter prevents GCC from finding headers and libraries.
2785
2786 * djgpp/config.bat: Make building from another directory work
2787
2788 * djgpp/config.sed: Remove redundant command that edited path
2789 separator: now done by configure.
2790
2791 * src/grep.c [O_BINARY]: Add prototype for undossify_input.
2792
2793 * doc/grep.texi (Introduction): Typo fixed.
2794
27951999-02-03 Alain Magloire
2796
2797 * grep-2.2f beta release.
2798
27991999-02-02 Alain Magloire
2800
2801 * m4/{djgpp,envsep,glibc,regex,dosfile,isc-posix}.m4 :
2802 New files to aid configuration and unload configure.in.
2803 * m4/Makefile.am : updated.
2804 * src/btowc.c : protect for wchar.h
2805
28061999-01-28 Alain Magloire
2807
2808 * intl/Makefile.in: Replace .o with .${ac_objext} where necessary.
2809 Work around a limitation of Visual C++ on Cygwin32.
2810 * acconfig.h configure.in: Define 'alloca' as '_alloca' when CC=cl.
2811 This little hack was suggested by Ian Roxborough <[email protected]>.
2812 Patch forwarded by Ben Elliston.
2813
28141999-01-28 Alain Magloire
2815
2816 * PATCHES-AM: New file. A small patch for automake-1.4, use $(sep)
2817 as the path separator base on @SEP@.
2818 * PATCHES-AC configure.in : updated for autoconf-13.
2819
28201999-01-27 Volker Borchert
2821
2822 * grep.c: fgrep -NUM not working correctly.
2823 add the argument number to digit_args_val.
2824
28251999-01-22 Paul Eggert
2826
2827 Prevent grep -r from recursing infinitely through directory loops via
2828 symbolic links.
2829
2830 * grep.c (struct stats): New type.
2831 (stats_base): New var.
2832 (bufstat): Remove; subsumed by stats->stat.
2833 (reset, fillbuf, grep, grepdir, grepfile): Pass struct stats * arg,
2834 for directory loop checking; use this instead of the bufstat global.
2835 All callers changed.
2836 (grepfile): Stat the file before invoking grepdir.
2837 (grepdir): Assume that the argument has already been statted.
2838 No longer a need for a directory size argument, since it
2839 can be gotten from the struct stats * argument.
2840 Check for directory loops.
2841 Create linked list of directories currently being visited,
2842 to detect loops.
2843
28441998-12-29 Kaveh R. Ghazi
2845
2846 intl/localealias.c: When building grep-2.2e using cc on Irix4,
2847 I needed the following patch to intl/localealias.c.
2848 (Its the same patch used by fileutils-4.0.) The patch resolves
2849 conflicts between char* and unsigned char* in the i18n code.
2850
28511998-12-10 Alain Magloire
2852
2853 * src/grep.c : Typo in contex -->context
2854 Noted by Vladimir Michl.
2855
28561998-12-01 Alain Magloire
2857
2858 * doc/Makefile.am djgpp/Makefile.am m4/Makefile.am vms/Makefile.am:
2859 New files.
2860
2861 * m4/progtest.m4: proctect '[]' from m4.
2862 Noted by Eli Z.
2863
2864 * PATCHES-AC: New file, add the patch for autoconf in the dist.
2865
2866 * acconfig.h: (HAVE_DOS_FILENAME)
2867
2868 * TODO: updated.
2869
2870 * src/search.c: remove obsolete 'gegrep,ggrep,gnugrep'
2871 matchers. grep no longer depend on argv[0].
2872
2873 * grep-2.2e beta to test DJGPP port.
2874
28751998-11-28 Paul Eggert
2876
2877 Various portability enhancements:
2878 - Don't assume that O_BINARY implies DOS. Use separate
2879 macros D_OK (for DOS-like directory access) and
2880 HAVE_DOS_FILE_NAMES (for DOS-like file names).
2881 - Don't assume that off_t fits into long; it doesn't on Solaris 2.6.
2882 - Have is_EISDIR set errno properly on hosts with screwed-up EISDIR.
2883 - Treat ':' specially in DOS file names only if it's the end of a
2884 drive specifier.
2885 - Protect against errno < 0.
2886
2887 * src/grep.c (is_EISDIR): Move defn to system.h.
2888 (print_offset_sep): New function.
2889 (fillbuf): Remove redundant test of O_BINARY.
2890 (totalcc, totalnl): Now of type off_t.
2891 (prline): Use print_offset_sep to print file offsets.
2892 (grepfile): Don't set e to EISDIR; that's is_EISDIR's responsibility
2893 on machines that don't work properly with EISDIR.
2894 (grepdir): Don't assume ':' means slash on all DOS filenames;
2895 it means it only in the file prefix.
2896
2897 * src/system.h (strerror): Check for negative error numbers.
2898 (is_EISDIR): Depend on D_OK, not O_BINARY.
2899 (SET_BINARY): Depend on HAVE_SETMODE, not __DJGPP__.
2900 (IS_SLASH, FILESYSTEM_PREFIX_LEN): Depend on HAVE_DOS_FILE_NAMES,
2901 not O_BINARY.
2902 (CHAR_BIT): New macro.
2903
2904 * src/dosbuf.c (struct dos_map):
2905 pos and add members are now of type off_t.
2906 (dos_stripped_crs): Now of type off_t.
2907 (dossified_pos): Now accepts arg and returns value of type off_t.
2908
2909 * configure.in (AC_CHECK_FUNCS): Add setmode.
2910 (HAVE_DOS_FILENAMES): New macro
2911
29121998-11-27 Eli Zaretskii
2913
2914 * djgpp/config.sed: New file, a Sed script to edit configure
2915 script before running it on DOS/Windows.
2916 * djgpp/config.bat: Updated to handle po2tbl.sed.in and
2917 po/Makefile.in.in on DOS filesystems, and to run config.sed.
2918
29191998-11-24 Jim Meyering
2920
2921 * src/grep.c : Typo s/infalid/invalid/
2922 Also noted by Stanislav Brabec.
2923
29241998-11-24 Eli Zaretskii
2925
2926 * doc/grep.texi: I found and corrected several typos.
2927 I believe the GNU standards require the section that describes the
2928 options to the programs to be called "Invoking" or "Invoking
2929 <program-name>". This is so users and programs can easily find
2930 that node in any Info file. So I changed the name of the
2931 "Options" chapter to "Invoking", and corrected the
2932 cross-references accordingly.
2933 I added some markup to things like file names and options.
2934 I added some additional index entries where that seemed useful.
2935 I also corrected some index entries, such as "@cindex [:alnum:]",
2936 which used a colon in them (the colons confuse Info readers).
2937
29381998-11-24 Alain Magloire
2939
2940 * grep/doc/grep.texi : -h is not use for help.
2941 Nit spotted by Jim Meyering.
2942
29431998-11-23 Alain Magloire
2944
2945 * doc: New directory, grep.1, {e,f}grep.man move here
2946 * doc/grep.texi: New info manual
2947 * doc/version.texi: New
2948 * doc/Makefile.am: New
2949 * tests/{ere,bre}.*: New files. The spencer2 test is split
2950 in two ere/bre.
2951 * config.hin: New, config.h.in rename to config.hin for OS
2952 with limited file system aka DOS.
2953
2954 * grep-2.2d release for beta.
2955
29561998-11-18 Alain Magloire
2957
2958 * src/regex.[ch] : Updated from GLibc, previous patches were
2959 integrate by Ulrich Drepper and some added ones.
2960
29611998-11-16 Paul Eggert
2962
2963 * grep.h (__attribute__): New macro, if not GCC.
2964 (fatal): Add __attribute__((noreturn)).
2965 * grep.c (usage): Add __attribute__((noreturn)).
2966
29671998-11-16 Paul Eggert
2968
2969 Remove memory leak with valloced buffers, by invoking malloc instead.
2970
2971 * configure.in (AC_CHECK_FUNCS), src/system.h (valloc): Remove.
2972 * src/grep.c (page_alloc): New function.
2973 (ubuffer, pagesize): New vars.
2974 (ALIGN_TO): New macro.
2975 (reset): Initialize new vars. Check for overflow in buffer size calc.
2976 Use page_alloc instead of valloc.
2977 (fillbuf): Likewise. Use memcpy to copy saved area.
2978
29791998-11-15 Paul Eggert
2980
2981 * dfa.c (dfacomp), search.c (EGexecute): Don't assume char is unsigned.
2982
29831998-11-14 Paul Eggert
2984
2985 * src/grep.c (grepdir): Fix bug: memory freed twice.
2986
2987 * src/search.c (Gcompile, Ecompile): Don't invoke dfainit,
2988 since dfacomp does it for us, and if we also do it then we
2989 leak memory.
2990
29911998-11-13 Eli Zaretskii
2992
2993 * djgpp/config.bat: Rewrite to run the configure script via Bash.
2994 * djgpp/config.site, djgpp/getconf: New files.
2995 * djgpp/config.h, djgpp/*.mak, djgpp/po2tbl.sed: Remove.
2996 * djgpp/README: Update instructions.
2997
2998 * Makefile.am (EXTRA_DIST): Update the list of DJGPP files.
2999
3000 * src/system.h (IS_SLASH): New macro.
3001 (is_EISDIR): Define it here for DOS and Windows.
3002
3003 * src/grep.c (main) [O_BINARY]: Set stdout to binary mode, so the
3004 EOL formats of the input and output files match, unless stdout is
3005 the console device.
3006 (is_EISDIR): Don't define if already defined. Accept a second
3007 argument, the file name; all callers changed.
3008 (grepdir): Don't free 'file', inside the loop. Use IS_SLASH to
3009 check whether 'dir' needs a slash.
3010 (grepfile): If file is a directory, set e to EISDIR.
3011
30121998-11-10 Alain Magloire
3013
3014 * src/vms_fab.{c,h}: New file for VMS wildcard expansion
3015 Written by Phillip C. Brisco.
3016
3017 * vms/make.com : add line to compile vms_fab.c and
3018 {e,f,}grepmat.c with link for each grep/fgrep/egrep.
3019 Base on patch send by Phillib C. Brisco.
3020
30211998-11-09 Alain Magloire
3022
3023 * grep-2.2c on alpha for testing.
3024
30251998-11-09 Paul Eggert
3026
3027 * src/grep.1: Fix "Last Change" of output by generating the date
3028 from the RCS Id.
3029
3030 * src/grep.c (is_EISDIR): New macro.
3031 (grep): If -s, suppress errors from trying to read directories.
3032 (grepfile): Use is_EISDIR to simplify code.
3033 (grepdir): If -s, suppress errors from trying to read directories.
3034
3035 * src/grep.1: Fix -q -r -s problems; describe BSD grep better.
3036
3037 * src/grep.c (main): Update copyright.
3038
3039 Specify default matcher with default_matcher extern var, not
3040 DEFAULT_MATCHER macro. This is more straightforward and means
3041 we need to compile grep.c just once.
3042
3043 * src/egrepmat.c, src/fgrepmat.c, src/grepmat.c: New files.
3044
3045 * src/Makefile.am (base_sources): New macro.
3046 (egrep_SOURCES, fgrep_SOURCES, grep_SOURCES): Now consist of
3047 $(base_sources) plus the single tailoring file.
3048 (grep_LDADD, egrep_LDADD, fgrep_LDADD): Remove.
3049 (EXTRA_DIST): Remove grep.c, regex.c.
3050 (fgrep.o, egrep.o): Remove.
3051
3052 * src/grep.h (matcher): Now char const *.
3053 (default_matcher): New decl.
3054
3055 * src/grep.c (matcher): Now char const *.
3056 (setmatcher): Now accepts char const *.
3057 (main): Default the matcher from default_matcher (linked externally)
3058 rather than DEFAULT_MATCHER (a macro).
3059
30601998-11-08 Alain Magloire
3061
3062 * src/grep.1: 'prep.ai.mit.edu' should be replaced with 'gnu.org'.
3063 Nit from Paul Eggert.
3064
30651998-11-06 Alain Magloire
3066
3067 * src/grep.c: The Matcher is not set to argv[0] but
3068 explicitly by a #define MATCHER at compile time default is "grep".
3069
3070 * aclocal/: NEW dir. provides our own *.m4
3071
3072 * configure.in: Move Paul's Large Files to AC_LFS.(aclocal/lfs.m4)
3073 Taken from Jim Meyering fileutils.
3074
30751998-11-05 Alain Magloire
3076
3077 * src/grep.1: update the man pages according to the
3078 changes make by Miles.
3079
3080 * po/*.po: updated.
3081
3082 * first beta release for 2.3 (2.2a).
3083
30841998-11-04 Miles Bader
3085
3086 * src/grep.c (main): Rationalize interaction of -C/-NUM/-A/-B
3087 options, and allow -C to have an optional argument. -NUM can
3088 now be mixed with -C, and -A, -B always take precedence over
3089 -C/-NUM, regardless of order.
3090 (long_options): Let -C/--context take an optional argument.
3091
30921998-11-03 Alain Magloire
3093
3094 * src/dfa.c: HP-UX define clrbit/setbit as macros in <sys/param.h>
3095 #undef if defined.
3096 Fixed by Andreas Ley and Philippe Defert.
3097
3098 * src/grep.1 : mention that -s follows POSIX behavior.
3099 Noted by Paul Eggert and others.
3100
3101 * tests/khadafy.sh: a typo in failure(s).
3102 Spotted By Sotiris Vassilopoulos.
3103
31041998-11-01 Paul Eggert
3105
3106 * src/system.h (IN_CTYPE_DOMAIN): New macro.
3107 (ISALPHA, ISUPPER, ISLOWER, ISDIGIT, ISXDIGIT, ISSPACE,
3108 ISPUNCT, ISALNUM, ISPRINT, ISGRAPH, ISCNTRL): Use
3109 IN_CTYPE_DOMAIN instead of isascii.
3110
31111998-08-18 Paul Eggert
3112
3113 Add support for new -r or --recursive (or -d recurse or
3114 --directories=recurse) option.
3115
3116 * src/Makefile.am (grep_SOURCES): Add savedir.c, savedir.h, stpcpy.c.
3117
3118 * src/grep.1: Describe new options.
3119
3120 * src/grep.c: Include "savedir.h".
3121 (long_options): Add -r or --recursive.
3122 (RECURSE_DIRECTORIES): New enum value.
3123 (IS_DIRECTORY_ERRNO): Remove.
3124 (reset, grep): Add file name arg.
3125 (grepdir, grepfile): New functions.
3126 (initial_bufoffset): New var.
3127 (reset): Initialize it.
3128 (fillbuf): Use it.
3129 (count_matches, list_files, no_filenames, suppress_errors): New static
3130 vars; formerly were local to 'main'.
3131 (grep): Recurse through directories if the user asks for this.
3132 (usage, main): Add new options.
3133 (main): Change some local vars to be static, as described above.
3134 Move most of the guts into grepfile function.
3135 so that it can be recursed through.
3136
3137 * configure.in (AC_HEADER_DIRENT, AC_FUNC_CLOSEDIR_VOID): Add.
3138 (AC_REPLACE_FUNCS): Add stpcpy.
3139
3140 * src/savedir.c, src/savedir.h, src/stpcpy.c: New files;
3141 taken from fileutils 3.16u.
3142
31431998-08-11 Paul Eggert
3144
3145 * src/system.h (initialize_main): New macro.
3146 * src/grep.c (main): Invoke initialize_main first thing.
3147
31481998-04-29 Paul Eggert
3149
3150 * NEWS, src/grep.1: Describe new -a and -d options.
3151
3152 * src/grep.c (long_options, usage, main):
3153 New options -d or --directories and -a or --text.
3154 (directories, always_text): New variables.
3155 (IS_DIRECTORY_ERRNO): New macro.
3156 (reset): Now returns value specifying whether to skip this file.
3157 Stat the file if either mmap or directory-skipping is possible.
3158 Skip the file if it's a directory and we're skipping directories.
3159 (grep): Skip the file if 'reset' tells us to.
3160 (main): If open fails because the file is a directory, and if we're
3161 skipping directories, don't report an error.
3162 Remove special case for DOS and Windows.
3163
3164 * src/dosbuf.c (guess_type): Use the same method for guessing whether a
3165 file is binary as grep.c's grep does.
3166 There's no longer any need to declare 'bp' to be unsigned.
3167
31681998-04-26 Alain Magloire
3169
3170 * grep-2.2 release.
3171
3172 * src/dfa.c: Wrong revision was pulled out
3173 for beta 2.1.1d.
3174 * src/search.c: Wrong revision was pulled out
3175 for beta 2.1.1d.
3176
3177 * src/grep.c: ck_atoi () added instead of atoi ().
3178 Suggestion from Jim Meyering.
3179 ck_atoi () pulled from diffutils-2.7, maintained by Paul Eggert.
3180
3181 * AUTHORS: Rephrase of some sentences.
3182 * README: Rewording.
3183 Noted and patched by Joel N. Weber II.
3184
31851998-04-17 Kaveh R. Ghazi
3186
3187 * src/dfa.h: Don't define 'const', trust autoconf to handle it.
3188
31891998-04-16 Alain Magloire
3190
3191 * tests/{status,empty}.sh: wrong return status.
3192
3193 * src/grep.c: Remove the REGEX part in usage (), it was
3194 consider overkill by most.
3195
31961998-04-14 Eli Zaretskii
3197
3198 * djgpp/config.bat: Support file names with multiple dots on all
3199 platforms.
3200
3201 * djgpp/README: Add instructions about file names illegal on
3202 MS-DOS.
3203
32041998-04-13 Alain Magloire
3205
3206 * src/dfa.c: by "popular" demand reverse
3207 back to '_' not word-constituent.
3208
3209 * grep-2.1.1c available for testing.
3210
32111998-04-13 Karl Heuer
3212
3213 * src/grep.c: (a) The directory check is done too early:
3214 logically, if the argument is "-", then it refers to standard
3215 input, regardless of whether there's something in the file
3216 system answering to "-".
3217 (b) The sh command "grep -l root /etc/passwd /etc/group 0<&-"
3218 prints "(standard input)" instead of "/etc/passwd", because it
3219 mistakenly believes that a named file will never be opened on fd
3220 0. The string "(standard input)" should be based on the file
3221 having been originally specified as "-", rather than making
3222 assumptions about the fd.
3223 (c) the code that calls close(fd) is being done outside of the
3224 test for a bad fd. Thus, if the open failed, this code will
3225 attempt to close(-1). It should be done inside the "fd != -1"
3226 branch.
3227 This patch addresses all three of these problems.
3228
32291998-04-13 Alain Magloire
3230
3231 * configure.in: remove the deprecated AC_ISC_POSIX macro.
3232 Spotted by Karl Heuer.
3233
32341998-04-03 Eli Zaretskii
3235
3236 * djgpp/main.mak, djgpp/src.mak, djgpp/tests.mak: Updated from the
3237 relevant Makefile.in files.
3238
3239 * djgpp/config.bat: Create files in intl directory like the
3240 configure script does.
3241
32421998-03-28 Eli Zaretskii
3243
3244 * djgpp/main.mak, djgpp/src.mak, djgpp/tests.mak: Updated to track
3245 changes in respective Makefile.in files.
3246
3247 * src/dosbuf.c (guess_type): Avoid running off the end of the
3248 buffer. Spotted by Paul Eggert.
3249
32501998-03-27 Alain Magloire
3251
3252 * grep-2.1.1b.tar.gz available.
3253
3254 * src/regex.c: CLASS_CHAR_MAX set to 256 instead of 6
3255 when WCTYPE and WCHAR are not defined. When class names
3256 where bigger then 6, it will not detect an error.
3257 example '[[:alphabet:]]'.
3258
3259 * Updated the copyright of the files with emacs.
3260 With emacs Jim :).
3261
32621998-03-26 Jim Meyering
3263
3264 * src/dfa.c (IS_WORD_CONSTITUENT): Define.
3265 (lex): Use IS_WORD_CONSTITUENT, not ISALNUM.
3266 Don't special-case '_'.
3267 (dfastate): Use IS_WORD_CONSTITUENT, not ISALNUM.
3268 (dfaexec): Likewise.
3269
32701998-03-25 Alain Magloire
3271
3272 * tests/warning.sh: typos and replace the echos with
3273 a simple cat.
3274 Noted By Jim Meyering.
3275
3276 * src/regex.c: #undef ISASCII and ISPRINT before defining
3277 them(On Solaris it was define).
3278 Pattern 'a[[:]:]]b' is an invalid char class and the error
3279 from regex was 1(REG_NOMATCH) instead of 2 (REG_ECTYPE).
3280 Fix with help from Ulrich Drepper.
3281
3282 * src/grep.c (usage): Ulrich wrote: "A single printf should
3283 not have more than 900 bytes. For translation reasons the
3284 text shouldn't be split in too many pieces since this is
3285 tiresome and also does not help to generate a consistent picture."
3286 Noted by Ulrich Drepper.
3287 * src/grep.c (usage): Dig out and old patch from
3288 Franc,ois to explain the regex in usage().
3289 Ideas from Franc,ois Pinard.
3290
32911998-03-23 Alain Magloire
3292
3293 * testing: grep-2.1.1a for testing.
3294
3295 * configure.in: Solaris needs '-lw' if we use wchar/wctype
3296 functions.
3297 * src/btowc.c: New file from GNU libc. Solaris 2.5 don't
3298 have it define.
3299 * configure.in : check for btowc ().
3300
3301 * regex.c: Include <wchar.h> before <wctype.h>, to work around
3302 a Solaris 2.5 bug.
3303 Patch provided by Paul Eggert.
3304
3305 * tests/status.sh: new file to check return status code.
3306 * tests/empty.sh: new file to check for empty pattern.
3307 * tests/warning.sh: new file to tell where to report errors.
3308
3309 * configure.in: If available, prefer support for large files
3310 unless the user specified one of the CPPFLAGS, LDFLAGS, or LIBS
3311 variables.
3312 Done by Paul Eggert.
3313
3314 * src/grep.c (usage): change prep.ai.mit.edu for gnu.org.
3315
33161998-03-18 Alain Magloire
3317
3318 * src/grep.c (usage): Formating the --help message a bit off.
3319 Noted by William Bader.
3320
3321 * src/grep.c (main): When checking conflicting matcher for option -E the
3322 matcher was to "egrep" instead of "posix-egrep".
3323 Reported by [email protected].
3324
3325 * src/grep.c: Typos and rewording the --help message.
3326 Reported by Karl Heuer.
3327
3328 * src/grep.1: The man page wording :
3329 A regular expression matching a single character may be
3330 followed by one of several repetition operators:
3331 is unclear since 'x(yz)*z' is a valid regex.
3332 Remove the "matching a single character".
3333 Suggested by Harald Hanche-Olsen.
3334
3335 * src/grep.c (main): '-f /dev/null' now specifies no patterns
3336 and therfore matches nothing.
3337 Reported by Jorge Stolfi.
3338 Patched by Paul Eggert.
3339
33401998-03-10 Alain Magloire
3341
3342 * Ice storm 98(el nino). Lost grep repository disk,
3343 and my $HOME directory, etc ..
3344 Trying to get the emails/patch from dejanews.com
3345 and start from grep-2.1.
3346 sigh ....
3347
33481997-11-01 Alain Magloire
3349
3350 * src/grep.c: For the long options, the problems are:
3351 --file appears in the option table as 'no_argument'
3352 instead of 'required_argument'.
3353 --files-with-matches is missing from the option table.
3354 The help lists '--fixed-strings' as the long option for -F,
3355 the table has '--fixed-regexp'.
3356 --regexp appears in the option table as 'no_argument'
3357 instead of 'required_argument'.
3358 --with-filename is missing from the option table.
3359 Reported by Grant McDorman and Krishna Sethuraman.
3360
33611997-10-19 Alain Magloire
3362
3363 * src/grep.c: the option "with-filename was not in the arg table.
3364 Corrected by Jim Hand.
3365
3366 * GNU gettext library from gettext-0.10.32.
3367
3368 * src/grep.c: reverse back to greping directories,
3369 One could skip the error message by defining
3370 SKIP_DIR_ERROR. There is no clear way of doing
3371 things, I hope to setle this on the next majore release
3372 Thanks Paul Eggert, Eli Zaretskii and gnits for the
3373 exchange.
3374
3375 * tests/status.sh: add this check to make sure
3376 That the return status code is ok.
3377
33781997-10-10 Andreas Schwab
3379
3380 * src/grep.1: Fix formatting.
3381
3382 * configure.in: Check for wctype.h, wchar.h, libintl.h and
3383 isascii, which are needed for regex.c.
3384
33851997-10-01 Paul Eggert
3386
3387 * src/grep.c (fillbuf): Don't warn about mmap failures.
3388
33891997-09-7 Alain Magloire
3390
3391 * src/grep.c: added code for -H --with-filename.
3392
3393 * djgpp/*: patch wrongly apply
3394 duplication of text in djgpp/{README,config.h}.
3395 Filter djgpp/config.bat with unix2dos.
3396
3397 * djgpp/make.mak: beautify
3398 From Eli Zaretskii.
3399
3400 * grep-2.1 release.
3401
34021997-09-01 Alain Magloire
3403
3404 * grep-2.0f out for testing.
3405
3406 * update to GNU gettext library from gettext-0.10.31
3407
3408 * grep.c : have a nicer format for --version.
3409 Noted by Ulrich Drepper.
3410
3411 * obstack.[ch]: updated from GNU C library
3412 * configure.in: look for stdlib.h [HAVE_STDLIB_H]
3413 Comments from Ulrich Drepper.
3414
34151997-08-25 Philippe De Muyter <[email protected]>
3416
3417 * src/dfa.c (sys/types.h): File included unconditionnaly.
3418
34191997-08-16 Eli Zaretskii <[email protected]>
3420
3421 * grep.c (long_options) [O_BINARY]: Add DOS-specific options.
3422 (fillbuf) [O_BINARY]: For DOS-style text files, strip CR
3423 characters at end of line.
3424 (prline) [O_BINARY]: Report correct byte offsets, even though CR
3425 characters were stripped when reading the file.
3426 (usage) [O_BINARY]: Add DOS-specific options.
3427 (setmatcher) [HAVE_SETRLIMIT]: Set re_max_failures so that the
3428 matcher won't ever overflow the stack.
3429 (main) [__MSDOS__, _WIN32]: Handle backslashes and drive letters
3430 in argv[0], remove the .exe suffix, and downcase the prgram name.
3431 [O_BINARY]: Pass additional DOS-specific options to getopt_long
3432 and handle them. Call stat before attempting to open the file, in
3433 case it is a directory (DOS will fail the open call for
3434 directories). Switch the input descriptor to binary mode, unless
3435 it is a terminal device.
3436
3437 * system.h [O_BINARY]: Define macros to switch a handle to binary
3438 mode, so binary files could be grep'ed on MS-DOS and MS-Windows.
3439 [HAVE_SETLOCALE]: Test for HAVE_SETLOCALE instead of
3440 HAVE_LC_MESSAGES, to prevent compilation error in grep.c on
3441 systems which don't define HAVE_LC_MESSAGES, but have setlocale.
3442
3443 * dosbuf.c: New file, functions specific for MS-DOS/MS-Windows.
3444 (guess_type, undossify_input, dossified_pos): New functions.
3445
3446 * djgpp/config.h, djgpp/config.bat, djgpp/main.mak, djgpp/src.mak,
3447 djgpp/po.mak, djgpp/intl.mak, djgpp/tests.mak, djgpp/po2tbl.sed:
3448 New files, for building Grep with DJGPP tools for MS-DOS and
3449 MS-Windows.
3450
3451 * grep.1: Document DOS-specific switches.
3452
34531997-08-08 Alain Magloire
3454
3455 * grep-2.0e: available for testing
3456
3457 * grep.c: change LC_MESSAGE to LC_ALL for (LC_CTYPE).
3458 Suggested by Jochen Hein.
3459
3460 * ABOUT-NLS: updated.
3461 * grep.c: --version: more verbosity (COPYRIGHT).
3462 * grep.c: --help: PATTERN, FILE instead of <pattern>, <file>.
3463 * INSTALL.grep: not necessary removed.
3464 * configure.in: --disable-regex rename --without-include-regex.
3465 * THANKS: format: first row name, second email.
3466 * ChangeLog: format ISO 8601.
3467 Reported by Franc,ois Pinard.
3468
3469 * grep.c: move dcl of struct stat st into "else" where it's used.
3470 Reported by Jim Meyering.
3471
3472 * grep.c: totalnl should be %u in printf.
3473 Reported by Michael Aichlmay
3474 Corrected with guidance from Ulrich Drepper
3475
34761997-07-24 Alain Magloire <[email protected]>
3477
3478 * Makefile.am: corrected an error when installing {f,e}grep.1.
3479 From Kaveh R. Ghazi <[email protected]>.
3480 From Ulrich Drepper <[email protected]>.
3481
3482 * Many files: use PARAMS instead of __STDC__ for prototypes.
3483 From Jim Meyering <[email protected]>.
3484 Patch provided by Kaveh R. Ghazi <[email protected]>.
3485
3486 * dfa.[ch]: uses the one in gawk-3.0.3 with the patch from
3487 Arnold (see Changelog: July 12 1997)
3488
3489 * grep.1: a note to say -l, -L, -q stop on first match.
3490 Noted by Andrew Beattie <[email protected]>.
3491
3492 * grep.c: refuse to scan if the file is a directory.
3493 This was causing problems on SUNs. If the directory contains
3494 a file that could match the pattern, garbage was display.
3495
3496 * tests directory: added new set of tests from Henry Spencer
3497 regex package. Change the way the tests were done to be more
3498 conformant to automake.
3499
3500 * configure.in: added --disable-regex for folks with their own fuctions.
3501
3502 * grep-20d : available for testing
3503
35041997-07-18 Alain Magloire <[email protected]>
3505
3506 * grep-2.0c: available for testing
3507
35081997-07-17 Alain Magloire <[email protected]>
3509
3510 * src/grep.c: Cause grep to fail if 'fclose (stdout)' fails.
3511 From Jim Meyering <[email protected]>.
3512
3513 * grep.c:usage() more consistency in the --help.
3514
3515 * egrep, fgrep were links This is in violation of GNU standards:
3516 "Please don't make the behavior of a utility depend on the name used
3517 to invoke it. It is useful sometimes to make a link to a utility with
3518 a different name, and that should not change what it does."
3519 For now egrep and fgrep will be copies of grep. A better scheme
3520 should be found later.
3521 After discussion with Tom Tromey <[email protected]>.
3522
3523 * fgrep.man and egrep.man included: They are stubs that call grep.1.
3524 * Makefile.am: modified to install {f,e,}grep[,.1].
3525
3526 * speed hack for -l, -L: bail out on first match.
3527 From Scott Weikart <[email protected]>.
3528
3529 * *.[ch]: provided prototypes for strict argument checking
3530 With the help of Stewart Levin <[email protected]>.
3531
35321997-07-16 Alain Magloire <[email protected]>
3533
3534 * configure.in: typo in the creation of po/Makefile
3535 Noted by Volker Borchert [email protected].
3536
3537 * grep-2.0b: make it available for testing.
3538
35391997-07-15 Alain Magloire <[email protected]>
3540
3541 * src/grep.c usage(): cut the --help in smaller printf()'s
3542 Noted by Ulrich Drepper <[email protected]>.
3543
35441997-07-14 Alain Magloire <[email protected]>
3545
3546 * grep-2.0a: make an alpha available for testing.
3547
35481997-07-12 Alain Magloire <[email protected]>
3549
3550 * run gettextize: added the po directory filled with *.po files.
3551
3552 * check.sh, scriptgen.awk: fix grep paths.
3553
3554 * change the directory strucure: grep is now in src to comply with
3555 gettext.m4.
3556
3557 * grep.c version.c [VERSION]: got rid of version.c,
3558 it is now define via config.h.
3559
3560 * dfa.c: patch to speed up initialization.
3561 Arnold Robbins ([email protected]).
3562
35631997-07-09 Alain Magloire <[email protected]>
3564
3565 * *.c [HAVE_CONFIG_H]: Macro defined.
3566
3567 * support for I18N in Makefile.am and configure.in.
3568
3569 * update all the string to use gettext(I18N).
3570 Help from Franc,ois Pinard previous patch <[email protected]>.
3571
35721997-07-04 Alain Magloire <[email protected]>
3573
3574 * obstack.[ch]: updated from glibc.
3575 Work of Ulrich Drepper <[email protected]>.
3576
3577 * regex.[ch]: updated from glibc.
3578 Work of Ulrich Drepper <[email protected]>.
3579
3580 * grep.c: for option -e not counting '\n' for new keys.
3581 From Mark Waite <[email protected]>.
3582
3583 * grep.c: for option -f allocating the right count.
3584 From Andreas Schwab <[email protected]>.
3585 Mike Heartel ([email protected]).
3586
3587 * kwset.c (bmexec): Cast tp[-2] to unsigned char before comparing.
3588 From Jim Meyering <[email protected]>.
3589
3590 * grep.1: various typos.
3591 From Keith Bostic <[email protected]>.
3592 Mike Heartel ([email protected]).
3593
35941997-06-17 Alain Magloire <[email protected]>
3595
3596 * grep.c: support for long options.
3597 patch done by Franc,ois Pinard <[email protected]>.
3598
3599 * add getopt1.c in Makefile.am.
3600 Noted by Franc,ois Pinard <[email protected]>
3601
3602 * replace getopt.[ch] and add getopt1.c.
3603
3604 * kwset.c: undef malloc before define it.
3605 Franc,ois Pinard <[email protected]>.
3606
36071997-06-07 Alain Magloire <[email protected]>
3608
3609 * grep.c: format incorrect in
3610 fprintf("%s: warning: %s: %s...", filename, strerror(errno)).
3611 Mike Heartel ([email protected]).
3612
36131996-11-19 David J MacKenzie <[email protected]>
3614
3615 * make.com: Set the logical SYS. From [email protected] (Rodney Brown).
3616
3617 * grep.c (S_ISREG): Define if not defined already, for e.g.
3618 SunOS 4.0.3.
3619
3620 * dfa.c (test_bit, set_bit, clear_bit): Renamed from tstbit,
3621 setbit, clrbit to avoid conflict with HP-UX sys/param.h macros.
3622
3623 * memchr.c: New file, from GNU libc.
3624 * grep.c (memchr): Remove definition.
3625 * configure.in: Use AC_REPLACE_FUNCS for memchr.
3626
3627 * configure.in: Remove unused checks for memalign and unsigned char.
3628 * grep.c: HAVE_WORKING_MMAP -> HAVE_MMAP.
3629
3630 * system.h: New file.
3631 * dfa.c, kwset.c, grep.c, search.c: Use it instead of duplicating
3632 portability boilerplate.
3633
3634 * grep.c: Include sys/types.h once, instead of three times
3635 conditionally.
3636 * dfa.c, kwset.c, search.c: Include sys/types.h unconditionally,
3637 to always try to get size_t (needed on some old SysV's).
3638
3639 * dfa.c: Define strchr in terms of index, not the other way around.
3640 * search.c: Use memcpy instead of bcopy.
3641
36421996-11-15 David J MacKenzie <[email protected]>
3643
3644 * Many files: Update FSF address.
3645 Update configuration to use autoconf v2 and automake.
3646
36471993-05-22 Mike Haertel <[email protected]>
3648
3649 * Version 2.0 released.
3650
3651Copyright (C) 1998-2021 Free Software Foundation, Inc.
3652Copying and distribution of this file, with or without modification,
3653 are permitted provided the copyright notice and this notice are preserved.
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette