1 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
4 Copying and distribution of this file, with or without modification,
5 are permitted in any medium without royalty provided the copyright
6 notice and this notice are preserved.
8 Changes from 3.1.7 to 3.1.8
9 ---------------------------
10 1. The zero flag no longer applies to %c and %s; apparently the standards
11 changed at some point.
13 2. Updated to latest infrastructure: Autoconf 2.65, Automake 1.11.1,
14 libtool 2.2.6b, Bison 2.4.2.
16 3. Failure to open a socket is no longer a fatal error.
18 4. dfa.h and dfa.c are now more-or-less in sync with GNU grep, for the first
21 5. Gawk no longer includes its own copy of libsigsegv but it will use it if
22 installed on the build system. The --disable-libsigsegv configure option
25 6. The ' flag (%'d) is now just ignored on systems that can't support it.
27 7. Lots of bug fixes, see the ChangeLog.
29 Changes from 3.1.6 to 3.1.7
30 ---------------------------
31 1. Gawk now has support for z/OS (IBM S/390 architecture).
33 2. Gawk now handles multibyte strings better in [s]printf with field
36 3. Gawk now uses libsigsegv to print a message before core dumping. This
37 handles infinite recursion of an awk function a little better.
38 Use of the library can be disabled at configure time with the
39 --disable-libsigsegv option for unusual systems.
41 4. The handling of BINMODE is now somewhat more sane.
43 5. A getline from a directory is no longer fatal; instead it returns -1.
45 6. Per POSIX, special variable names (like FS) cannot be used as function
48 7. The new -O / --optimize option enables simple constant folding on
49 the parse tree during parsing. We hope that with time the number
50 of optimizations will increase.
52 8. Updated to the latest autotools: Autoconf 2.63, Automake 1.11,
53 Libtool 2.2.6a, and Gettext 0.17. Also latest Bison: 2.4.1.
55 9. Some improvement in testing for isinf / isnan in builtin.c.
57 10. Improved the handling of `a = a b c' to be more general.
59 11. Locale handling for %'d should now work on certain non-Unix /
62 12. Lots of bugs fixed, see the ChangeLog for the details.
64 Changes from 3.1.5 to 3.1.6
65 ---------------------------
67 1. `gawk 'program' /non/existant/file' no longer core dumps.
69 2. Too many people the world over have complained about gawk's use of the
70 locale's decimal point for parsing input data instead of the traditional
71 period. So, even though gawk was being nicely standards-compliant, in
72 a Triumph For The Users, gawk now only uses the locale's decimal point
73 if --posix is supplied or if POSIXLY_CORRECT is set. It is the sincere
74 hope that this change will eliminate this FAQ from being asked.
76 3. `gawk -v BINMODE=1 ...' works again.
78 4. Internal file names like `/dev/user' now work again. (Note that these
79 file names are obsolete and will go away eventually.)
81 5. Problems with wide strings in non "C" locales have been straightened
82 out everywhere. (At least, we think so.)
84 6. Use of `ansi2knr' is no longer supported. Please use an ANSI C compiler.
86 7. Updated to Autoconf 2.61, Automake 1.10, and Gettext 0.16.1.
88 8. The getopt* and regex* files were synchronized with current GLIBC CVS.
89 See the ChangeLog for the versions and minor edits made.
91 9. There are additional --lint-old warnings.
93 10. Gawk now uses getaddrinfo(3) to look up names and IP addresses. This
94 allows the use of an IPv6 format address and paves the way for
95 eventual addition of `/inet6/...' and `/inet4/...' hostnames.
97 11. We believe gawk to now be valgrind clean. At least when run against
100 12. A number of issues dealing with the formatting and printing of very
101 large numbers in integer formats have been dealt with and fixed.
103 13. Gawk now converts "+inf", "-inf", "+nan" and "-nan" into the corresponding
104 magic IEEE floating point values. Only those strings (case independent)
105 work. With --posix, gawk calls the system strtod directly. You asked
106 for it, you got it, you deal with it.
108 14. Defining YYDEBUG enables the -D command line option.
110 15. Gawk should now work out of the box on Tandem NSK/OSS systems.
112 16. Lint messages rationalized: many more of the messages are now printed
113 only once, instead of every time they are encountered.
115 17. The strftime() function now accepts an optional third argument, which
116 if non-zero or non-null, indicates that the time should be formatted
117 as UTC instead of as local time.
119 18. The precedence of concatenation and `| getline' (in something like
120 "echo " "date" | getline stuff) has been reverted to the earlier
121 behavior and now once again matches Unix awk.
123 19. New configure time flag --disable-directories-fatal which causes
124 gawk to silently skip directories on the command line. This behavior
125 is also enabled for --traditional, since it's what Unix awk does.
127 20. A new option, --use-lc-numeric, forces use of the locale's decimal
128 point without the rest of the draconian restrictions imposed by
129 --posix. This softens somewhat the stance taken in item #2.
131 21. Everything relevant has been updated to the GPL 3.
133 22. Array growth should be faster now, at no cost in space.
137 24. One new translation.
139 25. Various bugs fixed, see the ChangeLog for details.
141 Changes from 3.1.4 to 3.1.5
142 ---------------------------
144 1. The random() suite has been updated to a current FreeBSD version, which
145 works on systems with > 32-bit ints.
147 2. A new option, `--exec' has been added. It's like -f but ends option
148 processing. It also disables `x=y' variable assignments, but not -v.
149 It's needed mainly for CGI scripts, so that source code can't be
150 passed in as part of the URL.
152 3. dfa.[ch] have been synced with GNU grep development. This also fixes
153 multiple regex matching problems in multibyte locales.
155 4. Updated to Automake 1.9.5.
157 5. Updated to Bison 2.0.
159 6. The getopt* and regex* files were synchronized with current GLIBC CVS.
160 See the ChangeLog for the versions and minor edits made.
162 7. `configure --disable-nls' now disables just gawk's own translations.
163 Gawk continues to work with the locale's numeric formatting. This
164 includes a bug fix in handling the printf ' flag (e.g., %'d).
166 8. Gawk is now multibyte aware. This means that index(), length(),
167 substr() and match() all work in terms of characters, not bytes.
169 9. Gawk is now smarter about parsing numeric constants in corner cases.
171 11. Not closing open redirections no longer causes gawk to exit non-zero.
173 10. The VMS port has been updated.
175 11. Changes from Andrew Schorr at the xmlgawk project to provide for
176 open hooks from extensions are now included. This will let the
177 xmlgawk extension work in the standard gawk.
179 12. Updated to gettext 0.14.4. Gawk no longer includes its own copy
180 of the gettext `intl' library, following current GNU practice to
181 rely on there being an external version thereof.
183 13. A regexp of the form `//' will now generate a warning that it
184 is not a C++ comment from --lint (awk.y).
186 14. The ^ and ^= operators with an integer exponent now use Exponentiation
187 by Squaring. This simultaneously fixes a problem with ^= and a negative
190 15. length(array) now returns the number of elements in the array. This is
191 is a non-standard extension that will fail in POSIX mode.
193 16. Carriage return characters are now ignored in program source code.
195 17. Four new translations added.
197 18. Various minor bugs fixed. See the ChangeLog for the details.
199 Changes from 3.1.3 to 3.1.4
200 ---------------------------
202 1. Gawk now supports the POSIX %F format, falling back to %f if the local
203 system printf doesn't handle it.
205 2. Gawk now supports the ' flag in printf. E.g., %'d in a locale with thousands
206 separators includes the thousands separator in the value, e.g. 12,345.
208 This has one problem; the ' flag is next to impossible to use on the
209 command line, without major quoting games. Oh well, TANSTAAFL.
211 3. The dfa code has been reinstated; the performance degradation was
212 just too awful. Sigh. (For fun, use `export GAWK_NO_DFA=1' to
215 4. The special case `x = x y' is now recognized in the grammar, and gawk
216 now uses `realloc' to append the new value to the end of the existing
217 one. This can speed up the common case of appending onto a string.
219 5. The dfa code was upgraded with most of the fixes from grep 2.5.1, and
220 the regex code was upgraded with GLIBC as mid-January 2004. The regex
221 code is faster than it was, but still not as fast as the dfa code, so
222 the dfa code stays in. The getopt code was also synced to current GLIBC.
224 6. Support code upgraded to Automake 1.8.5, Autoconf 2.59, and gettext 0.14.1.
226 7. When --posix is in effect, sub/gsub now follow the 2001 POSIX behavior.
227 Yippee. This is even documented in the manual.
229 8. Gawk will now recover children that have died (input pipelines, two-way
230 pipes), upon detecting EOF from them, thus avoiding filling
231 up the process table. Open file descriptors are not recovered
232 (unfortunately), since that could break awk semantics. See the
233 ChangeLog and the source code for the details.
235 9. Handling of numbers like `0,1' in non-American locales ought to
238 10. IGNORECASE is now locale-aware for characters with values above 128.
239 The dfa matcher is now used for IGNORECASE matches too.
241 11. Dynamic function loading is better. The documentation has been improved
242 and some new APIs for use by dynamic functions have been added.
244 12. Gawk now has a fighting chance of working on older systems,
247 13. Issues with multibyte support on HP-UX are now resolved. `configure' now
248 disables such support there, since it's not up to what gawk needs.
250 14. There are now even more tests in the test suite.
252 15. Various bugs fixed; see ChangeLog for the details.
254 Changes from 3.1.2 to 3.1.3
255 ---------------------------
257 1. Gawk now follows POSIX in handling of local numeric formats for
258 input, output and number/string conversions.
260 2. Multibyte detection improved. See README_d/README.multibyte for more
261 info about multibyte locales.
263 3. Handling of `close' made more POSIX-compliant for POSIXLY_CORRECT,
264 see the documentation.
266 4. The record reading code was redone, again. This time it's much
269 5. For RS = "\n" and RS = "", gawk now only sets RT when it has changed.
270 This provides considerable performance improvement.
272 6. `match' now sets all the subscripts in the third argument array
273 correctly, even if not all subexpressions matched.
275 7. Updated to Automake 1.7.5. configure.in renamed configure.ac.
277 8. C-style switch statements are available, but must be enabled at
278 compile time via `configure --enable-switch'. For 3.2 they'll be
279 enabled by default. Thanks to Michael Benzinger for the initial
282 9. %c now always prints no more than one character, whatever
283 precision is provided.
285 10. strtonum(<number>) now works again.
287 11. Gawk is now much better about scalar/array typing of global
288 uninitiailzed variables passed as parameters. Once the parameter
289 is then used one way or the other, the global var's type is
290 adjusted accordingly. Thanks to Stepan Kasal for the original
291 (considerable) changes.
293 12. Dynamic function loading under Windows32 should now be possible. See
294 README_d/README.pcdynamic. Thanks to Patrick T.J. McPhee for the changes.
296 13. Updated to gettext 0.12.1.
298 14. Gawk now follows historical practice and POSIX for the return
299 value of `rand': It's now 0 <= N < 1.
301 Changes from 3.1.1 to 3.1.2
302 ---------------------------
304 1. Loops of the form:
309 no longer leak memory.
311 2. gawk -v FIELDWIDTHS="..." now sets PROCINFO["FS"] correctly.
313 3. All builtin operations and functions should now fully evaluate their
314 arguments so that side effects take place correctly.
316 4. Fixed a logic bug in gsub/gensub for matches to null strings that occurred
317 later in the string after a nonnull match.
319 5. getgroups code now works on Ultrix again.
321 6. Completely new version of the full GNU regex engine now in place.
323 7. Argument parsing and variable assignment has been cleaned up.
325 8. An I/O bug on HP-UX has been documented and worked around. See
326 README_d/README.hpux.
328 9. awklib/grcat should now compile correctly.
330 10. Updated to automake 1.7.3, autoconf 2.57 and gettext 0.11.5 ; thanks to
331 Paul Eggert for the initial automake and autoconf work.
333 11. As a result of #6, removed the use of the dfa code from GNU grep.
335 12. It is now possible to use ptys for |& two-way pipes instead of
336 pipes. The basic plumbing for this was provided by Paolo Bonzini.
339 command = "unix command etc"
340 PROCINFO[command, "pty"] = 1
343 command |& getline stuff
345 In other words, set the element in PROCINFO *before* opening the
346 two-way pipe, and then gawk will use ptys instead of pipes.
348 On systems without ptys or where all the ptys are in use, gawk
349 will fall back to using plain pipes.
351 13. Fixed a regex matching across buffer boundaries bug, with a
352 heuristic. See io.c:rsre_get_a_record.
354 14. Profiling no longer dumps core if there are extension functions in place.
356 15. Grammar and scanner cleaned up, courtesy of Stepen Kasal, to hopefully
357 once and for all fix the `/=' operator vs. `/=.../' regex ambiguity.
358 Lots of other grammar simplifications applied, as well.
360 16. BINMODE should work now on more Windows ports.
362 17. Updated to bison 1.875. Includes fix to bisonfix.sed script.
364 18. The NODE structure is now 20% (8 bytes) smaller (on x86, anyway), which
365 should help conserve memory.
367 19. Builds not in the source directory should work again.
369 20. Arrays now use 2 NODE's per element instead of three. Combined with
370 #18, (on the x86) this reduces the overhead from 120 bytes per element
371 to just 64 bytes: almost a 50% improvement.
373 21. Programs that make heavy use of changing IGNORECASE should now be
374 much faster, particularly if using a regular expression for FS or RS.
375 IGNORECASE now correctly affects RS regex record splitting, as well.
377 22. IGNORECASE no longer affects single-character field splitting (FS = "c"),
378 or single-character record splitting (RS = "c").
380 This cleans up some weird behavior, and makes gawk better match the
381 documentation, which says it only affects regex-based field splitting
382 and record splitting.
384 The documentation on this was improved, too.
386 23. The framework in test/ has been simplified, making it much easier to
387 add new tests while keeping the size of Makefile.am reasonable. Thanks
388 for this to Stepan Kasal.
390 24. --lint=invalid causes lint warnings only about stuff that's actually
391 invalid. This needs additional work.
393 25. More translations.
395 26. The `get_a_record' routine has been revamped (currently by splitting it
396 into three variants). This should improve long-term maintainability.
398 27. `match' now adds more entries to 3rd array arg:
399 match("the big dog", /([a-z]+) ([a-z]+) ([a-z]+)/, data)
401 data[1, "start"], data[1, "length"], and so on.
403 28. New `asorti' function with same interface as `asort', but sorts indices
406 29. Documentation updated to FDL 1.2.
408 30. New `configure' option --disable-lint at compile time disables lint
409 checking. With GCC dead-code-elimination, cuts almost 200K off the
410 executable size on GNU/Linux x86. Presumably speeds up runtime.
412 Using this will cause some of the tests in the test suite to fail.
413 This option may be removed at a later date.
415 31. Various minor cleanups, see the ChangeLog for details.
417 Changes from 3.1.0 to 3.1.1
418 ---------------------------
420 1. Six new translations.
422 2. Having more than 4 different values for OFMT and/or CONVFMT now works.
424 3. The handling of dynamic regexes is now more more sane, esp. w.r.t.
425 the profiling code. The profiling code has been fixed in several
428 4. The return value of index("", "") is now 1.
430 5. Gawk should no longer close fd 0 in child processes.
432 6. Fixed test for strtod semantics and regenerated configure.
434 7. Gawk can now be built with byacc; an accidental bison dependency was
437 8. `yyerror' will no longer dump core on long source lines.
439 9. Gawk now correctly queries getgroups(2) to figure out how many groups
442 10. New configure option to force use of included strftime, e.g. on
443 Solaris systems. See `./configure --help' for the details. Replaced
444 the included strftime.c with the one from textutils.
446 11. OS/2 port has been updated.
448 12. Multi-byte character support has been added, courtesy of IBM Japan.
450 13. The `for (iggy in foo) delete foo[iggy]' -> `delete foo' optimisation
453 14. Upgraded to gettext 0.11.2 and automake 1.5.
455 15. Full gettext compatibility (new dcngettext function).
457 16. The O'Reilly copyedits and indexing changes for the documentation have
458 been folded into the texinfo version of the manuals.
460 17. A humongously long value for the AWKPATH environment variable will no
463 18. Configuration / Installation issues have been straightened out in
466 Changes from 3.0.6 to 3.1.0
467 ---------------------------
469 1. A new PROCINFO array provides info about the process. The non-I/O /dev/xxx
470 files are now obsolete, and their use always generates a warning.
472 2. A new `mktime' builtin function was added for creating time stamps. The
473 `mktime' function written in awk was removed from the user's guide.
475 3. New `--gen-po' option creates GNU gettext .po files for strings marked
476 with a leading underscore.
478 4. Gawk now completely interprets special file names internally, ignoring the
479 existence of real /dev/stdin, /dev/stdout files, etc.
481 5. The mmap code was removed. It was a worthwhile experiment that just
484 6. The BINMODE variable is new; on non-UNIX systems it affects how gawk
485 opens files for text vs. binary.
487 7. The atari port is now unsupported.
489 8. Gawk no longer supports `next file' as two words.
491 9. On systems that support it, gawk now sets the `close on exec' flag on all
492 files and pipes it opens. This makes sure that child processes run via
493 `system' or pipes have plenty of file descriptors available.
495 10. New ports: Tandem and BeOS. The Tandem port is unsupported.
497 11. If `--posix' is in effect, newlines are not allowed after ?:.
499 12. Weird OFMT/CONVFMT formats no longer cause fatal errors.
501 13. Diagnostics about array parameters now include the parameter's name,
504 14. configure should now automatically add -D_SYSV3 for ISC Unix.
505 (This seems to have made it into the gawk 3.0.x line long ago.)
507 15. It is now possible to open a two-way pipe via the `|&' operator.
508 See the discussion in the manual about putting `sort' into such a pipeline,
509 though. (NOTE! This is borrowed from ksh: it is not the same as
510 the same operator in csh!)
512 16. The `close' function now takes an optional second string argument
513 that allows closing one or the other end of the two-way pipe to
514 a co-process. This is needed to use `sort' in a co-process, see
517 17. If TCP/IP is available, special file names beginning with `/inet'
518 can be used with `|&' for IPC. Thanks to Juergen Kahrs for the initial
521 18. With `--enable-portals' on the configure command line, gawk will also
522 treat file names that start with `/p/' as a 4.4 BSD type portal file,
523 i.e., a two-way pipe for `|&'.
525 19. Unrecognized escapes, such as "\q" now always generate a warning.
527 20. The LINT variable is new; it provides dynamic control over the --lint
530 21. Lint warnings can be made fatal by using --lint=fatal or `LINT = "fatal"'.
531 Use this if you're really serious about portable code.
533 22. Due to an enhanced sed script, there is no longer any need to worry
534 about finding or using alloca. alloca.c is thus now gone.
536 23. A number of lint warnings have been added. Most notably, gawk will
537 detect if a variable is used before assigned to. Warnings for
538 when a string that isn't a number gets converted to a number are
539 in the code but disabled; they seem to be too picky in practice.
541 Also, gawk will now warn about function parameter names that shadow
542 global variable names.
544 24. It is now possible to dynamically add builtin functions on systems
545 that support dlopen. This facility is not (yet) as portable or well
546 integrated as it might be. *** WARNING *** THIS FEATURE WILL EVOLVE!
548 25. There are *many* new tests in the test suite.
550 26. Profiling has been added! A separate version of gawk, named pgawk, is
551 built and generates a run-time execution profile. The --profile option
552 can be used to change the default output file. In regular gawk, this
553 option pretty-prints the parse tree.
555 27. Gawk has been internationalized, using GNU gettext. Translations for
556 future distributions are most welcome. Simultaneously, gawk was switched
557 over to using automake. You need Automake 1.4a (from the CVS archive)
558 if you want to muck with the Makefile.am files.
560 28. New `asort' function for sorting arrays. See the doc for details.
562 29. The match function takes an optional array third argument to hold
563 the text matched by parenthesized sub-expressions.
565 30. The bit op functions and octal and hex source code constants are on by
566 default, no longer a configure-time option. Recognition of non-decimal
567 data is now enabled at runtime with --non-decimal-data command line option.
569 31. Internationalization features available at the awk level: new TEXTDOMAIN
570 variable and `bindtextdomain' and `dcgettext' functions. printf formats
571 may contain the "%2$3.5d" kind of notation for use in translations. See
572 the texinfo manual for details.
574 32. The return value from `close' has been rationalized. Most notably,
575 closing something that wasn't open returns -1 but remains non-fatal.
577 33. The array effeciency change from 3.0.5 was reverted; the semantics were
578 not right. Additionally, index values of previously stored elements
579 can no longer change dynamically.
581 34. The new option --dump-variables dumps a list of all global variables and
582 their final types and values to a file you give, or to `awkvars.out'.
584 35. Gawk now uses a recent version of random.c courtesy of the FreeBSD
587 36. The gawk source code now uses ANSI C function definitions (new style),
588 with ansi2knr to translate code for old compilers.
590 37. `for (iggy in foo)' loops should be more robust now in the face of
591 adding/deleting elements in the middle; they loop over just the elements
592 that are present in the array when the loop starts.
594 Changes from 3.0.5 to 3.0.6
595 ---------------------------
597 This is a bug fix release only, pending further development on 3.1.0.
599 Bugs fixed and changes made:
601 1. Subscripting an array with a variable that is just a number no
602 longer magically converts the variable into a string.
604 2. Similarly, running a `for (iggy in foo)' loop where `foo' is a
605 function parameter now works correctly.
607 3. Similarly, `i = ""; v[i] = a; if (i in v) ...' now works again.
609 4. Gawk now special cases `for (iggy in foo) delete foo[iggy]' and
610 treats it as the moral equivalent of `delete foo'. This should be
611 a major efficiency win when portably deleting large arrays.
613 5. VMS port brought up to date.
615 Changes from 3.0.4 to 3.0.5
616 ---------------------------
618 This is a bug fix release only, pending further development on 3.1.0.
622 1. `function foo(foo)' is now a fatal error.
624 2. Array indexing is now much more efficient: where possible, only one
625 copy of an index string is kept, even if used in multiple arrays.
627 3. Support was added for MacOS X and an `install-strip' target.
629 4. [s]printf formatting for `0' flag and floating point formats now
632 5. HP-UX large file support with GCC 2.95.1 now works.
634 6. Arguments that contain `=' but that aren't syntactically valid are
635 now treated as filenames, instead of as fatal errors.
637 7. `-v NF=foo' now works.
639 8. Non-ascii alphanumeric characters are now treated as such in the
640 right locales by regex.c. Similarly, a Latin-1 y-umlaut (decimal
641 value 255) in the program text no longer acts like EOF.
643 9. Array indexes are always compared as strings; fixes an obscure bug
644 when user input gets used for the `x in array' test.
646 10. The usage message now points users to the documentation for how
649 11. `/=' now works after an array.
651 12. `b += b += 1' now works correctly.
653 13. IGNORECASE changing with calls `match' now works better. (Fix for
656 14. Multicharacter values for RS now generate a lint warning.
658 15. The gawk open file caching is now much more efficient.
660 16. Global arrays passed to functions are now managed better. In particular,
661 test/arynocls.awk won't crash referencing freed memory.
663 17. In obscure cases, `getline var' can no longer clobber $0.
665 Changes from 3.0.3 to 3.0.4
666 ---------------------------
668 This is a bug fix release only, pending further development on 3.1.0.
672 1. A memory leak when turning a function parameter into an array was
675 2. The non-decimal data option now works correctly.
677 3. Using an empty pair of brackets as an array subscript no longer causes
678 a core dump during parsing. In general, syntax errors should not
679 cause core dumps any more.
681 4. Standard input is no longer closed if it provides program source,
682 avoiding strange I/O problems.
684 5. Memory corruption during printing with `print' has been fixed.
686 6. The gsub function now correctly counts the number of matches.
688 7. A typo in doc/Makefile.in has been fixed, making installation work.
690 8. Calling `next' or `nextfile' from a BEGIN or END rule is now fatal.
692 9. Subtle problems in rebuilding $0 when fields were changed have been
695 10. `FS = FS' now correctly turns off the use of FIELDWIDTHS.
697 11. Gawk now parses fields correctly when FS is a single character.
699 12. It is now possible for RS to be the NUL character ("\0").
701 13. Weird problems with number conversions on MIPS and other systems
704 14. When parsing using FIELDWIDTHS is in effect, `split' with no third
705 argument will still use the value of FS.
707 15. Large File Support for Solaris, HP-UX, AIX, and IRIX is now enabled at
708 compile time, thanks to Paul Eggert.
710 16. Attempting to use the name of a function as a variable or array
711 from within the function is now caught as a fatal error, instead
714 17. A bug in parsing hex escapes was fixed.
716 18. A weird bug with concatenation where one expression has side effects
717 that changes another was fixed.
719 19. printf/sprintf now behave much better for uses of the '0' and '#' flags
720 and with precisions and field widths.
722 20. Further strangenesses with concatenation and multiple accesses of some
723 of the special variables was fixed.
725 21. The Atari port is marked as no longer supported.
727 22. Build problems on HP-UX have been fixed.
729 23. Minor fixes and additional explanations added to the documentation.
731 24. For RS = "", even a single leading newline is now correctly stripped.
733 25. Obscure parsing problems for regex constants like /=.../ fixed, so
734 that a regex constant is recognized, and not the /= operator.
736 26. Fixed a bug when closing a redirection that matched the current
739 27. Build problems on AIX fixed.
741 Changes from 3.0.2 to 3.0.3
742 ---------------------------
744 The horrendous per-record memory leak introduced in 3.0.1 is gone, finally.
746 The `amiga' directory is now gone; Amiga support is now entirely handled
747 by the POSIX support.
749 Windows32 support has been added in the `pc' directory. See `README_d/README.pc'
752 The mmap changes are disabled in io.c, and will be removed entirely
753 in the next big release. They were an interesting experiment that just
754 really didn't work in practice.
756 A minor memory leak that occurred when using `next' from within a
757 function has also been fixed.
759 Problems with I/O from sub-processes via a pipe are now gone.
761 Using "/dev/pid" and the other special /dev files no longer causes a core dump.
763 The files regex.h, regex.c, getopt.h, getopt.c, and getopt1.c have been
764 merged with the versions in GNU libc. Thanks to Ulrich Drepper for his help.
766 Some new undocumented features have been added. Use the source, Luke!
767 It is not clear yet whether these will ever be fully supported.
769 Array performance should be much better for very very large arrays. "Virtual
770 memory required, real memory helpful."
772 builtin.c:do_substr rationalized, again.
774 The --re-interval option now works as advertised.
776 The license text on some of the missing/* files is now generic.
778 Lots more new test cases.
780 Lots of other small bugs fixed, see the ChangeLog files for details.
782 Changes from 3.0.1 to 3.0.2
783 ---------------------------
785 Gawk now uses autoconf 2.12.
787 strftime now behaves correctly if passed an empty format string or if
788 the string formats to an empty result string.
790 Several minor compilation and installation problems have been fixed.
792 Minor page break issues in the user's guide have been fixed.
794 Lexical errors no longer repeat ad infinitum.
796 Changes from 3.0.0 to 3.0.1
797 ---------------------------
799 Troff source for a handy-dandy five color reference card is now provided.
800 Thanks to SSC for their macros.
802 Gawk now behaves like Unix awk and mawk, in that newline acts as white
803 space for separating fields and for `split', by default. In posix mode,
804 only space and tab separate fields. The documentation has been updated to
807 Tons and tons of small bugs fixed and new tests added, see the ChangeLogs.
809 Lots fewer compile time warnings from gcc -Wall. Remaining ones aren't
812 Gawk now pays some attention to the locale settings.
814 Fixes to gsub to catch several corner cases.
816 The `print' statement now evaluates all expressions first, and then
817 prints them. This leads to less suprising behaviour if any expression has
820 Miscellanious improvements in regex.h and regex.c.
822 Gawk will now install itself as gawk-M.N.P in $(bindir), and link
823 `gawk' to it. This makes it easy to have multiple versions of gawk
824 simultaneously. It will also now install itself as `awk' in $(bindir)
825 if there is no `awk' there. This is in addition to installing itself as
826 `gawk'. This change benefits the Hurd, and possibly other systems. One
827 day, gawk will drop the `g', but not yet.
829 `--posix' turns on interval expressions. Gawk now matches its documentation.
831 `close(FILENAME)' now does something meaningful.
833 Field management code in field.c majorly overhauled, several times.
835 The gensub code has been fixed, several bugs are now gone.
837 Gawk will use mmap for data file input if it is available.
839 The printf/sprintf code has been improved.
841 Minor issues in Makefile setup worked on and improved.
843 builtin.c:do_substr rationalized.
845 Regex matching fixed so that /+[0-9]/ now matches the leading +.
847 For building on vms, the default compiler is now DEC C rather than VAX C.
849 Changes from 2.15.6 to 3.0.0
850 ----------------------------
852 Fixed spelling of `Programming' in the copyright notice in all the files.
854 New --re-interval option to turn on interval expressions. They're off
855 by default, except for --posix, to avoid breaking old programs.
857 Passing regexp constants as parameters to user defined functions now
858 generates a lint warning.
860 Several obscure regexp bugs fixed; alas, a small number remain.
862 The manual has been thoroughly revised. It's now almost 50% bigger than
865 The `+' modifier in printf is now reset correctly for each item.
867 The do_unix variable is now named do_traditional.
869 Handling of \ in sub and gsub rationalized (somewhat, see the manual for
870 the gory [and I do mean gory] details).
872 IGNORECASE now uses ISO 8859-1 Latin-1 instead of straight ASCII. See the
873 source for how to revert to pure ASCII.
875 --lint will now warn if an assignment occurs in a conditional context.
876 This may become obnoxious enough to need turning off in the future, but
877 "it seemed like a good idea at the time."
879 %hf and %Lf are now diagnosed as invalid in printf, just like %lf.
881 Gawk no longer incorrectly closes stdin in child processes used in
884 For integer formats, gawk now correctly treats the precision as the
885 number of digits to print, not the number of characters.
887 gawk is now much better at catching the use of scalar values when
888 arrays are needed, both in function calls and the `x in y' constructs.
890 New gensub function added. See the manual.
892 If do_tradtional is true, octal and hex escapes in regexp constants are
893 treated literally. This matches historical behavior.
895 yylex/nextc fixed so that even null characters can be included
898 do_format now handles cases where a format specifier doesn't end in
899 a control letter. --lint reports an error.
901 strftime() now uses a default time format equivalent to that of the
902 Unix date command, thus it can be called with no arguments.
904 Gawk now catches functions that are used but not defined at parse time
905 instead of at run time. (This is a lint error, making it fatal could break
908 Arrays that max out are now handled correctly.
910 Integer formats outside the range of an unsigned long are now detected
911 correctly using the SunOS 4.x cc compiler.
913 --traditional option added as new preferred name for --compat, in keeping
916 --lint-old option added, so that warnings about things not in old awk
917 are only given if explicitly asked for.
919 `next file' has changed to one word, `nextfile'. `next file' is still
920 accepted but generates a lint warning. `next file' will go away eventually.
922 Gawk with --lint will now notice empty source files and empty data files.
924 Amiga support using the Unix emulation added. Thanks to fnf@ninemoons.com.
926 test/Makefile is now "parallel-make safe".
928 Gawk now uses POSIX regexps + GNU regex ops by default. --posix goes to
929 pure posix regexps, and --compat goes to traditional Unix regexps. However,
930 interval expressions, even though specified by POSIX, are turned off by
931 default, to avoid breaking old code.
933 IGNORECASE now applies to string comparison as well as regexp operations.
935 The AT&T Bell Labs Research awk fflush builtin function is now supported.
936 fflush is extended to flush stdout if no arg and everything if given
937 the null string as an argument.
939 If RS is more than one character, it is treated as a regular expression
940 and records are delimited accordingly. The variable RT is set to the record
941 terminator string. This is disabled in compatibility mode.
943 If FS is set to the null string (or the third arg. of split() is the null
944 string), splitting is done at every single character. This is disabled in
947 Gawk now uses the Autoconf generated configure script, doing away with all
948 the config/* files and the machinery that went with them. The Makefile.in
949 has also changed accordingly, complete with all the standard GNU Makefile
950 targets. (Non-unix systems may still have their own config.h and Makefile;
951 see the appropriate README_d/README.* and/or subdirectory.)
953 The source code has been cleaned up somewhat and the formatting improved.
955 Changes from 2.15.5 to 2.15.6
956 -----------------------------
958 Copyrights updated on all changed files.
960 test directory enhanced with four new tests.
962 Gawk now generates a warning for \x without following hexadecimal digits.
963 In this case, it returns 'x', not \0.
965 Several fixes in main.c related to variable initialization:
966 CONVFMT has a default value
967 resetup is called before initializing variables
968 the varinit table fixed up a bit (see the comments)
970 gawk.1 updated with new BUG REPORTS section.
972 A plain `print' inside a BEGIN or END now generates a lint warning (awk.y).
974 Small fix in iop.c:get_a_record to avoid reading uninitialized memory.
976 awk.y:yylex now does a better job of handling things if the source file
977 does not end in a newline. Probably there is more work to be done.
979 Memory leaks fixed in awk.y, particularly in cases of duplicate function
980 parameters. Also, calling a function doesn't leak memory during parsing.
982 Empty function bodies are now allowed (awk.y).
984 Gawk now detects duplicate parameter names in functions (awk.y).
986 New function `error' in msg.c added for use from awk.y.
988 eval.c:r_get_lhs now checks if its argument is a parameter on the stack,
989 and pulls down the real variable. This catches more 'using an array as
990 a scalar' kinds of errors.
992 main.c recovers C alloca space after parsing, this is important for
993 bison-based parsers. re.c recovers C alloca space after doing an research.
994 [Changes from Pat Rankin]
996 builtin.c now declares the random() related functions based on
997 RANDOM_MISSING from config.h. [Suggested by Pat Rankin]
999 awk.h now handles alloca correctly for HP-UX. [Kaveh Ghazi]
1001 regex.h and config/cray60 updated for Unicos 8.0. [Hal Peterson]
1003 Fixed re.c and dfa.c so that gawk no longer leaks memory when using
1004 lots of dynamic regexps.
1006 Removed dependency on signed chars from `idx' variable in awk.h. Gawk
1007 now passes its test suite if compiled with `gcc -fno-signed-char'.
1009 Fixed warning on close in io.c to go under lint control. Too many people
1010 have complained about the spurious message, particularly when closing a
1011 child pipeline early.
1013 Gawk now correctly handles RS = "" when input is from a terminal
1014 (iop.c:get_a_record).
1016 Config file added for GNU.
1018 gawk 'BEGIN { exit 1 } ; END { exit }' now exits 1, as it should
1021 sub and gsub now follow posix, \ escapes both & and \. Each \ must
1022 be doubled initially in the program to get it into the string.
1023 Thanks to Mike Brennan for pointing this out (builtin.c:sub_common).
1025 If FS is "", gawk behaves like mawk and nawk, making the whole record be $1.
1026 Yet Another Dark Corner. Sigh (field.c:def_parse_field).
1028 Gawk now correctly recomputes string values for numbers if CONVFMT has
1029 changed (awk.h:force_string, node.c:r_force_string).
1031 A regexp of the form `/* this looks like a comment but is not */' will
1032 now generate a warning from --lint (awk.y).
1034 Gawk will no longer core dump if given an empty input file (awk.y:get_src_buf,
1035 iop.c:optimal_bufsize).
1037 A printf format of the form %lf is handled correctly. The `l' generates
1038 a lint warning (builtin.c:format_tree) [Thanks to Mark Moraes].
1040 Lynxos config file added.
1042 `continue' outside a loop treated as `next' only in compatibility mode,
1043 instead of by default; recent att nawk chokes on this now. `break'
1044 outside a loop now treated as `next' in compatibility mode (eval.c).
1046 Bug fix in string concatenation, an arbitrary number of expressions
1047 are allowed (eval.c).
1049 $1 += $2 now works correctly (eval.c).
1051 Changing IGNORECASE no longer resets field-splitting to FS if it was
1052 using FIELDWIDTHS (eval.c, field.c).
1054 Major enhancement: $0 and NF for last record read are now preserved
1055 into the END rule (io.c).
1058 /./ now matches a newline (regex.h)
1059 ^ and $ match beginning and end of string only, not any embedded
1061 regex.c should compile and work ok on 64-bit mips/sgi machines
1063 Changes from 2.15.4 to 2.15.5
1064 -----------------------------
1066 FUTURES file updated and re-arranged some with more rational schedule.
1068 Many prototypes handled better for ANSI C in protos.h.
1070 getopt.c updated somewhat.
1072 test/Makefile now removes junk directory, `bardargtest' renamed `badargs.'
1074 Bug fix in iop.c for RS = "". Eat trailing newlines off of record separator.
1076 Bug fix in Makefile.bsd44, use leading tab in actions.
1078 Fix in field.c:set_FS for FS == "\\" and IGNORECASE != 0.
1080 Config files updated or added:
1081 cray60, DEC OSF/1 2.0, Utek, sgi405, next21, next30, atari/config.h,
1084 Fix in io.c for ENFILE as well as EMFILE, update decl of groupset to
1087 Rationalized printing as integers if numbers are outside the range of a long.
1088 Changes to node.c:force_string and builtin.c.
1090 Made internal NF, NR, and FNR variables longs instead of ints.
1092 Add LIMITS_H_MISSING stuff to config.in and awk.h, and default defs for
1093 INT_MAX and LONG_MAX, if no limits.h file. Add a standard decl of
1094 the time() function for __STDC__. From ghazi@noc.rutgers.edu.
1096 Fix tree_eval in awk.h and r_tree_eval in eval.c to deal better with
1097 function parameters, particularly ones that are arrays.
1099 Fix eval.c to print out array names of arrays used in scalar contexts.
1101 Fix eval.c in interpret to zero out source and sourceline initially. This
1102 does a better job of providing source file and line number information.
1104 Fix to re_parse_field in field.c to not use isspace when RS = "", but rather
1105 to explicitly look for blank and tab.
1107 Fix to sc_parse_field in field.c to catch the case of the FS character at the
1110 Lots of miscellanious bug fixes for memory leaks, courtesy Mark Moraes,
1111 also fixes for arrays.
1113 io.c fixed to warn about lack of explicit closes if --lint.
1115 Updated missing/strftime.c to match posted strftime 6.2.
1117 Bug fix in builtin.c, in case of non-match in sub_common.
1119 Updated constant used for division in builtin.c:do_rand for DEC Alpha
1122 POSIXLY_CORRECT in the environment turns on --posix (fixed in main.c).
1124 Updated srandom prototype and calls in builtin.c.
1126 Fix awk.y to enforce posix semantics of unary +: result is numeric.
1128 Fix array.c to not rearrange the hash chain upon finding an index in
1129 the array. This messed things up in cases like:
1130 for (index1 in array) {
1132 if (index2 in array) # blew away the for
1136 Fixed spelling errors in the man page.
1138 Fixes in awk.y so that
1139 gawk '' /path/to/file
1140 will work without core dumping or finding parse errors.
1142 Fix main.c so that --lint will fuss about an empty program.
1143 Yet another fix for argument parsing in the case of unrecognized options.
1145 Bug fix in dfa.c to not attempt to free null pointers.
1147 Bug fix in builtin.c to only use DEFAULT_G_PRECISION for %g or %G.
1149 Bug fix in field.c to achieve call by value semantics for split.
1151 Changes from 2.15.3 to 2.15.4
1152 -----------------------------
1154 Lots of lint fixes, and do_sprintf made mostly ANSI C compatible.
1156 Man page updated and edited.
1160 Arrays now grow dynamically, initially scaling up by an order of magnitude
1161 and then doubling, up to ~ 64K. This should keep gawk's performance
1162 graceful under heavy load.
1164 New `delete array' feature added. Only documented in the man page.
1166 Switched to dfa and regex suites from grep-2.0. These offer the ability to
1167 move to POSIX regexps in the next release.
1169 Disabled GNU regex ops.
1171 Research awk -m option now recognized. It does nothing in gawk, since gawk
1172 has no static limits. Only documented in the man page.
1174 New bionic (faster, better, stronger than before) hashing function.
1176 Bug fix in argument handling. `gawk -X' now notices there was no program.
1177 Additional bug fixes to make --compat and --lint work again.
1179 Many changes for systems where sizeof(int) != sizeof(void *).
1181 Add explicit alloca(0) in io.c to recover space from C alloca.
1183 Fixed file descriptor leak in io.c.
1185 The --version option now follows the GNU coding standards and exits.
1187 Fixed several prototypes in protos.h.
1189 Several tests updated. On Solaris, warn that the out? tests will fail.
1191 Configuration files for SunOS with cc and Solaris 2.x added.
1193 Improved error messages in awk.y on gawk extensions if do_unix or do_compat.
1197 Fixed Atari Makefile and several VMS specific changes.
1199 Better conversion of numbers to strings on systems with broken sprintfs.
1201 Changes from 2.15.2 to 2.15.3
1202 -----------------------------
1204 Increased HASHSIZE to a decent number, 127 was way too small.
1206 FILENAME is now the null string in a BEGIN rule.
1208 Argument processing fixed for invalid options and missing arguments.
1210 This version will build on VMS. This included a fix to close all files
1211 and pipes opened with redirections before closing stdout and stderr.
1213 More getpgrp() defines.
1215 Changes for BSD44: <sys/param.h> in io.c and Makefile.bsd44.
1217 All directories in the distribution are now writable.
1219 Separated LDFLAGS and CFLAGS in Makefile. CFLAGS can now be overridden by
1222 Make dist now builds compressed archives ending in .gz and runs doschk.
1226 New getopt.c fixes Alpha OSF/1 problem.
1228 Make clean now removes possible test output.
1230 Improved algorithm for multiple adjacent string concatenations leads to
1231 performance improvements.
1233 Fix nasty bug whereby command-line assignments, both with -v and at run time,
1234 could create variables with syntactically illegal names.
1236 Fix obscure bug in printf with %0 flag and filling.
1238 Add a lint check for substr if provided length exceeds remaining characters
1241 Update atari support.
1243 PC support enhanced to include support for both DOS and OS/2. (Lots more
1246 Config files for Hitachi Unix and OSF/1, courtesy of Yoko Morishita
1247 (morisita@sra.co.jp)
1249 Changes from 2.15.1 to 2.15.2
1250 -----------------------------
1252 Additions to the FUTURES file.
1254 Document undefined order of output when using both standard output
1255 and /dev/stdout or any of the /dev output files that gawk emulates in
1256 the absence of OS support.
1258 Clean up the distribution generation in Makefile.in: the info files are
1259 now included, the distributed files are marked read-only and patched
1260 distributions are now unpacked in a directory named with the patch level.
1262 Changes from 2.15 to 2.15.1
1263 ---------------------------
1265 Close stdout and stderr before all redirections on program exit. This allows
1266 detection of write errors and also fixes the messages test on Solaris 2.x.
1268 Removed YYMAXDEPTH define in awk.y which was limiting the parser stack depth.
1270 Changes to config/bsd44, Makefile.bsd44 and configure to bring it into line
1271 with the BSD4.4 release.
1273 Changed Makefile to use prefix, exec_prefix, bindir etc.
1275 make install now installs info files.
1277 make install now sets permissions on installed files.
1279 Make targets added: uninstall, distclean, mostlyclean and realclean.
1281 Added config.h to cleaner and clobber make targets.
1283 Changes to config/{hpux8x,sysv3,sysv4,ultrix41} to deal with alloca().
1285 Change to getopt.h for portability.
1287 Added more special cases to the getpgrp() call.
1289 Added README.ibmrt-aos and config/ibmrt-aos.
1291 Changes from 2.14 to 2.15
1292 ---------------------------
1294 Command-line source can now be mixed with library functions.
1296 ARGIND variable tracks index in ARGV of FILENAME.
1298 GNU style long options in addition to short options.
1300 Plan 9 style special files interpreted by gawk:
1309 $5 ... $NF = getgroups if supported
1311 ERRNO variable contains error string if getline or close fails.
1313 Very old options -a and -e have gone away.
1315 Inftest has been removed from the default target in test/Makefile -- the
1316 results were too machine specific and resulted in too many false alarms.
1318 A README.amiga has been added.
1320 The "too many arguments supplied for format string" warning message is only
1321 in effect under the lint option.
1323 Code improvements in dfa.c.
1325 Fixed all reported bugs:
1327 Writes are checked for failure (such as full filesystem).
1329 Stopped (at least some) runaway error messages.
1331 gsub(/^/, "x") does the right thing for $0 of 0, 1, or more length.
1333 close() on a command being piped to a getline now works properly.
1335 The input record will no longer be freed upon an explicit close()
1338 A NUL character in FS now works.
1340 In a substitute, \\& now means a literal backslash followed by what
1343 Integer overflow of substring length in substr() is caught.
1345 An input record without a newline termination is handled properly.
1347 In io.c, check is against only EMFILE so that system file table
1350 Renamed all files with names longer than 14 characters.
1352 Escaped characters in regular expressions were being lost when
1353 IGNORECASE was used.
1355 Long source lines were not being handled properly.
1357 Sourcefiles that ended in a tab but no newline were bombing.
1359 Patterns that could match zero characters in split() were not working
1362 The parsedebug option was not working.
1364 The grammar was being a bit too lenient, allowing some very dubious
1367 Compilation with DEBUG defined now works.
1369 A variable read in with getline was not being treated as a potential
1372 Array subscripts were not always of string type.
1375 Changes from 2.13.2 to 2.14
1376 ---------------------------
1380 Added "next file" to skip efficiently to the next input file.
1382 Fixed potential of overflowing buffer in do_sprintf().
1384 Plugged small memory leak in sub_common().
1386 EOF on a redirect is now "sticky" -- it can only be cleared by close()ing
1389 Now works if used via a #! /bin/gawk line at the top of an executable file
1390 when that line ends with whitespace.
1392 Added some checks to the grammar to catch redefinition of builtin functions.
1393 This could eventually be the basis for an extension to allow redefining
1394 functions, but in the mean time it's a good error catching facility.
1396 Negative integer exponents now work.
1398 Modified do_system() to make sure it had a non-null string to be passed
1399 to system(3). Thus, system("") will flush any pending output but not go
1400 through the overhead of forking an un-needed shell.
1402 A fix to floating point comparisons so that NaNs compare right on IEEE systems.
1404 Added code to make sure we're not opening directories for reading and such.
1406 Added code to do better diagnoses of weird or null file names.
1408 Allow continue outside of a loop, unless in strict posix mode. Lint option
1411 New missing/strftime.c. There has been one change that affects gawk. Posix
1412 now defines a %V conversion so the vms conversion has been changed to %v.
1413 If this version is used with gawk -Wlint and they use %V in a call to
1414 strftime, they'll get a warning.
1416 Error messages now conform to GNU standard (I hope).
1418 Changed comparisons to conform to the description found in the file POSIX.
1419 This is inconsistent with the current POSIX draft, but that is broken.
1420 Hopefully the final POSIX standard will conform to this version.
1421 (Alas, this will have to wait for 1003.2b, which will be a revision to
1422 the 1003.2 standard. That standard has been frozen with the broken
1425 The length of a string was a short and now is a size_t.
1429 Added quite a few new tests to the test suite and deleted many due to lack of
1430 written releases. Test output is only removed if it is identical to the
1433 Fixed a couple of bugs for reference to $0 when $0 is "" -- particularly in
1436 Fixed premature freeing in construct "$0 = $0".
1438 Removed the call to wait_any() in gawk_popen(), since on at least some systems,
1439 if gawk's input was from a pipe, the predecessor process in the pipe was a
1440 child of gawk and this caused a deadlock.
1442 Regexp can (once again) match a newline, if given explicitly.
1444 nextopen() makes sure file name is null terminated.
1446 Fixed VMS pipe simulation. Improved VMS I/O performance.
1448 Catch . used in variable names.
1450 Fixed bug in getline without redirect from a file -- it was quitting after the
1451 first EOF, rather than trying the next file.
1453 Fixed bug in treatment of backslash at the end of a string -- it was bombing
1454 rather than doing something sensible. It is not clear what this should mean,
1455 but for now I issue a warning and take it as a literal backslash.
1457 Moved setting of regexp syntax to before the option parsing in main(), to
1458 handle things like -v FS='[.,;]'
1460 Fixed bug when NF is set by user -- fields_arr must be expanded if necessary
1461 and "new" fields must be initialized.
1463 Fixed several bugs in [g]sub() for no match found or the match is 0-length.
1465 Fixed bug where in gsub() a pattern anchored at the beginning would still
1466 substitute throughout the string.
1468 make test does not assume that . is in PATH.
1470 Fixed bug when a field beyond the end of the record was requested after
1471 $0 was altered (directly or indirectly).
1473 Fixed bug for assignment to field beyond end of record -- the assigned value
1474 was not found on subsequent reference to that field.
1476 Fixed bug for FS a regexp and it matches at the end of a record.
1478 Fixed memory leak for an array local to a function.
1480 Fixed hanging of pipe redirection to getline
1482 Fixed coredump on access to $0 inside BEGIN block.
1484 Fixed treatment of RS = "". It now parses the fields correctly and strips
1485 leading whitespace from a record if FS is a space.
1487 Fixed faking of /dev/stdin.
1489 Fixed problem with x += x
1491 Use of scalar as array and vice versa is now detected.
1493 IGNORECASE now obeyed for FS (even if FS is a single alphabetic character).
1495 Switch to GPL version 2.
1497 Renamed awk.tab.c to awktab.c for MSDOS and VMS tar programs.
1499 Renamed this file (CHANGES) to NEWS.
1501 Use fmod() instead of modf() and provide FMOD_MISSING #define to undo
1504 Correct the volatile declarations in eval.c.
1506 Avoid errant closing of the file descriptors for stdin, stdout and stderr.
1508 Be more flexible about where semi-colons can occur in programs.
1510 Check for write errors on all output, not just on close().
1512 Eliminate the need for missing/{strtol.c,vprintf.c}.
1514 Use GNU getopt and eliminate missing/getopt.c.
1516 More "lint" checking.
1519 Changes from 2.13.1 to 2.13.2
1520 -----------------------------
1522 Toward conformity with GNU standards, configure is a link to mkconf, the latter
1523 to disappear in the next major release.
1525 Update to config/bsd43.
1527 Added config/apollo, config/msc60, config/cray2-50, config/interactive2.2
1529 sgi33.cc added for compilation using cc rather than gcc.
1531 Ultrix41 now propagates to config.h properly -- as part of a general
1532 mechanism in configure for kludges -- #define anything from a config file
1533 just gets tacked onto the end of config.h -- to be used sparingly.
1535 Got rid of an unnecessary and troublesome declaration of vprintf().
1537 Small improvement in locality of error messages.
1539 Try to diagnose use of array as scalar and vice versa -- to be improved in
1542 Fix for last bug fix for Cray division code--sigh.
1544 More changes to test suite to explicitly use sh. Also get rid of
1545 a few generated files.
1547 Fixed off-by-one bug in string concatenation code.
1549 Fix for use of array that is passed in from a previous function parameter.
1550 Addition to test suite for above.
1552 A number of changes associated with changing NF and access to fields
1553 beyond the end of the current record.
1555 Change to missing/memcmp.c to avoid seg. fault on zero length input.
1557 Updates to test suite (including some inadvertently left out of the last patch)
1558 to invoke sh explicitly (rather than rely on #!/bin/sh) and remove some
1559 junk files. test/chem/good updated to correspond to bug fixes.
1561 Changes from 2.13.0 to 2.13.1
1562 -----------------------------
1564 More configs and PORTS.
1566 Fixed bug wherein a simple division produced an erroneous FPE, caused by
1567 the Cray division workaround -- that code is now #ifdef'd only for
1570 Fixed bug in modulus implementation -- it was very close to the above
1571 code, so I noticed it.
1573 Fixed portability problem with limits.h in missing.c
1575 Fixed portability problem with tzname and daylight -- define TZNAME_MISSING
1576 if strftime() is missing and tzname is also.
1578 Better support for Latin-1 character set.
1580 Fixed portability problem in test Makefile.
1582 Updated PROBLEMS file.
1584 =============================== gawk-2.13 released =========================
1585 Changes from 2.12.42 to 2.12.43
1586 -------------------------------
1590 Fixed up strftime.3 and added doc. for %V.
1592 Changes from 2.12.41 to 2.12.42
1593 -------------------------------
1595 Fixed bug in devopen() -- if you had write permission in /dev,
1596 it would just create /dev/stdout etc.!!
1598 Final (?) VMS update.
1600 Make NeXT use GFMT_WORKAROUND
1602 Fixed bug in sub_common() for substitute on zero-length match. Improved the
1603 code a bit while I was at it.
1605 Fixed grammar so that $i++ parses as ($i)++
1607 Put support/* back in the distribution (didn't I already do this?!)
1609 Changes from 2.12.40 to 2.12.41
1610 -------------------------------
1612 VMS workaround for broken %g format.
1614 Changes from 2.12.39 to 2.12.40
1615 -------------------------------
1617 Minor man page update.
1619 Fixed latent bug in redirect().
1621 Changes from 2.12.38 to 2.12.39
1622 -------------------------------
1624 Updates to test suite -- remove dependence on changing gawk.1 man page.
1626 Changes from 2.12.37 to 2.12.38
1627 -------------------------------
1629 Fixed bug in use of *= without whitespace following.
1633 Updates to man page.
1635 Option handling updates in main.c
1637 test/manyfiles redone and added to bigtest.
1639 Fixed latent (on Sun) bug in handling of save_fs.
1641 Changes from 2.12.36 to 2.12.37
1642 -------------------------------
1644 Update REL in Makefile-dist. Incorporate test suite into main distribution.
1646 Minor fix in regtest.
1648 Changes from 2.12.35 to 2.12.36
1649 -------------------------------
1651 Release takes on dual personality -- 2.12.36 and 2.13.0 -- any further
1652 patches before public release won't count for 2.13, although they will for
1653 2.12 -- be careful to avoid confusion! patchlevel.h will be the last thing
1656 Cray updates to deal with arithmetic problems.
1658 Minor test suite updates.
1660 Fixed latent bug in parser (freeing memory).
1662 Changes from 2.12.34 to 2.12.35
1663 -------------------------------
1667 Flush stdout at top of err() and stderr at bottom.
1669 Fixed bug in eval_condition() -- it wasn't testing for MAYBE_NUM and
1670 doing the force_number().
1672 Included the missing manyfiles.awk and a new test to catch the above bug which
1673 I am amazed wasn't already caught by the test suite -- it's pretty basic.
1675 Changes from 2.12.33 to 2.12.34
1676 -------------------------------
1678 Atari updates -- including bug fix.
1680 More VMS updates -- also nuke vms/version.com.
1682 Fixed bug in handling of large numbers of redirections -- it was probably never
1683 tested before (blush!).
1685 Minor rearrangement of code in r_force_number().
1687 Made chem and regtest tests a bit more portable (Ultrix again).
1689 Added another test -- manyfiles -- not invoked under any other test -- very Unix
1692 Rough beginning of LIMITATIONS file -- need my AWK book to complete it.
1694 Changes from 2.12.32 to 2.12.33
1695 -------------------------------
1697 Expunge debug.? from various files.
1699 Remove vestiges of Floor and Ceil kludge.
1701 Special case integer division -- mainly for Cray, but maybe someone else
1704 Workaround for iop_close closing an output pipe descriptor on Cray --
1705 not conditional since I think it may fix a bug on SGI as well and I don't
1706 think it can hurt elsewhere.
1708 Fixed memory leak in assoc_lookup().
1710 Small cleanup in test suite.
1712 Changes from 2.12.31 to 2.12.32
1713 -------------------------------
1715 Nuked debug.c and debugging flag -- there are better ways.
1717 Nuked version.sh and version.c in subdirectories.
1719 Fixed bug in handling of IGNORECASE.
1721 Fixed bug when FIELDWIDTHS was set via -v option.
1723 Fixed (obscure) bug when $0 is assigned a numerical value.
1725 Fixed so that escape sequences in command-line assignments work (as it already
1726 said in the comment).
1728 Added a few cases to test suite.
1730 Moved support/* back into distribution.
1734 Changes from 2.12.30 to 2.12.31
1735 -------------------------------
1737 Cosmetic manual page changes.
1739 Updated sunos3 config.
1741 Small changes in test suite including renaming files over 14 chars. in length.
1743 Changes from 2.12.29 to 2.12.30
1744 -------------------------------
1746 Bug fix for many string concatenations in a row.
1748 Changes from 2.12.28 to 2.12.29
1749 -------------------------------
1751 Minor cleanup in awk.y
1757 Changes from 2.12.27 to 2.12.28
1758 -------------------------------
1760 Got rid of the debugging goop in eval.c -- there are better ways.
1764 VMS changes left out of the last patch -- sigh! config/vms.h renamed
1765 to config/vms-conf.h.
1767 Fixed missing/tzset.c
1769 Removed use of gcvt() and GCVT_MISSING -- turns out it was no faster than
1770 sprintf("%g") and caused all sorts of portability headaches.
1772 Tuned get_field() -- it was unnecessarily parsing the whole record on reference
1775 Tuned interpret() a bit in the rule_node loop.
1777 In r_force_number(), worked around bug in Uglix strtod() and got rid of
1778 ugly do{}while(0) at Michal's urging.
1780 Replaced do_deref() and deref with unref(node) -- much cleaner and a bit faster.
1782 Got rid of assign_number() -- contrary to comment, it was no faster than
1783 just making a new node and freeing the old one.
1785 Replaced make_number() and tmp_number() with macros that call mk_number().
1787 Changed freenode() and newnode() into macros -- the latter is getnode()
1788 which calls more_nodes() as necessary.
1790 Changes from 2.12.26 to 2.12.27
1791 -------------------------------
1793 Completion of Cray 2 port (includes a kludge for floor() and ceil()
1794 that may go or be changed -- I think that it may just be working around
1795 a bug in chem that is being tweaked on the Cray).
1799 Moved kludge over yacc's insertion of malloc and realloc declarations
1800 from protos.h to the Makefile.
1802 Added a lisp interpreter in awk to the test suite. (Invoked under
1805 Cleanup in r_force_number() -- I had never gotten around to a thorough
1806 profile of the cache code and it turns out to be not worth it.
1808 Performance boost -- do lazy force_number()'ing for fields etc. i.e.
1809 flag them (MAYBE_NUM) and call force_number only as necessary.
1811 Changes from 2.12.25 to 2.12.26
1812 -------------------------------
1814 Rework of regexp stuff so that dynamic regexps have reasonable
1815 performance -- string used for compiled regexp is stored and
1816 compared to new string -- if same, no recompilation is necessary.
1817 Also, very dynamic regexps cause dfa-based searching to be turned
1820 Code in dev_open() is back to returning fileno(std*) rather than
1821 dup()ing it. This will be documented. Sorry for the run-around
1824 Minor atari updates.
1828 Missing file from MSDOS port.
1830 Added warning (under lint) if third arg. of [g]sub is a constant and
1831 handle it properly in the code (i.e. return how many matches).
1833 Changes from 2.12.24 to 2.12.25
1834 -------------------------------
1838 Non-consequential changes to regexp variables in preparation for
1839 a more serious change to fix a serious performance problem.
1841 Changes from 2.12.23 to 2.12.24
1842 -------------------------------
1844 Fixed bug in output flushing introduced a few patches back. This caused
1845 serious performance losses.
1847 Changes from 2.12.22 to 2.12.23
1848 -------------------------------
1850 Accidentally left config/cray2-60 out of last patch.
1852 Added some missing dependencies to Makefile.
1854 Cleaned up mkconf a bit; made yacc the default parser (no alloca needed,
1855 right?); added rs6000 hook for signed characters.
1857 Made regex.c with NO_ALLOCA undefined work.
1859 Fixed bug in dfa.c for systems where free(NULL) bombs.
1861 Deleted a few cant_happen()'s that *really* can't hapen.
1863 Changes from 2.12.21 to 2.12.22
1864 -------------------------------
1866 Added to config stuff the ability to choose YACC rather than bison.
1868 Fixed CHAR_UNSIGNED in config.h-dist.
1870 Second arg. of strtod() is char ** rather than const char **.
1872 stackb is now initially malloc()'ed since it may be realloc()'ed.
1876 Added SIZE_T_MISSING to config stuff and a default typedef to awk.h.
1877 (Maybe it is not needed on any current systems??)
1879 re_compile_pattern()'s size is now size_t unconditionally.
1881 Changes from 2.12.20 to 2.12.21
1882 -------------------------------
1884 Corrected missing/gcvt.c.
1886 Got rid of use of dup2() and thus DUP_MISSING.
1888 Updated config/sgi33.
1890 Turned on (and fixed) in cmp_nodes() the behaviour that I *hope* will be in
1891 POSIX 1003.2 for relational comparisons.
1893 Small updates to test suite.
1895 Changes from 2.12.19 to 2.12.20
1896 -------------------------------
1898 Sloppy, sloppy, sloppy!! I didn't even try to compile the last two
1899 patches. This one fixes goofs in regex.c.
1901 Changes from 2.12.18 to 2.12.19
1902 -------------------------------
1904 Cleanup of last patch.
1906 Changes from 2.12.17 to 2.12.18
1907 -------------------------------
1909 Makefile renamed to Makefile-dist.
1911 Added alloca() configuration to mkconf. (A bit kludgey.) Just
1912 add a single line containing ALLOCA_PW, ALLOCA_S or ALLOCA_C
1913 to the appropriate config file to have Makefile-dist edited
1916 Reorganized output flushing to correspond with new semantics of
1917 devopen() on "/dev/std*" etc.
1919 Fixed rest of last goof!!
1921 Save and restore errno in do_pathopen().
1923 Miscellaneous atari updates.
1925 Get rid of the trailing comma in the NODETYPE definition (Cray
1926 compiler won't take it).
1928 Try to make the use of `const' consistent since Cray compiler is
1929 fussy about that. See the changes to `basename' and `myname'.
1931 It turns out that, according to section 3.8.3 (Macro Replacement)
1932 of the ANSI Standard: ``If there are sequences of preprocessing
1933 tokens within the list of arguments that would otherwise act as
1934 preprocessing directives, the behavior is undefined.'' That means
1935 that you cannot count on the behavior of the declaration of
1936 re_compile_pattern in awk.h, and indeed the Cray compiler chokes on it.
1938 Replaced alloca with malloc/realloc/free in regex.c. It was much simpler
1939 than expected. (Inside NO_ALLOCA for now -- by default no alloca.)
1941 Added a configuration file, config/cray60, for Unicos-6.0.
1943 Changes from 2.12.16 to 2.12.17
1944 -------------------------------
1946 Ooops. Goofed signal use in last patch.
1948 Changes from 2.12.15 to 2.12.16
1949 -------------------------------
1951 RENAMED *_dir to just * (e.g. missing_dir).
1953 Numerous VMS changes.
1955 Proper inclusion of atari and vms files.
1957 Added experimental (ifdef'd out) RELAXED_CONTINUATION and DEFAULT_FILETYPE
1958 -- please comment on these!
1960 Moved pathopen() to io.c (sigh).
1962 Put local directory ahead in default AWKPATH.
1964 Added facility in mkconf to echo comments on stdout: lines beginning
1965 with "#echo " will have the remainder of the line echoed when mkconf is run.
1966 Any lines starting with "#" will otherwise be treated as comments. The
1967 intent is to be able to say:
1968 "#echo Make sure you uncomment alloca.c in the Makefile"
1971 Prototype fix for V.4
1973 Fixed version_string to not print leading @(#).
1975 Fixed FIELDWIDTHS to work with strict (turned out to be easy).
1979 Changed semantics of /dev/fd/n to be like on real /dev/fd.
1981 Several configuration and updates in the makefile.
1985 Include tzset.c and system.c from missing_dir that were accidently left out of
1988 Fixed bug in cmdline variable assignment -- arg was getting freed(!) in
1991 Backed out of parse-time constant folding for now, until I can figure out
1994 Fixed devopen() so that getline <"-" works.
1996 Changes from 2.12.14 to 2.12.15
1997 -------------------------------
1999 Changed config/* to a condensed form that can be used with mkconf to generate
2000 a config.h from config.h-dist -- much easier to maintain. Please check
2001 carefully against what you had before for a particular system and report
2002 any problems. vms.h remains separate since the stuff at the bottom
2003 didn't quite fit the mkconf model -- hopefully cleared up later.
2005 Fixed bug in grammar -- didn't allow function definition to be separated from
2006 other rules by a semi-colon.
2008 VMS fix to #includes in missing.c -- should we just be including awk.h?
2010 Updated README for texinfo.tex version.
2012 Updating of copyright in all .[chy] files.
2014 Added but commented out Michal's fix to strftime.
2016 Added tzset() emulation based on Rick Adams' code. Added TZSET_MISSING to
2019 Added strftime.3 man page for missing_dir
2021 More posix: func, **, **= don't work in -W posix
2023 More lint: ^, ^= not in old awk
2025 gawk.1: removed ref to -DNO_DEV_FD, other minor updating.
2027 Style change: pushbak becomes pushback() in yylex().
2029 Changes from 2.12.13 to 2.12.14
2030 -------------------------------
2032 Better (?) organization of awk.h -- attempt to keep all system dependencies
2033 near the top and move some of the non-general things out of the config.h
2036 Change to handling of SYSTEM_MISSING.
2038 Small change to ultrix config.
2040 Do "/dev/fd/*" etc. checking at runtime.
2042 First pass at VMS port.
2044 Improvements to error handling (when lexeme spans buffers).
2046 Fixed backslash handling -- why didn't I notice this sooner?
2048 Added programs from book to test suite and new target "bigtest" to Makefile.
2050 Changes from 2.12.12 to 2.12.13
2051 -------------------------------
2053 Recognize OFS and ORS specially so that OFS = 9 works without efficiency hit.
2054 Took advantage of opportunity to tune do_print*() for about 10% win on a
2055 print with 5 args (i.e. small but significant).
2057 Somewhat pervasive changes to reconcile CONVFMT vs. OFMT.
2059 Better initialization of builtin vars.
2061 Make config/* consistent wrt STRTOL_MISSING.
2063 Small portability improvement to alloca.s
2065 Improvements to lint code in awk.y
2067 Replaced strtol() with a better one by Chris Torek.
2069 Changes from 2.12.11 to 2.12.12
2070 -------------------------------
2072 Added PORTS file to record successful ports.
2074 Added #define const to nothing if not STDC and added const to strtod() header.
2076 Added * to printf capabilities and partially implemented ' ' and '+' (has an
2077 effect for %d only, silently ignored for other formats). I'm afraid that's
2078 as far as I want to go before I look at a complete replacement for
2081 Added warning for /regexp/ on LHS of MATCHOP.
2083 Changes from 2.12.10 to 2.12.11
2084 -------------------------------
2086 Small Makefile improvements.
2088 Some remaining nits from the NeXT port.
2090 Got rid of bcopy() define in awk.h -- not needed anymore (??)
2092 Changed private in builtin.c -- it is special on Sequent.
2094 Added subset implementation of strtol() and STRTOL_MISSING.
2096 A little bit of cleanup in debug.c, dfa.c.
2098 Changes from 2.12.9 to 2.12.10
2099 ------------------------------
2101 Redid compatability checking and checking for # of args.
2103 Removed all references to variables[] from outside awk.y, in preparation
2104 for a more abstract interface to the symbol table.
2106 Got rid of a remaining use of bcopy() in regex.c.
2108 Changes from 2.12.8 to 2.12.9
2109 -----------------------------
2111 Portability improvements for atari, next and decstation.
2113 Bug fix in substr() -- wasn't handling 3rd arg. of -1 properly.
2117 Moved support from src release to doc release.
2119 Updated FUTURES file.
2121 Added some "lint" warnings.
2123 Changes from 2.12.7 to 2.12.8
2124 -----------------------------
2126 Changed time() to systime().
2128 Changed warning() in snode() to fatal().
2130 strftime() now defaults second arg. to current time.
2132 Changes from 2.12.6 to 2.12.7
2133 -----------------------------
2135 Fixed bug in sub_common() involving inadequate allocation of a buffer.
2137 Added some missing files to the Makefile.
2139 Changes from 2.12.5 to 2.12.6
2140 -----------------------------
2142 Fixed bug wherein non-redirected getline could call iop_close() just
2143 prior to a call from do_input().
2145 Fixed bug in handling of /dev/stdout and /dev/stderr.
2147 Changes from 2.12.4 to 2.12.5
2148 -----------------------------
2150 Updated README and support directory.
2152 Changes from 2.12.3 to 2.12.4
2153 -----------------------------
2155 Updated CHANGES and TODO (should have been done in previous 2 patches).
2157 Changes from 2.12.2 to 2.12.3
2158 -----------------------------
2160 Brought regex.c and alloca.s into line with current FSF versions.
2162 Changes from 2.12.1 to 2.12.2
2163 -----------------------------
2165 Portability improvements; mostly moving system prototypes out of awk.h
2167 Introduction of strftime.
2171 Changes from 2.12 to 2.12.1
2172 -----------------------------
2174 Consolidated treatment of command-line assignments (thus correcting the
2177 Rationalized builtin-variable handling into a table-driven process, thus
2178 simplifying variable() and eliminating spc_var().
2180 Fixed bug in handling of command-line source that ended in a newline.
2182 Simplified install() and lookup().
2184 Did away with double-mallocing of identifiers and now free second and later
2185 instances of a name, after the first gets installed into the symbol table.
2187 Treat IGNORECASE specially, simplifying a lot of code, and allowing
2188 checking against strict conformance only on setting it, rather than on each
2191 Fixed regexp matching when IGNORECASE is non-zero (broken when dfa.c was
2194 Fixed bug where $0 was not being marked as valid, even after it was rebuilt.
2195 This caused mangling of $0.
2198 Changes from 2.11.1 to 2.12
2199 -----------------------------
2203 Portability improvements in Makefile.
2204 Move configuration stuff into config.h
2208 Synchronized alloca.[cs] and regex.[ch] with FSF.
2212 Rationalized hash routines into one with a different algorithm.
2213 delete() now works if the array is a local variable.
2214 Changed interface of assoc_next() and avoided dereferencing past the end of the
2219 Merged non-prototype and prototype declarations in awk.h.
2220 Expanded tree_eval #define to short-circuit more calls of r_tree_eval().
2224 Delinted some of the code in the grammar.
2225 Fixed and improved some of the error message printing.
2226 Changed to accomodate unlimited length source lines.
2227 Line continuation now works as advertised.
2228 Source lines can be arbitrarily long.
2229 Refined grammar hacks so that /= assignment works. Regular expressions
2230 starting with /= are recognized at the beginning of a line, after && or ||
2231 and after ~ or !~. More contexts can be added if necessary.
2232 Fixed IGNORECASE (multiple scans for backslash).
2233 Condensed expression_lists in array references.
2234 Detect and warn for correct # args in builtin functions -- call most of them
2235 with a fixed number (i.e. fill in defaults at parse-time rather than at
2237 Load ENVIRON only if it is referenced (detected at parse-time).
2238 Treat NF, FS, RS, NR, FNR specially at parse time, to improve run time.
2239 Fold constant expressions at parse time.
2240 Do make_regexp() on third arg. of split() at parse tiem if it is a constant.
2244 srand() returns 0 the first time called.
2245 Replaced alloca() with malloc() in do_sprintf().
2246 Fixed setting of RSTART and RLENGTH in do_match().
2247 Got rid of get_{one,two,three} and allowance for variable # of args. at
2248 run-time -- this is now done at parse-time.
2249 Fixed latent bug in [g]sub whereby changes to $0 would never get made.
2250 Rewrote much of sub_common() for simplicity and performance.
2251 Added ctime() and time() builtin functions (unless -DSTRICT). ctime() returns
2252 a time string like the C function, given the number of seconds since the epoch
2253 and time() returns the current time in seconds.
2254 do_sprintf() now checks for mismatch between format string and number of
2259 This is borrowed (almost unmodified) from GNU grep to provide faster searches.
2263 Node_var, Node_var_array and Node_param_list handled from macro rather
2264 than in r_tree_eval().
2265 Changed cmp_nodes() to not do a force_number() -- this, combined with a
2266 force_number() on ARGV[] and ENVIRON[] brings it into line with other awks
2267 Greatly simplified cmp_nodes().
2268 Separated out Node_NF, Node_FS, Node_RS, Node_NR and Node_FNR in get_lhs().
2269 All adjacent string concatenations now done at once.
2273 Added support for FIELDWIDTHS.
2274 Fixed bug in get_field() whereby changes to a field were not always
2275 properly reflected in $0.
2276 Reordered tests in parse_field() so that reference off the end of the buffer
2278 set_FS() now sets *parse_field i.e. routine to call depending on type of FS.
2279 It also does make_regexp() for FS if needed. get_field() passes FS_regexp
2280 to re_parse_field(), as does do_split().
2281 Changes to set_field() and set_record() to avoid malloc'ing and free'ing the
2282 field nodes repeatedly. The fields now just point into $0 unless they are
2283 assigned to another variable or changed. force_number() on the field is
2284 *only* done when the field is needed.
2288 Fixed troff formatting problem on .TP lines.
2292 Moved some code out into iop.c.
2293 Output from pipes and system() calls is properly synchronized.
2294 Status from pipe close properly returned.
2295 Bug in getline with no redirect fixed.
2299 This file contains a totally revamped get_a_record and associated code.
2303 Command line programs no longer use a temporary file.
2304 Therefore, tmpnam() no longer required.
2305 Deprecated -a and -e options -- they will go away in the next release,
2306 but for now they cause a warning.
2307 Moved -C, -V, -c options to -W ala posix.
2308 Added -W posix option: throw out \x
2309 Added -W lint option.
2314 force_number() now allows pure numerics to have leading whitespace.
2315 Added make_string facility to optimize case of adding an already malloc'd
2317 Cleaned up and simplified do_deref().
2318 Fixed bug in handling of stref==255 in do_deref().
2322 contains the interface to regexp code
2324 Changes from 2.11.1 to FSF version of same
2325 ------------------------------------------
2326 Thu Jan 4 14:19:30 1990 Jim Kingdon (kingdon at albert)
2328 * Makefile (YACC): Add -y to bison part.
2330 * missing.c: Add #include <stdio.h>.
2332 Sun Dec 24 16:16:05 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
2334 * Makefile: Add (commented out) default defines for Sony News.
2336 * awk.h: Move declaration of vprintf so it will compile when
2337 -DVPRINTF_MISSING is defined.
2339 Mon Nov 13 18:54:08 1989 Robert J. Chassell (bob at apple-gunkies.ai.mit.edu)
2341 * gawk.texinfo: changed @-commands that are not part of the
2342 standard, currently released texinfmt.el to those that are.
2343 Otherwise, only people with the as-yet unreleased makeinfo.c can
2346 Changes from 2.11beta to 2.11.1 (production)
2347 --------------------------------------------
2349 Went from "beta" to production status!!!
2351 Now flushes stdout before closing pipes or redirected files to
2354 MS-DOS changes added in.
2356 Signal handler return type parameterized in Makefile and awk.h and
2357 some lint removed. debug.c cleaned up.
2359 Fixed FS splitting to never match null strings, per book.
2361 Correction to the manual's description of FS.
2363 Some compilers break on char *foo = "string" + 4 so fixed version.sh and
2366 Changes from 2.10beta to 2.11beta
2367 ---------------------------------
2369 This release fixes all reported bugs that we could reproduce. Probably
2370 some of the changes are not documented here.
2372 The next release will probably not be a beta release!
2374 The most important change is the addition of the -nostalgia option. :-)
2376 The documentation has been improved and brought up-to-date.
2378 There has been a lot of general cleaning up of the code that is not otherwise
2379 documented here. There has been a movement toward using standard-conforming
2380 library routines and providing them (in missing.d) for systems lacking them.
2381 Improved (hopefully) configuration through Makfile modifications and missing.c.
2382 In particular, straightened out confusion over vprintf #defines, declarations
2385 Deleted RCS log comments from source, to reduce source size by about one third.
2386 Most of them were horribly out-of-date, anyway.
2388 Renamed source files to reflect (for the most part) their contents.
2390 More and improved error messages. Cleanup and fixes to yyerror().
2391 String constants are not altered in input buffer, so error messages come out
2392 better. Fixed usage message. Make use of ANSI C strerror() function
2395 Plugged many more memory leaks. The memory consumption is now quite
2396 reasonable over a wide range of programs.
2398 Uses volatile declaration if STDC > 0 to avoid problems due to longjmp.
2400 New -a and -e options to use awk or egrep style regexps, respectively,
2401 since POSIX says awk should use egrep regexps. Default is -a.
2403 Added -v option for setting variables before the first file is encountered.
2404 Version information now uses -V and copyleft uses -C.
2406 Added a patchlevel.h file and its use for -V and -C.
2408 Append_right() optimized for major improvement to programs with a *lot*
2411 Operator precedence has been corrected to match draft Posix.
2413 Tightened up grammar for builtin functions so that only length
2414 may be called without arguments or parentheses.
2416 /regex/ is now a normal expression that can appear in any expression
2419 Allow /= to begin a regexp. Allow ..[../..].. in a regexp.
2421 Allow empty compound statements ({}).
2423 Made return and next illegal outside a function and in BEGIN/END respectively.
2425 Division by zero is now illegal and causes a fatal error.
2427 Fixed exponentiation so that x ^ 0 and x ^= 0 both return 1.
2429 Fixed do_sqrt, do_log, and do_exp to do argument/return checking and
2430 print an error message, per the manual.
2432 Fixed main to catch SIGSEGV to get source and data file line numbers.
2434 Fixed yyerror to print the ^ at the beginning of the bad token, not the end.
2436 Fix to substr() builtin: it was failing if the arguments
2437 weren't already strings.
2439 Added new node value flag NUMERIC to indicate that a variable is
2440 purely a number as opposed to type NUM which indicates that
2441 the node's numeric value is valid. This is set in make_number(),
2442 tmp_number and r_force_number() when appropriate and used in
2443 cmp_nodes(). This fixed a bug in comparison of variables that had
2444 numeric prefixes. The new code uses strtod() and eliminates is_a_number().
2445 A simple strtod() is provided for systems lacking one. It does no
2446 overflow checking, so could be improved.
2448 Simplification and efficiency improvement in force_string.
2450 Added performance tweak in r_force_number().
2452 Fixed a bug with nested loops and break/continue in functions.
2454 Fixed inconsistency in handling of empty fields when $0 has to be rebuilt.
2455 Happens to simplify rebuild_record().
2457 Cleaned up the code associated with opening a pipe for reading. Gawk
2458 now has its own popen routine (gawk_popen) that allocates an IOBUF
2459 and keeps track of the pid of the child process. gawk_pclose
2460 marks the appropriate child as defunct in the right struct redirect.
2462 Cleaned up and fixed close_redir().
2464 Fixed an obscure bug to do with redirection. Intermingled ">" and ">>"
2465 redirects did not output in a predictable order.
2467 Improved handling of output buffering: now all print[f]s redirected to a tty
2468 or pipe are flushed immediately and non-redirected output to a tty is flushed
2469 before the next input record is read.
2471 Fixed a bug in get_a_record() where bcopy() could have copied over
2474 Fixed a bug when RS="" and records separated by multiple blank lines.
2476 Got rid of SLOWIO code which was out-of-date anyway.
2478 Fix in get_field() for case where $0 is changed and then $(n) are
2479 changed and then $0 is used.
2481 Fixed infinite loop on failure to open file for reading from getline.
2482 Now handles redirect file open failures properly.
2484 Filenames such as /dev/stdin now allowed on the command line as well as
2487 Fixed so that gawk '$1' where $1 is a zero tests false.
2489 Fixed parsing so that `RLENGTH -1' parses the same as `RLENGTH - 1',
2492 The return from a user-defined function now defaults to the Null node.
2493 This fixes a core-dump-causing bug when the return value of a function
2494 is used and that function returns no value.
2496 Now catches floating point exceptions to avoid core dumps.
2498 Bug fix for deleting elements of an array -- under some conditions, it was
2499 deleting more than one element at a time.
2501 Fix in AWKPATH code for running off the end of the string.
2503 Fixed handling of precision in *printf calls. %0.2d now works properly,
2504 as does %c. [s]printf now recognizes %i and %X.
2506 Fixed a bug in printing of very large (>240) strings.
2508 Cleaned up erroneous behaviour for RS == "".
2510 Added IGNORECASE support to index().
2512 Simplified and fixed newnode/freenode.
2514 Fixed reference to $(anything) in a BEGIN block.
2516 Eliminated use of USG rand48().
2518 Bug fix in force_string for machines with 16-bit ints.
2520 Replaced use of mktemp() with tmpnam() and provided a partial implementation of
2521 the latter for systems that don't have it.
2523 Added a portability check for includes in io.c.
2525 Minor portability fix in alloc.c plus addition of xmalloc().
2527 Portability fix: on UMAX4.2, st_blksize is zero for a pipe, thus breaking
2528 iop_alloc() -- fixed.
2530 Workaround for compiler bug on Sun386i in do_sprintf.
2532 More and improved prototypes in awk.h.
2534 Consolidated C escape parsing code into one place.
2536 strict flag is now turned on only when invoked with compatability option.
2537 It now applies to fewer things.
2539 Changed cast of f._ptr in vprintf.c from (unsigned char *) to (char *).
2540 Hopefully this is right for the systems that use this code (I don't).
2542 Support for pipes under MSDOS added.