1 Changes from 3.0.5 to 3.0.6
2 ---------------------------
4 This is a bug fix release only, pending further development on 3.1.0.
6 Bugs fixed and changes made:
8 1. Subscripting an array with a variable that is just a number no
9 longer magically converts the variable into a string.
11 2. Similarly, running a `for (iggy in foo)' loop where `foo' is a
12 function parameter now works correctly.
14 3. Similarly, `i = ""; v[i] = a; if (v in a) ...' now works again.
16 4. Gawk now special cases `for (iggy in foo) delete foo[iggy]' and
17 treats it as the moral equivalent of `delete foo'. This should be
18 a major efficiency win when portably deleting large arrays.
20 5. VMS port brought up to date.
22 Changes from 3.0.4 to 3.0.5
23 ---------------------------
25 This is a bug fix release only, pending further development on 3.1.0.
29 1. `function foo(foo)' is now a fatal error.
31 2. Array indexing is now much more efficient: where possible, only one
32 copy of an index string is kept, even if used in multiple arrays.
34 3. Support was added for MacOS X and an `install-strip' target.
36 4. [s]printf formatting for `0' flag and floating point formats now
39 5. HP-UX large file support with GCC 2.95.1 now works.
41 6. Arguments that contain `=' but that aren't syntactically valid are
42 now treated as filenames, instead of as fatal errors.
44 7. `-v NF=foo' now works.
46 8. Non-ascii alphanumeric characters are now treated as such in the
47 right locales by regex.c. Similarly, a Latin-1 y-umlaut (decimal
48 value 255) in the program text no longer acts like EOF.
50 9. Array indexes are always compared as strings; fixes an obscure bug
51 when user input gets used for the `x in array' test.
53 10. The usage message now points users to the documentation for how
56 11. `/=' now works after an array.
58 12. `b += b += 1' now works correctly.
60 13. IGNORECASE changing with calls match() now works better. (Fix for
63 14. Multicharacter values for RS now generate a lint warning.
65 15. The gawk open file caching is now much more efficient.
67 16. Global arrays passed to functions are now managed better. In particular,
68 test/arynocls.awk won't crash referencing freed memory.
70 17. In obscure cases, `getline var' can no longer clobber $0.
72 Changes from 3.0.3 to 3.0.4
73 ---------------------------
75 This is a bug fix release only, pending further development on 3.1.0.
79 1. A memory leak when turning a function parameter into an array was
82 2. The non-decimal data option now works correctly.
84 3. Using an empty pair of brackets as an array subscript no longer causes
85 a core dump during parsing. In general, syntax errors should not
86 cause core dumps any more.
88 4. Standard input is no longer closed if it provides program source,
89 avoiding strange I/O problems.
91 5. Memory corruption during printing with `print' has been fixed.
93 6. The gsub function now correctly counts the number of matches.
95 7. A typo in doc/Makefile.in has been fixed, making installation work.
97 8. Calling `next' or `nextfile' from a BEGIN or END rule is now fatal.
99 9. Subtle problems in rebuilding $0 when fields were changed have been
102 10. `FS = FS' now correctly turns off the use of FIELDWIDTHS.
104 11. Gawk now parses fields correctly when FS is a single character.
106 12. It is now possible for RS to be the NUL character ("\0").
108 13. Weird problems with number conversions on MIPS and other systems
111 14. When parsing using FIELDWIDTHS is in effect, split() with no third
112 argument will still use the value of FS.
114 15. Large File Support for Solaris, HP-UX, AIX, and IRIX is now enabled at
115 compile time, thanks to Paul Eggert.
117 16. Attempting to use the name of a function as a variable or array
118 from within the function is now caught as a fatal error, instead
121 17. A bug in parsing hex escapes was fixed.
123 18. A weird bug with concatenation where one expression has side effects
124 that changes another was fixed.
126 19. printf/sprintf now behave much better for uses of the '0' and '#' flags
127 and with precisions and field widths.
129 20. Further strangenesses with concatenation and multiple accesses of some
130 of the special variables was fixed.
132 21. The Atari port is marked as no longer supported.
134 22. Build problems on HP-UX have been fixed.
136 23. Minor fixes and additional explanations added to the documentation.
138 24. For RS = "", even a single leading newline is now correctly stripped.
140 25. Obscure parsing problems for regex constants like /=.../ fixed, so
141 that a regex constant is recognized, and not the /= operator.
143 26. Fixed a bug when closing a redirection that matched the current
146 27. Build problems on AIX fixed.
148 Changes from 3.0.2 to 3.0.3
149 ---------------------------
151 The horrendous per-record memory leak introduced in 3.0.1 is gone, finally.
153 The `amiga' directory is now gone; Amiga support is now entirely handled
154 by the POSIX support.
156 Win32 support has been added in the `pc' directory. See `README_d/README.pc'
159 The mmap changes are disabled in io.c, and will be removed entirely
160 in the next big release. They were an interesting experiment that just
161 really didn't work in practice.
163 A minor memory leak that occurred when using `next' from within a
164 function has also been fixed.
166 Problems with I/O from sub-processes via a pipe are now gone.
168 Using "/dev/pid" and the other special /dev files no longer causes a core dump.
170 The files regex.h, regex.c, getopt.h, getopt.c, and getopt1.c have been
171 merged with the versions in GNU libc. Thanks to Ulrich Drepper for his help.
173 Some new undocumented features have been added. Use the source, Luke!
174 It is not clear yet whether these will ever be fully supported.
176 Array performance should be much better for very very large arrays. "Virtual
177 memory required, real memory helpful."
179 builtin.c:do_substr rationalized, again.
181 The --re-interval option now works as advertised.
183 The license text on some of the missing/* files is now generic.
185 Lots more new test cases.
187 Lots of other small bugs fixed, see the ChangeLog files for details.
189 Changes from 3.0.1 to 3.0.2
190 ---------------------------
192 Gawk now uses autoconf 2.12.
194 strftime now behaves correctly if passed an empty format string or if
195 the string formats to an empty result string.
197 Several minor compilation and installation problems have been fixed.
199 Minor page break issues in the user's guide have been fixed.
201 Lexical errors no longer repeat ad infinitum.
203 Changes from 3.0.0 to 3.0.1
204 ---------------------------
206 Troff source for a handy-dandy five color reference card is now provided.
207 Thanks to SSC for their macros.
209 Gawk now behaves like Unix awk and mawk, in that newline acts as white
210 space for separating fields and for split(), by default. In posix mode,
211 only space and tab separate fields. The documentation has been updated to
214 Tons and tons of small bugs fixed and new tests added, see the ChangeLogs.
216 Lots fewer compile time warnings from gcc -Wall. Remaining ones aren't
219 Gawk now pays some attention to the locale settings.
221 Fixes to gsub to catch several corner cases.
223 The `print' statement now evaluates all expressions first, and then
224 prints them. This leads to less suprising behaviour if any expression has
227 Miscellanious improvements in regex.h and regex.c.
229 Gawk will now install itself as gawk-M.N.P in $(bindir), and link
230 `gawk' to it. This makes it easy to have multiple versions of gawk
231 simultaneously. It will also now install itself as `awk' in $(bindir)
232 if there is no `awk' there. This is in addition to installing itself as
233 `gawk'. This change benefits the Hurd, and possibly other systems. One
234 day, gawk will drop the `g', but not yet.
236 `--posix' turns on interval expressions. Gawk now matches its documentation.
238 `close(FILENAME)' now does something meaningful.
240 Field management code in field.c majorly overhauled, several times.
242 The gensub code has been fixed, several bugs are now gone.
244 Gawk will use mmap for data file input if it is available.
246 The printf/sprintf code has been improved.
248 Minor issues in Makefile setup worked on and improved.
250 builtin.c:do_substr rationalized.
252 Regex matching fixed so that /+[0-9]/ now matches the leading +.
254 For building on vms, the default compiler is now DEC C rather than VAX C.
256 Changes from 2.15.6 to 3.0.0
257 ----------------------------
259 Fixed spelling of `Programming' in the copyright notice in all the files.
261 New --re-interval option to turn on interval expressions. They're off
262 by default, except for --posix, to avoid breaking old programs.
264 Passing regexp constants as parameters to user defined functions now
265 generates a lint warning.
267 Several obscure regexp bugs fixed; alas, a small number remain.
269 The manual has been thoroughly revised. It's now almost 50% bigger than
272 The `+' modifier in printf is now reset correctly for each item.
274 The do_unix variable is now named do_traditional.
276 Handling of \ in sub and gsub rationalized (somewhat, see the manual for
277 the gory [and I do mean gory] details).
279 IGNORECASE now uses ISO 8859-1 Latin-1 instead of straight ASCII. See the
280 source for how to revert to pure ASCII.
282 --lint will now warn if an assignment occurs in a conditional context.
283 This may become obnoxious enough to need turning off in the future, but
284 "it seemed like a good idea at the time."
286 %hf and %Lf are now diagnosed as invalid in printf, just like %lf.
288 Gawk no longer incorrectly closes stdin in child processes used in
291 For integer formats, gawk now correctly treats the precision as the
292 number of digits to print, not the number of characters.
294 gawk is now much better at catching the use of scalar values when
295 arrays are needed, both in function calls and the `x in y' constructs.
297 New gensub function added. See the manual.
299 If do_tradtional is true, octal and hex escapes in regexp constants are
300 treated literally. This matches historical behavior.
302 yylex/nextc fixed so that even null characters can be included
305 do_format now handles cases where a format specifier doesn't end in
306 a control letter. --lint reports an error.
308 strftime() now uses a default time format equivalent to that of the
309 Unix date command, thus it can be called with no arguments.
311 Gawk now catches functions that are used but not defined at parse time
312 instead of at run time. (This is a lint error, making it fatal could break
315 Arrays that max out are now handled correctly.
317 Integer formats outside the range of an unsigned long are now detected
318 correctly using the SunOS 4.x cc compiler.
320 --traditional option added as new preferred name for --compat, in keeping
323 --lint-old option added, so that warnings about things not in old awk
324 are only given if explicitly asked for.
326 `next file' has changed to one word, `nextfile'. `next file' is still
327 accepted but generates a lint warning. `next file' will go away eventually.
329 Gawk with --lint will now notice empty source files and empty data files.
331 Amiga support using the Unix emulation added. Thanks to fnf@ninemoons.com.
333 test/Makefile is now "parallel-make safe".
335 Gawk now uses POSIX regexps + GNU regex ops by default. --posix goes to
336 pure posix regexps, and --compat goes to traditional Unix regexps. However,
337 interval expressions, even though specified by POSIX, are turned off by
338 default, to avoid breaking old code.
340 IGNORECASE now applies to string comparison as well as regexp operations.
342 The AT&T Bell Labs Research awk fflush builtin function is now supported.
343 fflush is extended to flush stdout if no arg and everything if given
344 the null string as an argument.
346 If RS is more than one character, it is treated as a regular expression
347 and records are delimited accordingly. The variable RT is set to the record
348 terminator string. This is disabled in compatibility mode.
350 If FS is set to the null string (or the third arg. of split() is the null
351 string), splitting is done at every single character. This is disabled in
354 Gawk now uses the Autoconf generated configure script, doing away with all
355 the config/* files and the machinery that went with them. The Makefile.in
356 has also changed accordingly, complete with all the standard GNU Makefile
357 targets. (Non-unix systems may still have their own config.h and Makefile;
358 see the appropriate README_d/README.* and/or subdirectory.)
360 The source code has been cleaned up somewhat and the formatting improved.
362 Changes from 2.15.5 to 2.15.6
363 -----------------------------
365 Copyrights updated on all changed files.
367 test directory enhanced with four new tests.
369 Gawk now generates a warning for \x without following hexadecimal digits.
370 In this case, it returns 'x', not \0.
372 Several fixes in main.c related to variable initialization:
373 CONVFMT has a default value
374 resetup is called before initializing variables
375 the varinit table fixed up a bit (see the comments)
377 gawk.1 updated with new BUG REPORTS section.
379 A plain `print' inside a BEGIN or END now generates a lint warning (awk.y).
381 Small fix in iop.c:get_a_record to avoid reading uninitialized memory.
383 awk.y:yylex now does a better job of handling things if the source file
384 does not end in a newline. Probably there is more work to be done.
386 Memory leaks fixed in awk.y, particularly in cases of duplicate function
387 parameters. Also, calling a function doesn't leak memory during parsing.
389 Empty function bodies are now allowed (awk.y).
391 Gawk now detects duplicate parameter names in functions (awk.y).
393 New function `error' in msg.c added for use from awk.y.
395 eval.c:r_get_lhs now checks if its argument is a parameter on the stack,
396 and pulls down the real variable. This catches more 'using an array as
397 a scalar' kinds of errors.
399 main.c recovers C alloca space after parsing, this is important for
400 bison-based parsers. re.c recovers C alloca space after doing an research.
401 [Changes from Pat Rankin]
403 builtin.c now declares the random() related functions based on
404 RANDOM_MISSING from config.h. [Suggested by Pat Rankin]
406 awk.h now handles alloca correctly for HP-UX. [Kaveh Ghazi]
408 regex.h and config/cray60 updated for Unicos 8.0. [Hal Peterson]
410 Fixed re.c and dfa.c so that gawk no longer leaks memory when using
411 lots of dynamic regexps.
413 Removed dependency on signed chars from `idx' variable in awk.h. Gawk
414 now passes its test suite if compiled with `gcc -fno-signed-char'.
416 Fixed warning on close in io.c to go under lint control. Too many people
417 have complained about the spurious message, particularly when closing a
418 child pipeline early.
420 Gawk now correctly handles RS = "" when input is from a terminal
421 (iop.c:get_a_record).
423 Config file added for GNU.
425 gawk 'BEGIN { exit 1 } ; END { exit }' now exits 1, as it should
428 sub and gsub now follow posix, \ escapes both & and \. Each \ must
429 be doubled initially in the program to get it into the string.
430 Thanks to Mike Brennan for pointing this out (builtin.c:sub_common).
432 If FS is "", gawk behaves like mawk and nawk, making the whole record be $1.
433 Yet Another Dark Corner. Sigh (field.c:def_parse_field).
435 Gawk now correctly recomputes string values for numbers if CONVFMT has
436 changed (awk.h:force_string, node.c:r_force_string).
438 A regexp of the form `/* this looks like a comment but is not */' will
439 now generate a warning from --lint (awk.y).
441 Gawk will no longer core dump if given an empty input file (awk.y:get_src_buf,
442 iop.c:optimal_bufsize).
444 A printf format of the form %lf is handled correctly. The `l' generates
445 a lint warning (builtin.c:format_tree) [Thanks to Mark Moraes].
447 Lynxos config file added.
449 `continue' outside a loop treated as `next' only in compatibility mode,
450 instead of by default; recent att nawk chokes on this now. `break'
451 outside a loop now treated as `next' in compatibility mode (eval.c).
453 Bug fix in string concatenation, an arbitrary number of expressions
454 are allowed (eval.c).
456 $1 += $2 now works correctly (eval.c).
458 Changing IGNORECASE no longer resets field-splitting to FS if it was
459 using FIELDWIDTHS (eval.c, field.c).
461 Major enhancement: $0 and NF for last record read are now preserved
462 into the END rule (io.c).
465 /./ now matches a newline (regex.h)
466 ^ and $ match beginning and end of string only, not any embedded
468 regex.c should compile and work ok on 64-bit mips/sgi machines
470 Changes from 2.15.4 to 2.15.5
471 -----------------------------
473 FUTURES file updated and re-arranged some with more rational schedule.
475 Many prototypes handled better for ANSI C in protos.h.
477 getopt.c updated somewhat.
479 test/Makefile now removes junk directory, `bardargtest' renamed `badargs.'
481 Bug fix in iop.c for RS = "". Eat trailing newlines off of record separator.
483 Bug fix in Makefile.bsd44, use leading tab in actions.
485 Fix in field.c:set_FS for FS == "\\" and IGNORECASE != 0.
487 Config files updated or added:
488 cray60, DEC OSF/1 2.0, Utek, sgi405, next21, next30, atari/config.h,
491 Fix in io.c for ENFILE as well as EMFILE, update decl of groupset to
494 Rationalized printing as integers if numbers are outside the range of a long.
495 Changes to node.c:force_string and builtin.c.
497 Made internal NF, NR, and FNR variables longs instead of ints.
499 Add LIMITS_H_MISSING stuff to config.in and awk.h, and default defs for
500 INT_MAX and LONG_MAX, if no limits.h file. Add a standard decl of
501 the time() function for __STDC__. From ghazi@noc.rutgers.edu.
503 Fix tree_eval in awk.h and r_tree_eval in eval.c to deal better with
504 function parameters, particularly ones that are arrays.
506 Fix eval.c to print out array names of arrays used in scalar contexts.
508 Fix eval.c in interpret to zero out source and sourceline initially. This
509 does a better job of providing source file and line number information.
511 Fix to re_parse_field in field.c to not use isspace when RS = "", but rather
512 to explicitly look for blank and tab.
514 Fix to sc_parse_field in field.c to catch the case of the FS character at the
517 Lots of miscellanious bug fixes for memory leaks, courtesy Mark Moraes,
518 also fixes for arrays.
520 io.c fixed to warn about lack of explicit closes if --lint.
522 Updated missing/strftime.c to match posted strftime 6.2.
524 Bug fix in builtin.c, in case of non-match in sub_common.
526 Updated constant used for division in builtin.c:do_rand for DEC Alpha
529 POSIXLY_CORRECT in the environment turns on --posix (fixed in main.c).
531 Updated srandom prototype and calls in builtin.c.
533 Fix awk.y to enforce posix semantics of unary +: result is numeric.
535 Fix array.c to not rearrange the hash chain upon finding an index in
536 the array. This messed things up in cases like:
537 for (index1 in array) {
539 if (index2 in array) # blew away the for
543 Fixed spelling errors in the man page.
545 Fixes in awk.y so that
546 gawk '' /path/to/file
547 will work without core dumping or finding parse errors.
549 Fix main.c so that --lint will fuss about an empty program.
550 Yet another fix for argument parsing in the case of unrecognized options.
552 Bug fix in dfa.c to not attempt to free null pointers.
554 Bug fix in builtin.c to only use DEFAULT_G_PRECISION for %g or %G.
556 Bug fix in field.c to achieve call by value semantics for split.
558 Changes from 2.15.3 to 2.15.4
559 -----------------------------
561 Lots of lint fixes, and do_sprintf made mostly ANSI C compatible.
563 Man page updated and edited.
567 Arrays now grow dynamically, initially scaling up by an order of magnitude
568 and then doubling, up to ~ 64K. This should keep gawk's performance
569 graceful under heavy load.
571 New `delete array' feature added. Only documented in the man page.
573 Switched to dfa and regex suites from grep-2.0. These offer the ability to
574 move to POSIX regexps in the next release.
576 Disabled GNU regex ops.
578 Research awk -m option now recognized. It does nothing in gawk, since gawk
579 has no static limits. Only documented in the man page.
581 New bionic (faster, better, stronger than before) hashing function.
583 Bug fix in argument handling. `gawk -X' now notices there was no program.
584 Additional bug fixes to make --compat and --lint work again.
586 Many changes for systems where sizeof(int) != sizeof(void *).
588 Add explicit alloca(0) in io.c to recover space from C alloca.
590 Fixed file descriptor leak in io.c.
592 The --version option now follows the GNU coding standards and exits.
594 Fixed several prototypes in protos.h.
596 Several tests updated. On Solaris, warn that the out? tests will fail.
598 Configuration files for SunOS with cc and Solaris 2.x added.
600 Improved error messages in awk.y on gawk extensions if do_unix or do_compat.
604 Fixed Atari Makefile and several VMS specific changes.
606 Better conversion of numbers to strings on systems with broken sprintfs.
608 Changes from 2.15.2 to 2.15.3
609 -----------------------------
611 Increased HASHSIZE to a decent number, 127 was way too small.
613 FILENAME is now the null string in a BEGIN rule.
615 Argument processing fixed for invalid options and missing arguments.
617 This version will build on VMS. This included a fix to close all files
618 and pipes opened with redirections before closing stdout and stderr.
620 More getpgrp() defines.
622 Changes for BSD44: <sys/param.h> in io.c and Makefile.bsd44.
624 All directories in the distribution are now writable.
626 Separated LDFLAGS and CFLAGS in Makefile. CFLAGS can now be overridden by
629 Make dist now builds compressed archives ending in .gz and runs doschk.
633 New getopt.c fixes Alpha OSF/1 problem.
635 Make clean now removes possible test output.
637 Improved algorithm for multiple adjacent string concatenations leads to
638 performance improvements.
640 Fix nasty bug whereby command-line assignments, both with -v and at run time,
641 could create variables with syntactically illegal names.
643 Fix obscure bug in printf with %0 flag and filling.
645 Add a lint check for substr if provided length exceeds remaining characters
648 Update atari support.
650 PC support enhanced to include support for both DOS and OS/2. (Lots more
653 Config files for Hitachi Unix and OSF/1, courtesy of Yoko Morishita
656 Changes from 2.15.1 to 2.15.2
657 -----------------------------
659 Additions to the FUTURES file.
661 Document undefined order of output when using both standard output
662 and /dev/stdout or any of the /dev output files that gawk emulates in
663 the absence of OS support.
665 Clean up the distribution generation in Makefile.in: the info files are
666 now included, the distributed files are marked read-only and patched
667 distributions are now unpacked in a directory named with the patch level.
669 Changes from 2.15 to 2.15.1
670 ---------------------------
672 Close stdout and stderr before all redirections on program exit. This allows
673 detection of write errors and also fixes the messages test on Solaris 2.x.
675 Removed YYMAXDEPTH define in awk.y which was limiting the parser stack depth.
677 Changes to config/bsd44, Makefile.bsd44 and configure to bring it into line
678 with the BSD4.4 release.
680 Changed Makefile to use prefix, exec_prefix, bindir etc.
682 make install now installs info files.
684 make install now sets permissions on installed files.
686 Make targets added: uninstall, distclean, mostlyclean and realclean.
688 Added config.h to cleaner and clobber make targets.
690 Changes to config/{hpux8x,sysv3,sysv4,ultrix41} to deal with alloca().
692 Change to getopt.h for portability.
694 Added more special cases to the getpgrp() call.
696 Added README.ibmrt-aos and config/ibmrt-aos.
698 Changes from 2.14 to 2.15
699 ---------------------------
701 Command-line source can now be mixed with library functions.
703 ARGIND variable tracks index in ARGV of FILENAME.
705 GNU style long options in addition to short options.
707 Plan 9 style special files interpreted by gawk:
716 $5 ... $NF = getgroups if supported
718 ERRNO variable contains error string if getline or close fails.
720 Very old options -a and -e have gone away.
722 Inftest has been removed from the default target in test/Makefile -- the
723 results were too machine specific and resulted in too many false alarms.
725 A README.amiga has been added.
727 The "too many arguments supplied for format string" warning message is only
728 in effect under the lint option.
730 Code improvements in dfa.c.
732 Fixed all reported bugs:
734 Writes are checked for failure (such as full filesystem).
736 Stopped (at least some) runaway error messages.
738 gsub(/^/, "x") does the right thing for $0 of 0, 1, or more length.
740 close() on a command being piped to a getline now works properly.
742 The input record will no longer be freed upon an explicit close()
745 A NUL character in FS now works.
747 In a substitute, \\& now means a literal backslash followed by what
750 Integer overflow of substring length in substr() is caught.
752 An input record without a newline termination is handled properly.
754 In io.c, check is against only EMFILE so that system file table
757 Renamed all files with names longer than 14 characters.
759 Escaped characters in regular expressions were being lost when
762 Long source lines were not being handled properly.
764 Sourcefiles that ended in a tab but no newline were bombing.
766 Patterns that could match zero characters in split() were not working
769 The parsedebug option was not working.
771 The grammar was being a bit too lenient, allowing some very dubious
774 Compilation with DEBUG defined now works.
776 A variable read in with getline was not being treated as a potential
779 Array subscripts were not always of string type.
782 Changes from 2.13.2 to 2.14
783 ---------------------------
787 Added "next file" to skip efficiently to the next input file.
789 Fixed potential of overflowing buffer in do_sprintf().
791 Plugged small memory leak in sub_common().
793 EOF on a redirect is now "sticky" -- it can only be cleared by close()ing
796 Now works if used via a #! /bin/gawk line at the top of an executable file
797 when that line ends with whitespace.
799 Added some checks to the grammar to catch redefinition of builtin functions.
800 This could eventually be the basis for an extension to allow redefining
801 functions, but in the mean time it's a good error catching facility.
803 Negative integer exponents now work.
805 Modified do_system() to make sure it had a non-null string to be passed
806 to system(3). Thus, system("") will flush any pending output but not go
807 through the overhead of forking an un-needed shell.
809 A fix to floating point comparisons so that NaNs compare right on IEEE systems.
811 Added code to make sure we're not opening directories for reading and such.
813 Added code to do better diagnoses of weird or null file names.
815 Allow continue outside of a loop, unless in strict posix mode. Lint option
818 New missing/strftime.c. There has been one change that affects gawk. Posix
819 now defines a %V conversion so the vms conversion has been changed to %v.
820 If this version is used with gawk -Wlint and they use %V in a call to
821 strftime, they'll get a warning.
823 Error messages now conform to GNU standard (I hope).
825 Changed comparisons to conform to the description found in the file POSIX.
826 This is inconsistent with the current POSIX draft, but that is broken.
827 Hopefully the final POSIX standard will conform to this version.
828 (Alas, this will have to wait for 1003.2b, which will be a revision to
829 the 1003.2 standard. That standard has been frozen with the broken
832 The length of a string was a short and now is a size_t.
836 Added quite a few new tests to the test suite and deleted many due to lack of
837 written releases. Test output is only removed if it is identical to the
840 Fixed a couple of bugs for reference to $0 when $0 is "" -- particularly in
843 Fixed premature freeing in construct "$0 = $0".
845 Removed the call to wait_any() in gawk_popen(), since on at least some systems,
846 if gawk's input was from a pipe, the predecessor process in the pipe was a
847 child of gawk and this caused a deadlock.
849 Regexp can (once again) match a newline, if given explicitly.
851 nextopen() makes sure file name is null terminated.
853 Fixed VMS pipe simulation. Improved VMS I/O performance.
855 Catch . used in variable names.
857 Fixed bug in getline without redirect from a file -- it was quitting after the
858 first EOF, rather than trying the next file.
860 Fixed bug in treatment of backslash at the end of a string -- it was bombing
861 rather than doing something sensible. It is not clear what this should mean,
862 but for now I issue a warning and take it as a literal backslash.
864 Moved setting of regexp syntax to before the option parsing in main(), to
865 handle things like -v FS='[.,;]'
867 Fixed bug when NF is set by user -- fields_arr must be expanded if necessary
868 and "new" fields must be initialized.
870 Fixed several bugs in [g]sub() for no match found or the match is 0-length.
872 Fixed bug where in gsub() a pattern anchored at the beginning would still
873 substitute throughout the string.
875 make test does not assume that . is in PATH.
877 Fixed bug when a field beyond the end of the record was requested after
878 $0 was altered (directly or indirectly).
880 Fixed bug for assignment to field beyond end of record -- the assigned value
881 was not found on subsequent reference to that field.
883 Fixed bug for FS a regexp and it matches at the end of a record.
885 Fixed memory leak for an array local to a function.
887 Fixed hanging of pipe redirection to getline
889 Fixed coredump on access to $0 inside BEGIN block.
891 Fixed treatment of RS = "". It now parses the fields correctly and strips
892 leading whitespace from a record if FS is a space.
894 Fixed faking of /dev/stdin.
896 Fixed problem with x += x
898 Use of scalar as array and vice versa is now detected.
900 IGNORECASE now obeyed for FS (even if FS is a single alphabetic character).
902 Switch to GPL version 2.
904 Renamed awk.tab.c to awktab.c for MSDOS and VMS tar programs.
906 Renamed this file (CHANGES) to NEWS.
908 Use fmod() instead of modf() and provide FMOD_MISSING #define to undo
911 Correct the volatile declarations in eval.c.
913 Avoid errant closing of the file descriptors for stdin, stdout and stderr.
915 Be more flexible about where semi-colons can occur in programs.
917 Check for write errors on all output, not just on close().
919 Eliminate the need for missing/{strtol.c,vprintf.c}.
921 Use GNU getopt and eliminate missing/getopt.c.
923 More "lint" checking.
926 Changes from 2.13.1 to 2.13.2
927 -----------------------------
929 Toward conformity with GNU standards, configure is a link to mkconf, the latter
930 to disappear in the next major release.
932 Update to config/bsd43.
934 Added config/apollo, config/msc60, config/cray2-50, config/interactive2.2
936 sgi33.cc added for compilation using cc rather than gcc.
938 Ultrix41 now propagates to config.h properly -- as part of a general
939 mechanism in configure for kludges -- #define anything from a config file
940 just gets tacked onto the end of config.h -- to be used sparingly.
942 Got rid of an unnecessary and troublesome declaration of vprintf().
944 Small improvement in locality of error messages.
946 Try to diagnose use of array as scalar and vice versa -- to be improved in
949 Fix for last bug fix for Cray division code--sigh.
951 More changes to test suite to explicitly use sh. Also get rid of
952 a few generated files.
954 Fixed off-by-one bug in string concatenation code.
956 Fix for use of array that is passed in from a previous function parameter.
957 Addition to test suite for above.
959 A number of changes associated with changing NF and access to fields
960 beyond the end of the current record.
962 Change to missing/memcmp.c to avoid seg. fault on zero length input.
964 Updates to test suite (including some inadvertently left out of the last patch)
965 to invoke sh explicitly (rather than rely on #!/bin/sh) and remove some
966 junk files. test/chem/good updated to correspond to bug fixes.
968 Changes from 2.13.0 to 2.13.1
969 -----------------------------
971 More configs and PORTS.
973 Fixed bug wherein a simple division produced an erroneous FPE, caused by
974 the Cray division workaround -- that code is now #ifdef'd only for
977 Fixed bug in modulus implementation -- it was very close to the above
978 code, so I noticed it.
980 Fixed portability problem with limits.h in missing.c
982 Fixed portability problem with tzname and daylight -- define TZNAME_MISSING
983 if strftime() is missing and tzname is also.
985 Better support for Latin-1 character set.
987 Fixed portability problem in test Makefile.
989 Updated PROBLEMS file.
991 =============================== gawk-2.13 released =========================
992 Changes from 2.12.42 to 2.12.43
993 -------------------------------
997 Fixed up strftime.3 and added doc. for %V.
999 Changes from 2.12.41 to 2.12.42
1000 -------------------------------
1002 Fixed bug in devopen() -- if you had write permission in /dev,
1003 it would just create /dev/stdout etc.!!
1005 Final (?) VMS update.
1007 Make NeXT use GFMT_WORKAROUND
1009 Fixed bug in sub_common() for substitute on zero-length match. Improved the
1010 code a bit while I was at it.
1012 Fixed grammar so that $i++ parses as ($i)++
1014 Put support/* back in the distribution (didn't I already do this?!)
1016 Changes from 2.12.40 to 2.12.41
1017 -------------------------------
1019 VMS workaround for broken %g format.
1021 Changes from 2.12.39 to 2.12.40
1022 -------------------------------
1024 Minor man page update.
1026 Fixed latent bug in redirect().
1028 Changes from 2.12.38 to 2.12.39
1029 -------------------------------
1031 Updates to test suite -- remove dependence on changing gawk.1 man page.
1033 Changes from 2.12.37 to 2.12.38
1034 -------------------------------
1036 Fixed bug in use of *= without whitespace following.
1040 Updates to man page.
1042 Option handling updates in main.c
1044 test/manyfiles redone and added to bigtest.
1046 Fixed latent (on Sun) bug in handling of save_fs.
1048 Changes from 2.12.36 to 2.12.37
1049 -------------------------------
1051 Update REL in Makefile-dist. Incorporate test suite into main distribution.
1053 Minor fix in regtest.
1055 Changes from 2.12.35 to 2.12.36
1056 -------------------------------
1058 Release takes on dual personality -- 2.12.36 and 2.13.0 -- any further
1059 patches before public release won't count for 2.13, although they will for
1060 2.12 -- be careful to avoid confusion! patchlevel.h will be the last thing
1063 Cray updates to deal with arithmetic problems.
1065 Minor test suite updates.
1067 Fixed latent bug in parser (freeing memory).
1069 Changes from 2.12.34 to 2.12.35
1070 -------------------------------
1074 Flush stdout at top of err() and stderr at bottom.
1076 Fixed bug in eval_condition() -- it wasn't testing for MAYBE_NUM and
1077 doing the force_number().
1079 Included the missing manyfiles.awk and a new test to catch the above bug which
1080 I am amazed wasn't already caught by the test suite -- it's pretty basic.
1082 Changes from 2.12.33 to 2.12.34
1083 -------------------------------
1085 Atari updates -- including bug fix.
1087 More VMS updates -- also nuke vms/version.com.
1089 Fixed bug in handling of large numbers of redirections -- it was probably never
1090 tested before (blush!).
1092 Minor rearrangement of code in r_force_number().
1094 Made chem and regtest tests a bit more portable (Ultrix again).
1096 Added another test -- manyfiles -- not invoked under any other test -- very Unix
1099 Rough beginning of LIMITATIONS file -- need my AWK book to complete it.
1101 Changes from 2.12.32 to 2.12.33
1102 -------------------------------
1104 Expunge debug.? from various files.
1106 Remove vestiges of Floor and Ceil kludge.
1108 Special case integer division -- mainly for Cray, but maybe someone else
1111 Workaround for iop_close closing an output pipe descriptor on Cray --
1112 not conditional since I think it may fix a bug on SGI as well and I don't
1113 think it can hurt elsewhere.
1115 Fixed memory leak in assoc_lookup().
1117 Small cleanup in test suite.
1119 Changes from 2.12.31 to 2.12.32
1120 -------------------------------
1122 Nuked debug.c and debugging flag -- there are better ways.
1124 Nuked version.sh and version.c in subdirectories.
1126 Fixed bug in handling of IGNORECASE.
1128 Fixed bug when FIELDWIDTHS was set via -v option.
1130 Fixed (obscure) bug when $0 is assigned a numerical value.
1132 Fixed so that escape sequences in command-line assignments work (as it already
1133 said in the comment).
1135 Added a few cases to test suite.
1137 Moved support/* back into distribution.
1141 Changes from 2.12.30 to 2.12.31
1142 -------------------------------
1144 Cosmetic manual page changes.
1146 Updated sunos3 config.
1148 Small changes in test suite including renaming files over 14 chars. in length.
1150 Changes from 2.12.29 to 2.12.30
1151 -------------------------------
1153 Bug fix for many string concatenations in a row.
1155 Changes from 2.12.28 to 2.12.29
1156 -------------------------------
1158 Minor cleanup in awk.y
1164 Changes from 2.12.27 to 2.12.28
1165 -------------------------------
1167 Got rid of the debugging goop in eval.c -- there are better ways.
1171 VMS changes left out of the last patch -- sigh! config/vms.h renamed
1172 to config/vms-conf.h.
1174 Fixed missing/tzset.c
1176 Removed use of gcvt() and GCVT_MISSING -- turns out it was no faster than
1177 sprintf("%g") and caused all sorts of portability headaches.
1179 Tuned get_field() -- it was unnecessarily parsing the whole record on reference
1182 Tuned interpret() a bit in the rule_node loop.
1184 In r_force_number(), worked around bug in Uglix strtod() and got rid of
1185 ugly do{}while(0) at Michal's urging.
1187 Replaced do_deref() and deref with unref(node) -- much cleaner and a bit faster.
1189 Got rid of assign_number() -- contrary to comment, it was no faster than
1190 just making a new node and freeing the old one.
1192 Replaced make_number() and tmp_number() with macros that call mk_number().
1194 Changed freenode() and newnode() into macros -- the latter is getnode()
1195 which calls more_nodes() as necessary.
1197 Changes from 2.12.26 to 2.12.27
1198 -------------------------------
1200 Completion of Cray 2 port (includes a kludge for floor() and ceil()
1201 that may go or be changed -- I think that it may just be working around
1202 a bug in chem that is being tweaked on the Cray).
1206 Moved kludge over yacc's insertion of malloc and realloc declarations
1207 from protos.h to the Makefile.
1209 Added a lisp interpreter in awk to the test suite. (Invoked under
1212 Cleanup in r_force_number() -- I had never gotten around to a thorough
1213 profile of the cache code and it turns out to be not worth it.
1215 Performance boost -- do lazy force_number()'ing for fields etc. i.e.
1216 flag them (MAYBE_NUM) and call force_number only as necessary.
1218 Changes from 2.12.25 to 2.12.26
1219 -------------------------------
1221 Rework of regexp stuff so that dynamic regexps have reasonable
1222 performance -- string used for compiled regexp is stored and
1223 compared to new string -- if same, no recompilation is necessary.
1224 Also, very dynamic regexps cause dfa-based searching to be turned
1227 Code in dev_open() is back to returning fileno(std*) rather than
1228 dup()ing it. This will be documented. Sorry for the run-around
1231 Minor atari updates.
1235 Missing file from MSDOS port.
1237 Added warning (under lint) if third arg. of [g]sub is a constant and
1238 handle it properly in the code (i.e. return how many matches).
1240 Changes from 2.12.24 to 2.12.25
1241 -------------------------------
1245 Non-consequential changes to regexp variables in preparation for
1246 a more serious change to fix a serious performance problem.
1248 Changes from 2.12.23 to 2.12.24
1249 -------------------------------
1251 Fixed bug in output flushing introduced a few patches back. This caused
1252 serious performance losses.
1254 Changes from 2.12.22 to 2.12.23
1255 -------------------------------
1257 Accidentally left config/cray2-60 out of last patch.
1259 Added some missing dependencies to Makefile.
1261 Cleaned up mkconf a bit; made yacc the default parser (no alloca needed,
1262 right?); added rs6000 hook for signed characters.
1264 Made regex.c with NO_ALLOCA undefined work.
1266 Fixed bug in dfa.c for systems where free(NULL) bombs.
1268 Deleted a few cant_happen()'s that *really* can't hapen.
1270 Changes from 2.12.21 to 2.12.22
1271 -------------------------------
1273 Added to config stuff the ability to choose YACC rather than bison.
1275 Fixed CHAR_UNSIGNED in config.h-dist.
1277 Second arg. of strtod() is char ** rather than const char **.
1279 stackb is now initially malloc()'ed since it may be realloc()'ed.
1283 Added SIZE_T_MISSING to config stuff and a default typedef to awk.h.
1284 (Maybe it is not needed on any current systems??)
1286 re_compile_pattern()'s size is now size_t unconditionally.
1288 Changes from 2.12.20 to 2.12.21
1289 -------------------------------
1291 Corrected missing/gcvt.c.
1293 Got rid of use of dup2() and thus DUP_MISSING.
1295 Updated config/sgi33.
1297 Turned on (and fixed) in cmp_nodes() the behaviour that I *hope* will be in
1298 POSIX 1003.2 for relational comparisons.
1300 Small updates to test suite.
1302 Changes from 2.12.19 to 2.12.20
1303 -------------------------------
1305 Sloppy, sloppy, sloppy!! I didn't even try to compile the last two
1306 patches. This one fixes goofs in regex.c.
1308 Changes from 2.12.18 to 2.12.19
1309 -------------------------------
1311 Cleanup of last patch.
1313 Changes from 2.12.17 to 2.12.18
1314 -------------------------------
1316 Makefile renamed to Makefile-dist.
1318 Added alloca() configuration to mkconf. (A bit kludgey.) Just
1319 add a single line containing ALLOCA_PW, ALLOCA_S or ALLOCA_C
1320 to the appropriate config file to have Makefile-dist edited
1323 Reorganized output flushing to correspond with new semantics of
1324 devopen() on "/dev/std*" etc.
1326 Fixed rest of last goof!!
1328 Save and restore errno in do_pathopen().
1330 Miscellaneous atari updates.
1332 Get rid of the trailing comma in the NODETYPE definition (Cray
1333 compiler won't take it).
1335 Try to make the use of `const' consistent since Cray compiler is
1336 fussy about that. See the changes to `basename' and `myname'.
1338 It turns out that, according to section 3.8.3 (Macro Replacement)
1339 of the ANSI Standard: ``If there are sequences of preprocessing
1340 tokens within the list of arguments that would otherwise act as
1341 preprocessing directives, the behavior is undefined.'' That means
1342 that you cannot count on the behavior of the declaration of
1343 re_compile_pattern in awk.h, and indeed the Cray compiler chokes on it.
1345 Replaced alloca with malloc/realloc/free in regex.c. It was much simpler
1346 than expected. (Inside NO_ALLOCA for now -- by default no alloca.)
1348 Added a configuration file, config/cray60, for Unicos-6.0.
1350 Changes from 2.12.16 to 2.12.17
1351 -------------------------------
1353 Ooops. Goofed signal use in last patch.
1355 Changes from 2.12.15 to 2.12.16
1356 -------------------------------
1358 RENAMED *_dir to just * (e.g. missing_dir).
1360 Numerous VMS changes.
1362 Proper inclusion of atari and vms files.
1364 Added experimental (ifdef'd out) RELAXED_CONTINUATION and DEFAULT_FILETYPE
1365 -- please comment on these!
1367 Moved pathopen() to io.c (sigh).
1369 Put local directory ahead in default AWKPATH.
1371 Added facility in mkconf to echo comments on stdout: lines beginning
1372 with "#echo " will have the remainder of the line echoed when mkconf is run.
1373 Any lines starting with "#" will otherwise be treated as comments. The
1374 intent is to be able to say:
1375 "#echo Make sure you uncomment alloca.c in the Makefile"
1378 Prototype fix for V.4
1380 Fixed version_string to not print leading @(#).
1382 Fixed FIELDWIDTHS to work with strict (turned out to be easy).
1386 Changed semantics of /dev/fd/n to be like on real /dev/fd.
1388 Several configuration and updates in the makefile.
1392 Include tzset.c and system.c from missing_dir that were accidently left out of
1395 Fixed bug in cmdline variable assignment -- arg was getting freed(!) in
1398 Backed out of parse-time constant folding for now, until I can figure out
1401 Fixed devopen() so that getline <"-" works.
1403 Changes from 2.12.14 to 2.12.15
1404 -------------------------------
1406 Changed config/* to a condensed form that can be used with mkconf to generate
1407 a config.h from config.h-dist -- much easier to maintain. Please check
1408 carefully against what you had before for a particular system and report
1409 any problems. vms.h remains separate since the stuff at the bottom
1410 didn't quite fit the mkconf model -- hopefully cleared up later.
1412 Fixed bug in grammar -- didn't allow function definition to be separated from
1413 other rules by a semi-colon.
1415 VMS fix to #includes in missing.c -- should we just be including awk.h?
1417 Updated README for texinfo.tex version.
1419 Updating of copyright in all .[chy] files.
1421 Added but commented out Michal's fix to strftime.
1423 Added tzset() emulation based on Rick Adams' code. Added TZSET_MISSING to
1426 Added strftime.3 man page for missing_dir
1428 More posix: func, **, **= don't work in -W posix
1430 More lint: ^, ^= not in old awk
1432 gawk.1: removed ref to -DNO_DEV_FD, other minor updating.
1434 Style change: pushbak becomes pushback() in yylex().
1436 Changes from 2.12.13 to 2.12.14
1437 -------------------------------
1439 Better (?) organization of awk.h -- attempt to keep all system dependencies
1440 near the top and move some of the non-general things out of the config.h
1443 Change to handling of SYSTEM_MISSING.
1445 Small change to ultrix config.
1447 Do "/dev/fd/*" etc. checking at runtime.
1449 First pass at VMS port.
1451 Improvements to error handling (when lexeme spans buffers).
1453 Fixed backslash handling -- why didn't I notice this sooner?
1455 Added programs from book to test suite and new target "bigtest" to Makefile.
1457 Changes from 2.12.12 to 2.12.13
1458 -------------------------------
1460 Recognize OFS and ORS specially so that OFS = 9 works without efficiency hit.
1461 Took advantage of opportunity to tune do_print*() for about 10% win on a
1462 print with 5 args (i.e. small but significant).
1464 Somewhat pervasive changes to reconcile CONVFMT vs. OFMT.
1466 Better initialization of builtin vars.
1468 Make config/* consistent wrt STRTOL_MISSING.
1470 Small portability improvement to alloca.s
1472 Improvements to lint code in awk.y
1474 Replaced strtol() with a better one by Chris Torek.
1476 Changes from 2.12.11 to 2.12.12
1477 -------------------------------
1479 Added PORTS file to record successful ports.
1481 Added #define const to nothing if not STDC and added const to strtod() header.
1483 Added * to printf capabilities and partially implemented ' ' and '+' (has an
1484 effect for %d only, silently ignored for other formats). I'm afraid that's
1485 as far as I want to go before I look at a complete replacement for
1488 Added warning for /regexp/ on LHS of MATCHOP.
1490 Changes from 2.12.10 to 2.12.11
1491 -------------------------------
1493 Small Makefile improvements.
1495 Some remaining nits from the NeXT port.
1497 Got rid of bcopy() define in awk.h -- not needed anymore (??)
1499 Changed private in builtin.c -- it is special on Sequent.
1501 Added subset implementation of strtol() and STRTOL_MISSING.
1503 A little bit of cleanup in debug.c, dfa.c.
1505 Changes from 2.12.9 to 2.12.10
1506 ------------------------------
1508 Redid compatability checking and checking for # of args.
1510 Removed all references to variables[] from outside awk.y, in preparation
1511 for a more abstract interface to the symbol table.
1513 Got rid of a remaining use of bcopy() in regex.c.
1515 Changes from 2.12.8 to 2.12.9
1516 -----------------------------
1518 Portability improvements for atari, next and decstation.
1520 Bug fix in substr() -- wasn't handling 3rd arg. of -1 properly.
1524 Moved support from src release to doc release.
1526 Updated FUTURES file.
1528 Added some "lint" warnings.
1530 Changes from 2.12.7 to 2.12.8
1531 -----------------------------
1533 Changed time() to systime().
1535 Changed warning() in snode() to fatal().
1537 strftime() now defaults second arg. to current time.
1539 Changes from 2.12.6 to 2.12.7
1540 -----------------------------
1542 Fixed bug in sub_common() involving inadequate allocation of a buffer.
1544 Added some missing files to the Makefile.
1546 Changes from 2.12.5 to 2.12.6
1547 -----------------------------
1549 Fixed bug wherein non-redirected getline could call iop_close() just
1550 prior to a call from do_input().
1552 Fixed bug in handling of /dev/stdout and /dev/stderr.
1554 Changes from 2.12.4 to 2.12.5
1555 -----------------------------
1557 Updated README and support directory.
1559 Changes from 2.12.3 to 2.12.4
1560 -----------------------------
1562 Updated CHANGES and TODO (should have been done in previous 2 patches).
1564 Changes from 2.12.2 to 2.12.3
1565 -----------------------------
1567 Brought regex.c and alloca.s into line with current FSF versions.
1569 Changes from 2.12.1 to 2.12.2
1570 -----------------------------
1572 Portability improvements; mostly moving system prototypes out of awk.h
1574 Introduction of strftime.
1578 Changes from 2.12 to 2.12.1
1579 -----------------------------
1581 Consolidated treatment of command-line assignments (thus correcting the
1584 Rationalized builtin-variable handling into a table-driven process, thus
1585 simplifying variable() and eliminating spc_var().
1587 Fixed bug in handling of command-line source that ended in a newline.
1589 Simplified install() and lookup().
1591 Did away with double-mallocing of identifiers and now free second and later
1592 instances of a name, after the first gets installed into the symbol table.
1594 Treat IGNORECASE specially, simplifying a lot of code, and allowing
1595 checking against strict conformance only on setting it, rather than on each
1598 Fixed regexp matching when IGNORECASE is non-zero (broken when dfa.c was
1601 Fixed bug where $0 was not being marked as valid, even after it was rebuilt.
1602 This caused mangling of $0.
1605 Changes from 2.11.1 to 2.12
1606 -----------------------------
1610 Portability improvements in Makefile.
1611 Move configuration stuff into config.h
1615 Synchronized alloca.[cs] and regex.[ch] with FSF.
1619 Rationalized hash routines into one with a different algorithm.
1620 delete() now works if the array is a local variable.
1621 Changed interface of assoc_next() and avoided dereferencing past the end of the
1626 Merged non-prototype and prototype declarations in awk.h.
1627 Expanded tree_eval #define to short-circuit more calls of r_tree_eval().
1631 Delinted some of the code in the grammar.
1632 Fixed and improved some of the error message printing.
1633 Changed to accomodate unlimited length source lines.
1634 Line continuation now works as advertised.
1635 Source lines can be arbitrarily long.
1636 Refined grammar hacks so that /= assignment works. Regular expressions
1637 starting with /= are recognized at the beginning of a line, after && or ||
1638 and after ~ or !~. More contexts can be added if necessary.
1639 Fixed IGNORECASE (multiple scans for backslash).
1640 Condensed expression_lists in array references.
1641 Detect and warn for correct # args in builtin functions -- call most of them
1642 with a fixed number (i.e. fill in defaults at parse-time rather than at
1644 Load ENVIRON only if it is referenced (detected at parse-time).
1645 Treat NF, FS, RS, NR, FNR specially at parse time, to improve run time.
1646 Fold constant expressions at parse time.
1647 Do make_regexp() on third arg. of split() at parse tiem if it is a constant.
1651 srand() returns 0 the first time called.
1652 Replaced alloca() with malloc() in do_sprintf().
1653 Fixed setting of RSTART and RLENGTH in do_match().
1654 Got rid of get_{one,two,three} and allowance for variable # of args. at
1655 run-time -- this is now done at parse-time.
1656 Fixed latent bug in [g]sub whereby changes to $0 would never get made.
1657 Rewrote much of sub_common() for simplicity and performance.
1658 Added ctime() and time() builtin functions (unless -DSTRICT). ctime() returns
1659 a time string like the C function, given the number of seconds since the epoch
1660 and time() returns the current time in seconds.
1661 do_sprintf() now checks for mismatch between format string and number of
1666 This is borrowed (almost unmodified) from GNU grep to provide faster searches.
1670 Node_var, Node_var_array and Node_param_list handled from macro rather
1671 than in r_tree_eval().
1672 Changed cmp_nodes() to not do a force_number() -- this, combined with a
1673 force_number() on ARGV[] and ENVIRON[] brings it into line with other awks
1674 Greatly simplified cmp_nodes().
1675 Separated out Node_NF, Node_FS, Node_RS, Node_NR and Node_FNR in get_lhs().
1676 All adjacent string concatenations now done at once.
1680 Added support for FIELDWIDTHS.
1681 Fixed bug in get_field() whereby changes to a field were not always
1682 properly reflected in $0.
1683 Reordered tests in parse_field() so that reference off the end of the buffer
1685 set_FS() now sets *parse_field i.e. routine to call depending on type of FS.
1686 It also does make_regexp() for FS if needed. get_field() passes FS_regexp
1687 to re_parse_field(), as does do_split().
1688 Changes to set_field() and set_record() to avoid malloc'ing and free'ing the
1689 field nodes repeatedly. The fields now just point into $0 unless they are
1690 assigned to another variable or changed. force_number() on the field is
1691 *only* done when the field is needed.
1695 Fixed troff formatting problem on .TP lines.
1699 Moved some code out into iop.c.
1700 Output from pipes and system() calls is properly synchronized.
1701 Status from pipe close properly returned.
1702 Bug in getline with no redirect fixed.
1706 This file contains a totally revamped get_a_record and associated code.
1710 Command line programs no longer use a temporary file.
1711 Therefore, tmpnam() no longer required.
1712 Deprecated -a and -e options -- they will go away in the next release,
1713 but for now they cause a warning.
1714 Moved -C, -V, -c options to -W ala posix.
1715 Added -W posix option: throw out \x
1716 Added -W lint option.
1721 force_number() now allows pure numerics to have leading whitespace.
1722 Added make_string facility to optimize case of adding an already malloc'd
1724 Cleaned up and simplified do_deref().
1725 Fixed bug in handling of stref==255 in do_deref().
1729 contains the interface to regexp code
1731 Changes from 2.11.1 to FSF version of same
1732 ------------------------------------------
1733 Thu Jan 4 14:19:30 1990 Jim Kingdon (kingdon at albert)
1735 * Makefile (YACC): Add -y to bison part.
1737 * missing.c: Add #include <stdio.h>.
1739 Sun Dec 24 16:16:05 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
1741 * Makefile: Add (commented out) default defines for Sony News.
1743 * awk.h: Move declaration of vprintf so it will compile when
1744 -DVPRINTF_MISSING is defined.
1746 Mon Nov 13 18:54:08 1989 Robert J. Chassell (bob at apple-gunkies.ai.mit.edu)
1748 * gawk.texinfo: changed @-commands that are not part of the
1749 standard, currently released texinfmt.el to those that are.
1750 Otherwise, only people with the as-yet unreleased makeinfo.c can
1753 Changes from 2.11beta to 2.11.1 (production)
1754 --------------------------------------------
1756 Went from "beta" to production status!!!
1758 Now flushes stdout before closing pipes or redirected files to
1761 MS-DOS changes added in.
1763 Signal handler return type parameterized in Makefile and awk.h and
1764 some lint removed. debug.c cleaned up.
1766 Fixed FS splitting to never match null strings, per book.
1768 Correction to the manual's description of FS.
1770 Some compilers break on char *foo = "string" + 4 so fixed version.sh and
1773 Changes from 2.10beta to 2.11beta
1774 ---------------------------------
1776 This release fixes all reported bugs that we could reproduce. Probably
1777 some of the changes are not documented here.
1779 The next release will probably not be a beta release!
1781 The most important change is the addition of the -nostalgia option. :-)
1783 The documentation has been improved and brought up-to-date.
1785 There has been a lot of general cleaning up of the code that is not otherwise
1786 documented here. There has been a movement toward using standard-conforming
1787 library routines and providing them (in missing.d) for systems lacking them.
1788 Improved (hopefully) configuration through Makfile modifications and missing.c.
1789 In particular, straightened out confusion over vprintf #defines, declarations
1792 Deleted RCS log comments from source, to reduce source size by about one third.
1793 Most of them were horribly out-of-date, anyway.
1795 Renamed source files to reflect (for the most part) their contents.
1797 More and improved error messages. Cleanup and fixes to yyerror().
1798 String constants are not altered in input buffer, so error messages come out
1799 better. Fixed usage message. Make use of ANSI C strerror() function
1802 Plugged many more memory leaks. The memory consumption is now quite
1803 reasonable over a wide range of programs.
1805 Uses volatile declaration if STDC > 0 to avoid problems due to longjmp.
1807 New -a and -e options to use awk or egrep style regexps, respectively,
1808 since POSIX says awk should use egrep regexps. Default is -a.
1810 Added -v option for setting variables before the first file is encountered.
1811 Version information now uses -V and copyleft uses -C.
1813 Added a patchlevel.h file and its use for -V and -C.
1815 Append_right() optimized for major improvement to programs with a *lot*
1818 Operator precedence has been corrected to match draft Posix.
1820 Tightened up grammar for builtin functions so that only length
1821 may be called without arguments or parentheses.
1823 /regex/ is now a normal expression that can appear in any expression
1826 Allow /= to begin a regexp. Allow ..[../..].. in a regexp.
1828 Allow empty compound statements ({}).
1830 Made return and next illegal outside a function and in BEGIN/END respectively.
1832 Division by zero is now illegal and causes a fatal error.
1834 Fixed exponentiation so that x ^ 0 and x ^= 0 both return 1.
1836 Fixed do_sqrt, do_log, and do_exp to do argument/return checking and
1837 print an error message, per the manual.
1839 Fixed main to catch SIGSEGV to get source and data file line numbers.
1841 Fixed yyerror to print the ^ at the beginning of the bad token, not the end.
1843 Fix to substr() builtin: it was failing if the arguments
1844 weren't already strings.
1846 Added new node value flag NUMERIC to indicate that a variable is
1847 purely a number as opposed to type NUM which indicates that
1848 the node's numeric value is valid. This is set in make_number(),
1849 tmp_number and r_force_number() when appropriate and used in
1850 cmp_nodes(). This fixed a bug in comparison of variables that had
1851 numeric prefixes. The new code uses strtod() and eliminates is_a_number().
1852 A simple strtod() is provided for systems lacking one. It does no
1853 overflow checking, so could be improved.
1855 Simplification and efficiency improvement in force_string.
1857 Added performance tweak in r_force_number().
1859 Fixed a bug with nested loops and break/continue in functions.
1861 Fixed inconsistency in handling of empty fields when $0 has to be rebuilt.
1862 Happens to simplify rebuild_record().
1864 Cleaned up the code associated with opening a pipe for reading. Gawk
1865 now has its own popen routine (gawk_popen) that allocates an IOBUF
1866 and keeps track of the pid of the child process. gawk_pclose
1867 marks the appropriate child as defunct in the right struct redirect.
1869 Cleaned up and fixed close_redir().
1871 Fixed an obscure bug to do with redirection. Intermingled ">" and ">>"
1872 redirects did not output in a predictable order.
1874 Improved handling of output buffering: now all print[f]s redirected to a tty
1875 or pipe are flushed immediately and non-redirected output to a tty is flushed
1876 before the next input record is read.
1878 Fixed a bug in get_a_record() where bcopy() could have copied over
1881 Fixed a bug when RS="" and records separated by multiple blank lines.
1883 Got rid of SLOWIO code which was out-of-date anyway.
1885 Fix in get_field() for case where $0 is changed and then $(n) are
1886 changed and then $0 is used.
1888 Fixed infinite loop on failure to open file for reading from getline.
1889 Now handles redirect file open failures properly.
1891 Filenames such as /dev/stdin now allowed on the command line as well as
1894 Fixed so that gawk '$1' where $1 is a zero tests false.
1896 Fixed parsing so that `RLENGTH -1' parses the same as `RLENGTH - 1',
1899 The return from a user-defined function now defaults to the Null node.
1900 This fixes a core-dump-causing bug when the return value of a function
1901 is used and that function returns no value.
1903 Now catches floating point exceptions to avoid core dumps.
1905 Bug fix for deleting elements of an array -- under some conditions, it was
1906 deleting more than one element at a time.
1908 Fix in AWKPATH code for running off the end of the string.
1910 Fixed handling of precision in *printf calls. %0.2d now works properly,
1911 as does %c. [s]printf now recognizes %i and %X.
1913 Fixed a bug in printing of very large (>240) strings.
1915 Cleaned up erroneous behaviour for RS == "".
1917 Added IGNORECASE support to index().
1919 Simplified and fixed newnode/freenode.
1921 Fixed reference to $(anything) in a BEGIN block.
1923 Eliminated use of USG rand48().
1925 Bug fix in force_string for machines with 16-bit ints.
1927 Replaced use of mktemp() with tmpnam() and provided a partial implementation of
1928 the latter for systems that don't have it.
1930 Added a portability check for includes in io.c.
1932 Minor portability fix in alloc.c plus addition of xmalloc().
1934 Portability fix: on UMAX4.2, st_blksize is zero for a pipe, thus breaking
1935 iop_alloc() -- fixed.
1937 Workaround for compiler bug on Sun386i in do_sprintf.
1939 More and improved prototypes in awk.h.
1941 Consolidated C escape parsing code into one place.
1943 strict flag is now turned on only when invoked with compatability option.
1944 It now applies to fewer things.
1946 Changed cast of f._ptr in vprintf.c from (unsigned char *) to (char *).
1947 Hopefully this is right for the systems that use this code (I don't).
1949 Support for pipes under MSDOS added.