1 2009-06-27 Paolo Bonzini <bonzini (a] gnu.org> 2 3 * configure.ac: Bump version. 4 * NEWS: Bump version. 5 * gnulib: Update. 6 * doc/sed.1: Regenerate. 7 8 2009-06-25 Paolo Bonzini <bonzini (a] gnu.org> 9 10 * autoboot.conf: Add selinux-h. 11 * execute.c: Copy over file creation context before creating a new file. 12 13 2009-06-25 Paolo Bonzini <bonzini (a] gnu.org> 14 15 * execute.c: Do not copy ACLs until the file is copied. 16 * utils.c (ck_mkstemp): Set a restrictive umask on temporary files. 17 18 2009-06-26 Paolo Bonzini <bonzini (a] gnu.org> 19 20 * autoboot: Do not use GIT_CONFIG_LOCAL. 21 22 2009-06-15 Paolo Bonzini <bonzini (a] gnu.org> 23 24 * autoboot.conf: Add memchr again. 25 * gnulib: Update. 26 27 2009-06-11 Sergey Farbotka <z8sergey8z (a] gmail.com> (tiny change) 28 29 * sed/execute.c (open_next_file): Fix off-by-one causing problems 30 under Cygwin. 31 32 2009-05-11 Paolo Bonzini <bonzini (a] gnu.org> 33 34 * sed/compile.c (snarf_char_class): Fix logic bug with [[[ in regular 35 expressions (and a possibly uninitialized use of variable delim stemming 36 from the bug). Uninitialized variable bug reported by Zhongxing Xu. 37 * testsuite/brackets.good: New. 38 * testsuite/brackets.inp: New. 39 * testsuite/brackets.sed: New. 40 * testsuite/Makefile.am: Add test. 41 * testsuite/Makefile.tests: Add test. 42 43 2009-05-11 Paolo Bonzini <bonzini (a] gnu.org> 44 45 * configure.ac: Define COPYRIGHT_YEAR. 46 * Makefile.am (dist-hook): Test it. 47 * sed/mbcs.c: Fix copyright years. 48 * sed/sed.c: Fix copyright years. Change COPYRIGHT_NOTICE to 49 COPYRIGHT_YEAR. 50 * sed/utils.c: Fix copyright years. 51 * testsuite/version.gin: Use COPYRIGHT_YEAR. 52 53 2009-04-30 Paolo Bonzini <bonzini (a] gnu.org> 54 55 * sed/compile.c: Declare bool arguments as int instead to please AIX XLC. 56 * sed/execute.c: Declare bool arguments as int instead to please AIX XLC. 57 * sed/utils.c: Declare bool arguments as int instead to please AIX XLC. 58 * sed/utils.h: Declare bool arguments as int instead to please AIX XLC. 59 60 2009-04-27 Paolo Bonzini <bonzini (a] gnu.org> 61 62 * configure.ac: Bump version number. 63 * configure: Regenerate. 64 65 2009-04-27 Paolo Bonzini <bonzini (a] gnu.org> 66 67 * configure.ac: Do not create homonymous links from builddir to srcdir. 68 * testsuite/Makefile.tests: Create readin.in2 here. 69 * testsuite/Makefile.am: Do not distribute it. 70 71 2009-04-27 Paolo Bonzini <bonzini (a] gnu.org> 72 73 * autoboot.conf: Add rename. 74 * gnulib: Update. 75 76 2009-04-27 Paolo Bonzini <bonzini (a] gnu.org> 77 78 * configure.ac: XFAIL UTF-8 tests where appropriate. 79 80 2009-04-27 Paolo Bonzini <bonzini (a] gnu.org> 81 82 * testsuite/Makefile.tests: Handle CRLF endings for mingw. 83 84 2009-04-27 Paolo Bonzini <bonzini (a] gnu.org> 85 86 * configure.ac: Link readin.in2 into builddir. 87 * configure: Regenerate. 88 * doc/Makefile.am: Do not distribute sed.html. Do not update 89 sed.texi if the output does not change. 90 * sed/Makefile.am: Order libraries according to their dependencies. 91 * sed/compile.c (get_openfile): Declare FAIL as int. 92 * sed/sed.c: Avoid printf ("") if REG_PERL is not defined. 93 * testsuite/eval.in2: Do not include in the repository. 94 * testsuite/Makefile.am: Clean always eval.in2 and never readin.in2. 95 * testsuite/Makefile.tests: Provide a default empty definition of TIME 96 and remove rules for readin.in2. 97 98 2009-03-31 Paolo Bonzini <bonzini (a] gnu.org> 99 100 * bootstrap.sh.in: Add __bool_true_false_are_defined. 101 * bootstrap.sh: Regenerate. 102 * basicdefs.h: Do not provide bool definitions for BOOTSTRAP at all. 103 104 2009-03-31 Paolo Bonzini <bonzini (a] gnu.org> 105 106 * sed/sed.c (contact): New. 107 (usage): From here. 108 (main): Use it for `sed --version' too. 109 110 * configure.ac: Point to GNU project mailing lists. 111 * sed/sed.c (contact): Use PACKAGE_BUGREPORT. 112 * testsuite/version.gin: Likewise. 113 * testsuite/version.good: Regenerate. 114 * doc/sed.1: Regenerate. 115 116 * bootstrap.sh.in (PACKAGE_BUGREPORT): New. 117 * bootstrap.sh: Regenerate. 118 119 2009-03-31 Paolo Bonzini <bonzini (a] gnu.org> 120 121 * testsuite/Makefile.am: Distribute utf8-3 and utf8-4 test files. 122 123 2009-02-17 Paolo Bonzini <bonzini (a] gnu.org> 124 125 * testsuite/Makefile.tests: Rewrite rule for utf8-[1234]. 126 Reported by Ralf Wildenhues. 127 128 2009-02-17 Paolo Bonzini <bonzini (a] gnu.org> 129 130 * sed/sed.c (usage): Print homepage URL. 131 * testsuite/version.gin: Update. 132 133 2009-01-28 Paolo Bonzini <bonzini (a] gnu.org> 134 135 * sed/sed.c (usage): Only print the bug report address for `sed --help'. 136 (main): Print it for `sed --version' too. 137 * testsuite/version.gin: Adapt. 138 * testsuite/Makefile.tests: Refine help message test. 139 140 2009-01-23 Paolo Bonzini <bonzini (a] gnu.org> 141 Hideo AOKI <hideo.aoki.tk (a] hitachi.com> 142 143 * sed/compile.c (match_slash): Fix MBCS behavior. 144 * sed/sed.h (MBSINIT): New. 145 146 2009-01-20 Paolo Bonzini <bonzini (a] gnu.org> 147 148 * autoboot.conf, bootstrap.sh.in: Remove memchr, memcmp, memmove 149 compatibility code. 150 * gnulib: Update. 151 152 2009-01-09 Paolo Bonzini <bonzini (a] gnu.org> 153 154 * tests/SPENCER.tests: Add testcases for glibc bugzilla 697. 155 * gnulib: Update. 156 157 2009-01-05 Paolo Bonzini <bonzini (a] gnu.org> 158 159 * execute.c (read_pattern_space): Reset hold space at end-of-file 160 if input->reset_at_next_file. 161 162 2008-12-31 Ralf Wildenhues <Ralf.Wildenhues (a] gmx.de> 163 164 Let --posix turn off more GNU extensions. 165 * sed/compile.c (mark_subst_opts): Turn off subst options i, I, 166 s, S, x, X, m, and M in --posix mode. 167 (compile_address): Disallow address modifiers, `FIRST~STEP', 168 `ADDR1,+N', and `ADDR1,~N' in --posix mode. 169 (compile_program): In --posix mode, do not accept e or z commands; 170 do not accept text between an a, c, or i command and the following 171 backslash; do not accept an argument to the l command. 172 173 2008-12-22 Paolo Bonzini <bonzini (a] gnu.org> 174 175 * autoboot.conf: Request modules emulating mb functions. 176 * configure.ac: Do not look for mb functions here. 177 178 2008-10-03 Paolo Bonzini <bonzini (a] gnu.org> 179 Jim Meyering <meyering (a] redhat.com> 180 181 * autoboot.conf: Add localcharset. 182 * Makefile.am: Remove intl subdir. Require Automake 1.10. 183 * configure.ac: Remove useless macros, switch to external gettext. 184 * lib/Makefile.am: Remove intl subdir from CPPFLAGS. 185 * sed/Makefile.am: Remove intl subdir from CPPFLAGS. 186 187 2008-10-02 Paolo Bonzini <bonzini (a] gnu.org> 188 189 * autoboot: Sync with gnulib's build-aux/bootstrap. 190 191 2008-09-29 Paolo Bonzini <bonzini (a] gnu.org> 192 193 * autoboot: Sync with gnulib's build-aux/bootstrap. 194 195 2008-09-29 Paolo Bonzini <bonzini (a] gnu.org> 196 197 * testsuite/Makefile.am: Add the utf8-{1,2,3,4} tests. 198 * testsuite/Makefile.tests: Add the utf8-{1,2,3,4} tests. 199 * testsuite/runtest: Support skipping tests. 200 * testsuite/utf8-1.good: New. 201 * testsuite/utf8-1.inp: New. 202 * testsuite/utf8-1.sed: New. 203 * testsuite/utf8-2.good: New. 204 * testsuite/utf8-2.inp: New. 205 * testsuite/utf8-2.sed: New. 206 * testsuite/utf8-3.good: New. 207 * testsuite/utf8-3.inp: New. 208 * testsuite/utf8-3.sed: New. 209 * testsuite/utf8-4.good: New. 210 * testsuite/utf8-4.inp: New. 211 * testsuite/utf8-4.sed: New. 212 213 2008-09-29 Paolo Bonzini <bonzini (a] gnu.org> 214 215 * BUGS: Document s/.*.// behavior with invalid multibyte sequences. 216 * NEWS: Document `z' extension. 217 * doc/sed-in.texi: Document both things. 218 * sed/compile.c (compile_program): Recognize `z'. 219 * sed/execute.c (execute_program): Execute `z'. 220 * testsuite/Makefile.am: Add badenc test. 221 * testsuite/Makefile.tests: Add badenc test. 222 * testsuite/badenc.good: New. 223 * testsuite/badenc.inp: New. 224 * testsuite/badenc.sed: New. 225 226 2008-09-28 Paolo Bonzini <bonzini (a] gnu.org> 227 228 * basicdefs.h: Replace alloca cruft with alloca.h. 229 * bootstrap.sh.in: Update for new gnulib. 230 * bootstrap.sh: Update for new gnulib. 231 * configure.ac: Move gnulib macros earlier. 232 * sed/execute.c: Do not include acl.h when bootstrapping. 233 234 2008-08-27 Paolo Bonzini <bonzini (a] gnu.org> 235 236 * sed/execute.c (closedown): Close the input file! 237 238 2008-08-20 Paolo Bonzini <bonzini (a] gnu.org> 239 240 * configure.ac: Add gl_DISABLE_THREADS. 241 242 2008-08-20 Ralf Wildenhues <ralf.wildenhues (a] gmx.de 243 244 * doc/sed-in.texi: Drop leading whitespace where appropriate, 245 do not use TABs. 246 * doc/sed.texi: Regnerate. 247 248 2008-08-19 Paolo Bonzini <bonzini (a] gnu.org> 249 250 * sed/compile.c: Do not include strverscmp.c. 251 252 2008-07-21 Paolo Bonzini <bonzini (a] gnu.org> 253 254 * doc/sed-in.texi: Remove northpark.edu address for sed FAQ. 255 * doc/sed.texi: Regenerate. 256 257 2008-07-10 Paolo Bonzini <bonzini (a] gnu.org> 258 259 * doc/sed-in.texi: Make the description of ^ and $ more precise. 260 * doc/sed.texi: Regenerate. 261 262 2008-06-04 Vladimir Marek <vladimir.marek (a] sun.com> 263 264 * basicdefs.h: Don't hardcode usage of prototypes on SunStudio. 265 266 2008-05-15 Paolo Bonzini <bonzini (a] gnu.org> 267 268 * autoboot.conf: Update for newer gnulib. 269 270 2008-05-15 Paolo Bonzini <bonzini (a] gnu.org> 271 272 * bootstrap.sh.in: Define bool, true, false. Reported by 273 Jason Stover. Adjust for gnulib changes. 274 * bootstrap.sh: Regenerate. 275 276 2008-04-24 Paul Eggert <eggert (a] twinsun.com> 277 278 * sed/compile.c (match_slash): Treat 's&foo&\&&' compatibly with 279 traditional 'sed'. 280 * testsuite/bsd.sh: Add test case for this. 281 * testsuite/bsd.good: Add test case output. 282 283 2008-04-24 Paolo Bonzini <bonzini (a] gnu.org> 284 285 * sed/compile.c (setup_replacement): Fix bug with \& in POSIX mode. 286 287 2008-01-16 Jim Meyering <meyering (a] redhat.com> 288 289 * sed/execute.c (open_next_file, get_backup_file_name): Avoid 290 warnings from gcc. 291 292 2008-01-16 Jim Meyering <meyering (a] redhat.com> 293 294 * sed/compile.c (snarf_char_class): Reverse order of conjuncts 295 so that "delim" is not used uninitialized. 296 297 2008-01-16 Jim Meyering <meyering (a] redhat.com> 298 299 * sed/utils.c (panic): Remove declaration of unused local, "fd". 300 301 2008-01-16 Jim Meyering <meyering (a] redhat.com> 302 303 * sed/execute.c (open_next_file, get_backup_file_name): Avoid 304 warnings from gcc. Avoid shadowing global "pipe". 305 306 2008-01-16 Jim Meyering <meyering (a] redhat.com> 307 308 * autoboot.conf (gnulib_modules): Add stat-macros and pathmax. 309 310 2007-10-25 Paolo Bonzini <bonzini (a] gnu.org> 311 Mike Frysinger <vapier (a] gentoo.org> 312 313 * doc/sed.x (q, Q): Document argument. 314 * configure.ac: Remove texi2html checks. 315 * doc/Makefile.am: Remove rules for sed.html, always distribute it. 316 317 2007-08-14 Paolo Bonzini <bonzini (a] gnu.org> 318 319 * sed/execute.c (open_next_file): Follow symlink here... 320 (closedown): ... not here. 321 322 2007-06-29 Paolo Bonzini <bonzini (a] gnu.org> 323 324 * sed/mbcs.c: Upgrade to GPLv3. 325 * sed/regexp.c: Upgrade to GPLv3. 326 * sed/sed.c: Upgrade to GPLv3. 327 * sed/sed.h: Upgrade to GPLv3. 328 * sed/utils.c: Upgrade to GPLv3. 329 * sed/utils.h: Upgrade to GPLv3. 330 * sed/compile.c: Upgrade to GPLv3. 331 * sed/execute.c: Upgrade to GPLv3. 332 * sed/fmt.c: Upgrade to GPLv3. 333 334 2007-03-01 Masatake YAMATO <jet (a] gyve.org> (tiny change) 335 336 * sed/compile.c (compile_program): Accept 0,/REGEXP/ address 337 specification only if --posix is not specified. 338 339 2007-02-05 Paolo Bonzini <bonzini (a] gnu.org> 340 341 * testsuite/bug-regex27.c, testsuite/bug-regex28.c: New, from 342 glibc (written by Jakub Jelinek). 343 344 2007-01-26 Paolo Bonzini <bonzini (a] gnu.org> 345 346 * sed/compile.c (check_final_program): Don't set text if the 347 pending_text is initialized but empty. 348 * sed/execute.c (output_line): Don't print text if it is NULL. 349 * testsuite/Makefile.am (TESTS): Add insert. 350 * testsuite/Makefile.tests (insert): New. 351 * testsuite/insert.good, testsuite/insert.sed, testsuite/insert.inp: New 352 testcase from Jonas Koelker. 353 354 2006-12-29 Paolo Bonzini <bonzini (a] gnu.org> 355 356 * sed/compile.c: Fix warnings. 357 * sed/execute.c: Fix warnings. 358 359 2006-12-22 Bruno Haible <bruno (a] clisp.org> 360 361 * sed/utils.c: Include pathmax. 362 * sed/mbcs.c: Use local_charset. 363 * sed/execute.c: Copy with padding after the mbstate_t member. 364 365 2006-12-21 Paolo Bonzini <bonzini (a] gnu.org> 366 367 * sed/mbcs.c: Include string.h (reported by Henning Nielsen Lund). 368 * sed/fmt.c: Likewise. 369 * sed/regexp.c: Likewise. 370 371 2006-12-18 Paolo Bonzini <bonzini (a] gnu.org> 372 373 * sed/execute.c (closedown): Remove dead code. 374 375 2006-12-17 Paolo Bonzini <bonzini (a] gnu.org> 376 377 * sed/utils.c: Include limits.h. 378 379 2006-12-16 Paolo Bonzini <bonzini (a] gnu.org> 380 381 * doc/sed-in.texi: Document --follow-symlinks. 382 383 2006-12-15 Paolo Bonzini <bonzini (a] gnu.org> 384 385 * sed/regexp.c: Disable all extensions on --posix. 386 387 2006-09-24 Paolo Bonzini <bonzini (a] gnu.org> 388 389 * sed/execute.c: Support ACLs. 390 * lib/utils.c: Move... 391 * sed/utils.c: ... here, and remove xmalloc. 392 393 2006-08-21 Paolo Bonzini <bonzini (a] gnu.org> 394 395 * sed/regexp.c: Accept NUL bytes for `.'. Accept 'a\(b' in 396 POSIXLY_CORRECT/POSIXLY_BASIC posixicity. 397 398 2006-08-03 Paolo Bonzini <bonzini (a] gnu.org> 399 400 Revert this part of the previous change: 401 402 2006-08-03 Paolo Bonzini <bonzini (a] gnu.org> 403 404 * sed/compile.c (get_openfile): Change second argument to char 405 and turn it into a string within the function. Adjust callers. 406 407 2006-08-03 Paolo Bonzini <bonzini (a] gnu.org> 408 Corinna Vinschen <vinschen (a] redhat.com> 409 410 * lib/getline.c (getline): Remove Windows special casing. 411 * lib/utils.c (register_open_file, ck_fdopen): New. 412 (ck_fopen, ck_mkstemp): Use register_open_file. 413 * lib/utils.h (ck_fdopen): New. 414 * sed/execute.c (open_next_file): Reopen stdin. 415 * sed/sed.h (read_mode): New. 416 * sed/sed.c (read_mode): New. 417 (main): Set it on --binary. 418 (usage): Document --binary. 419 * sed/compile.c (get_openfile): Change second argument to char 420 and turn it into a string within the function. Adjust callers. 421 * sed/execute.c (dump_append_queue, open_next_file): Use it 422 as mode for ck_fopen. 423 424 2006-08-03 Paolo Bonzini <bonzini (a] gnu.org> 425 426 * sed/execute.c (str_append): Use is_utf8 to skip useless work. 427 * sed/mbcs.c (initialize_mbcs): Look for a UTF-8 locale. 428 (is_utf8): New. 429 * sed/sed.h (is_utf8): New. 430 431 2006-07-13 Paolo Bonzini <bonzini (a] gnu.org> 432 433 * bootstrap.sh.in: Add a few autoconfy tests. 434 * Makefile.am: Update distributed bootstrap.sh. 435 436 2006-05-15 Hans-Bernhard Broeker <broeker (a] physik.rwth-aachen.de> 437 438 * sed/basicdefs.h (OB_MALLOC): Turn VCAST into void * cast. 439 440 2006-02-03 Paolo Bonzini <bonzini (a] gnu.org> 441 442 * sed/compile.c (compile_program) <case 'y'>: Pass false to match_slash. 443 444 2005-09-07 Paolo Bonzini <bonzini (a] gnu.org> 445 446 * lib/regcomp.c: Update from upstream. 447 * lib/regex.c: Update from upstream. 448 * lib/regex_.h: Update from upstream. 449 * lib/regex_internal.c: Update from upstream. 450 * lib/regex_internal.h: Update from upstream. 451 * lib/regexec.c: Update from upstream. 452 453 2005-08-30 Paolo Bonzini <bonzini (a] gnu.org> 454 455 * sed/execute.c (reset_addresses): Never activate ADDR_IS_NUM_MOD 456 addresses. 457 * testsuite/modulo.good, testsuite/modulo.inp, testsuite/modulo.sed: 458 New. 459 * testsuite/Makefile.tests: Add new testcase. 460 * testsuite/Makefile.am: Add new testcase. 461 * testsuite/Makefile.in: Regenerate. 462 463 2005-05-18 Maciej W. Rozycki <macro (a] linux-mips.org> 464 465 * configure.ac: Use a cache variable for the libcP test. 466 * configure: Regenerate. 467 468 2005-05-16 Eero Hakkinen <eero17 (a] bigfoot.com> 469 470 * sed/compile.c (snarf_char_class): Fix handling of 471 [^]xyz]. 472 473 2005-04-04 Paolo Bonzini <bonzini (a] gnu.org> 474 475 * sed/execute.c (process_files): Do not add a default 476 command-line in in-place editing mode. 477 478 2005-02-10 Paolo Bonzini <bonzini (a] gnu.org> 479 480 * testsuite/Makefile.tests: Add new testcase. 481 * testsuite/Makefile.am: Add new testcase. 482 * testsuite/Makefile.in: Regenerate. 483 * testsuite/appquit.good, testsuite/appquit.inp, 484 testsuite/appquit.sed: New testcase. 485 * testsuite/readin.sed: Quit after the last r command. 486 * testsuite/readin.good: Adjust. 487 * sed/execute.c (execute_program): Dump the results of the 488 a/r/R commands just before quitting. 489 490 2005-02-10 Paolo Bonzini <bonzini (a] gnu.org> 491 492 * sed/regexp.c: Fix off-by-one error in the "invalid reference 493 to subexpression" message. Debian bug 294339. 494 495 2005-02-08 Paolo Bonzini <bonzini (a] gnu.org> 496 497 * lib/obstack.h: include config.h. 498 499 2005-02-01 Paolo Bonzini <bonzini (a] gnu.org> 500 501 * doc/Makefile.am: Don't enable MAKEINFO_HTML and TEXI2HTML_HTML 502 rules unless BUILD_HTML. 503 504 2005-01-25 Paolo Bonzini <bonzini (a] gnu.org> 505 506 * sed/regexp.c: Fix building on GCC 2.95 and earlier. 507 508 2004-12-26 Paolo Bonzini <bonzini (a] gnu.org> 509 510 Do not use leftmost-longest matching for addresses. 511 512 * NEWS: Add a note about this. 513 * testsuite/recall2.good, testsuite/recall2.inp, 514 testsuite/recall2.sed: New test. 515 * testsuite/Makefile.am, testsuite/Makefile.tests: Add the 516 recall2 test. 517 * sed/sed.h (struct regex): New. 518 (struct addr, struct subst, compile_regex, match_regex, 519 release_regex): Use it instead of regex_t. 520 * sed/compile.c (compile_program): Update for new meaning of 521 the third parameter of compile_regex. 522 * sed/execute.c (do_subst): Pass less conservative value to 523 the regsize parameter of match_regex. 524 * sed/regexp.c (compile_regex_1): New, extracted out of 525 compile_regex. The third parameter, needed_sub, now includes 526 \0 (so 10 means that \0 .. \9 are needed). Pass RE_NO_SUB 527 if needed_sub is zero. 528 (compile_regex): Accept a struct regex instead of a regex_t. 529 Save the regular expression's text. 530 (match_regex): Accept a struct regex instead of a regex_t. 531 Recompile the pattern if it was compiled with RE_NO_SUB. 532 (release_regex): Accept a struct regex instead of a regex_t. 533 534 * doc/Makefile.am: Generate sed.texi correctly when 535 building outside srcdir. 536 537 2004-12-26 Paolo Bonzini <bonzini (a] gnu.org> 538 539 * BUGS: Add section about [a-z] matching uppercase characters, 540 and other locale issues. 541 * doc/sed-in.texi [!PERL]: Likewise. 542 543 2004-11-15 Paolo Bonzini <bonzini (a] gnu.org> 544 545 * sed/execute.c (str_append_modified): Copy the first character 546 when using \l or \u in a multi-byte configuration. Use 547 WCRTOMB instead of wcrtomb. 548 * sed/sed.h (WCRTOMB): New. 549 550 2004-11-11 Paolo Bonzini <bonzini (a] gnu.org> 551 552 * tst-rxspecer.c: Do not mix instructions and 553 declarations. 554 * basicdefs.h: Include locale.h before #defining 555 gettext, to avoid breakage under Solaris. 556 * sed/sed.c: do not include locale.h. 557 558 2004-11-03 Paolo Bonzini <bonzini (a] gnu.org> 559 560 * bug-regex11.c: Improve portability. 561 * bug-regex12.c: Improve portability. 562 * bug-regex13.c: Improve portability. 563 * bug-regex14.c: Improve portability. 564 * bug-regex21.c: Improve portability. 565 * bug-regex9.c: Improve portability. 566 * tst-boost.c: Improve portability. 567 * tst-pcre.c: Improve portability. 568 * tst-regex.c: Improve portability. 569 * tst-rxspencer.c: Improve portability. 570 571 2004-10-08 Paolo Bonzini <bonzini (a] gnu.org> 572 573 * lib/utils.c (utils_id_s): Renamed to open_files. 574 (struct id): Renamed to struct open_file. 575 576 2004-10-08 Jakub Jelinek <jakub (a] redhat.com> 577 578 * testsuite/Makefile.tests (bug-regex*, run-tests, 579 run-ptests): Use $(SED). 580 (version): Likewise; prepend $(SED) invocation with $(SEDENV). 581 582 2004-08-16 Paolo Bonzini <bonzini (a] gnu.org> 583 584 *** Version 4.1.2 released. 585 586 2004-08-06 Paolo Bonzini <bonzini (a] gnu.org> 587 588 * sed/compile.c (bad_command): Fix off-by-one error. 589 (snarf_char_class): Fix problem with [.....[] (i.e. 590 last char in class is a bracket. 591 592 2004-06-30 Paolo Bonzini <bonzini (a] gnu.org> 593 594 *** Version 4.1.1 released. 595 596 2004-06-29 Paolo Bonzini <bonzini (a] gnu.org> 597 598 * sed/compile.c (mark_subst_opts): Return int. 599 * sed/execute.c (open_next_file): Fix uninitialized 600 variable. 601 602 2004-06-10 Paolo Bonzini <bonzini (a] gnu.org> 603 604 *** Version 4.1 released. 605 606 2004-03-25 Paolo Bonzini <bonzini (a] gnu.org> 607 608 * lib/obstack.h: Get current version. 609 610 2004-03-13 Paolo Bonzini <bonzini (a] gnu.org> 611 612 Exit as soon as possible on an I/O error, and with 613 a better error message. 614 615 * lib/utils.c (ck_mkstemp, ck_rename, ck_getline): New 616 functions. Save temporary files into utils_id_s. 617 (struct id): Add a field named temp. 618 (ck_fopen): Init the new temp field of struct id. 619 (panic): Unlink temporary files before exiting. 620 * sed/execute.c (read_file_line): Use ck_getline. 621 (closedown): Use ck_rename. 622 (open_next_file): Use ck_mkstemp. 623 624 2004-01-20 Paolo Bonzini <bonzini (a] gnu.org> 625 626 * sed/sed.h (enum addr_state): New definition. 627 (enum addr_type): Remove ADDR_IS_NUM2. 628 (struct sed_cmd): Replace a1_matched with range_state. 629 * sed/compile.c (next_cmd_entry): Use range_state. 630 (compile_program): Death to ADDR_IS_NUM2. Compile 631 N,Mp as Np if N>=M. 632 * sed/execute.c (match_address_p): Rewritten. Handle 633 ADDR_IS_NUM here. 634 (match_an_address_p): Suit to new match_address_p. 635 (execute_program): Adjust to use range_state in `c'. 636 Handle addr_bang here. 637 (reset_addresses): Use range_state. 638 639 (struct input): New field "reset_at_next_file". 640 (read_pattern_space): Use it instead of "separate_files". 641 (process_files): Initialize it. 642 643 2004-01-17 Paolo Bonzini <bonzini (a] gnu.org> 644 645 * sed/sed.h: Do not include wchar.h and wctype.h, and do 646 not include the alloca stuff. 647 * basicdefs.h: Move all that here. 648 649 2004-01-15 Paolo Bonzini <bonzini (a] gnu.org> 650 651 * sed/regexp.c [REG_PERL]: Use REG_STARTEND instead of regexec2. 652 653 2004-01-09 Paul Eggert <eggert (a] twinsun.com> 654 Paolo Bonzini <bonzini (a] gnu.org> 655 656 * sed/sed.h (posixicity): New variable, replaces POSIXLY_CORRECT. 657 * sed/sed.c (main): Set it. 658 * sed/compile.c: Use it instead of POSIXLY_CORRECT. 659 * sed/execute.c: Use it instead of POSIXLY_CORRECT. 660 * doc/sed-in.texi: Document it and --posix. 661 662 2004-01-05 Paul Eggert <eggert (a] twinsun.com> 663 Paolo Bonzini <bonzini (a] gnu.org> 664 665 * NEWS: Fix [\n] to match either backslash or n in POSIXLY_CORRECT mode. 666 * doc/sed-in.texi: Document this. Also, document regular expressions 667 a bit better overall, using terminology that's more similar to POSIX. 668 * sed/sed.h (enum text_types): New definition. 669 * sed/compile.c (normalize_text): Replace final parameter with one of 670 type normalize_text. If TEXT_REGEX and in POSIXLY_CORRECT mode, 671 grok character classes without replacing \n inside them. 672 673 2004-01-03 Paolo Bonzini <bonzini (a] gnu.org> 674 675 * sed/execute.c (execute_program): print final line 676 after executing N, if not POSIXLY_CORRECT. 677 678 2003-12-28 Paolo Bonzini <bonzini (a] gnu.org> 679 680 * sed/compile.c: fix "\\\n" in RHS of s command. 681 Reported by Mike Castle. 682 * testsuite/bkslashes.inp, testsuite/bkslashes.good, 683 testsuite/bkslashes.sed: New files. 684 * testsuite/Makefile.am, testsuite/Makefile.tests: Add 685 the bkslashes test. 686 687 2003-12-16 Paolo Bonzini <bonzini (a] gnu.org> 688 689 *** Version 4.0b released. 690 691 * sed/mbcs.c: New file. 692 * sed/sed.h: Declare macros for mbcs.c. 693 * sed/compile.c: Use them. 694 (brlen): Moved to mbcs.c. 695 * sed/execute.c: Use them. 696 * sed/sed.c: call initialize_mbcs (). 697 698 2003-12-14 Paolo Bonzini <bonzini (a] gnu.org> 699 700 * sed/regex.c (match_regex): fix memory leak. 701 702 2003-11-27 Paolo Bonzini <bonzini (a] gnu.org> 703 704 * sed/execute.c (reset_addresses): leave addresses 0 705 and 0~STEP enabled. 706 707 2003-11-15 Jakub Jelinek <jakub (a] redhat.com> 708 709 * sed/regex.c: Use fastmap. 710 711 2003-09-21 Paolo Bonzini <bonzini (a] gnu.org> 712 713 *** Version 4.0a released. 714 715 * sed/execute.c (struct line): Add mbstate field. 716 (str_append): Keep mbstate up to date. 717 (str_append_modified): Likewise, and use towupper/towlower. 718 (line_init): Initialize mbstate. 719 (line_copy): Copy mbstate. 720 (line_append): Copy mbstate. 721 722 2003-07-15 Stepan Kasal <kasal (a] ucw.cz> 723 Paolo Bonzini <bonzini (a] fnu.org> 724 725 Change the way we treat lines which are not terminated by a newline. 726 Such lines are printed without the terminating newline (as before) 727 but as soon as more text is sent to the same output stream, the 728 missing newline is printed, so that the two lines don't concatenate. 729 730 * sed/execute.c (output_file): Is now struct output; users adjusted 731 to access the fp field, call output_missing_newline before, and 732 call flush_output afterwards. 733 (read_file_line): Set line.chomped FALSE each time we encounter a 734 line without the newline terminator, no matter whether this is the 735 last input file or not, and no matter whether we are in 736 POSIXLY_CORRECT mode or not. 737 (output_missing_newline): New function which prints the suppressed 738 newline, if necessary. 739 (flush_output): New function for a common pattern. 740 (output_line): Use struct output, set its flag accordingly. 741 (dump_append_queue): Use `ck_fwrite' instead of output_line. 742 (do_list): Flush the output stream at the end. 743 (closedown): The code ``if(separate_files) rewind_read_files();'' 744 (read_pattern_space): ... has been moved here. 745 (process_files): Don't do the default `p' at the end, ... 746 (execute_program): ... as this function is now responsible for it; 747 add the code to the end of the function and to the command `q'; 748 the commands `d', `D' and `Q' thus no longer have to forge an empty 749 line. 750 (execute_program): Commands `c' and `i' no longer call the 751 function output_line with chomped==FALSE; instead, they chomp 752 the text and call the function with chomped==TRUE. 753 (execute_program): Command `e' no longer uses output_line; it 754 calls ck_fwrite directly. Commands `e', `L' and `=' flush 755 the output stream at the end. 756 * sed/compile.c (special_files): Use `struct output' instead of the 757 file name. 758 (get_openfile): ... special files are no longer copied to file_read 759 or file_write. 760 (fp_list): Move to sed.h (users adjusted) and rename as... 761 * sed/sed.h (struct output): ...this. New flag missing_newline 762 associated to the output stream. 763 (struct sed_cmd, struct subst): Use `struct output *' instead of mere 764 `FILE *'; adjust compile.c and execute.c. 765 * testsuite/noeolw.sed, testsuite/noeolw.good, testsuite/noeolw.1good, 766 testsuite/noeolw.2good: New tests 767 768 2003-07-15 Stepan Kasal <kasal (a] ucw.cz> 769 770 * lib/utils.h, sed/sed.h: #include "basicdefs.h", 771 don't include it from various *.c files. 772 * sed/regex.c: Don't include regex.h as it's included via sed.h. 773 774 2003-06-11 Paolo Bonzini <bonzini (a] gnu.org> 775 776 * lib/getline.c: Don't realloc with first param = NULL. 777 778 2003-05-07 Paolo Bonzini <bonzini (a] gnu.org> 779 780 * sed/execute.c: Make treatment of ADDR_IS_NUM_MOD 781 simpler, and fix bugs in 0~5,+1 782 * sed/compile.c: Complain about addresses like 0 783 and 0,3 which are sources of misunderstandings. 784 Reported by Akim Demaille <akim (a] epita.fr> 785 786 2003-03-25 Paolo Bonzini <bonzini (a] gnu.org> 787 788 *** Version 4.0.7 released 789 790 * sed/execute.c (append_replacement): Extract from 791 do_subst 792 (do_subst): Don't update count when a match was 793 skipped. 794 * testsuite/xbxcx3.good, testsuite/xbxcx3.sed, 795 testsuite/xbxcx3.inp: Regression tests 796 797 2003-03-23 Paolo Bonzini <bonzini (a] gnu.org> 798 799 * sed/execute.c (do_subst): Fix several bugs with 800 numbered matches 801 * testsuite/numsub2.good, testsuite/numsub2.inp, 802 testsuite/numsub2.sed, testsuite/numsub3.good, 803 testsuite/numsub3.inp, testsuite/numsub3.sed, 804 testsuite/numsub4.good, testsuite/numsub4.inp, 805 testsuite/numsub4.sed, testsuite/numsub5.good, 806 testsuite/numsub5.inp, testsuite/numsub5.sed: 807 regression tests for the bugs 808 809 2003-03-15 Paolo Bonzini <bonzini (a] gnu.org> 810 811 *** Version 4.0.6 released 812 813 * lib/mkstemp.c: Include sys/file.h if available for the 814 benefit of Ultrix 815 816 2003-03-14 Paolo Bonzini <bonzini (a] gnu.org> 817 818 * sed/compile.c: Replace flagT with bool 819 * sed/execute.c: Replace flagT with bool 820 * sed/fmt.c: Replace flagT with bool 821 * sed/sed.c: Replace flagT with bool 822 * sed/regex.c: Replace flagT with bool 823 824 2003-03-13 Paolo Bonzini <bonzini (a] gnu.org> 825 826 * sed/compile.c (compile_program): Understand parameter 827 of `v'. 828 829 * sed/sed.c (usage): Split help message into multiple 830 strings 831 (main): Don't understand -h and -V 832 833 2003-03-12 Paolo Bonzini <bonzini (a] gnu.org> 834 835 * sed/compile.c (match_slash, snarf_char_class): More 836 multibyte character support 837 (brlen): New function 838 * testsuite/classes.good, testsuite/classes.inp, 839 testsuite/classes.sed: New files 840 841 2003-03-10 Paolo Bonzini <bonzini (a] gnu.org> 842 843 * sed/compile.c (match_slash): Strip the \ in front of 844 slashes (so that the matcher sees x/ for s/x\///). Don't 845 match / and [ unless at the start of a character. 846 847 2003-02-18 Paolo Bonzini <bonzini (a] gnu.org> 848 849 * sed/regex.c (compile_regex): // matches the last regular 850 expression even in POSIXLY_CORRECT mode. 851 * sed/compile.c (normalize_text): Treat multibyte character 852 sets correctly 853 (read_text): Don't swallow backslash sequences, run text 854 through normalize_text 855 (compile_program): Ditto for y command 856 857 * sed/compile.c (normalize_text): Add parameter that says 858 whether the text will be processed further to remove more 859 backslash escapes. Callers adjusted 860 (match_slash): Remove same parameter from here. Callers adjusted. 861 862 2003-02-15 Paolo Bonzini <bonzini (a] gnu.org> 863 864 * sed/sed.h: Fix prototype for match_regex, declare re_registers 865 if REG_PERL 866 * sed/execute.c (do_subst): Use re_registers 867 * sed/regex.c (copy_regs): New function 868 [REG_PERL]: Use re_registers 869 [!REG_PERL]: Avoid using internal entry points, support pre-glibc 870 2.3 regex for the sake of --without-included-regex. 871 872 2003-01-04 Paolo Bonzini <bonzini (a] gnu.org> 873 874 * sed/sed.h: Move some stuff from here... 875 * sed/basicdefs.h: ...to here 876 * lib/utils.c (ck_fopen): Add FAIL parameter 877 * lib/utils.h: Adjust parameter 878 * sed/compile.c, sed/execute.c, sed/sed.c: Adjust callers 879 880 * sed/basicdefs.h: Add TRUE/FALSE 881 * sed/compile.c, sed/execute.c, sed/sed.c: Use them 882 * sed/fmt.c: Do not redefine them 883 884 2003-01-02 Paolo Bonzini <bonzini (a] gnu.org> 885 886 * sed/sed.c: Bump copyright year 887 888 2002-12-24 Paolo Bonzini <bonzini (a] gnu.org> 889 890 * sed/sed.c: Use bindtextdomain 891 * sed/basicdefs.h [__EMX__]: Define initialize_main 892 * lib/getline.c [__EMX__]: Strip trailing CR 893 894 * sed/regex.c: Don't use N_ on the lines that define 895 error messages, some compilers complain. 896 897 2002-12-18 Paolo Bonzini <bonzini (a] gnu.org> 898 899 *** Version 4.0.5 released 900 901 * sed/compile.c: Don't use N_ on the lines that define 902 error messages, some compilers complain. 903 904 2002-12-16 Paolo Bonzini <bonzini (a] gnu.org> 905 906 * sed/compile.c: Improvements to some error messages; 907 `a', `i', `l', `L', `r' accept two addresses except in 908 POSIXLY_CORRECT mode. 909 910 2002-12-14 Paolo Bonzini <bonzini (a] gnu.org> 911 912 * lib/regex_internal.c: Fix problem on non-glibc 913 systems, from Jakub Jelinek 914 * lib/regex.c (RE_ENABLE_I18N): Conditionalize on 915 HAVE_MBRTOWC and HAVE_WCRTOMB. 916 * lib/getline.c: Fix compilation on non-glibc system 917 * lib/snprintf.c: Fix compilation on non-glibc system 918 * lib/basicdefs.h [P_]: Make more portable 919 920 2002-12-12 Paolo Bonzini <bonzini (a] gnu.org> 921 922 *** Version 4.0.4 released 923 924 2002-11-21 Paolo Bonzini <bonzini (a] gnu.org> 925 926 *** Version 4.0.3 released 927 928 2002-11-19 Paolo Bonzini <bonzini (a] gnu.org> 929 930 *** Version 4.0.2 released 931 932 2002-11-05 Paolo Bonzini <bonzini (a] gnu.org> 933 934 *** Version 4.0.1 released 935 936 2002-10-23 Paolo Bonzini <bonzini (a] gnu.org> 937 938 *** Version 4.0 released 939 940 2002-10-28 Paolo Bonzini <bonzini (a] gnu.org> 941 942 * lib/utils.c: Don't fail for EBADF in fflush 943 * src/sed.c: the_program is now a global 944 945 2002-10-19 Paolo Bonzini <bonzini (a] gnu.org> 946 947 * src/sed.c: Print GNU sed in --version for GNU sed, 948 and super-sed for super-sed (thanks to Bruno Haible) 949 950 2002-10-17 Paolo Bonzini <bonzini (a] gnu.org> 951 952 *** Version 3.96 released 953 954 2002-10-16 Isamu Hasegawa <isamu (a] yamato.ibm.com> 955 956 * src/execute.c (execute_program): Multibyte 'y' 957 * src/compile.c (compile_program): Likewise 958 * src/sed.h: Likewise 959 960 2002-10-08 Paolo Bonzini <bonzini (a] gnu.org> 961 962 *** Version 3.95 released 963 964 2002-07-15 Paolo Bonzini <bonzini (a] gnu.org> 965 966 * src/sed.h: rfile --> fname, wfile --> fp 967 * src/compile.c (compile_command): Parse 'R' like 'w', use 968 separate lists for file read and file write 969 * src/compile.c (get_openfile): New name of get_writefile 970 * src/compile.c (rewind_read_files): New function 971 * src/sed.h: Declared here 972 * src/execute.c (closedown): And called here 973 * src/execute.c (append_queue): Added 'free' field 974 * src/execute.c (execute_program): Implement 'R' 975 976 2002-06-09 Paolo Bonzini <bonzini (a] gnu.org> 977 978 * src/execute.c (do_subst): Replaced flag was set on every 979 regexp match, while the first matches should not set it 980 for s///N. 981 982 2002-06-08 Paolo Bonzini <bonzini (a] gnu.org> 983 984 * src/compile.c (compile_file): Open the script in text mode 985 * lib/utils.c (utils_fp_name): Shorten the output 986 * lib/utils.c (ck_fread, ck_fwrite, ck_fflush): Clearerr 987 after printing an error. 988 * lib/utils.c (ck_fclose): Work on stdout as well if stream == NULL 989 and flush before closing to check for errors 990 991 2002-05-30 Paolo Bonzini <bonzini (a] gnu.org> 992 993 * src/compile.c (compile_program): Implement W 994 * src/execute.c (execute_program): Likewise 995 996 2002-04-23 Paolo Bonzini <bonzini (a] gnu.org> 997 998 * src/sed.c (usage, main): Parse -s 999 * src/sed.h (separate_files): New variable 1000 * src/execute.c (separate_files): New variable 1001 * src/execute.c (reset_addresses): New function to make range 1002 addresses work separately on each file when using in-place 1003 editing 1004 * src/execute.c (execute_program): The `n' and `N' use test_eof 1005 so that the script restarts at end of file, not at end of input 1006 * src/execute.c (test_dollar_EOF): Make $ work separately 1007 on each file when using -s; renamed to test_eof 1008 1009 2002-02-28 Paolo Bonzini <bonzini (a] gnu.org> 1010 1011 * src/sed.h (struct sed_cmd): exit_status -> int_arg 1012 * src/compile.c: Likewise 1013 * src/execute.c: Likewise 1014 1015 * src/compile.c (compile_command): Parse `l' like 1016 `q' and `Q'; default for int_arg is -1 1017 * src/execute.c (do_list): New argument, used instead 1018 of lcmd_out_line_len 1019 (execute_program): Interpret int_arg for the `l' command; 1020 return 0 for `q' and `Q' if int_arg is -1 1021 1022 * src/fmt.c: New file, looted from GNU textutils 1023 * src/compile.c: Parse `L' 1024 * src/execute.c: Execute `L' 1025 1026 2002-02-14 Paolo Bonzini <bonzini (a] gnu.org> 1027 1028 * src/execute.c (str_append_modified): Fixed a stupid 1029 bug (stop condition was *start == *end, meant to be 1030 start == end) 1031 1032 2002-02-05 Paolo Bonzini <bonzini (a] gnu.org> 1033 1034 * lib/utils.c: Added directory parameter to 1035 temp_file_template 1036 * lib/utils.h: Adjusted 1037 * src/execute.c: Adjusted 1038 1039 2002-01-29 Paolo Bonzini <bonzini (a] gnu.org> 1040 1041 * src/compile.c (mark_subst_opts): Signal an error if 1042 there are multiple g or p options 1043 * src/compile.c (compile_program): Raise appropriate 1044 error if second string in y command is longer than 1045 first (used to be "excess junk after command") 1046 1047 2001-12-31 Paolo Bonzini <bonzini (a] gnu.org> 1048 1049 * lib/getline.c: Strip the terminating \r under Windows 1050 or MS-DOS. 1051 1052 * testsuite/xemacs.sed, testsuite/xemacs.inp, 1053 testsuite/xemacs.good: Submitted by John Fremlin 1054 (john (a] fremlin.de) 1055 1056 2001-12-27 Paolo Bonzini <bonzini (a] gnu.org> 1057 1058 * sed/execute.c (do_subst): Flags in optimized s/^xx/ 1059 commands were discarded (see the change below) 1060 1061 2001-12-19 Paolo Bonzini <bonzini (a] gnu.org> 1062 1063 * sed/execute.c (resize_line): Limit inactive space to two 1064 thirds of a buffer 1065 * sed/execute.c (line_init): Initialize buf->active 1066 * sed/execute.c (str_append, str_append_modified, line_copy, 1067 do_list, do_subst, execute_program, process_files): Operate 1068 on active space 1069 1070 * sed/execute.c (do_subst): Optimize s/^xx// by making a part 1071 of the buffer inactive and s/xx$// by truncating it. 1072 * sed/execute.c (execute_program): Optimize D by making a part 1073 of the buffer inactive 1074 1075 * testsuite/uniq.sed, testsuite/uniq.inp, testsuite/uniq.good: 1076 added to test P and D commands. 1077 * testsuite/fasts.sed, testsuite/fasts.inp, testsuite/fasts.good: 1078 added to test the new optimization done on the `s' command. 1079 1080 2001-12-17 Paolo Bonzini <bonzini (a] gnu.org> 1081 1082 * testsuite/dc.inp: Also compute Easter of 2002 :-) 1083 1084 * sed/execute.c [!HAVE_FCHMOD]: Don't chmod the output file 1085 if working in-place 1086 1087 2001-11-12 Paolo Bonzini <bonzini (a] gnu.org> 1088 1089 * sed/sed.h (struct sed_cmd): a1 is a pointer too 1090 * sed/compile.c: Likewise 1091 * sed/execute.c: Likewise 1092 1093 * sed/compile.c: Use obstacks 1094 * sed/execute.c: Likewise 1095 1096 2001-11-09 Paolo Bonzini <bonzini (a] gnu.org> 1097 1098 * sed/compile.c (mark_subst_opts): Parse option `e', 1099 preserve two occurrences of the `e' and `p' options. 1100 * sed/execute.c (do_subst) [HAVE_POPEN]: Interpret option 1101 `e' (evaluate, like Perl's but uses Bourne shell). 1102 * sed/sed.h (struct subst): Add an `eval' flag. 1103 1104 * sed/compile.c (compile_program): Compile command `e' 1105 like `c'. 1106 * sed/execute.c (execute_program): Execute command `e'. 1107 1108 2001-09-25 Paolo Bonzini <bonzini (a] gnu.org> 1109 1110 * sed/compile.c (get_writefile) [!POSIXLY_CORRECT]: 1111 support /dev/stdout 1112 * sed/execute.c (open_next_file, closedown): Support 1113 in-place editing 1114 * sed/execute.c (backup_file_name): New function to 1115 support in-place editing 1116 * sed/main.c (usage, main): Parse -i. 1117 * sed/utils.c: Moved to lib directory 1118 1119 * lib/utils.c (temp_file_template): New function. 1120 * sed/utils.h: Declared temp_file_template. 1121 1122 2001-09-05 Paolo Bonzini <bonzini (a] gnu.org> 1123 1124 * sed/execute.c (do_subst): `baaac', if passed through 1125 s/a*/x/g, gave `xbxxcx' rather than `xbxcx' (because an 1126 empty string matched before the `c'. Fixed. 1127 1128 * sed/execute.c: Removed mmap support, I/O is done using 1129 getline (slower but more bug-proof). 1130 * sed/utils.c: Likewise. 1131 * lib/getline.c: New file 1132 1133 2001-03-22 Paolo Bonzini <bonzini (a] gnu.org> 1134 1135 * sed/compile.c (normalize_text) [POSIXLY_CORRECT]: Enable 1136 escapes in modes other than BRE. 1137 1138 2001-03-21 Paolo Bonzini <bonzini (a] gnu.org> 1139 1140 * sed/compile.c (normalize_text): Support \XXX in Perl mode, 1141 \oXXX in non-Perl mode. 1142 1143 2001-03-18 Paolo Bonzini <bonzini (a] gnu.org> 1144 1145 * sed/compile.c (compile_program): Fixed missing break when 1146 compiling 'q' and 'Q'. 1147 1148 * sed/compile.c (check_final_program): Removed now spurious 1149 call to compile_regex 1150 * sed/regex.c (compile_regex): Don't track the last compiled 1151 regex 1152 * sed/regex.c (execute_regex): Track here the last compiled 1153 regex 1154 1155 2001-03-02 Paolo Bonzini <bonzini (a] gnu.org> 1156 1157 * sed/compile.c (setup_replacement): Support \[lLuUE] like 1158 Perl and vi. 1159 * sed/compile.c (new_replacement): Accept new parameter 1160 to support \[lLUuE]. 1161 * sed/sed.h (enum replacement_types): New declaration 1162 * sed/execute.c (do_subst): Use new function str_append_modified 1163 to apply the changes required via \[lLUuE]. 1164 * sed/execute.c (str_append_modified): New function 1165 1166 2001-03-02 Paolo Bonzini <bonzini (a] gnu.org> 1167 1168 * sed/compile.c (setup_replacement): Count the number of backreferences 1169 that the RHS needs 1170 * sed/regex.c (compile_regex): Check if there is a sufficient number 1171 of backreferences (new argument needed_sub replaces nosub) 1172 * sed/compile.c (compile_address, compile_program, 1173 check_final_program): Callers adjusted 1174 1175 2001-02-08 Paolo Bonzini <bonzini (a] gnu.org> 1176 1177 * sed/compile.c (compile_program): Added `Q' (quit without output) 1178 * sed/execute.c (execute_program): Ditto 1179 1180 * sed/compile.c (compile_program): Fill in exit_status for `q' and `Q' 1181 * sed/execute.c (execute_program): Return -1 for `go on', 0..255 1182 to set the exit status 1183 * sed/execute.c (process_files): Interpret new convention for 1184 execute_program, return sed's exit code 1185 * sed/sed.c (main): Return process_files's exit code 1186 * sed/sed.h (struct sed_cmd): Declare exit_status 1187 1188 2001-01-07 Paolo Bonzini <bonzini (a] gnu.org> 1189 1190 * sed/compile.c (compile_program): Added `T' (branch if failed) 1191 * sed/execute.c (shrink_program, execute_program): Ditto 1192 1193 2001-01-04 Paolo Bonzini <bonzini (a] gnu.org> 1194 1195 * testsuite/Makefile.am: Use automake's implementation 1196 of `make check'. Removed the test targets 1197 * testsuite/Makefile.tests: Moved the test targets here 1198 (new file). 1199 * testsuite/runtest: New file 1200 1201 * testsuite/Makefile.tests: `khadafy' test uses EREs. 1202 1203 * testsuite/spencer.inp: Removed the ^* test 1204 1205 * testsuite/spencer.sh: Don't rely on awk; more comments too 1206 1207 2001-01-03 Paolo Bonzini <bonzini (a] gnu.org> 1208 1209 * sed/compile.c(snarf_char_class) [REG_PERL]: Don't parse 1210 `\n' specially 1211 * sed/compile.c(match_slash) [REG_PERL]: Ditto 1212 1213 * sed/compile.c(read_text) [REG_PERL]: Support [xX] modifiers 1214 * sed/compile.c(mark_subst_opts) [REG_PERL]: Ditto 1215 1216 2000-12-21 Paolo Bonzini <bonzini (a] gnu.org> 1217 1218 * lib/snprintf.c [BOOTSTRAP]: Don't include stdio.h 1219 * lib/strerror.c [BOOTSTRAP]: Don't include stdio.h 1220 * sed/execute.c [!HAVE_ISATTY]: Don't buffer stdin 1221 1222 2000-12-11 Paolo Bonzini <bonzini (a] gnu.org> 1223 1224 * sed/compile.c(mark_subst_opts): Support [mMsS] flags 1225 * sed/compile.c(read_text): Support [MS] flags for 1226 addresses 1227 * sed/regex.c(compile_regex): Support arbitrary flags for 1228 regncomp. 1229 1230 * sed/regex.c(compile_regex) [REG_PERL]: Don't call 1231 normalize_text. 1232 1233 2000-12-08 Paolo Bonzini <bonzini (a] gnu.org> 1234 1235 * basicdefs.h: Moved here from the `sed' subdirectory. 1236 1237 * configure.in: Removed crap to pick a regex engine. 1238 Added snprintf to the AC_REPLACE_FUNCS call. 1239 1240 * lib/snprintf.c: New file. 1241 1242 * sed/regex.c(compile_regex): Use regncomp 1243 * sed/regex.c(match_regex): Use regexec2 1244 1245 * sed/compile.c(compile_program): Implemented the `v' command. 1246 1247 * sed/sed.c(main): Implemented the `r' and `R' options 1248 1249 * sed/sed.h: Replaced use_extended_syntax_t with 1250 extended_regexp_flags to support Perl regular expressions. 1251 1252 * sed/execute.c(open_next_file): Don't mmap stdin (because 1253 we cannot seek into it, so a redirected stdin's contents 1254 would not be "eaten" by sed) 1255 1256 Mon Aug 30 23:40:08 PDT 1999 Ken Pizzini <ken (a] gnu.org> 1257 1258 *** Version 3.02.80 released 1259 1260 * sed/execute.c(do_subst): lib/regex.c(re_search_2) seems to 1261 want one extra backreference register; humor it. 1262 1263 * sed/regex.c(compile_regex): work around some odd assumptions 1264 that lib/regex.c(re_compile_pattern) makes about our desired 1265 RE syntax. 1266 1267 * configure.in: tweaked version to 3.02.80; added new entries 1268 to the ALL_LINGUAS definition. 1269 1270 * doc/sed.1, doc/sed.texi, BUGS: explicitly request the output 1271 of sed --version in bug-reporting instructions. 1272 1273 * doc/sed.texi: the old "informal seders list" is dead; document 1274 the new sed-users mailing list instead (under Other Resources). 1275 1276 1277 Thu Aug 19 23:27:54 PDT 1999 Ken Pizzini <ken (a] gnu.org> 1278 1279 * sed/sed.h: Add explicit #include of "regex-sed.h" (rather 1280 than relying on parent file doing so); change the "cmd_regex" 1281 member of sed_cmd: make it a pointer (instead of a struct), 1282 and change its name to cmd_subst; add prototypes for newly 1283 exported functions bad_prog(), normalize_text(), compile_regex(), 1284 match_regex(), and release_regex(); drop rx_testing variable. 1285 1286 * sed/compile.c: move the compile_regex() function to regex.c; 1287 export bad_prog() and normalize_text() functions; eliminate the 1288 rx_testing debris; rename the NOLEAKS symbol to more descriptive 1289 DEBUG_LEAKS; make cmd_regex to cmd_subst fixes (see above); 1290 make use of newly abstracted release_regex() function. 1291 1292 * sed/execute.c: abstract out the regex matching to 1293 regex.c:match_regex(); NOLEAKS to DEBUG_LEAKS change; 1294 cmd_regex to cmd_subst structure member name change. 1295 1296 * sed/execute.c(do_subst): use re_registers/regoff_t instead of 1297 regmatch_t to hold the backreference registers, make "offset" 1298 always be relative to the beginning of the string (rather than 1299 a delta from "start"), defer some matching bookkeeping (e.g., 1300 not_bol_p) to match_regex(). 1301 1302 * sed/sed.c(main): loose rx_testing variable; NOLEAKS 1303 (aka DEBUG_LEAKS) code attempting to release 1304 _nl_current_default_domain is problematic, so omit it. 1305 1306 * sed/regex.c: new file --- abstracts out the interface to the 1307 regex engine so that less conditional code is required in 1308 compile.c and execute.c, and so as to make a change of engine 1309 easier; implements compile_regex() (which looks an awful lot 1310 like the one that used to live in compile.c), match_regex(), 1311 and (if DEBUG_LEAKS is set) release_regex(). 1312 1313 Sun Apr 18 04:40:46 PDT 1999 Ken Pizzini <ken (a] gnu.org> 1314 1315 * sed/sed.c(main): conditionalize calls to setlocale() and 1316 textdomain() to only occur if their support is needed/wanted. 1317 1318 Sun Apr 18 03:01:46 PDT 1999 Ken Pizzini <ken (a] gnu.org> 1319 1320 * bootstrap.sh: "foo || bar && baz" was not grouping like I 1321 expected ("foo || (bar && baz)") under at least one shell, 1322 so change the test for a pre-existing config.h file to an 1323 if statement. 1324 1325 * bootstrap.sh: added -DUSE_REGEX_GNU_H option to the 1326 compiler invocation, to ensure that we get a usable 1327 regex library included. 1328 1329 Sun Apr 18 02:59:42 PDT 1999 Ken Pizzini <ken (a] gnu.org> 1330 1331 * sed/sed.h, sed/utils.c: conditionalized inclusion of <libintl.h> 1332 to occur only if ENABLE_NLS is defined. 1333 1334 Sun Apr 18 01:48:45 PDT 1999 Ken Pizzini <ken (a] gnu.org> 1335 1336 * sed/compile.c(xofa,normalize_text,convert_number): change 1337 name of xofa() function to convert_number(); change semantics 1338 to do all of the work of the text->number conversion. 1339 1340 * sed/compile.c(normalize_text): add new \dDDD decimal 1341 and \oOOO octal escapes. 1342 1343 Sun Mar 28 21:05:07 PST 1999 Ken Pizzini <ken (a] gnu.org> 1344 1345 * sed/sed.c(main): if NOLEAKS is set, free up a word that 1346 the call to textdomain() allocated. 1347 1348 * sed/execute.c(read_file_line): plug up (minor) memory leak: 1349 if buffer.alloc==0 we may have malloc()'d 1 byte anyway, 1350 so be sure to FREE(buffer.text) before calling line_init(); 1351 1352 Fri Mar 26 16:52:10 PST 1999 Ken Pizzini <ken (a] gnu.org> 1353 1354 * sed/compile.c(match_slash): somewhere between 3.02 1355 and 3.02a we lost the ability to use a newline as 1356 the s/// delimiter; restore this ability. 1357 1358 * sed/compile.c(compile_regex): forget about trying 1359 to cache the compiled form of the last RE --- it 1360 causes more problems than its worth. We now only 1361 cache the source form. 1362 1363 * testsuite/help.good: update to reflect output containing 1364 new options. 1365 1366 Sun Dec 6 00:51:23 PST 1998 Ken Pizzini <ken (a] gnu.org> 1367 1368 * sed/utils.c(ck_fwrite): fix i18n bug of using a printf 1369 fragment of "item%s" to handle plural text. 1370 1371 Mon Nov 23 11:03:40 PST 1998 Ken Pizzini <ken (a] gnu.org> 1372 1373 * doc/sed.1, doc/sed.texi: ran ispell over these 1374 files to catch the more obvious typos... 1375 1376 Sun Nov 1 00:09:07 PST 1998 Ken Pizzini <ken (a] gnu.org> 1377 1378 * sed/execute.c(do_list): make a `lcmd_out_line_len' 1379 (--line-length) of zero mean "infinite length", 1380 i.e., "never wrap". 1381 1382 Sat Oct 31 23:06:50 PST 1998 Ken Pizzini <ken (a] gnu.org> 1383 1384 * execute.c(match_an_address_p,process_files), 1385 compile.c(compile_program): back out the "zero-address" 1386 changes of 1998-09-27. It was a neat idea, but there are 1387 too many dark corners which don't work well. The 1388 special code for handling line ranges starting at 1389 address zero (from 1998-08-31) are still there though: 1390 this seems to work fine with no surprises. 1391 1392 Sat Oct 31 22:18:59 PST 1998 Ken Pizzini <ken (a] gnu.org> 1393 1394 * sed/sed.c, sed/sed.h, sed/execute.c: added new 1395 `lcmd_out_line_len' variable. (Idea suggested by 1396 Carlos J. G. Duarte <l38076 (a] alfa.ist.utl.pt>.) 1397 Also added ATOI macro (which uses strtoul() if available, 1398 with fall-back to atoi()). 1399 * sed/sed.c(main): attempt to use COLS environment variable 1400 to set a reasonable `lcmd_out_line_len'; added -l/--line-length 1401 command-line options to set the new `lcmd_out_line_len' flag. 1402 * sed/sed.c(usage): documented new -l/--line-length options. 1403 * sed/execute.c(do_list): use `lcmd_out_line_len' variable 1404 instead of `LCMD_OUT_LINE_LEN'. 1405 * sed/execute.c: deleted now obsolete LCMD_OUT_LINE_LEN define. 1406 * configure.in: added strtoul to the AC_CHECK_FUNCS call. 1407 1408 Sat Oct 31 21:37:17 PST 1998 Ken Pizzini <ken (a] gnu.org> 1409 1410 * sed/sed.c, sed/sed.h, sed/execute.c: added new `force_unbuffered' 1411 flag. (Idea suggested by Frank Strauss <strauss (a] escape.de>.) 1412 * sed/sed.c(main): added -u/--unbuffered command-line options 1413 to set the new `force_unbuffered' flag. 1414 * sed/sed.c(usage): documented new -u/--unbuffered options. 1415 * sed/execute.c: changed the name of the `is_tty' flag in struct 1416 input to a more generic `no_buffering'; also removed HAVE_ISATTY 1417 conditional on this member. 1418 * sed/execute.c(slow_getline): removed HAVE_ISATTY conditonal 1419 compilation of this function. 1420 * sed/execute.c(output_line): if force_unbuffered is set, 1421 then force a fflush() even if writing to stdout. 1422 * sed/execute.c(open_next_file): added handling of the 1423 new `force_unbuffered' flag so that slow_getline() 1424 will always be used for input. 1425 * sed/execute.c(read_file_line): changed the (conditionally 1426 compiled) test of `input->is_tty' to (unconditionally) 1427 use the new spelling `input->no_buffering'. 1428 1429 Thu Oct 15 12:08:09 PDT 1998 Ken Pizzini <ken (a] gnu.org> 1430 1431 * configure.in: deleted AC_ARG_PROGRAM call; this is already 1432 done for us by AM_INIT_AUTOMAKE, and we were winding up 1433 with a doubled-transform. 1434 1435 Sun Sep 27 01:42:42 PDT 1998 Ken Pizzini <ken (a] gnu.org> 1436 1437 * compile.c(compile_program): remove special-case code for matching 1438 address range with a `0' beginning. 1439 1440 * compile.c(compile_address): change default addr_number to 1441 be a pragmatically impossible countT value, instead of zero. 1442 1443 * execute.c: spell macro REGNEXEC() unconditionally instead of 1444 playing with conditional definition of regnexec() macro. 1445 1446 * execute.c(match_an_address_p): added third argument (and changed 1447 callers in match_address_p). Added special code to ignore 1448 non-numeric matches when processing "line zero". 1449 1450 * execute.c(process_files): added a "line zero" pass through the 1451 commands script. 1452 1453 Sun Sep 27 00:20:53 PDT 1998 Ken Pizzini <ken (a] gnu.org> 1454 1455 * compile.c(xofa,normalize_text): new functions. 1456 * compile.c(compile_regex): cache last_compiled_re (with its 1457 associated flags); add POSIXLY_CORRECT behavior for empty RE. 1458 Make use of the new normalize_text() function. 1459 * compile.c(setup_replacement): Make use of the new normalize_text() 1460 function. 1461 1462 Sat Sep 26 22:59:13 PDT 1998 Ken Pizzini <ken (a] gnu.org> 1463 1464 * lib/regex-gnu.h: added missing prototype for regncomp(). 1465 1466 Mon Sep 14 20:47:23 PDT 1998 Ken Pizzini <ken (a] gnu.org> 1467 1468 * sed/sed.c(main): use EXIT_SUCCESS instead of 0, in case 1469 we are built on a system (such as VMS) where EXIT_SUCCESS 1470 is distinct from 0. 1471 1472 Wed Sep 9 22:17:28 PDT 1998 Ken Pizzini <ken (a] gnu.org> 1473 1474 * sed/Makefile.am: added -I../intl the INCLUDES line; if we are 1475 building in a directory outside the source tree and the system 1476 we are building on does not have a <libintl.h> header, then 1477 the build was failing, because libintl.h is a build-time 1478 constructed source file. 1479 1480 * configure.in: tweaked version to be 3.02b. 1481 1482 Wed Sep 9 19:28:14 PDT 1998 Ken Pizzini <ken (a] gnu.org> 1483 1484 *** Version 3.02a released 1485 1486 * sed/compile.c(mark_subst_opts,read_label,compile_program): 1487 wherever we accept a ; as a command terminator, also allow a } or 1488 a # to appear. (This allows for less cluttered-looking scripts, 1489 such as: sed '/foo/{x;G}' (instead of: sed '/foo/{x;G;}').) 1490 1491 Wed Sep 9 18:17:07 PDT 1998 Ken Pizzini <ken (a] gnu.org> 1492 1493 * sed/compile.c(compile_regex): use regncomp() instead 1494 of regcomp(), so that a script with NULs in its REs 1495 will work in the expected manner. 1496 1497 * sed/compile.c(ADDNUL,REGNCOMP): added support macros 1498 for above. 1499 1500 * lib/regex.c(regncomp,regcomp): added regncomp() and 1501 made regcomp() a simple wrapper function. 1502 1503 Mon Aug 31 21:48:30 PDT 1998 Ken Pizzini <ken (a] gnu.org> 1504 1505 * sed/sed.c(compile_program): if the first address of 1506 a range is the number 0 (or a 0~N sequence), start 1507 out in the "a1_matched" state. This allows one 1508 to match an initial chunk of a file without undue 1509 convolutions for handling the case where the match 1510 for the end of the sequence happens to be the first 1511 line. 1512 1513 Sun Aug 16 03:34:25 PDT 1998 Ken Pizzini <ken (a] gnu.org> 1514 1515 * sed/compile.c(snarf_char_class,match_slash): simplify 1516 handling of "premature newline" error. Also, get the 1517 line number right in the error message if we encounter 1518 a "premature newline" during char-class snarfing. 1519 1520 Sun Aug 16 02:59:20 PDT 1998 Ken Pizzini <ken (a] gnu.org> 1521 1522 * sed/compile.c: added N_() markers and corresponding gettext() 1523 (er, _()) calls. 1524 1525 * Merged in i18n contribution from Erick Branderhorst 1526 <Erick.Branderhorst (a] asml.nl>. His ChangeLog entry 1527 for the changes I've incorporated so far: 1528 1529 1998-07-24 Erick Branderhorst <Erick.Branderhorst (a] asml.nl> 1530 * configure.in (ALL_LINGUAS, AM_GNU_GETTEXT): nl 1531 * sed/{sed.h,utils.c}: #include <libintl.h> #define _(String) 1532 gettext (String) 1533 * sed/sed.c: #include <locale.h> 1534 * po/POTFILES.in: sed/{compile,execute,sed,utils}.c 1535 * run gettextize -f 1536 * acconfig.h: #undef LOCALEDIR ENABLE_NLS HAVE_CATGETS 1537 HAVE_GETTEXT HAVE_LC_MESSAGES HAVE_STPCPY 1538 1539 Fri Aug 14 13:52:57 PDT 1998 Ken Pizzini <ken (a] gnu.org> 1540 1541 * Merged code from 3.02 with a branched development 1542 tree from late May; the following (out-of-order) 1543 changelog entry is from the branched tree. 1544 1545 Sat May 30 12:23:16 PDT 1998 Ken Pizzini <ken (a] gnu.org> 1546 1547 * sed/compile.c, sed/execute.c: added (conditional on NOLEAKS macro) 1548 code to free all dynamically allocated memory. 1549 1550 * sed/sed.c, sed/compile.c, sed/execute.c: much shuffling 1551 of code --- ordered functions such that no forward 1552 declarations are necessary, and placed all static prototypes 1553 immediately before the actual function definition. 1554 This accomplished two things: first, I find the new ordering 1555 a more natural way to read the code than the previous 1556 ordering, and second, the new ordering give the compiler 1557 a better opportunity to discover inlining possibilities. 1558 (The odd "prototype declaration+old-style definition" 1559 style is used because I feel it is the least ugly way 1560 of supporting K&R1 C while still getting the benefit of 1561 prototypes when they are available.) 1562 1563 * sed/basicdefs.h: added MEMCPY() macro to hide the VCAST()s 1564 that ought to be used with memcpy(). 1565 1566 * sed/execute.c: Change calls to memcpy() to go through the 1567 new MEMCPY() macro. Various prototypes: elide variable name 1568 if it does not add any human-useful documentary information 1569 to the bare type. 1570 1571 * sed/sed.c(main): Updated calls to compile_string() to add third 1572 (length) argument. Changed call to obsolete close_all_files() 1573 to a call to the new finish_program(). 1574 1575 * sed/sed.c(map_file): Attempt to clean-up how "size" gets 1576 cast and tested; remove spurious S_ISREG test (just let 1577 mmap() fail if it doesn't support the underlying file type). 1578 1579 * sed/sed.c: Deleted old RX library stub declarations. 1580 1581 * sed/sed.c(map_file,unmap_file): added VCAST()s to the 1582 mmap()/munmap() calls. 1583 1584 * sed/utils.c(ck_fclose): added support for ANSI C 1585 functionality where passing a NULL argument means 1586 to fclose() _all_ open streams. (Well, almost. 1587 Only closes streams which were previously ck_fopen()ed, 1588 as I don't care to figure out how to autoconf-detect 1589 whether fclose(NULL) is properly supported on a given 1590 platform.) 1591 1592 * sed/sed.h: Renamed `struct text_buf' member `text_len' 1593 to `text_length'. Abstracted out `enum addr_types' 1594 from `struct addr'; added new enum types num2,step,step_mod; 1595 renamed mod to num_mod. De-unionized the regex,number, 1596 {modulo-offset/step} components of `struct addr', in 1597 anticipation of new features. Changed type of `a2' member 1598 of `struct sed_cmd': now a pointer to save space. 1599 Abstracted out `struct replacement' from `struct subst'. 1600 Cleaned up declaration of `x' union of `struct addr'. 1601 Fixed prototype for compile_string(). Replaced prototype 1602 for old close_all_files() with one for new finish_program(). 1603 1604 * sed/sed.h, sed/compile.c, sed/execute.c: changed to 1605 simplify the data structures used for branches and 1606 command blocks: simplified `struct vector'; made 1607 `struct label' local to compile.c; `struct sed_cmd' 1608 was modified to support a simpler design for branches 1609 and blocks. 1610 1611 * sed/execute.c: Conditionally added ADDNUL() macro so that 1612 the function call overhead is only incurred if nul_append() 1613 _must_ be called. Made some commentary edits, including 1614 typo fixes. 1615 * sed/execute.c(resize_line): changed semantics of "len" argument 1616 from "additional length" to "target length"; made 1617 INITIAL_BUFFER_SIZE a minimum allocation length. 1618 * sed/execute.c(str_append): adjusted to new resize_line() 1619 semantics. 1620 * sed/execute.c(line_copy): use FREE()+MALLOC() instead of 1621 REALLOC() to avoid unnecessary copying of old text; add the 1622 "try doubling first" allocation heuristic (just like 1623 resize_line() does). 1624 * sed/execute.c(line_exchange): new function. 1625 * sed/execute.c(nul_append): make whole function (not just its 1626 body) conditional on HAVE_REGNEXEC macro; adjust to new 1627 resize_line() semantics. 1628 * sed/execute.c(read_mem_line): use str_append() instead if 1629 custom in-line code; compensate for new default of 1630 "line.chomped = 0" in read_pattern_space() by setting 1631 "line.chomped = 1" where appropriate. 1632 * sed/execute.c(read_file_line): use different trigger to 1633 determine that "buffer" is uninitialized, and do a full 1634 initialization if required; use str_append() instead of custom 1635 in-line code in two places; compensate for new default of 1636 "line.chomped = 0" in read_pattern_space() by setting 1637 "line.chomped = 1" where appropriate. 1638 * sed/execute.c(output_line): don't bother calling ck_fwrite() 1639 if length==0. 1640 * sed/execute.c(release_append_queue): new function. 1641 * sed/execute.c(dump_append_queue): use release_append_queue() 1642 instead of in-line equivalent. 1643 * sed/execute.c(read_pattern_space): conditionalize call to 1644 dump_append_queue() for alleged performance reasons; changed 1645 default "line.chomped" value to more common "1", and added an 1646 assignment of "0" where this made a difference. 1647 * sed/execute.c(match_an_address_p): deleted "is_addr2_p" 1648 argument; reorder cases to match order in enum declaration; add 1649 cases for new "addr_is_num2", "addr_is_step", and 1650 "addr_is_step_mod" address types; alter nul_append() call to be 1651 through ADDNUL() macro; fix to new struct member and enum 1652 spellings in (formerly addr_is_mod); addr_is_num_mod case. 1653 * sed/execute.c(match_address_p): remove oblsolete third argument 1654 to calls to match_address_p(); alter references to sed_cmd 1655 member a2 to reflect new pointer status; add new support for 1656 a2->addr_type addr_is_step and addr_is_step_mod cases. 1657 * sed/execute.c(do_subst): add NOLEAKS support logic; use 1658 ADDNUL() wrapper to nul_append(); simplify replacement 1659 expansion by using the new "struct replacement" data structure; 1660 use line_exchange() function instead of custom in-line code. 1661 * sed/execute.c(process_files): added NOLEAKS code. 1662 * sed/execute.c(execute_program): updated implementations 1663 of the `{', `}', `:', `b', and `t' commands; modified 1664 `c' command gratuituosly; fixed potential memory 1665 overrun in `D' command. Simplified how nonstandard 1666 `loop increments' work. Use line_exchange() instead of 1667 custom in-line code in 'x' case. 1668 * sed/execute.c[EXPERIMENTAL_DASH_N_OPTIMIZATION conditional 1669 code]: various modifications intended to keep this 1670 code in sync with the new changes, but the code still 1671 retains its previous bugs. 1672 1673 * sed/compile.c: use "exit(EXIT_FAILURE) instead of "exit(1)", 1674 just in case we get compiled under VMS. 1675 * sed/compile.c: Change type of prog_info.base to decrease needs 1676 for casting; then elimiated the casts in question ;-). 1677 * sed/compile.c: Added struct sed_label (moved from sed.h, then 1678 modified). 1679 * sed/compile.c: Removed "readit_p" flag from struct fp_list. 1680 * sed/compile.c: Added module-global "blocks" variable. 1681 * sed/compile.c: Extracted more error-message constant strings 1682 to named variables. 1683 * sed/compile.c(check_final_program): updated to 1684 reflect new data structures and use new fucntions. 1685 Added call to compile_regex() to release unneeded 1686 memory. 1687 * sed/compile.c: deleted obsolete new_vector() function; 1688 abstracted new read_label() function; abstracted new 1689 release_label() function; added new `blocks' module-static 1690 variable. 1691 * sed/compile.c(compile_program): updated implementations 1692 of the `{', `}', `:', `b', and `t' commands; modified 1693 initialization from NULL vector. 1694 * sed/compile.c(compile_regex): added mechanism to 1695 release memory consumed by the cached `last' RE. 1696 * sed/compile.c(setup_jump,setup_label): updated 1697 name (from setup_jump to setup_label) and prototype; 1698 changed body to reflect data structure changes. 1699 * sed/compile.c: Add OPEN_BRACE and CLOSE_BRACE macros for better 1700 "vi" editing behavior. 1701 * sed/compile.c(compile_filename,read_filename,get_writefile): 1702 Replaced function compile_filename() with more orthogonal functions 1703 read_filename(), get_writefile(). 1704 * sed/compile.c(compile_regex): Added ability to free the remembered 1705 "last RE" in compile_regex (for benifit of "NOLEAKS" code). 1706 * Made adjustments dictated by the change to struct sed_cmd which made 1707 the a2 member a pointer-to-addr instead of an addr. 1708 * sed/compile.c(setup_jump,read_label,setup_label,release_label): 1709 Added functions read_label(), setup_label(), release_label(); deleted 1710 function setup_jump(). 1711 * sed/compile.c(new_replacement,setup_replacement,release_replacement): 1712 new functions. 1713 * sed/compile.c: Adjusted to new spelling of text_buf member 1714 ("text_length" instead of "text_len"). 1715 * sed/compile.c(new_vector): deleted function. (Due to new handling 1716 of blocks, only one instance remained, and that one was just as 1717 clear in-lined.) 1718 * sed/compile.c(compile_string): Added third argument; it now 1719 takes a counted string instead of a NUL-terminated string. 1720 * sed/compile.c(compile_file): added variable "map_base" to 1721 compensate for new type of prog_info.base. 1722 * sed/compile.c(check_final_program): reflect new style of 1723 handling blocks and struct sed_label. 1724 * sed/compile.c(close_all_files,finish_program): replaced function 1725 close_all_files() with more generic finish_program(). 1726 * sed/compile.c(read_text): added new feature: if first non-blank 1727 character after the {a,i,c} command character is not "\", then 1728 use the trailing text on that line as the (first) line of text. 1729 Also added code conditional on NO_INPUT_INDENT to support the 1730 "feature" of stripping leading blanks from each input line; I 1731 do not read POSIX as permitting this behavior, nor do I think 1732 it is a good idea, so it is disabled by default, but some have 1733 argued that this blank-stripping is the "correct" behavior, so 1734 I offer them the option of building their sed that way. 1735 * sed/compile.c(compile_address): added xxx,+n and xxx,~n addressing; 1736 simplified code. 1737 * sed/compile.c(compile_program): added BAD_PLUS error detection; 1738 adjusted to new cur_cmd->a2 pointer status; added addr_is_num2 1739 detection; deleted pointless "a2->addr_number < a1.addr_number" 1740 check (addr_is_num2 semantics handle this just fine); updated 1741 code for '{', '}', ':', 'b', and 't' to reflect new design 1742 of branch handling, including making use of new functions 1743 related to the new design); added support for feature already 1744 mentioned in read_text() where {a,i,c} commands are able to have 1745 their text start on the same line as the command; changed some 1746 error messages (hopefully for the better); localized variables 1747 specific to individual commands (particularly 's' and 'y'); 1748 made use of new setup_replacement() function in 's' command. 1749 1750 Mon Aug 10 19:58:49 PDT 1998 Ken Pizzini <ken (a] gnu.org> 1751 1752 * doc/sed.texi, doc/sed.1: sedtut10.txt is apparently dead. 1753 Deleted references to it and added a pointer to 1754 http://seders.icheme.org/tutorials/. (Pointed out by 1755 Joerg Heitkoetter <joerg (a] de.uu.net>.) 1756 1757 Sat Aug 8 18:11:57 PDT 1998 Ken Pizzini <ken (a] gnu.org> 1758 1759 * djgpp/config.btm: per request by Michel de Ruiter 1760 <mdruiter (a] cs.vu.nl>, added "%1" to "%9" parameters. 1761 1762 Mon Aug 3 11:44:55 PDT 1998 Ken Pizzini <ken (a] gnu.org> 1763 1764 * doc/sed.texi: fix a couple of typos. (Submitted by 1765 Alan Modra <alan (a] spri.levels.unisa.edu.au>.) 1766 1767 Sat Aug 01 17:49:06 PDT 1998 Ken Pizzini <ken (a] gnu.org> 1768 1769 *** Version 3.02 released 1770 1771 * configure.in: Because of code change in 3.01a, bump the 1772 minor revision number for the release (now 3.02). 1773 1774 Sun Jul 26 16:07:55 PDT 1998 Ken Pizzini <ken (a] gnu.org> 1775 1776 *** Version 3.01a released 1777 1778 * sed/compile.c(snarf_char_class): the POSIX char-class 1779 recognition loop forgot to update its concept of "prev" 1780 as the loop progressed. 1781 1782 * testsuite/Makefile.am: The dependency of version.good 1783 on [testsuite/]Makefile introduced in the previous 1784 release was botched -- it referred to "Makefile" 1785 as "$(srcdir)/Makefile, which of course doesn't work 1786 if you aren't building in the source tree. 1787 1788 * djgpp/Makefile.am: add forgotten "config.btm" EXTRA_DIST 1789 member. 1790 1791 * configure.in: update version. 1792 1793 Tue Jul 21 06:04:42 PDT 1998 Ken Pizzini <ken (a] gnu.org> 1794 1795 *** Version 3.01 released 1796 1797 * configure.in: mark as release version! 1798 1799 * Makefile.am: add BUGS and THANKS to the EXTRA_DIST target. 1800 1801 * testsuite/Makefile.am: add dependency of version.good 1802 on [testsuite/]Makefile. 1803 1804 Mon Jul 20 12:38:10 PDT 1998 Ken Pizzini <ken (a] gnu.org> 1805 1806 * djgpp/config.btm: New file to support the 4DOS alternative 1807 to command.com. (Sumitted by Eli Zaretskii on behalf of 1808 an anonymous 4DOS user.) 1809 1810 Fri Jul 17 00:36:34 PDT 1998 Ken Pizzini <ken (a] gnu.org> 1811 1812 *** Version 3.01-beta18 released 1813 1814 * djgpp/config.sed: my "tweak" in beta17 was too 1815 hastily considered. Back it out. 1816 1817 * configure.in: update to beta18. 1818 1819 Wed Jul 15 01:02:15 PDT 1998 Ken Pizzini <ken (a] gnu.org> 1820 1821 *** Version 3.01-beta17 released 1822 1823 * djgpp/config.sed: tweak/simplify s,,, commands at end. 1824 1825 * configure.in: update to beta17. 1826 1827 1998-07-14 Eli Zaretskii <eliz (a] is.elta.co.il> 1828 1829 * djgpp/config.sed: Edit all the occurences of = in the context of 1830 --option=value, including in the help messages, into 1831 --option:value, but leave DOS-style d:/foo/bar file names intact. 1832 1833 * djgpp/config.bat: Use --srcdir:foo instead of --srcdir=foo. 1834 1835 * testsuite/Makefile.am (help, version): Remove temporary files 1836 explicitly, don't use shell wildcards, so it works under DOS 8+3 1837 limits. 1838 1839 Thu Jul 9 13:06:00 PDT 1998 16:51:43 PDT 1998 Ken Pizzini <ken (a] gnu.org> 1840 1841 *** Version 3.01-beta16 released 1842 1843 * djgpp/config.sed: tweak the configure script to use : 1844 instead of = for --with-foo=bar option parsing, to 1845 work around problems with how command.com handles =s. 1846 1847 Wed Jul 8 16:51:43 PDT 1998 Ken Pizzini <ken (a] gnu.org> 1848 1849 * djgpp/config.bat: correct inappropriate behavior that I 1850 introduced in the beta13 changes (if first argument is 1851 a directory, it needs to be handled as the --srcdir). 1852 1853 * testsuite/version.gin, testsuite/version.good, testsuite/Makefile.am: 1854 Add target to automake to automatically update version.good 1855 from (new file) version.gin, instead of hand-editing the version 1856 number each release. 1857 1858 * testsuite/Makefile.am: miscellaneous gratuitious tweakage -- 1859 mainly adding $(RM) commands just because I didn't like 1860 leaving the tmp* files from successful runs laying about. 1861 Also some editorial comments. 1862 1863 * configure.in: update to beta16. Added and commented out 1864 experiment with AC_OUTPUT() for testsuite/version.good. 1865 Added code to properly handle bare (without =xxx) 1866 "--with-regex" option. 1867 1868 Sun Jul 5 21:02:16 PDT 1998 Ken Pizzini <ken (a] gnu.org> 1869 1870 *** Version 3.01-beta15 released 1871 1872 * sed/utils.c(ck_fflush), sed/utils.h, sed/execute.c(output_line): 1873 add and use new ck_fflush() function. 1874 1875 Sun Jul 5 15:23:47 PDT 1998 Ken Pizzini <ken (a] gnu.org> 1876 1877 * sed/compile.c(bad_prog): add more detail to error 1878 messages about -e strings. 1879 1880 Sun Jul 5 14:29:45 PDT 1998 Ken Pizzini <ken (a] gnu.org> 1881 1882 * sed/compile.c(mark_subst_opts), sed/execute.c(do_subst): 1883 Define better semantics for interaction of the `g' flag 1884 with a numeric flag to the s/// command. It used to 1885 be that the `g' command siezed control; now the first 1886 (number-1) matches are skipped and then `g' gets control 1887 after that. (It is not clear whether this is a feature 1888 sneaking in during late beta, or a bug fix; the changes 1889 involved were trivial, so I decided to treat it as a bug 1890 fix.) 1891 1892 * configure.in, testsuite/version.good: update to beta15. 1893 1894 Sat Jul 4 09:54:45 PDT 1998 Ken Pizzini <ken (a] gnu.org> 1895 1896 *** Version 3.01-beta14 released 1897 1898 * sed/basicdefs.h, sed/compile.c, sed/execute.c: 1899 per report by "Kaveh R. Ghazi" <ghazi (a] caip.rutgers.edu>, 1900 copied the ISXXX macros from lib/regex.c so that 1901 silly machines which require isascii() to be true 1902 before the other isXXX() macros are valid will 1903 still work. 1904 1905 * configure.in, testsuite/version.good: update to beta14. 1906 1907 Thu Jul 2 23:46:13 PDT 1998 Ken Pizzini <ken (a] gnu.org> 1908 1909 *** Version 3.01-beta13 released 1910 1911 * configure.in, acconfig.h: set USE_REGEX_GNU_H symbol if we 1912 are going to be using lib/regex.c. 1913 1914 * lib/Makefile.am, lib/regex.h, lib/regex-gnu.h, lib/regex.c: 1915 rename lib/regex.h to lib/regex-gnu.h, so that those who 1916 choose to use a different regex implementation will not 1917 pick-up lib/regex.h when doing "#include <regex.h>". 1918 1919 * sed/regex-sed.h, sed/Makefile.am, sed/compile.c, sed/execute.c, 1920 sed/sed.c: create sed/regex-sed.h which acts as a switch 1921 to choose either lib/regex.h or the user-supplied <regex.h>, 1922 depending on the value passed to configure's --with-regex= 1923 option. 1924 1925 Thu Jul 2 17:22:31 PDT 1998 Ken Pizzini <ken (a] gnu.org> 1926 1927 * configure.in: if an alternative --with-regex= is given, 1928 do an AC_CHECK_FUNCS(regnexec regexec) to ensure that 1929 at least one of these functions is available. Also, 1930 parallel changes for the default case. 1931 1932 * sed/execute.c, acconfig.h: retire use of the WITH_REGNEXEC 1933 test macro in favor of HAVE_REGNEXEC test macro created 1934 by above change. 1935 1936 * djgpp/config.bat: Play games to handle "install-sh", 1937 DOS filename restrictions, GNU makefile default rules, 1938 and getting a correct run of "configure" (contributed 1939 by Eli Zaretskii <eliz (a] is.elta.co.il>). 1940 1941 * djgpp/Makefile.am, testsuite/Makefile.am, testsuite/Makefile.in, 1942 Makefile.am, configure.in: Various automake targets 1943 (such as distcheck) failed with old configuration. 1944 The simplest solution was to just add these .am 1945 files. (The testsuite/Makefile.in was just renamed to 1946 testsuite/Makefile.am, then various redundant defines and 1947 targets were deleted.) (Reported by Erick Branderhorst 1948 <Erick.Branderhorst (a] asml.nl>.) 1949 1950 * testsuite/dc.good, testsuite/dc.inp: per suggestion from 1951 Greg Ubben <gsu (a] romulus.ncsc.mil>, use base 16 output to 1952 exercise even more of the dc.sed script. 1953 1954 * configure.in, testsuite/version.good: update to beta13. 1955 1956 Sun Jun 28 16:21:02 PDT 1998 Ken Pizzini <ken (a] gnu.org> 1957 1958 *** Version 3.01-beta12 released 1959 1960 * doc/sed.texi: Avoid mixing @code and @samp markups together: 1961 they look ugly in Info. Use @url and @email instead of @example. 1962 Add indexes. (Basis of changes contributed by Eli Zaretskii.) 1963 1964 * djgpp/*, Makefile.am: add support for the DJGPP compiler, 1965 contributed by Eli Zaretskii <eliz (a] is.elta.co.il>. 1966 1967 * dc.sed, testsuite/Makefile.in, testsuite/dc.inp, testsuite/dc.good: 1968 added this remarkable script, written and contributed 1969 by Greg Ubben <gsu (a] romulus.ncsc.mil>, both as a work of 1970 art for general admiration, and also for use in regression 1971 testing. 1972 1973 * configure.in, lib/Makefile.am: add --with-regex=regexlib 1974 option, which overrides the use of lib/regex.c. 1975 1976 * configure.in, testsuite/version.good: update to beta12. 1977 1978 Fri Jun 12 16:41:48 PDT 1998 Ken Pizzini <ken (a] gnu.org> 1979 1980 *** Version 3.01-beta11 released 1981 1982 * sed/compile.c: add module-static variables first_script 1983 (for #n change below) and pending_text (for a/c/i change 1984 below). 1985 1986 * sed/compile.c(compile_file), sed/compile.c(compile_program): 1987 Instead of having #n trigger the -n option in *any file*, 1988 have #n trigger the -n option only if they are the first 1989 two bytes of the first script or script-file. 1990 1991 * sed/compile.c(compile_string), sed/compile.c(compile_file): 1992 clear the first_script variable at end of these functions. 1993 1994 * sed/sed.h: tease out the struct text_buf declaration from 1995 struct sed_cmd, so that a pointer to such can be passed 1996 to new sed/compile.c(read_text) function. 1997 1998 * sed/compile.c(compile_program), sed/compile.c(read_text): 1999 Tease out handling of text to a/c/i commands to new 2000 read_text() function. Handle (via aid of pending_text 2001 variable) texts which span more than one script/script-file 2002 option. In particular, restore the ability to have this 2003 work: sed -e '1i\' -e 'foo' 2004 2005 * sed/compile.c(check_final_program): close off any dangling 2006 pending_text allocation. 2007 2008 Thu Jun 11 11:17:46 PDT 1998 Ken Pizzini <ken (a] gnu.org> 2009 2010 * sed/execute.c(do_subst): fixed two bugs: s/ */X/g was failing 2011 to match the final empty string after the end of the pattern 2012 space; and /^foo$/s/o/x/3p was printing, despite the failure 2013 to do a substition. 2014 2015 Fri Jun 5 04:40:24 PDT 1998 Ken Pizzini <ken (a] gnu.org> 2016 2017 * configure.in: change the AC_ARG_WITH(regnexec, ...) 2018 to be the more appropriate AC_ARG_ENABLE(regnexec, ...). 2019 2020 * configure.in, testsuite/version.good: update to beta11. 2021 2022 Fri Jun 5 00:54:25 PDT 1998 Ken Pizzini <ken (a] gnu.org> 2023 2024 *** Version 3.01-beta10 released 2025 2026 * sed/execute.c: forgot to P_() the prototype and 2027 old-style the declaration for bootstrap_memchr()! 2028 2029 Thu Jun 4 18:42:30 PDT 1998 Ken Pizzini <ken (a] gnu.org> 2030 2031 * sed/compile.c(snarf_char_class): added code to 2032 recognize \n or \<newline> sequence within a 2033 char-class as the newline character. 2034 2035 Tue Jun 2 11:56:02 PDT 1998 Ken Pizzini <ken (a] gnu.org> 2036 2037 * configure.in: added check for <sys/types.h> and 2038 a AC_ARG_WITH(regnexec,...) check, to simplify use 2039 of other regex libraries which have regexec() but 2040 not regnexec(), with the corresponding loss of 2041 functionality (regexps will not work right against 2042 input lines which contain NULs). 2043 2044 * sed/execute.c: add nul_append() function, a #define 2045 for a regnexec() -> regexec() macro (conditional on 2046 the lack of the WITH_REGNEXEC symbol), and a couple 2047 of calls to nul_append() (in match_an_address_p() 2048 and do_subst()) to permit the use of the POSIX standard 2049 regexec() function call instead of the suggested 2050 regnexec() call. 2051 2052 * sed/compile.c, sed/execute.c, sed/sed.c: check for 2053 <sys/types.h> and include it (before "regex.h") if 2054 available. This makes it simpler to use the system's 2055 regex library instead of the one in lib/regex.c, should 2056 that be desired. 2057 2058 Tue Jun 2 08:41:05 PDT 1998 Ken Pizzini <ken (a] gnu.org> 2059 2060 * sed/basicdefs.h: define VCAST macros to allow sed to 2061 compile on systems which predate the definition 2062 of "void *", and yet still get feedback about 2063 stupid programming errors from systems which *do* 2064 know about "void *"s. Also define MALLOC, REALLOC, 2065 MEMDUP, and FREE macros to keep under control the 2066 degree of code ugliness which would otherwise be 2067 introduced in making use of the VCAST macro. 2068 2069 * sed/compile.c, sed/execute.c, sed/sed.c, sed/utils.c: 2070 pervasively use the new VCAST, MALLOC, REALLOC, MEMDUP, 2071 and FREE macros wherever appropriate. 2072 2073 * sed/utils.c, sed/utils.h: correct type of first arguments 2074 to ck_fread() and ck_fwrite() to be [const] VOID *. 2075 2076 * sed/basicdefs.h, sed/execute.c: protect against 2077 the rumored systems which stupidly #define __STDC__ 0. 2078 2079 * testsuite/help.good, testsuite/Makefile.in: make 2080 the ``help'' test insensitive to the spelling of 2081 the executable's name. Also, enhanced `make clean' 2082 target. 2083 2084 * doc/sed.texi, doc/sed.1: correct documentation of `q' 2085 command; fix typos. 2086 2087 * configure, testsuite/version.good: update to beta10. 2088 2089 Sat May 30 17:28:00 PDT 1998 Ken Pizzini <ken (a] gnu.org> 2090 2091 *** Version 3.01-beta9 released 2092 2093 * Makefile.am: make testsuite a normal SUBDIR. 2094 2095 * configure.in: discontinue using AC_ISC_POSIX -- 2096 check for -lcposix library instead; added 2097 testsuite/Makefile to AC_OUTPUT list. 2098 2099 * lib/memmove.c(memmove): fixed wrong sense used 2100 for HAVE_BCOPY test. 2101 2102 * sed/execute.c: checked more specifically for a version 2103 of gcc which supports __attribute__ (i.e., >= 2.7). 2104 2105 * testsuite/*: renamed files to fit 14 char limit. 2106 2107 * testsuite/Makefile, testsuite/Makefile.in: Makefile 2108 renamed to Makefile.in and then modified so that 2109 "make -j check" from top directory will work. 2110 2111 * testsuite/subwrite.sed, testsuite/writeout.sed: changed 2112 file name of the "w" command to be consistent with the 2113 new naming used in testsuite/Makefile.in. 2114 2115 * doc/sed.1, doc/sed.texi: fixed some typos, formatting 2116 glitches, and poor wordings. 2117 2118 Sat May 30 04:02:29 PDT 1998 Ken Pizzini <ken (a] gnu.org> 2119 2120 * configure.in: specify that config.h is to be derived 2121 from config_h.in in order to avoid the braindead 2122 DOS filesystem limitations. 2123 2124 Fri May 29 21:56:30 PDT 1998 Ken Pizzini <ken (a] gnu.org> 2125 2126 * sed/compile.c(compile_address), doc/sed.texi: gave 2127 a better definition to the meaning of N~0 address 2128 forms -- N~M addresses now mean that lines match 2129 when there exists a non-negative x such that 2130 lineno == N+x*M. 2131 2132 Fri May 29 12:07:38 PDT 1998 Ken Pizzini <ken (a] gnu.org> 2133 2134 * sed/compile.c(compile_address), 2135 sed/execute.c(match_an_address_p): update semantics of 2136 N~M address form: now N is the first line which will 2137 match and M is the step between succeeding matches. 2138 If N<M this works out to the same as before, but the 2139 new behavior for N>=M seems more useful. 2140 2141 * doc/sed.1, doc/sed.texi: update documentation of N~M 2142 address form; added "Other Resources" node to sed.texi; 2143 minor formatting changes to some items in sed.1 with 2144 an eye to improving clarity. 2145 2146 * configure.in, testsuite/version.good: update to beta9. 2147 2148 Sat May 23 20:04:31 HST 1998 Ken Pizzini <ken (a] gnu.org> 2149 2150 *** Version 3.01-beta8 released 2151 2152 * sed/compile.c(compile_regex): forgot to make last_re be 2153 a *copy* of the buffered text in today's earlier fix. 2154 2155 * sed/execute.c(read_file_line): EOF check was wrong -- 2156 it forgot to allow for the possibility that we were 2157 appending to the end of the ``line'' (instead of merely 2158 reading a fresh line). 2159 2160 Sat May 23 18:07:18 HST 1998 Ken Pizzini <ken (a] gnu.org> 2161 2162 * sed/compile.c(compile_regex): don't track compiled version 2163 of regex -- the modifiers may change. Track the regex 2164 source instead. (For "last regex" (aka //) notation.) 2165 2166 * configure.in, testsuite/version.good: update to beta8. 2167 2168 Sat May 23 16:07:09 HST 1998 Ken Pizzini <ken (a] gnu.org> 2169 2170 *** Version 3.01-beta7 released 2171 2172 * sed/execute.c: #undef'd EXPERIMENTAL_DASH_N_OPTIMIZATION 2173 because its code is buggy. 2174 2175 Tue May 19 17:03:52 HST 1998 Ken Pizzini <ken (a] gnu.org> 2176 2177 * sed/sed.c: label rx library code as such with #ifdefs 2178 (instead of just #if 0). 2179 2180 * sed/compile.c(compile_program): make incremental 2181 improvement to the "Unknown command" error message. 2182 2183 Sat May 16 23:16:26 HST 1998 Ken Pizzini <ken (a] gnu.org> 2184 2185 * testsuite/Makefile: simplify: get rid of automatic run 2186 against system's sed; don't time by default; allow for 2187 alternative comparison command. 2188 2189 * configure.in, testsuite/version.good: update to beta7. 2190 2191 Wed May 13 21:44:28 PDT 1998 Ken Pizzini <ken (a] gnu.org> 2192 2193 *** Version 3.01-beta6 released 2194 2195 * lib/Makefile.am: fix spelling of libsed_a_LIBADD in 2196 libsed_a_DEPENDENCIES. 2197 2198 * configure.in, testsuite/version.good: update to beta6. 2199 2200 Wed May 13 14:38:08 PDT 1998 Ken Pizzini <ken (a] gnu.org> 2201 2202 *** Version 3.01-beta5 released 2203 2204 * sed/execute.c(do_subst): added not_bol_p variable to track when 2205 we have iterated past the beginning of the pattern. 2206 [Thanks to Jim Meyering <meyering (a] ascend.com> for the bug report.] 2207 2208 Wed May 13 13:54:04 PDT 1998 Ken Pizzini <ken (a] gnu.org> 2209 2210 * sed/execute.c(bootstrap_memchr): new function. When 2211 bootstrapping we don't know if we are on a 64-bit machine, 2212 so lib/memchr.c breaks. Supply this (slow) implementation 2213 just to get us bootstrapped. 2214 2215 * bootstrap.sh: add a #define BOOTSTRAP symbol; add -I. 2216 for emphasis for the compiles in sed/; be explicit 2217 about what files we're bothering to compile. 2218 2219 * configure.in, testsuite/version.good: update version 2220 to beta5. 2221 2222 Wed May 13 06:39:06 PDT 1998 Ken Pizzini <ken (a] gnu.org> 2223 2224 *** Version 3.01-beta4 released 2225 2226 * rename writeout.good? to wrtout?.good and subwrite.good? to 2227 subwrt?.good to comply with DOS 8+3 file name restrictions. 2228 [Eli Zaretskii <eliz (a] is.elta.co.il> suggested this to 2229 simplify DJGPP ports, and it was easy.] 2230 2231 * testsuite/Makefile: reflect above name changes. 2232 2233 Wed May 12 21:09:32 PDT 1998 Ken Pizzini <ken (a] gnu.org> 2234 2235 * sed/sed.c(usage): fix non-portable omission of \n\ at end of 2236 lines within long string. 2237 2238 * sed/sed.c(main): remove spurious argument to fprintf() in the 2239 'V'ersion output. 2240 2241 * sed/execute.c(line_append): embed newline between the two 2242 text fragments unconditionally. 2243 2244 * sed/execute.c(do_subst): change structure assignment to memcpy() 2245 (for portability reasons). 2246 2247 * README.bootstrap: suggest using -w option. 2248 2249 Tue May 12 10:02:37 PDT 1998 Ken Pizzini <ken (a] gnu.org> 2250 2251 * configure.in: use AC_REPLACE_FUNCS where appropriate. 2252 2253 * lib/Makefile.am: updated to reflect AC_REPLACE_FUNCS change in 2254 configure.in. 2255 2256 * lib/memchr.c lib/memcmp.c: revert to standard GNU versions. 2257 2258 * lib/alloca.c: added this missing file. 2259 2260 * testsuite/version.good: updated for new version identifier. 2261 2262 Mon May 11 18:50:56 PDT 1998 Ken Pizzini <ken (a] gnu.org> 2263 2264 *** Version 3.01-beta3 released 2265 2266 * sed/Makefile.am: fix INCLUDES to work right with VPATH. 2267 [Thanks to Jim Meyering <meyering (a] ascend.com> for the bug report.] 2268 2269 * sed/sed.c(usage): make --help output more user-friendly? 2270 2271 * sed/execute.c(execute_program): fix bug in 'x' command introduced 2272 in the alleged portability fix of May 9. 2273 2274 * configure.in: update version to 3.01-beta3. 2275 2276 * testsuite/version.good, testsuite/help.good: freshen with 2277 latest output. 2278 2279 Sat May 9 22:35:45 PDT 1998 Ken Pizzini <ken (a] gnu.org> 2280 2281 *** Version 3.01-beta2 released 2282 2283 * sed/sed.c: add #include <sys/types.h> in HAVE_MMAP 2284 block (needed on some machines). 2285 2286 * lib/memmove.c: #include <memory.h>, if HAVE_MEMORY_H. 2287 2288 Sat May 9 21:29:00 PDT 1998 Ken Pizzini <ken (a] gnu.org> 2289 2290 * configure.in: remove dangling references to rx library; 2291 added HEADER and FUNC checks for items used by source in 2292 lib/. 2293 2294 * lib/ansidecl.h, lib/memcopy.h, lib/pagecopy.h, lib/string.h 2295 lib/memcpy.c, lib/memmove.c: deletes these files. There 2296 are still pieces of glibc missing to support these, and 2297 it isn't worth the headache right now. 2298 2299 * lib/memmove.c: de novo, simpler version. Uses bcopy() 2300 if available, and slow-but-simple code if not. 2301 2302 * lib/Makefile.am: remove references to deleted files. 2303 Added forgotten reference to memcpy.c. Re-ordered 2304 SOURCE entries to reflect dependencies for systems 2305 which lack ranlib. 2306 2307 * sed/basicdefs.h: updated to reflect above changes to lib/, 2308 and experience with non-STDC compilers. 2309 2310 * lib/regex.c: made regerror() function publicly visible. 2311 2312 * lib/strerror.c: use old-style function declaration. 2313 2314 * sed/compile.c, sed/execute.c, sed/sed.c, sed/utils.c, 2315 sed/sed.h, sed/utils.h: ensure that private definitions of 2316 some symbols do not cause problems when #include'ing system 2317 headers (mainly by re-ordering the #include directives). 2318 (This is particularly an issue for bootstrap.sh runs.) 2319 2320 * sed/execute.c (execute_program): use memcpy() instead of 2321 structure assingment ('x' command), for portablility to 2322 old compilers. 2323 2324 * sed/execute.c (slow_getline): use old-style function 2325 declaration, with a P_ prototype. 2326 2327 * sed/sed.c: change the type of the fallback MAP_FAILED 2328 definition to work on archaic systems. (Modern systems 2329 should be defining it themselves, so the change from 2330 void * shouldn't be a problem.) 2331 2332 * bootstrap.sh, README.bootstrap: actual testing of bootstrap 2333 code revealed that I was too optimistic. Redesigned and 2334 replaced implementation. 2335 2336 * testsuite/Makefile: ignore errors from reference-implementation 2337 seds that aren't up to snuff. 2338 2339 * testsuite/help.good, testsuite/version.good: update to 2340 current version's output. 2341 2342 Fri May 8 15:08:28 PDT 1998 Ken Pizzini <ken (a] gnu.org> 2343 2344 *** Version 3.01-beta1 released 2345 2346 * sed/sed.c (main, usage): once again tweak the --help and 2347 --version output to bettery comply with GNU coding standards. 2348 2349 * testsuite/help.good, testsuite/version.good: update to 2350 reflect above change. 2351 2352 * doc/sed.texi: fix "Invoking" node's spelling to comply 2353 with GNU standards. 2354 2355 Fri May 8 11:43:10 PDT 1998 Ken Pizzini <ken (a] gnu.org> 2356 2357 * doc/sed.1, doc/Makefile.am: wrote (very basic) man page. 2358 2359 Thu May 7 20:40:21 PDT 1998 Ken Pizzini <ken (a] gnu.org> 2360 2361 * lib/Makefile.am, lib/memmove.c, lib/memchr.c, lib/regex.c, 2362 lib/memcpy.c, lib/regex.h, lib/memcopy.h, lib/string.h, 2363 lib/pagecopy.h, lib/ansidecl.h: grab yet-another-version 2364 from gnu.org for baseline and/or edit copyright boilerplate 2365 using official lgpl2gpl.sed script. Take care not to 2366 loose regnexec() interface or special conditional-compilation 2367 code. 2368 2369 Wed May 6 23:35:12 PDT 1998 Ken Pizzini <ken (a] gnu.org> 2370 2371 * lib/regex.c, lib/regex.h: take from grep-2.1 distribution, 2372 then trivially added the regnexec() interface. 2373 2374 * sed/sed.c, sed/compile.c, sed/execute.c: made modifications 2375 to work with regex instead of rx. 2376 2377 * rx/*: deleted directory; the code is just too slow. 2378 I think it will be easier to extend regex to fully 2379 support POSIX.2 than to tune rx to be reasonable. 2380 Even if this supposition is wrong, I'd rather make 2381 the 3.01 release with the slightly deficient regex. 2382 2383 * Makefile.am lib/Makefile.am, sed/Makefile.am: made changes 2384 related to the substitution of regex for rx. 2385 2386 * lib/Makefile.am, sed/Makefile.am: since regex is not a 2387 ``compatability'' module, changed name of library to 2388 ``libsed.a''. 2389 2390 * lib/memchr.c, lib/memcpy.c, lib/memmove.c: add conditional 2391 compilation code to leave zero-sized .o file if system 2392 already supports the implemented function. 2393 2394 * testsuite/help.good, testsuite/version.good: brought 2395 up-to-date (once again). 2396 2397 * NEWS, ANNOUNCE: changes to reflect this batch of changes. 2398 2399 Wed May 6 18:40:47 PDT 1998 Ken Pizzini <ken (a] gnu.org> 2400 2401 * sed/execute.c: discovered awful bug in '}' handling: 2402 it could read past the end of vec (because `n' was 2403 being decremented below zero)! Needed to "continue" 2404 instead of "break". 2405 2406 Tue May 5 14:34:38 PDT 1998 Ken Pizzini <ken (a] gnu.org> 2407 2408 * doc/sed.texi, doc/version.texi: wrote some rudimentary 2409 texinfo documentation. 2410 2411 * ANNOUNCE, NEWS, README, README.rx, Makefile.am: 2412 more updates for the upcoming beta-release. 2413 2414 * sed/compile.c, sed/execute.c, sed/sed.c, sed/utils.c, 2415 sed/sed.h, lib/strerror.c: update copyright notice text. 2416 2417 Fri May 1 15:41:37 PDT 1998 Ken Pizzini <ken (a] gnu.org> 2418 2419 * sed/execute.c (match_an_address_p, match_address_p): if 2420 the second element of an address range is a line number, 2421 and that line number is *less than* (or equal to) the 2422 current line number, we only match the one line (per 2423 POSIX.2, section 4.55.7.1). [Bug discovered as reported 2424 in the seders mailing list FAQ.] 2425 2426 * AUTHORS, NEWS, acconfig.h, configure.in, doc/Makefile.am, 2427 lib/Makefile.am, sed/Makefile.am, lib/README, 2428 testsuite/help.good, testsuite/version.good: 2429 Updated in anticipation of the 3.01-beta1 release. 2430 Reorganized development source tree to make creation 2431 of a distribution simpler. Most notable changes were 2432 to the various Makefile.am files and configure.in, but 2433 some minor edits (such as deleting or changing #include 2434 directives) have been made in many other source files. 2435 2436 * bootstrap.sh, README.bootstrap: created a mechanism for 2437 creating sed on a system which lacks a working sed. 2438 2439 Thu Apr 16 23:52:11 PDT 1998 Ken Pizzini <ken (a] gnu.org> 2440 2441 * sed.h, sed.c, execute.c, compile.c: did a spell-check on 2442 the comments; fixed several typos. 2443 2444 Thu Apr 16 13:43:01 PDT 1998 Ken Pizzini <ken (a] gnu.org> 2445 2446 * execute.c (do_subst): fixed bug where the "replaced" flag 2447 was being set to one inappropriately when at least one 2448 but fewer than sub->numb matches of the regexp were found. 2449 (Thanks to Simon Taylor <staylor (a] hermes.iaccess.com.au> 2450 for the bug report.) 2451 2452 Wed Apr 15 11:35:31 PDT 1998 Ken Pizzini <ken (a] gnu.org> 2453 2454 * sed.h, sed.c, compile.c, execute.c: having a concern that 2455 a cast was being done inappropriately, and realizing that 2456 there is no quick way to locate all casts in a program, I 2457 went through and marked all casts with a simple macro. 2458 Now it is a simple matter to locate the casts, and it is 2459 also a simple matter to turn of casts for a lint session 2460 (if it should be desired). 2461 2462 Wed Apr 15 10:29:21 PDT 1998 Ken Pizzini <ken (a] gnu.org> 2463 2464 * compile.c, sed.c: redo compile phase so that brace 2465 expressions can be spread across multiple files. 2466 For example: 2467 printf '{' >a; printf 'l;d' >b; printf '}' >c 2468 sed -f a -f b -f c foo 2469 will now compile (and work), instead of complaining 2470 about an unmatched '{'. The mess created in compile.c 2471 allowed a little simplification to the command-line 2472 processing of "-e" options in sed.c. 2473 2474 sed.h: added (opaque) err_info member to struct vector; 2475 added comments to the members of struct vector. 2476 2477 Wed Apr 14 23:50:50 PDT 1998 Ken Pizzini <ken (a] gnu.org> 2478 2479 * sed.h, sed.c, compile.c, execute.c: added types countT and 2480 flagT in order to clarify what various "int"s were doing. 2481 Also makes it easy to change the type used for counts 2482 (for example, to "unsigned long long") if desired, although 2483 there are still some gotchas (such as the printf() format 2484 for the '=' command). 2485 2486 Tue Apr 14 17:34:54 PDT 1998 Ken Pizzini <ken (a] gnu.org> 2487 2488 * execute.c (execute_program, process_files, count_branches, 2489 shrink_program): Added a first attempt at program optimization. 2490 We now can quit early if we are running with the "-n" 2491 and all of the commands are known to be valid only for 2492 lines less than the current line. Thus the "sed" in 2493 "foo | sed -n 1,2p" will print read three lines, printint 2494 the first two, and then quit, regardless of how much longer 2495 "foo" might run or output. This optimization does not buy 2496 much in most cases (it sometimes even costs a little), 2497 but when it does help it can help big. The code is 2498 all conditionally compiled based on the 2499 EXPERIMENTAL_DASH_N_OPTIMIZATION symbol being #defined, 2500 so it can be easily omitted if it causes problems. 2501 2502 Tue Apr 14 12:25:06 PDT 1998 Ken Pizzini <ken (a] gnu.org> 2503 2504 * execute.c (test_dollar_EOF, last_file_with_data_p): 2505 test_dollar_EOF() was incorrectly returning a false (0) 2506 when there were unprocessed files, none of which had any 2507 data (either unopenable or zero-length). Created 2508 last_file_with_data_p() to detect this situation, and 2509 modified test_dollar_EOF() to make use of it. 2510 2511 Thu Apr 2 23:02:18 PST 1998 Ken Pizzini <ken (a] gnu.org> 2512 2513 * compile.c (match_slash): match_slash() did not handle 2514 [.coll.], [=equiv=], and [:class:] sequences within a 2515 character class. Added snarf_char_class() [which is a 2516 remote derivative of parse_char_class() from GNU ed-0.2] 2517 to deal with the details, and altered match_slash() 2518 to make use of it. Also created the trivial 2519 add_then_next() to avoid clutter in snarf_char_class(). 2520 2521 Thu Apr 2 20:34:42 PST 1998 Ken Pizzini <ken (a] gnu.org> 2522 2523 * execute.c, sed.c, sed.h: There was a severe bug in 2524 how the code handled "sed 5n a b" when "a" consists 2525 of exactly five lines -- it behaved like "sed 5q a b"! 2526 2527 Rearranged where files get opened -- large scale 2528 changes primarily involving main(), process_files(), 2529 and read_pattern_space(), but also touching on several 2530 other parts of execute.c. The read_pattern_space() 2531 function became unwieldly and parts were split into 2532 open_next_file(), closedown(), read_always_fail(), 2533 read_mem_line(), and read_file_line(). The 2534 at_end_of_file_p() function became obsolete and was 2535 eliminated; test_dollar_EOF_p() was updated. A few 2536 global and module-static variables were elminated, and 2537 "struct line" was extended; comments were added to the 2538 "struct line" declartation to document some important 2539 dependencies in it. 2540 2541 I undertook the reorganization with dread, but I 2542 feel that the new organization is an improvement 2543 well beyond just fixing the bug that inspired it. 2544 2545 Thu Apr 2 01:16:25 PST 1998 Ken Pizzini <ken (a] gnu.org> 2546 2547 * execute.c (read_file_line, slow_getline): the fread() 2548 buffering code gives insufficient feedback to a user 2549 running sed with a tty input device, so I created 2550 slow_getline() for reading from a tty device. 2551 Additionally, EOF detection has been made a little more 2552 sensitive to avoid requiring multiple EOFs to be entered 2553 from a tty. 2554 2555 * configure.in: added isatty() check. 2556 2557 Wed Apr 1 11:04:30 PST 1998 Ken Pizzini <ken (a] gnu.org> 2558 2559 * configure.in (CPPFLAGS, LDFLAGS, LIBS): 2560 Set to appropriate values if large file support needs 2561 explicit enabling. Code fragment taken from a 1997-10-25 2562 patch to gawk by Paul Eggert <eggert (a] twinsun.com> 2563 2564 Thu Aug 14 17:43:27 PDT 1997 Ken Pizzini <ken (a] gnu.org> 2565 2566 * utils.c (ck_fclose): modified to ignore NULL parameter. 2567 2568 Thu Aug 14 12:08:45 PDT 1997 Ken Pizzini <ken (a] gnu.org> 2569 2570 * execute.c: tweaked execute_program() to eliminate 2571 gratuitous "goto" usage. 2572 2573 Thu Aug 14 11:30:04 PDT 1997 Ken Pizzini <ken (a] gnu.org> 2574 2575 * compile.c: added case-insensitive modifier ('I') to 2576 address and s/// regexps. The s/// case also accepts 2577 the more popular 'i' modifier. (The address regexp 2578 cannot use 'i' as a modifier, as that conflicts with 2579 the use of the 'i'nsert command.) 2580 2581 Thu Aug 14 09:29:06 PDT 1997 Ken Pizzini <ken (a] gnu.org> 2582 2583 * compile.c: abstracted out match_slash() from the s///, y///, 2584 and address-regexp special-case codes. 2585 2586 * execute.c: made dump_append_queue() use ck_fread() instead 2587 of hand-rolled error checking. 2588 2589 Mon Jul 28 10:50:41 PDT 1997 Ken Pizzini <ken (a] gnu.org> 2590 2591 * sed.c, sed.h, execute.c: POSIX.2, section 4.55.7, says that 2592 a newline must end *every* output line. But I think that 2593 it is useful (when seding a binary file) to omit a trailing 2594 newline if the input lacks one. Thus the addition of 2595 POSIXLY_CORRECT behavior. 2596 2597 * execute.c: however, when seding multiple files my feeling 2598 is that it makes sense to have each file but the last 2599 behave as-if it ended in a newline. Modified read_pattern_space() 2600 accordingly. 2601 2602 * utils.c: realized that add1_buffer(), for performance reasons, 2603 shouldn't be calling memcpy() (indirectly via add_buffer()), 2604 so rewrote it. 2605 2606 Sat Jul 26 23:08:28 PDT 1997 Ken Pizzini <ken (a] gnu.org> 2607 2608 * execute.c: attempted to make read_pattern_space more 2609 efficient for the the non-mmap() case. 2610 2611 * utils.c, utils.h, execute.c: new function ck_fread() 2612 created and used. 2613 2614 Sat Jul 26 20:22:14 PDT 1997 Ken Pizzini <ken (a] gnu.org> 2615 2616 * execute.c, compile.c, sed.c: abstracted the mmap() 2617 interface into map_file()/unmap_file() [sed.c], and 2618 changed the ad-hoc code in compile_file() [compile.c] 2619 and process_file() [execute.c] to make use of the new 2620 interface. 2621 2622 Sat Jul 26 19:45:46 PDT 1997 Ken Pizzini <ken (a] gnu.org> 2623 2624 * execute.c, compile.c, configure.in: Check to see if mmap() 2625 is available; if so make use of it on regular files. 2626 2627 * compile.c: compile_file() now closes the input file 2628 when it is through! 2629 2630 Sun Jul 20 23:57:02 PDT 1997 Ken Pizzini <ken (a] gnu.org> 2631 2632 * compile.c: modified parsing to permit whitespace in more 2633 places where it makes sense; 2634 added backslash escaping to the y/// command, per POSIX. 2635 2636 * execute.c: Merged append_pattern_space() into read_pattern_space(); 2637 moved body of 's' command to new function do_subst(); 2638 moved body of 'l' command to new function do_list(); 2639 changed output of 'l' command to conform to POSIX.2; 2640 made line handling conform to POSIX; added output_line() function; 2641 redesigned append-space algorithm; added append_queue structure and 2642 the next_append_slot() and dump_append_queue() functions. 2643 2644 * sed.h: moved the definition of what is now struct subst 2645 outside of the definition of struct sed_cmd. 2646 2647 Sat Jul 19 16:29:09 PDT 1997 Ken Pizzini <ken (a] gnu.org> 2648 2649 * sed.c, execute.c, sed.h, Makefile.am: Separated out the 2650 pieces dealing with executing the program from the top-level 2651 parameter parsing and control. 2652 2653 Sat Jul 19 01:16:35 PDT 1997 Ken Pizzini <ken (a] gnu.org> 2654 2655 * sed.c, compile.c, sed.h, Makefile.am: separate out the 2656 pieces dealing with compiling the program from the pieces 2657 dealing with interpreting the result. 2658 2659 * compile.c: add functions in_nonblank() and in_integer(), 2660 and change interface to compile_address() with an eye 2661 to making code clearer. 2662 2663 Fri Jul 18 13:35:50 PDT 1997 Ken Pizzini <ken (a] gnu.org> 2664 2665 * utils.c: attempt at a quasi-unification of the 2666 STDC and traditional C approaches to panic(). 2667 2668 * sed.c: eliminate some gratuitous bit twiddling. 2669 (Using flag bits can be a useful technique, but 2670 this code is cleaner without them.) 2671 2672 * sed.c: place mutually exclusive members of struct addr 2673 within a union, mainly to document the exclusivity; 2674 eliminate unused structure members from struct fp_list; 2675 eliminate unnecessary module-global variables; 2676 remove some #if 0 code that is too odd to keep; 2677 allegedly simplified the 'l' case of execute_program(); 2678 allegedly simplified inchar(); 2679 localized some static variables; 2680 renamed some variables to better document their purpose; 2681 removed some goto-s rendered obsolete by other changes. 2682 2683 Thu Jul 17 15:30:44 PDT 1997 Ken Pizzini <ken (a] gnu.org> 2684 2685 * utils.c, utils.h, sed.c: added and made use of 2686 ck_free() function. 2687 2688 * utils.c, utils.h, sed.c: changed all the *_buffer() 2689 functions to take/return an incomplete type 2690 "struct buffer *" instead of using VOID *. 2691 2692 * utils.c, utils.h, sed.c: renamed "finish_buffer()" 2693 to "free_buffer()", on the premise that the new 2694 name better describes the function's purpose. 2695 2696 Wed Jul 16 13:52:14 PDT 1997 Ken Pizzini <ken (a] gnu.org> 2697 2698 * utils.c, utils.h, sed.c: added and made use of 2699 ck_memdup() function. 2700 2701 * sed.c: protected a call to add1_buffer() in 2702 compile_program() which could have tried to 2703 push an EOF if a a/i/c command ended with 2704 a '\', EOF sequence. 2705 2706 * utils.c: added sanity check to add1_buffer() so that 2707 EOF will not be added to the buffer. 2708 2709 Wed Jul 16 03:56:26 PDT 1997 Ken Pizzini <ken (a] gnu.org> 2710 2711 * configure.in, compat.h, compat.c: added memchr. 2712 2713 * sed.c: got rid of arbitrary NUM_FPS limit; 2714 made global functions and variables "static" where appropriate; 2715 make various cosmetic changes, hopefully improving readability; 2716 simplified some redundant predicates; 2717 simplified some code, but nothing fundamental (yet?). 2718 2719 Wed Jul 16 00:24:54 PDT 1997 Ken Pizzini <ken (a] gnu.org> 2720 2721 * alloca.c, getopt.c, getopt.h, getopt1.c: updated from 2722 versions in textutils-1.22. 2723 2724 * Makefile.in, Makefile.am, configure.in: put in automake support. 2725 2726 * basicdefs.h, compat.h, compat.c [, sed.c, utils.c]: took out 2727 some very ugly compatibility #ifdefs and packaged into one 2728 place. 2729 2730 * sed.c, utils.c: some gratuitous formatting changes. 2731 2732 * utils.c: changed datatype of utils_id_s in order to 2733 eliminate arbitrary array size. 2734 2735 Sun Jul 13 17:00:26 PDT 1997 Ken Pizzini <ken (a] gnu.org> 2736 2737 * sed.c, utils.c, utils.h: de-linting oriented cleanup. 2738 2739 Sun Jul 13 00:46:48 PDT 1997 Ken Pizzini <ken (a] gnu.org> 2740 2741 * sed.c: fixed bug which caused SEGV for files missing a 2742 final newline. Corrected calls to regnexec to pass the 2743 proper parameters, in the proper order. 2744 2745 Sat Dec 30 20:16:59 1995 Tom Lord <lord@beehive> 2746 2747 *** Version 3.00 released 2748 2749 * sed.c: Use posix entry points to regexp functions. 2750 Fix enough bugs to pass the test-suite. 2751 2752 ....... Jason Molenda <crash (a] cygnus.com> 2753 2754 * testsuite/: trippy test suite. 2755 2756 2757 Wed May 11 07:46:24 1994 Chip Salzenberg (chip (a] fin.uucp) 2758 2759 *** Version 2.05 released 2760 2761 * sed.c (compile_address): Recognize numeric addresses. 2762 Fixes typo made during installation of "~" feature. 2763 2764 Sat Apr 30 17:17:38 1994 Tom Lord (lord (a] x1.cygnus.com) 2765 2766 *** Version 2.04 released 2767 2768 * sed.c: applied a patch from 2769 From: kap1 (a] tao.cpe.uchicago.edu (Dietrich Kappe) 2770 2771 Dietrich writes: 2772 2773 As my contribution to the creeping feature creature in sed, 2774 here is a new type of address. The address has form n~m, 2775 which means "the line number is equal to n modulo m." The 2776 modifications to sed are trivial, and the general 2777 usefulness of this address should be obvious. If m is 0 or 2778 missing, 1 is used in its place (could be a bug or a 2779 feature :-). 2780 2781 Sat Apr 30 17:17:38 1994 Tom Lord (lord (a] x1.cygnus.com) 2782 2783 * rx.c (solve_destination): protect `solution' more carefully. 2784 This is a cleanup of a patch from Kevin Buettner 2785 (kev (a] cujo.geg.mot.com). 2786 2787 Sat Apr 30 17:17:38 1994 Tom Lord (lord (a] x1.cygnus.com) 2788 2789 * rx.c: make translation tables unsigned chars 2790 2791 * sed.c (main): Compile accumulated -e commands as 2792 soon as a -f command comes along. This ensures that 2793 the commands are executed in the right order. 2794 2795 Mon Oct 25 14:41:47 1993 Tom Lord (lord (a] rtl.cygnus.com) 2796 2797 * sed.c (execute_program): 'w' flushes the buffer after it 2798 writes -- diagnosed by doug (a] research.att.com. 'r' and 'w' to 2799 the same file is now supported -- hopefully even in a way that 2800 satisfies Posix (it now behaves differently from some 2801 /bin/sed's and the spec is hard to read so i'm not sure). 2802 2803 Also, 'r' of a non-existent file is now permitted. 2804 2805 Mon Oct 11 21:06:10 1993 Tom Lord (lord (a] cygnus.com) 2806 2807 * sed.c (execute_program): remember that 'b' and 't' are more 2808 like longjmp than goto. Patch from tom (a] basil.icce.rug.nl (Tom 2809 R.Hageman) 2810 2811 * rx.c: patch from From: fin!chip (a] rutgers.edu (Chip 2812 Salzenberg) to get rid of compiler warnings. 2813 2814 2815 Sat Aug 7 01:04:59 1993 Tom Lord (lord (a] unix7.andrew.cmu.edu) 2816 2817 *** Version 2.03 released 2818 2819 * sed.c (compile_regex): report error messages for bogus 2820 regexps. 2821 2822 SEE ALSO: ChangeLog.rx 2823 2824 2826 Wed Jul 21 00:28:03 1993 Tom Lord (lord (a] unix8.andrew.cmu.edu) 2827 2828 * alloca.c: upgraded to a more recent version 2829 2830 * rx.c (re_search_2): prefer matches with longer 2831 subexpressions to those with shorter ones, giving precedence 2832 to low numbered subexpressions. 2833 2834 * rx.c (re_compile): don't free `params' if its null. 2835 2836 Fri Jul 16 01:12:08 1993 Tom Lord (lord (a] unix8.andrew.cmu.edu) 2837 2838 * rx.[ch], sed.c: rx replaces regex. 2839 2840 2841 2842 Thu May 27 11:13:03 1993 Tom Lord (lord (a] unix3.andrew.cmu.edu) 2843 2844 * sed.c (execute_program, match_addr): caught more cases 2845 that need to be sensitive to a missing \n at EOF. 2846 2847 Fri May 21 00:39:22 1993 Tom Lord (lord (a] unix8.andrew.cmu.edu) 2848 2849 * sed.c (execute_program): apply gaumondp's patch 2850 to fix '\xabcxs/foo/bar/'. 2851 2852 * sed.c (execute_program): 2853 If a second address is a regexp, never match it on the 2854 same line as the first address. 2855 2856 * sed.c (compile_regexp): 2857 Numeric ranges x,y s.t. y < x are now treated as x,x. 2858 There was a bug in that they were being handled like x,x+1. 2859 2860 * sed.c (execute_program, read_pattern_space, 2861 append_pattern_space) don't add newlines to lines 2862 that don't have them. 2863 2864 Wed May 19 13:34:45 1993 Tom Lord (lord (a] unix9.andrew.cmu.edu) 2865 2866 * sed.c (compile_program): grok \\n in comments. 2867 2868 Mon May 17 16:34:50 1993 Tom Lord (lord (a] unix9.andrew.cmu.edu) 2869 2870 * alloca.c: new (standard) file 2871 2872 * configure.in: AC_CONSTified 2873 2874 * sed.c (compile_program): properly diagnose the error of 2875 a missing command (e.g. sed /x/). (thanks gaumondp) 2876 2877 * sed.c (compile_regexp): handle character classes correctly. 2878 Thanks gaumondp (a] ERE.UMontreal.CA 2879 and schwab (a] issan.informatik.uni-dortmund.de. 2880 2881 Thu May 6 12:37:18 1993 Tom Lord (lord (a] unix10.andrew.cmu.edu) 2882 2883 * sed.c (compile_filename, execute_program): don't use 2884 `access' or `/dev/null'. 2885 2886 * sed.c (execute_program): 'N' at EOF should delete the pat buf. 2887 2888 * sed.c (compile_filename): truncate, don't append files 2889 being openned for `w' or `s///w' 2890 2891 * sed.c (execute_program): -n switch shouldn't effect `i' or `c'. 2892 2893 * sed.c (compile_program): don't compile unescaped newlines 2894 into the substitution string of an `s' command (they are an error). 2895 2896 * sed.c (compile_regex): correctly skip over character 2897 sets that contain `]'. 2898 2899 * sed.c (execute_program): patch from gaumondp 2900 Correctly handle empty-string matches in the case of an `s' 2901 command with a repeat count. 2902 2903 * sed.c (compile_program): patch from gaumondp (a] ere.UMontreal.ca. 2904 Don't consume characters after the label of a `b', `t' or `:' command. 2905 2906 * sed.c (compile_program): unmatched open braces are an error. 2907 2908 * sed.c (compile_file): when consuming an initial comment, 2909 count lines correctly. 2910 2911 Wed Nov 18 02:10:58 1992 Tom Lord (lord (a] unix2.andrew.cmu.edu) 2912 2913 * sed.c (execute_program): Made s///p print even if -n was 2914 specified. 2915 2916 * sed.c (compile_string): Changed the type of this function to 2917 fix a compile warning. 2918 2919 Wed Nov 4 17:15:34 1992 Tom Lord (lord (a] unix7.andrew.cmu.edu) 2920 2921 * sed.c (main): Initialize the hold area to contain "\n" 2922 instead of "". In execute_program, all lines are expected 2923 to be newline terminated. Also, if H is the first command 2924 in the script, the result is a pattern buffer that begins 2925 with a blank line. Thanks to pinard (a] iro.umontreal.ca 2926 (Francois Pinard) for pointing out this and many other bugs. 2927 2928 * sed.c (execute_program): Fixed a case of `D' command. 2929 Thanks Chris Weber <weber (a] bucknell.edu> 2930 2931 * sed.c: added new tests of no_default_output to make -n work. 2932 Thanks Andrew Herbert <andrew (a] werple.apana.org.au> 2933 2934 * sed.c, configure.in,Makefile.in: autoconfed bcopy and const. 2935 Thanks "J.T. Conklin" <jtc (a] gain.com> 2936 2937 * sed.c: made prog_cur, prog_start, and prog_end unsigned so 2938 that users could write `sed -e s//foo/g'. 2939 2940 Tue Oct 13 00:04:05 1992 Tom Lord (lord (a] unix3.andrew.cmu.edu) 2941 2942 * sed.c (execute_program): fixed the cycling behavior of 'D' 2943 2944 * sed.c: integrated patch that closes files 2945 2946 * sed.c: changed regexp syntax 2947 2948 Fri May 22 15:11:12 1992 Tom Lord (lord at moriarty.bh.andrew.cmu.edu) 2949 2950 * regex.c: this is not my change, but a pointer to the fact 2951 that karl@gnu fixed some regexp bugs that were plaguing sed. 2952 2953 Thu Apr 30 13:02:21 1992 Tom Lord (lord at unix3.andrew.cmu.edu) 2954 2955 * sed.c (compile_program, execute_program) 2956 subprograms are now compiled with an explicit continuation ;) 2957 return_v and return_i in struct vector. execute_program 2958 no longer recurses to execute subprograms (case '{') and now 2959 understands a return instruction (case '{'). 2960 2961 Tue Apr 28 17:13:04 1992 Tom Lord (lord at unix7.andrew.cmu.edu) 2962 2963 * sed.c (compile_address) added \?regexp? syntax for addresses. 2964 2965 * sed.c (main) added {} intervals to the obscure regexp 2966 syntax. 2967 2968 * sed.c (compile_program) after calling compile_address, 2969 normalize numeric addresses (make a2.addr_number > a1.addr_number). 2970 This is necessary because line numbers must match exactly, 2971 but sed does not try to match a2 until after a1 has matched, 2972 yet a1,a2 where a2 <= a1 is defined to be equivelent to 2973 a1,a1+1 2974 2975 Sat Feb 29 10:55:54 1992 David J. MacKenzie (djm@nutrimat) 2976 2977 * sed.c (usage): Document long options as starting with `--'. 2978 2979 Mon Dec 9 23:56:40 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) 2980 2981 * sed.c: Include sys/types.h, for new regex.h. 2982 2983 Tue Nov 5 02:16:01 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) 2984 2985 * utils.c: Change NO_VFPRINTF to VPRINTF_MISSING, for 2986 compatibility with autoconf. 2987 2988 Mon Sep 2 22:02:40 1991 David J. MacKenzie (djm at apple-gunkies) 2989 2990 * sed.c (compile_regex): Treat \ as a normal character when in 2991 a char class. 2992 2993 Thu Aug 8 00:15:33 1991 David J. MacKenzie (djm at bleen) 2994 2995 * Version 1.08. 2996 2997 * sed.c (compile_filename): If reading a file fails, read 2998 /dev/null instead. It's what Unix and POSIX do, effectively. 2999 3000 * sed.c (compile_regex): The 'slash' character doesn't 3001 terminate the regex if it's in a character class. 3002 3003 * sed.c (main): If given no args, or bad option, print usage 3004 message. 3005 (usage): New function. 3006 3007 * sed.c (execute_program): Amount written for 'P' command was 3008 wrong. From stephend (a] ksr.com (Stephen Davis). 3009 3010 Wed Aug 7 16:51:14 1991 David J. MacKenzie (djm at apple-gunkies) 3011 3012 * sed.c (append_pattern_space): Check for buffer full before 3013 instead of after writing to buffer. Don't need to test for 3014 EOF initially anymore, due to the next change. 3015 (execute_program): For 'n' and 'N' commands, if eof is reached 3016 in input, quit the script like Unix sed does. 3017 Fix memory allocation problems for 'a' and 'r' commands. 3018 (compile_program): Fix off by one error in processing comments. 3019 All of the above are from Tapani Tarvainen, tarvaine (a] tukki.jyu.fi. 3020 3021 * sed.c (setup_jump): Use isblank instead of testing for ' ' 3022 or '\t', for POSIX locales. 3023 3024 * utils.c (ck_strdup): Renamed from strdup. 3025 * sed.c: Change callers. 3026 3027 * sed.c, utils.c: Clean up declarations and includes to get 3028 rid of compiler warnings. 3029 3030 * sed.c (main): Add long-named options. Don't complain if -n 3031 is given twice. 3032 3033 Fri Aug 2 12:33:16 1991 David J. MacKenzie (djm at apple-gunkies) 3034 3035 * configure: Support +srcdir arg. Create config.status and 3036 remove it and Makefile if interrupted while creating them. 3037 * Makefile.in: Change DESTDIR to prefix. 3038 3039 Mon Jul 15 13:07:39 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) 3040 3041 * sed.c (main): Add -V option to print version number. 3042 (USAGE): Mention -V. 3043 3044 Mon Jul 8 01:42:22 1991 David J. MacKenzie (djm at geech.gnu.ai.mit.edu) 3045 3046 * sed.c: Define bcopy in terms of memcpy if STDC_HEADERS as 3047 well as if USG. 3048 (compile_filename): Don't glob filename (for 'r' and 'w' 3049 commands). Unix sed doesn't do it and it's not very useful, 3050 since it can only match 0 or 1 files. 3051 (execute_program): Change '\a' to 007 since some compilers 3052 don't recognize \a. 3053 * utils.c: New file; code moved from sed.c. 3054 * Replace Makefile with Makefile.in and configure. 3055 Update README. 3056 3057 Tue Mar 26 13:00:48 EST 1991 Jay Fenlason (hack (a] gnu.ai.mit.edu) 3058 3059 * sed.c (match_address) Added a trivial cast for portability. 3060 3061 Mon Feb 25 13:23:29 EST 1991 Jay Fenlason (hack (a] ai.mit.edu) 3062 3063 * sed.c Changed 's' command to work with latest version of regex() 3064 routines, which mysteriously changed somewhere in there. . . 3065 A one-line patch from David Eckelkamp (eckelkamp (a] mcc.com). 3066 3067 Initialize the fastmap in the hopes that it'll make sed faster. 3068 3069 Thu Feb 21 13:42:27 EST 1991 Jay Fenlason (hack (a] ai.mti.edu) 3070 3071 * sed.c Change panic to compile with other __STDC__ compilers. 3072 3073 Wed Jan 30 10:46:38 EST 1991 Jay Fenlason (hack (a] ai.mit.edu) 3074 3075 * sed.c Changed version number. Made new release. 3076 3077 Tue Nov 27 15:34:51 EST 1990 Jay Fenlason (hack (a] ai.mit.edu) 3078 3079 * sed.c (setup_jump) Don't blow chunks if there isn't a label 3080 after a b or t command. 3081 3082 (main) Don't panic if it a branch command doesn't have 3083 a label to branch to. 3084 3085 (main) Collect all the -e arguments together and parse them 3086 all at once. This way, -e { -e mumble -e } will work. 3087 3088 All these small patches from David Schmidt (davids (a] isc-br.isc-br.com) 3089 3090 Tue Sep 11 12:51:37 EDT 1990 Jay Fenlason (hack (a] ai.mit.edu) 3091 3092 * sed.c Changed some function forward declarations to use VOID * 3093 instead of char * 3094 3095 Mon Jul 16 11:12:54 EDT 1990 Jay Fenlason (hack (a] ai.mit.edu) 3096 3097 * sed.c (ck_malloc) Use malloc(1) instead of malloc(0) if given 3098 a request for zero bytes. 3099 3100 Tue Jun 5 02:05:37 1990 David J. MacKenzie (djm at albert.ai.mit.edu) 3101 3102 * sed.c: Remove excess newlines from calls to panic. 3103 Reformat some comments to fit in 79 columns. 3104 Base whether to use void * on __STDC__, not __GNU__. 3105 (main): Add missing arg when printing usage message. 3106 Print usage if given invalid arg. 3107 (panic) [__STDC__]: Add missing ", ...". 3108 (compile_filename): Print correct error message if glob_filename 3109 returns NULL. 3110 3111 Thu Apr 5 21:41:12 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu) 3112 3113 * sed.c (execute_program, case 'r'): When need to realloc append.text, 3114 multiply append.alloc by 2 instead of adding 3115 cur_cmd->x.cmd_txt.text_len. 3116 3117 Tue Mar 6 15:55:35 EST 1990 Jay Fenlason (hack (a] ai.mit.edu) 3118 3119 * sed.c (compile_regex) Allocate 10 bytes extra space needed by 3120 re_compile_pattern. 3121 3122 Sun Feb 25 16:32:10 1990 Jim Kingdon (kingdon at pogo.ai.mit.edu) 3123 3124 * sed.c (execute_program, case 'l'): Print \00 instead of \0. 3125 Print backslash as \\ not \. 3126 Print \xx instead of /xx. 3127 3128 Thu Feb 1 14:02:28 EST 1990 hack@wookumz 3129 3130 * sed.c (memchr) Use () inside inner loop so it will work correctly. 3131 A two character patch from Robert A Bruce (rab (a] allspice.berkeley.edu) 3132 3133 Wed Sep 27 18:47:39 EDT 1989 hack (a] ai.mit.edu 3134 3135 * sed.c (compile_regex) New function. When compiling regex, 3136 turn ^ into \` and $ into \' so that they won't match on embedded 3137 newlines. UN*X pattern matching is a crock. 3138 (compile_program, compile_address) call compile_regex. 3139 3140 Mon Sep 18 10:15:32 EDT 1989 hack (a] ai.mit.edu 3141 3142 * sed.c (compile_program): define translate as unsigned char * so 3143 that y command will work on non-ascii characters. 3144 3145 Changed version number to 1.06. 3146 3147 Thu Sep 14 15:57:08 EDT 1989 hack (a] ai.mit.edu 3148 3149 * sed.c (compile_program) Let programs use ; to terminate } as 3150 well as newline. 3151 3152 (read_file) Print an error msg to stderr if it can't open an 3153 input file. 3154 3155 Thu Mar 23 18:04:46 1989 Randall Smith (randy at apple-gunkies.ai.mit.edu) 3156 3157 * Makefile, sed.c: Added new copyright notice. 3158 3159 * Makefile: Make distributions which follow the symlinks. 3160 3161 hack (a] ai.mit.edu 3162 3163 1.05 Fixed error in 'r' (now does things in the right order) 3164 3165 1.04 Fixed s/re/rep/[number] 3166 3167 1.03 Fixes from Mike Haertel for regexps that match the 3168 empty string, and for Ritchie stdio (non-sticky EOF) 3169 3170 1.02 Fixed 't', 'b', ':' to trim leading spaces and tabs 3171 Fixed \\ in replacement of 's' command 3172 Added comments 3173 3174 1.01 Added s/re/rep/[digits] 3175 added #n as first line of script 3176 added filename globbing 3177 added 'l' command 3178 All in the name of POSIX 3179 3180 1.00 Began (thinking about) distributing this file 3181 3183 Local Variables: 3184 mode: indented-text 3185 left-margin: 8 3186 version-control: never 3187 End: 3188