source: trunk/essentials/sys-apps/gawk/NEWS@ 3453

Last change on this file since 3453 was 3076, checked in by bird, 18 years ago

gawk 3.1.5

File size: 77.8 KB
Line 
1Changes from 3.1.4 to 3.1.5
2---------------------------
3
41. The random() suite has been updated to a current FreeBSD version, which
5 works on systems with > 32-bit ints.
6
72. A new option, `--exec' has been added. It's like -f but ends option
8 processing. It also disables `x=y' variable assignments, but not -v.
9 It's needed mainly for CGI scripts, so that source code can't be
10 passed in as part of the URL.
11
123. dfa.[ch] have been synced with GNU grep development. This also fixes
13 multiple regex matching problems in multibyte locales.
14
154. Updated to Automake 1.9.5.
16
175. Updated to Bison 2.0.
18
196. The getopt* and regex* files were synchronized with current GLIBC CVS.
20 See the ChangeLog for the versions and minor edits made.
21
227. `configure --disable-nls' now disables just gawk's own translations.
23 Gawk continues to work with the locale's numeric formatting. This
24 includes a bug fix in handling the printf ' flag (e.g., %'d).
25
268. Gawk is now multibyte aware. This means that index(), length(),
27 substr() and match() all work in terms of characters, not bytes.
28
299. Gawk is now smarter about parsing numeric constants in corner cases.
30
3111. Not closing open redirections no longer causes gawk to exit non-zero.
32
3310. The VMS port has been updated.
34
3511. Changes from Andrew Schorr at the xmlgawk project to provide for
36 open hooks from extensions are now included. This will let the
37 xmlgawk extension work in the standard gawk.
38
3912. Updated to gettext 0.14.4. Gawk no longer includes its own copy
40 of the gettext `intl' library, following current GNU practice to
41 rely on there being an external version thereof.
42
4313. A regexp of the form `//' will now generate a warning that it
44 is not a C++ comment from --lint (awk.y).
45
4614. The ^ and ^= operators with an integer exponent now use Exponentiation
47 by Squaring. This simultaneously fixes a problem with ^= and a negative
48 integer exponent.
49
5015. length(array) now returns the number of elements in the array. This is
51 is a non-standard extension that will fail in POSIX mode.
52
5316. Carriage return characters are now ignored in program source code.
54
5517. Four new translations added.
56
5718. Various minor bugs fixed. See the ChangeLog for the details.
58
59Changes from 3.1.3 to 3.1.4
60---------------------------
61
621. Gawk now supports the POSIX %F format, falling back to %f if the local
63 system printf doesn't handle it.
64
652. Gawk now supports the ' flag in printf. E.g., %'d in a locale with thousands
66 separators includes the thousands separator in the value, e.g. 12,345.
67
68 This has one problem; the ' flag is next to impossible to use on the
69 command line, without major quoting games. Oh well, TANSTAAFL.
70
713. The dfa code has been reinstated; the performance degradation was
72 just too awful. Sigh. (For fun, use `export GAWK_NO_DFA=1' to
73 see the difference.)
74
754. The special case `x = x y' is now recognized in the grammar, and gawk
76 now uses `realloc' to append the new value to the end of the existing
77 one. This can speed up the common case of appending onto a string.
78
795. The dfa code was upgraded with most of the fixes from grep 2.5.1, and
80 the regex code was upgraded with GLIBC as mid-January 2004. The regex
81 code is faster than it was, but still not as fast as the dfa code, so
82 the dfa code stays in. The getopt code was also synced to current GLIBC.
83
846. Support code upgraded to Automake 1.8.5, Autoconf 2.59, and gettext 0.14.1.
85
867. When --posix is in effect, sub/gsub now follow the 2001 POSIX behavior.
87 Yippee. This is even documented in the manual.
88
898. Gawk will now recover children that have died (input pipelines, two-way
90 pipes), upon detecting EOF from them, thus avoiding filling
91 up the process table. Open file descriptors are not recovered
92 (unfortunately), since that could break awk semantics. See the
93 ChangeLog and the source code for the details.
94
959. Handling of numbers like `0,1' in non-American locales ought to
96 work correctly now.
97
9810. IGNORECASE is now locale-aware for characters with values above 128.
99 The dfa matcher is now used for IGNORECASE matches too.
100
10111. Dynamic function loading is better. The documentation has been improved
102 and some new APIs for use by dynamic functions have been added.
103
10412. Gawk now has a fighting chance of working on older systems,
105 a la SunOS 4.1.x.
106
10713. Issues with multibyte support on HP-UX are now resolved. `configure' now
108 disables such support there, since it's not up to what gawk needs.
109
11014. There are now even more tests in the test suite.
111
11215. Various bugs fixed; see ChangeLog for the details.
113
114Changes from 3.1.2 to 3.1.3
115---------------------------
116
1171. Gawk now follows POSIX in handling of local numeric formats for
118 input, output and number/string conversions.
119
1202. Multibyte detection improved. See README_d/README.multibyte for more
121 info about multibyte locales.
122
1233. Handling of `close' made more POSIX-compliant for POSIXLY_CORRECT,
124 see the documentation.
125
1264. The record reading code was redone, again. This time it's much
127 better. Really!
128
1295. For RS = "\n" and RS = "", gawk now only sets RT when it has changed.
130 This provides considerable performance improvement.
131
1326. `match' now sets all the subscripts in the third argument array
133 correctly, even if not all subexpressions matched.
134
1357. Updated to Automake 1.7.5. configure.in renamed configure.ac.
136
1378. C-style switch statements are available, but must be enabled at
138 compile time via `configure --enable-switch'. For 3.2 they'll be
139 enabled by default. Thanks to Michael Benzinger for the initial
140 code.
141
1429. %c now always prints no more than one character, whatever
143 precision is provided.
144
14510. strtonum(<number>) now works again.
146
14711. Gawk is now much better about scalar/array typing of global
148 uninitiailzed variables passed as parameters. Once the parameter
149 is then used one way or the other, the global var's type is
150 adjusted accordingly. Thanks to Stepan Kasal for the original
151 (considerable) changes.
152
15312. Dynamic function loading under Windows32 should now be possible. See
154 README_d/README.pcdynamic. Thanks to Patrick T.J. McPhee for the changes.
155
15613. Updated to gettext 0.12.1.
157
15814. Gawk now follows historical practice and POSIX for the return
159 value of `rand': It's now 0 <= N < 1.
160
161Changes from 3.1.1 to 3.1.2
162---------------------------
163
1641. Loops of the form:
165
166 for (iggy in foo)
167 next
168
169 no longer leak memory.
170
1712. gawk -v FIELDWIDTHS="..." now sets PROCINFO["FS"] correctly.
172
1733. All builtin operations and functions should now fully evaluate their
174 arguments so that side effects take place correctly.
175
1764. Fixed a logic bug in gsub/gensub for matches to null strings that occurred
177 later in the string after a nonnull match.
178
1795. getgroups code now works on Ultrix again.
180
1816. Completely new version of the full GNU regex engine now in place.
182
1837. Argument parsing and variable assignment has been cleaned up.
184
1858. An I/O bug on HP-UX has been documented and worked around. See
186 README_d/README.hpux.
187
1889. awklib/grcat should now compile correctly.
189
19010. Updated to automake 1.7.3, autoconf 2.57 and gettext 0.11.5 ; thanks to
191 Paul Eggert for the initial automake and autoconf work.
192
19311. As a result of #6, removed the use of the dfa code from GNU grep.
194
19512. It is now possible to use ptys for |& two-way pipes instead of
196 pipes. The basic plumbing for this was provided by Paolo Bonzini.
197 To make this happen:
198
199 command = "unix command etc"
200 PROCINFO[command, "pty"] = 1
201
202 print ... |& command
203 command |& getline stuff
204
205 In other words, set the element in PROCINFO *before* opening the
206 two-way pipe, and then gawk will use ptys instead of pipes.
207
208 On systems without ptys or where all the ptys are in use, gawk
209 will fall back to using plain pipes.
210
21113. Fixed a regex matching across buffer boundaries bug, with a
212 heuristic. See io.c:rsre_get_a_record.
213
21414. Profiling no longer dumps core if there are extension functions in place.
215
21615. Grammar and scanner cleaned up, courtesy of Stepen Kasal, to hopefully
217 once and for all fix the `/=' operator vs. `/=.../' regex ambiguity.
218 Lots of other grammar simplifications applied, as well.
219
22016. BINMODE should work now on more Windows ports.
221
22217. Updated to bison 1.875. Includes fix to bisonfix.sed script.
223
22418. The NODE structure is now 20% (8 bytes) smaller (on x86, anyway), which
225 should help conserve memory.
226
22719. Builds not in the source directory should work again.
228
22920. Arrays now use 2 NODE's per element instead of three. Combined with
230 #18, (on the x86) this reduces the overhead from 120 bytes per element
231 to just 64 bytes: almost a 50% improvement.
232
23321. Programs that make heavy use of changing IGNORECASE should now be
234 much faster, particularly if using a regular expression for FS or RS.
235 IGNORECASE now correctly affects RS regex record splitting, as well.
236
23722. IGNORECASE no longer affects single-character field splitting (FS = "c"),
238 or single-character record splitting (RS = "c").
239
240 This cleans up some weird behavior, and makes gawk better match the
241 documentation, which says it only affects regex-based field splitting
242 and record splitting.
243
244 The documentation on this was improved, too.
245
24623. The framework in test/ has been simplified, making it much easier to
247 add new tests while keeping the size of Makefile.am reasonable. Thanks
248 for this to Stepan Kasal.
249
25024. --lint=invalid causes lint warnings only about stuff that's actually
251 invalid. This needs additional work.
252
25325. More translations.
254
25526. The `get_a_record' routine has been revamped (currently by splitting it
256 into three variants). This should improve long-term maintainability.
257
25827. `match' now adds more entries to 3rd array arg:
259 match("the big dog", /([a-z]+) ([a-z]+) ([a-z]+)/, data)
260 fills in variables:
261 data[1, "start"], data[1, "length"], and so on.
262
26328. New `asorti' function with same interface as `asort', but sorts indices
264 instead of values.
265
26629. Documentation updated to FDL 1.2.
267
26830. New `configure' option --disable-lint at compile time disables lint
269 checking. With GCC dead-code-elimination, cuts almost 200K off the
270 executable size on GNU/Linux x86. Presumably speeds up runtime.
271
272 Using this will cause some of the tests in the test suite to fail.
273 This option may be removed at a later date.
274
27531. Various minor cleanups, see the ChangeLog for details.
276
277Changes from 3.1.0 to 3.1.1
278---------------------------
279
2801. Six new translations.
281
2822. Having more than 4 different values for OFMT and/or CONVFMT now works.
283
2843. The handling of dynamic regexes is now more more sane, esp. w.r.t.
285 the profiling code. The profiling code has been fixed in several
286 places.
287
2884. The return value of index("", "") is now 1.
289
2905. Gawk should no longer close fd 0 in child processes.
291
2926. Fixed test for strtod semantics and regenerated configure.
293
2947. Gawk can now be built with byacc; an accidental bison dependency was
295 removed.
296
2978. `yyerror' will no longer dump core on long source lines.
298
2999. Gawk now correctly queries getgroups(2) to figure out how many groups
300 the process has.
301
30210. New configure option to force use of included strftime, e.g. on
303 Solaris systems. See `./configure --help' for the details. Replaced
304 the included strftime.c with the one from textutils.
305
30611. OS/2 port has been updated.
307
30812. Multi-byte character support has been added, courtesy of IBM Japan.
309
31013. The `for (iggy in foo) delete foo[iggy]' -> `delete foo' optimisation
311 now works.
312
31314. Upgraded to gettext 0.11.2 and automake 1.5.
314
31515. Full gettext compatibility (new dcngettext function).
316
31716. The O'Reilly copyedits and indexing changes for the documentation have
318 been folded into the texinfo version of the manuals.
319
32017. A humongously long value for the AWKPATH environment variable will no
321 longer dump core.
322
32318. Configuration / Installation issues have been straightened out in
324 Makefile.am.
325
326Changes from 3.0.6 to 3.1.0
327---------------------------
328
3291. A new PROCINFO array provides info about the process. The non-I/O /dev/xxx
330 files are now obsolete, and their use always generates a warning.
331
3322. A new `mktime' builtin function was added for creating time stamps. The
333 `mktime' function written in awk was removed from the user's guide.
334
3353. New `--gen-po' option creates GNU gettext .po files for strings marked
336 with a leading underscore.
337
3384. Gawk now completely interprets special file names internally, ignoring the
339 existence of real /dev/stdin, /dev/stdout files, etc.
340
3415. The mmap code was removed. It was a worthwhile experiment that just
342 didn't work out.
343
3446. The BINMODE variable is new; on non-UNIX systems it affects how gawk
345 opens files for text vs. binary.
346
3477. The atari port is now unsupported.
348
3498. Gawk no longer supports `next file' as two words.
350
3519. On systems that support it, gawk now sets the `close on exec' flag on all
352 files and pipes it opens. This makes sure that child processes run via
353 `system' or pipes have plenty of file descriptors available.
354
35510. New ports: Tandem and BeOS. The Tandem port is unsupported.
356
35711. If `--posix' is in effect, newlines are not allowed after ?:.
358
35912. Weird OFMT/CONVFMT formats no longer cause fatal errors.
360
36113. Diagnostics about array parameters now include the parameter's name,
362 not just its number.
363
36414. configure should now automatically add -D_SYSV3 for ISC Unix.
365 (This seems to have made it into the gawk 3.0.x line long ago.)
366
36715. It is now possible to open a two-way pipe via the `|&' operator.
368 See the discussion in the manual about putting `sort' into such a pipeline,
369 though. (NOTE! This is borrowed from ksh: it is not the same as
370 the same operator in csh!)
371
37216. The `close' function now takes an optional second string argument
373 that allows closing one or the other end of the two-way pipe to
374 a co-process. This is needed to use `sort' in a co-process, see
375 the doc.
376
37717. If TCP/IP is available, special file names beginning with `/inet'
378 can be used with `|&' for IPC. Thanks to Juergen Kahrs for the initial
379 code.
380
38118. With `--enable-portals' on the configure command line, gawk will also
382 treat file names that start with `/p/' as a 4.4 BSD type portal file,
383 i.e., a two-way pipe for `|&'.
384
38519. Unrecognized escapes, such as "\q" now always generate a warning.
386
38720. The LINT variable is new; it provides dynamic control over the --lint
388 option.
389
39021. Lint warnings can be made fatal by using --lint=fatal or `LINT = "fatal"'.
391 Use this if you're really serious about portable code.
392
39322. Due to an enhanced sed script, there is no longer any need to worry
394 about finding or using alloca. alloca.c is thus now gone.
395
39623. A number of lint warnings have been added. Most notably, gawk will
397 detect if a variable is used before assigned to. Warnings for
398 when a string that isn't a number gets converted to a number are
399 in the code but disabled; they seem to be too picky in practice.
400
401 Also, gawk will now warn about function parameter names that shadow
402 global variable names.
403
40424. It is now possible to dynamically add builtin functions on systems
405 that support dlopen. This facility is not (yet) as portable or well
406 integrated as it might be. *** WARNING *** THIS FEATURE WILL EVOLVE!
407
40825. There are *many* new tests in the test suite.
409
41026. Profiling has been added! A separate version of gawk, named pgawk, is
411 built and generates a run-time execution profile. The --profile option
412 can be used to change the default output file. In regular gawk, this
413 option pretty-prints the parse tree.
414
41527. Gawk has been internationalized, using GNU gettext. Translations for
416 future distributions are most welcome. Simultaneously, gawk was switched
417 over to using automake. You need Automake 1.4a (from the CVS archive)
418 if you want to muck with the Makefile.am files.
419
42028. New `asort' function for sorting arrays. See the doc for details.
421
42229. The match function takes an optional array third argument to hold
423 the text matched by parenthesized sub-expressions.
424
42530. The bit op functions and octal and hex source code constants are on by
426 default, no longer a configure-time option. Recognition of non-decimal
427 data is now enabled at runtime with --non-decimal-data command line option.
428
42931. Internationalization features available at the awk level: new TEXTDOMAIN
430 variable and `bindtextdomain' and `dcgettext' functions. printf formats
431 may contain the "%2$3.5d" kind of notation for use in translations. See
432 the texinfo manual for details.
433
43432. The return value from `close' has been rationalized. Most notably,
435 closing something that wasn't open returns -1 but remains non-fatal.
436
43733. The array effeciency change from 3.0.5 was reverted; the semantics were
438 not right. Additionally, index values of previously stored elements
439 can no longer change dynamically.
440
44134. The new option --dump-variables dumps a list of all global variables and
442 their final types and values to a file you give, or to `awkvars.out'.
443
44435. Gawk now uses a recent version of random.c courtesy of the FreeBSD
445 project.
446
44736. The gawk source code now uses ANSI C function definitions (new style),
448 with ansi2knr to translate code for old compilers.
449
45037. `for (iggy in foo)' loops should be more robust now in the face of
451 adding/deleting elements in the middle; they loop over just the elements
452 that are present in the array when the loop starts.
453
454Changes from 3.0.5 to 3.0.6
455---------------------------
456
457This is a bug fix release only, pending further development on 3.1.0.
458
459Bugs fixed and changes made:
460
4611. Subscripting an array with a variable that is just a number no
462 longer magically converts the variable into a string.
463
4642. Similarly, running a `for (iggy in foo)' loop where `foo' is a
465 function parameter now works correctly.
466
4673. Similarly, `i = ""; v[i] = a; if (i in v) ...' now works again.
468
4694. Gawk now special cases `for (iggy in foo) delete foo[iggy]' and
470 treats it as the moral equivalent of `delete foo'. This should be
471 a major efficiency win when portably deleting large arrays.
472
4735. VMS port brought up to date.
474
475Changes from 3.0.4 to 3.0.5
476---------------------------
477
478This is a bug fix release only, pending further development on 3.1.0.
479
480Bugs Fixed:
481
482 1. `function foo(foo)' is now a fatal error.
483
484 2. Array indexing is now much more efficient: where possible, only one
485 copy of an index string is kept, even if used in multiple arrays.
486
487 3. Support was added for MacOS X and an `install-strip' target.
488
489 4. [s]printf formatting for `0' flag and floating point formats now
490 works correctly.
491
492 5. HP-UX large file support with GCC 2.95.1 now works.
493
494 6. Arguments that contain `=' but that aren't syntactically valid are
495 now treated as filenames, instead of as fatal errors.
496
497 7. `-v NF=foo' now works.
498
499 8. Non-ascii alphanumeric characters are now treated as such in the
500 right locales by regex.c. Similarly, a Latin-1 y-umlaut (decimal
501 value 255) in the program text no longer acts like EOF.
502
503 9. Array indexes are always compared as strings; fixes an obscure bug
504 when user input gets used for the `x in array' test.
505
50610. The usage message now points users to the documentation for how
507 to report bugs.
508
50911. `/=' now works after an array.
510
51112. `b += b += 1' now works correctly.
512
51313. IGNORECASE changing with calls `match' now works better. (Fix for
514 semi-obscure bug.)
515
51614. Multicharacter values for RS now generate a lint warning.
517
51815. The gawk open file caching is now much more efficient.
519
52016. Global arrays passed to functions are now managed better. In particular,
521 test/arynocls.awk won't crash referencing freed memory.
522
52317. In obscure cases, `getline var' can no longer clobber $0.
524
525Changes from 3.0.3 to 3.0.4
526---------------------------
527
528This is a bug fix release only, pending further development on 3.1.0.
529
530Bugs Fixed:
531
532 1. A memory leak when turning a function parameter into an array was
533 fixed.
534
535 2. The non-decimal data option now works correctly.
536
537 3. Using an empty pair of brackets as an array subscript no longer causes
538 a core dump during parsing. In general, syntax errors should not
539 cause core dumps any more.
540
541 4. Standard input is no longer closed if it provides program source,
542 avoiding strange I/O problems.
543
544 5. Memory corruption during printing with `print' has been fixed.
545
546 6. The gsub function now correctly counts the number of matches.
547
548 7. A typo in doc/Makefile.in has been fixed, making installation work.
549
550 8. Calling `next' or `nextfile' from a BEGIN or END rule is now fatal.
551
552 9. Subtle problems in rebuilding $0 when fields were changed have been
553 fixed.
554
55510. `FS = FS' now correctly turns off the use of FIELDWIDTHS.
556
55711. Gawk now parses fields correctly when FS is a single character.
558
55912. It is now possible for RS to be the NUL character ("\0").
560
56113. Weird problems with number conversions on MIPS and other systems
562 have been fixed.
563
56414. When parsing using FIELDWIDTHS is in effect, `split' with no third
565 argument will still use the value of FS.
566
56715. Large File Support for Solaris, HP-UX, AIX, and IRIX is now enabled at
568 compile time, thanks to Paul Eggert.
569
57016. Attempting to use the name of a function as a variable or array
571 from within the function is now caught as a fatal error, instead
572 of as a core dump.
573
57417. A bug in parsing hex escapes was fixed.
575
57618. A weird bug with concatenation where one expression has side effects
577 that changes another was fixed.
578
57919. printf/sprintf now behave much better for uses of the '0' and '#' flags
580 and with precisions and field widths.
581
58220. Further strangenesses with concatenation and multiple accesses of some
583 of the special variables was fixed.
584
58521. The Atari port is marked as no longer supported.
586
58722. Build problems on HP-UX have been fixed.
588
58923. Minor fixes and additional explanations added to the documentation.
590
59124. For RS = "", even a single leading newline is now correctly stripped.
592
59325. Obscure parsing problems for regex constants like /=.../ fixed, so
594 that a regex constant is recognized, and not the /= operator.
595
59626. Fixed a bug when closing a redirection that matched the current
597 or last FILENAME.
598
59927. Build problems on AIX fixed.
600
601Changes from 3.0.2 to 3.0.3
602---------------------------
603
604The horrendous per-record memory leak introduced in 3.0.1 is gone, finally.
605
606The `amiga' directory is now gone; Amiga support is now entirely handled
607by the POSIX support.
608
609Windows32 support has been added in the `pc' directory. See `README_d/README.pc'
610for more info.
611
612The mmap changes are disabled in io.c, and will be removed entirely
613in the next big release. They were an interesting experiment that just
614really didn't work in practice.
615
616A minor memory leak that occurred when using `next' from within a
617function has also been fixed.
618
619Problems with I/O from sub-processes via a pipe are now gone.
620
621Using "/dev/pid" and the other special /dev files no longer causes a core dump.
622
623The files regex.h, regex.c, getopt.h, getopt.c, and getopt1.c have been
624merged with the versions in GNU libc. Thanks to Ulrich Drepper for his help.
625
626Some new undocumented features have been added. Use the source, Luke!
627It is not clear yet whether these will ever be fully supported.
628
629Array performance should be much better for very very large arrays. "Virtual
630memory required, real memory helpful."
631
632builtin.c:do_substr rationalized, again.
633
634The --re-interval option now works as advertised.
635
636The license text on some of the missing/* files is now generic.
637
638Lots more new test cases.
639
640Lots of other small bugs fixed, see the ChangeLog files for details.
641
642Changes from 3.0.1 to 3.0.2
643---------------------------
644
645Gawk now uses autoconf 2.12.
646
647strftime now behaves correctly if passed an empty format string or if
648the string formats to an empty result string.
649
650Several minor compilation and installation problems have been fixed.
651
652Minor page break issues in the user's guide have been fixed.
653
654Lexical errors no longer repeat ad infinitum.
655
656Changes from 3.0.0 to 3.0.1
657---------------------------
658
659Troff source for a handy-dandy five color reference card is now provided.
660Thanks to SSC for their macros.
661
662Gawk now behaves like Unix awk and mawk, in that newline acts as white
663space for separating fields and for `split', by default. In posix mode,
664only space and tab separate fields. The documentation has been updated to
665reflect this.
666
667Tons and tons of small bugs fixed and new tests added, see the ChangeLogs.
668
669Lots fewer compile time warnings from gcc -Wall. Remaining ones aren't
670worth fixing.
671
672Gawk now pays some attention to the locale settings.
673
674Fixes to gsub to catch several corner cases.
675
676The `print' statement now evaluates all expressions first, and then
677prints them. This leads to less suprising behaviour if any expression has
678output side effects.
679
680Miscellanious improvements in regex.h and regex.c.
681
682Gawk will now install itself as gawk-M.N.P in $(bindir), and link
683`gawk' to it. This makes it easy to have multiple versions of gawk
684simultaneously. It will also now install itself as `awk' in $(bindir)
685if there is no `awk' there. This is in addition to installing itself as
686`gawk'. This change benefits the Hurd, and possibly other systems. One
687day, gawk will drop the `g', but not yet.
688
689`--posix' turns on interval expressions. Gawk now matches its documentation.
690
691`close(FILENAME)' now does something meaningful.
692
693Field management code in field.c majorly overhauled, several times.
694
695The gensub code has been fixed, several bugs are now gone.
696
697Gawk will use mmap for data file input if it is available.
698
699The printf/sprintf code has been improved.
700
701Minor issues in Makefile setup worked on and improved.
702
703builtin.c:do_substr rationalized.
704
705Regex matching fixed so that /+[0-9]/ now matches the leading +.
706
707For building on vms, the default compiler is now DEC C rather than VAX C.
708
709Changes from 2.15.6 to 3.0.0
710----------------------------
711
712Fixed spelling of `Programming' in the copyright notice in all the files.
713
714New --re-interval option to turn on interval expressions. They're off
715by default, except for --posix, to avoid breaking old programs.
716
717Passing regexp constants as parameters to user defined functions now
718generates a lint warning.
719
720Several obscure regexp bugs fixed; alas, a small number remain.
721
722The manual has been thoroughly revised. It's now almost 50% bigger than
723it used to be.
724
725The `+' modifier in printf is now reset correctly for each item.
726
727The do_unix variable is now named do_traditional.
728
729Handling of \ in sub and gsub rationalized (somewhat, see the manual for
730the gory [and I do mean gory] details).
731
732IGNORECASE now uses ISO 8859-1 Latin-1 instead of straight ASCII. See the
733source for how to revert to pure ASCII.
734
735--lint will now warn if an assignment occurs in a conditional context.
736This may become obnoxious enough to need turning off in the future, but
737"it seemed like a good idea at the time."
738
739%hf and %Lf are now diagnosed as invalid in printf, just like %lf.
740
741Gawk no longer incorrectly closes stdin in child processes used in
742input pipelines.
743
744For integer formats, gawk now correctly treats the precision as the
745number of digits to print, not the number of characters.
746
747gawk is now much better at catching the use of scalar values when
748arrays are needed, both in function calls and the `x in y' constructs.
749
750New gensub function added. See the manual.
751
752If do_tradtional is true, octal and hex escapes in regexp constants are
753treated literally. This matches historical behavior.
754
755yylex/nextc fixed so that even null characters can be included
756in the source code.
757
758do_format now handles cases where a format specifier doesn't end in
759a control letter. --lint reports an error.
760
761strftime() now uses a default time format equivalent to that of the
762Unix date command, thus it can be called with no arguments.
763
764Gawk now catches functions that are used but not defined at parse time
765instead of at run time. (This is a lint error, making it fatal could break
766old code.)
767
768Arrays that max out are now handled correctly.
769
770Integer formats outside the range of an unsigned long are now detected
771correctly using the SunOS 4.x cc compiler.
772
773--traditional option added as new preferred name for --compat, in keeping
774with GCC.
775
776--lint-old option added, so that warnings about things not in old awk
777are only given if explicitly asked for.
778
779`next file' has changed to one word, `nextfile'. `next file' is still
780accepted but generates a lint warning. `next file' will go away eventually.
781
782Gawk with --lint will now notice empty source files and empty data files.
783
784Amiga support using the Unix emulation added. Thanks to fnf@ninemoons.com.
785
786test/Makefile is now "parallel-make safe".
787
788Gawk now uses POSIX regexps + GNU regex ops by default. --posix goes to
789pure posix regexps, and --compat goes to traditional Unix regexps. However,
790interval expressions, even though specified by POSIX, are turned off by
791default, to avoid breaking old code.
792
793IGNORECASE now applies to string comparison as well as regexp operations.
794
795The AT&T Bell Labs Research awk fflush builtin function is now supported.
796fflush is extended to flush stdout if no arg and everything if given
797the null string as an argument.
798
799If RS is more than one character, it is treated as a regular expression
800and records are delimited accordingly. The variable RT is set to the record
801terminator string. This is disabled in compatibility mode.
802
803If FS is set to the null string (or the third arg. of split() is the null
804string), splitting is done at every single character. This is disabled in
805compatibility mode.
806
807Gawk now uses the Autoconf generated configure script, doing away with all
808the config/* files and the machinery that went with them. The Makefile.in
809has also changed accordingly, complete with all the standard GNU Makefile
810targets. (Non-unix systems may still have their own config.h and Makefile;
811see the appropriate README_d/README.* and/or subdirectory.)
812
813The source code has been cleaned up somewhat and the formatting improved.
814
815Changes from 2.15.5 to 2.15.6
816-----------------------------
817
818Copyrights updated on all changed files.
819
820test directory enhanced with four new tests.
821
822Gawk now generates a warning for \x without following hexadecimal digits.
823In this case, it returns 'x', not \0.
824
825Several fixes in main.c related to variable initialization:
826 CONVFMT has a default value
827 resetup is called before initializing variables
828 the varinit table fixed up a bit (see the comments)
829
830gawk.1 updated with new BUG REPORTS section.
831
832A plain `print' inside a BEGIN or END now generates a lint warning (awk.y).
833
834Small fix in iop.c:get_a_record to avoid reading uninitialized memory.
835
836awk.y:yylex now does a better job of handling things if the source file
837does not end in a newline. Probably there is more work to be done.
838
839Memory leaks fixed in awk.y, particularly in cases of duplicate function
840parameters. Also, calling a function doesn't leak memory during parsing.
841
842Empty function bodies are now allowed (awk.y).
843
844Gawk now detects duplicate parameter names in functions (awk.y).
845
846New function `error' in msg.c added for use from awk.y.
847
848eval.c:r_get_lhs now checks if its argument is a parameter on the stack,
849and pulls down the real variable. This catches more 'using an array as
850a scalar' kinds of errors.
851
852main.c recovers C alloca space after parsing, this is important for
853bison-based parsers. re.c recovers C alloca space after doing an research.
854[Changes from Pat Rankin]
855
856builtin.c now declares the random() related functions based on
857RANDOM_MISSING from config.h. [Suggested by Pat Rankin]
858
859awk.h now handles alloca correctly for HP-UX. [Kaveh Ghazi]
860
861regex.h and config/cray60 updated for Unicos 8.0. [Hal Peterson]
862
863Fixed re.c and dfa.c so that gawk no longer leaks memory when using
864lots of dynamic regexps.
865
866Removed dependency on signed chars from `idx' variable in awk.h. Gawk
867now passes its test suite if compiled with `gcc -fno-signed-char'.
868
869Fixed warning on close in io.c to go under lint control. Too many people
870have complained about the spurious message, particularly when closing a
871child pipeline early.
872
873Gawk now correctly handles RS = "" when input is from a terminal
874(iop.c:get_a_record).
875
876Config file added for GNU.
877
878gawk 'BEGIN { exit 1 } ; END { exit }' now exits 1, as it should
879(eval.c:interpret).
880
881sub and gsub now follow posix, \ escapes both & and \. Each \ must
882be doubled initially in the program to get it into the string.
883Thanks to Mike Brennan for pointing this out (builtin.c:sub_common).
884
885If FS is "", gawk behaves like mawk and nawk, making the whole record be $1.
886Yet Another Dark Corner. Sigh (field.c:def_parse_field).
887
888Gawk now correctly recomputes string values for numbers if CONVFMT has
889changed (awk.h:force_string, node.c:r_force_string).
890
891A regexp of the form `/* this looks like a comment but is not */' will
892now generate a warning from --lint (awk.y).
893
894Gawk will no longer core dump if given an empty input file (awk.y:get_src_buf,
895iop.c:optimal_bufsize).
896
897A printf format of the form %lf is handled correctly. The `l' generates
898a lint warning (builtin.c:format_tree) [Thanks to Mark Moraes].
899
900Lynxos config file added.
901
902`continue' outside a loop treated as `next' only in compatibility mode,
903instead of by default; recent att nawk chokes on this now. `break'
904outside a loop now treated as `next' in compatibility mode (eval.c).
905
906Bug fix in string concatenation, an arbitrary number of expressions
907are allowed (eval.c).
908
909$1 += $2 now works correctly (eval.c).
910
911Changing IGNORECASE no longer resets field-splitting to FS if it was
912using FIELDWIDTHS (eval.c, field.c).
913
914Major enhancement: $0 and NF for last record read are now preserved
915into the END rule (io.c).
916
917Regexp fixes:
918 /./ now matches a newline (regex.h)
919 ^ and $ match beginning and end of string only, not any embedded
920 newlines (re.c)
921 regex.c should compile and work ok on 64-bit mips/sgi machines
922
923Changes from 2.15.4 to 2.15.5
924-----------------------------
925
926FUTURES file updated and re-arranged some with more rational schedule.
927
928Many prototypes handled better for ANSI C in protos.h.
929
930getopt.c updated somewhat.
931
932test/Makefile now removes junk directory, `bardargtest' renamed `badargs.'
933
934Bug fix in iop.c for RS = "". Eat trailing newlines off of record separator.
935
936Bug fix in Makefile.bsd44, use leading tab in actions.
937
938Fix in field.c:set_FS for FS == "\\" and IGNORECASE != 0.
939
940Config files updated or added:
941 cray60, DEC OSF/1 2.0, Utek, sgi405, next21, next30, atari/config.h,
942 sco.
943
944Fix in io.c for ENFILE as well as EMFILE, update decl of groupset to
945include OSF/1.
946
947Rationalized printing as integers if numbers are outside the range of a long.
948Changes to node.c:force_string and builtin.c.
949
950Made internal NF, NR, and FNR variables longs instead of ints.
951
952Add LIMITS_H_MISSING stuff to config.in and awk.h, and default defs for
953INT_MAX and LONG_MAX, if no limits.h file. Add a standard decl of
954the time() function for __STDC__. From ghazi@noc.rutgers.edu.
955
956Fix tree_eval in awk.h and r_tree_eval in eval.c to deal better with
957function parameters, particularly ones that are arrays.
958
959Fix eval.c to print out array names of arrays used in scalar contexts.
960
961Fix eval.c in interpret to zero out source and sourceline initially. This
962does a better job of providing source file and line number information.
963
964Fix to re_parse_field in field.c to not use isspace when RS = "", but rather
965to explicitly look for blank and tab.
966
967Fix to sc_parse_field in field.c to catch the case of the FS character at the
968end of a record.
969
970Lots of miscellanious bug fixes for memory leaks, courtesy Mark Moraes,
971also fixes for arrays.
972
973io.c fixed to warn about lack of explicit closes if --lint.
974
975Updated missing/strftime.c to match posted strftime 6.2.
976
977Bug fix in builtin.c, in case of non-match in sub_common.
978
979Updated constant used for division in builtin.c:do_rand for DEC Alpha
980and CRAY Y-MP.
981
982POSIXLY_CORRECT in the environment turns on --posix (fixed in main.c).
983
984Updated srandom prototype and calls in builtin.c.
985
986Fix awk.y to enforce posix semantics of unary +: result is numeric.
987
988Fix array.c to not rearrange the hash chain upon finding an index in
989the array. This messed things up in cases like:
990 for (index1 in array) {
991 blah
992 if (index2 in array) # blew away the for
993 stuff
994 }
995
996Fixed spelling errors in the man page.
997
998Fixes in awk.y so that
999 gawk '' /path/to/file
1000will work without core dumping or finding parse errors.
1001
1002Fix main.c so that --lint will fuss about an empty program.
1003Yet another fix for argument parsing in the case of unrecognized options.
1004
1005Bug fix in dfa.c to not attempt to free null pointers.
1006
1007Bug fix in builtin.c to only use DEFAULT_G_PRECISION for %g or %G.
1008
1009Bug fix in field.c to achieve call by value semantics for split.
1010
1011Changes from 2.15.3 to 2.15.4
1012-----------------------------
1013
1014Lots of lint fixes, and do_sprintf made mostly ANSI C compatible.
1015
1016Man page updated and edited.
1017
1018Copyrights updated.
1019
1020Arrays now grow dynamically, initially scaling up by an order of magnitude
1021 and then doubling, up to ~ 64K. This should keep gawk's performance
1022 graceful under heavy load.
1023
1024New `delete array' feature added. Only documented in the man page.
1025
1026Switched to dfa and regex suites from grep-2.0. These offer the ability to
1027 move to POSIX regexps in the next release.
1028
1029Disabled GNU regex ops.
1030
1031Research awk -m option now recognized. It does nothing in gawk, since gawk
1032 has no static limits. Only documented in the man page.
1033
1034New bionic (faster, better, stronger than before) hashing function.
1035
1036Bug fix in argument handling. `gawk -X' now notices there was no program.
1037 Additional bug fixes to make --compat and --lint work again.
1038
1039Many changes for systems where sizeof(int) != sizeof(void *).
1040
1041Add explicit alloca(0) in io.c to recover space from C alloca.
1042
1043Fixed file descriptor leak in io.c.
1044
1045The --version option now follows the GNU coding standards and exits.
1046
1047Fixed several prototypes in protos.h.
1048
1049Several tests updated. On Solaris, warn that the out? tests will fail.
1050
1051Configuration files for SunOS with cc and Solaris 2.x added.
1052
1053Improved error messages in awk.y on gawk extensions if do_unix or do_compat.
1054
1055INSTALL file added.
1056
1057Fixed Atari Makefile and several VMS specific changes.
1058
1059Better conversion of numbers to strings on systems with broken sprintfs.
1060
1061Changes from 2.15.2 to 2.15.3
1062-----------------------------
1063
1064Increased HASHSIZE to a decent number, 127 was way too small.
1065
1066FILENAME is now the null string in a BEGIN rule.
1067
1068Argument processing fixed for invalid options and missing arguments.
1069
1070This version will build on VMS. This included a fix to close all files
1071 and pipes opened with redirections before closing stdout and stderr.
1072
1073More getpgrp() defines.
1074
1075Changes for BSD44: <sys/param.h> in io.c and Makefile.bsd44.
1076
1077All directories in the distribution are now writable.
1078
1079Separated LDFLAGS and CFLAGS in Makefile. CFLAGS can now be overridden by
1080 user.
1081
1082Make dist now builds compressed archives ending in .gz and runs doschk.
1083
1084Amiga port.
1085
1086New getopt.c fixes Alpha OSF/1 problem.
1087
1088Make clean now removes possible test output.
1089
1090Improved algorithm for multiple adjacent string concatenations leads to
1091 performance improvements.
1092
1093Fix nasty bug whereby command-line assignments, both with -v and at run time,
1094 could create variables with syntactically illegal names.
1095
1096Fix obscure bug in printf with %0 flag and filling.
1097
1098Add a lint check for substr if provided length exceeds remaining characters
1099 in string.
1100
1101Update atari support.
1102
1103PC support enhanced to include support for both DOS and OS/2. (Lots more
1104 #ifdefs. Sigh.)
1105
1106Config files for Hitachi Unix and OSF/1, courtesy of Yoko Morishita
1107 (morisita@sra.co.jp)
1108
1109Changes from 2.15.1 to 2.15.2
1110-----------------------------
1111
1112Additions to the FUTURES file.
1113
1114Document undefined order of output when using both standard output
1115 and /dev/stdout or any of the /dev output files that gawk emulates in
1116 the absence of OS support.
1117
1118Clean up the distribution generation in Makefile.in: the info files are
1119 now included, the distributed files are marked read-only and patched
1120 distributions are now unpacked in a directory named with the patch level.
1121
1122Changes from 2.15 to 2.15.1
1123---------------------------
1124
1125Close stdout and stderr before all redirections on program exit. This allows
1126 detection of write errors and also fixes the messages test on Solaris 2.x.
1127
1128Removed YYMAXDEPTH define in awk.y which was limiting the parser stack depth.
1129
1130Changes to config/bsd44, Makefile.bsd44 and configure to bring it into line
1131 with the BSD4.4 release.
1132
1133Changed Makefile to use prefix, exec_prefix, bindir etc.
1134
1135make install now installs info files.
1136
1137make install now sets permissions on installed files.
1138
1139Make targets added: uninstall, distclean, mostlyclean and realclean.
1140
1141Added config.h to cleaner and clobber make targets.
1142
1143Changes to config/{hpux8x,sysv3,sysv4,ultrix41} to deal with alloca().
1144
1145Change to getopt.h for portability.
1146
1147Added more special cases to the getpgrp() call.
1148
1149Added README.ibmrt-aos and config/ibmrt-aos.
1150
1151Changes from 2.14 to 2.15
1152---------------------------
1153
1154Command-line source can now be mixed with library functions.
1155
1156ARGIND variable tracks index in ARGV of FILENAME.
1157
1158GNU style long options in addition to short options.
1159
1160Plan 9 style special files interpreted by gawk:
1161 /dev/pid
1162 /dev/ppid
1163 /dev/pgrpid
1164 /dev/user
1165 $1 = getuid
1166 $2 = geteuid
1167 $3 = getgid
1168 $4 = getegid
1169 $5 ... $NF = getgroups if supported
1170
1171ERRNO variable contains error string if getline or close fails.
1172
1173Very old options -a and -e have gone away.
1174
1175Inftest has been removed from the default target in test/Makefile -- the
1176 results were too machine specific and resulted in too many false alarms.
1177
1178A README.amiga has been added.
1179
1180The "too many arguments supplied for format string" warning message is only
1181 in effect under the lint option.
1182
1183Code improvements in dfa.c.
1184
1185Fixed all reported bugs:
1186
1187 Writes are checked for failure (such as full filesystem).
1188
1189 Stopped (at least some) runaway error messages.
1190
1191 gsub(/^/, "x") does the right thing for $0 of 0, 1, or more length.
1192
1193 close() on a command being piped to a getline now works properly.
1194
1195 The input record will no longer be freed upon an explicit close()
1196 of the input file.
1197
1198 A NUL character in FS now works.
1199
1200 In a substitute, \\& now means a literal backslash followed by what
1201 was matched.
1202
1203 Integer overflow of substring length in substr() is caught.
1204
1205 An input record without a newline termination is handled properly.
1206
1207 In io.c, check is against only EMFILE so that system file table
1208 is not filled.
1209
1210 Renamed all files with names longer than 14 characters.
1211
1212 Escaped characters in regular expressions were being lost when
1213 IGNORECASE was used.
1214
1215 Long source lines were not being handled properly.
1216
1217 Sourcefiles that ended in a tab but no newline were bombing.
1218
1219 Patterns that could match zero characters in split() were not working
1220 properly.
1221
1222 The parsedebug option was not working.
1223
1224 The grammar was being a bit too lenient, allowing some very dubious
1225 programs to pass.
1226
1227 Compilation with DEBUG defined now works.
1228
1229 A variable read in with getline was not being treated as a potential
1230 number.
1231
1232 Array subscripts were not always of string type.
1233
1234
1235Changes from 2.13.2 to 2.14
1236---------------------------
1237
1238Updated manual!
1239
1240Added "next file" to skip efficiently to the next input file.
1241
1242Fixed potential of overflowing buffer in do_sprintf().
1243
1244Plugged small memory leak in sub_common().
1245
1246EOF on a redirect is now "sticky" -- it can only be cleared by close()ing
1247 the pipe or file.
1248
1249Now works if used via a #! /bin/gawk line at the top of an executable file
1250 when that line ends with whitespace.
1251
1252Added some checks to the grammar to catch redefinition of builtin functions.
1253 This could eventually be the basis for an extension to allow redefining
1254 functions, but in the mean time it's a good error catching facility.
1255
1256Negative integer exponents now work.
1257
1258Modified do_system() to make sure it had a non-null string to be passed
1259 to system(3). Thus, system("") will flush any pending output but not go
1260 through the overhead of forking an un-needed shell.
1261
1262A fix to floating point comparisons so that NaNs compare right on IEEE systems.
1263
1264Added code to make sure we're not opening directories for reading and such.
1265
1266Added code to do better diagnoses of weird or null file names.
1267
1268Allow continue outside of a loop, unless in strict posix mode. Lint option
1269 will issue warning.
1270
1271New missing/strftime.c. There has been one change that affects gawk. Posix
1272 now defines a %V conversion so the vms conversion has been changed to %v.
1273 If this version is used with gawk -Wlint and they use %V in a call to
1274 strftime, they'll get a warning.
1275
1276Error messages now conform to GNU standard (I hope).
1277
1278Changed comparisons to conform to the description found in the file POSIX.
1279 This is inconsistent with the current POSIX draft, but that is broken.
1280 Hopefully the final POSIX standard will conform to this version.
1281 (Alas, this will have to wait for 1003.2b, which will be a revision to
1282 the 1003.2 standard. That standard has been frozen with the broken
1283 comparison rules.)
1284
1285The length of a string was a short and now is a size_t.
1286
1287Updated VMS help.
1288
1289Added quite a few new tests to the test suite and deleted many due to lack of
1290 written releases. Test output is only removed if it is identical to the
1291 "good" output.
1292
1293Fixed a couple of bugs for reference to $0 when $0 is "" -- particularly in
1294 a BEGIN block.
1295
1296Fixed premature freeing in construct "$0 = $0".
1297
1298Removed the call to wait_any() in gawk_popen(), since on at least some systems,
1299 if gawk's input was from a pipe, the predecessor process in the pipe was a
1300 child of gawk and this caused a deadlock.
1301
1302Regexp can (once again) match a newline, if given explicitly.
1303
1304nextopen() makes sure file name is null terminated.
1305
1306Fixed VMS pipe simulation. Improved VMS I/O performance.
1307
1308Catch . used in variable names.
1309
1310Fixed bug in getline without redirect from a file -- it was quitting after the
1311 first EOF, rather than trying the next file.
1312
1313Fixed bug in treatment of backslash at the end of a string -- it was bombing
1314 rather than doing something sensible. It is not clear what this should mean,
1315 but for now I issue a warning and take it as a literal backslash.
1316
1317Moved setting of regexp syntax to before the option parsing in main(), to
1318 handle things like -v FS='[.,;]'
1319
1320Fixed bug when NF is set by user -- fields_arr must be expanded if necessary
1321 and "new" fields must be initialized.
1322
1323Fixed several bugs in [g]sub() for no match found or the match is 0-length.
1324
1325Fixed bug where in gsub() a pattern anchored at the beginning would still
1326 substitute throughout the string.
1327
1328make test does not assume that . is in PATH.
1329
1330Fixed bug when a field beyond the end of the record was requested after
1331 $0 was altered (directly or indirectly).
1332
1333Fixed bug for assignment to field beyond end of record -- the assigned value
1334 was not found on subsequent reference to that field.
1335
1336Fixed bug for FS a regexp and it matches at the end of a record.
1337
1338Fixed memory leak for an array local to a function.
1339
1340Fixed hanging of pipe redirection to getline
1341
1342Fixed coredump on access to $0 inside BEGIN block.
1343
1344Fixed treatment of RS = "". It now parses the fields correctly and strips
1345 leading whitespace from a record if FS is a space.
1346
1347Fixed faking of /dev/stdin.
1348
1349Fixed problem with x += x
1350
1351Use of scalar as array and vice versa is now detected.
1352
1353IGNORECASE now obeyed for FS (even if FS is a single alphabetic character).
1354
1355Switch to GPL version 2.
1356
1357Renamed awk.tab.c to awktab.c for MSDOS and VMS tar programs.
1358
1359Renamed this file (CHANGES) to NEWS.
1360
1361Use fmod() instead of modf() and provide FMOD_MISSING #define to undo
1362 this change.
1363
1364Correct the volatile declarations in eval.c.
1365
1366Avoid errant closing of the file descriptors for stdin, stdout and stderr.
1367
1368Be more flexible about where semi-colons can occur in programs.
1369
1370Check for write errors on all output, not just on close().
1371
1372Eliminate the need for missing/{strtol.c,vprintf.c}.
1373
1374Use GNU getopt and eliminate missing/getopt.c.
1375
1376More "lint" checking.
1377
1378
1379Changes from 2.13.1 to 2.13.2
1380-----------------------------
1381
1382Toward conformity with GNU standards, configure is a link to mkconf, the latter
1383 to disappear in the next major release.
1384
1385Update to config/bsd43.
1386
1387Added config/apollo, config/msc60, config/cray2-50, config/interactive2.2
1388
1389sgi33.cc added for compilation using cc rather than gcc.
1390
1391Ultrix41 now propagates to config.h properly -- as part of a general
1392 mechanism in configure for kludges -- #define anything from a config file
1393 just gets tacked onto the end of config.h -- to be used sparingly.
1394
1395Got rid of an unnecessary and troublesome declaration of vprintf().
1396
1397Small improvement in locality of error messages.
1398
1399Try to diagnose use of array as scalar and vice versa -- to be improved in
1400 the future.
1401
1402Fix for last bug fix for Cray division code--sigh.
1403
1404More changes to test suite to explicitly use sh. Also get rid of
1405 a few generated files.
1406
1407Fixed off-by-one bug in string concatenation code.
1408
1409Fix for use of array that is passed in from a previous function parameter.
1410 Addition to test suite for above.
1411
1412A number of changes associated with changing NF and access to fields
1413 beyond the end of the current record.
1414
1415Change to missing/memcmp.c to avoid seg. fault on zero length input.
1416
1417Updates to test suite (including some inadvertently left out of the last patch)
1418 to invoke sh explicitly (rather than rely on #!/bin/sh) and remove some
1419 junk files. test/chem/good updated to correspond to bug fixes.
1420
1421Changes from 2.13.0 to 2.13.1
1422-----------------------------
1423
1424More configs and PORTS.
1425
1426Fixed bug wherein a simple division produced an erroneous FPE, caused by
1427 the Cray division workaround -- that code is now #ifdef'd only for
1428 Cray *and* fixed.
1429
1430Fixed bug in modulus implementation -- it was very close to the above
1431 code, so I noticed it.
1432
1433Fixed portability problem with limits.h in missing.c
1434
1435Fixed portability problem with tzname and daylight -- define TZNAME_MISSING
1436 if strftime() is missing and tzname is also.
1437
1438Better support for Latin-1 character set.
1439
1440Fixed portability problem in test Makefile.
1441
1442Updated PROBLEMS file.
1443
1444=============================== gawk-2.13 released =========================
1445Changes from 2.12.42 to 2.12.43
1446-------------------------------
1447
1448Typo in awk.y
1449
1450Fixed up strftime.3 and added doc. for %V.
1451
1452Changes from 2.12.41 to 2.12.42
1453-------------------------------
1454
1455Fixed bug in devopen() -- if you had write permission in /dev,
1456 it would just create /dev/stdout etc.!!
1457
1458Final (?) VMS update.
1459
1460Make NeXT use GFMT_WORKAROUND
1461
1462Fixed bug in sub_common() for substitute on zero-length match. Improved the
1463 code a bit while I was at it.
1464
1465Fixed grammar so that $i++ parses as ($i)++
1466
1467Put support/* back in the distribution (didn't I already do this?!)
1468
1469Changes from 2.12.40 to 2.12.41
1470-------------------------------
1471
1472VMS workaround for broken %g format.
1473
1474Changes from 2.12.39 to 2.12.40
1475-------------------------------
1476
1477Minor man page update.
1478
1479Fixed latent bug in redirect().
1480
1481Changes from 2.12.38 to 2.12.39
1482-------------------------------
1483
1484Updates to test suite -- remove dependence on changing gawk.1 man page.
1485
1486Changes from 2.12.37 to 2.12.38
1487-------------------------------
1488
1489Fixed bug in use of *= without whitespace following.
1490
1491VMS update.
1492
1493Updates to man page.
1494
1495Option handling updates in main.c
1496
1497test/manyfiles redone and added to bigtest.
1498
1499Fixed latent (on Sun) bug in handling of save_fs.
1500
1501Changes from 2.12.36 to 2.12.37
1502-------------------------------
1503
1504Update REL in Makefile-dist. Incorporate test suite into main distribution.
1505
1506Minor fix in regtest.
1507
1508Changes from 2.12.35 to 2.12.36
1509-------------------------------
1510
1511Release takes on dual personality -- 2.12.36 and 2.13.0 -- any further
1512 patches before public release won't count for 2.13, although they will for
1513 2.12 -- be careful to avoid confusion! patchlevel.h will be the last thing
1514 to change.
1515
1516Cray updates to deal with arithmetic problems.
1517
1518Minor test suite updates.
1519
1520Fixed latent bug in parser (freeing memory).
1521
1522Changes from 2.12.34 to 2.12.35
1523-------------------------------
1524
1525VMS updates.
1526
1527Flush stdout at top of err() and stderr at bottom.
1528
1529Fixed bug in eval_condition() -- it wasn't testing for MAYBE_NUM and
1530 doing the force_number().
1531
1532Included the missing manyfiles.awk and a new test to catch the above bug which
1533 I am amazed wasn't already caught by the test suite -- it's pretty basic.
1534
1535Changes from 2.12.33 to 2.12.34
1536-------------------------------
1537
1538Atari updates -- including bug fix.
1539
1540More VMS updates -- also nuke vms/version.com.
1541
1542Fixed bug in handling of large numbers of redirections -- it was probably never
1543 tested before (blush!).
1544
1545Minor rearrangement of code in r_force_number().
1546
1547Made chem and regtest tests a bit more portable (Ultrix again).
1548
1549Added another test -- manyfiles -- not invoked under any other test -- very Unix
1550 specific.
1551
1552Rough beginning of LIMITATIONS file -- need my AWK book to complete it.
1553
1554Changes from 2.12.32 to 2.12.33
1555-------------------------------
1556
1557Expunge debug.? from various files.
1558
1559Remove vestiges of Floor and Ceil kludge.
1560
1561Special case integer division -- mainly for Cray, but maybe someone else
1562 will benefit.
1563
1564Workaround for iop_close closing an output pipe descriptor on Cray --
1565 not conditional since I think it may fix a bug on SGI as well and I don't
1566 think it can hurt elsewhere.
1567
1568Fixed memory leak in assoc_lookup().
1569
1570Small cleanup in test suite.
1571
1572Changes from 2.12.31 to 2.12.32
1573-------------------------------
1574
1575Nuked debug.c and debugging flag -- there are better ways.
1576
1577Nuked version.sh and version.c in subdirectories.
1578
1579Fixed bug in handling of IGNORECASE.
1580
1581Fixed bug when FIELDWIDTHS was set via -v option.
1582
1583Fixed (obscure) bug when $0 is assigned a numerical value.
1584
1585Fixed so that escape sequences in command-line assignments work (as it already
1586 said in the comment).
1587
1588Added a few cases to test suite.
1589
1590Moved support/* back into distribution.
1591
1592VMS updates.
1593
1594Changes from 2.12.30 to 2.12.31
1595-------------------------------
1596
1597Cosmetic manual page changes.
1598
1599Updated sunos3 config.
1600
1601Small changes in test suite including renaming files over 14 chars. in length.
1602
1603Changes from 2.12.29 to 2.12.30
1604-------------------------------
1605
1606Bug fix for many string concatenations in a row.
1607
1608Changes from 2.12.28 to 2.12.29
1609-------------------------------
1610
1611Minor cleanup in awk.y
1612
1613Minor VMS update.
1614
1615Minor atari update.
1616
1617Changes from 2.12.27 to 2.12.28
1618-------------------------------
1619
1620Got rid of the debugging goop in eval.c -- there are better ways.
1621
1622Sequent port.
1623
1624VMS changes left out of the last patch -- sigh! config/vms.h renamed
1625 to config/vms-conf.h.
1626
1627Fixed missing/tzset.c
1628
1629Removed use of gcvt() and GCVT_MISSING -- turns out it was no faster than
1630 sprintf("%g") and caused all sorts of portability headaches.
1631
1632Tuned get_field() -- it was unnecessarily parsing the whole record on reference
1633 to $0.
1634
1635Tuned interpret() a bit in the rule_node loop.
1636
1637In r_force_number(), worked around bug in Uglix strtod() and got rid of
1638 ugly do{}while(0) at Michal's urging.
1639
1640Replaced do_deref() and deref with unref(node) -- much cleaner and a bit faster.
1641
1642Got rid of assign_number() -- contrary to comment, it was no faster than
1643 just making a new node and freeing the old one.
1644
1645Replaced make_number() and tmp_number() with macros that call mk_number().
1646
1647Changed freenode() and newnode() into macros -- the latter is getnode()
1648 which calls more_nodes() as necessary.
1649
1650Changes from 2.12.26 to 2.12.27
1651-------------------------------
1652
1653Completion of Cray 2 port (includes a kludge for floor() and ceil()
1654 that may go or be changed -- I think that it may just be working around
1655 a bug in chem that is being tweaked on the Cray).
1656
1657More VMS updates.
1658
1659Moved kludge over yacc's insertion of malloc and realloc declarations
1660 from protos.h to the Makefile.
1661
1662Added a lisp interpreter in awk to the test suite. (Invoked under
1663 bigtest.)
1664
1665Cleanup in r_force_number() -- I had never gotten around to a thorough
1666 profile of the cache code and it turns out to be not worth it.
1667
1668Performance boost -- do lazy force_number()'ing for fields etc. i.e.
1669 flag them (MAYBE_NUM) and call force_number only as necessary.
1670
1671Changes from 2.12.25 to 2.12.26
1672-------------------------------
1673
1674Rework of regexp stuff so that dynamic regexps have reasonable
1675 performance -- string used for compiled regexp is stored and
1676 compared to new string -- if same, no recompilation is necessary.
1677 Also, very dynamic regexps cause dfa-based searching to be turned
1678 off.
1679
1680Code in dev_open() is back to returning fileno(std*) rather than
1681 dup()ing it. This will be documented. Sorry for the run-around
1682 on this.
1683
1684Minor atari updates.
1685
1686Minor vms update.
1687
1688Missing file from MSDOS port.
1689
1690Added warning (under lint) if third arg. of [g]sub is a constant and
1691 handle it properly in the code (i.e. return how many matches).
1692
1693Changes from 2.12.24 to 2.12.25
1694-------------------------------
1695
1696MSDOS port.
1697
1698Non-consequential changes to regexp variables in preparation for
1699 a more serious change to fix a serious performance problem.
1700
1701Changes from 2.12.23 to 2.12.24
1702-------------------------------
1703
1704Fixed bug in output flushing introduced a few patches back. This caused
1705 serious performance losses.
1706
1707Changes from 2.12.22 to 2.12.23
1708-------------------------------
1709
1710Accidentally left config/cray2-60 out of last patch.
1711
1712Added some missing dependencies to Makefile.
1713
1714Cleaned up mkconf a bit; made yacc the default parser (no alloca needed,
1715 right?); added rs6000 hook for signed characters.
1716
1717Made regex.c with NO_ALLOCA undefined work.
1718
1719Fixed bug in dfa.c for systems where free(NULL) bombs.
1720
1721Deleted a few cant_happen()'s that *really* can't hapen.
1722
1723Changes from 2.12.21 to 2.12.22
1724-------------------------------
1725
1726Added to config stuff the ability to choose YACC rather than bison.
1727
1728Fixed CHAR_UNSIGNED in config.h-dist.
1729
1730Second arg. of strtod() is char ** rather than const char **.
1731
1732stackb is now initially malloc()'ed since it may be realloc()'ed.
1733
1734VMS updates.
1735
1736Added SIZE_T_MISSING to config stuff and a default typedef to awk.h.
1737 (Maybe it is not needed on any current systems??)
1738
1739re_compile_pattern()'s size is now size_t unconditionally.
1740
1741Changes from 2.12.20 to 2.12.21
1742-------------------------------
1743
1744Corrected missing/gcvt.c.
1745
1746Got rid of use of dup2() and thus DUP_MISSING.
1747
1748Updated config/sgi33.
1749
1750Turned on (and fixed) in cmp_nodes() the behaviour that I *hope* will be in
1751 POSIX 1003.2 for relational comparisons.
1752
1753Small updates to test suite.
1754
1755Changes from 2.12.19 to 2.12.20
1756-------------------------------
1757
1758Sloppy, sloppy, sloppy!! I didn't even try to compile the last two
1759 patches. This one fixes goofs in regex.c.
1760
1761Changes from 2.12.18 to 2.12.19
1762-------------------------------
1763
1764Cleanup of last patch.
1765
1766Changes from 2.12.17 to 2.12.18
1767-------------------------------
1768
1769Makefile renamed to Makefile-dist.
1770
1771Added alloca() configuration to mkconf. (A bit kludgey.) Just
1772 add a single line containing ALLOCA_PW, ALLOCA_S or ALLOCA_C
1773 to the appropriate config file to have Makefile-dist edited
1774 accordingly.
1775
1776Reorganized output flushing to correspond with new semantics of
1777 devopen() on "/dev/std*" etc.
1778
1779Fixed rest of last goof!!
1780
1781Save and restore errno in do_pathopen().
1782
1783Miscellaneous atari updates.
1784
1785Get rid of the trailing comma in the NODETYPE definition (Cray
1786 compiler won't take it).
1787
1788Try to make the use of `const' consistent since Cray compiler is
1789 fussy about that. See the changes to `basename' and `myname'.
1790
1791It turns out that, according to section 3.8.3 (Macro Replacement)
1792 of the ANSI Standard: ``If there are sequences of preprocessing
1793 tokens within the list of arguments that would otherwise act as
1794 preprocessing directives, the behavior is undefined.'' That means
1795 that you cannot count on the behavior of the declaration of
1796 re_compile_pattern in awk.h, and indeed the Cray compiler chokes on it.
1797
1798Replaced alloca with malloc/realloc/free in regex.c. It was much simpler
1799 than expected. (Inside NO_ALLOCA for now -- by default no alloca.)
1800
1801Added a configuration file, config/cray60, for Unicos-6.0.
1802
1803Changes from 2.12.16 to 2.12.17
1804-------------------------------
1805
1806Ooops. Goofed signal use in last patch.
1807
1808Changes from 2.12.15 to 2.12.16
1809-------------------------------
1810
1811RENAMED *_dir to just * (e.g. missing_dir).
1812
1813Numerous VMS changes.
1814
1815Proper inclusion of atari and vms files.
1816
1817Added experimental (ifdef'd out) RELAXED_CONTINUATION and DEFAULT_FILETYPE
1818 -- please comment on these!
1819
1820Moved pathopen() to io.c (sigh).
1821
1822Put local directory ahead in default AWKPATH.
1823
1824Added facility in mkconf to echo comments on stdout: lines beginning
1825 with "#echo " will have the remainder of the line echoed when mkconf is run.
1826 Any lines starting with "#" will otherwise be treated as comments. The
1827 intent is to be able to say:
1828 "#echo Make sure you uncomment alloca.c in the Makefile"
1829 or the like.
1830
1831Prototype fix for V.4
1832
1833Fixed version_string to not print leading @(#).
1834
1835Fixed FIELDWIDTHS to work with strict (turned out to be easy).
1836
1837Fixed conf for V.2.
1838
1839Changed semantics of /dev/fd/n to be like on real /dev/fd.
1840
1841Several configuration and updates in the makefile.
1842
1843Updated manpage.
1844
1845Include tzset.c and system.c from missing_dir that were accidently left out of
1846 the last patch.
1847
1848Fixed bug in cmdline variable assignment -- arg was getting freed(!) in
1849 call to variable.
1850
1851Backed out of parse-time constant folding for now, until I can figure out
1852 how to do it right.
1853
1854Fixed devopen() so that getline <"-" works.
1855
1856Changes from 2.12.14 to 2.12.15
1857-------------------------------
1858
1859Changed config/* to a condensed form that can be used with mkconf to generate
1860 a config.h from config.h-dist -- much easier to maintain. Please check
1861 carefully against what you had before for a particular system and report
1862 any problems. vms.h remains separate since the stuff at the bottom
1863 didn't quite fit the mkconf model -- hopefully cleared up later.
1864
1865Fixed bug in grammar -- didn't allow function definition to be separated from
1866 other rules by a semi-colon.
1867
1868VMS fix to #includes in missing.c -- should we just be including awk.h?
1869
1870Updated README for texinfo.tex version.
1871
1872Updating of copyright in all .[chy] files.
1873
1874Added but commented out Michal's fix to strftime.
1875
1876Added tzset() emulation based on Rick Adams' code. Added TZSET_MISSING to
1877 config.h-dist.
1878
1879Added strftime.3 man page for missing_dir
1880
1881More posix: func, **, **= don't work in -W posix
1882
1883More lint: ^, ^= not in old awk
1884
1885gawk.1: removed ref to -DNO_DEV_FD, other minor updating.
1886
1887Style change: pushbak becomes pushback() in yylex().
1888
1889Changes from 2.12.13 to 2.12.14
1890-------------------------------
1891
1892Better (?) organization of awk.h -- attempt to keep all system dependencies
1893 near the top and move some of the non-general things out of the config.h
1894 files.
1895
1896Change to handling of SYSTEM_MISSING.
1897
1898Small change to ultrix config.
1899
1900Do "/dev/fd/*" etc. checking at runtime.
1901
1902First pass at VMS port.
1903
1904Improvements to error handling (when lexeme spans buffers).
1905
1906Fixed backslash handling -- why didn't I notice this sooner?
1907
1908Added programs from book to test suite and new target "bigtest" to Makefile.
1909
1910Changes from 2.12.12 to 2.12.13
1911-------------------------------
1912
1913Recognize OFS and ORS specially so that OFS = 9 works without efficiency hit.
1914 Took advantage of opportunity to tune do_print*() for about 10% win on a
1915 print with 5 args (i.e. small but significant).
1916
1917Somewhat pervasive changes to reconcile CONVFMT vs. OFMT.
1918
1919Better initialization of builtin vars.
1920
1921Make config/* consistent wrt STRTOL_MISSING.
1922
1923Small portability improvement to alloca.s
1924
1925Improvements to lint code in awk.y
1926
1927Replaced strtol() with a better one by Chris Torek.
1928
1929Changes from 2.12.11 to 2.12.12
1930-------------------------------
1931
1932Added PORTS file to record successful ports.
1933
1934Added #define const to nothing if not STDC and added const to strtod() header.
1935
1936Added * to printf capabilities and partially implemented ' ' and '+' (has an
1937 effect for %d only, silently ignored for other formats). I'm afraid that's
1938 as far as I want to go before I look at a complete replacement for
1939 do_sprintf().
1940
1941Added warning for /regexp/ on LHS of MATCHOP.
1942
1943Changes from 2.12.10 to 2.12.11
1944-------------------------------
1945
1946Small Makefile improvements.
1947
1948Some remaining nits from the NeXT port.
1949
1950Got rid of bcopy() define in awk.h -- not needed anymore (??)
1951
1952Changed private in builtin.c -- it is special on Sequent.
1953
1954Added subset implementation of strtol() and STRTOL_MISSING.
1955
1956A little bit of cleanup in debug.c, dfa.c.
1957
1958Changes from 2.12.9 to 2.12.10
1959------------------------------
1960
1961Redid compatability checking and checking for # of args.
1962
1963Removed all references to variables[] from outside awk.y, in preparation
1964 for a more abstract interface to the symbol table.
1965
1966Got rid of a remaining use of bcopy() in regex.c.
1967
1968Changes from 2.12.8 to 2.12.9
1969-----------------------------
1970
1971Portability improvements for atari, next and decstation.
1972
1973Bug fix in substr() -- wasn't handling 3rd arg. of -1 properly.
1974
1975Manpage updates.
1976
1977Moved support from src release to doc release.
1978
1979Updated FUTURES file.
1980
1981Added some "lint" warnings.
1982
1983Changes from 2.12.7 to 2.12.8
1984-----------------------------
1985
1986Changed time() to systime().
1987
1988Changed warning() in snode() to fatal().
1989
1990strftime() now defaults second arg. to current time.
1991
1992Changes from 2.12.6 to 2.12.7
1993-----------------------------
1994
1995Fixed bug in sub_common() involving inadequate allocation of a buffer.
1996
1997Added some missing files to the Makefile.
1998
1999Changes from 2.12.5 to 2.12.6
2000-----------------------------
2001
2002Fixed bug wherein non-redirected getline could call iop_close() just
2003 prior to a call from do_input().
2004
2005Fixed bug in handling of /dev/stdout and /dev/stderr.
2006
2007Changes from 2.12.4 to 2.12.5
2008-----------------------------
2009
2010Updated README and support directory.
2011
2012Changes from 2.12.3 to 2.12.4
2013-----------------------------
2014
2015Updated CHANGES and TODO (should have been done in previous 2 patches).
2016
2017Changes from 2.12.2 to 2.12.3
2018-----------------------------
2019
2020Brought regex.c and alloca.s into line with current FSF versions.
2021
2022Changes from 2.12.1 to 2.12.2
2023-----------------------------
2024
2025Portability improvements; mostly moving system prototypes out of awk.h
2026
2027Introduction of strftime.
2028
2029Use of CONVFMT.
2030
2031Changes from 2.12 to 2.12.1
2032-----------------------------
2033
2034Consolidated treatment of command-line assignments (thus correcting the
2035-v treatment).
2036
2037Rationalized builtin-variable handling into a table-driven process, thus
2038simplifying variable() and eliminating spc_var().
2039
2040Fixed bug in handling of command-line source that ended in a newline.
2041
2042Simplified install() and lookup().
2043
2044Did away with double-mallocing of identifiers and now free second and later
2045instances of a name, after the first gets installed into the symbol table.
2046
2047Treat IGNORECASE specially, simplifying a lot of code, and allowing
2048checking against strict conformance only on setting it, rather than on each
2049pattern match.
2050
2051Fixed regexp matching when IGNORECASE is non-zero (broken when dfa.c was
2052added).
2053
2054Fixed bug where $0 was not being marked as valid, even after it was rebuilt.
2055This caused mangling of $0.
2056
2057
2058Changes from 2.11.1 to 2.12
2059-----------------------------
2060
2061Makefile:
2062
2063Portability improvements in Makefile.
2064Move configuration stuff into config.h
2065
2066FSF files:
2067
2068Synchronized alloca.[cs] and regex.[ch] with FSF.
2069
2070array.c:
2071
2072Rationalized hash routines into one with a different algorithm.
2073delete() now works if the array is a local variable.
2074Changed interface of assoc_next() and avoided dereferencing past the end of the
2075 array.
2076
2077awk.h:
2078
2079Merged non-prototype and prototype declarations in awk.h.
2080Expanded tree_eval #define to short-circuit more calls of r_tree_eval().
2081
2082awk.y:
2083
2084Delinted some of the code in the grammar.
2085Fixed and improved some of the error message printing.
2086Changed to accomodate unlimited length source lines.
2087Line continuation now works as advertised.
2088Source lines can be arbitrarily long.
2089Refined grammar hacks so that /= assignment works. Regular expressions
2090 starting with /= are recognized at the beginning of a line, after && or ||
2091 and after ~ or !~. More contexts can be added if necessary.
2092Fixed IGNORECASE (multiple scans for backslash).
2093Condensed expression_lists in array references.
2094Detect and warn for correct # args in builtin functions -- call most of them
2095 with a fixed number (i.e. fill in defaults at parse-time rather than at
2096 run-time).
2097Load ENVIRON only if it is referenced (detected at parse-time).
2098Treat NF, FS, RS, NR, FNR specially at parse time, to improve run time.
2099Fold constant expressions at parse time.
2100Do make_regexp() on third arg. of split() at parse tiem if it is a constant.
2101
2102builtin.c:
2103
2104srand() returns 0 the first time called.
2105Replaced alloca() with malloc() in do_sprintf().
2106Fixed setting of RSTART and RLENGTH in do_match().
2107Got rid of get_{one,two,three} and allowance for variable # of args. at
2108 run-time -- this is now done at parse-time.
2109Fixed latent bug in [g]sub whereby changes to $0 would never get made.
2110Rewrote much of sub_common() for simplicity and performance.
2111Added ctime() and time() builtin functions (unless -DSTRICT). ctime() returns
2112 a time string like the C function, given the number of seconds since the epoch
2113 and time() returns the current time in seconds.
2114do_sprintf() now checks for mismatch between format string and number of
2115 arguments supplied.
2116
2117dfa.c
2118
2119This is borrowed (almost unmodified) from GNU grep to provide faster searches.
2120
2121eval.c
2122
2123Node_var, Node_var_array and Node_param_list handled from macro rather
2124 than in r_tree_eval().
2125Changed cmp_nodes() to not do a force_number() -- this, combined with a
2126 force_number() on ARGV[] and ENVIRON[] brings it into line with other awks
2127Greatly simplified cmp_nodes().
2128Separated out Node_NF, Node_FS, Node_RS, Node_NR and Node_FNR in get_lhs().
2129All adjacent string concatenations now done at once.
2130
2131field.c
2132
2133Added support for FIELDWIDTHS.
2134Fixed bug in get_field() whereby changes to a field were not always
2135 properly reflected in $0.
2136Reordered tests in parse_field() so that reference off the end of the buffer
2137 doesn't happen.
2138set_FS() now sets *parse_field i.e. routine to call depending on type of FS.
2139It also does make_regexp() for FS if needed. get_field() passes FS_regexp
2140 to re_parse_field(), as does do_split().
2141Changes to set_field() and set_record() to avoid malloc'ing and free'ing the
2142 field nodes repeatedly. The fields now just point into $0 unless they are
2143 assigned to another variable or changed. force_number() on the field is
2144 *only* done when the field is needed.
2145
2146gawk.1
2147
2148Fixed troff formatting problem on .TP lines.
2149
2150io.c
2151
2152Moved some code out into iop.c.
2153Output from pipes and system() calls is properly synchronized.
2154Status from pipe close properly returned.
2155Bug in getline with no redirect fixed.
2156
2157iop.c
2158
2159This file contains a totally revamped get_a_record and associated code.
2160
2161main.c
2162
2163Command line programs no longer use a temporary file.
2164Therefore, tmpnam() no longer required.
2165Deprecated -a and -e options -- they will go away in the next release,
2166 but for now they cause a warning.
2167Moved -C, -V, -c options to -W ala posix.
2168Added -W posix option: throw out \x
2169Added -W lint option.
2170
2171
2172node.c
2173
2174force_number() now allows pure numerics to have leading whitespace.
2175Added make_string facility to optimize case of adding an already malloc'd
2176 string.
2177Cleaned up and simplified do_deref().
2178Fixed bug in handling of stref==255 in do_deref().
2179
2180re.c
2181
2182contains the interface to regexp code
2183
2184Changes from 2.11.1 to FSF version of same
2185------------------------------------------
2186Thu Jan 4 14:19:30 1990 Jim Kingdon (kingdon at albert)
2187
2188 * Makefile (YACC): Add -y to bison part.
2189
2190 * missing.c: Add #include <stdio.h>.
2191
2192Sun Dec 24 16:16:05 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu)
2193
2194 * Makefile: Add (commented out) default defines for Sony News.
2195
2196 * awk.h: Move declaration of vprintf so it will compile when
2197 -DVPRINTF_MISSING is defined.
2198
2199Mon Nov 13 18:54:08 1989 Robert J. Chassell (bob at apple-gunkies.ai.mit.edu)
2200
2201 * gawk.texinfo: changed @-commands that are not part of the
2202 standard, currently released texinfmt.el to those that are.
2203 Otherwise, only people with the as-yet unreleased makeinfo.c can
2204 format this file.
2205
2206Changes from 2.11beta to 2.11.1 (production)
2207--------------------------------------------
2208
2209Went from "beta" to production status!!!
2210
2211Now flushes stdout before closing pipes or redirected files to
2212synchronize output.
2213
2214MS-DOS changes added in.
2215
2216Signal handler return type parameterized in Makefile and awk.h and
2217some lint removed. debug.c cleaned up.
2218
2219Fixed FS splitting to never match null strings, per book.
2220
2221Correction to the manual's description of FS.
2222
2223Some compilers break on char *foo = "string" + 4 so fixed version.sh and
2224main.c.
2225
2226Changes from 2.10beta to 2.11beta
2227---------------------------------
2228
2229This release fixes all reported bugs that we could reproduce. Probably
2230some of the changes are not documented here.
2231
2232The next release will probably not be a beta release!
2233
2234The most important change is the addition of the -nostalgia option. :-)
2235
2236The documentation has been improved and brought up-to-date.
2237
2238There has been a lot of general cleaning up of the code that is not otherwise
2239documented here. There has been a movement toward using standard-conforming
2240library routines and providing them (in missing.d) for systems lacking them.
2241Improved (hopefully) configuration through Makfile modifications and missing.c.
2242In particular, straightened out confusion over vprintf #defines, declarations
2243etc.
2244
2245Deleted RCS log comments from source, to reduce source size by about one third.
2246Most of them were horribly out-of-date, anyway.
2247
2248Renamed source files to reflect (for the most part) their contents.
2249
2250More and improved error messages. Cleanup and fixes to yyerror().
2251String constants are not altered in input buffer, so error messages come out
2252better. Fixed usage message. Make use of ANSI C strerror() function
2253(provided).
2254
2255Plugged many more memory leaks. The memory consumption is now quite
2256reasonable over a wide range of programs.
2257
2258Uses volatile declaration if STDC > 0 to avoid problems due to longjmp.
2259
2260New -a and -e options to use awk or egrep style regexps, respectively,
2261since POSIX says awk should use egrep regexps. Default is -a.
2262
2263Added -v option for setting variables before the first file is encountered.
2264Version information now uses -V and copyleft uses -C.
2265
2266Added a patchlevel.h file and its use for -V and -C.
2267
2268Append_right() optimized for major improvement to programs with a *lot*
2269of statements.
2270
2271Operator precedence has been corrected to match draft Posix.
2272
2273Tightened up grammar for builtin functions so that only length
2274may be called without arguments or parentheses.
2275
2276/regex/ is now a normal expression that can appear in any expression
2277context.
2278
2279Allow /= to begin a regexp. Allow ..[../..].. in a regexp.
2280
2281Allow empty compound statements ({}).
2282
2283Made return and next illegal outside a function and in BEGIN/END respectively.
2284
2285Division by zero is now illegal and causes a fatal error.
2286
2287Fixed exponentiation so that x ^ 0 and x ^= 0 both return 1.
2288
2289Fixed do_sqrt, do_log, and do_exp to do argument/return checking and
2290print an error message, per the manual.
2291
2292Fixed main to catch SIGSEGV to get source and data file line numbers.
2293
2294Fixed yyerror to print the ^ at the beginning of the bad token, not the end.
2295
2296Fix to substr() builtin: it was failing if the arguments
2297weren't already strings.
2298
2299Added new node value flag NUMERIC to indicate that a variable is
2300purely a number as opposed to type NUM which indicates that
2301the node's numeric value is valid. This is set in make_number(),
2302tmp_number and r_force_number() when appropriate and used in
2303cmp_nodes(). This fixed a bug in comparison of variables that had
2304numeric prefixes. The new code uses strtod() and eliminates is_a_number().
2305A simple strtod() is provided for systems lacking one. It does no
2306overflow checking, so could be improved.
2307
2308Simplification and efficiency improvement in force_string.
2309
2310Added performance tweak in r_force_number().
2311
2312Fixed a bug with nested loops and break/continue in functions.
2313
2314Fixed inconsistency in handling of empty fields when $0 has to be rebuilt.
2315Happens to simplify rebuild_record().
2316
2317Cleaned up the code associated with opening a pipe for reading. Gawk
2318now has its own popen routine (gawk_popen) that allocates an IOBUF
2319and keeps track of the pid of the child process. gawk_pclose
2320marks the appropriate child as defunct in the right struct redirect.
2321
2322Cleaned up and fixed close_redir().
2323
2324Fixed an obscure bug to do with redirection. Intermingled ">" and ">>"
2325redirects did not output in a predictable order.
2326
2327Improved handling of output buffering: now all print[f]s redirected to a tty
2328or pipe are flushed immediately and non-redirected output to a tty is flushed
2329before the next input record is read.
2330
2331Fixed a bug in get_a_record() where bcopy() could have copied over
2332a random pointer.
2333
2334Fixed a bug when RS="" and records separated by multiple blank lines.
2335
2336Got rid of SLOWIO code which was out-of-date anyway.
2337
2338Fix in get_field() for case where $0 is changed and then $(n) are
2339changed and then $0 is used.
2340
2341Fixed infinite loop on failure to open file for reading from getline.
2342Now handles redirect file open failures properly.
2343
2344Filenames such as /dev/stdin now allowed on the command line as well as
2345in redirects.
2346
2347Fixed so that gawk '$1' where $1 is a zero tests false.
2348
2349Fixed parsing so that `RLENGTH -1' parses the same as `RLENGTH - 1',
2350for example.
2351
2352The return from a user-defined function now defaults to the Null node.
2353This fixes a core-dump-causing bug when the return value of a function
2354is used and that function returns no value.
2355
2356Now catches floating point exceptions to avoid core dumps.
2357
2358Bug fix for deleting elements of an array -- under some conditions, it was
2359deleting more than one element at a time.
2360
2361Fix in AWKPATH code for running off the end of the string.
2362
2363Fixed handling of precision in *printf calls. %0.2d now works properly,
2364as does %c. [s]printf now recognizes %i and %X.
2365
2366Fixed a bug in printing of very large (>240) strings.
2367
2368Cleaned up erroneous behaviour for RS == "".
2369
2370Added IGNORECASE support to index().
2371
2372Simplified and fixed newnode/freenode.
2373
2374Fixed reference to $(anything) in a BEGIN block.
2375
2376Eliminated use of USG rand48().
2377
2378Bug fix in force_string for machines with 16-bit ints.
2379
2380Replaced use of mktemp() with tmpnam() and provided a partial implementation of
2381the latter for systems that don't have it.
2382
2383Added a portability check for includes in io.c.
2384
2385Minor portability fix in alloc.c plus addition of xmalloc().
2386
2387Portability fix: on UMAX4.2, st_blksize is zero for a pipe, thus breaking
2388iop_alloc() -- fixed.
2389
2390Workaround for compiler bug on Sun386i in do_sprintf.
2391
2392More and improved prototypes in awk.h.
2393
2394Consolidated C escape parsing code into one place.
2395
2396strict flag is now turned on only when invoked with compatability option.
2397It now applies to fewer things.
2398
2399Changed cast of f._ptr in vprintf.c from (unsigned char *) to (char *).
2400Hopefully this is right for the systems that use this code (I don't).
2401
2402Support for pipes under MSDOS added.
Note: See TracBrowser for help on using the repository browser.