| 11999-11-18 Paul Eggert 2 3 * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a 4 problem with the QNX 4.25 shell, which doesn't propagate exit 5 status of failed commands inside shell assignments. 6 71999-11-13 Eli Zaretskii 8 9 * doc/grep.texi: Minor markup and spelling corrections. Use 10 @noindent where appropriate. 11 12 * PATCHES-{AM,AC}: rename to PATCHES.{AM,AC} 13 141999-11-12 Eli Zaretskii 15 16 doc/grep.texi: Minor fixes and typos corrected. 17 djgpp/README: Updated version. 18 191999-11-07 Paul Eggert 20 21 * src/grep.c (usage): Fix misspelling. 22 231999-11-07 Paul Eggert 24 25 Don't assume that the C library has re_set_syntax and friends. 26 * src/Makefile.am (base_sources): Add regex.c, regex.h. 27 (EXTRA_DIST): Remove regex.c, regex.h. 28 29 * src/grep.c (prtext): Use out_quiet, not not_text, to decide 30 whether to set pending to zero at the end. 31 (not_text): Remove static variable, undoing latest change. 32 (grep): Likewise. 33 34 * doc/grep.texi: Tighten up the text, and fix some minor 35 spelling and usage errors. Use @enumerate rather than @table 36 @samp, since it's better for Q&A format. Add cross 37 references. 38 391999-11-01 Alain Magloire 40 41 * src/search.c: Use the more portable [[:alnum:]] 42 to define a word instead of Ascii dependent [0-9A-Za-z] 43 * src/grep.c: make not_text global to not display text when 44 the context switches -A/-B/-C are use on binary files. 45 * make grep-2.3g available for testing. 46 * configure.in: drop support for --without-included-regex. 47 This was generating bogus bug reports, since many GNU/Linux 48 users have different version of glibc. And glibc maintainers 49 decided to drop k&r support. 50 511999-11-01 Arnold D. Robbins 52 53 * regex.c (init_syntax_once): move below definition of 54 ISALNUM etc., then use ISALNUM to init the table, so that 55 the word ops will work if i18n'ed. 56 (SYNTAX): And subscript with 0xFF for Latin-1 characters. 57 581999-10-26 Alain Magloire 59 60 * src/regex.c: Merge changes from GNU lib C. 61 * Updated the *.po files 62 631999-10-26 Paul Eggert 64 65 * src/grep.c (fillbuf): Don't report buffer size overflow if 66 newalloc == save and maxalloc == save. This can happen 67 e.g. when reading a large page-aligned file that contains 68 no newlines. 69 701999-10-21 Paul Eggert 71 72 * src/grep.c (usage): Give example. Clarify -F. 73 Explain exit status more clearly. 74 751999-10-12 Paul Eggert 76 77 * doc/grep.texi: Shorten the commentary about egrep and {. 78 "BSD grep" -> "traditional grep". 79 * doc/grep.1: Match recent changes to grep.texi. 80 811999-10-11 Paul Eggert 82 83 * NEWS, doc/grep.1, doc/grep.texi: New option --mmap. 84 * src/grep.c (mmap_option): New variable. 85 (long_options, reset, usage): Add --mmap. 86 Default is now read, not mmap. 87 88 * doc/grep.1: Document -Z or --null. 89 901999-10-11 Paul Eggert 91 92 * doc/grep.texi: Fix texinfo glitches. POSIX -> POSIX.2 where 93 appropriate. 94 951999-10-11 Paul Eggert 96 97 * acconfig.h (ssize_t): New #undef. 98 99 * configure.in (AC_CHECK_TYPE): Add ssize_t. 100 101 * src/grep.c (PREFERRED_SAVE_FACTOR): New macro. 102 (reset): If the buffer has already been allocated, set bufsalloc to 103 be bufalloc / PREFERRED_SAVE_FACTOR. This avoids problems when 104 bufsalloc == bufalloc (possible after reading a large binary file). 105 (reset): Use PREFERRED_SAVE_FACTOR instead of magic constant. 106 Do not set bufbeg; nobody uses it. 107 Always set buflim. 108 Check for lseek error. 109 Use SEEK_CUR, not a magic constant. 110 (fillbuf): Return an error indication, not a count. 111 All callers changed. 112 Do not assume ssize_t fits in int. 113 Use PREFERRED_SAVE_FACTOR instead of magic constant. 114 Clean up mmap code. 115 Do not attempt to mmap zero bytes. 116 Check for lseek error. 117 Use SEEK_SET, not a magic constant. 118 Work correctly if read is interrupted. 119 (grepfile): Work correctly if open or close is interrupted. 120 121 * src/system.h (SEEK_SET, SEEK_CUR): New macros. 122 1231999-10-02 Alain Magloire 124 125 * src/regex.[ch]: upgrade from GNU lib C source tree. 126 127 * make beta 2.3f available. 128 1291999-10-02 Paul Eggert 130 131 * NEWS: egrep is now equivalent to `grep -E'. 132 The lower bound of an interval is not optional. 133 You can specify a matcher multiple types without error. 134 -u and -U are now allowed on non-DOS hosts, and have no effect. 135 * doc/grep.texi: Likewise. 136 * doc/grep.1: Likewise. 137 Fix some troff bugs that prevented `groff' from rendering the page. 138 139 * src/egrepmat.c, src/fgrepmat.c, src/grepmat.c (default_matcher): 140 Remove. 141 (matcher): Add. 142 * src/grep.h (default_matcher): Remove. 143 (matcher): Now exported from ?grepmat.c, not grep.c. 144 145 * src/dfa.c (lex): If { would start an invalid interval specification, 146 treat it as a normal character. 147 Remove (broken) support for {,M} meaning {0,M}. 148 Diagnose bogus intervals like {1,0}. 149 (closure): maxrep is now -1 to indicate no limit, not zero; 150 zero is a valid value for maxrep, meaning an upper bound of zero. 151 152 * src/grep.c (short_options): New constant. 153 (long_options, main): -u and -U are now supported on Unix, 154 with no effect. 155 (matcher): Removed; now defined by ?grepmat.c. 156 (install_matcher): Renamed from setmatcher. 157 (setmatcher): New function. 158 (usage): Report new, more uniform option scheme. 159 (main): Do not initialize matcher; ?grepmat.c now does this. 160 Rely on setmatcher to catch matcher conflicts. 161 Default matcher is "grep". 162 163 * src/search.c (matchers): 164 Remove "posix-egrep" matcher; no longer needed. 165 (Ecompile): Likewise. 166 The egrep matcher now has POSIX behavior. 167 168 * tests/bre.tests: grep '\{' is no longer an error. 169 Fix test for interval too large, and enable it. 170 * tests/ere.tests: grep -E {1 is no longer an error 171 Likewise for a{1, a{1a, a{1a}, a{1,x}. 172 1731999-09-22 Paul Eggert 174 175 * largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC 176 2.95.1 bug with HP-UX 10.20. 177 1781999-09-12 Paul Eggert 179 180 * src/grep.c (fillbuf): Fix typo: we sometimes reported 181 arithmetic overflow even when there wasn't any. 182 1831999-09-12 Paul Eggert 184 185 * configure.in (AC_CHECK_FUNCS): Add memmove. 186 187 * src/system.h (S_ISREG): New macro. 188 (memmove): Define if ! defined HAVE_MEMMOVE && ! defined memmove, 189 not if !defined STDC_HEADERS. This is needed for SunOS 4.1.4, 190 which defines STDC_HEADERS but lacks memmove. 191 192 * src/grep.c (bufoffset): Needed even if !defined HAVE_MMAP. 193 (reset): Always fstat the file, since we always need its size if it is 194 regular. 195 Similarly, get the buffer offset of every regular file. 196 Set bufmapped to 0 if the file's initial offset is not a multiple 197 of the page size. 198 (fillbuf): Calculate an upper bound on how much memory we should 199 allocate only for regular files, since we don't know the sizes of 200 other files. 201 Don't bother to check whether the file offset is a multiple of the page 202 size, since we now do that just once in `reset'. 203 When an mmapped area would fall past the end of the file, trim it to 204 just before instead of giving up immediately and doing a `read'; 205 that avoids a worst-case behavior that could read half an mmapped file. 206 Fix bug when computing offsets on hosts that don't have mmap. 207 2081999-08-27 Paul Eggert 209 210 * src/system.h (memmove): New macro. 211 212 * src/grep.c (page_alloc): Reallocate the old buffer instead 213 of having both old and new buffers active simultaneously. 214 Remove valloc debugging variant, which no longer applies. 215 216 (fillbuf): Rejigger the buffer allocation mechanism. The old 217 mechanism could allocate more than 10*N bytes for an N-byte 218 file, which was excessive. Check for arithmetic overflow a 219 bit more carefully. 220 2211999-08-25 Paul Eggert 222 223 * src/grep.c (grepdir): 224 Don't assume that st_ino and st_dev must be integers; 225 POSIX.1 allows them to be floating-point (!). 226 227 * src/vms_fab.h (arr_ptr): `:' -> `;' to fix typo. 228 2291999-08-18 Alain Magloire 230 231 * 2.3e snapshot. 232 2331999-08-18 Alain Magloire 234 235 * src/search.c: On a CRAY J90 system running UNICOS 8.0. 236 Compilation of ./src/search.c failed because the declaration of 237 the variable "regex": 238 static struct re_pattern_buffer regex; 239 conflicted with a previous declaration search.c #includes "system.h", 240 which #includes <stdlib.h>, which declares : 241 extern char *regex __((char *_Re, char *_Subject, ...)); 242 The declaration in search.c is local to that one source file. 243 I just changed its name to something less likely to conflict. 244 (I called it "regexbuf", but you could pick any name you want.) 245 Excerpt email from Dean Kopesky. 246 2471999-08-16 Paul Eggert 248 249 Upgrade large-file support to the version used in tar and 250 textutils. 251 252 * Makefile.am (ACLOCAL_AMFLAGS): Define to be empty. 253 (M4DIR, ACINCLUDE_INPUTS): New macros. 254 ($(srcdir)/acinclude.m4): New rule. 255 256 * configure.in (AC_CANONICAL_HOST, AM_C_PROTOTYPES): Add. 257 (AC_SYS_LARGEFILE): Renamed from AC_LFS, for compatibility 258 with what should appear in the next autoconf release. 259 260 * m4/largefile.m4: Renamed from m4/lfs.m4. 261 262 * src/ansi2knr.1, src/ansi2knr.c, config.guess, config.sub: 263 New files. config.guess and config.sub ar needed by the new 264 AC_SYS_LARGEFILE. ansi2knr is needed by AM_C_PROTOTYPES, 265 which in turn is needed by the new AC_SYS_LARGEFILE. 266 2671999-08-16 Alain Magloire 268 269 * 2.3d snapshot on ftp server. 270 2711999-07-26 Paul Eggert 272 273Several GNU tools have options to process arbitrary file names, even 274file names that contain newline characters. These include `find 275-print0', `perl -0', `sort -z', and `xargs -0'. It'd be handy if GNU 276grep also processed such file names. Here's a proposed patch to do 277this, relative to grep 2.3c. This patch introduces two options, one 278for the data, and one for the file names. (Sometimes one wants 279null-terminated file names in the output, and sometimes one wants to 280process lists of null-terminated strings, and these are orthogonal 281axes.) 282 283 * NEWS, doc/grep.texi: New -z or --null-data and -Z or --null options. 284 * src/grep.c (long_options, usage, main): Likewise. 285 286 * src/dfa.h (dfasyntax): New eol parameter. 287 * src/dfa.c (eolbyte): New var. 288 (dfasyntax): Set it from new parameter. 289 (lex, dfastat, build_state, dfaexec): Use it instead of '\n'. 290 291 * src/grep.h (eolbyte): New decl. 292 * src/grep.c (eolbyte): New var. 293 (nlscan, prpending, prtext, grepbuf, grep): Use it instead of '\n'. 294 (filename_mask): New var. 295 (prline, grepfile): Output NUL separator if filename_mask is zero. 296 (grep): Look for '\200' as the hallmark of a binary file, not '\0', 297 if -z or --null-data is specified, since it implies that '\0' is 298 expected as text. 299 300 * src/search.c (Gcompile, Ecompile): Pass eolbyte to dfasyntax. 301 (EGexecute, Fexecute): Use eolbyte instead of '\n'. 302 3031999-06-15 Alain Magloire 304 305 * src/grep.c, doc/grep{1,texi} : 306 --revert-match should be --invert-match. 307 Correction proposed by Karl Berry. 308 3091999-06-12 Alain Magloire 310 311 * doc/grep.{1,texi}: add description for --with-filename. 312 Noted missing by UEBAYASHI Masao. 313 3141999-03-17 Paul Eggert 315 316 * NEWS: Add GREP_OPTIONS. 317 318 * doc/grep.texi: Document GREP_OPTIONS, and the other 319 environment variables. Fix doc for [:blank:], [:cntrl:], [:punct:]. 320 321 * src/grep.c (prepend_args, prepend_default_options): New functions. 322 (main): Use them to implement GREP_OPTIONS. 323 * src/system.h (getenv): New decl. 324 3251999-03-16 Volker Borchert 326 327 * configure.in: Use case case ... esac for checking Visual C++. 328 When ${CC} contains options it was not recognize. 329 3301999-03-07 Paul Eggert 331 332 * src/grep.c (usage): Don't report -E, -F, and -G unless we're grep. 333 (main): Don't match options -E, -F, and -G unless we're grep. 334 Remove after-the-fact check for options -E, -F, and -G, since 335 they're no longer needed. 336 3371999-03-05 Eli Zaretskii 338 339 * src/grep.c (main): Print the name of the default matcher instead 340 of just "grep". 341 3421999-02-06 Alain Magloire 343 344 * tests/*.awk : Linux users are seeing "Broken Pipe" on make check. 345 The problem is that grep does not drain its stdin, thus the previous 346 process in the pipeline receives a SIGPIPE. Other shells are silent 347 about this. There is actually no failure, since the broken pipe is 348 expected. You can work around it by changing the pipeline, so that 349 the input is drained, like this: 350 status=`echo 'check' | { ${GREP} -E -e pattern >/dev/null 2>&1; 351 echo $?; cat >/dev/null; }`; if test $status -ne $errnu then ... fi 352 Excerpt email from Andreas Schwab. 353 3541999-02-23 Alain Magloire 355 356 * src/grep.c : Restrict the use of -E, -F, -G 357 to only grep driver, Posix behaviour. {f,e}grep 358 the matcher is already set. This change may brake 359 scripts, warn in NEWS. 360 361 * doc/grep.{1,texi} : -C takes arguments, upgrade manual. 362 363 * beta 2.3a 364 3651999-02-23 Alain Magloire 366 367 * configure.in : Change the configure VC test from 368 'test x$ac_cv_prog_CC = xcl;' to 'test x"$ac_cv_prog_CC" = xcl;' 369 Email from Joshua R. Poulson. 370 3711999-02-23 Paul Eggert 372 373 Fix porting bug reported by Amakawa Shuhei for SunOS 4.1.4-JL. 374 The btowc.c shipped with grep 2.3 is incorrect for Solaris 375 2.5.1 and earlier, as it assumes UTF8, which these OSes do not 376 support. Solaris 7 supports btowc, so there's no need to ship 377 a substitute for it. The only questionable case is Solaris 378 2.6, which lacks btowc but does support UTF8. However, 2.6 379 supports UTF8 but only as a demonstration (for an English 380 locale!); Japanese Solaris 2.6 users typically use EUC, or 381 sometimes shift-JIS, but they cannot use UTF8 since Japanese 382 UTF8 is not supported. Hence there's no point to having grep 383 substitute a btowc that uses UTF8, as it is either redundant, 384 or it will almost invariably have incorrect behavior. 385 386 * configure.in (AC_CHECK_HEADERS): Don't set USE_WCHAR. 387 (AC_CHECK_FUNCS): Add btowc, wctype. 388 (AC_REPLACE_FUNCS): Don't replace btowc; our replacement is 389 invariably doing the wrong thing anyway, at least on SunOS/Solaris. 390 Don't bother to check for wctype in -lw, as we don't support 391 wide characters on Solaris 2.5.1 or earlier anyway. 392 393 * bootstrap/Makefile.try (OBJS): Remove btowc.$(OBJEXT). 394 395 * src/btowc.c: Removed; no longer needed. 396 3971999-02-19 Paul Eggert 398 399 * NEWS: Fix typo when talking about the old behavior of 400 silently skipping directories; it was grep 2.1, not grep 2.2. 401 4021999-02-15 Alain Magloire 403 404 * bootstrap/Makefile.try : add DJGPP DEFS. 405 Done by Elie Zaretsckii. 406
|