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