ChangeLog revision 55360
155360Sobrien1999-11-18 Paul Eggert 255360Sobrien 355360Sobrien * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a 455360Sobrien problem with the QNX 4.25 shell, which doesn't propagate exit 555360Sobrien status of failed commands inside shell assignments. 655360Sobrien 755360Sobrien1999-11-13 Eli Zaretskii 855360Sobrien 955360Sobrien * doc/grep.texi: Minor markup and spelling corrections. Use 1055360Sobrien @noindent where appropriate. 1155360Sobrien 1255360Sobrien * PATCHES-{AM,AC}: rename to PATCHES.{AM,AC} 1355360Sobrien 1455360Sobrien1999-11-12 Eli Zaretskii 1555360Sobrien 1655360Sobrien doc/grep.texi: Minor fixes and typos corrected. 1755360Sobrien djgpp/README: Updated version. 1855360Sobrien 1955360Sobrien1999-11-07 Paul Eggert 2055360Sobrien 2155360Sobrien * src/grep.c (usage): Fix misspelling. 2255360Sobrien 2355360Sobrien1999-11-07 Paul Eggert 2455360Sobrien 2555360Sobrien Don't assume that the C library has re_set_syntax and friends. 2655360Sobrien * src/Makefile.am (base_sources): Add regex.c, regex.h. 2755360Sobrien (EXTRA_DIST): Remove regex.c, regex.h. 2855360Sobrien 2955360Sobrien * src/grep.c (prtext): Use out_quiet, not not_text, to decide 3055360Sobrien whether to set pending to zero at the end. 3155360Sobrien (not_text): Remove static variable, undoing latest change. 3255360Sobrien (grep): Likewise. 3355360Sobrien 3455360Sobrien * doc/grep.texi: Tighten up the text, and fix some minor 3555360Sobrien spelling and usage errors. Use @enumerate rather than @table 3655360Sobrien @samp, since it's better for Q&A format. Add cross 3755360Sobrien references. 3855360Sobrien 3955360Sobrien1999-11-01 Alain Magloire 4055360Sobrien 4155360Sobrien * src/search.c: Use the more portable [[:alnum:]] 4255360Sobrien to define a word instead of Ascii dependent [0-9A-Za-z] 4355360Sobrien * src/grep.c: make not_text global to not display text when 4455360Sobrien the context switches -A/-B/-C are use on binary files. 4555360Sobrien * make grep-2.3g available for testing. 4655360Sobrien * configure.in: drop support for --without-included-regex. 4755360Sobrien This was generating bogus bug reports, since many GNU/Linux 4855360Sobrien users have different version of glibc. And glibc maintainers 4955360Sobrien decided to drop k&r support. 5055360Sobrien 5155360Sobrien1999-11-01 Arnold D. Robbins 5255360Sobrien 5355360Sobrien * regex.c (init_syntax_once): move below definition of 5455360Sobrien ISALNUM etc., then use ISALNUM to init the table, so that 5555360Sobrien the word ops will work if i18n'ed. 5655360Sobrien (SYNTAX): And subscript with 0xFF for Latin-1 characters. 5755360Sobrien 5855360Sobrien1999-10-26 Alain Magloire 5955360Sobrien 6055360Sobrien * src/regex.c: Merge changes from GNU lib C. 6155360Sobrien * Updated the *.po files 6255360Sobrien 6355360Sobrien1999-10-26 Paul Eggert 6455360Sobrien 6555360Sobrien * src/grep.c (fillbuf): Don't report buffer size overflow if 6655360Sobrien newalloc == save and maxalloc == save. This can happen 6755360Sobrien e.g. when reading a large page-aligned file that contains 6855360Sobrien no newlines. 6955360Sobrien 7055360Sobrien1999-10-21 Paul Eggert 7155360Sobrien 7255360Sobrien * src/grep.c (usage): Give example. Clarify -F. 7355360Sobrien Explain exit status more clearly. 7455360Sobrien 7555360Sobrien1999-10-12 Paul Eggert 7655360Sobrien 7755360Sobrien * doc/grep.texi: Shorten the commentary about egrep and {. 7855360Sobrien "BSD grep" -> "traditional grep". 7955360Sobrien * doc/grep.1: Match recent changes to grep.texi. 8055360Sobrien 8155360Sobrien1999-10-11 Paul Eggert 8255360Sobrien 8355360Sobrien * NEWS, doc/grep.1, doc/grep.texi: New option --mmap. 8455360Sobrien * src/grep.c (mmap_option): New variable. 8555360Sobrien (long_options, reset, usage): Add --mmap. 8655360Sobrien Default is now read, not mmap. 8755360Sobrien 8855360Sobrien * doc/grep.1: Document -Z or --null. 8955360Sobrien 9055360Sobrien1999-10-11 Paul Eggert 9155360Sobrien 9255360Sobrien * doc/grep.texi: Fix texinfo glitches. POSIX -> POSIX.2 where 9355360Sobrien appropriate. 9455360Sobrien 9555360Sobrien1999-10-11 Paul Eggert 9655360Sobrien 9755360Sobrien * acconfig.h (ssize_t): New #undef. 9855360Sobrien 9955360Sobrien * configure.in (AC_CHECK_TYPE): Add ssize_t. 10055360Sobrien 10155360Sobrien * src/grep.c (PREFERRED_SAVE_FACTOR): New macro. 10255360Sobrien (reset): If the buffer has already been allocated, set bufsalloc to 10355360Sobrien be bufalloc / PREFERRED_SAVE_FACTOR. This avoids problems when 10455360Sobrien bufsalloc == bufalloc (possible after reading a large binary file). 10555360Sobrien (reset): Use PREFERRED_SAVE_FACTOR instead of magic constant. 10655360Sobrien Do not set bufbeg; nobody uses it. 10755360Sobrien Always set buflim. 10855360Sobrien Check for lseek error. 10955360Sobrien Use SEEK_CUR, not a magic constant. 11055360Sobrien (fillbuf): Return an error indication, not a count. 11155360Sobrien All callers changed. 11255360Sobrien Do not assume ssize_t fits in int. 11355360Sobrien Use PREFERRED_SAVE_FACTOR instead of magic constant. 11455360Sobrien Clean up mmap code. 11555360Sobrien Do not attempt to mmap zero bytes. 11655360Sobrien Check for lseek error. 11755360Sobrien Use SEEK_SET, not a magic constant. 11855360Sobrien Work correctly if read is interrupted. 11955360Sobrien (grepfile): Work correctly if open or close is interrupted. 12055360Sobrien 12155360Sobrien * src/system.h (SEEK_SET, SEEK_CUR): New macros. 12255360Sobrien 12355360Sobrien1999-10-02 Alain Magloire 12455360Sobrien 12555360Sobrien * src/regex.[ch]: upgrade from GNU lib C source tree. 12655360Sobrien 12755360Sobrien * make beta 2.3f available. 12855360Sobrien 12955360Sobrien1999-10-02 Paul Eggert 13055360Sobrien 13155360Sobrien * NEWS: egrep is now equivalent to `grep -E'. 13255360Sobrien The lower bound of an interval is not optional. 13355360Sobrien You can specify a matcher multiple types without error. 13455360Sobrien -u and -U are now allowed on non-DOS hosts, and have no effect. 13555360Sobrien * doc/grep.texi: Likewise. 13655360Sobrien * doc/grep.1: Likewise. 13755360Sobrien Fix some troff bugs that prevented `groff' from rendering the page. 13855360Sobrien 13955360Sobrien * src/egrepmat.c, src/fgrepmat.c, src/grepmat.c (default_matcher): 14055360Sobrien Remove. 14155360Sobrien (matcher): Add. 14255360Sobrien * src/grep.h (default_matcher): Remove. 14355360Sobrien (matcher): Now exported from ?grepmat.c, not grep.c. 14455360Sobrien 14555360Sobrien * src/dfa.c (lex): If { would start an invalid interval specification, 14655360Sobrien treat it as a normal character. 14755360Sobrien Remove (broken) support for {,M} meaning {0,M}. 14855360Sobrien Diagnose bogus intervals like {1,0}. 14955360Sobrien (closure): maxrep is now -1 to indicate no limit, not zero; 15055360Sobrien zero is a valid value for maxrep, meaning an upper bound of zero. 15155360Sobrien 15255360Sobrien * src/grep.c (short_options): New constant. 15355360Sobrien (long_options, main): -u and -U are now supported on Unix, 15455360Sobrien with no effect. 15555360Sobrien (matcher): Removed; now defined by ?grepmat.c. 15655360Sobrien (install_matcher): Renamed from setmatcher. 15755360Sobrien (setmatcher): New function. 15855360Sobrien (usage): Report new, more uniform option scheme. 15955360Sobrien (main): Do not initialize matcher; ?grepmat.c now does this. 16055360Sobrien Rely on setmatcher to catch matcher conflicts. 16155360Sobrien Default matcher is "grep". 16255360Sobrien 16355360Sobrien * src/search.c (matchers): 16455360Sobrien Remove "posix-egrep" matcher; no longer needed. 16555360Sobrien (Ecompile): Likewise. 16655360Sobrien The egrep matcher now has POSIX behavior. 16755360Sobrien 16855360Sobrien * tests/bre.tests: grep '\{' is no longer an error. 16955360Sobrien Fix test for interval too large, and enable it. 17055360Sobrien * tests/ere.tests: grep -E {1 is no longer an error 17155360Sobrien Likewise for a{1, a{1a, a{1a}, a{1,x}. 17255360Sobrien 17355360Sobrien1999-09-22 Paul Eggert 17455360Sobrien 17555360Sobrien * largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC 17655360Sobrien 2.95.1 bug with HP-UX 10.20. 17755360Sobrien 17855360Sobrien1999-09-12 Paul Eggert 17955360Sobrien 18055360Sobrien * src/grep.c (fillbuf): Fix typo: we sometimes reported 18155360Sobrien arithmetic overflow even when there wasn't any. 18255360Sobrien 18355360Sobrien1999-09-12 Paul Eggert 18455360Sobrien 18555360Sobrien * configure.in (AC_CHECK_FUNCS): Add memmove. 18655360Sobrien 18755360Sobrien * src/system.h (S_ISREG): New macro. 18855360Sobrien (memmove): Define if ! defined HAVE_MEMMOVE && ! defined memmove, 18955360Sobrien not if !defined STDC_HEADERS. This is needed for SunOS 4.1.4, 19055360Sobrien which defines STDC_HEADERS but lacks memmove. 19155360Sobrien 19255360Sobrien * src/grep.c (bufoffset): Needed even if !defined HAVE_MMAP. 19355360Sobrien (reset): Always fstat the file, since we always need its size if it is 19455360Sobrien regular. 19555360Sobrien Similarly, get the buffer offset of every regular file. 19655360Sobrien Set bufmapped to 0 if the file's initial offset is not a multiple 19755360Sobrien of the page size. 19855360Sobrien (fillbuf): Calculate an upper bound on how much memory we should 19955360Sobrien allocate only for regular files, since we don't know the sizes of 20055360Sobrien other files. 20155360Sobrien Don't bother to check whether the file offset is a multiple of the page 20255360Sobrien size, since we now do that just once in `reset'. 20355360Sobrien When an mmapped area would fall past the end of the file, trim it to 20455360Sobrien just before instead of giving up immediately and doing a `read'; 20555360Sobrien that avoids a worst-case behavior that could read half an mmapped file. 20655360Sobrien Fix bug when computing offsets on hosts that don't have mmap. 20755360Sobrien 20855360Sobrien1999-08-27 Paul Eggert 20955360Sobrien 21055360Sobrien * src/system.h (memmove): New macro. 21155360Sobrien 21255360Sobrien * src/grep.c (page_alloc): Reallocate the old buffer instead 21355360Sobrien of having both old and new buffers active simultaneously. 21455360Sobrien Remove valloc debugging variant, which no longer applies. 21555360Sobrien 21655360Sobrien (fillbuf): Rejigger the buffer allocation mechanism. The old 21755360Sobrien mechanism could allocate more than 10*N bytes for an N-byte 21855360Sobrien file, which was excessive. Check for arithmetic overflow a 21955360Sobrien bit more carefully. 22055360Sobrien 22155360Sobrien1999-08-25 Paul Eggert 22255360Sobrien 22355360Sobrien * src/grep.c (grepdir): 22455360Sobrien Don't assume that st_ino and st_dev must be integers; 22555360Sobrien POSIX.1 allows them to be floating-point (!). 22655360Sobrien 22755360Sobrien * src/vms_fab.h (arr_ptr): `:' -> `;' to fix typo. 22855360Sobrien 22955360Sobrien1999-08-18 Alain Magloire 23055360Sobrien 23155360Sobrien * 2.3e snapshot. 23255360Sobrien 23355360Sobrien1999-08-18 Alain Magloire 23455360Sobrien 23555360Sobrien * src/search.c: On a CRAY J90 system running UNICOS 8.0. 23655360Sobrien Compilation of ./src/search.c failed because the declaration of 23755360Sobrien the variable "regex": 23855360Sobrien static struct re_pattern_buffer regex; 23955360Sobrien conflicted with a previous declaration search.c #includes "system.h", 24055360Sobrien which #includes <stdlib.h>, which declares : 24155360Sobrien extern char *regex __((char *_Re, char *_Subject, ...)); 24255360Sobrien The declaration in search.c is local to that one source file. 24355360Sobrien I just changed its name to something less likely to conflict. 24455360Sobrien (I called it "regexbuf", but you could pick any name you want.) 24555360Sobrien Excerpt email from Dean Kopesky. 24655360Sobrien 24755360Sobrien1999-08-16 Paul Eggert 24855360Sobrien 24955360Sobrien Upgrade large-file support to the version used in tar and 25055360Sobrien textutils. 25155360Sobrien 25255360Sobrien * Makefile.am (ACLOCAL_AMFLAGS): Define to be empty. 25355360Sobrien (M4DIR, ACINCLUDE_INPUTS): New macros. 25455360Sobrien ($(srcdir)/acinclude.m4): New rule. 25555360Sobrien 25655360Sobrien * configure.in (AC_CANONICAL_HOST, AM_C_PROTOTYPES): Add. 25755360Sobrien (AC_SYS_LARGEFILE): Renamed from AC_LFS, for compatibility 25855360Sobrien with what should appear in the next autoconf release. 25955360Sobrien 26055360Sobrien * m4/largefile.m4: Renamed from m4/lfs.m4. 26155360Sobrien 26255360Sobrien * src/ansi2knr.1, src/ansi2knr.c, config.guess, config.sub: 26355360Sobrien New files. config.guess and config.sub ar needed by the new 26455360Sobrien AC_SYS_LARGEFILE. ansi2knr is needed by AM_C_PROTOTYPES, 26555360Sobrien which in turn is needed by the new AC_SYS_LARGEFILE. 26655360Sobrien 26755360Sobrien1999-08-16 Alain Magloire 26855360Sobrien 26955360Sobrien * 2.3d snapshot on ftp server. 27055360Sobrien 27155360Sobrien1999-07-26 Paul Eggert 27255360Sobrien 27355360SobrienSeveral GNU tools have options to process arbitrary file names, even 27455360Sobrienfile names that contain newline characters. These include `find 27555360Sobrien-print0', `perl -0', `sort -z', and `xargs -0'. It'd be handy if GNU 27655360Sobriengrep also processed such file names. Here's a proposed patch to do 27755360Sobrienthis, relative to grep 2.3c. This patch introduces two options, one 27855360Sobrienfor the data, and one for the file names. (Sometimes one wants 27955360Sobriennull-terminated file names in the output, and sometimes one wants to 28055360Sobrienprocess lists of null-terminated strings, and these are orthogonal 28155360Sobrienaxes.) 28255360Sobrien 28355360Sobrien * NEWS, doc/grep.texi: New -z or --null-data and -Z or --null options. 28455360Sobrien * src/grep.c (long_options, usage, main): Likewise. 28555360Sobrien 28655360Sobrien * src/dfa.h (dfasyntax): New eol parameter. 28755360Sobrien * src/dfa.c (eolbyte): New var. 28855360Sobrien (dfasyntax): Set it from new parameter. 28955360Sobrien (lex, dfastat, build_state, dfaexec): Use it instead of '\n'. 29055360Sobrien 29155360Sobrien * src/grep.h (eolbyte): New decl. 29255360Sobrien * src/grep.c (eolbyte): New var. 29355360Sobrien (nlscan, prpending, prtext, grepbuf, grep): Use it instead of '\n'. 29455360Sobrien (filename_mask): New var. 29555360Sobrien (prline, grepfile): Output NUL separator if filename_mask is zero. 29655360Sobrien (grep): Look for '\200' as the hallmark of a binary file, not '\0', 29755360Sobrien if -z or --null-data is specified, since it implies that '\0' is 29855360Sobrien expected as text. 29955360Sobrien 30055360Sobrien * src/search.c (Gcompile, Ecompile): Pass eolbyte to dfasyntax. 30155360Sobrien (EGexecute, Fexecute): Use eolbyte instead of '\n'. 30255360Sobrien 30355360Sobrien1999-06-15 Alain Magloire 30455360Sobrien 30555360Sobrien * src/grep.c, doc/grep{1,texi} : 30655360Sobrien --revert-match should be --invert-match. 30755360Sobrien Correction proposed by Karl Berry. 30855360Sobrien 30955360Sobrien1999-06-12 Alain Magloire 31055360Sobrien 31155360Sobrien * doc/grep.{1,texi}: add description for --with-filename. 31255360Sobrien Noted missing by UEBAYASHI Masao. 31355360Sobrien 31455360Sobrien1999-03-17 Paul Eggert 31555360Sobrien 31655360Sobrien * NEWS: Add GREP_OPTIONS. 31755360Sobrien 31855360Sobrien * doc/grep.texi: Document GREP_OPTIONS, and the other 31955360Sobrien environment variables. Fix doc for [:blank:], [:cntrl:], [:punct:]. 32055360Sobrien 32155360Sobrien * src/grep.c (prepend_args, prepend_default_options): New functions. 32255360Sobrien (main): Use them to implement GREP_OPTIONS. 32355360Sobrien * src/system.h (getenv): New decl. 32455360Sobrien 32555360Sobrien1999-03-16 Volker Borchert 32655360Sobrien 32755360Sobrien * configure.in: Use case case ... esac for checking Visual C++. 32855360Sobrien When ${CC} contains options it was not recognize. 32955360Sobrien 33055360Sobrien1999-03-07 Paul Eggert 33155360Sobrien 33255360Sobrien * src/grep.c (usage): Don't report -E, -F, and -G unless we're grep. 33355360Sobrien (main): Don't match options -E, -F, and -G unless we're grep. 33455360Sobrien Remove after-the-fact check for options -E, -F, and -G, since 33555360Sobrien they're no longer needed. 33655360Sobrien 33755360Sobrien1999-03-05 Eli Zaretskii 33855360Sobrien 33955360Sobrien * src/grep.c (main): Print the name of the default matcher instead 34055360Sobrien of just "grep". 34155360Sobrien 34255360Sobrien1999-02-06 Alain Magloire 34355360Sobrien 34455360Sobrien * tests/*.awk : Linux users are seeing "Broken Pipe" on make check. 34555360Sobrien The problem is that grep does not drain its stdin, thus the previous 34655360Sobrien process in the pipeline receives a SIGPIPE. Other shells are silent 34755360Sobrien about this. There is actually no failure, since the broken pipe is 34855360Sobrien expected. You can work around it by changing the pipeline, so that 34955360Sobrien the input is drained, like this: 35055360Sobrien status=`echo 'check' | { ${GREP} -E -e pattern >/dev/null 2>&1; 35155360Sobrien echo $?; cat >/dev/null; }`; if test $status -ne $errnu then ... fi 35255360Sobrien Excerpt email from Andreas Schwab. 35355360Sobrien 35455360Sobrien1999-02-23 Alain Magloire 35555360Sobrien 35655360Sobrien * src/grep.c : Restrict the use of -E, -F, -G 35755360Sobrien to only grep driver, Posix behaviour. {f,e}grep 35855360Sobrien the matcher is already set. This change may brake 35955360Sobrien scripts, warn in NEWS. 36055360Sobrien 36155360Sobrien * doc/grep.{1,texi} : -C takes arguments, upgrade manual. 36255360Sobrien 36355360Sobrien * beta 2.3a 36455360Sobrien 36555360Sobrien1999-02-23 Alain Magloire 36655360Sobrien 36755360Sobrien * configure.in : Change the configure VC test from 36855360Sobrien 'test x$ac_cv_prog_CC = xcl;' to 'test x"$ac_cv_prog_CC" = xcl;' 36955360Sobrien Email from Joshua R. Poulson. 37055360Sobrien 37155360Sobrien1999-02-23 Paul Eggert 37255360Sobrien 37355360Sobrien Fix porting bug reported by Amakawa Shuhei for SunOS 4.1.4-JL. 37455360Sobrien The btowc.c shipped with grep 2.3 is incorrect for Solaris 37555360Sobrien 2.5.1 and earlier, as it assumes UTF8, which these OSes do not 37655360Sobrien support. Solaris 7 supports btowc, so there's no need to ship 37755360Sobrien a substitute for it. The only questionable case is Solaris 37855360Sobrien 2.6, which lacks btowc but does support UTF8. However, 2.6 37955360Sobrien supports UTF8 but only as a demonstration (for an English 38055360Sobrien locale!); Japanese Solaris 2.6 users typically use EUC, or 38155360Sobrien sometimes shift-JIS, but they cannot use UTF8 since Japanese 38255360Sobrien UTF8 is not supported. Hence there's no point to having grep 38355360Sobrien substitute a btowc that uses UTF8, as it is either redundant, 38455360Sobrien or it will almost invariably have incorrect behavior. 38555360Sobrien 38655360Sobrien * configure.in (AC_CHECK_HEADERS): Don't set USE_WCHAR. 38755360Sobrien (AC_CHECK_FUNCS): Add btowc, wctype. 38855360Sobrien (AC_REPLACE_FUNCS): Don't replace btowc; our replacement is 38955360Sobrien invariably doing the wrong thing anyway, at least on SunOS/Solaris. 39055360Sobrien Don't bother to check for wctype in -lw, as we don't support 39155360Sobrien wide characters on Solaris 2.5.1 or earlier anyway. 39255360Sobrien 39355360Sobrien * bootstrap/Makefile.try (OBJS): Remove btowc.$(OBJEXT). 39455360Sobrien 39555360Sobrien * src/btowc.c: Removed; no longer needed. 39655360Sobrien 39755360Sobrien1999-02-19 Paul Eggert 39855360Sobrien 39955360Sobrien * NEWS: Fix typo when talking about the old behavior of 40055360Sobrien silently skipping directories; it was grep 2.1, not grep 2.2. 40155360Sobrien 40255360Sobrien1999-02-15 Alain Magloire 40355360Sobrien 40455360Sobrien * bootstrap/Makefile.try : add DJGPP DEFS. 40555360Sobrien Done by Elie Zaretsckii. 40655360Sobrien 40755357Sobrien1999-02-14 Alain Magloire 40855357Sobrien 40955357Sobrien * m4/gettext.m4 : Guard [] with changequote. 41055357Sobrien From Elie Zaretskii. 41155357Sobrien 41255357Sobrien * djgpp/config.bat : Makefile.in.in --> Makefile.in-in 41355357Sobrien From Elie Zaretskii. 41455357Sobrien 41555357Sobrien * src/dosbuf: k&r function parameter. 41655357Sobrien 41755357Sobrien * release of 2.3. 41855357Sobrien 41955357Sobrien1999-02-10 Alain Magloire 42055357Sobrien 42155357Sobrien * bootstrap/{Makefile{try,am},REAMDE} : skeleton 42255357Sobrien provided for system lacking the tools to autoconfigure. 42355357Sobrien 42455357Sobrien * src/{e,f,}grepmat.c: added guard [HAVE_CONFIG_H] 42555357Sobrien 42655357Sobrien1999-02-10 Alain Magloire 42755357Sobrien 42855357Sobrien * PATCHES-AC, PATCHES-AM: updated. 42955357Sobrien 43055357Sobrien * m4/regex.m4 : updated. 43155357Sobrien 43255357Sobrien1999-02-05 Eli Zaretskii 43355357Sobrien 43455357Sobrien * m4/gettext.m4 : Support DOS-style D:/foo/bar absolute file 43555357Sobrien names. 43655357Sobrien 43755357Sobrien * aclocal.m4 (DJGPP) : Use $DJ_GPP instead, since changing the 43855357Sobrien latter prevents GCC from finding headers and libraries. 43955357Sobrien 44055357Sobrien * djgpp/config.bat: Make building from another directory work 44155357Sobrien 44255357Sobrien * djgpp/config.sed: Remove redundant command wich edited path 44355357Sobrien separator: now done by configure. 44455357Sobrien 44555357Sobrien * src/grep.c [O_BINARY]: Add prototype for undossify_input. 44655357Sobrien 44755357Sobrien * doc/grep.texi (Introduction): Typo fixed. 44855357Sobrien 44955357Sobrien1999-02-03 Alain Magloire 45055357Sobrien 45155357Sobrien * grep-2.2f beta release. 45255357Sobrien 45355357Sobrien1999-02-02 Alain Magloire 45455357Sobrien 45555357Sobrien * m4/{djgpp,envsep,glibc,regex,dosfile,isc-posix}.m4 : 45655357Sobrien New files to aid configuration and unload configure.in. 45755357Sobrien * m4/Makefile.am : updated. 45855357Sobrien * src/btowc.c : protect for wchar.h 45955357Sobrien 46055357Sobrien1999-01-28 Alain Magloire 46155357Sobrien 46255357Sobrien * intl/Makefile.in: Replace .o with .${ac_objext} where necessary. 46355357Sobrien Work around a limitation of Visual C++ on Cygwin32. 46455357Sobrien * acconfig.h configure.in: Define `alloca' as `_alloca' when CC=cl. 46555357Sobrien This little hack was suggested by Ian Roxborough <irox@cygnus.com>. 46655357Sobrien Patch forwarded by Ben Elliston. 46755357Sobrien 46855357Sobrien1999-01-28 Alain Magloire 46955357Sobrien 47055357Sobrien * PATCHES-AM: New file. A small patch for automake-1.4, use $(sep) 47155357Sobrien as the path separator base on @SEP@. 47255357Sobrien * PATCHES-AC configure.in : updated for autoconf-13. 47355357Sobrien 47455357Sobrien1999-01-27 Volker Borchert 47555357Sobrien 47655357Sobrien * grep.c: fgrep -NUM not working correctly. 47755357Sobrien add the argument number to digit_args_val. 47855357Sobrien 47955357Sobrien1999-01-22 Paul Eggert 48055357Sobrien 48155357Sobrien Prevent grep -r from recursing infinitely through directory loops via 48255357Sobrien symbolic links. 48355357Sobrien 48455357Sobrien * grep.c (struct stats): New type. 48555357Sobrien (stats_base): New var. 48655357Sobrien (bufstat): Remove; subsumed by stats->stat. 48755357Sobrien (reset, fillbuf, grep, grepdir, grepfile): Pass struct stats * arg, 48855357Sobrien for directory loop checking; use this instead of the bufstat global. 48955357Sobrien All callers changed. 49055357Sobrien (grepfile): Stat the file before invoking grepdir. 49155357Sobrien (grepdir): Assume that the argument has already been statted. 49255357Sobrien No longer a need for a directory size argument, since it 49355357Sobrien can be gotten from the struct stats * argument. 49455357Sobrien Check for directory loops. 49555357Sobrien Create linked list of directories currently being visited, 49655357Sobrien to detect loops. 49755357Sobrien 49855357Sobrien1998-12-29 Kaveh R. Ghazi 49955357Sobrien 50055357Sobrien intl/localealias.c: When building grep-2.2e using cc on Irix4, 50155357Sobrien I needed the following patch to intl/localealias.c. 50255357Sobrien (Its the same patch used by fileutils-4.0.) The patch resolves 50355357Sobrien conflicts between char* and unsigned char* in the i18n code. 50455357Sobrien 50555357Sobrien1998-12-10 Alain Magloire 50655357Sobrien 50755357Sobrien * src/grep.c : Typo in contex -->context 50855357Sobrien Noted by Vladimir Michl. 50955357Sobrien 51055357Sobrien1998-12-01 Alain Magloire 51155357Sobrien 51255357Sobrien * doc/Makefile.am djgpp/Makefile.am m4/Makefile.am vms/Makefile.am: 51355357Sobrien New files. 51455357Sobrien 51555357Sobrien * m4/progtest.m4: proctect '[]' from m4. 51655357Sobrien Noted by Eli Z. 51755357Sobrien 51855357Sobrien * PATCHES-AC: New file, add the patch for autoconf in the dist. 51955357Sobrien 52055357Sobrien * acconfig.h: (HAVE_DOS_FILENAME) 52155357Sobrien 52255357Sobrien * TODO: updated. 52355357Sobrien 52455357Sobrien * src/search.c: remove obsolete 'gegrep,ggrep,gnugrep' 52555357Sobrien matchers. grep no longer depend on argv[0]. 52655357Sobrien 52755357Sobrien * grep-2.2e beta to test DJGPP port. 52855357Sobrien 52955357Sobrien1998-11-28 Paul Eggert 53055357Sobrien 53155357Sobrien Various portability enhancements: 53255357Sobrien - Don't assume that O_BINARY implies DOS. Use separate 53355357Sobrien macros D_OK (for DOS-like directory access) and 53455357Sobrien HAVE_DOS_FILE_NAMES (for DOS-like file names). 53555357Sobrien - Don't assume that off_t fits into long; it doesn't on Solaris 2.6. 53655357Sobrien - Have is_EISDIR set errno properly on hosts with screwed-up EISDIR. 53755357Sobrien - Treat ':' specially in DOS file names only if it's the end of a 53855357Sobrien drive specifier. 53955357Sobrien - Protect against errno < 0. 54055357Sobrien 54155357Sobrien * src/grep.c (is_EISDIR): Move defn to system.h. 54255357Sobrien (print_offset_sep): New function. 54355357Sobrien (fillbuf): Remove redundant test of O_BINARY. 54455357Sobrien (totalcc, totalnl): Now of type off_t. 54555357Sobrien (prline): Use print_offset_sep to print file offsets. 54655357Sobrien (grepfile): Don't set e to EISDIR; that's is_EISDIR's responsibility 54755357Sobrien on machines that don't work properly with EISDIR. 54855357Sobrien (grepdir): Don't assume ':' means slash on all DOS filenames; 54955357Sobrien it means it only in the file prefix. 55055357Sobrien 55155357Sobrien * src/system.h (strerror): Check for negative error numbers. 55255357Sobrien (is_EISDIR): Depend on D_OK, not O_BINARY. 55355357Sobrien (SET_BINARY): Depend on HAVE_SETMODE, not __DJGPP__. 55455357Sobrien (IS_SLASH, FILESYSTEM_PREFIX_LEN): Depend on HAVE_DOS_FILE_NAMES, 55555357Sobrien not O_BINARY. 55655357Sobrien (CHAR_BIT): New macro. 55755357Sobrien 55855357Sobrien * src/dosbuf.c (struct dos_map): 55955357Sobrien pos and add members are now of type off_t. 56055357Sobrien (dos_stripped_crs): Now of type off_t. 56155357Sobrien (dossified_pos): Now accepts arg and returns value of type off_t. 56255357Sobrien 56355357Sobrien * configure.in (AC_CHECK_FUNCS): Add setmode. 56455357Sobrien (HAVE_DOS_FILENAMES): New macro 56555357Sobrien 56655357Sobrien1998-11-27 Eli Zaretskii 56755357Sobrien 56855357Sobrien * djgpp/config.sed: New file, a Sed script to edit configure 56955357Sobrien script before running it on DOS/Windows. 57055357Sobrien * djgpp/config.bat: Updated to handle po2tbl.sed.in and 57155357Sobrien po/Makefile.in.in on DOS filesystems, and to run config.sed. 57255357Sobrien 57355357Sobrien1998-11-24 Jim Meyering 57455357Sobrien 57555357Sobrien * src/grep.c : Typo s/infalid/invalid/ 57655357Sobrien Also noted by Stanislav Brabec. 57755357Sobrien 57855357Sobrien1998-11-24 Eli Zaretskii 57955357Sobrien 58055357Sobrien * doc/grep.texi: I found and corrected several typos. 58155357Sobrien I believe the GNU standards require the section that describes the 58255357Sobrien options to the programs to be called ``Invoking'' or ``Invoking 58355357Sobrien <program-name>''. This is so users and programs can easily find 58455357Sobrien that node in any Info file. So I changed the name of the 58555357Sobrien `Options' chapter to `Invoking', and corrected the 58655357Sobrien cross-references accordingly. 58755357Sobrien I added some markup to things like file names and options. 58855357Sobrien I added some additional index entries where that seemed useful. 58955357Sobrien I also corrected some index entries, such as "@cindex [:alnum:]", 59055357Sobrien which used a colon in them (the colons confuse Info readers). 59155357Sobrien 59255357Sobrien1998-11-24 Alain Magloire 59355357Sobrien 59455357Sobrien * grep/doc/grep.texi : -h is not use for help. 59555357Sobrien Nit spotted by Jim Meyering. 59655357Sobrien 59755357Sobrien1998-11-23 Alain Magloire 59855357Sobrien 59955357Sobrien * doc: New directory, grep.1, {e,f}grep.man move here 60055357Sobrien * doc/grep.texi: New info manual 60155357Sobrien * doc/version.texi: New 60255357Sobrien * doc/Makefile.am: New 60355357Sobrien * tests/{ere,bre}.*: New files. The spencer2 test is split 60455357Sobrien in two ere/bre. 60555357Sobrien * config.hin: New, config.h.in rename to config.hin for OS 60655357Sobrien with limited file system aka DOS. 60755357Sobrien 60855357Sobrien * grep-2.2d release for beta. 60955357Sobrien 61055357Sobrien1998-11-18 Alain Magloire 61155357Sobrien 61255357Sobrien * src/regex.[ch] : Updated from GLibc, previous patches were 61355357Sobrien integrate by Ulrich Drepper and some added ones. 61455357Sobrien 61555357Sobrien1998-11-16 Paul Eggert 61655357Sobrien 61755357Sobrien * grep.h (__attribute__): New macro, if not GCC. 61855357Sobrien (fatal): Add __attribute__((noreturn)). 61955357Sobrien * grep.c (usage): Add __attribute__((noreturn)). 62055357Sobrien 62155357Sobrien1998-11-16 Paul Eggert 62255357Sobrien 62355357Sobrien Remove memory leak with valloced buffers, by invoking malloc instead. 62455357Sobrien 62555357Sobrien * configure.in (AC_CHECK_FUNCS), src/system.h (valloc): Remove. 62655357Sobrien * src/grep.c (page_alloc): New function. 62755357Sobrien (ubuffer, pagesize): New vars. 62855357Sobrien (ALIGN_TO): New macro. 62955357Sobrien (reset): Initialize new vars. Check for overflow in buffer size calc. 63055357Sobrien Use page_alloc instead of valloc. 63155357Sobrien (fillbuf): Likewise. Use memcpy to copy saved area. 63255357Sobrien 63355357Sobrien1998-11-15 Paul Eggert 63455357Sobrien 63555357Sobrien * dfa.c (dfacomp), search.c (EGexecute): Don't assume char is unsigned. 63655357Sobrien 63755357Sobrien1998-11-14 Paul Eggert 63855357Sobrien 63955357Sobrien * src/grep.c (grepdir): Fix bug: memory freed twice. 64055357Sobrien 64155357Sobrien * src/search.c (Gcompile, Ecompile): Don't invoke dfainit, 64255357Sobrien since dfacomp does it for us, and if we also do it then we 64355357Sobrien leak memory. 64455357Sobrien 64555357Sobrien1998-11-13 Eli Zaretskii 64655357Sobrien 64755357Sobrien * djgpp/config.bat: Rewrite to run the configure script via Bash. 64855357Sobrien * djgpp/config.site, djgpp/getconf: New files. 64955357Sobrien * djgpp/config.h, djgpp/*.mak, djgpp/po2tbl.sed: Remove. 65055357Sobrien * djgpp/README: Update instructions. 65155357Sobrien 65255357Sobrien * Makefile.am (EXTRA_DIST): Update the list of DJGPP files. 65355357Sobrien 65455357Sobrien * src/system.h (IS_SLASH): New macro. 65555357Sobrien (is_EISDIR): Define it here for DOS and Windows. 65655357Sobrien 65755357Sobrien * src/grep.c (main) [O_BINARY]: Set stdout to binary mode, so the 65855357Sobrien EOL formats of the input and output files match, unless stdout is 65955357Sobrien the console device. 66055357Sobrien (is_EISDIR): Don't define if already defined. Accept a second 66155357Sobrien argument, the file name; all callers changed. 66255357Sobrien (grepdir): Don't free `file', inside the loop. Use IS_SLASH to 66355357Sobrien check whether `dir' needs a slash. 66455357Sobrien (grepfile): If file is a directory, set e to EISDIR. 66555357Sobrien 66655357Sobrien1998-11-10 Alain Magloire 66755357Sobrien 66855357Sobrien * src/vms_fab.{c,h}: New file for VMS wildcard expansion 66955357Sobrien Written by Phillip C. Brisco. 67055357Sobrien 67155357Sobrien * vms/make.com : add line to compile vms_fab.c and 67255357Sobrien {e,f,}grepmat.c with link for each grep/fgrep/egrep. 67355357Sobrien Base on patch send by Phillib C. Brisco. 67455357Sobrien 67555357Sobrien1998-11-09 Alain Magloire 67655357Sobrien 67755357Sobrien * grep-2.2c on alpha for testing. 67855357Sobrien 67955357Sobrien1998-11-09 Paul Eggert 68055357Sobrien 68155357Sobrien * src/grep.1: Fix `Last Change' of output by generating the date 68255357Sobrien from the RCS Id. 68355357Sobrien 68455357Sobrien * src/grep.c (is_EISDIR): New macro. 68555357Sobrien (grep): If -s, suppress errors from trying to read directories. 68655357Sobrien (grepfile): Use is_EISDIR to simplify code. 68755357Sobrien (grepdir): If -s, suppress errors from trying to read directories. 68855357Sobrien 68955357Sobrien * src/grep.1: Fix -q -r -s problems; describe BSD grep better. 69055357Sobrien 69155357Sobrien * src/grep.c (main): Update copyright. 69255357Sobrien 69355357Sobrien Specify default matcher with default_matcher extern var, not 69455357Sobrien DEFAULT_MATCHER macro. This is more straightforward and means 69555357Sobrien we need to compile grep.c just once. 69655357Sobrien 69755357Sobrien * src/egrepmat.c, src/fgrepmat.c, src/grepmat.c: New files. 69855357Sobrien 69955357Sobrien * src/Makefile.am (base_sources): New macro. 70055357Sobrien (egrep_SOURCES, fgrep_SOURCES, grep_SOURCES): Now consist of 70155357Sobrien $(base_sources) plus the single tailoring file. 70255357Sobrien (grep_LDADD, egrep_LDADD, fgrep_LDADD): Remove. 70355357Sobrien (EXTRA_DIST): Remove grep.c, regex.c. 70455357Sobrien (fgrep.o, egrep.o): Remove. 70555357Sobrien 70655357Sobrien * src/grep.h (matcher): Now char const *. 70755357Sobrien (default_matcher): New decl. 70855357Sobrien 70955357Sobrien * src/grep.c (matcher): Now char const *. 71055357Sobrien (setmatcher): Now accepts char const *. 71155357Sobrien (main): Default the matcher from default_matcher (linked externally) 71255357Sobrien rather than DEFAULT_MATCHER (a macro). 71355357Sobrien 71455357Sobrien1998-11-08 Alain Magloire 71555357Sobrien 71655357Sobrien * src/grep.1: `prep.ai.mit.edu' should be replaced with `gnu.org'. 71755357Sobrien Nit from Paul Eggert. 71855357Sobrien 71955357Sobrien1998-11-06 Alain Magloire 72055357Sobrien 72155357Sobrien * src/grep.c: The Matcher is not set to argv[0] but 72255357Sobrien explicitly by a #define MATCHER at compile time default is "grep". 72355357Sobrien 72455357Sobrien * aclocal/: NEW dir. provides our own *.m4 72555357Sobrien 72655357Sobrien * configure.in: Move Paul's Large Files to AC_LFS.(aclocal/lfs.m4) 72755357Sobrien Taken from Jim Meyering fileutils. 72855357Sobrien 72955357Sobrien1998-11-05 Alain Magloire 73055357Sobrien 73155357Sobrien * src/grep.1: update the man pages according to the 73255357Sobrien changes make by Miles. 73355357Sobrien 73455357Sobrien * po/*.po: updated. 73555357Sobrien 73655357Sobrien * first beta release for 2.3 (2.2a). 73755357Sobrien 73855357Sobrien1998-11-04 Miles Bader 73955357Sobrien 74055357Sobrien * src/grep.c (main): Rationalize interaction of -C/-NUM/-A/-B 74155357Sobrien options, and allow -C to have an optional argument. -NUM can 74255357Sobrien now be mixed with -C, and -A, -B always take precedence over 74355357Sobrien -C/-NUM, regardless of order. 74455357Sobrien (long_options): Let -C/--context take an optional argument. 74555357Sobrien 74655357Sobrien1998-11-03 Alain Magloire 74755357Sobrien 74855357Sobrien * src/dfa.c: HP-UX define clrbit/setbit as macros in <sys/param.h> 74955357Sobrien #undef if defined. 75055357Sobrien Fixed by Andreas Ley and Philippe Defert. 75155357Sobrien 75255357Sobrien * src/grep.1 : mention that -s follows POSIX.2 behavior. 75355357Sobrien Noted by Paul Eggert and others. 75455357Sobrien 75555357Sobrien * tests/khadafy.sh: a typo in failure(s). 75655357Sobrien Spotted By Sotiris Vassilopoulos. 75755357Sobrien 75855357Sobrien1998-11-01 Paul Eggert 75955357Sobrien 76055357Sobrien * src/system.h (IN_CTYPE_DOMAIN): New macro. 76155357Sobrien (ISALPHA, ISUPPER, ISLOWER, ISDIGIT, ISXDIGIT, ISSPACE, 76255357Sobrien ISPUNCT, ISALNUM, ISPRINT, ISGRAPH, ISCNTRL): Use 76355357Sobrien IN_CTYPE_DOMAIN instead of isascii. 76455357Sobrien 76555357Sobrien1998-08-18 Paul Eggert 76655357Sobrien 76755357Sobrien Add support for new -r or --recursive (or -d recurse or 76855357Sobrien --directories=recurse) option. 76955357Sobrien 77055357Sobrien * src/Makefile.am (grep_SOURCES): Add savedir.c, savedir.h, stpcpy.c. 77155357Sobrien 77255357Sobrien * src/grep.1: Describe new options. 77355357Sobrien 77455357Sobrien * src/grep.c: Include "savedir.h". 77555357Sobrien (long_options): Add -r or --recursive. 77655357Sobrien (RECURSE_DIRECTORIES): New enum value. 77755357Sobrien (IS_DIRECTORY_ERRNO): Remove. 77855357Sobrien (reset, grep): Add file name arg. 77955357Sobrien (grepdir, grepfile): New functions. 78055357Sobrien (initial_bufoffset): New var. 78155357Sobrien (reset): Initialize it. 78255357Sobrien (fillbuf): Use it. 78355357Sobrien (count_matches, list_files, no_filenames, suppress_errors): New static 78455357Sobrien vars; formerly were local to `main'. 78555357Sobrien (grep): Recurse through directories if the user asks for this. 78655357Sobrien (usage, main): Add new options. 78755357Sobrien (main): Change some local vars to be static, as described above. 78855357Sobrien Move most of the guts into grepfile function. 78955357Sobrien so that it can be recursed through. 79055357Sobrien 79155357Sobrien * configure.in (AC_HEADER_DIRENT, AC_FUNC_CLOSEDIR_VOID): Add. 79255357Sobrien (AC_REPLACE_FUNCS): Add stpcpy. 79355357Sobrien 79455357Sobrien * src/savedir.c, src/savedir.h, src/stpcpy.c: New files; 79555357Sobrien taken from fileutils 3.16u. 79655357Sobrien 79755357Sobrien1998-08-11 Paul Eggert 79855357Sobrien 79955357Sobrien * src/system.h (initialize_main): New macro. 80055357Sobrien * src/grep.c (main): Invoke initialize_main first thing. 80155357Sobrien 80255357Sobrien1998-04-29 Paul Eggert 80355357Sobrien 80455357Sobrien * NEWS, src/grep.1: Describe new -a and -d options. 80555357Sobrien 80655357Sobrien * src/grep.c (long_options, usage, main): 80755357Sobrien New options -d or --directories and -a or --text. 80855357Sobrien (directories, always_text): New variables. 80955357Sobrien (IS_DIRECTORY_ERRNO): New macro. 81055357Sobrien (reset): Now returns value specifying whether to skip this file. 81155357Sobrien Stat the file if either mmap or directory-skipping is possible. 81255357Sobrien Skip the file if it's a directory and we're skipping directories. 81355357Sobrien (grep): Skip the file if `reset' tells us to. 81455357Sobrien (main): If open fails because the file is a directory, and if we're 81555357Sobrien skipping directories, don't report an error. 81655357Sobrien Remove special case for DOS and Windows. 81755357Sobrien 81855357Sobrien * src/dosbuf.c (guess_type): Use the same method for guessing whether a 81955357Sobrien file is binary as grep.c's grep does. 82055357Sobrien There's no longer any need to declare `bp' to be unsigned. 82155357Sobrien 82255357Sobrien1998-04-26 Alain Magloire 82355357Sobrien 82455357Sobrien * grep-2.2 release. 82555357Sobrien 82655357Sobrien * src/dfa.c: Wrong revision was pulled out 82755357Sobrien for beta 2.1.1d. 82855357Sobrien * src/search.c: Wrong revision was pulled out 82955357Sobrien for beta 2.1.1d. 83055357Sobrien 83155357Sobrien * src/grep.c: ck_atoi () added instead of atoi (). 83255357Sobrien Suggestion from Jim Meyering. 83355357Sobrien ck_atoi () pulled from diffutils-2.7, maintained by Paul Eggert. 83455357Sobrien 83555357Sobrien * AUTHORS: Rephrase of some sentences. 83655357Sobrien * README: Rewording. 83755357Sobrien Noted and patched by Joel N. Weber II. 83855357Sobrien 83955357Sobrien1998-04-17 Kaveh R. Ghazi 84055357Sobrien 84155357Sobrien * src/dfa.h: Don't define `const', trust autoconf to handle it. 84255357Sobrien 84355357Sobrien1998-04-16 Alain Magloire 84455357Sobrien 84555357Sobrien * tests/{status,empty}.sh: wrong return status. 84655357Sobrien 84755357Sobrien * src/grep.c: Remove the REGEX part in usage (), it was 84855357Sobrien consider overkill by most. 84955357Sobrien 85055357Sobrien1998-04-14 Eli Zaretskii 85155357Sobrien 85255357Sobrien * djgpp/config.bat: Support file names with multiple dots on all 85355357Sobrien platforms. 85455357Sobrien 85555357Sobrien * djgpp/README: Add instructions about file names illegal on 85655357Sobrien MS-DOS. 85755357Sobrien 85855357Sobrien1998-04-13 Alain Magloire 85955357Sobrien 86055357Sobrien * src/dfa.c: by "popular" demand reverse 86155357Sobrien back to '_' not word-constituent. 86255357Sobrien 86355357Sobrien * grep-2.1.1c available for testing. 86455357Sobrien 86555357Sobrien1998-04-13 Karl Heuer 86655357Sobrien 86755357Sobrien * src/grep.c: (a) The directory check is done too early: 86855357Sobrien logically, if the argument is "-", then it refers to standard 86955357Sobrien input, regardless of whether there's something in the file 87055357Sobrien system answering to "-". 87155357Sobrien (b) The sh command "grep -l root /etc/passwd /etc/group 0<&-" 87255357Sobrien prints "(standard input)" instead of "/etc/passwd", because it 87355357Sobrien mistakenly believes that a named file will never be opened on fd 87455357Sobrien 0. The string "(standard input)" should be based on the file 87555357Sobrien having been originally specified as "-", rather than making 87655357Sobrien assumptions about the fd. 87755357Sobrien (c) the code that calls close(fd) is being done outside of the 87855357Sobrien test for a bad fd. Thus, if the open failed, this code will 87955357Sobrien attempt to close(-1). It should be done inside the "fd != -1" 88055357Sobrien branch. 88155357Sobrien This patch addresses all three of these problems. 88255357Sobrien 88355357Sobrien1998-04-13 Alain Magloire 88455357Sobrien 88555357Sobrien * configure.in: remove the deprecated AC_ISC_POSIX macro. 88655357Sobrien Spotted by Karl Heuer. 88755357Sobrien 88855357Sobrien1998-04-03 Eli Zaretskii 88955357Sobrien 89055357Sobrien * djgpp/main.mak, djgpp/src.mak, djgpp/tests.mak: Updated from the 89155357Sobrien relevant Makefile.in files. 89255357Sobrien 89355357Sobrien * djgpp/config.bat: Create files in intl directory like the 89455357Sobrien configure script does. 89555357Sobrien 89655357Sobrien1998-03-28 Eli Zaretskii 89755357Sobrien 89855357Sobrien * djgpp/main.mak, djgpp/src.mak, djgpp/tests.mak: Updated to track 89955357Sobrien changes in respective Makefile.in files. 90055357Sobrien 90155357Sobrien * src/dosbuf.c (guess_type): Avoid running off the end of the 90255357Sobrien buffer. Spotted by Paul Eggert. 90355357Sobrien 90455357Sobrien1998-03-27 Alain Magloire 90555357Sobrien 90655357Sobrien * grep-2.1.1b.tar.gz available. 90755357Sobrien 90855357Sobrien * src/regex.c: CLASS_CHAR_MAX set to 256 instead of 6 90955357Sobrien when WCTYPE and WCHAR are not defined. When class names 91055357Sobrien where bigger then 6, it will not detect an error. 91155357Sobrien example '[[:alphabet:]]'. 91255357Sobrien 91355357Sobrien * Updated the copyright of the files with emacs. 91455357Sobrien With emacs Jim :). 91555357Sobrien 91655357Sobrien1998-03-26 Jim Meyering 91755357Sobrien 91855357Sobrien * src/dfa.c (IS_WORD_CONSTITUENT): Define. 91955357Sobrien (lex): Use IS_WORD_CONSTITUENT, not ISALNUM. 92055357Sobrien Don't special-case '_'. 92155357Sobrien (dfastate): Use IS_WORD_CONSTITUENT, not ISALNUM. 92255357Sobrien (dfaexec): Likewise. 92355357Sobrien 92455357Sobrien1998-03-25 Alain Magloire 92555357Sobrien 92655357Sobrien * tests/warning.sh: typos and replace the echos with 92755357Sobrien a simple cat. 92855357Sobrien Noted By Jim Meyering. 92955357Sobrien 93055357Sobrien * src/regex.c: #undef ISASCII and ISPRINT before defining 93155357Sobrien them(On Solaris it was define). 93255357Sobrien Pattern 'a[[:]:]]b' is an invalid char class and the error 93355357Sobrien from regex was 1(REG_NOMATCH) instead of 2 (REG_ECTYPE). 93455357Sobrien Fix with help from Ulrich Drepper. 93555357Sobrien 93655357Sobrien * src/grep.c (usage): Ulrich wrote: "A single printf should 93755357Sobrien not have more than 900 bytes. For translation reasons the 93855357Sobrien text shouldn't be split in too many pieces since this is 93955357Sobrien tiresome and also does not help to generate a consistent picture." 94055357Sobrien Noted by Ulrich Drepper. 94155357Sobrien * src/grep.c (usage): Dig out and old patch from 94255357Sobrien Franc,ois to explain the regex in usage(). 94355357Sobrien Ideas from Franc,ois Pinard. 94455357Sobrien 94555357Sobrien1998-03-23 Alain Magloire 94655357Sobrien 94755357Sobrien * testing: grep-2.1.1a for testing. 94855357Sobrien 94955357Sobrien * configure.in: Solaris needs '-lw' if we use wchar/wctype 95055357Sobrien functions. 95155357Sobrien * src/btowc.c: New file from GNU libc. Solaris 2.5 don't 95255357Sobrien have it define. 95355357Sobrien * configure.in : check for btowc (). 95455357Sobrien 95555357Sobrien * regex.c: Include <wchar.h> before <wctype.h>, to work around 95655357Sobrien a Solaris 2.5 bug. 95755357Sobrien Patch provided by Paul Eggert. 95855357Sobrien 95955357Sobrien * tests/status.sh: new file to check return status code. 96055357Sobrien * tests/empty.sh: new file to check for empty pattern. 96155357Sobrien * tests/warning.sh: new file to tell where to report errors. 96255357Sobrien 96355357Sobrien * configure.in: If available, prefer support for large files 96455357Sobrien unless the user specified one of the CPPFLAGS, LDFLAGS, or LIBS 96555357Sobrien variables. 96655357Sobrien Done by Paul Eggert. 96755357Sobrien 96855357Sobrien * src/grep.c (usage): change prep.ai.mit.edu for gnu.org. 96955357Sobrien 97055357Sobrien1998-03-18 Alain Magloire 97155357Sobrien 97255357Sobrien * src/grep.c (usage): Formating the --help message a bit off. 97355357Sobrien Noted by William Bader. 97455357Sobrien 97555357Sobrien * src/grep.c (main): When checking conflicting matcher for option -E the 97655357Sobrien matcher was to "egrep" instead of "posix-egrep". 97755357Sobrien Reported by kwzh@gnu.org. 97855357Sobrien 97955357Sobrien * src/grep.c: Typos and rewording the --help message. 98055357Sobrien Reported by Karl Heuer. 98155357Sobrien 98255357Sobrien * src/grep.1: The man page wording : 98355357Sobrien A regular expression matching a single character may be 98455357Sobrien followed by one of several repetition operators: 98555357Sobrien is unclear since 'x(yz)*z' is a valid regex. 98655357Sobrien Remove the "matching a single character". 98755357Sobrien Suggested by Harald Hanche-Olsen. 98855357Sobrien 98955357Sobrien * src/grep.c (main): `-f /dev/null' now specifies no patterns 99055357Sobrien and therfore matches nothing. 99155357Sobrien Reported by Jorge Stolfi. 99255357Sobrien Patched by Paul Eggert. 99355357Sobrien 99455357Sobrien1998-03-10 Alain Magloire 99555357Sobrien 99655357Sobrien * Ice storm 98(el nino). Lost grep repository disk, 99755357Sobrien and my $HOME directory, etc .. 99855357Sobrien Trying to get the emails/patch from dejanews.com 99955357Sobrien and start from grep-2.1. 100055357Sobrien sigh .... 100155357Sobrien 100255357Sobrien1997-11-01 Alain Magloire 100355357Sobrien 100455357Sobrien * src/grep.c: For the long options, the problems are: 100555357Sobrien --file appears in the option table as 'no_argument' 100655357Sobrien instead of 'required_argument'. 100755357Sobrien --files-with-matches is missing from the option table. 100855357Sobrien The help lists '--fixed-strings' as the long option for -F, 100955357Sobrien the table has '--fixed-regexp'. 101055357Sobrien --regexp appears in the option table as 'no_argument' 101155357Sobrien instead of 'required_argument'. 101255357Sobrien --with-filename is missing from the option table. 101355357Sobrien Reported by Grant McDorman and Krishna Sethuraman. 101455357Sobrien 101555357Sobrien1997-10-19 Alain Magloire 101655357Sobrien 101755357Sobrien * src/grep.c: the option "with-filename was not in the arg table. 101855357Sobrien Corrected by Jim Hand. 101955357Sobrien 102055357Sobrien * GNU gettext library from gettext-0.10.32. 102155357Sobrien 102255357Sobrien * src/grep.c: reverse back to greping directories, 102355357Sobrien One could skip the error message by defining 102455357Sobrien SKIP_DIR_ERROR. There is no clear way of doing 102555357Sobrien things, I hope to setle this on the next majore release 102655357Sobrien Thanks Paul Eggert, Eli Zaretskii and gnits for the 102755357Sobrien exchange. 102855357Sobrien 102955357Sobrien * tests/status.sh: add this check to make sure 103055357Sobrien That the return status code is ok. 103155357Sobrien 103255357Sobrien1997-10-10 Andreas Schwab 103355357Sobrien 103455357Sobrien * src/grep.1: Fix formatting. 103555357Sobrien 103655357Sobrien * configure.in: Check for wctype.h, wchar.h, libintl.h and 103755357Sobrien isascii, which are needed for regex.c. 103855357Sobrien 103955357Sobrien1997-10-01 Paul Eggert 104055357Sobrien 104155357Sobrien * src/grep.c (fillbuf): Don't warn about mmap failures. 104255357Sobrien 104355357Sobrien1997-09-7 Alain Magloire 104455357Sobrien 104555357Sobrien * src/grep.c: added code for -H --with-filename. 104655357Sobrien 104755357Sobrien * djgpp/*: patch wrongly apply 104855357Sobrien duplication of text in djgpp/{README,config.h}. 104955357Sobrien Filter djgpp/config.bat with unix2dos. 105055357Sobrien 105155357Sobrien * djgpp/make.mak: beautify 105255357Sobrien From Eli Zaretskii. 105355357Sobrien 105455357Sobrien * grep-2.1 release. 105555357Sobrien 105655357Sobrien1997-09-01 Alain Magloire 105755357Sobrien 105855357Sobrien * grep-2.0f out for testing. 105955357Sobrien 106055357Sobrien * update to GNU gettext library from gettext-0.10.31 106155357Sobrien 106255357Sobrien * grep.c : have a nicer format for --version. 106355357Sobrien Noted by Ulrich Drepper. 106455357Sobrien 106555357Sobrien * obstack.[ch]: updated from GNU C library 106655357Sobrien * configure.in: look for stdlib.h [HAVE_STDLIB_H] 106755357Sobrien Comments from Ulrich Drepper. 106855357Sobrien 106955357Sobrien1997-08-25 Philippe De Muyter <phdm@info.ucl.ac.be> 107055357Sobrien 107155357Sobrien * src/dfa.c (sys/types.h): File included unconditionnaly. 107255357Sobrien 107355357Sobrien1997-08-16 Eli Zaretskii <eliz@is.elta.co.il> 107455357Sobrien 107555357Sobrien * grep.c (long_options) [O_BINARY]: Add DOS-specific options. 107655357Sobrien (fillbuf) [O_BINARY]: For DOS-style text files, strip CR 107755357Sobrien characters at end of line. 107855357Sobrien (prline) [O_BINARY]: Report correct byte offsets, even though CR 107955357Sobrien characters were stripped when reading the file. 108055357Sobrien (usage) [O_BINARY]: Add DOS-specific options. 108155357Sobrien (setmatcher) [HAVE_SETRLIMIT]: Set re_max_failures so that the 108255357Sobrien matcher won't ever overflow the stack. 108355357Sobrien (main) [__MSDOS__, _WIN32]: Handle backslashes and drive letters 108455357Sobrien in argv[0], remove the .exe suffix, and downcase the prgram name. 108555357Sobrien [O_BINARY]: Pass additional DOS-specific options to getopt_long 108655357Sobrien and handle them. Call stat before attempting to open the file, in 108755357Sobrien case it is a directory (DOS will fail the open call for 108855357Sobrien directories). Switch the input descriptor to binary mode, unless 108955357Sobrien it is a terminal device. 109055357Sobrien 109155357Sobrien * system.h [O_BINARY]: Define macros to switch a handle to binary 109255357Sobrien mode, so binary files could be grep'ed on MS-DOS and MS-Windows. 109355357Sobrien [HAVE_SETLOCALE]: Test for HAVE_SETLOCALE instead of 109455357Sobrien HAVE_LC_MESSAGES, to prevent compilation error in grep.c on 109555357Sobrien systems which don't define HAVE_LC_MESSAGES, but have setlocale. 109655357Sobrien 109755357Sobrien * dosbuf.c: New file, functions specific for MS-DOS/MS-Windows. 109855357Sobrien (guess_type, undossify_input, dossified_pos): New functions. 109955357Sobrien 110055357Sobrien * djgpp/config.h, djgpp/config.bat, djgpp/main.mak, djgpp/src.mak, 110155357Sobrien djgpp/po.mak, djgpp/intl.mak, djgpp/tests.mak, djgpp/po2tbl.sed: 110255357Sobrien New files, for building Grep with DJGPP tools for MS-DOS and 110355357Sobrien MS-Windows. 110455357Sobrien 110555357Sobrien * grep.1: Document DOS-specific switches. 110655357Sobrien 110755357Sobrien1997-08-08 Alain Magloire 110855357Sobrien 110955357Sobrien * grep-2.0e: available for testing 111055357Sobrien 111155357Sobrien * grep.c: change LC_MESSAGE to LC_ALL for (LC_CTYPE). 111255357Sobrien Suggested by Jochen Hein. 111355357Sobrien 111455357Sobrien * ABOUT-NLS: updated. 111555357Sobrien * grep.c: --version: more verbosity (COPYRIGHT). 111655357Sobrien * grep.c: --help: PATTERN, FILE instead of <pattern>, <file>. 111755357Sobrien * INSTALL.grep: not necessary removed. 111855357Sobrien * configure.in: --disable-regex rename --without-include-regex. 111955357Sobrien * THANKS: format: first row name, second email. 112055357Sobrien * ChangeLog: format ISO 8601. 112155357Sobrien Reported by Franc,ois Pinard. 112255357Sobrien 112355357Sobrien * grep.c: move dcl of struct stat st into "else" where it's used. 112455357Sobrien Reported by Jim Meyering. 112555357Sobrien 112655357Sobrien * grep.c: totalnl should be %u in printf. 112755357Sobrien Reported by Michael Aichlmay 112855357Sobrien Corrected with guidance from Ulrich Drepper 112955357Sobrien 113055357Sobrien1997-07-24 Alain Magloire <alainm@rcsm.ee.mcgill.ca> 113155357Sobrien 113255357Sobrien * Makefile.am: corrected an error when installing {f,e}grep.1. 113355357Sobrien From Kaveh R. Ghazi <ghazi@caip.rutgers.edu>. 113455357Sobrien From Ulrich Drepper <drepper@cygnus.com>. 113555357Sobrien 113655357Sobrien * Many files: use PARAMS instead of __STDC__ for prototypes. 113755357Sobrien From Jim Meyering <meyering@eng.ascend.com>. 113855357Sobrien Patch provided by Kaveh R. Ghazi <ghazi@caip.rutgers.edu>. 113955357Sobrien 114055357Sobrien * dfa.[ch]: uses the one in gawk-3.0.3 with the patch from 114155357Sobrien Arnold (see Changelog: July 12 1997) 114255357Sobrien 114355357Sobrien * grep.1: a note to say -l, -L, -q stop on first match. 114455357Sobrien Noted by Andrew Beattie <gaffer@tug.com>. 114555357Sobrien 114655357Sobrien * grep.c: refuse to scan if the file is a directory. 114755357Sobrien This was causing problems on SUNs. If the directory contains 114855357Sobrien a file that could match the pattern, garbage was display. 114955357Sobrien 115055357Sobrien * tests directory: added new set of tests from Henry Spencer 115155357Sobrien regex package. Change the way the tests were done to be more 115255357Sobrien conformant to automake. 115355357Sobrien 115455357Sobrien * configure.in: added --disable-regex for folks with their own fuctions. 115555357Sobrien 115655357Sobrien * grep-20d : available for testing 115755357Sobrien 115855357Sobrien1997-07-18 Alain Magloire <alainm@rcsm.ee.mcgill.ca> 115955357Sobrien 116055357Sobrien * grep-2.0c: available for testing 116155357Sobrien 116255357Sobrien1997-07-17 Alain Magloire <alainm@rcsm.ee.mcgill.ca> 116355357Sobrien 116455357Sobrien * src/grep.c: Cause grep to fail if `fclose (stdout)' fails. 116555357Sobrien From Jim Meyering <meyering@eng.ascend.com>. 116655357Sobrien 116755357Sobrien * grep.c:usage() more consistency in the --help. 116855357Sobrien 116955357Sobrien * egrep, fgrep were links This is in violation of GNU standards: 117055357Sobrien "Please don't make the behavior of a utility depend on the name used 117155357Sobrien to invoke it. It is useful sometimes to make a link to a utility with 117255357Sobrien a different name, and that should not change what it does." 117355357Sobrien For now egrep and fgrep will be copies of grep. A better scheme 117455357Sobrien should be found later. 117555357Sobrien After discussion with Tom Tromey <tromey@cygnus.com>. 117655357Sobrien 117755357Sobrien * fgrep.man and egrep.man included: They are stubs that call grep.1. 117855357Sobrien * Makefile.am: modified to install {f,e,}grep[,.1]. 117955357Sobrien 118055357Sobrien * speed hack for -l, -L: bail out on first match. 118155357Sobrien From Scott Weikart <scott@igc.apc.org>. 118255357Sobrien 118355357Sobrien * *.[ch]: provided prototypes for strict argument checking 118455357Sobrien With the help of Stewart Levin <stew@sep.stanford.edu>. 118555357Sobrien 118655357Sobrien1997-07-16 Alain Magloire <alainm@rcsm.ee.mcgill.ca> 118755357Sobrien 118855357Sobrien * configure.in: typo in the creation of po/Makefile 118955357Sobrien Noted by Volker Borchert bt@teknon.de. 119055357Sobrien 119155357Sobrien * grep-2.0b: make it available for testing. 119255357Sobrien 119355357Sobrien1997-07-15 Alain Magloire <alainm@rcsm.ee.mcgill.ca> 119455357Sobrien 119555357Sobrien * src/grep.c usage(): cut the --help in smaller printf()'s 119655357Sobrien Noted by Ulrich Drepper <drepper@cygnus.com>. 119755357Sobrien 119855357Sobrien1997-07-14 Alain Magloire <alainm@rcsm.ee.mcgill.ca> 119955357Sobrien 120055357Sobrien * grep-2.0a: make an alpha available for testing. 120155357Sobrien 120255357Sobrien1997-07-12 Alain Magloire <alainm@rcsm.ee.mcgill.ca> 120355357Sobrien 120455357Sobrien * run gettextize: added the po directory filled with *.po files. 120555357Sobrien 120655357Sobrien * check.sh, scriptgen.awk: fix grep paths. 120755357Sobrien 120855357Sobrien * change the directory strucure: grep is now in src to comply with 120955357Sobrien gettext.m4. 121055357Sobrien 121155357Sobrien * grep.c version.c [VERSION]: got rid of version.c, 121255357Sobrien it is now define via config.h. 121355357Sobrien 121455357Sobrien * dfa.c: patch to speed up initialization. 121555357Sobrien Arnold Robbins (arnold@gnu.ai.mit.edu). 121655357Sobrien 121755357Sobrien1997-07-09 Alain Magloire <alainm@rcsm.ee.mcgill.ca> 121855357Sobrien 121955357Sobrien * *.c [HAVE_CONFIG_H]: Macro defined. 122055357Sobrien 122155357Sobrien * support for I18N in Makefile.am and configure.in. 122255357Sobrien 122355357Sobrien * update all the string to use gettext(I18N). 122455357Sobrien Help from Franc,ois Pinard previous patch <pinard@IRO.UMontreal.CA>. 122555357Sobrien 122655357Sobrien1997-07-04 Alain Magloire <alainm@rcsm.ee.mcgill.ca> 122755357Sobrien 122855357Sobrien * obstack.[ch]: updated from glibc. 122955357Sobrien Work of Ulrich Drepper <drepper@cygnus.com>. 123055357Sobrien 123155357Sobrien * regex.[ch]: updated from glibc. 123255357Sobrien Work of Ulrich Drepper <drepper@cygnus.com>. 123355357Sobrien 123455357Sobrien * grep.c: for option -e not counting '\n' for new keys. 123555357Sobrien From Mark Waite <markw@mddmew.fc.hp.com>. 123655357Sobrien 123755357Sobrien * grep.c: for option -f allocating the right count. 123855357Sobrien From Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>. 123955357Sobrien Mike Heartel (mike@cs.uoregon.edu). 124055357Sobrien 124155357Sobrien * kwset.c (bmexec): Cast tp[-2] to unsigned char before comparing. 124255357Sobrien From Jim Meyering <meyering@asic.sc.ti.com>. 124355357Sobrien 124455357Sobrien * grep.1: various typos. 124555357Sobrien From Keith Bostic <bostic@bsdi.com>. 124655357Sobrien Mike Heartel (mike@cs.uoregon.edu). 124755357Sobrien 124855357Sobrien1997-06-17 Alain Magloire <alainm@rcsm.ee.mcgill.ca> 124955357Sobrien 125055357Sobrien * grep.c: support for long options. 125155357Sobrien patch done by Franc,ois Pinard <pinard@IRO.UMontreal.CA>. 125255357Sobrien 125355357Sobrien * add getopt1.c in Makefile.am. 125455357Sobrien Noted by Franc,ois Pinard <pinard@IRO.UMontreal.CA> 125555357Sobrien 125655357Sobrien * replace getopt.[ch] and add getopt1.c. 125755357Sobrien 125855357Sobrien * kwset.c: undef malloc before define it. 125955357Sobrien Franc,ois Pinard <pinard@IRO.UMontreal.CA>. 126055357Sobrien 126155357Sobrien1997-06-07 Alain Magloire <alainm@rcsm.ee.mcgill.ca> 126255357Sobrien 126355357Sobrien * grep.c: format incorrect in 126455357Sobrien fprintf("%s: warning: %s: %s...", filename, strerror(errno)). 126555357Sobrien Mike Heartel (mike@cs.uoregon.edu). 126655357Sobrien 126755357Sobrien1996-11-19 David J MacKenzie <djm@catapult.va.pubnix.com> 126855357Sobrien 126955357Sobrien * make.com: Set the logical SYS. From rdb@cocamrd.oz.au (Rodney Brown). 127055357Sobrien 127155357Sobrien * grep.c (S_ISREG): Define if not defined already, for e.g. 127255357Sobrien SunOS 4.0.3. 127355357Sobrien 127455357Sobrien * dfa.c (test_bit, set_bit, clear_bit): Renamed from tstbit, 127555357Sobrien setbit, clrbit to avoid conflict with HP-UX sys/param.h macros. 127655357Sobrien 127755357Sobrien * memchr.c: New file, from GNU libc. 127855357Sobrien * grep.c (memchr): Remove definition. 127955357Sobrien * configure.in: Use AC_REPLACE_FUNCS for memchr. 128055357Sobrien 128155357Sobrien * configure.in: Remove unused checks for memalign and unsigned char. 128255357Sobrien * grep.c: HAVE_WORKING_MMAP -> HAVE_MMAP. 128355357Sobrien 128455357Sobrien * system.h: New file. 128555357Sobrien * dfa.c, kwset.c, grep.c, search.c: Use it instead of duplicating 128655357Sobrien portability boilerplate. 128755357Sobrien 128855357Sobrien * grep.c: Include sys/types.h once, instead of three times 128955357Sobrien conditionally. 129055357Sobrien * dfa.c, kwset.c, search.c: Include sys/types.h unconditionally, 129155357Sobrien to always try to get size_t (needed on some old SysV's). 129255357Sobrien 129355357Sobrien * dfa.c: Define strchr in terms of index, not the other way around. 129455357Sobrien * search.c: Use memcpy instead of bcopy. 129555357Sobrien 129655357Sobrien1996-11-15 David J MacKenzie <djm@catapult.va.pubnix.com> 129755357Sobrien 129855357Sobrien * Many files: Update FSF address. 129955357Sobrien Update configuration to use autoconf v2 and automake. 130055357Sobrien 130155357Sobrien1993-05-22 Mike Haertel <mike@cs.uoregon.edu> 130255357Sobrien 130355357Sobrien * Version 2.0 released. 1304