ChangeLog revision 55357
155357Sobrien1999-02-14 Alain Magloire 255357Sobrien 355357Sobrien * m4/gettext.m4 : Guard [] with changequote. 455357Sobrien From Elie Zaretskii. 555357Sobrien 655357Sobrien * djgpp/config.bat : Makefile.in.in --> Makefile.in-in 755357Sobrien From Elie Zaretskii. 855357Sobrien 955357Sobrien * src/dosbuf: k&r function parameter. 1055357Sobrien 1155357Sobrien * release of 2.3. 1255357Sobrien 1355357Sobrien1999-02-10 Alain Magloire 1455357Sobrien 1555357Sobrien * bootstrap/{Makefile{try,am},REAMDE} : skeleton 1655357Sobrien provided for system lacking the tools to autoconfigure. 1755357Sobrien 1855357Sobrien * src/{e,f,}grepmat.c: added guard [HAVE_CONFIG_H] 1955357Sobrien 2055357Sobrien1999-02-10 Alain Magloire 2155357Sobrien 2255357Sobrien * PATCHES-AC, PATCHES-AM: updated. 2355357Sobrien 2455357Sobrien * m4/regex.m4 : updated. 2555357Sobrien 2655357Sobrien1999-02-05 Eli Zaretskii 2755357Sobrien 2855357Sobrien * m4/gettext.m4 : Support DOS-style D:/foo/bar absolute file 2955357Sobrien names. 3055357Sobrien 3155357Sobrien * aclocal.m4 (DJGPP) : Use $DJ_GPP instead, since changing the 3255357Sobrien latter prevents GCC from finding headers and libraries. 3355357Sobrien 3455357Sobrien * djgpp/config.bat: Make building from another directory work 3555357Sobrien 3655357Sobrien * djgpp/config.sed: Remove redundant command wich edited path 3755357Sobrien separator: now done by configure. 3855357Sobrien 3955357Sobrien * src/grep.c [O_BINARY]: Add prototype for undossify_input. 4055357Sobrien 4155357Sobrien * doc/grep.texi (Introduction): Typo fixed. 4255357Sobrien 4355357Sobrien1999-02-03 Alain Magloire 4455357Sobrien 4555357Sobrien * grep-2.2f beta release. 4655357Sobrien 4755357Sobrien1999-02-02 Alain Magloire 4855357Sobrien 4955357Sobrien * m4/{djgpp,envsep,glibc,regex,dosfile,isc-posix}.m4 : 5055357Sobrien New files to aid configuration and unload configure.in. 5155357Sobrien * m4/Makefile.am : updated. 5255357Sobrien * src/btowc.c : protect for wchar.h 5355357Sobrien 5455357Sobrien1999-01-28 Alain Magloire 5555357Sobrien 5655357Sobrien * intl/Makefile.in: Replace .o with .${ac_objext} where necessary. 5755357Sobrien Work around a limitation of Visual C++ on Cygwin32. 5855357Sobrien * acconfig.h configure.in: Define `alloca' as `_alloca' when CC=cl. 5955357Sobrien This little hack was suggested by Ian Roxborough <irox@cygnus.com>. 6055357Sobrien Patch forwarded by Ben Elliston. 6155357Sobrien 6255357Sobrien1999-01-28 Alain Magloire 6355357Sobrien 6455357Sobrien * PATCHES-AM: New file. A small patch for automake-1.4, use $(sep) 6555357Sobrien as the path separator base on @SEP@. 6655357Sobrien * PATCHES-AC configure.in : updated for autoconf-13. 6755357Sobrien 6855357Sobrien1999-01-27 Volker Borchert 6955357Sobrien 7055357Sobrien * grep.c: fgrep -NUM not working correctly. 7155357Sobrien add the argument number to digit_args_val. 7255357Sobrien 7355357Sobrien1999-01-22 Paul Eggert 7455357Sobrien 7555357Sobrien Prevent grep -r from recursing infinitely through directory loops via 7655357Sobrien symbolic links. 7755357Sobrien 7855357Sobrien * grep.c (struct stats): New type. 7955357Sobrien (stats_base): New var. 8055357Sobrien (bufstat): Remove; subsumed by stats->stat. 8155357Sobrien (reset, fillbuf, grep, grepdir, grepfile): Pass struct stats * arg, 8255357Sobrien for directory loop checking; use this instead of the bufstat global. 8355357Sobrien All callers changed. 8455357Sobrien (grepfile): Stat the file before invoking grepdir. 8555357Sobrien (grepdir): Assume that the argument has already been statted. 8655357Sobrien No longer a need for a directory size argument, since it 8755357Sobrien can be gotten from the struct stats * argument. 8855357Sobrien Check for directory loops. 8955357Sobrien Create linked list of directories currently being visited, 9055357Sobrien to detect loops. 9155357Sobrien 9255357Sobrien1998-12-29 Kaveh R. Ghazi 9355357Sobrien 9455357Sobrien intl/localealias.c: When building grep-2.2e using cc on Irix4, 9555357Sobrien I needed the following patch to intl/localealias.c. 9655357Sobrien (Its the same patch used by fileutils-4.0.) The patch resolves 9755357Sobrien conflicts between char* and unsigned char* in the i18n code. 9855357Sobrien 9955357Sobrien1998-12-10 Alain Magloire 10055357Sobrien 10155357Sobrien * src/grep.c : Typo in contex -->context 10255357Sobrien Noted by Vladimir Michl. 10355357Sobrien 10455357Sobrien1998-12-01 Alain Magloire 10555357Sobrien 10655357Sobrien * doc/Makefile.am djgpp/Makefile.am m4/Makefile.am vms/Makefile.am: 10755357Sobrien New files. 10855357Sobrien 10955357Sobrien * m4/progtest.m4: proctect '[]' from m4. 11055357Sobrien Noted by Eli Z. 11155357Sobrien 11255357Sobrien * PATCHES-AC: New file, add the patch for autoconf in the dist. 11355357Sobrien 11455357Sobrien * acconfig.h: (HAVE_DOS_FILENAME) 11555357Sobrien 11655357Sobrien * TODO: updated. 11755357Sobrien 11855357Sobrien * src/search.c: remove obsolete 'gegrep,ggrep,gnugrep' 11955357Sobrien matchers. grep no longer depend on argv[0]. 12055357Sobrien 12155357Sobrien * grep-2.2e beta to test DJGPP port. 12255357Sobrien 12355357Sobrien1998-11-28 Paul Eggert 12455357Sobrien 12555357Sobrien Various portability enhancements: 12655357Sobrien - Don't assume that O_BINARY implies DOS. Use separate 12755357Sobrien macros D_OK (for DOS-like directory access) and 12855357Sobrien HAVE_DOS_FILE_NAMES (for DOS-like file names). 12955357Sobrien - Don't assume that off_t fits into long; it doesn't on Solaris 2.6. 13055357Sobrien - Have is_EISDIR set errno properly on hosts with screwed-up EISDIR. 13155357Sobrien - Treat ':' specially in DOS file names only if it's the end of a 13255357Sobrien drive specifier. 13355357Sobrien - Protect against errno < 0. 13455357Sobrien 13555357Sobrien * src/grep.c (is_EISDIR): Move defn to system.h. 13655357Sobrien (print_offset_sep): New function. 13755357Sobrien (fillbuf): Remove redundant test of O_BINARY. 13855357Sobrien (totalcc, totalnl): Now of type off_t. 13955357Sobrien (prline): Use print_offset_sep to print file offsets. 14055357Sobrien (grepfile): Don't set e to EISDIR; that's is_EISDIR's responsibility 14155357Sobrien on machines that don't work properly with EISDIR. 14255357Sobrien (grepdir): Don't assume ':' means slash on all DOS filenames; 14355357Sobrien it means it only in the file prefix. 14455357Sobrien 14555357Sobrien * src/system.h (strerror): Check for negative error numbers. 14655357Sobrien (is_EISDIR): Depend on D_OK, not O_BINARY. 14755357Sobrien (SET_BINARY): Depend on HAVE_SETMODE, not __DJGPP__. 14855357Sobrien (IS_SLASH, FILESYSTEM_PREFIX_LEN): Depend on HAVE_DOS_FILE_NAMES, 14955357Sobrien not O_BINARY. 15055357Sobrien (CHAR_BIT): New macro. 15155357Sobrien 15255357Sobrien * src/dosbuf.c (struct dos_map): 15355357Sobrien pos and add members are now of type off_t. 15455357Sobrien (dos_stripped_crs): Now of type off_t. 15555357Sobrien (dossified_pos): Now accepts arg and returns value of type off_t. 15655357Sobrien 15755357Sobrien * configure.in (AC_CHECK_FUNCS): Add setmode. 15855357Sobrien (HAVE_DOS_FILENAMES): New macro 15955357Sobrien 16055357Sobrien1998-11-27 Eli Zaretskii 16155357Sobrien 16255357Sobrien * djgpp/config.sed: New file, a Sed script to edit configure 16355357Sobrien script before running it on DOS/Windows. 16455357Sobrien * djgpp/config.bat: Updated to handle po2tbl.sed.in and 16555357Sobrien po/Makefile.in.in on DOS filesystems, and to run config.sed. 16655357Sobrien 16755357Sobrien1998-11-24 Jim Meyering 16855357Sobrien 16955357Sobrien * src/grep.c : Typo s/infalid/invalid/ 17055357Sobrien Also noted by Stanislav Brabec. 17155357Sobrien 17255357Sobrien1998-11-24 Eli Zaretskii 17355357Sobrien 17455357Sobrien * doc/grep.texi: I found and corrected several typos. 17555357Sobrien I believe the GNU standards require the section that describes the 17655357Sobrien options to the programs to be called ``Invoking'' or ``Invoking 17755357Sobrien <program-name>''. This is so users and programs can easily find 17855357Sobrien that node in any Info file. So I changed the name of the 17955357Sobrien `Options' chapter to `Invoking', and corrected the 18055357Sobrien cross-references accordingly. 18155357Sobrien I added some markup to things like file names and options. 18255357Sobrien I added some additional index entries where that seemed useful. 18355357Sobrien I also corrected some index entries, such as "@cindex [:alnum:]", 18455357Sobrien which used a colon in them (the colons confuse Info readers). 18555357Sobrien 18655357Sobrien1998-11-24 Alain Magloire 18755357Sobrien 18855357Sobrien * grep/doc/grep.texi : -h is not use for help. 18955357Sobrien Nit spotted by Jim Meyering. 19055357Sobrien 19155357Sobrien1998-11-23 Alain Magloire 19255357Sobrien 19355357Sobrien * doc: New directory, grep.1, {e,f}grep.man move here 19455357Sobrien * doc/grep.texi: New info manual 19555357Sobrien * doc/version.texi: New 19655357Sobrien * doc/Makefile.am: New 19755357Sobrien * tests/{ere,bre}.*: New files. The spencer2 test is split 19855357Sobrien in two ere/bre. 19955357Sobrien * config.hin: New, config.h.in rename to config.hin for OS 20055357Sobrien with limited file system aka DOS. 20155357Sobrien 20255357Sobrien * grep-2.2d release for beta. 20355357Sobrien 20455357Sobrien1998-11-18 Alain Magloire 20555357Sobrien 20655357Sobrien * src/regex.[ch] : Updated from GLibc, previous patches were 20755357Sobrien integrate by Ulrich Drepper and some added ones. 20855357Sobrien 20955357Sobrien1998-11-16 Paul Eggert 21055357Sobrien 21155357Sobrien * grep.h (__attribute__): New macro, if not GCC. 21255357Sobrien (fatal): Add __attribute__((noreturn)). 21355357Sobrien * grep.c (usage): Add __attribute__((noreturn)). 21455357Sobrien 21555357Sobrien1998-11-16 Paul Eggert 21655357Sobrien 21755357Sobrien Remove memory leak with valloced buffers, by invoking malloc instead. 21855357Sobrien 21955357Sobrien * configure.in (AC_CHECK_FUNCS), src/system.h (valloc): Remove. 22055357Sobrien * src/grep.c (page_alloc): New function. 22155357Sobrien (ubuffer, pagesize): New vars. 22255357Sobrien (ALIGN_TO): New macro. 22355357Sobrien (reset): Initialize new vars. Check for overflow in buffer size calc. 22455357Sobrien Use page_alloc instead of valloc. 22555357Sobrien (fillbuf): Likewise. Use memcpy to copy saved area. 22655357Sobrien 22755357Sobrien1998-11-15 Paul Eggert 22855357Sobrien 22955357Sobrien * dfa.c (dfacomp), search.c (EGexecute): Don't assume char is unsigned. 23055357Sobrien 23155357Sobrien1998-11-14 Paul Eggert 23255357Sobrien 23355357Sobrien * src/grep.c (grepdir): Fix bug: memory freed twice. 23455357Sobrien 23555357Sobrien * src/search.c (Gcompile, Ecompile): Don't invoke dfainit, 23655357Sobrien since dfacomp does it for us, and if we also do it then we 23755357Sobrien leak memory. 23855357Sobrien 23955357Sobrien1998-11-13 Eli Zaretskii 24055357Sobrien 24155357Sobrien * djgpp/config.bat: Rewrite to run the configure script via Bash. 24255357Sobrien * djgpp/config.site, djgpp/getconf: New files. 24355357Sobrien * djgpp/config.h, djgpp/*.mak, djgpp/po2tbl.sed: Remove. 24455357Sobrien * djgpp/README: Update instructions. 24555357Sobrien 24655357Sobrien * Makefile.am (EXTRA_DIST): Update the list of DJGPP files. 24755357Sobrien 24855357Sobrien * src/system.h (IS_SLASH): New macro. 24955357Sobrien (is_EISDIR): Define it here for DOS and Windows. 25055357Sobrien 25155357Sobrien * src/grep.c (main) [O_BINARY]: Set stdout to binary mode, so the 25255357Sobrien EOL formats of the input and output files match, unless stdout is 25355357Sobrien the console device. 25455357Sobrien (is_EISDIR): Don't define if already defined. Accept a second 25555357Sobrien argument, the file name; all callers changed. 25655357Sobrien (grepdir): Don't free `file', inside the loop. Use IS_SLASH to 25755357Sobrien check whether `dir' needs a slash. 25855357Sobrien (grepfile): If file is a directory, set e to EISDIR. 25955357Sobrien 26055357Sobrien1998-11-10 Alain Magloire 26155357Sobrien 26255357Sobrien * src/vms_fab.{c,h}: New file for VMS wildcard expansion 26355357Sobrien Written by Phillip C. Brisco. 26455357Sobrien 26555357Sobrien * vms/make.com : add line to compile vms_fab.c and 26655357Sobrien {e,f,}grepmat.c with link for each grep/fgrep/egrep. 26755357Sobrien Base on patch send by Phillib C. Brisco. 26855357Sobrien 26955357Sobrien1998-11-09 Alain Magloire 27055357Sobrien 27155357Sobrien * grep-2.2c on alpha for testing. 27255357Sobrien 27355357Sobrien1998-11-09 Paul Eggert 27455357Sobrien 27555357Sobrien * src/grep.1: Fix `Last Change' of output by generating the date 27655357Sobrien from the RCS Id. 27755357Sobrien 27855357Sobrien * src/grep.c (is_EISDIR): New macro. 27955357Sobrien (grep): If -s, suppress errors from trying to read directories. 28055357Sobrien (grepfile): Use is_EISDIR to simplify code. 28155357Sobrien (grepdir): If -s, suppress errors from trying to read directories. 28255357Sobrien 28355357Sobrien * src/grep.1: Fix -q -r -s problems; describe BSD grep better. 28455357Sobrien 28555357Sobrien * src/grep.c (main): Update copyright. 28655357Sobrien 28755357Sobrien Specify default matcher with default_matcher extern var, not 28855357Sobrien DEFAULT_MATCHER macro. This is more straightforward and means 28955357Sobrien we need to compile grep.c just once. 29055357Sobrien 29155357Sobrien * src/egrepmat.c, src/fgrepmat.c, src/grepmat.c: New files. 29255357Sobrien 29355357Sobrien * src/Makefile.am (base_sources): New macro. 29455357Sobrien (egrep_SOURCES, fgrep_SOURCES, grep_SOURCES): Now consist of 29555357Sobrien $(base_sources) plus the single tailoring file. 29655357Sobrien (grep_LDADD, egrep_LDADD, fgrep_LDADD): Remove. 29755357Sobrien (EXTRA_DIST): Remove grep.c, regex.c. 29855357Sobrien (fgrep.o, egrep.o): Remove. 29955357Sobrien 30055357Sobrien * src/grep.h (matcher): Now char const *. 30155357Sobrien (default_matcher): New decl. 30255357Sobrien 30355357Sobrien * src/grep.c (matcher): Now char const *. 30455357Sobrien (setmatcher): Now accepts char const *. 30555357Sobrien (main): Default the matcher from default_matcher (linked externally) 30655357Sobrien rather than DEFAULT_MATCHER (a macro). 30755357Sobrien 30855357Sobrien1998-11-08 Alain Magloire 30955357Sobrien 31055357Sobrien * src/grep.1: `prep.ai.mit.edu' should be replaced with `gnu.org'. 31155357Sobrien Nit from Paul Eggert. 31255357Sobrien 31355357Sobrien1998-11-06 Alain Magloire 31455357Sobrien 31555357Sobrien * src/grep.c: The Matcher is not set to argv[0] but 31655357Sobrien explicitly by a #define MATCHER at compile time default is "grep". 31755357Sobrien 31855357Sobrien * aclocal/: NEW dir. provides our own *.m4 31955357Sobrien 32055357Sobrien * configure.in: Move Paul's Large Files to AC_LFS.(aclocal/lfs.m4) 32155357Sobrien Taken from Jim Meyering fileutils. 32255357Sobrien 32355357Sobrien1998-11-05 Alain Magloire 32455357Sobrien 32555357Sobrien * src/grep.1: update the man pages according to the 32655357Sobrien changes make by Miles. 32755357Sobrien 32855357Sobrien * po/*.po: updated. 32955357Sobrien 33055357Sobrien * first beta release for 2.3 (2.2a). 33155357Sobrien 33255357Sobrien1998-11-04 Miles Bader 33355357Sobrien 33455357Sobrien * src/grep.c (main): Rationalize interaction of -C/-NUM/-A/-B 33555357Sobrien options, and allow -C to have an optional argument. -NUM can 33655357Sobrien now be mixed with -C, and -A, -B always take precedence over 33755357Sobrien -C/-NUM, regardless of order. 33855357Sobrien (long_options): Let -C/--context take an optional argument. 33955357Sobrien 34055357Sobrien1998-11-03 Alain Magloire 34155357Sobrien 34255357Sobrien * src/dfa.c: HP-UX define clrbit/setbit as macros in <sys/param.h> 34355357Sobrien #undef if defined. 34455357Sobrien Fixed by Andreas Ley and Philippe Defert. 34555357Sobrien 34655357Sobrien * src/grep.1 : mention that -s follows POSIX.2 behavior. 34755357Sobrien Noted by Paul Eggert and others. 34855357Sobrien 34955357Sobrien * tests/khadafy.sh: a typo in failure(s). 35055357Sobrien Spotted By Sotiris Vassilopoulos. 35155357Sobrien 35255357Sobrien1998-11-01 Paul Eggert 35355357Sobrien 35455357Sobrien * src/system.h (IN_CTYPE_DOMAIN): New macro. 35555357Sobrien (ISALPHA, ISUPPER, ISLOWER, ISDIGIT, ISXDIGIT, ISSPACE, 35655357Sobrien ISPUNCT, ISALNUM, ISPRINT, ISGRAPH, ISCNTRL): Use 35755357Sobrien IN_CTYPE_DOMAIN instead of isascii. 35855357Sobrien 35955357Sobrien1998-08-18 Paul Eggert 36055357Sobrien 36155357Sobrien Add support for new -r or --recursive (or -d recurse or 36255357Sobrien --directories=recurse) option. 36355357Sobrien 36455357Sobrien * src/Makefile.am (grep_SOURCES): Add savedir.c, savedir.h, stpcpy.c. 36555357Sobrien 36655357Sobrien * src/grep.1: Describe new options. 36755357Sobrien 36855357Sobrien * src/grep.c: Include "savedir.h". 36955357Sobrien (long_options): Add -r or --recursive. 37055357Sobrien (RECURSE_DIRECTORIES): New enum value. 37155357Sobrien (IS_DIRECTORY_ERRNO): Remove. 37255357Sobrien (reset, grep): Add file name arg. 37355357Sobrien (grepdir, grepfile): New functions. 37455357Sobrien (initial_bufoffset): New var. 37555357Sobrien (reset): Initialize it. 37655357Sobrien (fillbuf): Use it. 37755357Sobrien (count_matches, list_files, no_filenames, suppress_errors): New static 37855357Sobrien vars; formerly were local to `main'. 37955357Sobrien (grep): Recurse through directories if the user asks for this. 38055357Sobrien (usage, main): Add new options. 38155357Sobrien (main): Change some local vars to be static, as described above. 38255357Sobrien Move most of the guts into grepfile function. 38355357Sobrien so that it can be recursed through. 38455357Sobrien 38555357Sobrien * configure.in (AC_HEADER_DIRENT, AC_FUNC_CLOSEDIR_VOID): Add. 38655357Sobrien (AC_REPLACE_FUNCS): Add stpcpy. 38755357Sobrien 38855357Sobrien * src/savedir.c, src/savedir.h, src/stpcpy.c: New files; 38955357Sobrien taken from fileutils 3.16u. 39055357Sobrien 39155357Sobrien1998-08-11 Paul Eggert 39255357Sobrien 39355357Sobrien * src/system.h (initialize_main): New macro. 39455357Sobrien * src/grep.c (main): Invoke initialize_main first thing. 39555357Sobrien 39655357Sobrien1998-04-29 Paul Eggert 39755357Sobrien 39855357Sobrien * NEWS, src/grep.1: Describe new -a and -d options. 39955357Sobrien 40055357Sobrien * src/grep.c (long_options, usage, main): 40155357Sobrien New options -d or --directories and -a or --text. 40255357Sobrien (directories, always_text): New variables. 40355357Sobrien (IS_DIRECTORY_ERRNO): New macro. 40455357Sobrien (reset): Now returns value specifying whether to skip this file. 40555357Sobrien Stat the file if either mmap or directory-skipping is possible. 40655357Sobrien Skip the file if it's a directory and we're skipping directories. 40755357Sobrien (grep): Skip the file if `reset' tells us to. 40855357Sobrien (main): If open fails because the file is a directory, and if we're 40955357Sobrien skipping directories, don't report an error. 41055357Sobrien Remove special case for DOS and Windows. 41155357Sobrien 41255357Sobrien * src/dosbuf.c (guess_type): Use the same method for guessing whether a 41355357Sobrien file is binary as grep.c's grep does. 41455357Sobrien There's no longer any need to declare `bp' to be unsigned. 41555357Sobrien 41655357Sobrien1998-04-26 Alain Magloire 41755357Sobrien 41855357Sobrien * grep-2.2 release. 41955357Sobrien 42055357Sobrien * src/dfa.c: Wrong revision was pulled out 42155357Sobrien for beta 2.1.1d. 42255357Sobrien * src/search.c: Wrong revision was pulled out 42355357Sobrien for beta 2.1.1d. 42455357Sobrien 42555357Sobrien * src/grep.c: ck_atoi () added instead of atoi (). 42655357Sobrien Suggestion from Jim Meyering. 42755357Sobrien ck_atoi () pulled from diffutils-2.7, maintained by Paul Eggert. 42855357Sobrien 42955357Sobrien * AUTHORS: Rephrase of some sentences. 43055357Sobrien * README: Rewording. 43155357Sobrien Noted and patched by Joel N. Weber II. 43255357Sobrien 43355357Sobrien1998-04-17 Kaveh R. Ghazi 43455357Sobrien 43555357Sobrien * src/dfa.h: Don't define `const', trust autoconf to handle it. 43655357Sobrien 43755357Sobrien1998-04-16 Alain Magloire 43855357Sobrien 43955357Sobrien * tests/{status,empty}.sh: wrong return status. 44055357Sobrien 44155357Sobrien * src/grep.c: Remove the REGEX part in usage (), it was 44255357Sobrien consider overkill by most. 44355357Sobrien 44455357Sobrien1998-04-14 Eli Zaretskii 44555357Sobrien 44655357Sobrien * djgpp/config.bat: Support file names with multiple dots on all 44755357Sobrien platforms. 44855357Sobrien 44955357Sobrien * djgpp/README: Add instructions about file names illegal on 45055357Sobrien MS-DOS. 45155357Sobrien 45255357Sobrien1998-04-13 Alain Magloire 45355357Sobrien 45455357Sobrien * src/dfa.c: by "popular" demand reverse 45555357Sobrien back to '_' not word-constituent. 45655357Sobrien 45755357Sobrien * grep-2.1.1c available for testing. 45855357Sobrien 45955357Sobrien1998-04-13 Karl Heuer 46055357Sobrien 46155357Sobrien * src/grep.c: (a) The directory check is done too early: 46255357Sobrien logically, if the argument is "-", then it refers to standard 46355357Sobrien input, regardless of whether there's something in the file 46455357Sobrien system answering to "-". 46555357Sobrien (b) The sh command "grep -l root /etc/passwd /etc/group 0<&-" 46655357Sobrien prints "(standard input)" instead of "/etc/passwd", because it 46755357Sobrien mistakenly believes that a named file will never be opened on fd 46855357Sobrien 0. The string "(standard input)" should be based on the file 46955357Sobrien having been originally specified as "-", rather than making 47055357Sobrien assumptions about the fd. 47155357Sobrien (c) the code that calls close(fd) is being done outside of the 47255357Sobrien test for a bad fd. Thus, if the open failed, this code will 47355357Sobrien attempt to close(-1). It should be done inside the "fd != -1" 47455357Sobrien branch. 47555357Sobrien This patch addresses all three of these problems. 47655357Sobrien 47755357Sobrien1998-04-13 Alain Magloire 47855357Sobrien 47955357Sobrien * configure.in: remove the deprecated AC_ISC_POSIX macro. 48055357Sobrien Spotted by Karl Heuer. 48155357Sobrien 48255357Sobrien1998-04-03 Eli Zaretskii 48355357Sobrien 48455357Sobrien * djgpp/main.mak, djgpp/src.mak, djgpp/tests.mak: Updated from the 48555357Sobrien relevant Makefile.in files. 48655357Sobrien 48755357Sobrien * djgpp/config.bat: Create files in intl directory like the 48855357Sobrien configure script does. 48955357Sobrien 49055357Sobrien1998-03-28 Eli Zaretskii 49155357Sobrien 49255357Sobrien * djgpp/main.mak, djgpp/src.mak, djgpp/tests.mak: Updated to track 49355357Sobrien changes in respective Makefile.in files. 49455357Sobrien 49555357Sobrien * src/dosbuf.c (guess_type): Avoid running off the end of the 49655357Sobrien buffer. Spotted by Paul Eggert. 49755357Sobrien 49855357Sobrien1998-03-27 Alain Magloire 49955357Sobrien 50055357Sobrien * grep-2.1.1b.tar.gz available. 50155357Sobrien 50255357Sobrien * src/regex.c: CLASS_CHAR_MAX set to 256 instead of 6 50355357Sobrien when WCTYPE and WCHAR are not defined. When class names 50455357Sobrien where bigger then 6, it will not detect an error. 50555357Sobrien example '[[:alphabet:]]'. 50655357Sobrien 50755357Sobrien * Updated the copyright of the files with emacs. 50855357Sobrien With emacs Jim :). 50955357Sobrien 51055357Sobrien1998-03-26 Jim Meyering 51155357Sobrien 51255357Sobrien * src/dfa.c (IS_WORD_CONSTITUENT): Define. 51355357Sobrien (lex): Use IS_WORD_CONSTITUENT, not ISALNUM. 51455357Sobrien Don't special-case '_'. 51555357Sobrien (dfastate): Use IS_WORD_CONSTITUENT, not ISALNUM. 51655357Sobrien (dfaexec): Likewise. 51755357Sobrien 51855357Sobrien1998-03-25 Alain Magloire 51955357Sobrien 52055357Sobrien * tests/warning.sh: typos and replace the echos with 52155357Sobrien a simple cat. 52255357Sobrien Noted By Jim Meyering. 52355357Sobrien 52455357Sobrien * src/regex.c: #undef ISASCII and ISPRINT before defining 52555357Sobrien them(On Solaris it was define). 52655357Sobrien Pattern 'a[[:]:]]b' is an invalid char class and the error 52755357Sobrien from regex was 1(REG_NOMATCH) instead of 2 (REG_ECTYPE). 52855357Sobrien Fix with help from Ulrich Drepper. 52955357Sobrien 53055357Sobrien * src/grep.c (usage): Ulrich wrote: "A single printf should 53155357Sobrien not have more than 900 bytes. For translation reasons the 53255357Sobrien text shouldn't be split in too many pieces since this is 53355357Sobrien tiresome and also does not help to generate a consistent picture." 53455357Sobrien Noted by Ulrich Drepper. 53555357Sobrien * src/grep.c (usage): Dig out and old patch from 53655357Sobrien Franc,ois to explain the regex in usage(). 53755357Sobrien Ideas from Franc,ois Pinard. 53855357Sobrien 53955357Sobrien1998-03-23 Alain Magloire 54055357Sobrien 54155357Sobrien * testing: grep-2.1.1a for testing. 54255357Sobrien 54355357Sobrien * configure.in: Solaris needs '-lw' if we use wchar/wctype 54455357Sobrien functions. 54555357Sobrien * src/btowc.c: New file from GNU libc. Solaris 2.5 don't 54655357Sobrien have it define. 54755357Sobrien * configure.in : check for btowc (). 54855357Sobrien 54955357Sobrien * regex.c: Include <wchar.h> before <wctype.h>, to work around 55055357Sobrien a Solaris 2.5 bug. 55155357Sobrien Patch provided by Paul Eggert. 55255357Sobrien 55355357Sobrien * tests/status.sh: new file to check return status code. 55455357Sobrien * tests/empty.sh: new file to check for empty pattern. 55555357Sobrien * tests/warning.sh: new file to tell where to report errors. 55655357Sobrien 55755357Sobrien * configure.in: If available, prefer support for large files 55855357Sobrien unless the user specified one of the CPPFLAGS, LDFLAGS, or LIBS 55955357Sobrien variables. 56055357Sobrien Done by Paul Eggert. 56155357Sobrien 56255357Sobrien * src/grep.c (usage): change prep.ai.mit.edu for gnu.org. 56355357Sobrien 56455357Sobrien1998-03-18 Alain Magloire 56555357Sobrien 56655357Sobrien * src/grep.c (usage): Formating the --help message a bit off. 56755357Sobrien Noted by William Bader. 56855357Sobrien 56955357Sobrien * src/grep.c (main): When checking conflicting matcher for option -E the 57055357Sobrien matcher was to "egrep" instead of "posix-egrep". 57155357Sobrien Reported by kwzh@gnu.org. 57255357Sobrien 57355357Sobrien * src/grep.c: Typos and rewording the --help message. 57455357Sobrien Reported by Karl Heuer. 57555357Sobrien 57655357Sobrien * src/grep.1: The man page wording : 57755357Sobrien A regular expression matching a single character may be 57855357Sobrien followed by one of several repetition operators: 57955357Sobrien is unclear since 'x(yz)*z' is a valid regex. 58055357Sobrien Remove the "matching a single character". 58155357Sobrien Suggested by Harald Hanche-Olsen. 58255357Sobrien 58355357Sobrien * src/grep.c (main): `-f /dev/null' now specifies no patterns 58455357Sobrien and therfore matches nothing. 58555357Sobrien Reported by Jorge Stolfi. 58655357Sobrien Patched by Paul Eggert. 58755357Sobrien 58855357Sobrien1998-03-10 Alain Magloire 58955357Sobrien 59055357Sobrien * Ice storm 98(el nino). Lost grep repository disk, 59155357Sobrien and my $HOME directory, etc .. 59255357Sobrien Trying to get the emails/patch from dejanews.com 59355357Sobrien and start from grep-2.1. 59455357Sobrien sigh .... 59555357Sobrien 59655357Sobrien1997-11-01 Alain Magloire 59755357Sobrien 59855357Sobrien * src/grep.c: For the long options, the problems are: 59955357Sobrien --file appears in the option table as 'no_argument' 60055357Sobrien instead of 'required_argument'. 60155357Sobrien --files-with-matches is missing from the option table. 60255357Sobrien The help lists '--fixed-strings' as the long option for -F, 60355357Sobrien the table has '--fixed-regexp'. 60455357Sobrien --regexp appears in the option table as 'no_argument' 60555357Sobrien instead of 'required_argument'. 60655357Sobrien --with-filename is missing from the option table. 60755357Sobrien Reported by Grant McDorman and Krishna Sethuraman. 60855357Sobrien 60955357Sobrien1997-10-19 Alain Magloire 61055357Sobrien 61155357Sobrien * src/grep.c: the option "with-filename was not in the arg table. 61255357Sobrien Corrected by Jim Hand. 61355357Sobrien 61455357Sobrien * GNU gettext library from gettext-0.10.32. 61555357Sobrien 61655357Sobrien * src/grep.c: reverse back to greping directories, 61755357Sobrien One could skip the error message by defining 61855357Sobrien SKIP_DIR_ERROR. There is no clear way of doing 61955357Sobrien things, I hope to setle this on the next majore release 62055357Sobrien Thanks Paul Eggert, Eli Zaretskii and gnits for the 62155357Sobrien exchange. 62255357Sobrien 62355357Sobrien * tests/status.sh: add this check to make sure 62455357Sobrien That the return status code is ok. 62555357Sobrien 62655357Sobrien1997-10-10 Andreas Schwab 62755357Sobrien 62855357Sobrien * src/grep.1: Fix formatting. 62955357Sobrien 63055357Sobrien * configure.in: Check for wctype.h, wchar.h, libintl.h and 63155357Sobrien isascii, which are needed for regex.c. 63255357Sobrien 63355357Sobrien1997-10-01 Paul Eggert 63455357Sobrien 63555357Sobrien * src/grep.c (fillbuf): Don't warn about mmap failures. 63655357Sobrien 63755357Sobrien1997-09-7 Alain Magloire 63855357Sobrien 63955357Sobrien * src/grep.c: added code for -H --with-filename. 64055357Sobrien 64155357Sobrien * djgpp/*: patch wrongly apply 64255357Sobrien duplication of text in djgpp/{README,config.h}. 64355357Sobrien Filter djgpp/config.bat with unix2dos. 64455357Sobrien 64555357Sobrien * djgpp/make.mak: beautify 64655357Sobrien From Eli Zaretskii. 64755357Sobrien 64855357Sobrien * grep-2.1 release. 64955357Sobrien 65055357Sobrien1997-09-01 Alain Magloire 65155357Sobrien 65255357Sobrien * grep-2.0f out for testing. 65355357Sobrien 65455357Sobrien * update to GNU gettext library from gettext-0.10.31 65555357Sobrien 65655357Sobrien * grep.c : have a nicer format for --version. 65755357Sobrien Noted by Ulrich Drepper. 65855357Sobrien 65955357Sobrien * obstack.[ch]: updated from GNU C library 66055357Sobrien * configure.in: look for stdlib.h [HAVE_STDLIB_H] 66155357Sobrien Comments from Ulrich Drepper. 66255357Sobrien 66355357Sobrien1997-08-25 Philippe De Muyter <phdm@info.ucl.ac.be> 66455357Sobrien 66555357Sobrien * src/dfa.c (sys/types.h): File included unconditionnaly. 66655357Sobrien 66755357Sobrien1997-08-16 Eli Zaretskii <eliz@is.elta.co.il> 66855357Sobrien 66955357Sobrien * grep.c (long_options) [O_BINARY]: Add DOS-specific options. 67055357Sobrien (fillbuf) [O_BINARY]: For DOS-style text files, strip CR 67155357Sobrien characters at end of line. 67255357Sobrien (prline) [O_BINARY]: Report correct byte offsets, even though CR 67355357Sobrien characters were stripped when reading the file. 67455357Sobrien (usage) [O_BINARY]: Add DOS-specific options. 67555357Sobrien (setmatcher) [HAVE_SETRLIMIT]: Set re_max_failures so that the 67655357Sobrien matcher won't ever overflow the stack. 67755357Sobrien (main) [__MSDOS__, _WIN32]: Handle backslashes and drive letters 67855357Sobrien in argv[0], remove the .exe suffix, and downcase the prgram name. 67955357Sobrien [O_BINARY]: Pass additional DOS-specific options to getopt_long 68055357Sobrien and handle them. Call stat before attempting to open the file, in 68155357Sobrien case it is a directory (DOS will fail the open call for 68255357Sobrien directories). Switch the input descriptor to binary mode, unless 68355357Sobrien it is a terminal device. 68455357Sobrien 68555357Sobrien * system.h [O_BINARY]: Define macros to switch a handle to binary 68655357Sobrien mode, so binary files could be grep'ed on MS-DOS and MS-Windows. 68755357Sobrien [HAVE_SETLOCALE]: Test for HAVE_SETLOCALE instead of 68855357Sobrien HAVE_LC_MESSAGES, to prevent compilation error in grep.c on 68955357Sobrien systems which don't define HAVE_LC_MESSAGES, but have setlocale. 69055357Sobrien 69155357Sobrien * dosbuf.c: New file, functions specific for MS-DOS/MS-Windows. 69255357Sobrien (guess_type, undossify_input, dossified_pos): New functions. 69355357Sobrien 69455357Sobrien * djgpp/config.h, djgpp/config.bat, djgpp/main.mak, djgpp/src.mak, 69555357Sobrien djgpp/po.mak, djgpp/intl.mak, djgpp/tests.mak, djgpp/po2tbl.sed: 69655357Sobrien New files, for building Grep with DJGPP tools for MS-DOS and 69755357Sobrien MS-Windows. 69855357Sobrien 69955357Sobrien * grep.1: Document DOS-specific switches. 70055357Sobrien 70155357Sobrien1997-08-08 Alain Magloire 70255357Sobrien 70355357Sobrien * grep-2.0e: available for testing 70455357Sobrien 70555357Sobrien * grep.c: change LC_MESSAGE to LC_ALL for (LC_CTYPE). 70655357Sobrien Suggested by Jochen Hein. 70755357Sobrien 70855357Sobrien * ABOUT-NLS: updated. 70955357Sobrien * grep.c: --version: more verbosity (COPYRIGHT). 71055357Sobrien * grep.c: --help: PATTERN, FILE instead of <pattern>, <file>. 71155357Sobrien * INSTALL.grep: not necessary removed. 71255357Sobrien * configure.in: --disable-regex rename --without-include-regex. 71355357Sobrien * THANKS: format: first row name, second email. 71455357Sobrien * ChangeLog: format ISO 8601. 71555357Sobrien Reported by Franc,ois Pinard. 71655357Sobrien 71755357Sobrien * grep.c: move dcl of struct stat st into "else" where it's used. 71855357Sobrien Reported by Jim Meyering. 71955357Sobrien 72055357Sobrien * grep.c: totalnl should be %u in printf. 72155357Sobrien Reported by Michael Aichlmay 72255357Sobrien Corrected with guidance from Ulrich Drepper 72355357Sobrien 72455357Sobrien1997-07-24 Alain Magloire <alainm@rcsm.ee.mcgill.ca> 72555357Sobrien 72655357Sobrien * Makefile.am: corrected an error when installing {f,e}grep.1. 72755357Sobrien From Kaveh R. Ghazi <ghazi@caip.rutgers.edu>. 72855357Sobrien From Ulrich Drepper <drepper@cygnus.com>. 72955357Sobrien 73055357Sobrien * Many files: use PARAMS instead of __STDC__ for prototypes. 73155357Sobrien From Jim Meyering <meyering@eng.ascend.com>. 73255357Sobrien Patch provided by Kaveh R. Ghazi <ghazi@caip.rutgers.edu>. 73355357Sobrien 73455357Sobrien * dfa.[ch]: uses the one in gawk-3.0.3 with the patch from 73555357Sobrien Arnold (see Changelog: July 12 1997) 73655357Sobrien 73755357Sobrien * grep.1: a note to say -l, -L, -q stop on first match. 73855357Sobrien Noted by Andrew Beattie <gaffer@tug.com>. 73955357Sobrien 74055357Sobrien * grep.c: refuse to scan if the file is a directory. 74155357Sobrien This was causing problems on SUNs. If the directory contains 74255357Sobrien a file that could match the pattern, garbage was display. 74355357Sobrien 74455357Sobrien * tests directory: added new set of tests from Henry Spencer 74555357Sobrien regex package. Change the way the tests were done to be more 74655357Sobrien conformant to automake. 74755357Sobrien 74855357Sobrien * configure.in: added --disable-regex for folks with their own fuctions. 74955357Sobrien 75055357Sobrien * grep-20d : available for testing 75155357Sobrien 75255357Sobrien1997-07-18 Alain Magloire <alainm@rcsm.ee.mcgill.ca> 75355357Sobrien 75455357Sobrien * grep-2.0c: available for testing 75555357Sobrien 75655357Sobrien1997-07-17 Alain Magloire <alainm@rcsm.ee.mcgill.ca> 75755357Sobrien 75855357Sobrien * src/grep.c: Cause grep to fail if `fclose (stdout)' fails. 75955357Sobrien From Jim Meyering <meyering@eng.ascend.com>. 76055357Sobrien 76155357Sobrien * grep.c:usage() more consistency in the --help. 76255357Sobrien 76355357Sobrien * egrep, fgrep were links This is in violation of GNU standards: 76455357Sobrien "Please don't make the behavior of a utility depend on the name used 76555357Sobrien to invoke it. It is useful sometimes to make a link to a utility with 76655357Sobrien a different name, and that should not change what it does." 76755357Sobrien For now egrep and fgrep will be copies of grep. A better scheme 76855357Sobrien should be found later. 76955357Sobrien After discussion with Tom Tromey <tromey@cygnus.com>. 77055357Sobrien 77155357Sobrien * fgrep.man and egrep.man included: They are stubs that call grep.1. 77255357Sobrien * Makefile.am: modified to install {f,e,}grep[,.1]. 77355357Sobrien 77455357Sobrien * speed hack for -l, -L: bail out on first match. 77555357Sobrien From Scott Weikart <scott@igc.apc.org>. 77655357Sobrien 77755357Sobrien * *.[ch]: provided prototypes for strict argument checking 77855357Sobrien With the help of Stewart Levin <stew@sep.stanford.edu>. 77955357Sobrien 78055357Sobrien1997-07-16 Alain Magloire <alainm@rcsm.ee.mcgill.ca> 78155357Sobrien 78255357Sobrien * configure.in: typo in the creation of po/Makefile 78355357Sobrien Noted by Volker Borchert bt@teknon.de. 78455357Sobrien 78555357Sobrien * grep-2.0b: make it available for testing. 78655357Sobrien 78755357Sobrien1997-07-15 Alain Magloire <alainm@rcsm.ee.mcgill.ca> 78855357Sobrien 78955357Sobrien * src/grep.c usage(): cut the --help in smaller printf()'s 79055357Sobrien Noted by Ulrich Drepper <drepper@cygnus.com>. 79155357Sobrien 79255357Sobrien1997-07-14 Alain Magloire <alainm@rcsm.ee.mcgill.ca> 79355357Sobrien 79455357Sobrien * grep-2.0a: make an alpha available for testing. 79555357Sobrien 79655357Sobrien1997-07-12 Alain Magloire <alainm@rcsm.ee.mcgill.ca> 79755357Sobrien 79855357Sobrien * run gettextize: added the po directory filled with *.po files. 79955357Sobrien 80055357Sobrien * check.sh, scriptgen.awk: fix grep paths. 80155357Sobrien 80255357Sobrien * change the directory strucure: grep is now in src to comply with 80355357Sobrien gettext.m4. 80455357Sobrien 80555357Sobrien * grep.c version.c [VERSION]: got rid of version.c, 80655357Sobrien it is now define via config.h. 80755357Sobrien 80855357Sobrien * dfa.c: patch to speed up initialization. 80955357Sobrien Arnold Robbins (arnold@gnu.ai.mit.edu). 81055357Sobrien 81155357Sobrien1997-07-09 Alain Magloire <alainm@rcsm.ee.mcgill.ca> 81255357Sobrien 81355357Sobrien * *.c [HAVE_CONFIG_H]: Macro defined. 81455357Sobrien 81555357Sobrien * support for I18N in Makefile.am and configure.in. 81655357Sobrien 81755357Sobrien * update all the string to use gettext(I18N). 81855357Sobrien Help from Franc,ois Pinard previous patch <pinard@IRO.UMontreal.CA>. 81955357Sobrien 82055357Sobrien1997-07-04 Alain Magloire <alainm@rcsm.ee.mcgill.ca> 82155357Sobrien 82255357Sobrien * obstack.[ch]: updated from glibc. 82355357Sobrien Work of Ulrich Drepper <drepper@cygnus.com>. 82455357Sobrien 82555357Sobrien * regex.[ch]: updated from glibc. 82655357Sobrien Work of Ulrich Drepper <drepper@cygnus.com>. 82755357Sobrien 82855357Sobrien * grep.c: for option -e not counting '\n' for new keys. 82955357Sobrien From Mark Waite <markw@mddmew.fc.hp.com>. 83055357Sobrien 83155357Sobrien * grep.c: for option -f allocating the right count. 83255357Sobrien From Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>. 83355357Sobrien Mike Heartel (mike@cs.uoregon.edu). 83455357Sobrien 83555357Sobrien * kwset.c (bmexec): Cast tp[-2] to unsigned char before comparing. 83655357Sobrien From Jim Meyering <meyering@asic.sc.ti.com>. 83755357Sobrien 83855357Sobrien * grep.1: various typos. 83955357Sobrien From Keith Bostic <bostic@bsdi.com>. 84055357Sobrien Mike Heartel (mike@cs.uoregon.edu). 84155357Sobrien 84255357Sobrien1997-06-17 Alain Magloire <alainm@rcsm.ee.mcgill.ca> 84355357Sobrien 84455357Sobrien * grep.c: support for long options. 84555357Sobrien patch done by Franc,ois Pinard <pinard@IRO.UMontreal.CA>. 84655357Sobrien 84755357Sobrien * add getopt1.c in Makefile.am. 84855357Sobrien Noted by Franc,ois Pinard <pinard@IRO.UMontreal.CA> 84955357Sobrien 85055357Sobrien * replace getopt.[ch] and add getopt1.c. 85155357Sobrien 85255357Sobrien * kwset.c: undef malloc before define it. 85355357Sobrien Franc,ois Pinard <pinard@IRO.UMontreal.CA>. 85455357Sobrien 85555357Sobrien1997-06-07 Alain Magloire <alainm@rcsm.ee.mcgill.ca> 85655357Sobrien 85755357Sobrien * grep.c: format incorrect in 85855357Sobrien fprintf("%s: warning: %s: %s...", filename, strerror(errno)). 85955357Sobrien Mike Heartel (mike@cs.uoregon.edu). 86055357Sobrien 86155357Sobrien1996-11-19 David J MacKenzie <djm@catapult.va.pubnix.com> 86255357Sobrien 86355357Sobrien * make.com: Set the logical SYS. From rdb@cocamrd.oz.au (Rodney Brown). 86455357Sobrien 86555357Sobrien * grep.c (S_ISREG): Define if not defined already, for e.g. 86655357Sobrien SunOS 4.0.3. 86755357Sobrien 86855357Sobrien * dfa.c (test_bit, set_bit, clear_bit): Renamed from tstbit, 86955357Sobrien setbit, clrbit to avoid conflict with HP-UX sys/param.h macros. 87055357Sobrien 87155357Sobrien * memchr.c: New file, from GNU libc. 87255357Sobrien * grep.c (memchr): Remove definition. 87355357Sobrien * configure.in: Use AC_REPLACE_FUNCS for memchr. 87455357Sobrien 87555357Sobrien * configure.in: Remove unused checks for memalign and unsigned char. 87655357Sobrien * grep.c: HAVE_WORKING_MMAP -> HAVE_MMAP. 87755357Sobrien 87855357Sobrien * system.h: New file. 87955357Sobrien * dfa.c, kwset.c, grep.c, search.c: Use it instead of duplicating 88055357Sobrien portability boilerplate. 88155357Sobrien 88255357Sobrien * grep.c: Include sys/types.h once, instead of three times 88355357Sobrien conditionally. 88455357Sobrien * dfa.c, kwset.c, search.c: Include sys/types.h unconditionally, 88555357Sobrien to always try to get size_t (needed on some old SysV's). 88655357Sobrien 88755357Sobrien * dfa.c: Define strchr in terms of index, not the other way around. 88855357Sobrien * search.c: Use memcpy instead of bcopy. 88955357Sobrien 89055357Sobrien1996-11-15 David J MacKenzie <djm@catapult.va.pubnix.com> 89155357Sobrien 89255357Sobrien * Many files: Update FSF address. 89355357Sobrien Update configuration to use autoconf v2 and automake. 89455357Sobrien 89555357Sobrien1993-05-22 Mike Haertel <mike@cs.uoregon.edu> 89655357Sobrien 89755357Sobrien * Version 2.0 released. 898