Merge from vendor branch LIBSTDC++:
[dragonfly.git] / contrib / awk / NEWS
1 Changes from 3.0.5 to 3.0.6
2 ---------------------------
3
4 This is a bug fix release only, pending further development on 3.1.0.
5
6 Bugs fixed and changes made:
7
8 1. Subscripting an array with a variable that is just a number no
9    longer magically converts the variable into a string.
10
11 2. Similarly, running a `for (iggy in foo)' loop where `foo' is a
12    function parameter now works correctly.
13
14 3. Similarly, `i = ""; v[i] = a; if (v in a) ...' now works again.
15
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.
19
20 5. VMS port brought up to date.
21
22 Changes from 3.0.4 to 3.0.5
23 ---------------------------
24
25 This is a bug fix release only, pending further development on 3.1.0.
26
27 Bugs Fixed:
28
29  1. `function foo(foo)' is now a fatal error.
30
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.
33
34  3. Support was added for MacOS X and an `install-strip' target.
35
36  4. [s]printf formatting for `0' flag and floating point formats now
37     works correctly.
38
39  5. HP-UX large file support with GCC 2.95.1 now works.
40
41  6. Arguments that contain `=' but that aren't syntactically valid are
42     now treated as filenames, instead of as fatal errors.
43
44  7. `-v NF=foo' now works.
45
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.
49
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.
52
53 10. The usage message now points users to the documentation for how
54     to report bugs.
55
56 11. `/=' now works after an array.
57
58 12. `b += b += 1' now works correctly.
59
60 13. IGNORECASE changing with calls match() now works better. (Fix for
61     semi-obscure bug.)
62
63 14. Multicharacter values for RS now generate a lint warning.
64
65 15. The gawk open file caching is now much more efficient.
66
67 16. Global arrays passed to functions are now managed better.  In particular,
68     test/arynocls.awk won't crash referencing freed memory.
69
70 17. In obscure cases, `getline var' can no longer clobber $0.
71
72 Changes from 3.0.3 to 3.0.4
73 ---------------------------
74
75 This is a bug fix release only, pending further development on 3.1.0.
76
77 Bugs Fixed:
78
79  1. A memory leak when turning a function parameter into an array was
80     fixed.
81
82  2. The non-decimal data option now works correctly.
83
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.
87  
88  4. Standard input is no longer closed if it provides program source,
89     avoiding strange I/O problems.
90
91  5. Memory corruption during printing with `print' has been fixed.
92
93  6. The gsub function now correctly counts the number of matches.
94
95  7. A typo in doc/Makefile.in has been fixed, making installation work.
96
97  8. Calling `next' or `nextfile' from a BEGIN or END rule is now fatal.
98
99  9. Subtle problems in rebuilding $0 when fields were changed have been
100     fixed.
101
102 10. `FS = FS' now correctly turns off the use of FIELDWIDTHS.
103
104 11. Gawk now parses fields correctly when FS is a single character.
105
106 12. It is now possible for RS to be the NUL character ("\0").
107
108 13. Weird problems with number conversions on MIPS and other systems
109     have been fixed.
110
111 14. When parsing using FIELDWIDTHS is in effect, split() with no third
112     argument will still use the value of FS.
113
114 15. Large File Support for Solaris, HP-UX, AIX, and IRIX is now enabled at
115     compile time, thanks to Paul Eggert.
116
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
119     of as a core dump.
120
121 17. A bug in parsing hex escapes was fixed.
122
123 18. A weird bug with concatenation where one expression has side effects
124     that changes another was fixed.
125
126 19. printf/sprintf now behave much better for uses of the '0' and '#' flags
127     and with precisions and field widths.
128
129 20. Further strangenesses with concatenation and multiple accesses of some
130     of the special variables was fixed.
131
132 21. The Atari port is marked as no longer supported.
133
134 22. Build problems on HP-UX have been fixed.
135
136 23. Minor fixes and additional explanations added to the documentation.
137
138 24. For RS = "", even a single leading newline is now correctly stripped.
139
140 25. Obscure parsing problems for regex constants like /=.../ fixed, so
141     that a regex constant is recognized, and not the /= operator.
142
143 26. Fixed a bug when closing a redirection that matched the current
144     or last FILENAME.
145
146 27. Build problems on AIX fixed.
147
148 Changes from 3.0.2 to 3.0.3
149 ---------------------------
150
151 The horrendous per-record memory leak introduced in 3.0.1 is gone, finally.
152
153 The `amiga' directory is now gone; Amiga support is now entirely handled
154 by the POSIX support.
155
156 Win32 support has been added in the `pc' directory. See `README_d/README.pc'
157 for more info.
158
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.
162
163 A minor memory leak that occurred when using `next' from within a
164 function has also been fixed.
165
166 Problems with I/O from sub-processes via a pipe are now gone.
167
168 Using "/dev/pid" and the other special /dev files no longer causes a core dump.
169
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.
172
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.
175
176 Array performance should be much better for very very large arrays. "Virtual
177 memory required, real memory helpful."
178
179 builtin.c:do_substr rationalized, again.
180
181 The --re-interval option now works as advertised.
182
183 The license text on some of the missing/* files is now generic.
184
185 Lots more new test cases.
186
187 Lots of other small bugs fixed, see the ChangeLog files for details.
188
189 Changes from 3.0.1 to 3.0.2
190 ---------------------------
191
192 Gawk now uses autoconf 2.12.
193
194 strftime now behaves correctly if passed an empty format string or if
195 the string formats to an empty result string.
196
197 Several minor compilation and installation problems have been fixed.
198
199 Minor page break issues in the user's guide have been fixed.
200
201 Lexical errors no longer repeat ad infinitum.
202
203 Changes from 3.0.0 to 3.0.1
204 ---------------------------
205
206 Troff source for a handy-dandy five color reference card is now provided.
207 Thanks to SSC for their macros.
208
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
212 reflect this.
213
214 Tons and tons of small bugs fixed and new tests added, see the ChangeLogs.
215
216 Lots fewer compile time warnings from gcc -Wall. Remaining ones aren't
217 worth fixing.
218
219 Gawk now pays some attention to the locale settings.
220
221 Fixes to gsub to catch several corner cases.
222
223 The `print' statement now evaluates all expressions first, and then
224 prints them. This leads to less suprising behaviour if any expression has
225 output side effects.
226
227 Miscellanious improvements in regex.h and regex.c.
228
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.
235
236 `--posix' turns on interval expressions. Gawk now matches its documentation.
237
238 `close(FILENAME)' now does something meaningful.
239
240 Field management code in field.c majorly overhauled, several times.
241
242 The gensub code has been fixed, several bugs are now gone.
243
244 Gawk will use mmap for data file input if it is available.
245
246 The printf/sprintf code has been improved.
247
248 Minor issues in Makefile setup worked on and improved.
249
250 builtin.c:do_substr rationalized.
251
252 Regex matching fixed so that /+[0-9]/ now matches the leading +.
253
254 For building on vms, the default compiler is now DEC C rather than VAX C.
255
256 Changes from 2.15.6 to 3.0.0
257 ----------------------------
258
259 Fixed spelling of `Programming' in the copyright notice in all the files.
260
261 New --re-interval option to turn on interval expressions. They're off
262 by default, except for --posix, to avoid breaking old programs.
263
264 Passing regexp constants as parameters to user defined functions now
265 generates a lint warning.
266
267 Several obscure regexp bugs fixed; alas, a small number remain.
268
269 The manual has been thoroughly revised. It's now almost 50% bigger than
270 it used to be.
271
272 The `+' modifier in printf is now reset correctly for each item.
273
274 The do_unix variable is now named do_traditional.
275
276 Handling of \ in sub and gsub rationalized (somewhat, see the manual for
277 the gory [and I do mean gory] details).
278
279 IGNORECASE now uses ISO 8859-1 Latin-1 instead of straight ASCII. See the
280 source for how to revert to pure ASCII.
281
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."
285
286 %hf and %Lf are now diagnosed as invalid in printf, just like %lf.
287
288 Gawk no longer incorrectly closes stdin in child processes used in
289 input pipelines.
290
291 For integer formats, gawk now correctly treats the precision as the
292 number of digits to print, not the number of characters.
293
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.
296
297 New gensub function added. See the manual.
298
299 If do_tradtional is true, octal and hex escapes in regexp constants are
300 treated literally.  This matches historical behavior.
301
302 yylex/nextc fixed so that even null characters can be included
303 in the source code.
304
305 do_format now handles cases where a format specifier doesn't end in
306 a control letter. --lint reports an error.
307
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.
310
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
313 old code.)
314
315 Arrays that max out are now handled correctly.
316
317 Integer formats outside the range of an unsigned long are now detected
318 correctly using the SunOS 4.x cc compiler.
319
320 --traditional option added as new preferred name for --compat, in keeping
321 with GCC.
322
323 --lint-old option added, so that warnings about things not in old awk
324 are only given if explicitly asked for.
325
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.
328
329 Gawk with --lint will now notice empty source files and empty data files.
330
331 Amiga support using the Unix emulation added. Thanks to fnf@ninemoons.com.
332
333 test/Makefile is now "parallel-make safe".
334
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.
339
340 IGNORECASE now applies to string comparison as well as regexp operations.
341
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.
345
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.
349
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
352 compatibility mode.
353
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.)
359
360 The source code has been cleaned up somewhat and the formatting improved.
361
362 Changes from 2.15.5 to 2.15.6
363 -----------------------------
364
365 Copyrights updated on all changed files.
366
367 test directory enhanced with four new tests.
368
369 Gawk now generates a warning for \x without following hexadecimal digits.
370 In this case, it returns 'x', not \0.
371
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)
376
377 gawk.1 updated with new BUG REPORTS section.
378
379 A plain `print' inside a BEGIN or END now generates a lint warning (awk.y).
380
381 Small fix in iop.c:get_a_record to avoid reading uninitialized memory.
382
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.
385
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.
388
389 Empty function bodies are now allowed (awk.y).
390
391 Gawk now detects duplicate parameter names in functions (awk.y).
392
393 New function `error' in msg.c added for use from awk.y.
394
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.
398
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]
402
403 builtin.c now declares the random() related functions based on
404 RANDOM_MISSING from config.h. [Suggested by Pat Rankin]
405
406 awk.h now handles alloca correctly for HP-UX. [Kaveh Ghazi]
407
408 regex.h and config/cray60 updated for Unicos 8.0. [Hal Peterson]
409
410 Fixed re.c and dfa.c so that gawk no longer leaks memory when using
411 lots of dynamic regexps.
412
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'.
415
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.
419
420 Gawk now correctly handles RS = "" when input is from a terminal
421 (iop.c:get_a_record).
422
423 Config file added for GNU.
424
425 gawk 'BEGIN { exit 1 } ; END { exit }' now exits 1, as it should
426 (eval.c:interpret).
427
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).
431
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).
434
435 Gawk now correctly recomputes string values for numbers if CONVFMT has
436 changed (awk.h:force_string, node.c:r_force_string).
437
438 A regexp of the form `/* this looks like a comment but is not */' will
439 now generate a warning from --lint (awk.y).
440
441 Gawk will no longer core dump if given an empty input file (awk.y:get_src_buf,
442 iop.c:optimal_bufsize).
443
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].
446
447 Lynxos config file added.
448
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).
452
453 Bug fix in string concatenation, an arbitrary number of expressions
454 are allowed (eval.c).
455
456 $1 += $2 now works correctly (eval.c).
457
458 Changing IGNORECASE no longer resets field-splitting to FS if it was
459 using FIELDWIDTHS (eval.c, field.c).
460
461 Major enhancement: $0 and NF for last record read are now preserved
462 into the END rule (io.c).
463
464 Regexp fixes:
465         /./ now matches a newline (regex.h)
466         ^ and $ match beginning and end of string only, not any embedded
467                 newlines (re.c)
468         regex.c should compile and work ok on 64-bit mips/sgi machines
469
470 Changes from 2.15.4 to 2.15.5
471 -----------------------------
472
473 FUTURES file updated and re-arranged some with more rational schedule.
474
475 Many prototypes handled better for ANSI C in protos.h.
476
477 getopt.c updated somewhat.
478
479 test/Makefile now removes junk directory, `bardargtest' renamed `badargs.'
480
481 Bug fix in iop.c for RS = "". Eat trailing newlines off of record separator.
482
483 Bug fix in Makefile.bsd44, use leading tab in actions.
484
485 Fix in field.c:set_FS for FS == "\\" and IGNORECASE != 0.
486
487 Config files updated or added:
488         cray60, DEC OSF/1 2.0, Utek, sgi405, next21, next30, atari/config.h,
489         sco.
490
491 Fix in io.c for ENFILE as well as EMFILE, update decl of groupset to
492 include OSF/1.
493
494 Rationalized printing as integers if numbers are outside the range of a long.
495 Changes to node.c:force_string and builtin.c.
496
497 Made internal NF, NR, and FNR variables longs instead of ints.
498
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.
502
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.
505
506 Fix eval.c to print out array names of arrays used in scalar contexts.
507
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.
510
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.
513
514 Fix to sc_parse_field in field.c to catch the case of the FS character at the
515 end of a record.
516
517 Lots of miscellanious bug fixes for memory leaks, courtesy Mark Moraes,
518 also fixes for arrays.
519
520 io.c fixed to warn about lack of explicit closes if --lint.
521
522 Updated missing/strftime.c to match posted strftime 6.2.
523
524 Bug fix in builtin.c, in case of non-match in sub_common.
525
526 Updated constant used for division in builtin.c:do_rand for DEC Alpha
527 and CRAY Y-MP.
528
529 POSIXLY_CORRECT in the environment turns on --posix (fixed in main.c).
530
531 Updated srandom prototype and calls in builtin.c.
532
533 Fix awk.y to enforce posix semantics of unary +: result is numeric.
534
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) {
538                 blah
539                 if (index2 in array)    # blew away the for
540                         stuff
541         }
542
543 Fixed spelling errors in the man page.
544
545 Fixes in awk.y so that
546         gawk '' /path/to/file
547 will work without core dumping or finding parse errors.
548
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.
551
552 Bug fix in dfa.c to not attempt to free null pointers.
553
554 Bug fix in builtin.c to only use DEFAULT_G_PRECISION for %g or %G.
555
556 Bug fix in field.c to achieve call by value semantics for split.
557
558 Changes from 2.15.3 to 2.15.4
559 -----------------------------
560
561 Lots of lint fixes, and do_sprintf made mostly ANSI C compatible.
562
563 Man page updated and edited.
564
565 Copyrights updated.
566
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.
570
571 New `delete array' feature added.  Only documented in the man page.
572
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.
575
576 Disabled GNU regex ops.
577
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.
580
581 New bionic (faster, better, stronger than before) hashing function.
582
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.
585
586 Many changes for systems where sizeof(int) != sizeof(void *).
587
588 Add explicit alloca(0) in io.c to recover space from C alloca.
589
590 Fixed file descriptor leak in io.c.
591
592 The --version option now follows the GNU coding standards and exits.
593
594 Fixed several prototypes in protos.h.
595
596 Several tests updated. On Solaris, warn that the out? tests will fail.
597
598 Configuration files for SunOS with cc and Solaris 2.x added.
599
600 Improved error messages in awk.y on gawk extensions if do_unix or do_compat.
601
602 INSTALL file added.
603
604 Fixed Atari Makefile and several VMS specific changes.
605
606 Better conversion of numbers to strings on systems with broken sprintfs.
607
608 Changes from 2.15.2 to 2.15.3
609 -----------------------------
610
611 Increased HASHSIZE to a decent number, 127 was way too small.
612
613 FILENAME is now the null string in a BEGIN rule.
614
615 Argument processing fixed for invalid options and missing arguments.
616
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.
619
620 More getpgrp() defines.
621
622 Changes for BSD44:  <sys/param.h> in io.c and Makefile.bsd44.
623
624 All directories in the distribution are now writable.
625
626 Separated LDFLAGS and CFLAGS in Makefile.  CFLAGS can now be overridden by
627   user.
628
629 Make dist now builds compressed archives ending in .gz and runs doschk.
630
631 Amiga port.
632
633 New getopt.c fixes Alpha OSF/1 problem.
634
635 Make clean now removes possible test output.
636
637 Improved algorithm for multiple adjacent string concatenations leads to
638   performance improvements.
639
640 Fix nasty bug whereby command-line assignments, both with -v and at run time,
641    could create variables with syntactically illegal names.
642
643 Fix obscure bug in printf with %0 flag and filling.
644
645 Add a lint check for substr if provided length exceeds remaining characters
646    in string.
647
648 Update atari support.
649
650 PC support enhanced to include support for both DOS and OS/2. (Lots more
651    #ifdefs. Sigh.)
652
653 Config files for Hitachi Unix and OSF/1, courtesy of Yoko Morishita
654    (morisita@sra.co.jp)
655
656 Changes from 2.15.1 to 2.15.2
657 -----------------------------
658
659 Additions to the FUTURES file.
660
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.
664
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.
668
669 Changes from 2.15 to 2.15.1
670 ---------------------------
671
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.
674
675 Removed YYMAXDEPTH define in awk.y which was limiting the parser stack depth.
676
677 Changes to config/bsd44, Makefile.bsd44 and configure to bring it into line
678   with the BSD4.4 release.
679
680 Changed Makefile to use prefix, exec_prefix, bindir etc.
681
682 make install now installs info files.
683
684 make install now sets permissions on installed files.
685
686 Make targets added:  uninstall, distclean, mostlyclean and realclean.
687
688 Added config.h to cleaner and clobber make targets.
689
690 Changes to config/{hpux8x,sysv3,sysv4,ultrix41} to deal with alloca().
691
692 Change to getopt.h for portability.
693
694 Added more special cases to the getpgrp() call.
695
696 Added README.ibmrt-aos and config/ibmrt-aos.
697
698 Changes from 2.14 to 2.15
699 ---------------------------
700
701 Command-line source can now be mixed with library functions.
702
703 ARGIND variable tracks index in ARGV of FILENAME.
704
705 GNU style long options in addition to short options.
706
707 Plan 9 style special files interpreted by gawk:
708         /dev/pid
709         /dev/ppid
710         /dev/pgrpid
711         /dev/user
712                 $1 = getuid
713                 $2 = geteuid
714                 $3 = getgid
715                 $4 = getegid
716                 $5 ... $NF = getgroups if supported
717
718 ERRNO variable contains error string if getline or close fails.
719
720 Very old options -a and -e have gone away.
721
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.
724
725 A README.amiga has been added.
726
727 The "too many arguments supplied for format string" warning message is only
728   in effect under the lint option.
729
730 Code improvements in dfa.c.
731
732 Fixed all reported bugs:
733
734         Writes are checked for failure (such as full filesystem).
735
736         Stopped (at least some) runaway error messages.
737
738         gsub(/^/, "x") does the right thing for $0 of 0, 1, or more length.
739
740         close() on a command being piped to a getline now works properly.
741
742         The input record will no longer be freed upon an explicit close()
743         of the input file.
744
745         A NUL character in FS now works.
746
747         In a substitute, \\& now means a literal backslash followed by what
748         was matched.
749
750         Integer overflow of substring length in substr() is caught.
751
752         An input record without a newline termination is handled properly.
753
754         In io.c, check is against only EMFILE so that system file table
755           is not filled.
756
757         Renamed all files with names longer than 14 characters.
758
759         Escaped characters in regular expressions were being lost when 
760           IGNORECASE was used.
761
762         Long source lines were not being handled properly.
763
764         Sourcefiles that ended in a tab but no newline were bombing.
765
766         Patterns that could match zero characters in split() were not working
767           properly.
768
769         The parsedebug option was not working.
770
771         The grammar was being a bit too lenient, allowing some very dubious
772           programs to pass.
773
774         Compilation with DEBUG defined now works.
775
776         A variable read in with getline was not being treated as a potential
777           number.
778
779         Array subscripts were not always of string type.
780
781
782 Changes from 2.13.2 to 2.14
783 ---------------------------
784
785 Updated manual!
786
787 Added "next file" to skip efficiently to the next input file.
788
789 Fixed potential of overflowing buffer in do_sprintf().
790
791 Plugged small memory leak in sub_common().
792
793 EOF on a redirect is now "sticky" -- it can only be cleared by close()ing
794   the pipe or file.
795
796 Now works if used via a #! /bin/gawk line at the top of an executable file
797   when that line ends with whitespace.
798
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.
802
803 Negative integer exponents now work.
804
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.
808
809 A fix to floating point comparisons so that NaNs compare right on IEEE systems.
810
811 Added code to make sure we're not opening directories for reading and such.
812
813 Added code to do better diagnoses of weird or null file names.
814
815 Allow continue outside of a loop, unless in strict posix mode.  Lint option
816   will issue warning.
817
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.
822
823 Error messages now conform to GNU standard (I hope).
824
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
830   comparison rules.)
831
832 The length of a string was a short and now is a size_t.
833
834 Updated VMS help.
835
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
838   "good" output.
839
840 Fixed a couple of bugs for reference to $0 when $0 is "" -- particularly in
841   a BEGIN block.
842
843 Fixed premature freeing in construct "$0 = $0".
844
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.
848
849 Regexp can (once again) match a newline, if given explicitly.
850
851 nextopen() makes sure file name is null terminated.
852
853 Fixed VMS pipe simulation.  Improved VMS I/O performance.
854
855 Catch . used in variable names.
856
857 Fixed bug in getline without redirect from a file -- it was quitting after the
858   first EOF, rather than trying the next file.
859
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.
863
864 Moved setting of regexp syntax to before the option parsing in main(), to
865   handle things like -v FS='[.,;]'
866
867 Fixed bug when NF is set by user -- fields_arr must be expanded if necessary
868   and "new" fields must be initialized.
869
870 Fixed several bugs in [g]sub() for no match found or the match is 0-length.
871
872 Fixed bug where in gsub() a pattern anchored at the beginning would still
873   substitute throughout the string.
874
875 make test does not assume that . is in PATH.
876
877 Fixed bug when a field beyond the end of the record was requested after
878   $0 was altered (directly or indirectly).
879
880 Fixed bug for assignment to field beyond end of record -- the assigned value
881   was not found on subsequent reference to that field.
882
883 Fixed bug for FS a regexp and it matches at the end of a record.
884
885 Fixed memory leak for an array local to a function.
886
887 Fixed hanging of pipe redirection to getline
888
889 Fixed coredump on access to $0 inside BEGIN block.
890
891 Fixed treatment of RS = "".  It now parses the fields correctly and strips
892   leading whitespace from a record if FS is a space.
893
894 Fixed faking of /dev/stdin.
895
896 Fixed problem with x += x
897
898 Use of scalar as array and vice versa is now detected.
899
900 IGNORECASE now obeyed for FS (even if FS is a single alphabetic character).
901
902 Switch to GPL version 2.
903
904 Renamed awk.tab.c to awktab.c for MSDOS and VMS tar programs.
905
906 Renamed this file (CHANGES) to NEWS.
907
908 Use fmod() instead of modf() and provide FMOD_MISSING #define to undo
909   this change.
910
911 Correct the volatile declarations in eval.c.
912
913 Avoid errant closing of the file descriptors for stdin, stdout and stderr.
914
915 Be more flexible about where semi-colons can occur in programs.
916
917 Check for write errors on all output, not just on close().
918
919 Eliminate the need for missing/{strtol.c,vprintf.c}.
920
921 Use GNU getopt and eliminate missing/getopt.c.
922
923 More "lint" checking.
924
925
926 Changes from 2.13.1 to 2.13.2
927 -----------------------------
928
929 Toward conformity with GNU standards, configure is a link to mkconf, the latter
930   to disappear in the next major release.
931
932 Update to config/bsd43.
933
934 Added config/apollo, config/msc60, config/cray2-50, config/interactive2.2
935
936 sgi33.cc added for compilation using cc rather than gcc.
937
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.
941
942 Got rid of an unnecessary and troublesome declaration of vprintf().
943
944 Small improvement in locality of error messages.
945
946 Try to diagnose use of array as scalar and vice versa -- to be improved in
947   the future.
948
949 Fix for last bug fix for Cray division code--sigh.
950
951 More changes to test suite to explicitly use sh.  Also get rid of 
952   a few generated files.
953
954 Fixed off-by-one bug in string concatenation code.
955
956 Fix for use of array that is passed in from a previous function parameter.
957   Addition to test suite for above.
958
959 A number of changes associated with changing NF and access to fields
960   beyond the end of the current record.
961
962 Change to missing/memcmp.c to avoid seg. fault on zero length input.
963
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.
967
968 Changes from 2.13.0 to 2.13.1
969 -----------------------------
970
971 More configs and PORTS.
972
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
975   Cray *and* fixed.
976
977 Fixed bug in modulus implementation -- it was very close to the above
978   code, so I noticed it.
979
980 Fixed portability problem with limits.h in missing.c
981
982 Fixed portability problem with tzname and daylight -- define TZNAME_MISSING
983   if strftime() is missing and tzname is also.
984
985 Better support for Latin-1 character set.
986
987 Fixed portability problem in test Makefile.
988
989 Updated PROBLEMS file.
990
991 =============================== gawk-2.13 released =========================
992 Changes from 2.12.42 to 2.12.43
993 -------------------------------
994
995 Typo in awk.y
996
997 Fixed up strftime.3 and added doc. for %V.
998
999 Changes from 2.12.41 to 2.12.42
1000 -------------------------------
1001
1002 Fixed bug in devopen() -- if you had write permission in /dev,
1003   it would just create /dev/stdout etc.!!
1004
1005 Final (?) VMS update.
1006
1007 Make NeXT use GFMT_WORKAROUND
1008
1009 Fixed bug in sub_common() for substitute on zero-length match.  Improved the
1010   code a bit while I was at it.
1011
1012 Fixed grammar so that $i++ parses as ($i)++
1013
1014 Put support/* back in the distribution (didn't I already do this?!)
1015
1016 Changes from 2.12.40 to 2.12.41
1017 -------------------------------
1018
1019 VMS workaround for broken %g format.
1020
1021 Changes from 2.12.39 to 2.12.40
1022 -------------------------------
1023
1024 Minor man page update.
1025
1026 Fixed latent bug in redirect().
1027
1028 Changes from 2.12.38 to 2.12.39
1029 -------------------------------
1030
1031 Updates to test suite -- remove dependence on changing gawk.1 man page.
1032
1033 Changes from 2.12.37 to 2.12.38
1034 -------------------------------
1035
1036 Fixed bug in use of *= without whitespace following.
1037
1038 VMS update.
1039
1040 Updates to man page.
1041
1042 Option handling updates in main.c
1043
1044 test/manyfiles redone and added to bigtest.
1045
1046 Fixed latent (on Sun) bug in handling of save_fs.
1047
1048 Changes from 2.12.36 to 2.12.37
1049 -------------------------------
1050
1051 Update REL in Makefile-dist.  Incorporate test suite into main distribution.
1052
1053 Minor fix in regtest.
1054
1055 Changes from 2.12.35 to 2.12.36
1056 -------------------------------
1057
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
1061   to change.
1062
1063 Cray updates to deal with arithmetic problems.
1064
1065 Minor test suite updates.
1066
1067 Fixed latent bug in parser (freeing memory).
1068
1069 Changes from 2.12.34 to 2.12.35
1070 -------------------------------
1071
1072 VMS updates.
1073
1074 Flush stdout at top of err() and stderr at bottom.
1075
1076 Fixed bug in eval_condition() -- it wasn't testing for MAYBE_NUM and
1077   doing the force_number().
1078
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.
1081
1082 Changes from 2.12.33 to 2.12.34
1083 -------------------------------
1084
1085 Atari updates -- including bug fix.
1086
1087 More VMS updates -- also nuke vms/version.com.
1088
1089 Fixed bug in handling of large numbers of redirections -- it was probably never
1090   tested before (blush!).
1091
1092 Minor rearrangement of code in r_force_number().
1093
1094 Made chem and regtest tests a bit more portable (Ultrix again).
1095
1096 Added another test -- manyfiles -- not invoked under any other test -- very Unix
1097   specific.
1098
1099 Rough beginning of LIMITATIONS file -- need my AWK book to complete it.
1100
1101 Changes from 2.12.32 to 2.12.33
1102 -------------------------------
1103
1104 Expunge debug.? from various files.
1105
1106 Remove vestiges of Floor and Ceil kludge.
1107
1108 Special case integer division -- mainly for Cray, but maybe someone else
1109   will benefit.
1110
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.
1114
1115 Fixed memory leak in assoc_lookup().
1116
1117 Small cleanup in test suite.
1118
1119 Changes from 2.12.31 to 2.12.32
1120 -------------------------------
1121
1122 Nuked debug.c and debugging flag -- there are better ways.
1123
1124 Nuked version.sh and version.c in subdirectories.
1125
1126 Fixed bug in handling of IGNORECASE.
1127
1128 Fixed bug when FIELDWIDTHS was set via -v option.
1129
1130 Fixed (obscure) bug when $0 is assigned a numerical value.
1131
1132 Fixed so that escape sequences in command-line assignments work (as it already
1133   said in the comment).
1134
1135 Added a few cases to test suite.
1136
1137 Moved support/* back into distribution.
1138
1139 VMS updates.
1140
1141 Changes from 2.12.30 to 2.12.31
1142 -------------------------------
1143
1144 Cosmetic manual page changes.
1145
1146 Updated sunos3 config.
1147
1148 Small changes in test suite including renaming files over 14 chars. in length.
1149
1150 Changes from 2.12.29 to 2.12.30
1151 -------------------------------
1152
1153 Bug fix for many string concatenations in a row.
1154
1155 Changes from 2.12.28 to 2.12.29
1156 -------------------------------
1157
1158 Minor cleanup in awk.y
1159
1160 Minor VMS update.
1161  
1162 Minor atari update.
1163
1164 Changes from 2.12.27 to 2.12.28
1165 -------------------------------
1166
1167 Got rid of the debugging goop in eval.c -- there are better ways.
1168
1169 Sequent port.
1170
1171 VMS changes left out of the last patch -- sigh!  config/vms.h renamed
1172   to config/vms-conf.h.
1173
1174 Fixed missing/tzset.c
1175
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.
1178
1179 Tuned get_field() -- it was unnecessarily parsing the whole record on reference
1180   to $0.
1181
1182 Tuned interpret() a bit in the rule_node loop.
1183
1184 In r_force_number(), worked around bug in Uglix strtod() and got rid of 
1185   ugly do{}while(0) at Michal's urging.
1186
1187 Replaced do_deref() and deref with unref(node) -- much cleaner and a bit faster.
1188
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.
1191
1192 Replaced make_number() and tmp_number() with macros that call mk_number().
1193
1194 Changed freenode() and newnode() into macros -- the latter is getnode()
1195   which calls more_nodes() as necessary.
1196
1197 Changes from 2.12.26 to 2.12.27
1198 -------------------------------
1199
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).
1203
1204 More VMS updates.
1205
1206 Moved kludge over yacc's insertion of malloc and realloc declarations
1207   from protos.h to the Makefile.
1208
1209 Added a lisp interpreter in awk to the test suite.  (Invoked under
1210   bigtest.)
1211
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.
1214
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.
1217
1218 Changes from 2.12.25 to 2.12.26
1219 -------------------------------
1220
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
1225   off.
1226
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
1229   on this.
1230
1231 Minor atari updates.
1232
1233 Minor vms update.
1234
1235 Missing file from MSDOS port.
1236
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).
1239
1240 Changes from 2.12.24 to 2.12.25
1241 -------------------------------
1242
1243 MSDOS port.
1244
1245 Non-consequential changes to regexp variables in preparation for
1246   a more serious change to fix a serious performance problem.
1247
1248 Changes from 2.12.23 to 2.12.24
1249 -------------------------------
1250
1251 Fixed bug in output flushing introduced a few patches back.  This caused
1252   serious performance losses.
1253
1254 Changes from 2.12.22 to 2.12.23
1255 -------------------------------
1256
1257 Accidentally left config/cray2-60 out of last patch.
1258
1259 Added some missing dependencies to Makefile.
1260
1261 Cleaned up mkconf a bit; made yacc the default parser (no alloca needed,
1262   right?); added rs6000 hook for signed characters.
1263
1264 Made regex.c with NO_ALLOCA undefined work.
1265
1266 Fixed bug in dfa.c for systems where free(NULL) bombs.
1267
1268 Deleted a few cant_happen()'s that *really* can't hapen.
1269
1270 Changes from 2.12.21 to 2.12.22
1271 -------------------------------
1272
1273 Added to config stuff the ability to choose YACC rather than bison.
1274
1275 Fixed CHAR_UNSIGNED in config.h-dist.
1276
1277 Second arg. of strtod() is char ** rather than const char **. 
1278
1279 stackb is now initially malloc()'ed since it may be realloc()'ed.
1280
1281 VMS updates.
1282
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??)
1285
1286 re_compile_pattern()'s size is now size_t unconditionally.
1287
1288 Changes from 2.12.20 to 2.12.21
1289 -------------------------------
1290
1291 Corrected missing/gcvt.c.
1292
1293 Got rid of use of dup2() and thus DUP_MISSING.
1294
1295 Updated config/sgi33.
1296
1297 Turned on (and fixed) in cmp_nodes() the behaviour that I *hope* will be in
1298   POSIX 1003.2 for relational comparisons.
1299
1300 Small updates to test suite.
1301
1302 Changes from 2.12.19 to 2.12.20
1303 -------------------------------
1304
1305 Sloppy, sloppy, sloppy!!  I didn't even try to compile the last two
1306   patches.  This one fixes goofs in regex.c.
1307
1308 Changes from 2.12.18 to 2.12.19
1309 -------------------------------
1310
1311 Cleanup of last patch.
1312
1313 Changes from 2.12.17 to 2.12.18
1314 -------------------------------
1315
1316 Makefile renamed to Makefile-dist.
1317
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
1321   accordingly.
1322
1323 Reorganized output flushing to correspond with new semantics of
1324   devopen() on "/dev/std*" etc.
1325
1326 Fixed rest of last goof!!
1327
1328 Save and restore errno in do_pathopen().
1329
1330 Miscellaneous atari updates.
1331
1332 Get rid of the trailing comma in the NODETYPE definition (Cray
1333   compiler won't take it).
1334
1335 Try  to make the use of `const' consistent since Cray compiler is
1336   fussy about that.  See the changes to `basename' and `myname'.
1337
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.
1344
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.)
1347
1348 Added a configuration file, config/cray60, for Unicos-6.0.
1349
1350 Changes from 2.12.16 to 2.12.17
1351 -------------------------------
1352
1353 Ooops.  Goofed signal use in last patch.
1354
1355 Changes from 2.12.15 to 2.12.16
1356 -------------------------------
1357
1358 RENAMED *_dir to just * (e.g. missing_dir).
1359
1360 Numerous VMS changes.
1361
1362 Proper inclusion of atari and vms files.
1363
1364 Added experimental (ifdef'd out) RELAXED_CONTINUATION and DEFAULT_FILETYPE
1365  -- please comment on these!
1366
1367 Moved pathopen() to io.c (sigh).
1368
1369 Put local directory ahead in default AWKPATH.
1370
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"
1376   or the like.
1377
1378 Prototype fix for V.4
1379
1380 Fixed version_string to not print leading @(#).
1381
1382 Fixed FIELDWIDTHS to work with strict (turned out to be easy).
1383
1384 Fixed conf for V.2.
1385
1386 Changed semantics of /dev/fd/n to be like on real /dev/fd.
1387
1388 Several configuration and updates in the makefile.
1389
1390 Updated manpage.
1391
1392 Include tzset.c and system.c from missing_dir that were accidently left out of
1393   the last patch.
1394
1395 Fixed bug in cmdline variable assignment -- arg was getting freed(!) in
1396   call to variable.
1397
1398 Backed out of parse-time constant folding for now, until I can figure out
1399   how to do it right.
1400
1401 Fixed devopen() so that getline <"-" works.
1402
1403 Changes from 2.12.14 to 2.12.15
1404 -------------------------------
1405
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.
1411
1412 Fixed bug in grammar -- didn't allow function definition to be separated from 
1413   other rules by a semi-colon.
1414
1415 VMS fix to #includes in missing.c -- should we just be including awk.h?
1416
1417 Updated README for texinfo.tex version.
1418
1419 Updating of copyright in all .[chy] files.
1420
1421 Added but commented out Michal's fix to strftime.
1422
1423 Added tzset() emulation based on Rick Adams' code.  Added TZSET_MISSING to
1424         config.h-dist.
1425
1426 Added strftime.3 man page for missing_dir
1427
1428 More posix:     func, **, **= don't work in -W posix
1429
1430 More lint:      ^, ^= not in old awk
1431
1432 gawk.1:         removed ref to -DNO_DEV_FD, other minor updating.
1433
1434 Style change:  pushbak becomes pushback() in yylex().
1435
1436 Changes from 2.12.13 to 2.12.14
1437 -------------------------------
1438
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
1441   files.
1442
1443 Change to handling of SYSTEM_MISSING.
1444
1445 Small change to ultrix config.
1446
1447 Do "/dev/fd/*" etc. checking at runtime.
1448
1449 First pass at VMS port.
1450
1451 Improvements to error handling (when lexeme spans buffers).
1452
1453 Fixed backslash handling -- why didn't I notice this sooner?
1454
1455 Added programs from book to test suite and new target "bigtest" to Makefile.
1456
1457 Changes from 2.12.12 to 2.12.13
1458 -------------------------------
1459
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).
1463
1464 Somewhat pervasive changes to reconcile CONVFMT vs. OFMT.
1465
1466 Better initialization of builtin vars.
1467
1468 Make config/* consistent wrt STRTOL_MISSING.
1469
1470 Small portability improvement to alloca.s
1471
1472 Improvements to lint code in awk.y
1473
1474 Replaced strtol() with a better one by Chris Torek.
1475
1476 Changes from 2.12.11 to 2.12.12
1477 -------------------------------
1478
1479 Added PORTS file to record successful ports.
1480
1481 Added #define const to nothing if not STDC and added const to strtod() header.
1482
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
1486   do_sprintf().
1487
1488 Added warning for /regexp/ on LHS of MATCHOP.
1489
1490 Changes from 2.12.10 to 2.12.11
1491 -------------------------------
1492
1493 Small Makefile improvements.
1494
1495 Some remaining nits from the NeXT port.
1496
1497 Got rid of bcopy() define in awk.h -- not needed anymore (??)
1498
1499 Changed private in builtin.c -- it is special on Sequent.
1500
1501 Added subset implementation of strtol() and STRTOL_MISSING.
1502
1503 A little bit of cleanup in debug.c, dfa.c.
1504
1505 Changes from 2.12.9 to 2.12.10
1506 ------------------------------
1507
1508 Redid compatability checking and checking for # of args.
1509
1510 Removed all references to variables[] from outside awk.y, in preparation
1511   for a more abstract interface to the symbol table.
1512
1513 Got rid of a remaining use of bcopy() in regex.c.
1514
1515 Changes from 2.12.8 to 2.12.9
1516 -----------------------------
1517
1518 Portability improvements for atari, next and decstation.
1519
1520 Bug fix in substr() -- wasn't handling 3rd arg. of -1 properly.
1521
1522 Manpage updates.
1523
1524 Moved support from src release to doc release.
1525
1526 Updated FUTURES file.
1527
1528 Added some "lint" warnings.
1529
1530 Changes from 2.12.7 to 2.12.8
1531 -----------------------------
1532
1533 Changed time() to systime().
1534
1535 Changed warning() in snode() to fatal().
1536
1537 strftime() now defaults second arg. to current time.
1538
1539 Changes from 2.12.6 to 2.12.7
1540 -----------------------------
1541
1542 Fixed bug in sub_common() involving inadequate allocation of a buffer.
1543
1544 Added some missing files to the Makefile.
1545
1546 Changes from 2.12.5 to 2.12.6
1547 -----------------------------
1548
1549 Fixed bug wherein non-redirected getline could call iop_close() just
1550   prior to a call from do_input().
1551
1552 Fixed bug in handling of /dev/stdout and /dev/stderr.
1553
1554 Changes from 2.12.4 to 2.12.5
1555 -----------------------------
1556
1557 Updated README and support directory.
1558
1559 Changes from 2.12.3 to 2.12.4
1560 -----------------------------
1561
1562 Updated CHANGES and TODO (should have been done in previous 2 patches).
1563
1564 Changes from 2.12.2 to 2.12.3
1565 -----------------------------
1566
1567 Brought regex.c and alloca.s into line with current FSF versions.
1568
1569 Changes from 2.12.1 to 2.12.2
1570 -----------------------------
1571
1572 Portability improvements; mostly moving system prototypes out of awk.h
1573
1574 Introduction of strftime.
1575
1576 Use of CONVFMT.
1577
1578 Changes from 2.12 to 2.12.1
1579 -----------------------------
1580
1581 Consolidated treatment of command-line assignments (thus correcting the
1582 -v treatment).
1583
1584 Rationalized builtin-variable handling into a table-driven process, thus
1585 simplifying variable() and eliminating spc_var().
1586
1587 Fixed bug in handling of command-line source that ended in a newline.
1588
1589 Simplified install() and lookup().
1590
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.
1593
1594 Treat IGNORECASE specially, simplifying a lot of code, and allowing
1595 checking against strict conformance only on setting it, rather than on each
1596 pattern match.
1597
1598 Fixed regexp matching when IGNORECASE is non-zero (broken when dfa.c was 
1599 added).
1600
1601 Fixed bug where $0 was not being marked as valid, even after it was rebuilt.
1602 This caused mangling of $0.
1603
1604
1605 Changes from 2.11.1 to 2.12
1606 -----------------------------
1607
1608 Makefile:
1609
1610 Portability improvements in Makefile.
1611 Move configuration stuff into config.h
1612
1613 FSF files:
1614
1615 Synchronized alloca.[cs] and regex.[ch] with FSF.
1616
1617 array.c:
1618
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
1622   array.
1623
1624 awk.h:
1625
1626 Merged non-prototype and prototype declarations in awk.h.
1627 Expanded tree_eval #define to short-circuit more calls of r_tree_eval().
1628
1629 awk.y:
1630
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
1643   run-time).
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.
1648
1649 builtin.c:
1650
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
1662   arguments supplied.
1663
1664 dfa.c
1665
1666 This is borrowed (almost unmodified) from GNU grep to provide faster searches.
1667
1668 eval.c
1669
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.
1677
1678 field.c
1679
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
1684   doesn't happen.
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.
1692
1693 gawk.1
1694
1695 Fixed troff formatting problem on .TP lines.
1696
1697 io.c
1698
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.
1703
1704 iop.c
1705
1706 This file contains a totally revamped get_a_record and associated code.
1707
1708 main.c
1709
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.
1717
1718
1719 node.c
1720
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
1723   string.
1724 Cleaned up and simplified do_deref().
1725 Fixed bug in handling of stref==255 in do_deref().
1726
1727 re.c
1728
1729 contains the interface to regexp code
1730
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)
1734
1735         * Makefile (YACC): Add -y to bison part.
1736
1737         * missing.c: Add #include <stdio.h>.
1738
1739 Sun Dec 24 16:16:05 1989  David J. MacKenzie  (djm at hobbes.ai.mit.edu)
1740
1741         * Makefile: Add (commented out) default defines for Sony News.
1742
1743         * awk.h: Move declaration of vprintf so it will compile when
1744         -DVPRINTF_MISSING is defined.
1745
1746 Mon Nov 13 18:54:08 1989  Robert J. Chassell  (bob at apple-gunkies.ai.mit.edu)
1747
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
1751           format this file.
1752
1753 Changes from 2.11beta to 2.11.1 (production)
1754 --------------------------------------------
1755
1756 Went from "beta" to production status!!!
1757
1758 Now flushes stdout before closing pipes or redirected files to
1759 synchronize output.
1760
1761 MS-DOS changes added in.
1762
1763 Signal handler return type parameterized in Makefile and awk.h and
1764 some lint removed.  debug.c cleaned up.
1765
1766 Fixed FS splitting to never match null strings, per book.
1767
1768 Correction to the manual's description of FS.
1769
1770 Some compilers break on char *foo = "string" + 4 so fixed version.sh and
1771 main.c.
1772
1773 Changes from 2.10beta to 2.11beta
1774 ---------------------------------
1775
1776 This release fixes all reported bugs that we could reproduce.  Probably
1777 some of the changes are not documented here.
1778
1779 The next release will probably not be a beta release!
1780
1781 The most important change is the addition of the -nostalgia option. :-)
1782
1783 The documentation has been improved and brought up-to-date.
1784
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
1790 etc.
1791
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.
1794
1795 Renamed source files to reflect (for the most part) their contents.
1796
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
1800 (provided).
1801
1802 Plugged many more memory leaks.  The memory consumption is now quite
1803 reasonable over a wide range of programs.
1804
1805 Uses volatile declaration if STDC > 0 to avoid problems due to longjmp.
1806
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.
1809
1810 Added -v option for setting variables before the first file is encountered.
1811 Version information now uses -V and copyleft uses -C.
1812
1813 Added a patchlevel.h file and its use for -V and -C.
1814
1815 Append_right() optimized for major improvement to programs with a *lot*
1816 of statements.
1817
1818 Operator precedence has been corrected to match draft Posix.
1819
1820 Tightened up grammar for builtin functions so that only length
1821 may be called without arguments or parentheses.
1822
1823 /regex/ is now a normal expression that can appear in any expression
1824 context.
1825
1826 Allow /= to begin a regexp.  Allow ..[../..].. in a regexp.
1827
1828 Allow empty compound statements ({}).
1829
1830 Made return and next illegal outside a function and in BEGIN/END respectively.
1831
1832 Division by zero is now illegal and causes a fatal error.
1833
1834 Fixed exponentiation so that x ^ 0 and x ^= 0 both return 1.
1835
1836 Fixed do_sqrt, do_log, and do_exp to do argument/return checking and
1837 print an error message, per the manual.
1838
1839 Fixed main to catch SIGSEGV to get source and data file line numbers.
1840
1841 Fixed yyerror to print the ^ at the beginning of the bad token, not the end.
1842
1843 Fix to substr() builtin:  it was failing if the arguments
1844 weren't already strings.
1845
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.
1854
1855 Simplification and efficiency improvement in force_string.
1856
1857 Added performance tweak in r_force_number().
1858
1859 Fixed a bug with nested loops and break/continue in functions.
1860
1861 Fixed inconsistency in handling of empty fields when $0 has to be rebuilt.
1862 Happens to simplify rebuild_record().
1863
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.
1868
1869 Cleaned up and fixed close_redir().
1870
1871 Fixed an obscure bug to do with redirection.  Intermingled ">" and ">>"
1872 redirects did not output in a predictable order.
1873
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.
1877
1878 Fixed a bug in get_a_record() where bcopy() could have copied over
1879 a random pointer.
1880
1881 Fixed a bug when RS="" and records separated by multiple blank lines.
1882
1883 Got rid of SLOWIO code which was out-of-date anyway.
1884
1885 Fix in get_field() for case where $0 is changed and then $(n) are
1886 changed and then $0 is used.
1887
1888 Fixed infinite loop on failure to open file for reading from getline.
1889 Now handles redirect file open failures properly.
1890
1891 Filenames such as /dev/stdin now allowed on the command line as well as
1892 in redirects.
1893
1894 Fixed so that gawk '$1' where $1 is a zero tests false.
1895
1896 Fixed parsing so that `RLENGTH -1' parses the same as `RLENGTH - 1',
1897 for example.
1898
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.
1902
1903 Now catches floating point exceptions to avoid core dumps.
1904
1905 Bug fix for deleting elements of an array -- under some conditions, it was
1906 deleting more than one element at a time.
1907
1908 Fix in AWKPATH code for running off the end of the string.
1909
1910 Fixed handling of precision in *printf calls.  %0.2d now works properly,
1911 as does %c.  [s]printf now recognizes %i and %X.
1912
1913 Fixed a bug in printing of very large (>240) strings.
1914
1915 Cleaned up erroneous behaviour for RS == "".
1916
1917 Added IGNORECASE support to index().
1918
1919 Simplified and fixed newnode/freenode.
1920
1921 Fixed reference to $(anything) in a BEGIN block.
1922
1923 Eliminated use of USG rand48().
1924
1925 Bug fix in force_string for machines with 16-bit ints.
1926
1927 Replaced use of mktemp() with tmpnam() and provided a partial implementation of
1928 the latter for systems that don't have it.
1929
1930 Added a portability check for includes in io.c.
1931
1932 Minor portability fix in alloc.c plus addition of xmalloc().
1933
1934 Portability fix:  on UMAX4.2, st_blksize is zero for a pipe, thus breaking
1935 iop_alloc() -- fixed.
1936
1937 Workaround for compiler bug on Sun386i in do_sprintf.
1938
1939 More and improved prototypes in awk.h.
1940
1941 Consolidated C escape parsing code into one place.
1942
1943 strict flag is now turned on only when invoked with compatability option.
1944 It now applies to fewer things.
1945
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).
1948
1949 Support for pipes under MSDOS added.