FIXES revision 107806
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
28Nov 29, 2002:
29	modified b.c (with tiny changes in main and run) to support
30	locales, using strcoll and iswhatever tests for posix character
31	classes.  thanks to ruslan ermilov (ru@freebsd.org) for code.
32	the function isblank doesn't seem to have propagated to any
33	header file near me, so it's there explicitly.  not properly
34	tested on non-ascii character sets by me.
35
36Jun 28, 2002:
37	modified run/format() and tran/getsval() to do a slightly better
38	job on using OFMT for output from print and CONVFMT for other
39	number->string conversions, as promised by posix and done by 
40	gawk and mawk.  there are still places where it doesn't work
41	right if CONVFMT is changed; by then the STR attribute of the
42	variable has been irrevocably set.  thanks to arnold robbins for
43	code and examples.
44
45	fixed subtle bug in format that could get core dump.  thanks to
46	Jaromir Dolecek <jdolecek@NetBSD.org> for finding and fixing.
47	minor cleanup in run.c / format() at the same time.
48
49	added some tests for null pointers to debugging printf's, which
50	were never intended for external consumption.  thanks to dave
51	kerns (dkerns@lucent.com) for pointing this out.
52
53	GNU compatibility: an empty regexp matches anything (thanks to
54	dag-erling smorgrav, des@ofug.org).  subject to reversion if
55	this does more harm than good.
56
57	pervasive small changes to make things more const-correct, as
58	reported by gcc's -Wwrite-strings.  as it says in the gcc manual,
59	this may be more nuisance than useful.  provoked by a suggestion
60	and code from arnaud desitter, arnaud@nimbus.geog.ox.ac.uk
61
62	minor documentation changes to note that this now compiles out
63	of the box on Mac OS X.
64
65Feb 10, 2002:
66	changed types in posix chars structure to quiet solaris cc.
67
68Jan 1, 2002:
69	fflush() or fflush("") flushes all files and pipes.
70
71	length(arrayname) returns number of elements; thanks to 
72	arnold robbins for suggestion.
73
74	added a makefile.win to make it easier to build on windows.
75	based on dan allen's buildwin.bat.
76
77Nov 16, 2001:
78	added support for posix character class names like [:digit:],
79	which are not exactly shorter than [0-9] and perhaps no more
80	portable.  thanks to dag-erling smorgrav for code.
81
82Feb 16, 2001:
83	removed -m option; no longer needed, and it was actually
84	broken (noted thanks to volker kiefel).
85
86Feb 10, 2001:
87	fixed an appalling bug in gettok: any sequence of digits, +,-, E, e,
88	and period was accepted as a valid number if it started with a period.
89	this would never have happened with the lex version.
90
91	other 1-character botches, now fixed, include a bare $ and a
92	bare " at the end of the input.
93
94Feb 7, 2001:
95	more (const char *) casts in b.c and tran.c to silence warnings.
96
97Nov 15, 2000:
98	fixed a bug introduced in august 1997 that caused expressions
99	like $f[1] to be syntax errors.  thanks to arnold robbins for
100	noticing this and providing a fix.
101
102Oct 30, 2000:
103	fixed some nextfile bugs: not handling all cases.  thanks to
104	arnold robbins for pointing this out.  new regressions added.
105
106	close() is now a function.  it returns whatever the library
107	fclose returns, and -1 for closing a file or pipe that wasn't
108	opened.
109
110Sep 24, 2000:
111	permit \n explicitly in character classes; won't work right
112	if comes in as "[\n]" but ok as /[\n]/, because of multiple
113	processing of \'s.  thanks to arnold robbins.
114
115July 5, 2000:
116	minor fiddles in tran.c to keep compilers happy about uschar.
117	thanks to norman wilson.
118
119May 25, 2000:
120	yet another attempt at making 8-bit input work, with another
121	band-aid in b.c (member()), and some (uschar) casts to head 
122	off potential errors in subscripts (like isdigit).  also
123	changed HAT to NCHARS-2.  thanks again to santiago vila.
124
125	changed maketab.c to ignore apparently out of range definitions
126	instead of halting; new freeBSD generates one.  thanks to
127	jon snader <jsnader@ix.netcom.com> for pointing out the problem.
128
129May 2, 2000:
130	fixed an 8-bit problem in b.c by making several char*'s into
131	unsigned char*'s.  not clear i have them all yet.  thanks to
132	Santiago Vila <sanvila@unex.es> for the bug report.
133
134Apr 21, 2000:
135	finally found and fixed a memory leak in function call; it's
136	been there since functions were added ~1983.  thanks to
137	jon bentley for the test case that found it.
138
139	added test in envinit to catch environment "variables" with
140	names begining with '='; thanks to Berend Hasselman.
141
142Jul 28, 1999:
143	added test in defn() to catch function foo(foo), which
144	otherwise recurses until core dump.  thanks to arnold
145	robbins for noticing this.
146
147Jun 20, 1999:
148	added *bp in gettok in lex.c; appears possible to exit function
149	without terminating the string.  thanks to russ cox.
150
151Jun 2, 1999:
152	added function stdinit() to run to initialize files[] array,
153	in case stdin, etc., are not constants; some compilers care.
154
155May 10, 1999:
156	replaced the ERROR ... FATAL, etc., macros with functions
157	based on vprintf, to avoid problems caused by overrunning
158	fixed-size errbuf array.  thanks to ralph corderoy for the
159	impetus, and for pointing out a string termination bug in
160	qstring as well.
161
162Apr 21, 1999:
163	fixed bug that caused occasional core dumps with commandline
164	variable with value ending in \.  (thanks to nelson beebe for
165	the test case.)
166
167Apr 16, 1999:
168	with code kindly provided by Bruce Lilly, awk now parses 
169	/=/ and similar constructs more sensibly in more places.
170	Bruce also provided some helpful test cases.
171
172Apr 5, 1999:
173	changed true/false to True/False in run.c to make it
174	easier to compile with C++.  Added some casts on malloc
175	and realloc to be honest about casts; ditto.  changed
176	ltype int to long in struct rrow to reduce some 64-bit
177	complaints; other changes scattered throughout for the
178	same purpose.  thanks to Nelson Beebe for these portability
179	improvements.
180
181	removed some horrible pointer-int casting in b.c and elsewhere
182	by adding ptoi and itonp to localize the casts, which are
183	all benign.  fixed one incipient bug that showed up on sgi
184	in 64-bit mode.
185
186	reset lineno for new source file; include filename in error
187	message.  also fixed line number error in continuation lines.
188	(thanks to Nelson Beebe for both of these.)
189
190Mar 24, 1999:
191	Nelson Beebe notes that irix 5.3 yacc dies with a bogus
192	error; use a newer version or switch to bison, since sgi
193	is unlikely to fix it.
194
195Mar 5, 1999:
196	changed isnumber to is_number to avoid the problem caused by
197	versions of ctype.h that include the name isnumber.
198
199	distribution now includes a script for building on a Mac,
200	thanks to Dan Allen.
201
202Feb 20, 1999:
203	fixed memory leaks in run.c (call) and tran.c (setfval).
204	thanks to Stephen Nutt for finding these and providing the fixes.
205
206Jan 13, 1999:
207	replaced srand argument by (unsigned int) in run.c;
208	avoids problem on Mac and potentially on Unix & Windows.
209	thanks to Dan Allen.
210
211	added a few (int) casts to silence useless compiler warnings.
212	e.g., errorflag= in run.c jump().
213
214	added proctab.c to the bundle outout; one less thing
215	to have to compile out of the box.
216
217	added calls to _popen and _pclose to the win95 stub for
218	pipes (thanks to Steve Adams for this helpful suggestion).
219	seems to work, though properties are not well understood
220	by me, and it appears that under some circumstances the
221	pipe output is truncated.  Be careful.
222
223Oct 19, 1998:
224	fixed a couple of bugs in getrec: could fail to update $0
225	after a getline var; because inputFS wasn't initialized, 
226	could split $0 on every character, a misleading diversion.
227
228	fixed caching bug in makedfa: LRU was actually removing
229	least often used.
230
231	thanks to ross ridge for finding these, and for providing
232	great bug reports.
233
234May 12, 1998:
235	fixed potential bug in readrec: might fail to update record
236	pointer after growing.  thanks to dan levy for spotting this
237	and suggesting the fix.
238
239Mar 12, 1998:
240	added -V to print version number and die.
241
242Feb 11, 1998:
243	subtle silent bug in lex.c: if the program ended with a number
244	longer than 1 digit, part of the input would be pushed back and
245	parsed again because token buffer wasn't terminated right.
246	example:  awk 'length($0) > 10'.  blush.  at least i found it
247	myself.
248
249Aug 31, 1997:
250	s/adelete/awkdelete/: SGI uses this in malloc.h.
251	thanks to nelson beebe for pointing this one out.
252
253Aug 21, 1997:
254	fixed some bugs in sub and gsub when replacement includes \\.
255	this is a dark, horrible corner, but at least now i believe that
256	the behavior is the same as gawk and the intended posix standard.
257	thanks to arnold robbins for advice here.
258
259Aug 9, 1997:
260	somewhat regretfully, replaced the ancient lex-based lexical
261	analyzer with one written in C.  it's longer, generates less code,
262	and more portable; the old one depended too much on mysterious
263	properties of lex that were not preserved in other environments.
264	in theory these recognize the same language.
265
266	now using strtod to test whether a string is a number, instead of
267	the convoluted original function.  should be more portable and
268	reliable if strtod is implemented right.
269
270	removed now-pointless optimization in makefile that tries to avoid
271	recompilation when awkgram.y is changed but symbols are not.
272
273	removed most fixed-size arrays, though a handful remain, some
274	of which are unchecked.  you have been warned.
275
276Aug 4, 1997:
277	with some trepidation, replaced the ancient code that managed
278	fields and $0 in fixed-size arrays with arrays that grow on
279	demand.  there is still some tension between trying to make this
280	run fast and making it clean; not sure it's right yet.
281
282	the ill-conceived -mr and -mf arguments are now useful only
283	for debugging.  previous dynamic string code removed.
284
285	numerous other minor cleanups along the way.
286
287Jul 30, 1997:
288	using code provided by dan levy (to whom profuse thanks), replaced
289	fixed-size arrays and awkward kludges by a fairly uniform mechanism
290	to grow arrays as needed for printf, sub, gsub, etc.
291
292Jul 23, 1997:
293	falling off the end of a function returns "" and 0, not 0.
294	thanks to arnold robbins.
295
296Jun 17, 1997:
297	replaced several fixed-size arrays by dynamically-created ones
298	in run.c; added overflow tests to some previously unchecked cases.
299	getline, toupper, tolower.
300
301	getline code is still broken in that recursive calls may wind
302	up using the same space.  [fixed later]
303
304	increased RECSIZE to 8192 to push problems further over the horizon.
305
306	added \r to \n as input line separator for programs, not data.
307	damn CRLFs.
308
309	modified format() to permit explicit printf("%c", 0) to include
310	a null byte in output.  thanks to ken stailey for the fix.
311
312	added a "-safe" argument that disables file output (print >,
313	print >>), process creation (cmd|getline, print |, system), and
314	access to the environment (ENVIRON).  this is a first approximation
315	to a "safe" version of awk, but don't rely on it too much.  thanks
316	to joan feigenbaum and matt blaze for the inspiration long ago.
317
318Jul 8, 1996:
319	fixed long-standing bug in sub, gsub(/a/, "\\\\&"); thanks to
320	ralph corderoy.
321
322Jun 29, 1996:
323	fixed awful bug in new field splitting; didn't get all the places
324	where input was done.
325
326Jun 28, 1996:
327	changed field-splitting to conform to posix definition: fields are
328	split using the value of FS at the time of input; it used to be
329	the value when the field or NF was first referred to, a much less
330	predictable definition.  thanks to arnold robbins for encouragement
331	to do the right thing.
332
333May 28, 1996:
334	fixed appalling but apparently unimportant bug in parsing octal
335	numbers in reg exprs.
336
337	explicit hex in reg exprs now limited to 2 chars: \xa, \xaa.
338
339May 27, 1996:
340	cleaned up some declarations so gcc -Wall is now almost silent.
341
342	makefile now includes backup copies of ytab.c and lexyy.c in case
343	one makes before looking; it also avoids recreating lexyy.c unless
344	really needed.
345
346	s/aprintf/awkprint, s/asprintf/awksprintf/ to avoid some name clashes
347	with unwisely-written header files.
348
349	thanks to jeffrey friedl for several of these.
350
351May 26, 1996:
352	an attempt to rationalize the (unsigned) char issue.  almost all
353	instances of unsigned char have been removed; the handful of places
354	in b.c where chars are used as table indices have been hand-crafted.
355	added some latin-1 tests to the regression, but i'm not confident;
356	none of my compilers seem to care much.  thanks to nelson beebe for
357	pointing out some others that do care.
358
359May 2, 1996:
360	removed all register declarations.
361
362	enhanced split(), as in gawk, etc:  split(s, a, "") splits s into
363	a[1]...a[length(s)] with each character a single element.
364
365	made the same changes for field-splitting if FS is "".
366
367	added nextfile, as in gawk: causes immediate advance to next
368	input file. (thanks to arnold robbins for inspiration and code).
369
370	small fixes to regexpr code:  can now handle []], [[], and
371	variants;  [] is now a syntax error, rather than matching 
372	everything;  [z-a] is now empty, not z.  far from complete
373	or correct, however.  (thanks to jeffrey friedl for pointing out
374	some awful behaviors.)
375
376Apr 29, 1996:
377	replaced uchar by uschar everwhere; apparently some compilers
378	usurp this name and this causes conflicts.
379
380	fixed call to time in run.c (bltin); arg is time_t *.
381
382	replaced horrible pointer/long punning in b.c by a legitimate
383	union.  should be safer on 64-bit machines and cleaner everywhere.
384	(thanks to nelson beebe for pointing out some of these problems.)
385
386	replaced nested comments by #if 0...#endif in run.c, lib.c.
387
388	removed getsval, setsval, execute macros from run.c and lib.c.
389	machines are 100x faster than they were when these macros were
390	first used.
391
392	revised filenames: awk.g.y => awkgram.y, awk.lx.l => awklex.l,
393	y.tab.[ch] => ytab.[ch], lex.yy.c => lexyy.c, all in the aid of
394	portability to nameless systems.
395
396	"make bundle" now includes yacc and lex output files for recipients
397	who don't have yacc or lex.
398
399Aug 15, 1995:
400	initialized Cells in setsymtab more carefully; some fields
401	were not set.  (thanks to purify, all of whose complaints i
402	think i now understand.)
403
404	fixed at least one error in gsub that looked at -1-th element
405	of an array when substituting for a null match (e.g., $).
406
407	delete arrayname is now legal; it clears the elements but leaves
408	the array, which may not be the right behavior.
409
410	modified makefile: my current make can't cope with the test used
411	to avoid unnecessary yacc invocations.
412
413Jul 17, 1995:
414	added dynamically growing strings to awk.lx.l and b.c
415	to permit regular expressions to be much bigger.
416	the state arrays can still overflow.
417
418Aug 24, 1994:
419	detect duplicate arguments in function definitions (mdm).
420
421May 11, 1994:
422	trivial fix to printf to limit string size in sub().
423
424Apr 22, 1994:
425	fixed yet another subtle self-assignment problem:
426	$1 = $2; $1 = $1 clobbered $1.
427
428	Regression tests now use private echo, to avoid quoting problems.
429
430Feb 2, 1994:
431	changed error() to print line number as %d, not %g.
432
433Jul 23, 1993:
434	cosmetic changes: increased sizes of some arrays,
435	reworded some error messages.
436
437	added CONVFMT as in posix (just replaced OFMT in getsval)
438
439	FILENAME is now "" until the first thing that causes a file
440	to be opened.
441
442Nov 28, 1992:
443	deleted yyunput and yyoutput from proto.h;
444	different versions of lex give these different declarations.
445
446May 31, 1992:
447	added -mr N and -mf N options: more record and fields.
448	these really ought to adjust automatically.
449
450	cleaned up some error messages; "out of space" now means
451	malloc returned NULL in all cases.
452
453	changed rehash so that if it runs out, it just returns;
454	things will continue to run slow, but maybe a bit longer.
455
456Apr 24, 1992:
457	remove redundant close of stdin when using -f -.
458
459	got rid of core dump with -d; awk -d just prints date.
460
461Apr 12, 1992:
462	added explicit check for /dev/std(in,out,err) in redirection.
463	unlike gawk, no /dev/fd/n yet.
464
465	added (file/pipe) builtin.  hard to test satisfactorily.
466	not posix.
467
468Feb 20, 1992:
469	recompile after abortive changes;  should be unchanged.
470
471Dec 2, 1991:
472	die-casting time:  converted to ansi C, installed that.
473
474Nov 30, 1991:
475	fixed storage leak in freefa, failing to recover [N]CCL.
476	thanks to Bill Jones (jones@cs.usask.ca)
477
478Nov 19, 1991:
479	use RAND_MAX instead of literal in builtin().
480
481Nov 12, 1991:
482	cranked up some fixed-size arrays in b.c, and added a test for
483	overflow in penter.  thanks to mark larsen.
484
485Sep 24, 1991:
486	increased buffer in gsub.  a very crude fix to a general problem.
487	and again on Sep 26.
488
489Aug 18, 1991:
490	enforce variable name syntax for commandline variables: has to
491	start with letter or _.
492
493Jul 27, 1991:
494	allow newline after ; in for statements.
495
496Jul 21, 1991:
497	fixed so that in self-assignment like $1=$1, side effects
498	like recomputing $0 take place.  (this is getting subtle.)
499
500Jun 30, 1991:
501	better test for detecting too-long output record.
502
503Jun 2, 1991:
504	better defense against very long printf strings.
505	made break and continue illegal outside of loops.
506
507May 13, 1991:
508	removed extra arg on gettemp, tempfree.  minor error message rewording.
509
510May 6, 1991:
511	fixed silly bug in hex parsing in hexstr().
512	removed an apparently unnecessary test in isnumber().
513	warn about weird printf conversions.
514	fixed unchecked array overwrite in relex().
515
516	changed for (i in array) to access elements in sorted order.
517	then unchanged it -- it really does run slower in too many cases.
518	left the code in place, commented out.
519
520Feb 10, 1991:
521	check error status on all writes, to avoid banging on full disks.
522
523Jan 28, 1991:
524	awk -f - reads the program from stdin.
525
526Jan 11, 1991:
527	failed to set numeric state on $0 in cmd|getline context in run.c.
528
529Nov 2, 1990:
530	fixed sleazy test for integrality in getsval;  use modf.
531
532Oct 29, 1990:
533	fixed sleazy buggy code in lib.c that looked (incorrectly) for
534	too long input lines.
535
536Oct 14, 1990:
537	fixed the bug on p. 198 in which it couldn't deduce that an
538	argument was an array in some contexts.  replaced the error
539	message in intest() by code that damn well makes it an array.
540
541Oct 8, 1990:
542	fixed horrible bug:  types and values were not preserved in
543	some kinds of self-assignment. (in assign().)
544
545Aug 24, 1990:
546	changed NCHARS to 256 to handle 8-bit characters in strings
547	presented to match(), etc.
548
549Jun 26, 1990:
550	changed struct rrow (awk.h) to use long instead of int for lval,
551	since cfoll() stores a pointer in it.  now works better when int's
552	are smaller than pointers!
553
554May 6, 1990:
555	AVA fixed the grammar so that ! is uniformly of the same precedence as
556	unary + and -.  This renders illegal some constructs like !x=y, which
557	now has to be parenthesized as !(x=y), and makes others work properly:
558	!x+y is (!x)+y, and x!y is x !y, not two pattern-action statements.
559	(These problems were pointed out by Bob Lenk of Posix.)
560
561	Added \x to regular expressions (already in strings).
562	Limited octal to octal digits; \8 and \9 are not octal.
563	Centralized the code for parsing escapes in regular expressions.
564	Added a bunch of tests to T.re and T.sub to verify some of this.
565
566Feb 9, 1990:
567	fixed null pointer dereference bug in main.c:  -F[nothing].  sigh.
568
569	restored srand behavior:  it returns the current seed.
570
571Jan 18, 1990:
572	srand now returns previous seed value (0 to start).
573
574Jan 5, 1990:
575	fix potential problem in tran.c -- something was freed,
576	then used in freesymtab.
577
578Oct 18, 1989:
579	another try to get the max number of open files set with
580	relatively machine-independent code.
581
582	small fix to input() in case of multiple reads after EOF.
583
584Oct 11, 1989:
585	FILENAME is now defined in the BEGIN block -- too many old
586	programs broke.
587
588	"-" means stdin in getline as well as on the commandline.
589
590	added a bunch of casts to the code to tell the truth about
591	char * vs. unsigned char *, a right royal pain.  added a
592	setlocale call to the front of main, though probably no one
593	has it usefully implemented yet.
594
595Aug 24, 1989:
596	removed redundant relational tests against nullnode if parse
597	tree already had a relational at that point.
598
599Aug 11, 1989:
600	fixed bug:  commandline variable assignment has to look like
601	var=something.  (consider the man page for =, in file =.1)
602
603	changed number of arguments to functions to static arrays
604	to avoid repeated malloc calls.
605
606Aug 2, 1989:
607	restored -F (space) separator
608
609Jul 30, 1989:
610	added -v x=1 y=2 ... for immediate commandline variable assignment;
611	done before the BEGIN block for sure.  they have to precede the
612	program if the program is on the commandline.
613	Modified Aug 2 to require a separate -v for each assignment.
614
615Jul 10, 1989:
616	fixed ref-thru-zero bug in environment code in tran.c
617
618Jun 23, 1989:
619	add newline to usage message.
620
621Jun 14, 1989:
622	added some missing ansi printf conversion letters: %i %X %E %G.
623	no sensible meaning for h or L, so they may not do what one expects.
624
625	made %* conversions work.
626
627	changed x^y so that if n is a positive integer, it's done
628	by explicit multiplication, thus achieving maximum accuracy.
629	(this should be done by pow() but it seems not to be locally.)
630	done to x ^= y as well.
631
632Jun 4, 1989:
633	ENVIRON array contains environment: if shell variable V=thing,
634		ENVIRON["V"] is "thing"
635
636	multiple -f arguments permitted.  error reporting is naive.
637	(they were permitted before, but only the last was used.)
638
639	fixed a really stupid botch in the debugging macro dprintf
640
641	fixed order of evaluation of commandline assignments to match
642	what the book claims:  an argument of the form x=e is evaluated
643	at the time it would have been opened if it were a filename (p 63).
644	this invalidates the suggested answer to ex 4-1 (p 195).
645
646	removed some code that permitted -F (space) fieldseparator,
647	since it didn't quite work right anyway.  (restored aug 2)
648
649Apr 27, 1989:
650	Line number now accumulated correctly for comment lines.
651
652Apr 26, 1989:
653	Debugging output now includes a version date,
654	if one compiles it into the source each time.
655
656Apr 9, 1989:
657	Changed grammar to prohibit constants as 3rd arg of sub and gsub;
658	prevents class of overwriting-a-constant errors.  (Last one?)
659	This invalidates the "banana" example on page 43 of the book.
660
661	Added \a ("alert"), \v (vertical tab), \xhhh (hexadecimal),
662	as in ANSI, for strings.  Rescinded the sloppiness that permitted
663	non-octal digits in \ooo.  Warning:  not all compilers and libraries
664	will be able to deal with \x correctly.
665
666Jan 9, 1989:
667	Fixed bug that caused tempcell list to contain a duplicate.
668	The fix is kludgy.
669
670Dec 17, 1988:
671	Catches some more commandline errors in main.
672	Removed redundant decl of modf in run.c (confuses some compilers).
673	Warning:  there's no single declaration of malloc, etc., in awk.h
674	that seems to satisfy all compilers.
675
676Dec 7, 1988:
677	Added a bit of code to error printing to avoid printing nulls.
678	(Not clear that it actually would.)
679
680Nov 27, 1988:
681	With fear and trembling, modified the grammar to permit
682	multiple pattern-action statements on one line without
683	an explicit separator.  By definition, this capitulation
684	to the ghost of ancient implementations remains undefined
685	and thus subject to change without notice or apology.
686	DO NOT COUNT ON IT.
687
688Oct 30, 1988:
689	Fixed bug in call() that failed to recover storage.
690
691	A warning is now generated if there are more arguments
692	in the call than in the definition (in lieu of fixing
693	another storage leak).
694
695Oct 20, 1988:
696	Fixed %c:  if expr is numeric, use numeric value;
697	otherwise print 1st char of string value.  still
698	doesn't work if the value is 0 -- won't print \0.
699
700	Added a few more checks for running out of malloc.
701
702Oct 12, 1988:
703	Fixed bug in call() that freed local arrays twice.
704
705	Fixed to handle deletion of non-existent array right;
706	complains about attempt to delete non-array element.
707
708Sep 30, 1988:
709	Now guarantees to evaluate all arguments of built-in
710	functions, as in C;  the appearance is that arguments
711	are evaluated before the function is called.  Places
712	affected are sub (gsub was ok), substr, printf, and
713	all the built-in arithmetic functions in bltin().
714	A warning is generated if a bltin() is called with
715	the wrong number of arguments.
716
717	This requires changing makeprof on p167 of the book.
718
719Aug 23, 1988:
720	setting FILENAME in BEGIN caused core dump, apparently
721	because it was freeing space not allocated by malloc.
722
723July 24, 1988:
724	fixed egregious error in toupper/tolower functions.
725	still subject to rescinding, however.
726
727July 2, 1988:
728	flush stdout before opening file or pipe
729
730July 2, 1988:
731	performance bug in b.c/cgoto(): not freeing some sets of states.
732	partial fix only right now, and the number of states increased
733	to make it less obvious.
734
735June 1, 1988:
736	check error status on close
737
738May 28, 1988:
739	srand returns seed value it's using.
740	see 1/18/90
741
742May 22, 1988:
743	Removed limit on depth of function calls.
744
745May 10, 1988:
746	Fixed lib.c to permit _ in commandline variable names.
747
748Mar 25, 1988:
749	main.c fixed to recognize -- as terminator of command-
750	line options.  Illegal options flagged.
751	Error reporting slightly cleaned up.
752
753Dec 2, 1987:
754	Newer C compilers apply a strict scope rule to extern
755	declarations within functions.  Two extern declarations in
756	lib.c and tran.c have been moved to obviate this problem.
757
758Oct xx, 1987:
759	Reluctantly added toupper and tolower functions.
760	Subject to rescinding without notice.
761
762Sep 17, 1987:
763	Error-message printer had printf(s) instead of
764	printf("%s",s);  got core dumps when the message
765	included a %.
766
767Sep 12, 1987:
768	Very long printf strings caused core dump;
769	fixed aprintf, asprintf, format to catch them.
770	Can still get a core dump in printf itself.
771
772
773