xref: /freebsd/contrib/one-true-awk/FIXES (revision 0840e960f9a75866ceb589d63cc43b7521f301f5)
12a55deb1SDavid E. O'Brien/****************************************************************
22a55deb1SDavid E. O'BrienCopyright (C) Lucent Technologies 1997
32a55deb1SDavid E. O'BrienAll Rights Reserved
42a55deb1SDavid E. O'Brien
52a55deb1SDavid E. O'BrienPermission to use, copy, modify, and distribute this software and
62a55deb1SDavid E. O'Brienits documentation for any purpose and without fee is hereby
72a55deb1SDavid E. O'Briengranted, provided that the above copyright notice appear in all
82a55deb1SDavid E. O'Briencopies and that both that the copyright notice and this
92a55deb1SDavid E. O'Brienpermission notice and warranty disclaimer appear in supporting
102a55deb1SDavid E. O'Briendocumentation, and that the name Lucent Technologies or any of
112a55deb1SDavid E. O'Brienits entities not be used in advertising or publicity pertaining
122a55deb1SDavid E. O'Briento distribution of the software without specific, written prior
132a55deb1SDavid E. O'Brienpermission.
142a55deb1SDavid E. O'Brien
152a55deb1SDavid E. O'BrienLUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
162a55deb1SDavid E. O'BrienINCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
172a55deb1SDavid E. O'BrienIN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
182a55deb1SDavid E. O'BrienSPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
192a55deb1SDavid E. O'BrienWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
202a55deb1SDavid E. O'BrienIN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
212a55deb1SDavid E. O'BrienARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
222a55deb1SDavid E. O'BrienTHIS SOFTWARE.
232a55deb1SDavid E. O'Brien****************************************************************/
242a55deb1SDavid E. O'Brien
252a55deb1SDavid E. O'BrienThis file lists all bug fixes, changes, etc., made since the AWK book
262a55deb1SDavid E. O'Brienwas sent to the printers in August, 1987.
272a55deb1SDavid E. O'Brien
28*0840e960SXin LIDec 20, 2012:
29*0840e960SXin LI	fiddled makefile to get correct yacc and bison flags.  pick yacc
30*0840e960SXin LI	(linux) or bison (mac) as necessary.
31*0840e960SXin LI
32*0840e960SXin LI	added  __attribute__((__noreturn__)) to a couple of lines in
33*0840e960SXin LI	proto.h, to silence someone's enthusiastic checker.
34*0840e960SXin LI
35*0840e960SXin LI	fixed obscure call by value bug in split(a[1],a) reported on
36*0840e960SXin LI	9fans.  the management of temporary values is just a mess; i
37*0840e960SXin LI	took a shortcut by making an extra string copy.  thanks
38*0840e960SXin LI	to paul patience and arnold robbins for passing it on and for
39*0840e960SXin LI	proposed patches.
40*0840e960SXin LI
41*0840e960SXin LI	tiny fiddle in setfval to eliminate -0 results in T.expr, which
42*0840e960SXin LI	has irritated me for 20+ years.
43*0840e960SXin LI
44aa0da2e4SRuslan ErmilovAug 10, 2011:
45aa0da2e4SRuslan Ermilov	another fix to avoid core dump with delete(ARGV); again, many thanks
46aa0da2e4SRuslan Ermilov	to ruslan ermilov.
47aa0da2e4SRuslan Ermilov
48d86a0988SRuslan ErmilovAug 7, 2011:
49d86a0988SRuslan Ermilov	split(s, a, //) now behaves the same as split(s, a, "")
50d86a0988SRuslan Ermilov
51d86a0988SRuslan ErmilovJun 12, 2011:
52d86a0988SRuslan Ermilov	/pat/, \n /pat/ {...} is now legal, though bad style to use.
53d86a0988SRuslan Ermilov
54d86a0988SRuslan Ermilov	added checks to new -v code that permits -vnospace; thanks to
55d86a0988SRuslan Ermilov	ruslan ermilov for spotting this and providing the patch.
56d86a0988SRuslan Ermilov
57d86a0988SRuslan Ermilov	removed fixed limit on number of open files; thanks to aleksey
58d86a0988SRuslan Ermilov	cheusov and christos zoulos.
59d86a0988SRuslan Ermilov
60d86a0988SRuslan Ermilov	fixed day 1 bug that resurrected deleted elements of ARGV when
61d86a0988SRuslan Ermilov	used as filenames (in lib.c).
62d86a0988SRuslan Ermilov
63d86a0988SRuslan Ermilov	minor type fiddles to make gcc -Wall -pedantic happier (but not
64d86a0988SRuslan Ermilov	totally so); turned on -fno-strict-aliasing in makefile.
65d86a0988SRuslan Ermilov
66b40501fbSRuslan ErmilovMay 6, 2011:
67b40501fbSRuslan Ermilov	added #ifdef for isblank.
68b40501fbSRuslan Ermilov	now allows -ffoo as well as -f foo arguments.
69b40501fbSRuslan Ermilov	(thanks, ruslan)
70b40501fbSRuslan Ermilov
711b11b783SRuslan ErmilovMay 1, 2011:
721b11b783SRuslan Ermilov	after advice from todd miller, kevin lo, ruslan ermilov,
731b11b783SRuslan Ermilov	and arnold robbins, changed srand() to return the previous
741b11b783SRuslan Ermilov	seed (which is 1 on the first call of srand).  the seed is
751b11b783SRuslan Ermilov	an Awkfloat internally though converted to unsigned int to
761b11b783SRuslan Ermilov	pass to the library srand().  thanks, everyone.
771b11b783SRuslan Ermilov
781b11b783SRuslan Ermilov	fixed a subtle (and i hope low-probability) overflow error
791b11b783SRuslan Ermilov	in fldbld, by adding space for one extra \0.  thanks to
801b11b783SRuslan Ermilov	robert bassett for spotting this one and providing a fix.
811b11b783SRuslan Ermilov
821b11b783SRuslan Ermilov	removed the files related to compilation on windows.  i no
831b11b783SRuslan Ermilov	longer have anything like a current windows environment, so
841b11b783SRuslan Ermilov	i can't test any of it.
851b11b783SRuslan Ermilov
861b11b783SRuslan ErmilovMay 23, 2010:
871b11b783SRuslan Ermilov	fixed long-standing overflow bug in run.c; many thanks to
881b11b783SRuslan Ermilov	nelson beebe for spotting it and providing the fix.
891b11b783SRuslan Ermilov
901b11b783SRuslan Ermilov	fixed bug that didn't parse -vd=1 properly; thanks to santiago
911b11b783SRuslan Ermilov	vila for spotting it.
921b11b783SRuslan Ermilov
931b11b783SRuslan ErmilovFeb 8, 2010:
941b11b783SRuslan Ermilov	i give up.  replaced isblank with isspace in b.c; there are
951b11b783SRuslan Ermilov	no consistent header files.
961b11b783SRuslan Ermilov
9791217c1cSRuslan ErmilovNov 26, 2009:
9891217c1cSRuslan Ermilov	fixed a long-standing issue with when FS takes effect.  a
9991217c1cSRuslan Ermilov	change to FS is now noticed immediately for subsequent splits.
10091217c1cSRuslan Ermilov
10191217c1cSRuslan Ermilov	changed the name getline() to awkgetline() to avoid yet another
10291217c1cSRuslan Ermilov	name conflict somewhere.
10391217c1cSRuslan Ermilov
10491217c1cSRuslan ErmilovFeb 11, 2009:
10591217c1cSRuslan Ermilov	temporarily for now defined HAS_ISBLANK, since that seems to
10691217c1cSRuslan Ermilov	be the best way through the thicket.  isblank arrived in C99,
10791217c1cSRuslan Ermilov	but seems to be arriving at different systems at different
10891217c1cSRuslan Ermilov	times.
10991217c1cSRuslan Ermilov
11091217c1cSRuslan ErmilovOct 8, 2008:
11191217c1cSRuslan Ermilov	fixed typo in b.c that set tmpvec wrongly.  no one had ever
11291217c1cSRuslan Ermilov	run into the problem, apparently.  thanks to alistair crooks.
11391217c1cSRuslan Ermilov
114d2f6e492SDavid E. O'BrienOct 23, 2007:
115d2f6e492SDavid E. O'Brien	minor fix in lib.c: increase inputFS to 100, change malloc
116d2f6e492SDavid E. O'Brien	for fields to n+1.
117d2f6e492SDavid E. O'Brien
118d2f6e492SDavid E. O'Brien	fixed memory fault caused by out of order test in setsval.
119d2f6e492SDavid E. O'Brien
120d2f6e492SDavid E. O'Brien	thanks to david o'brien, freebsd, for both fixes.
121d2f6e492SDavid E. O'Brien
122addad6afSRong-En FanMay 1, 2007:
123addad6afSRong-En Fan	fiddle in makefile to fix for BSD make; thanks to igor sobrado.
124addad6afSRong-En Fan
125addad6afSRong-En FanMar 31, 2007:
126addad6afSRong-En Fan	fixed some null pointer refs calling adjbuf.
127addad6afSRong-En Fan
128addad6afSRong-En FanFeb 21, 2007:
129addad6afSRong-En Fan	fixed a bug in matching the null RE in sub and gsub.  thanks to al aho
130addad6afSRong-En Fan	who actually did the fix (in b.c), and to wolfgang seeberg for finding
131addad6afSRong-En Fan	it and providing a very compact test case.
132addad6afSRong-En Fan
133addad6afSRong-En Fan	fixed quotation in b.c; thanks to Hal Pratt and the Princeton Dante
134addad6afSRong-En Fan	Project.
135addad6afSRong-En Fan
136addad6afSRong-En Fan	removed some no-effect asserts in run.c.
137addad6afSRong-En Fan
138addad6afSRong-En Fan	fiddled maketab.c to not complain about bison-generated values.
139addad6afSRong-En Fan
140addad6afSRong-En Fan	removed the obsolete -V argument; fixed --version to print the
141addad6afSRong-En Fan	version and exit.
142addad6afSRong-En Fan
143addad6afSRong-En Fan	fixed wording and an outright error in the usage message; thanks to igor
144addad6afSRong-En Fan	sobrado and jason mcintyre.
145addad6afSRong-En Fan
146addad6afSRong-En Fan	fixed a bug in -d that caused core dump if no program followed.
147addad6afSRong-En Fan
148addad6afSRong-En FanJan 1, 2007:
149addad6afSRong-En Fan	dropped mac.code from makefile; there are few non-MacOSX
150addad6afSRong-En Fan	mac's these days.
151addad6afSRong-En Fan
152addad6afSRong-En FanJan 17, 2006:
153addad6afSRong-En Fan	system() not flagged as unsafe in the unadvertised -safe option.
154addad6afSRong-En Fan	found it while enhancing tests before shipping the ;login: article.
155addad6afSRong-En Fan	practice what you preach.
156addad6afSRong-En Fan
157addad6afSRong-En Fan	removed the 9-years-obsolete -mr and -mf flags.
158addad6afSRong-En Fan
159addad6afSRong-En Fan	added -version and --version options.
160addad6afSRong-En Fan
161addad6afSRong-En Fan	core dump on linux with BEGIN {nextfile}, now fixed.
162addad6afSRong-En Fan
163addad6afSRong-En Fan	removed some #ifdef's in run.c and lex.c that appear to no
164addad6afSRong-En Fan	longer be necessary.
165addad6afSRong-En Fan
166c263f9bfSRuslan ErmilovApr 24, 2005:
167c263f9bfSRuslan Ermilov	modified lib.c so that values of $0 et al are preserved in the END
168c263f9bfSRuslan Ermilov	block, apparently as required by posix.  thanks to havard eidnes
169c263f9bfSRuslan Ermilov	for the report and code.
170c263f9bfSRuslan Ermilov
171c263f9bfSRuslan ErmilovJan 14, 2005:
172c263f9bfSRuslan Ermilov	fixed infinite loop in parsing, originally found by brian tsang.
173c263f9bfSRuslan Ermilov	thanks to arnold robbins for a suggestion that started me
174c263f9bfSRuslan Ermilov	rethinking it.
175c263f9bfSRuslan Ermilov
176c263f9bfSRuslan ErmilovDec 31, 2004:
177c263f9bfSRuslan Ermilov	prevent overflow of -f array in main, head off potential error in
178c263f9bfSRuslan Ermilov	call of SYNTAX(), test malloc return in lib.c, all with thanks to
179c263f9bfSRuslan Ermilov	todd miller.
180c263f9bfSRuslan Ermilov
181c263f9bfSRuslan ErmilovDec 22, 2004:
182c263f9bfSRuslan Ermilov	cranked up size of NCHARS; coverity thinks it can be overrun with
183c263f9bfSRuslan Ermilov	smaller size, and i think that's right.  added some assertions to b.c
184c263f9bfSRuslan Ermilov	to catch places where it might overrun.  the RE code is still fragile.
185c263f9bfSRuslan Ermilov
186c263f9bfSRuslan ErmilovDec 5, 2004:
187c263f9bfSRuslan Ermilov	fixed a couple of overflow problems with ridiculous field numbers:
188c263f9bfSRuslan Ermilov	e.g., print $(2^32-1).  thanks to ruslan ermilov, giorgos keramidas
189c263f9bfSRuslan Ermilov	and david o'brien at freebsd.org for patches.  this really should
190c263f9bfSRuslan Ermilov	be re-done from scratch.
191c263f9bfSRuslan Ermilov
192c263f9bfSRuslan ErmilovNov 21, 2004:
193c263f9bfSRuslan Ermilov	fixed another 25-year-old RE bug, in split.  it's another failure
194c263f9bfSRuslan Ermilov	to (re-)initialize.  thanks to steve fisher for spotting this and
195c263f9bfSRuslan Ermilov	providing a good test case.
196c263f9bfSRuslan Ermilov
19762ebc626SRuslan ErmilovNov 22, 2003:
19862ebc626SRuslan Ermilov	fixed a bug in regular expressions that dates (so help me) from 1977;
19962ebc626SRuslan Ermilov	it's been there from the beginning.  an anchored longest match that
20062ebc626SRuslan Ermilov	was longer than the number of states triggered a failure to initialize
20162ebc626SRuslan Ermilov	the machine properly.  many thanks to moinak ghosh for not only finding
20262ebc626SRuslan Ermilov	this one but for providing a fix, in some of the most mysterious
20362ebc626SRuslan Ermilov	code known to man.
20462ebc626SRuslan Ermilov
20562ebc626SRuslan Ermilov	fixed a storage leak in call() that appears to have been there since
20662ebc626SRuslan Ermilov	1983 or so -- a function without an explicit return that assigns a
20762ebc626SRuslan Ermilov	string to a parameter leaked a Cell.  thanks to moinak ghosh for
20862ebc626SRuslan Ermilov	spotting this very subtle one.
20962ebc626SRuslan Ermilov
21062ebc626SRuslan ErmilovJul 31, 2003:
21162ebc626SRuslan Ermilov	fixed, thanks to andrey chernov and ruslan ermilov, a bug in lex.c
21262ebc626SRuslan Ermilov	that mis-handled the character 255 in input.  (it was being compared
21362ebc626SRuslan Ermilov	to EOF with a signed comparison.)
21462ebc626SRuslan Ermilov
21588b8d487SRuslan ErmilovJul 29, 2003:
21688b8d487SRuslan Ermilov	fixed (i think) the long-standing botch that included the beginning of
21788b8d487SRuslan Ermilov	line state ^ for RE's in the set of valid characters; this led to a
21888b8d487SRuslan Ermilov	variety of odd problems, including failure to properly match certain
21988b8d487SRuslan Ermilov	regular expressions in non-US locales.  thanks to ruslan for keeping
22088b8d487SRuslan Ermilov	at this one.
22188b8d487SRuslan Ermilov
22288b8d487SRuslan ErmilovJul 28, 2003:
22388b8d487SRuslan Ermilov	n-th try at getting internationalization right, with thanks to volker
22488b8d487SRuslan Ermilov	kiefel, arnold robbins and ruslan ermilov for advice, though they
22588b8d487SRuslan Ermilov	should not be blamed for the outcome.  according to posix, "."  is the
22688b8d487SRuslan Ermilov	radix character in programs and command line arguments regardless of
22788b8d487SRuslan Ermilov	the locale; otherwise, the locale should prevail for input and output
22888b8d487SRuslan Ermilov	of numbers.  so it's intended to work that way.
22988b8d487SRuslan Ermilov
23088b8d487SRuslan Ermilov	i have rescinded the attempt to use strcoll in expanding shorthands in
23188b8d487SRuslan Ermilov	regular expressions (cclenter).  its properties are much too
23288b8d487SRuslan Ermilov	surprising; for example [a-c] matches aAbBc in locale en_US but abBcC
23388b8d487SRuslan Ermilov	in locale fr_CA.  i can see how this might arise by implementation
23488b8d487SRuslan Ermilov	but i cannot explain it to a human user.  (this behavior can be seen
23588b8d487SRuslan Ermilov	in gawk as well; we're leaning on the same library.)
23688b8d487SRuslan Ermilov
23788b8d487SRuslan Ermilov	the issue appears to be that strcoll is meant for sorting, where
23888b8d487SRuslan Ermilov	merging upper and lower case may make sense (though note that unix
23988b8d487SRuslan Ermilov	sort does not do this by default either).  it is not appropriate
24088b8d487SRuslan Ermilov	for regular expressions, where the goal is to match specific
24188b8d487SRuslan Ermilov	patterns of characters.  in any case, the notations [:lower:], etc.,
24288b8d487SRuslan Ermilov	are available in awk, and they are more likely to work correctly in
24388b8d487SRuslan Ermilov	most locales.
24488b8d487SRuslan Ermilov
24588b8d487SRuslan Ermilov	a moratorium is hereby declared on internationalization changes.
24688b8d487SRuslan Ermilov	i apologize to friends and colleagues in other parts of the world.
24788b8d487SRuslan Ermilov	i would truly like to get this "right", but i don't know what
24888b8d487SRuslan Ermilov	that is, and i do not want to keep making changes until it's clear.
24988b8d487SRuslan Ermilov
25088b8d487SRuslan ErmilovJul 4, 2003:
25188b8d487SRuslan Ermilov	fixed bug that permitted non-terminated RE, as in "awk /x".
25288b8d487SRuslan Ermilov
25388b8d487SRuslan ErmilovJun 1, 2003:
25488b8d487SRuslan Ermilov	subtle change to split: if source is empty, number of elems
25588b8d487SRuslan Ermilov	is always 0 and the array is not set.
25688b8d487SRuslan Ermilov
25788b8d487SRuslan ErmilovMar 21, 2003:
25888b8d487SRuslan Ermilov	added some parens to isblank, in another attempt to make things
25988b8d487SRuslan Ermilov	internationally portable.
26088b8d487SRuslan Ermilov
261fc6b1dfeSDavid E. O'BrienMar 14, 2003:
262fc6b1dfeSDavid E. O'Brien	the internationalization changes, somewhat modified, are now
263fc6b1dfeSDavid E. O'Brien	reinstated.  in theory awk will now do character comparisons
264fc6b1dfeSDavid E. O'Brien	and case conversions in national language, but "." will always
265fc6b1dfeSDavid E. O'Brien	be the decimal point separator on input and output regardless
266fc6b1dfeSDavid E. O'Brien	of national language.  isblank(){} has an #ifndef.
267fc6b1dfeSDavid E. O'Brien
268fc6b1dfeSDavid E. O'Brien	this no longer compiles on windows: LC_MESSAGES isn't defined
269fc6b1dfeSDavid E. O'Brien	in vc6++.
270fc6b1dfeSDavid E. O'Brien
271fc6b1dfeSDavid E. O'Brien	fixed subtle behavior in field and record splitting: if FS is
272fc6b1dfeSDavid E. O'Brien	a single character and RS is not empty, \n is NOT a separator.
273fc6b1dfeSDavid E. O'Brien	this tortuous reading is found in the awk book; behavior now
274fc6b1dfeSDavid E. O'Brien	matches gawk and mawk.
275fc6b1dfeSDavid E. O'Brien
27672969a22SDavid E. O'BrienDec 13, 2002:
27772969a22SDavid E. O'Brien	for the moment, the internationalization changes of nov 29 are
27872969a22SDavid E. O'Brien	rolled back -- programs like x = 1.2 don't work in some locales,
27972969a22SDavid E. O'Brien	because the parser is expecting x = 1,2.  until i understand this
28072969a22SDavid E. O'Brien	better, this will have to wait.
28172969a22SDavid E. O'Brien
282813da98dSDavid E. O'BrienNov 29, 2002:
283813da98dSDavid E. O'Brien	modified b.c (with tiny changes in main and run) to support
284813da98dSDavid E. O'Brien	locales, using strcoll and iswhatever tests for posix character
285813da98dSDavid E. O'Brien	classes.  thanks to ruslan ermilov (ru@freebsd.org) for code.
286813da98dSDavid E. O'Brien	the function isblank doesn't seem to have propagated to any
287813da98dSDavid E. O'Brien	header file near me, so it's there explicitly.  not properly
288813da98dSDavid E. O'Brien	tested on non-ascii character sets by me.
289813da98dSDavid E. O'Brien
290813da98dSDavid E. O'BrienJun 28, 2002:
291813da98dSDavid E. O'Brien	modified run/format() and tran/getsval() to do a slightly better
292813da98dSDavid E. O'Brien	job on using OFMT for output from print and CONVFMT for other
293813da98dSDavid E. O'Brien	number->string conversions, as promised by posix and done by
294813da98dSDavid E. O'Brien	gawk and mawk.  there are still places where it doesn't work
295813da98dSDavid E. O'Brien	right if CONVFMT is changed; by then the STR attribute of the
296813da98dSDavid E. O'Brien	variable has been irrevocably set.  thanks to arnold robbins for
297813da98dSDavid E. O'Brien	code and examples.
298813da98dSDavid E. O'Brien
299813da98dSDavid E. O'Brien	fixed subtle bug in format that could get core dump.  thanks to
300813da98dSDavid E. O'Brien	Jaromir Dolecek <jdolecek@NetBSD.org> for finding and fixing.
301813da98dSDavid E. O'Brien	minor cleanup in run.c / format() at the same time.
302813da98dSDavid E. O'Brien
303813da98dSDavid E. O'Brien	added some tests for null pointers to debugging printf's, which
304813da98dSDavid E. O'Brien	were never intended for external consumption.  thanks to dave
305813da98dSDavid E. O'Brien	kerns (dkerns@lucent.com) for pointing this out.
306813da98dSDavid E. O'Brien
307813da98dSDavid E. O'Brien	GNU compatibility: an empty regexp matches anything (thanks to
308813da98dSDavid E. O'Brien	dag-erling smorgrav, des@ofug.org).  subject to reversion if
309813da98dSDavid E. O'Brien	this does more harm than good.
310813da98dSDavid E. O'Brien
311813da98dSDavid E. O'Brien	pervasive small changes to make things more const-correct, as
312813da98dSDavid E. O'Brien	reported by gcc's -Wwrite-strings.  as it says in the gcc manual,
313813da98dSDavid E. O'Brien	this may be more nuisance than useful.  provoked by a suggestion
314813da98dSDavid E. O'Brien	and code from arnaud desitter, arnaud@nimbus.geog.ox.ac.uk
315813da98dSDavid E. O'Brien
316813da98dSDavid E. O'Brien	minor documentation changes to note that this now compiles out
317813da98dSDavid E. O'Brien	of the box on Mac OS X.
318813da98dSDavid E. O'Brien
319007c6572SDag-Erling SmørgravFeb 10, 2002:
320007c6572SDag-Erling Smørgrav	changed types in posix chars structure to quiet solaris cc.
321007c6572SDag-Erling Smørgrav
322007c6572SDag-Erling SmørgravJan 1, 2002:
323007c6572SDag-Erling Smørgrav	fflush() or fflush("") flushes all files and pipes.
324007c6572SDag-Erling Smørgrav
325007c6572SDag-Erling Smørgrav	length(arrayname) returns number of elements; thanks to
326007c6572SDag-Erling Smørgrav	arnold robbins for suggestion.
327007c6572SDag-Erling Smørgrav
328007c6572SDag-Erling Smørgrav	added a makefile.win to make it easier to build on windows.
329007c6572SDag-Erling Smørgrav	based on dan allen's buildwin.bat.
330007c6572SDag-Erling Smørgrav
331007c6572SDag-Erling SmørgravNov 16, 2001:
332007c6572SDag-Erling Smørgrav	added support for posix character class names like [:digit:],
333007c6572SDag-Erling Smørgrav	which are not exactly shorter than [0-9] and perhaps no more
334007c6572SDag-Erling Smørgrav	portable.  thanks to dag-erling smorgrav for code.
335007c6572SDag-Erling Smørgrav
336007c6572SDag-Erling SmørgravFeb 16, 2001:
337007c6572SDag-Erling Smørgrav	removed -m option; no longer needed, and it was actually
338007c6572SDag-Erling Smørgrav	broken (noted thanks to volker kiefel).
339007c6572SDag-Erling Smørgrav
340007c6572SDag-Erling SmørgravFeb 10, 2001:
341007c6572SDag-Erling Smørgrav	fixed an appalling bug in gettok: any sequence of digits, +,-, E, e,
342007c6572SDag-Erling Smørgrav	and period was accepted as a valid number if it started with a period.
343007c6572SDag-Erling Smørgrav	this would never have happened with the lex version.
344007c6572SDag-Erling Smørgrav
345007c6572SDag-Erling Smørgrav	other 1-character botches, now fixed, include a bare $ and a
346007c6572SDag-Erling Smørgrav	bare " at the end of the input.
347007c6572SDag-Erling Smørgrav
348007c6572SDag-Erling SmørgravFeb 7, 2001:
349007c6572SDag-Erling Smørgrav	more (const char *) casts in b.c and tran.c to silence warnings.
350007c6572SDag-Erling Smørgrav
3512a55deb1SDavid E. O'BrienNov 15, 2000:
3522a55deb1SDavid E. O'Brien	fixed a bug introduced in august 1997 that caused expressions
3532a55deb1SDavid E. O'Brien	like $f[1] to be syntax errors.  thanks to arnold robbins for
3542a55deb1SDavid E. O'Brien	noticing this and providing a fix.
3552a55deb1SDavid E. O'Brien
3562a55deb1SDavid E. O'BrienOct 30, 2000:
3572a55deb1SDavid E. O'Brien	fixed some nextfile bugs: not handling all cases.  thanks to
3582a55deb1SDavid E. O'Brien	arnold robbins for pointing this out.  new regressions added.
3592a55deb1SDavid E. O'Brien
3602a55deb1SDavid E. O'Brien	close() is now a function.  it returns whatever the library
3612a55deb1SDavid E. O'Brien	fclose returns, and -1 for closing a file or pipe that wasn't
3622a55deb1SDavid E. O'Brien	opened.
3632a55deb1SDavid E. O'Brien
3642a55deb1SDavid E. O'BrienSep 24, 2000:
3652a55deb1SDavid E. O'Brien	permit \n explicitly in character classes; won't work right
3662a55deb1SDavid E. O'Brien	if comes in as "[\n]" but ok as /[\n]/, because of multiple
3672a55deb1SDavid E. O'Brien	processing of \'s.  thanks to arnold robbins.
3682a55deb1SDavid E. O'Brien
3692a55deb1SDavid E. O'BrienJuly 5, 2000:
3702a55deb1SDavid E. O'Brien	minor fiddles in tran.c to keep compilers happy about uschar.
3712a55deb1SDavid E. O'Brien	thanks to norman wilson.
3722a55deb1SDavid E. O'Brien
3732a55deb1SDavid E. O'BrienMay 25, 2000:
3742a55deb1SDavid E. O'Brien	yet another attempt at making 8-bit input work, with another
3752a55deb1SDavid E. O'Brien	band-aid in b.c (member()), and some (uschar) casts to head
3762a55deb1SDavid E. O'Brien	off potential errors in subscripts (like isdigit).  also
3772a55deb1SDavid E. O'Brien	changed HAT to NCHARS-2.  thanks again to santiago vila.
3782a55deb1SDavid E. O'Brien
3792a55deb1SDavid E. O'Brien	changed maketab.c to ignore apparently out of range definitions
3802a55deb1SDavid E. O'Brien	instead of halting; new freeBSD generates one.  thanks to
3812a55deb1SDavid E. O'Brien	jon snader <jsnader@ix.netcom.com> for pointing out the problem.
3822a55deb1SDavid E. O'Brien
3832a55deb1SDavid E. O'BrienMay 2, 2000:
3842a55deb1SDavid E. O'Brien	fixed an 8-bit problem in b.c by making several char*'s into
3852a55deb1SDavid E. O'Brien	unsigned char*'s.  not clear i have them all yet.  thanks to
3862a55deb1SDavid E. O'Brien	Santiago Vila <sanvila@unex.es> for the bug report.
3872a55deb1SDavid E. O'Brien
3882a55deb1SDavid E. O'BrienApr 21, 2000:
3892a55deb1SDavid E. O'Brien	finally found and fixed a memory leak in function call; it's
3902a55deb1SDavid E. O'Brien	been there since functions were added ~1983.  thanks to
3912a55deb1SDavid E. O'Brien	jon bentley for the test case that found it.
3922a55deb1SDavid E. O'Brien
3932a55deb1SDavid E. O'Brien	added test in envinit to catch environment "variables" with
394c263f9bfSRuslan Ermilov	names beginning with '='; thanks to Berend Hasselman.
3952a55deb1SDavid E. O'Brien
3962a55deb1SDavid E. O'BrienJul 28, 1999:
3972a55deb1SDavid E. O'Brien	added test in defn() to catch function foo(foo), which
3982a55deb1SDavid E. O'Brien	otherwise recurses until core dump.  thanks to arnold
3992a55deb1SDavid E. O'Brien	robbins for noticing this.
4002a55deb1SDavid E. O'Brien
4012a55deb1SDavid E. O'BrienJun 20, 1999:
4022a55deb1SDavid E. O'Brien	added *bp in gettok in lex.c; appears possible to exit function
4032a55deb1SDavid E. O'Brien	without terminating the string.  thanks to russ cox.
4042a55deb1SDavid E. O'Brien
4052a55deb1SDavid E. O'BrienJun 2, 1999:
4062a55deb1SDavid E. O'Brien	added function stdinit() to run to initialize files[] array,
4072a55deb1SDavid E. O'Brien	in case stdin, etc., are not constants; some compilers care.
4082a55deb1SDavid E. O'Brien
4092a55deb1SDavid E. O'BrienMay 10, 1999:
4102a55deb1SDavid E. O'Brien	replaced the ERROR ... FATAL, etc., macros with functions
4112a55deb1SDavid E. O'Brien	based on vprintf, to avoid problems caused by overrunning
4122a55deb1SDavid E. O'Brien	fixed-size errbuf array.  thanks to ralph corderoy for the
4132a55deb1SDavid E. O'Brien	impetus, and for pointing out a string termination bug in
4142a55deb1SDavid E. O'Brien	qstring as well.
4152a55deb1SDavid E. O'Brien
4162a55deb1SDavid E. O'BrienApr 21, 1999:
4172a55deb1SDavid E. O'Brien	fixed bug that caused occasional core dumps with commandline
4182a55deb1SDavid E. O'Brien	variable with value ending in \.  (thanks to nelson beebe for
4192a55deb1SDavid E. O'Brien	the test case.)
4202a55deb1SDavid E. O'Brien
4212a55deb1SDavid E. O'BrienApr 16, 1999:
4222a55deb1SDavid E. O'Brien	with code kindly provided by Bruce Lilly, awk now parses
4232a55deb1SDavid E. O'Brien	/=/ and similar constructs more sensibly in more places.
4242a55deb1SDavid E. O'Brien	Bruce also provided some helpful test cases.
4252a55deb1SDavid E. O'Brien
4262a55deb1SDavid E. O'BrienApr 5, 1999:
4272a55deb1SDavid E. O'Brien	changed true/false to True/False in run.c to make it
4282a55deb1SDavid E. O'Brien	easier to compile with C++.  Added some casts on malloc
4292a55deb1SDavid E. O'Brien	and realloc to be honest about casts; ditto.  changed
4302a55deb1SDavid E. O'Brien	ltype int to long in struct rrow to reduce some 64-bit
4312a55deb1SDavid E. O'Brien	complaints; other changes scattered throughout for the
4322a55deb1SDavid E. O'Brien	same purpose.  thanks to Nelson Beebe for these portability
4332a55deb1SDavid E. O'Brien	improvements.
4342a55deb1SDavid E. O'Brien
4352a55deb1SDavid E. O'Brien	removed some horrible pointer-int casting in b.c and elsewhere
4362a55deb1SDavid E. O'Brien	by adding ptoi and itonp to localize the casts, which are
4372a55deb1SDavid E. O'Brien	all benign.  fixed one incipient bug that showed up on sgi
4382a55deb1SDavid E. O'Brien	in 64-bit mode.
4392a55deb1SDavid E. O'Brien
4402a55deb1SDavid E. O'Brien	reset lineno for new source file; include filename in error
4412a55deb1SDavid E. O'Brien	message.  also fixed line number error in continuation lines.
4422a55deb1SDavid E. O'Brien	(thanks to Nelson Beebe for both of these.)
4432a55deb1SDavid E. O'Brien
4442a55deb1SDavid E. O'BrienMar 24, 1999:
4452a55deb1SDavid E. O'Brien	Nelson Beebe notes that irix 5.3 yacc dies with a bogus
4462a55deb1SDavid E. O'Brien	error; use a newer version or switch to bison, since sgi
4472a55deb1SDavid E. O'Brien	is unlikely to fix it.
4482a55deb1SDavid E. O'Brien
4492a55deb1SDavid E. O'BrienMar 5, 1999:
4502a55deb1SDavid E. O'Brien	changed isnumber to is_number to avoid the problem caused by
4512a55deb1SDavid E. O'Brien	versions of ctype.h that include the name isnumber.
4522a55deb1SDavid E. O'Brien
4532a55deb1SDavid E. O'Brien	distribution now includes a script for building on a Mac,
4542a55deb1SDavid E. O'Brien	thanks to Dan Allen.
4552a55deb1SDavid E. O'Brien
4562a55deb1SDavid E. O'BrienFeb 20, 1999:
4572a55deb1SDavid E. O'Brien	fixed memory leaks in run.c (call) and tran.c (setfval).
4582a55deb1SDavid E. O'Brien	thanks to Stephen Nutt for finding these and providing the fixes.
4592a55deb1SDavid E. O'Brien
4602a55deb1SDavid E. O'BrienJan 13, 1999:
4612a55deb1SDavid E. O'Brien	replaced srand argument by (unsigned int) in run.c;
4622a55deb1SDavid E. O'Brien	avoids problem on Mac and potentially on Unix & Windows.
4632a55deb1SDavid E. O'Brien	thanks to Dan Allen.
4642a55deb1SDavid E. O'Brien
4652a55deb1SDavid E. O'Brien	added a few (int) casts to silence useless compiler warnings.
4662a55deb1SDavid E. O'Brien	e.g., errorflag= in run.c jump().
4672a55deb1SDavid E. O'Brien
4682a55deb1SDavid E. O'Brien	added proctab.c to the bundle outout; one less thing
4692a55deb1SDavid E. O'Brien	to have to compile out of the box.
4702a55deb1SDavid E. O'Brien
4712a55deb1SDavid E. O'Brien	added calls to _popen and _pclose to the win95 stub for
4722a55deb1SDavid E. O'Brien	pipes (thanks to Steve Adams for this helpful suggestion).
4732a55deb1SDavid E. O'Brien	seems to work, though properties are not well understood
4742a55deb1SDavid E. O'Brien	by me, and it appears that under some circumstances the
4752a55deb1SDavid E. O'Brien	pipe output is truncated.  Be careful.
4762a55deb1SDavid E. O'Brien
4772a55deb1SDavid E. O'BrienOct 19, 1998:
4782a55deb1SDavid E. O'Brien	fixed a couple of bugs in getrec: could fail to update $0
4792a55deb1SDavid E. O'Brien	after a getline var; because inputFS wasn't initialized,
4802a55deb1SDavid E. O'Brien	could split $0 on every character, a misleading diversion.
4812a55deb1SDavid E. O'Brien
4822a55deb1SDavid E. O'Brien	fixed caching bug in makedfa: LRU was actually removing
4832a55deb1SDavid E. O'Brien	least often used.
4842a55deb1SDavid E. O'Brien
4852a55deb1SDavid E. O'Brien	thanks to ross ridge for finding these, and for providing
4862a55deb1SDavid E. O'Brien	great bug reports.
4872a55deb1SDavid E. O'Brien
4882a55deb1SDavid E. O'BrienMay 12, 1998:
4892a55deb1SDavid E. O'Brien	fixed potential bug in readrec: might fail to update record
4902a55deb1SDavid E. O'Brien	pointer after growing.  thanks to dan levy for spotting this
4912a55deb1SDavid E. O'Brien	and suggesting the fix.
4922a55deb1SDavid E. O'Brien
4932a55deb1SDavid E. O'BrienMar 12, 1998:
4942a55deb1SDavid E. O'Brien	added -V to print version number and die.
4952a55deb1SDavid E. O'Brien
4962a55deb1SDavid E. O'BrienFeb 11, 1998:
4972a55deb1SDavid E. O'Brien	subtle silent bug in lex.c: if the program ended with a number
4982a55deb1SDavid E. O'Brien	longer than 1 digit, part of the input would be pushed back and
4992a55deb1SDavid E. O'Brien	parsed again because token buffer wasn't terminated right.
5002a55deb1SDavid E. O'Brien	example:  awk 'length($0) > 10'.  blush.  at least i found it
5012a55deb1SDavid E. O'Brien	myself.
5022a55deb1SDavid E. O'Brien
5032a55deb1SDavid E. O'BrienAug 31, 1997:
5042a55deb1SDavid E. O'Brien	s/adelete/awkdelete/: SGI uses this in malloc.h.
5052a55deb1SDavid E. O'Brien	thanks to nelson beebe for pointing this one out.
5062a55deb1SDavid E. O'Brien
5072a55deb1SDavid E. O'BrienAug 21, 1997:
5082a55deb1SDavid E. O'Brien	fixed some bugs in sub and gsub when replacement includes \\.
5092a55deb1SDavid E. O'Brien	this is a dark, horrible corner, but at least now i believe that
5102a55deb1SDavid E. O'Brien	the behavior is the same as gawk and the intended posix standard.
5112a55deb1SDavid E. O'Brien	thanks to arnold robbins for advice here.
5122a55deb1SDavid E. O'Brien
5132a55deb1SDavid E. O'BrienAug 9, 1997:
5142a55deb1SDavid E. O'Brien	somewhat regretfully, replaced the ancient lex-based lexical
5152a55deb1SDavid E. O'Brien	analyzer with one written in C.  it's longer, generates less code,
5162a55deb1SDavid E. O'Brien	and more portable; the old one depended too much on mysterious
5172a55deb1SDavid E. O'Brien	properties of lex that were not preserved in other environments.
5182a55deb1SDavid E. O'Brien	in theory these recognize the same language.
5192a55deb1SDavid E. O'Brien
5202a55deb1SDavid E. O'Brien	now using strtod to test whether a string is a number, instead of
5212a55deb1SDavid E. O'Brien	the convoluted original function.  should be more portable and
5222a55deb1SDavid E. O'Brien	reliable if strtod is implemented right.
5232a55deb1SDavid E. O'Brien
5242a55deb1SDavid E. O'Brien	removed now-pointless optimization in makefile that tries to avoid
5252a55deb1SDavid E. O'Brien	recompilation when awkgram.y is changed but symbols are not.
5262a55deb1SDavid E. O'Brien
5272a55deb1SDavid E. O'Brien	removed most fixed-size arrays, though a handful remain, some
5282a55deb1SDavid E. O'Brien	of which are unchecked.  you have been warned.
5292a55deb1SDavid E. O'Brien
5302a55deb1SDavid E. O'BrienAug 4, 1997:
5312a55deb1SDavid E. O'Brien	with some trepidation, replaced the ancient code that managed
5322a55deb1SDavid E. O'Brien	fields and $0 in fixed-size arrays with arrays that grow on
5332a55deb1SDavid E. O'Brien	demand.  there is still some tension between trying to make this
5342a55deb1SDavid E. O'Brien	run fast and making it clean; not sure it's right yet.
5352a55deb1SDavid E. O'Brien
5362a55deb1SDavid E. O'Brien	the ill-conceived -mr and -mf arguments are now useful only
5372a55deb1SDavid E. O'Brien	for debugging.  previous dynamic string code removed.
5382a55deb1SDavid E. O'Brien
5392a55deb1SDavid E. O'Brien	numerous other minor cleanups along the way.
5402a55deb1SDavid E. O'Brien
5412a55deb1SDavid E. O'BrienJul 30, 1997:
5422a55deb1SDavid E. O'Brien	using code provided by dan levy (to whom profuse thanks), replaced
5432a55deb1SDavid E. O'Brien	fixed-size arrays and awkward kludges by a fairly uniform mechanism
5442a55deb1SDavid E. O'Brien	to grow arrays as needed for printf, sub, gsub, etc.
5452a55deb1SDavid E. O'Brien
5462a55deb1SDavid E. O'BrienJul 23, 1997:
5472a55deb1SDavid E. O'Brien	falling off the end of a function returns "" and 0, not 0.
5482a55deb1SDavid E. O'Brien	thanks to arnold robbins.
5492a55deb1SDavid E. O'Brien
5502a55deb1SDavid E. O'BrienJun 17, 1997:
5512a55deb1SDavid E. O'Brien	replaced several fixed-size arrays by dynamically-created ones
5522a55deb1SDavid E. O'Brien	in run.c; added overflow tests to some previously unchecked cases.
5532a55deb1SDavid E. O'Brien	getline, toupper, tolower.
5542a55deb1SDavid E. O'Brien
5552a55deb1SDavid E. O'Brien	getline code is still broken in that recursive calls may wind
5562a55deb1SDavid E. O'Brien	up using the same space.  [fixed later]
5572a55deb1SDavid E. O'Brien
5582a55deb1SDavid E. O'Brien	increased RECSIZE to 8192 to push problems further over the horizon.
5592a55deb1SDavid E. O'Brien
5602a55deb1SDavid E. O'Brien	added \r to \n as input line separator for programs, not data.
5612a55deb1SDavid E. O'Brien	damn CRLFs.
5622a55deb1SDavid E. O'Brien
5632a55deb1SDavid E. O'Brien	modified format() to permit explicit printf("%c", 0) to include
5642a55deb1SDavid E. O'Brien	a null byte in output.  thanks to ken stailey for the fix.
5652a55deb1SDavid E. O'Brien
5662a55deb1SDavid E. O'Brien	added a "-safe" argument that disables file output (print >,
5672a55deb1SDavid E. O'Brien	print >>), process creation (cmd|getline, print |, system), and
5682a55deb1SDavid E. O'Brien	access to the environment (ENVIRON).  this is a first approximation
5692a55deb1SDavid E. O'Brien	to a "safe" version of awk, but don't rely on it too much.  thanks
5702a55deb1SDavid E. O'Brien	to joan feigenbaum and matt blaze for the inspiration long ago.
5712a55deb1SDavid E. O'Brien
5722a55deb1SDavid E. O'BrienJul 8, 1996:
5732a55deb1SDavid E. O'Brien	fixed long-standing bug in sub, gsub(/a/, "\\\\&"); thanks to
5742a55deb1SDavid E. O'Brien	ralph corderoy.
5752a55deb1SDavid E. O'Brien
5762a55deb1SDavid E. O'BrienJun 29, 1996:
5772a55deb1SDavid E. O'Brien	fixed awful bug in new field splitting; didn't get all the places
5782a55deb1SDavid E. O'Brien	where input was done.
5792a55deb1SDavid E. O'Brien
5802a55deb1SDavid E. O'BrienJun 28, 1996:
5812a55deb1SDavid E. O'Brien	changed field-splitting to conform to posix definition: fields are
5822a55deb1SDavid E. O'Brien	split using the value of FS at the time of input; it used to be
5832a55deb1SDavid E. O'Brien	the value when the field or NF was first referred to, a much less
5842a55deb1SDavid E. O'Brien	predictable definition.  thanks to arnold robbins for encouragement
5852a55deb1SDavid E. O'Brien	to do the right thing.
5862a55deb1SDavid E. O'Brien
5872a55deb1SDavid E. O'BrienMay 28, 1996:
5882a55deb1SDavid E. O'Brien	fixed appalling but apparently unimportant bug in parsing octal
5892a55deb1SDavid E. O'Brien	numbers in reg exprs.
5902a55deb1SDavid E. O'Brien
5912a55deb1SDavid E. O'Brien	explicit hex in reg exprs now limited to 2 chars: \xa, \xaa.
5922a55deb1SDavid E. O'Brien
5932a55deb1SDavid E. O'BrienMay 27, 1996:
5942a55deb1SDavid E. O'Brien	cleaned up some declarations so gcc -Wall is now almost silent.
5952a55deb1SDavid E. O'Brien
5962a55deb1SDavid E. O'Brien	makefile now includes backup copies of ytab.c and lexyy.c in case
5972a55deb1SDavid E. O'Brien	one makes before looking; it also avoids recreating lexyy.c unless
5982a55deb1SDavid E. O'Brien	really needed.
5992a55deb1SDavid E. O'Brien
6002a55deb1SDavid E. O'Brien	s/aprintf/awkprint, s/asprintf/awksprintf/ to avoid some name clashes
6012a55deb1SDavid E. O'Brien	with unwisely-written header files.
6022a55deb1SDavid E. O'Brien
6032a55deb1SDavid E. O'Brien	thanks to jeffrey friedl for several of these.
6042a55deb1SDavid E. O'Brien
6052a55deb1SDavid E. O'BrienMay 26, 1996:
6062a55deb1SDavid E. O'Brien	an attempt to rationalize the (unsigned) char issue.  almost all
6072a55deb1SDavid E. O'Brien	instances of unsigned char have been removed; the handful of places
6082a55deb1SDavid E. O'Brien	in b.c where chars are used as table indices have been hand-crafted.
6092a55deb1SDavid E. O'Brien	added some latin-1 tests to the regression, but i'm not confident;
6102a55deb1SDavid E. O'Brien	none of my compilers seem to care much.  thanks to nelson beebe for
6112a55deb1SDavid E. O'Brien	pointing out some others that do care.
6122a55deb1SDavid E. O'Brien
6132a55deb1SDavid E. O'BrienMay 2, 1996:
6142a55deb1SDavid E. O'Brien	removed all register declarations.
6152a55deb1SDavid E. O'Brien
6162a55deb1SDavid E. O'Brien	enhanced split(), as in gawk, etc:  split(s, a, "") splits s into
6172a55deb1SDavid E. O'Brien	a[1]...a[length(s)] with each character a single element.
6182a55deb1SDavid E. O'Brien
6192a55deb1SDavid E. O'Brien	made the same changes for field-splitting if FS is "".
6202a55deb1SDavid E. O'Brien
6212a55deb1SDavid E. O'Brien	added nextfile, as in gawk: causes immediate advance to next
6222a55deb1SDavid E. O'Brien	input file. (thanks to arnold robbins for inspiration and code).
6232a55deb1SDavid E. O'Brien
6242a55deb1SDavid E. O'Brien	small fixes to regexpr code:  can now handle []], [[], and
6252a55deb1SDavid E. O'Brien	variants;  [] is now a syntax error, rather than matching
6262a55deb1SDavid E. O'Brien	everything;  [z-a] is now empty, not z.  far from complete
6272a55deb1SDavid E. O'Brien	or correct, however.  (thanks to jeffrey friedl for pointing out
6282a55deb1SDavid E. O'Brien	some awful behaviors.)
6292a55deb1SDavid E. O'Brien
6302a55deb1SDavid E. O'BrienApr 29, 1996:
631c263f9bfSRuslan Ermilov	replaced uchar by uschar everywhere; apparently some compilers
6322a55deb1SDavid E. O'Brien	usurp this name and this causes conflicts.
6332a55deb1SDavid E. O'Brien
6342a55deb1SDavid E. O'Brien	fixed call to time in run.c (bltin); arg is time_t *.
6352a55deb1SDavid E. O'Brien
6362a55deb1SDavid E. O'Brien	replaced horrible pointer/long punning in b.c by a legitimate
6372a55deb1SDavid E. O'Brien	union.  should be safer on 64-bit machines and cleaner everywhere.
6382a55deb1SDavid E. O'Brien	(thanks to nelson beebe for pointing out some of these problems.)
6392a55deb1SDavid E. O'Brien
6402a55deb1SDavid E. O'Brien	replaced nested comments by #if 0...#endif in run.c, lib.c.
6412a55deb1SDavid E. O'Brien
6422a55deb1SDavid E. O'Brien	removed getsval, setsval, execute macros from run.c and lib.c.
6432a55deb1SDavid E. O'Brien	machines are 100x faster than they were when these macros were
6442a55deb1SDavid E. O'Brien	first used.
6452a55deb1SDavid E. O'Brien
6462a55deb1SDavid E. O'Brien	revised filenames: awk.g.y => awkgram.y, awk.lx.l => awklex.l,
6472a55deb1SDavid E. O'Brien	y.tab.[ch] => ytab.[ch], lex.yy.c => lexyy.c, all in the aid of
6482a55deb1SDavid E. O'Brien	portability to nameless systems.
6492a55deb1SDavid E. O'Brien
6502a55deb1SDavid E. O'Brien	"make bundle" now includes yacc and lex output files for recipients
6512a55deb1SDavid E. O'Brien	who don't have yacc or lex.
6522a55deb1SDavid E. O'Brien
6532a55deb1SDavid E. O'BrienAug 15, 1995:
6542a55deb1SDavid E. O'Brien	initialized Cells in setsymtab more carefully; some fields
6552a55deb1SDavid E. O'Brien	were not set.  (thanks to purify, all of whose complaints i
6562a55deb1SDavid E. O'Brien	think i now understand.)
6572a55deb1SDavid E. O'Brien
6582a55deb1SDavid E. O'Brien	fixed at least one error in gsub that looked at -1-th element
6592a55deb1SDavid E. O'Brien	of an array when substituting for a null match (e.g., $).
6602a55deb1SDavid E. O'Brien
6612a55deb1SDavid E. O'Brien	delete arrayname is now legal; it clears the elements but leaves
6622a55deb1SDavid E. O'Brien	the array, which may not be the right behavior.
6632a55deb1SDavid E. O'Brien
6642a55deb1SDavid E. O'Brien	modified makefile: my current make can't cope with the test used
6652a55deb1SDavid E. O'Brien	to avoid unnecessary yacc invocations.
6662a55deb1SDavid E. O'Brien
6672a55deb1SDavid E. O'BrienJul 17, 1995:
6682a55deb1SDavid E. O'Brien	added dynamically growing strings to awk.lx.l and b.c
6692a55deb1SDavid E. O'Brien	to permit regular expressions to be much bigger.
6702a55deb1SDavid E. O'Brien	the state arrays can still overflow.
6712a55deb1SDavid E. O'Brien
6722a55deb1SDavid E. O'BrienAug 24, 1994:
6732a55deb1SDavid E. O'Brien	detect duplicate arguments in function definitions (mdm).
6742a55deb1SDavid E. O'Brien
6752a55deb1SDavid E. O'BrienMay 11, 1994:
6762a55deb1SDavid E. O'Brien	trivial fix to printf to limit string size in sub().
6772a55deb1SDavid E. O'Brien
6782a55deb1SDavid E. O'BrienApr 22, 1994:
6792a55deb1SDavid E. O'Brien	fixed yet another subtle self-assignment problem:
6802a55deb1SDavid E. O'Brien	$1 = $2; $1 = $1 clobbered $1.
6812a55deb1SDavid E. O'Brien
6822a55deb1SDavid E. O'Brien	Regression tests now use private echo, to avoid quoting problems.
6832a55deb1SDavid E. O'Brien
6842a55deb1SDavid E. O'BrienFeb 2, 1994:
6852a55deb1SDavid E. O'Brien	changed error() to print line number as %d, not %g.
6862a55deb1SDavid E. O'Brien
6872a55deb1SDavid E. O'BrienJul 23, 1993:
6882a55deb1SDavid E. O'Brien	cosmetic changes: increased sizes of some arrays,
6892a55deb1SDavid E. O'Brien	reworded some error messages.
6902a55deb1SDavid E. O'Brien
6912a55deb1SDavid E. O'Brien	added CONVFMT as in posix (just replaced OFMT in getsval)
6922a55deb1SDavid E. O'Brien
6932a55deb1SDavid E. O'Brien	FILENAME is now "" until the first thing that causes a file
6942a55deb1SDavid E. O'Brien	to be opened.
6952a55deb1SDavid E. O'Brien
6962a55deb1SDavid E. O'BrienNov 28, 1992:
6972a55deb1SDavid E. O'Brien	deleted yyunput and yyoutput from proto.h;
6982a55deb1SDavid E. O'Brien	different versions of lex give these different declarations.
6992a55deb1SDavid E. O'Brien
7002a55deb1SDavid E. O'BrienMay 31, 1992:
7012a55deb1SDavid E. O'Brien	added -mr N and -mf N options: more record and fields.
7022a55deb1SDavid E. O'Brien	these really ought to adjust automatically.
7032a55deb1SDavid E. O'Brien
7042a55deb1SDavid E. O'Brien	cleaned up some error messages; "out of space" now means
7052a55deb1SDavid E. O'Brien	malloc returned NULL in all cases.
7062a55deb1SDavid E. O'Brien
7072a55deb1SDavid E. O'Brien	changed rehash so that if it runs out, it just returns;
7082a55deb1SDavid E. O'Brien	things will continue to run slow, but maybe a bit longer.
7092a55deb1SDavid E. O'Brien
7102a55deb1SDavid E. O'BrienApr 24, 1992:
7112a55deb1SDavid E. O'Brien	remove redundant close of stdin when using -f -.
7122a55deb1SDavid E. O'Brien
7132a55deb1SDavid E. O'Brien	got rid of core dump with -d; awk -d just prints date.
7142a55deb1SDavid E. O'Brien
7152a55deb1SDavid E. O'BrienApr 12, 1992:
7162a55deb1SDavid E. O'Brien	added explicit check for /dev/std(in,out,err) in redirection.
7172a55deb1SDavid E. O'Brien	unlike gawk, no /dev/fd/n yet.
7182a55deb1SDavid E. O'Brien
7192a55deb1SDavid E. O'Brien	added (file/pipe) builtin.  hard to test satisfactorily.
7202a55deb1SDavid E. O'Brien	not posix.
7212a55deb1SDavid E. O'Brien
7222a55deb1SDavid E. O'BrienFeb 20, 1992:
7232a55deb1SDavid E. O'Brien	recompile after abortive changes;  should be unchanged.
7242a55deb1SDavid E. O'Brien
7252a55deb1SDavid E. O'BrienDec 2, 1991:
7262a55deb1SDavid E. O'Brien	die-casting time:  converted to ansi C, installed that.
7272a55deb1SDavid E. O'Brien
7282a55deb1SDavid E. O'BrienNov 30, 1991:
7292a55deb1SDavid E. O'Brien	fixed storage leak in freefa, failing to recover [N]CCL.
7302a55deb1SDavid E. O'Brien	thanks to Bill Jones (jones@cs.usask.ca)
7312a55deb1SDavid E. O'Brien
7322a55deb1SDavid E. O'BrienNov 19, 1991:
7332a55deb1SDavid E. O'Brien	use RAND_MAX instead of literal in builtin().
7342a55deb1SDavid E. O'Brien
7352a55deb1SDavid E. O'BrienNov 12, 1991:
7362a55deb1SDavid E. O'Brien	cranked up some fixed-size arrays in b.c, and added a test for
7372a55deb1SDavid E. O'Brien	overflow in penter.  thanks to mark larsen.
7382a55deb1SDavid E. O'Brien
7392a55deb1SDavid E. O'BrienSep 24, 1991:
7402a55deb1SDavid E. O'Brien	increased buffer in gsub.  a very crude fix to a general problem.
7412a55deb1SDavid E. O'Brien	and again on Sep 26.
7422a55deb1SDavid E. O'Brien
7432a55deb1SDavid E. O'BrienAug 18, 1991:
7442a55deb1SDavid E. O'Brien	enforce variable name syntax for commandline variables: has to
7452a55deb1SDavid E. O'Brien	start with letter or _.
7462a55deb1SDavid E. O'Brien
7472a55deb1SDavid E. O'BrienJul 27, 1991:
7482a55deb1SDavid E. O'Brien	allow newline after ; in for statements.
7492a55deb1SDavid E. O'Brien
7502a55deb1SDavid E. O'BrienJul 21, 1991:
7512a55deb1SDavid E. O'Brien	fixed so that in self-assignment like $1=$1, side effects
7522a55deb1SDavid E. O'Brien	like recomputing $0 take place.  (this is getting subtle.)
7532a55deb1SDavid E. O'Brien
7542a55deb1SDavid E. O'BrienJun 30, 1991:
7552a55deb1SDavid E. O'Brien	better test for detecting too-long output record.
7562a55deb1SDavid E. O'Brien
7572a55deb1SDavid E. O'BrienJun 2, 1991:
7582a55deb1SDavid E. O'Brien	better defense against very long printf strings.
7592a55deb1SDavid E. O'Brien	made break and continue illegal outside of loops.
7602a55deb1SDavid E. O'Brien
7612a55deb1SDavid E. O'BrienMay 13, 1991:
7622a55deb1SDavid E. O'Brien	removed extra arg on gettemp, tempfree.  minor error message rewording.
7632a55deb1SDavid E. O'Brien
7642a55deb1SDavid E. O'BrienMay 6, 1991:
7652a55deb1SDavid E. O'Brien	fixed silly bug in hex parsing in hexstr().
7662a55deb1SDavid E. O'Brien	removed an apparently unnecessary test in isnumber().
7672a55deb1SDavid E. O'Brien	warn about weird printf conversions.
7682a55deb1SDavid E. O'Brien	fixed unchecked array overwrite in relex().
7692a55deb1SDavid E. O'Brien
7702a55deb1SDavid E. O'Brien	changed for (i in array) to access elements in sorted order.
7712a55deb1SDavid E. O'Brien	then unchanged it -- it really does run slower in too many cases.
7722a55deb1SDavid E. O'Brien	left the code in place, commented out.
7732a55deb1SDavid E. O'Brien
7742a55deb1SDavid E. O'BrienFeb 10, 1991:
7752a55deb1SDavid E. O'Brien	check error status on all writes, to avoid banging on full disks.
7762a55deb1SDavid E. O'Brien
7772a55deb1SDavid E. O'BrienJan 28, 1991:
7782a55deb1SDavid E. O'Brien	awk -f - reads the program from stdin.
7792a55deb1SDavid E. O'Brien
7802a55deb1SDavid E. O'BrienJan 11, 1991:
7812a55deb1SDavid E. O'Brien	failed to set numeric state on $0 in cmd|getline context in run.c.
7822a55deb1SDavid E. O'Brien
7832a55deb1SDavid E. O'BrienNov 2, 1990:
7842a55deb1SDavid E. O'Brien	fixed sleazy test for integrality in getsval;  use modf.
7852a55deb1SDavid E. O'Brien
7862a55deb1SDavid E. O'BrienOct 29, 1990:
7872a55deb1SDavid E. O'Brien	fixed sleazy buggy code in lib.c that looked (incorrectly) for
7882a55deb1SDavid E. O'Brien	too long input lines.
7892a55deb1SDavid E. O'Brien
7902a55deb1SDavid E. O'BrienOct 14, 1990:
7912a55deb1SDavid E. O'Brien	fixed the bug on p. 198 in which it couldn't deduce that an
7922a55deb1SDavid E. O'Brien	argument was an array in some contexts.  replaced the error
7932a55deb1SDavid E. O'Brien	message in intest() by code that damn well makes it an array.
7942a55deb1SDavid E. O'Brien
7952a55deb1SDavid E. O'BrienOct 8, 1990:
7962a55deb1SDavid E. O'Brien	fixed horrible bug:  types and values were not preserved in
7972a55deb1SDavid E. O'Brien	some kinds of self-assignment. (in assign().)
7982a55deb1SDavid E. O'Brien
7992a55deb1SDavid E. O'BrienAug 24, 1990:
8002a55deb1SDavid E. O'Brien	changed NCHARS to 256 to handle 8-bit characters in strings
8012a55deb1SDavid E. O'Brien	presented to match(), etc.
8022a55deb1SDavid E. O'Brien
8032a55deb1SDavid E. O'BrienJun 26, 1990:
8042a55deb1SDavid E. O'Brien	changed struct rrow (awk.h) to use long instead of int for lval,
8052a55deb1SDavid E. O'Brien	since cfoll() stores a pointer in it.  now works better when int's
8062a55deb1SDavid E. O'Brien	are smaller than pointers!
8072a55deb1SDavid E. O'Brien
8082a55deb1SDavid E. O'BrienMay 6, 1990:
8092a55deb1SDavid E. O'Brien	AVA fixed the grammar so that ! is uniformly of the same precedence as
8102a55deb1SDavid E. O'Brien	unary + and -.  This renders illegal some constructs like !x=y, which
8112a55deb1SDavid E. O'Brien	now has to be parenthesized as !(x=y), and makes others work properly:
8122a55deb1SDavid E. O'Brien	!x+y is (!x)+y, and x!y is x !y, not two pattern-action statements.
8132a55deb1SDavid E. O'Brien	(These problems were pointed out by Bob Lenk of Posix.)
8142a55deb1SDavid E. O'Brien
8152a55deb1SDavid E. O'Brien	Added \x to regular expressions (already in strings).
8162a55deb1SDavid E. O'Brien	Limited octal to octal digits; \8 and \9 are not octal.
8172a55deb1SDavid E. O'Brien	Centralized the code for parsing escapes in regular expressions.
8182a55deb1SDavid E. O'Brien	Added a bunch of tests to T.re and T.sub to verify some of this.
8192a55deb1SDavid E. O'Brien
8202a55deb1SDavid E. O'BrienFeb 9, 1990:
8212a55deb1SDavid E. O'Brien	fixed null pointer dereference bug in main.c:  -F[nothing].  sigh.
8222a55deb1SDavid E. O'Brien
8232a55deb1SDavid E. O'Brien	restored srand behavior:  it returns the current seed.
8242a55deb1SDavid E. O'Brien
8252a55deb1SDavid E. O'BrienJan 18, 1990:
8262a55deb1SDavid E. O'Brien	srand now returns previous seed value (0 to start).
8272a55deb1SDavid E. O'Brien
8282a55deb1SDavid E. O'BrienJan 5, 1990:
8292a55deb1SDavid E. O'Brien	fix potential problem in tran.c -- something was freed,
8302a55deb1SDavid E. O'Brien	then used in freesymtab.
8312a55deb1SDavid E. O'Brien
8322a55deb1SDavid E. O'BrienOct 18, 1989:
8332a55deb1SDavid E. O'Brien	another try to get the max number of open files set with
8342a55deb1SDavid E. O'Brien	relatively machine-independent code.
8352a55deb1SDavid E. O'Brien
8362a55deb1SDavid E. O'Brien	small fix to input() in case of multiple reads after EOF.
8372a55deb1SDavid E. O'Brien
8382a55deb1SDavid E. O'BrienOct 11, 1989:
8392a55deb1SDavid E. O'Brien	FILENAME is now defined in the BEGIN block -- too many old
8402a55deb1SDavid E. O'Brien	programs broke.
8412a55deb1SDavid E. O'Brien
8422a55deb1SDavid E. O'Brien	"-" means stdin in getline as well as on the commandline.
8432a55deb1SDavid E. O'Brien
8442a55deb1SDavid E. O'Brien	added a bunch of casts to the code to tell the truth about
8452a55deb1SDavid E. O'Brien	char * vs. unsigned char *, a right royal pain.  added a
8462a55deb1SDavid E. O'Brien	setlocale call to the front of main, though probably no one
8472a55deb1SDavid E. O'Brien	has it usefully implemented yet.
8482a55deb1SDavid E. O'Brien
8492a55deb1SDavid E. O'BrienAug 24, 1989:
8502a55deb1SDavid E. O'Brien	removed redundant relational tests against nullnode if parse
8512a55deb1SDavid E. O'Brien	tree already had a relational at that point.
8522a55deb1SDavid E. O'Brien
8532a55deb1SDavid E. O'BrienAug 11, 1989:
8542a55deb1SDavid E. O'Brien	fixed bug:  commandline variable assignment has to look like
8552a55deb1SDavid E. O'Brien	var=something.  (consider the man page for =, in file =.1)
8562a55deb1SDavid E. O'Brien
8572a55deb1SDavid E. O'Brien	changed number of arguments to functions to static arrays
8582a55deb1SDavid E. O'Brien	to avoid repeated malloc calls.
8592a55deb1SDavid E. O'Brien
8602a55deb1SDavid E. O'BrienAug 2, 1989:
8612a55deb1SDavid E. O'Brien	restored -F (space) separator
8622a55deb1SDavid E. O'Brien
8632a55deb1SDavid E. O'BrienJul 30, 1989:
8642a55deb1SDavid E. O'Brien	added -v x=1 y=2 ... for immediate commandline variable assignment;
8652a55deb1SDavid E. O'Brien	done before the BEGIN block for sure.  they have to precede the
8662a55deb1SDavid E. O'Brien	program if the program is on the commandline.
8672a55deb1SDavid E. O'Brien	Modified Aug 2 to require a separate -v for each assignment.
8682a55deb1SDavid E. O'Brien
8692a55deb1SDavid E. O'BrienJul 10, 1989:
8702a55deb1SDavid E. O'Brien	fixed ref-thru-zero bug in environment code in tran.c
8712a55deb1SDavid E. O'Brien
8722a55deb1SDavid E. O'BrienJun 23, 1989:
8732a55deb1SDavid E. O'Brien	add newline to usage message.
8742a55deb1SDavid E. O'Brien
8752a55deb1SDavid E. O'BrienJun 14, 1989:
8762a55deb1SDavid E. O'Brien	added some missing ansi printf conversion letters: %i %X %E %G.
8772a55deb1SDavid E. O'Brien	no sensible meaning for h or L, so they may not do what one expects.
8782a55deb1SDavid E. O'Brien
8792a55deb1SDavid E. O'Brien	made %* conversions work.
8802a55deb1SDavid E. O'Brien
8812a55deb1SDavid E. O'Brien	changed x^y so that if n is a positive integer, it's done
8822a55deb1SDavid E. O'Brien	by explicit multiplication, thus achieving maximum accuracy.
8832a55deb1SDavid E. O'Brien	(this should be done by pow() but it seems not to be locally.)
8842a55deb1SDavid E. O'Brien	done to x ^= y as well.
8852a55deb1SDavid E. O'Brien
8862a55deb1SDavid E. O'BrienJun 4, 1989:
8872a55deb1SDavid E. O'Brien	ENVIRON array contains environment: if shell variable V=thing,
8882a55deb1SDavid E. O'Brien		ENVIRON["V"] is "thing"
8892a55deb1SDavid E. O'Brien
8902a55deb1SDavid E. O'Brien	multiple -f arguments permitted.  error reporting is naive.
8912a55deb1SDavid E. O'Brien	(they were permitted before, but only the last was used.)
8922a55deb1SDavid E. O'Brien
8932a55deb1SDavid E. O'Brien	fixed a really stupid botch in the debugging macro dprintf
8942a55deb1SDavid E. O'Brien
8952a55deb1SDavid E. O'Brien	fixed order of evaluation of commandline assignments to match
8962a55deb1SDavid E. O'Brien	what the book claims:  an argument of the form x=e is evaluated
8972a55deb1SDavid E. O'Brien	at the time it would have been opened if it were a filename (p 63).
8982a55deb1SDavid E. O'Brien	this invalidates the suggested answer to ex 4-1 (p 195).
8992a55deb1SDavid E. O'Brien
9002a55deb1SDavid E. O'Brien	removed some code that permitted -F (space) fieldseparator,
9012a55deb1SDavid E. O'Brien	since it didn't quite work right anyway.  (restored aug 2)
9022a55deb1SDavid E. O'Brien
9032a55deb1SDavid E. O'BrienApr 27, 1989:
9042a55deb1SDavid E. O'Brien	Line number now accumulated correctly for comment lines.
9052a55deb1SDavid E. O'Brien
9062a55deb1SDavid E. O'BrienApr 26, 1989:
9072a55deb1SDavid E. O'Brien	Debugging output now includes a version date,
9082a55deb1SDavid E. O'Brien	if one compiles it into the source each time.
9092a55deb1SDavid E. O'Brien
9102a55deb1SDavid E. O'BrienApr 9, 1989:
9112a55deb1SDavid E. O'Brien	Changed grammar to prohibit constants as 3rd arg of sub and gsub;
9122a55deb1SDavid E. O'Brien	prevents class of overwriting-a-constant errors.  (Last one?)
9132a55deb1SDavid E. O'Brien	This invalidates the "banana" example on page 43 of the book.
9142a55deb1SDavid E. O'Brien
9152a55deb1SDavid E. O'Brien	Added \a ("alert"), \v (vertical tab), \xhhh (hexadecimal),
9162a55deb1SDavid E. O'Brien	as in ANSI, for strings.  Rescinded the sloppiness that permitted
9172a55deb1SDavid E. O'Brien	non-octal digits in \ooo.  Warning:  not all compilers and libraries
9182a55deb1SDavid E. O'Brien	will be able to deal with \x correctly.
9192a55deb1SDavid E. O'Brien
9202a55deb1SDavid E. O'BrienJan 9, 1989:
9212a55deb1SDavid E. O'Brien	Fixed bug that caused tempcell list to contain a duplicate.
9222a55deb1SDavid E. O'Brien	The fix is kludgy.
9232a55deb1SDavid E. O'Brien
9242a55deb1SDavid E. O'BrienDec 17, 1988:
9252a55deb1SDavid E. O'Brien	Catches some more commandline errors in main.
9262a55deb1SDavid E. O'Brien	Removed redundant decl of modf in run.c (confuses some compilers).
9272a55deb1SDavid E. O'Brien	Warning:  there's no single declaration of malloc, etc., in awk.h
9282a55deb1SDavid E. O'Brien	that seems to satisfy all compilers.
9292a55deb1SDavid E. O'Brien
9302a55deb1SDavid E. O'BrienDec 7, 1988:
9312a55deb1SDavid E. O'Brien	Added a bit of code to error printing to avoid printing nulls.
9322a55deb1SDavid E. O'Brien	(Not clear that it actually would.)
9332a55deb1SDavid E. O'Brien
9342a55deb1SDavid E. O'BrienNov 27, 1988:
9352a55deb1SDavid E. O'Brien	With fear and trembling, modified the grammar to permit
9362a55deb1SDavid E. O'Brien	multiple pattern-action statements on one line without
9372a55deb1SDavid E. O'Brien	an explicit separator.  By definition, this capitulation
9382a55deb1SDavid E. O'Brien	to the ghost of ancient implementations remains undefined
9392a55deb1SDavid E. O'Brien	and thus subject to change without notice or apology.
9402a55deb1SDavid E. O'Brien	DO NOT COUNT ON IT.
9412a55deb1SDavid E. O'Brien
9422a55deb1SDavid E. O'BrienOct 30, 1988:
9432a55deb1SDavid E. O'Brien	Fixed bug in call() that failed to recover storage.
9442a55deb1SDavid E. O'Brien
9452a55deb1SDavid E. O'Brien	A warning is now generated if there are more arguments
9462a55deb1SDavid E. O'Brien	in the call than in the definition (in lieu of fixing
9472a55deb1SDavid E. O'Brien	another storage leak).
9482a55deb1SDavid E. O'Brien
9492a55deb1SDavid E. O'BrienOct 20, 1988:
9502a55deb1SDavid E. O'Brien	Fixed %c:  if expr is numeric, use numeric value;
9512a55deb1SDavid E. O'Brien	otherwise print 1st char of string value.  still
9522a55deb1SDavid E. O'Brien	doesn't work if the value is 0 -- won't print \0.
9532a55deb1SDavid E. O'Brien
9542a55deb1SDavid E. O'Brien	Added a few more checks for running out of malloc.
9552a55deb1SDavid E. O'Brien
9562a55deb1SDavid E. O'BrienOct 12, 1988:
9572a55deb1SDavid E. O'Brien	Fixed bug in call() that freed local arrays twice.
9582a55deb1SDavid E. O'Brien
9592a55deb1SDavid E. O'Brien	Fixed to handle deletion of non-existent array right;
9602a55deb1SDavid E. O'Brien	complains about attempt to delete non-array element.
9612a55deb1SDavid E. O'Brien
9622a55deb1SDavid E. O'BrienSep 30, 1988:
9632a55deb1SDavid E. O'Brien	Now guarantees to evaluate all arguments of built-in
9642a55deb1SDavid E. O'Brien	functions, as in C;  the appearance is that arguments
9652a55deb1SDavid E. O'Brien	are evaluated before the function is called.  Places
9662a55deb1SDavid E. O'Brien	affected are sub (gsub was ok), substr, printf, and
9672a55deb1SDavid E. O'Brien	all the built-in arithmetic functions in bltin().
9682a55deb1SDavid E. O'Brien	A warning is generated if a bltin() is called with
9692a55deb1SDavid E. O'Brien	the wrong number of arguments.
9702a55deb1SDavid E. O'Brien
9712a55deb1SDavid E. O'Brien	This requires changing makeprof on p167 of the book.
9722a55deb1SDavid E. O'Brien
9732a55deb1SDavid E. O'BrienAug 23, 1988:
9742a55deb1SDavid E. O'Brien	setting FILENAME in BEGIN caused core dump, apparently
9752a55deb1SDavid E. O'Brien	because it was freeing space not allocated by malloc.
9762a55deb1SDavid E. O'Brien
9772a55deb1SDavid E. O'BrienJuly 24, 1988:
9782a55deb1SDavid E. O'Brien	fixed egregious error in toupper/tolower functions.
9792a55deb1SDavid E. O'Brien	still subject to rescinding, however.
9802a55deb1SDavid E. O'Brien
9812a55deb1SDavid E. O'BrienJuly 2, 1988:
9822a55deb1SDavid E. O'Brien	flush stdout before opening file or pipe
9832a55deb1SDavid E. O'Brien
9842a55deb1SDavid E. O'BrienJuly 2, 1988:
9852a55deb1SDavid E. O'Brien	performance bug in b.c/cgoto(): not freeing some sets of states.
9862a55deb1SDavid E. O'Brien	partial fix only right now, and the number of states increased
9872a55deb1SDavid E. O'Brien	to make it less obvious.
9882a55deb1SDavid E. O'Brien
9892a55deb1SDavid E. O'BrienJune 1, 1988:
9902a55deb1SDavid E. O'Brien	check error status on close
9912a55deb1SDavid E. O'Brien
9922a55deb1SDavid E. O'BrienMay 28, 1988:
9932a55deb1SDavid E. O'Brien	srand returns seed value it's using.
9942a55deb1SDavid E. O'Brien	see 1/18/90
9952a55deb1SDavid E. O'Brien
9962a55deb1SDavid E. O'BrienMay 22, 1988:
9972a55deb1SDavid E. O'Brien	Removed limit on depth of function calls.
9982a55deb1SDavid E. O'Brien
9992a55deb1SDavid E. O'BrienMay 10, 1988:
10002a55deb1SDavid E. O'Brien	Fixed lib.c to permit _ in commandline variable names.
10012a55deb1SDavid E. O'Brien
10022a55deb1SDavid E. O'BrienMar 25, 1988:
10032a55deb1SDavid E. O'Brien	main.c fixed to recognize -- as terminator of command-
10042a55deb1SDavid E. O'Brien	line options.  Illegal options flagged.
10052a55deb1SDavid E. O'Brien	Error reporting slightly cleaned up.
10062a55deb1SDavid E. O'Brien
10072a55deb1SDavid E. O'BrienDec 2, 1987:
10082a55deb1SDavid E. O'Brien	Newer C compilers apply a strict scope rule to extern
10092a55deb1SDavid E. O'Brien	declarations within functions.  Two extern declarations in
10102a55deb1SDavid E. O'Brien	lib.c and tran.c have been moved to obviate this problem.
10112a55deb1SDavid E. O'Brien
10122a55deb1SDavid E. O'BrienOct xx, 1987:
10132a55deb1SDavid E. O'Brien	Reluctantly added toupper and tolower functions.
10142a55deb1SDavid E. O'Brien	Subject to rescinding without notice.
10152a55deb1SDavid E. O'Brien
10162a55deb1SDavid E. O'BrienSep 17, 1987:
10172a55deb1SDavid E. O'Brien	Error-message printer had printf(s) instead of
10182a55deb1SDavid E. O'Brien	printf("%s",s);  got core dumps when the message
10192a55deb1SDavid E. O'Brien	included a %.
10202a55deb1SDavid E. O'Brien
10212a55deb1SDavid E. O'BrienSep 12, 1987:
10222a55deb1SDavid E. O'Brien	Very long printf strings caused core dump;
10232a55deb1SDavid E. O'Brien	fixed aprintf, asprintf, format to catch them.
10242a55deb1SDavid E. O'Brien	Can still get a core dump in printf itself.
10252a55deb1SDavid E. O'Brien
10262a55deb1SDavid E. O'Brien
1027