• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/****************************************************************
2Copyright (C) Lucent Technologies 1997
3All Rights Reserved
4
5Permission to use, copy, modify, and distribute this software and
6its documentation for any purpose and without fee is hereby
7granted, provided that the above copyright notice appear in all
8copies and that both that the copyright notice and this
9permission notice and warranty disclaimer appear in supporting
10documentation, and that the name Lucent Technologies or any of
11its entities not be used in advertising or publicity pertaining
12to distribution of the software without specific, written prior
13permission.
14
15LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
16INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
17IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
18SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
19WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
20IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
21ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
22THIS SOFTWARE.
23****************************************************************/
24
25This file lists all bug fixes, changes, etc., made since the AWK book
26was sent to the printers in August, 1987.
27
28February 15, 2021:
29	Small fix so that awk will compile again with g++. Thanks to
30	Arnold Robbins.
31
32January 06, 2021:
33	Fix a decision bug with trailing stuff in lib.c:is_valid_number
34	after recent changes. Thanks to Ozan Yigit.
35
36December 18, 2020:
37	Fix problems converting inf and NaN values in lib.c:is_valid_number.
38	Enhance number to string conversion to do the right thing for
39	NaN and inf values.  Things are now pretty much the same as in
40	gawk.  (Found a gawk bug while we're at it.) Added a torture
41	test for these values.  Thanks to Arnold Robbins.  Allows closing
42	of PR #101.
43
44December 15, 2020:
45	Merge PR #99, which gets the right header for strcasecmp.
46	Thanks to GitHub user michaelforney.
47
48December 8, 2020:
49	Merge PR #98: Disallow hex data. Allow only +nan, -nan,
50	+inf, -inf (case independent) to give NaN and infinity values.
51	Improve things so that string to double conversion is only
52	done once, yielding something of a speedup.  This obviate
53	PR #95. Thanks to Arnold Robbins.
54
55December 3, 2020:
56	Fix to argument parsing to avoid printing spurious newlines.
57	Thanks to Todd Miller. Merges PR #97.
58
59October 13, 2020:
60	Add casts before all the calls to malloc/calloc/realloc in order
61	to get it to compile with g++. Thanks to Arnold Robbins.
62
63August 16, 2020:
64	Additional fixes for DJGPP. Thanks to Eli Zaretskii for
65	the testing.
66
67August 7, 2020:
68	Merge PR #93, which adds casts to (void*) for debug prints
69	using the %p format specifier. Thanks to GitHub user YongHaoWu
70	("Chris") for the fixes.
71
72August 4, 2020:
73	In run.c, use non-restartable multibyte routines to attain
74	portability to DJGPP. Should fix Issue 92. Thanks to Albert Wik
75	for the report and to Todd Miller for the suggested fix.
76
77July 30, 2020:
78	Merge PRs 88-91 which fix small bugs. Thanks to Todd Miller and
79	Tim van der Molen for the fixes.
80
81	In order to make life easier, we move exclusively to bison
82	as the parser generator.
83
84July 2, 2020:
85	Merge PRs 85 and 86 which fix regressions. Thanks to
86	Tim van der Molen for the fixes.
87
88June 25, 2020:
89	Merge PRs 82 and 84. The latter fixes issue #83. Thanks to
90	Todd Miller and awkfan77.
91
92June 12, 2020:
93	Clear errno before calling errcheck to avoid any spurious errors
94	left over from previous calls that may have set it. Thanks to
95	Todd Miller for the fix, from PR #80.
96
97	Fix Issue #78 by allowing \r to follow floating point numbers in
98	lib.c:is_number. Thanks to GitHub user ajcarr for the report
99	and to Arnold Robbins for the fix.
100
101June 5, 2020:
102	In fldbld(), make sure that inputFS is set before trying to
103	use it. Thanks to  Steffen Nurpmeso <steffen@sdaoden.eu>
104	for the report.
105
106May 5, 2020:
107	Fix checks for compilers that can handle noreturn. Thanks to
108	GitHub user enh-google for pointing it out. Closes Issue #79.
109
110April 16, 2020:
111	Handle old compilers that don't support C11 (for noreturn).
112	Thanks to Arnold Robbins.
113
114April 5, 2020:
115	Use <stdnoreturn.h> and noreturn instead of GCC attributes.
116	Thanks to GitHub user awkfan77. Closes PR #77.
117
118February 28, 2020:
119	More cleanups from Christos Zoulas: notably backslash continuation
120	inside strings removes the newline and a fix for RS = "^a".
121	Fix for address sanitizer-found problem. Thanks to GitHub user
122	enh-google.
123
124February 19, 2020:
125	More small cleanups from Christos Zoulas.
126
127February 18, 2020:
128	Additional cleanups from Christos Zoulas. It's no longer necessary
129	to use the -y flag to bison.
130
131February 6, 2020:
132	Additional small cleanups from Christos Zoulas. awk is now
133	a little more robust about reporting I/O errors upon exit.
134
135January 31, 2020:
136	Merge PR #70, which avoids use of variable length arrays. Thanks
137	to GitHub user michaelforney.  Fix issue #60 ({0} in interval
138	expressions doesn't work).  Also get all tests working again.
139	Thanks to Arnold Robbins.
140
141January 24, 2020:
142	A number of small cleanups from Christos Zoulas.  Add the close
143	on exec flag to files/pipes opened for redirection; courtesy of
144	Arnold Robbins.
145
146January 19, 2020:
147	If POSIXLY_CORRECT is set in the environment, then sub and gsub
148	use POSIX rules for multiple backslashes.  This fixes Issue #66,
149	while maintaining backwards compatibility.
150
151January 9, 2020:
152	Input/output errors on closing files are now fatal instead of
153	mere warnings. Thanks to Martijn Dekker <martijn@inlv.org>.
154
155January 5, 2020:
156	Fix a bug in the concatentation of two string constants into
157	one done in the grammar.  Fixes GitHub issue #61.  Thanks
158	to GitHub user awkfan77 for pointing out the direction for
159	the fix.  New test T.concat added to the test suite.
160	Fix a few memory leaks reported by valgrind, as well.
161
162December 27, 2019:
163	Fix a bug whereby a{0,3} could match four a's.  Thanks to
164	"Anonymous AWK fan" for the report.
165
166December 11, 2019:
167	Further printf-related fixes for 32 bit systems.
168	Thanks again to Christos Zoulas.
169
170December 8, 2019:
171	Fix the return value of sprintf("%d") on 32 bit systems.
172	Thanks to Jim Lowe for the report and to Christos Zoulas
173	for the fix.
174
175November 10, 2019:
176	Convert a number of Boolean integer variables into
177	actual bools. Convert compile_time variable into an
178	enum and simplify some of the related code.  Thanks
179	to Arnold Robbins.
180
181November 8, 2019:
182	Fix from Ori Bernstein to get UTF-8 characters instead of
183	bytes when FS = "".  This is currently the only bit of
184	the One True Awk that understands multibyte characters.
185	From Arnold Robbins, apply some cleanups in the test suite.
186
187October 25, 2019:
188	More fixes and cleanups from NetBSD, courtesy of Christos
189	Zoulas. Merges PRs 54 and 55.
190
191October 24, 2019:
192	Import second round of code cleanups from NetBSD. Much thanks
193	to Christos Zoulas (GitHub user zoulasc). Merges PR 53.
194	Add an optimization for string concatenation, also from
195	Christos.
196
197October 17, 2019:
198	Import code cleanups from NetBSD. Much thanks to Christos
199	Zoulas (GitHub user zoulasc). Merges PR 51.
200
201October 6, 2019:
202	Import code from NetBSD awk that implements RS as a regular
203	expression.
204
205September 10, 2019:
206	Fixes for various array / memory overruns found via gcc's
207	-fsanitize=unknown. Thanks to Alexander Richardson (GitHub
208	user arichardson). Merges PRs 47 and 48.
209
210July 28, 2019:
211	Import grammar optimization from NetBSD: Two string constants
212	concatenated together get turned into a single string.
213
214July 26, 2019:
215	Support POSIX-specified C-style escape sequences "\a" (alarm)
216	and "\v" (vertical tab) in command line arguments and regular
217	expressions, further to the support for them in strings added on
218	Apr 9, 1989. These now no longer match as literal "a" and "v"
219	characters (as they don't on other awk implementations).
220	Thanks to Martijn Dekker.
221
222July 17, 2019:
223	Pull in a number of code cleanups and minor fixes from
224	Warner Losh's bsd-ota branch.  The only user visible change
225	is the use of random(3) as the random number generator.
226	Thanks to Warner Losh for collecting all these fixes in
227	one easy place to get them from.
228
229July 16, 2019:
230	Fix field splitting to use FS value as of the time a record
231	was read or assigned to.  Thanks to GitHub user Cody Mello (melloc)
232	for the fix. (Merged from his branch, via PR #42.) Updated
233	testdir/T.split per said PR as well.
234
235June 24, 2019:
236	Extract awktest.tar into testdir directory. Add some very
237	simple mechanics to the makefile for running the tests and
238	for cleaning up. No changes to awk itself.
239
240June 17, 2019:
241	Disallow deleting SYMTAB and its elements, which creates
242	use-after-free bugs. Thanks to GitHub user Cody Mello (melloc)
243	for the fix. (Merged from PR #43.)
244
245June 5, 2019:
246	Allow unmatched right parenthesis in a regular expression to
247	be treated literally. Fixes Issue #40. Thanks to GitHub user
248	Warner Losh (bsdimp) for the report. Thanks to Arnold Robbins
249	for the fix.
250
251May 29,2019:
252	Fix check for command line arguments to no longer require that
253	first character after '=' not be another '='. Reverts change of
254	August 11, 1989. Thanks to GitHub user Jamie Landeg Jones for
255	pointing out the issue; from Issue #38.
256
257Apr 7, 2019:
258	Update awktest.tar(p.50) to use modern options to sort. Needed
259	for Android development. Thanks to GitHub user mohd-akram (Mohamed
260	Akram).  From Issue #33.
261
262Mar 12, 2019:
263	Added very simplistic support for cross-compiling in the
264	makefile.  We are NOT going to go in the direction of the
265	autotools, though.  Thanks to GitHub user nee-san for
266	the basic change. (Merged from PR #34.)
267
268Mar 5, 2019:
269	Added support for POSIX-standard interval expressions (a.k.a.
270	bounds, a.k.a. repetition expressions) in regular expressions,
271	backported (via NetBSD) from Apple awk-24 (20070501).
272	Thanks to Martijn Dekker <martijn@inlv.org> for the port.
273	(Merged from PR #30.)
274
275Mar 3, 2019:
276	Merge PRs as follows:
277	#12: Avoid undefined behaviour when using ctype(3) functions in
278	     relex(). Thanks to GitHub user iamleot.
279	#31: Make getline handle numeric strings, and update FIXES. Thanks
280	     to GitHub user arnoldrobbins.
281	#32: maketab: support build systems with read-only source. Thanks
282	     to GitHub user enh.
283
284Jan 25, 2019:
285	Make getline handle numeric strings properly in all cases.
286	(Thanks, Arnold.)
287
288Jan 21, 2019:
289	Merged a number of small fixes from GitHub pull requests.
290	Thanks to GitHub users Arnold Robbins (arnoldrobbins),
291	Cody Mello (melloc) and Christoph Junghans (junghans).
292	PR numbers: 13-21, 23, 24, 27.
293
294Oct 25, 2018:
295	Added test in maketab.c to prevent generating a proctab entry
296	for YYSTYPE_IS_DEFINED.  It was harmless but some gcc settings
297	generated a warning message.  Thanks to Nan Xiao for report.
298
299Aug 27, 2018:
300	Disallow '$' in printf formats; arguments evaluated in order
301	and printed in order.
302
303	Added some casts to silence warnings on debugging printfs.
304	(Thanks, Arnold.)
305
306Aug 23, 2018:
307        A long list of fixes courtesy of Arnold Robbins,
308        to whom profound thanks.
309
310        1. ofs-rebuild: OFS value used to rebuild the record was incorrect.
311        Fixed August 19, 2014. Revised fix August 2018.
312
313        2. system-status: Instead of a floating-point division by 256, use
314        the wait(2) macros to create a reasonable exit status.
315        Fixed March 12, 2016.
316
317        3. space: Use provided xisblank() function instead of ispace() for
318        matching [[:blank:]].
319
320        4. a-format: Add POSIX standard %a and %A to supported formats. Check
321        at runtime that this format is available.
322
323        5. decr-NF: Decrementing NF did not change $0. This is a decades-old
324        bug. There are interactions with the old and new value of OFS as well.
325        Most of the fix came from the NetBSD awk.
326
327        6. string-conv: String conversions of scalars were sticky.  Once a
328        conversion to string happened, even with OFMT, that value was used until
329        a new numeric value was assigned, even if OFMT differed from CONVFMT,
330        and also if CONVFMT changed.
331
332        7. unary-plus: Unary plus on a string constant returned the string.
333        Instead, it should convert the value to numeric and give that value.
334
335	Also added Arnold's tests for these to awktest.tar as T.arnold.
336
337Aug 15, 2018:
338	fixed mangled awktest.tar (thanks, Arnold), posted all
339	current (very minor) fixes to github / onetrueawk
340
341Jun 7, 2018:
342	(yes, a long layoff)
343	Updated some broken tests (beebe.tar, T.lilly)
344	[thanks to Arnold Robbins]
345
346Mar 26, 2015:
347	buffer overflow in error reporting; thanks to tobias ulmer
348	and john-mark gurney for spotting it and the fix.
349
350Feb 4, 2013:
351	cleaned up a handful of tests that didn't seem to actually
352	test for correct behavior: T.latin1, T.gawk.
353
354Jan 5, 2013:
355	added ,NULL initializer to static Cells in run.c; not really
356	needed but cleaner.  Thanks to Michael Bombardieri.
357
358Dec 20, 2012:
359	fiddled makefile to get correct yacc and bison flags.  pick yacc
360	(linux) or bison (mac) as necessary.
361
362	added  __attribute__((__noreturn__)) to a couple of lines in
363	proto.h, to silence someone's enthusiastic checker.
364
365	fixed obscure call by value bug in split(a[1],a) reported on
366	9fans.  the management of temporary values is just a mess; i
367	took a shortcut by making an extra string copy.  thanks
368	to paul patience and arnold robbins for passing it on and for
369	proposed patches.
370
371	tiny fiddle in setfval to eliminate -0 results in T.expr, which
372	has irritated me for 20+ years.
373
374Aug 10, 2011:
375	another fix to avoid core dump with delete(ARGV); again, many thanks
376	to ruslan ermilov.
377
378Aug 7, 2011:
379	split(s, a, //) now behaves the same as split(s, a, "")
380
381Jun 12, 2011:
382	/pat/, \n /pat/ {...} is now legal, though bad style to use.
383
384	added checks to new -v code that permits -vnospace; thanks to
385	ruslan ermilov for spotting this and providing the patch.
386
387	removed fixed limit on number of open files; thanks to aleksey
388	cheusov and christos zoulos.
389
390	fixed day 1 bug that resurrected deleted elements of ARGV when
391	used as filenames (in lib.c).
392
393	minor type fiddles to make gcc -Wall -pedantic happier (but not
394	totally so); turned on -fno-strict-aliasing in makefile.
395
396May 6, 2011:
397	added #ifdef for isblank.
398	now allows -ffoo as well as -f foo arguments.
399	(thanks, ruslan)
400
401May 1, 2011:
402	after advice from todd miller, kevin lo, ruslan ermilov,
403	and arnold robbins, changed srand() to return the previous
404	seed (which is 1 on the first call of srand).  the seed is
405	an Awkfloat internally though converted to unsigned int to
406	pass to the library srand().  thanks, everyone.
407
408	fixed a subtle (and i hope low-probability) overflow error
409	in fldbld, by adding space for one extra \0.  thanks to
410	robert bassett for spotting this one and providing a fix.
411
412	removed the files related to compilation on windows.  i no
413	longer have anything like a current windows environment, so
414	i can't test any of it.
415
416May 23, 2010:
417	fixed long-standing overflow bug in run.c; many thanks to
418	nelson beebe for spotting it and providing the fix.
419
420	fixed bug that didn't parse -vd=1 properly; thanks to santiago
421	vila for spotting it.
422
423Feb 8, 2010:
424	i give up.  replaced isblank with isspace in b.c; there are
425	no consistent header files.
426
427Nov 26, 2009:
428	fixed a long-standing issue with when FS takes effect.  a
429	change to FS is now noticed immediately for subsequent splits.
430
431	changed the name getline() to awkgetline() to avoid yet another
432	name conflict somewhere.
433
434Feb 11, 2009:
435	temporarily for now defined HAS_ISBLANK, since that seems to
436	be the best way through the thicket.  isblank arrived in C99,
437	but seems to be arriving at different systems at different
438	times.
439
440Oct 8, 2008:
441	fixed typo in b.c that set tmpvec wrongly.  no one had ever
442	run into the problem, apparently.  thanks to alistair crooks.
443
444Oct 23, 2007:
445	minor fix in lib.c: increase inputFS to 100, change malloc
446	for fields to n+1.
447
448	fixed memory fault caused by out of order test in setsval.
449
450	thanks to david o'brien, freebsd, for both fixes.
451
452May 1, 2007:
453	fiddle in makefile to fix for BSD make; thanks to igor sobrado.
454
455Mar 31, 2007:
456	fixed some null pointer refs calling adjbuf.
457
458Feb 21, 2007:
459	fixed a bug in matching the null RE in sub and gsub.  thanks to al aho
460	who actually did the fix (in b.c), and to wolfgang seeberg for finding
461	it and providing a very compact test case.
462
463	fixed quotation in b.c; thanks to Hal Pratt and the Princeton Dante
464	Project.
465
466	removed some no-effect asserts in run.c.
467
468	fiddled maketab.c to not complain about bison-generated values.
469
470	removed the obsolete -V argument; fixed --version to print the
471	version and exit.
472
473	fixed wording and an outright error in the usage message; thanks to igor
474	sobrado and jason mcintyre.
475
476	fixed a bug in -d that caused core dump if no program followed.
477
478Jan 1, 2007:
479	dropped mac.code from makefile; there are few non-MacOSX
480	mac's these days.
481
482Jan 17, 2006:
483	system() not flagged as unsafe in the unadvertised -safe option.
484	found it while enhancing tests before shipping the ;login: article.
485	practice what you preach.
486
487	removed the 9-years-obsolete -mr and -mf flags.
488
489	added -version and --version options.
490
491	core dump on linux with BEGIN {nextfile}, now fixed.
492
493	removed some #ifdef's in run.c and lex.c that appear to no
494	longer be necessary.
495
496Apr 24, 2005:
497	modified lib.c so that values of $0 et al are preserved in the END
498	block, apparently as required by posix.  thanks to havard eidnes
499	for the report and code.
500
501Jan 14, 2005:
502	fixed infinite loop in parsing, originally found by brian tsang.
503	thanks to arnold robbins for a suggestion that started me
504	rethinking it.
505
506Dec 31, 2004:
507	prevent overflow of -f array in main, head off potential error in
508	call of SYNTAX(), test malloc return in lib.c, all with thanks to
509	todd miller.
510
511Dec 22, 2004:
512	cranked up size of NCHARS; coverity thinks it can be overrun with
513	smaller size, and i think that's right.  added some assertions to b.c
514	to catch places where it might overrun.  the RE code is still fragile.
515
516Dec 5, 2004:
517	fixed a couple of overflow problems with ridiculous field numbers:
518	e.g., print $(2^32-1).  thanks to ruslan ermilov, giorgos keramidas
519	and david o'brien at freebsd.org for patches.  this really should
520	be re-done from scratch.
521
522Nov 21, 2004:
523	fixed another 25-year-old RE bug, in split.  it's another failure
524	to (re-)initialize.  thanks to steve fisher for spotting this and
525	providing a good test case.
526
527Nov 22, 2003:
528	fixed a bug in regular expressions that dates (so help me) from 1977;
529	it's been there from the beginning.  an anchored longest match that
530	was longer than the number of states triggered a failure to initialize
531	the machine properly.  many thanks to moinak ghosh for not only finding
532	this one but for providing a fix, in some of the most mysterious
533	code known to man.
534
535	fixed a storage leak in call() that appears to have been there since
536	1983 or so -- a function without an explicit return that assigns a
537	string to a parameter leaked a Cell.  thanks to moinak ghosh for
538	spotting this very subtle one.
539
540Jul 31, 2003:
541	fixed, thanks to andrey chernov and ruslan ermilov, a bug in lex.c
542	that mis-handled the character 255 in input.  (it was being compared
543	to EOF with a signed comparison.)
544
545Jul 29, 2003:
546	fixed (i think) the long-standing botch that included the beginning of
547	line state ^ for RE's in the set of valid characters; this led to a
548	variety of odd problems, including failure to properly match certain
549	regular expressions in non-US locales.  thanks to ruslan for keeping
550	at this one.
551
552Jul 28, 2003:
553	n-th try at getting internationalization right, with thanks to volker
554	kiefel, arnold robbins and ruslan ermilov for advice, though they
555	should not be blamed for the outcome.  according to posix, "."  is the
556	radix character in programs and command line arguments regardless of
557	the locale; otherwise, the locale should prevail for input and output
558	of numbers.  so it's intended to work that way.
559
560	i have rescinded the attempt to use strcoll in expanding shorthands in
561	regular expressions (cclenter).  its properties are much too
562	surprising; for example [a-c] matches aAbBc in locale en_US but abBcC
563	in locale fr_CA.  i can see how this might arise by implementation
564	but i cannot explain it to a human user.  (this behavior can be seen
565	in gawk as well; we're leaning on the same library.)
566
567	the issue appears to be that strcoll is meant for sorting, where
568	merging upper and lower case may make sense (though note that unix
569	sort does not do this by default either).  it is not appropriate
570	for regular expressions, where the goal is to match specific
571	patterns of characters.  in any case, the notations [:lower:], etc.,
572	are available in awk, and they are more likely to work correctly in
573	most locales.
574
575	a moratorium is hereby declared on internationalization changes.
576	i apologize to friends and colleagues in other parts of the world.
577	i would truly like to get this "right", but i don't know what
578	that is, and i do not want to keep making changes until it's clear.
579
580Jul 4, 2003:
581	fixed bug that permitted non-terminated RE, as in "awk /x".
582
583Jun 1, 2003:
584	subtle change to split: if source is empty, number of elems
585	is always 0 and the array is not set.
586
587Mar 21, 2003:
588	added some parens to isblank, in another attempt to make things
589	internationally portable.
590
591Mar 14, 2003:
592	the internationalization changes, somewhat modified, are now
593	reinstated.  in theory awk will now do character comparisons
594	and case conversions in national language, but "." will always
595	be the decimal point separator on input and output regardless
596	of national language.  isblank(){} has an #ifndef.
597
598	this no longer compiles on windows: LC_MESSAGES isn't defined
599	in vc6++.
600
601	fixed subtle behavior in field and record splitting: if FS is
602	a single character and RS is not empty, \n is NOT a separator.
603	this tortuous reading is found in the awk book; behavior now
604	matches gawk and mawk.
605
606Dec 13, 2002:
607	for the moment, the internationalization changes of nov 29 are
608	rolled back -- programs like x = 1.2 don't work in some locales,
609	because the parser is expecting x = 1,2.  until i understand this
610	better, this will have to wait.
611
612Nov 29, 2002:
613	modified b.c (with tiny changes in main and run) to support
614	locales, using strcoll and iswhatever tests for posix character
615	classes.  thanks to ruslan ermilov (ru@freebsd.org) for code.
616	the function isblank doesn't seem to have propagated to any
617	header file near me, so it's there explicitly.  not properly
618	tested on non-ascii character sets by me.
619
620Jun 28, 2002:
621	modified run/format() and tran/getsval() to do a slightly better
622	job on using OFMT for output from print and CONVFMT for other
623	number->string conversions, as promised by posix and done by
624	gawk and mawk.  there are still places where it doesn't work
625	right if CONVFMT is changed; by then the STR attribute of the
626	variable has been irrevocably set.  thanks to arnold robbins for
627	code and examples.
628
629	fixed subtle bug in format that could get core dump.  thanks to
630	Jaromir Dolecek <jdolecek@NetBSD.org> for finding and fixing.
631	minor cleanup in run.c / format() at the same time.
632
633	added some tests for null pointers to debugging printf's, which
634	were never intended for external consumption.  thanks to dave
635	kerns (dkerns@lucent.com) for pointing this out.
636
637	GNU compatibility: an empty regexp matches anything (thanks to
638	dag-erling smorgrav, des@ofug.org).  subject to reversion if
639	this does more harm than good.
640
641	pervasive small changes to make things more const-correct, as
642	reported by gcc's -Wwrite-strings.  as it says in the gcc manual,
643	this may be more nuisance than useful.  provoked by a suggestion
644	and code from arnaud desitter, arnaud@nimbus.geog.ox.ac.uk
645
646	minor documentation changes to note that this now compiles out
647	of the box on Mac OS X.
648
649Feb 10, 2002:
650	changed types in posix chars structure to quiet solaris cc.
651
652Jan 1, 2002:
653	fflush() or fflush("") flushes all files and pipes.
654
655	length(arrayname) returns number of elements; thanks to
656	arnold robbins for suggestion.
657
658	added a makefile.win to make it easier to build on windows.
659	based on dan allen's buildwin.bat.
660
661Nov 16, 2001:
662	added support for posix character class names like [:digit:],
663	which are not exactly shorter than [0-9] and perhaps no more
664	portable.  thanks to dag-erling smorgrav for code.
665
666Feb 16, 2001:
667	removed -m option; no longer needed, and it was actually
668	broken (noted thanks to volker kiefel).
669
670Feb 10, 2001:
671	fixed an appalling bug in gettok: any sequence of digits, +,-, E, e,
672	and period was accepted as a valid number if it started with a period.
673	this would never have happened with the lex version.
674
675	other 1-character botches, now fixed, include a bare $ and a
676	bare " at the end of the input.
677
678Feb 7, 2001:
679	more (const char *) casts in b.c and tran.c to silence warnings.
680
681Nov 15, 2000:
682	fixed a bug introduced in august 1997 that caused expressions
683	like $f[1] to be syntax errors.  thanks to arnold robbins for
684	noticing this and providing a fix.
685
686Oct 30, 2000:
687	fixed some nextfile bugs: not handling all cases.  thanks to
688	arnold robbins for pointing this out.  new regressions added.
689
690	close() is now a function.  it returns whatever the library
691	fclose returns, and -1 for closing a file or pipe that wasn't
692	opened.
693
694Sep 24, 2000:
695	permit \n explicitly in character classes; won't work right
696	if comes in as "[\n]" but ok as /[\n]/, because of multiple
697	processing of \'s.  thanks to arnold robbins.
698
699July 5, 2000:
700	minor fiddles in tran.c to keep compilers happy about uschar.
701	thanks to norman wilson.
702
703May 25, 2000:
704	yet another attempt at making 8-bit input work, with another
705	band-aid in b.c (member()), and some (uschar) casts to head
706	off potential errors in subscripts (like isdigit).  also
707	changed HAT to NCHARS-2.  thanks again to santiago vila.
708
709	changed maketab.c to ignore apparently out of range definitions
710	instead of halting; new freeBSD generates one.  thanks to
711	jon snader <jsnader@ix.netcom.com> for pointing out the problem.
712
713May 2, 2000:
714	fixed an 8-bit problem in b.c by making several char*'s into
715	unsigned char*'s.  not clear i have them all yet.  thanks to
716	Santiago Vila <sanvila@unex.es> for the bug report.
717
718Apr 21, 2000:
719	finally found and fixed a memory leak in function call; it's
720	been there since functions were added ~1983.  thanks to
721	jon bentley for the test case that found it.
722
723	added test in envinit to catch environment "variables" with
724	names beginning with '='; thanks to Berend Hasselman.
725
726Jul 28, 1999:
727	added test in defn() to catch function foo(foo), which
728	otherwise recurses until core dump.  thanks to arnold
729	robbins for noticing this.
730
731Jun 20, 1999:
732	added *bp in gettok in lex.c; appears possible to exit function
733	without terminating the string.  thanks to russ cox.
734
735Jun 2, 1999:
736	added function stdinit() to run to initialize files[] array,
737	in case stdin, etc., are not constants; some compilers care.
738
739May 10, 1999:
740	replaced the ERROR ... FATAL, etc., macros with functions
741	based on vprintf, to avoid problems caused by overrunning
742	fixed-size errbuf array.  thanks to ralph corderoy for the
743	impetus, and for pointing out a string termination bug in
744	qstring as well.
745
746Apr 21, 1999:
747	fixed bug that caused occasional core dumps with commandline
748	variable with value ending in \.  (thanks to nelson beebe for
749	the test case.)
750
751Apr 16, 1999:
752	with code kindly provided by Bruce Lilly, awk now parses
753	/=/ and similar constructs more sensibly in more places.
754	Bruce also provided some helpful test cases.
755
756Apr 5, 1999:
757	changed true/false to True/False in run.c to make it
758	easier to compile with C++.  Added some casts on malloc
759	and realloc to be honest about casts; ditto.  changed
760	ltype int to long in struct rrow to reduce some 64-bit
761	complaints; other changes scattered throughout for the
762	same purpose.  thanks to Nelson Beebe for these portability
763	improvements.
764
765	removed some horrible pointer-int casting in b.c and elsewhere
766	by adding ptoi and itonp to localize the casts, which are
767	all benign.  fixed one incipient bug that showed up on sgi
768	in 64-bit mode.
769
770	reset lineno for new source file; include filename in error
771	message.  also fixed line number error in continuation lines.
772	(thanks to Nelson Beebe for both of these.)
773
774Mar 24, 1999:
775	Nelson Beebe notes that irix 5.3 yacc dies with a bogus
776	error; use a newer version or switch to bison, since sgi
777	is unlikely to fix it.
778
779Mar 5, 1999:
780	changed isnumber to is_number to avoid the problem caused by
781	versions of ctype.h that include the name isnumber.
782
783	distribution now includes a script for building on a Mac,
784	thanks to Dan Allen.
785
786Feb 20, 1999:
787	fixed memory leaks in run.c (call) and tran.c (setfval).
788	thanks to Stephen Nutt for finding these and providing the fixes.
789
790Jan 13, 1999:
791	replaced srand argument by (unsigned int) in run.c;
792	avoids problem on Mac and potentially on Unix & Windows.
793	thanks to Dan Allen.
794
795	added a few (int) casts to silence useless compiler warnings.
796	e.g., errorflag= in run.c jump().
797
798	added proctab.c to the bundle outout; one less thing
799	to have to compile out of the box.
800
801	added calls to _popen and _pclose to the win95 stub for
802	pipes (thanks to Steve Adams for this helpful suggestion).
803	seems to work, though properties are not well understood
804	by me, and it appears that under some circumstances the
805	pipe output is truncated.  Be careful.
806
807Oct 19, 1998:
808	fixed a couple of bugs in getrec: could fail to update $0
809	after a getline var; because inputFS wasn't initialized,
810	could split $0 on every character, a misleading diversion.
811
812	fixed caching bug in makedfa: LRU was actually removing
813	least often used.
814
815	thanks to ross ridge for finding these, and for providing
816	great bug reports.
817
818May 12, 1998:
819	fixed potential bug in readrec: might fail to update record
820	pointer after growing.  thanks to dan levy for spotting this
821	and suggesting the fix.
822
823Mar 12, 1998:
824	added -V to print version number and die.
825
826[notify dave kerns, dkerns@dacsoup.ih.lucent.com]
827
828Feb 11, 1998:
829	subtle silent bug in lex.c: if the program ended with a number
830	longer than 1 digit, part of the input would be pushed back and
831	parsed again because token buffer wasn't terminated right.
832	example:  awk 'length($0) > 10'.  blush.  at least i found it
833	myself.
834
835Aug 31, 1997:
836	s/adelete/awkdelete/: SGI uses this in malloc.h.
837	thanks to nelson beebe for pointing this one out.
838
839Aug 21, 1997:
840	fixed some bugs in sub and gsub when replacement includes \\.
841	this is a dark, horrible corner, but at least now i believe that
842	the behavior is the same as gawk and the intended posix standard.
843	thanks to arnold robbins for advice here.
844
845Aug 9, 1997:
846	somewhat regretfully, replaced the ancient lex-based lexical
847	analyzer with one written in C.  it's longer, generates less code,
848	and more portable; the old one depended too much on mysterious
849	properties of lex that were not preserved in other environments.
850	in theory these recognize the same language.
851
852	now using strtod to test whether a string is a number, instead of
853	the convoluted original function.  should be more portable and
854	reliable if strtod is implemented right.
855
856	removed now-pointless optimization in makefile that tries to avoid
857	recompilation when awkgram.y is changed but symbols are not.
858
859	removed most fixed-size arrays, though a handful remain, some
860	of which are unchecked.  you have been warned.
861
862Aug 4, 1997:
863	with some trepidation, replaced the ancient code that managed
864	fields and $0 in fixed-size arrays with arrays that grow on
865	demand.  there is still some tension between trying to make this
866	run fast and making it clean; not sure it's right yet.
867
868	the ill-conceived -mr and -mf arguments are now useful only
869	for debugging.  previous dynamic string code removed.
870
871	numerous other minor cleanups along the way.
872
873Jul 30, 1997:
874	using code provided by dan levy (to whom profuse thanks), replaced
875	fixed-size arrays and awkward kludges by a fairly uniform mechanism
876	to grow arrays as needed for printf, sub, gsub, etc.
877
878Jul 23, 1997:
879	falling off the end of a function returns "" and 0, not 0.
880	thanks to arnold robbins.
881
882Jun 17, 1997:
883	replaced several fixed-size arrays by dynamically-created ones
884	in run.c; added overflow tests to some previously unchecked cases.
885	getline, toupper, tolower.
886
887	getline code is still broken in that recursive calls may wind
888	up using the same space.  [fixed later]
889
890	increased RECSIZE to 8192 to push problems further over the horizon.
891
892	added \r to \n as input line separator for programs, not data.
893	damn CRLFs.
894
895	modified format() to permit explicit printf("%c", 0) to include
896	a null byte in output.  thanks to ken stailey for the fix.
897
898	added a "-safe" argument that disables file output (print >,
899	print >>), process creation (cmd|getline, print |, system), and
900	access to the environment (ENVIRON).  this is a first approximation
901	to a "safe" version of awk, but don't rely on it too much.  thanks
902	to joan feigenbaum and matt blaze for the inspiration long ago.
903
904Jul 8, 1996:
905	fixed long-standing bug in sub, gsub(/a/, "\\\\&"); thanks to
906	ralph corderoy.
907
908Jun 29, 1996:
909	fixed awful bug in new field splitting; didn't get all the places
910	where input was done.
911
912Jun 28, 1996:
913	changed field-splitting to conform to posix definition: fields are
914	split using the value of FS at the time of input; it used to be
915	the value when the field or NF was first referred to, a much less
916	predictable definition.  thanks to arnold robbins for encouragement
917	to do the right thing.
918
919May 28, 1996:
920	fixed appalling but apparently unimportant bug in parsing octal
921	numbers in reg exprs.
922
923	explicit hex in reg exprs now limited to 2 chars: \xa, \xaa.
924
925May 27, 1996:
926	cleaned up some declarations so gcc -Wall is now almost silent.
927
928	makefile now includes backup copies of ytab.c and lexyy.c in case
929	one makes before looking; it also avoids recreating lexyy.c unless
930	really needed.
931
932	s/aprintf/awkprint, s/asprintf/awksprintf/ to avoid some name clashes
933	with unwisely-written header files.
934
935	thanks to jeffrey friedl for several of these.
936
937May 26, 1996:
938	an attempt to rationalize the (unsigned) char issue.  almost all
939	instances of unsigned char have been removed; the handful of places
940	in b.c where chars are used as table indices have been hand-crafted.
941	added some latin-1 tests to the regression, but i'm not confident;
942	none of my compilers seem to care much.  thanks to nelson beebe for
943	pointing out some others that do care.
944
945May 2, 1996:
946	removed all register declarations.
947
948	enhanced split(), as in gawk, etc:  split(s, a, "") splits s into
949	a[1]...a[length(s)] with each character a single element.
950
951	made the same changes for field-splitting if FS is "".
952
953	added nextfile, as in gawk: causes immediate advance to next
954	input file. (thanks to arnold robbins for inspiration and code).
955
956	small fixes to regexpr code:  can now handle []], [[], and
957	variants;  [] is now a syntax error, rather than matching
958	everything;  [z-a] is now empty, not z.  far from complete
959	or correct, however.  (thanks to jeffrey friedl for pointing out
960	some awful behaviors.)
961
962Apr 29, 1996:
963	replaced uchar by uschar everywhere; apparently some compilers
964	usurp this name and this causes conflicts.
965
966	fixed call to time in run.c (bltin); arg is time_t *.
967
968	replaced horrible pointer/long punning in b.c by a legitimate
969	union.  should be safer on 64-bit machines and cleaner everywhere.
970	(thanks to nelson beebe for pointing out some of these problems.)
971
972	replaced nested comments by #if 0...#endif in run.c, lib.c.
973
974	removed getsval, setsval, execute macros from run.c and lib.c.
975	machines are 100x faster than they were when these macros were
976	first used.
977
978	revised filenames: awk.g.y => awkgram.y, awk.lx.l => awklex.l,
979	y.tab.[ch] => ytab.[ch], lex.yy.c => lexyy.c, all in the aid of
980	portability to nameless systems.
981
982	"make bundle" now includes yacc and lex output files for recipients
983	who don't have yacc or lex.
984
985Aug 15, 1995:
986	initialized Cells in setsymtab more carefully; some fields
987	were not set.  (thanks to purify, all of whose complaints i
988	think i now understand.)
989
990	fixed at least one error in gsub that looked at -1-th element
991	of an array when substituting for a null match (e.g., $).
992
993	delete arrayname is now legal; it clears the elements but leaves
994	the array, which may not be the right behavior.
995
996	modified makefile: my current make can't cope with the test used
997	to avoid unnecessary yacc invocations.
998
999Jul 17, 1995:
1000	added dynamically growing strings to awk.lx.l and b.c
1001	to permit regular expressions to be much bigger.
1002	the state arrays can still overflow.
1003
1004Aug 24, 1994:
1005	detect duplicate arguments in function definitions (mdm).
1006
1007May 11, 1994:
1008	trivial fix to printf to limit string size in sub().
1009
1010Apr 22, 1994:
1011	fixed yet another subtle self-assignment problem:
1012	$1 = $2; $1 = $1 clobbered $1.
1013
1014	Regression tests now use private echo, to avoid quoting problems.
1015
1016Feb 2, 1994:
1017	changed error() to print line number as %d, not %g.
1018
1019Jul 23, 1993:
1020	cosmetic changes: increased sizes of some arrays,
1021	reworded some error messages.
1022
1023	added CONVFMT as in posix (just replaced OFMT in getsval)
1024
1025	FILENAME is now "" until the first thing that causes a file
1026	to be opened.
1027
1028Nov 28, 1992:
1029	deleted yyunput and yyoutput from proto.h;
1030	different versions of lex give these different declarations.
1031
1032May 31, 1992:
1033	added -mr N and -mf N options: more record and fields.
1034	these really ought to adjust automatically.
1035
1036	cleaned up some error messages; "out of space" now means
1037	malloc returned NULL in all cases.
1038
1039	changed rehash so that if it runs out, it just returns;
1040	things will continue to run slow, but maybe a bit longer.
1041
1042Apr 24, 1992:
1043	remove redundant close of stdin when using -f -.
1044
1045	got rid of core dump with -d; awk -d just prints date.
1046
1047Apr 12, 1992:
1048	added explicit check for /dev/std(in,out,err) in redirection.
1049	unlike gawk, no /dev/fd/n yet.
1050
1051	added (file/pipe) builtin.  hard to test satisfactorily.
1052	not posix.
1053
1054Feb 20, 1992:
1055	recompile after abortive changes;  should be unchanged.
1056
1057Dec 2, 1991:
1058	die-casting time:  converted to ansi C, installed that.
1059
1060Nov 30, 1991:
1061	fixed storage leak in freefa, failing to recover [N]CCL.
1062	thanks to Bill Jones (jones@cs.usask.ca)
1063
1064Nov 19, 1991:
1065	use RAND_MAX instead of literal in builtin().
1066
1067Nov 12, 1991:
1068	cranked up some fixed-size arrays in b.c, and added a test for
1069	overflow in penter.  thanks to mark larsen.
1070
1071Sep 24, 1991:
1072	increased buffer in gsub.  a very crude fix to a general problem.
1073	and again on Sep 26.
1074
1075Aug 18, 1991:
1076	enforce variable name syntax for commandline variables: has to
1077	start with letter or _.
1078
1079Jul 27, 1991:
1080	allow newline after ; in for statements.
1081
1082Jul 21, 1991:
1083	fixed so that in self-assignment like $1=$1, side effects
1084	like recomputing $0 take place.  (this is getting subtle.)
1085
1086Jun 30, 1991:
1087	better test for detecting too-long output record.
1088
1089Jun 2, 1991:
1090	better defense against very long printf strings.
1091	made break and continue illegal outside of loops.
1092
1093May 13, 1991:
1094	removed extra arg on gettemp, tempfree.  minor error message rewording.
1095
1096May 6, 1991:
1097	fixed silly bug in hex parsing in hexstr().
1098	removed an apparently unnecessary test in isnumber().
1099	warn about weird printf conversions.
1100	fixed unchecked array overwrite in relex().
1101
1102	changed for (i in array) to access elements in sorted order.
1103	then unchanged it -- it really does run slower in too many cases.
1104	left the code in place, commented out.
1105
1106Feb 10, 1991:
1107	check error status on all writes, to avoid banging on full disks.
1108
1109Jan 28, 1991:
1110	awk -f - reads the program from stdin.
1111
1112Jan 11, 1991:
1113	failed to set numeric state on $0 in cmd|getline context in run.c.
1114
1115Nov 2, 1990:
1116	fixed sleazy test for integrality in getsval;  use modf.
1117
1118Oct 29, 1990:
1119	fixed sleazy buggy code in lib.c that looked (incorrectly) for
1120	too long input lines.
1121
1122Oct 14, 1990:
1123	fixed the bug on p. 198 in which it couldn't deduce that an
1124	argument was an array in some contexts.  replaced the error
1125	message in intest() by code that damn well makes it an array.
1126
1127Oct 8, 1990:
1128	fixed horrible bug:  types and values were not preserved in
1129	some kinds of self-assignment. (in assign().)
1130
1131Aug 24, 1990:
1132	changed NCHARS to 256 to handle 8-bit characters in strings
1133	presented to match(), etc.
1134
1135Jun 26, 1990:
1136	changed struct rrow (awk.h) to use long instead of int for lval,
1137	since cfoll() stores a pointer in it.  now works better when int's
1138	are smaller than pointers!
1139
1140May 6, 1990:
1141	AVA fixed the grammar so that ! is uniformly of the same precedence as
1142	unary + and -.  This renders illegal some constructs like !x=y, which
1143	now has to be parenthesized as !(x=y), and makes others work properly:
1144	!x+y is (!x)+y, and x!y is x !y, not two pattern-action statements.
1145	(These problems were pointed out by Bob Lenk of Posix.)
1146
1147	Added \x to regular expressions (already in strings).
1148	Limited octal to octal digits; \8 and \9 are not octal.
1149	Centralized the code for parsing escapes in regular expressions.
1150	Added a bunch of tests to T.re and T.sub to verify some of this.
1151
1152Feb 9, 1990:
1153	fixed null pointer dereference bug in main.c:  -F[nothing].  sigh.
1154
1155	restored srand behavior:  it returns the current seed.
1156
1157Jan 18, 1990:
1158	srand now returns previous seed value (0 to start).
1159
1160Jan 5, 1990:
1161	fix potential problem in tran.c -- something was freed,
1162	then used in freesymtab.
1163
1164Oct 18, 1989:
1165	another try to get the max number of open files set with
1166	relatively machine-independent code.
1167
1168	small fix to input() in case of multiple reads after EOF.
1169
1170Oct 11, 1989:
1171	FILENAME is now defined in the BEGIN block -- too many old
1172	programs broke.
1173
1174	"-" means stdin in getline as well as on the commandline.
1175
1176	added a bunch of casts to the code to tell the truth about
1177	char * vs. unsigned char *, a right royal pain.  added a
1178	setlocale call to the front of main, though probably no one
1179	has it usefully implemented yet.
1180
1181Aug 24, 1989:
1182	removed redundant relational tests against nullnode if parse
1183	tree already had a relational at that point.
1184
1185Aug 11, 1989:
1186	fixed bug:  commandline variable assignment has to look like
1187	var=something.  (consider the man page for =, in file =.1)
1188
1189	changed number of arguments to functions to static arrays
1190	to avoid repeated malloc calls.
1191
1192Aug 2, 1989:
1193	restored -F (space) separator
1194
1195Jul 30, 1989:
1196	added -v x=1 y=2 ... for immediate commandline variable assignment;
1197	done before the BEGIN block for sure.  they have to precede the
1198	program if the program is on the commandline.
1199	Modified Aug 2 to require a separate -v for each assignment.
1200
1201Jul 10, 1989:
1202	fixed ref-thru-zero bug in environment code in tran.c
1203
1204Jun 23, 1989:
1205	add newline to usage message.
1206
1207Jun 14, 1989:
1208	added some missing ansi printf conversion letters: %i %X %E %G.
1209	no sensible meaning for h or L, so they may not do what one expects.
1210
1211	made %* conversions work.
1212
1213	changed x^y so that if n is a positive integer, it's done
1214	by explicit multiplication, thus achieving maximum accuracy.
1215	(this should be done by pow() but it seems not to be locally.)
1216	done to x ^= y as well.
1217
1218Jun 4, 1989:
1219	ENVIRON array contains environment: if shell variable V=thing,
1220		ENVIRON["V"] is "thing"
1221
1222	multiple -f arguments permitted.  error reporting is naive.
1223	(they were permitted before, but only the last was used.)
1224
1225	fixed a really stupid botch in the debugging macro dprintf
1226
1227	fixed order of evaluation of commandline assignments to match
1228	what the book claims:  an argument of the form x=e is evaluated
1229	at the time it would have been opened if it were a filename (p 63).
1230	this invalidates the suggested answer to ex 4-1 (p 195).
1231
1232	removed some code that permitted -F (space) fieldseparator,
1233	since it didn't quite work right anyway.  (restored aug 2)
1234
1235Apr 27, 1989:
1236	Line number now accumulated correctly for comment lines.
1237
1238Apr 26, 1989:
1239	Debugging output now includes a version date,
1240	if one compiles it into the source each time.
1241
1242Apr 9, 1989:
1243	Changed grammar to prohibit constants as 3rd arg of sub and gsub;
1244	prevents class of overwriting-a-constant errors.  (Last one?)
1245	This invalidates the "banana" example on page 43 of the book.
1246
1247	Added \a ("alert"), \v (vertical tab), \xhhh (hexadecimal),
1248	as in ANSI, for strings.  Rescinded the sloppiness that permitted
1249	non-octal digits in \ooo.  Warning:  not all compilers and libraries
1250	will be able to deal with \x correctly.
1251
1252Jan 9, 1989:
1253	Fixed bug that caused tempcell list to contain a duplicate.
1254	The fix is kludgy.
1255
1256Dec 17, 1988:
1257	Catches some more commandline errors in main.
1258	Removed redundant decl of modf in run.c (confuses some compilers).
1259	Warning:  there's no single declaration of malloc, etc., in awk.h
1260	that seems to satisfy all compilers.
1261
1262Dec 7, 1988:
1263	Added a bit of code to error printing to avoid printing nulls.
1264	(Not clear that it actually would.)
1265
1266Nov 27, 1988:
1267	With fear and trembling, modified the grammar to permit
1268	multiple pattern-action statements on one line without
1269	an explicit separator.  By definition, this capitulation
1270	to the ghost of ancient implementations remains undefined
1271	and thus subject to change without notice or apology.
1272	DO NOT COUNT ON IT.
1273
1274Oct 30, 1988:
1275	Fixed bug in call() that failed to recover storage.
1276
1277	A warning is now generated if there are more arguments
1278	in the call than in the definition (in lieu of fixing
1279	another storage leak).
1280
1281Oct 20, 1988:
1282	Fixed %c:  if expr is numeric, use numeric value;
1283	otherwise print 1st char of string value.  still
1284	doesn't work if the value is 0 -- won't print \0.
1285
1286	Added a few more checks for running out of malloc.
1287
1288Oct 12, 1988:
1289	Fixed bug in call() that freed local arrays twice.
1290
1291	Fixed to handle deletion of non-existent array right;
1292	complains about attempt to delete non-array element.
1293
1294Sep 30, 1988:
1295	Now guarantees to evaluate all arguments of built-in
1296	functions, as in C;  the appearance is that arguments
1297	are evaluated before the function is called.  Places
1298	affected are sub (gsub was ok), substr, printf, and
1299	all the built-in arithmetic functions in bltin().
1300	A warning is generated if a bltin() is called with
1301	the wrong number of arguments.
1302
1303	This requires changing makeprof on p167 of the book.
1304
1305Aug 23, 1988:
1306	setting FILENAME in BEGIN caused core dump, apparently
1307	because it was freeing space not allocated by malloc.
1308
1309July 24, 1988:
1310	fixed egregious error in toupper/tolower functions.
1311	still subject to rescinding, however.
1312
1313July 2, 1988:
1314	flush stdout before opening file or pipe
1315
1316July 2, 1988:
1317	performance bug in b.c/cgoto(): not freeing some sets of states.
1318	partial fix only right now, and the number of states increased
1319	to make it less obvious.
1320
1321June 1, 1988:
1322	check error status on close
1323
1324May 28, 1988:
1325	srand returns seed value it's using.
1326	see 1/18/90
1327
1328May 22, 1988:
1329	Removed limit on depth of function calls.
1330
1331May 10, 1988:
1332	Fixed lib.c to permit _ in commandline variable names.
1333
1334Mar 25, 1988:
1335	main.c fixed to recognize -- as terminator of command-
1336	line options.  Illegal options flagged.
1337	Error reporting slightly cleaned up.
1338
1339Dec 2, 1987:
1340	Newer C compilers apply a strict scope rule to extern
1341	declarations within functions.  Two extern declarations in
1342	lib.c and tran.c have been moved to obviate this problem.
1343
1344Oct xx, 1987:
1345	Reluctantly added toupper and tolower functions.
1346	Subject to rescinding without notice.
1347
1348Sep 17, 1987:
1349	Error-message printer had printf(s) instead of
1350	printf("%s",s);  got core dumps when the message
1351	included a %.
1352
1353Sep 12, 1987:
1354	Very long printf strings caused core dump;
1355	fixed aprintf, asprintf, format to catch them.
1356	Can still get a core dump in printf itself.
1357
1358
1359