xref: /freebsd/contrib/one-true-awk/FIXES (revision f39dd6a9784467f0db5886012b3f4b13899be6b8)
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*f39dd6a9SWarner LoshFebruary 15, 2021:
29*f39dd6a9SWarner Losh	Small fix so that awk will compile again with g++. Thanks to
30*f39dd6a9SWarner Losh	Arnold Robbins.
31*f39dd6a9SWarner Losh
32*f39dd6a9SWarner LoshJanuary 06, 2021:
33*f39dd6a9SWarner Losh	Fix a decision bug with trailing stuff in lib.c:is_valid_number
34*f39dd6a9SWarner Losh	after recent changes. Thanks to Ozan Yigit.
35*f39dd6a9SWarner Losh
36*f39dd6a9SWarner LoshDecember 18, 2020:
37*f39dd6a9SWarner Losh	Fix problems converting inf and NaN values in lib.c:is_valid_number.
38*f39dd6a9SWarner Losh	Enhance number to string conversion to do the right thing for
39*f39dd6a9SWarner Losh	NaN and inf values.  Things are now pretty much the same as in
40*f39dd6a9SWarner Losh	gawk.  (Found a gawk bug while we're at it.) Added a torture
41*f39dd6a9SWarner Losh	test for these values.  Thanks to Arnold Robbins.  Allows closing
42*f39dd6a9SWarner Losh	of PR #101.
43*f39dd6a9SWarner Losh
44*f39dd6a9SWarner LoshDecember 15, 2020:
45*f39dd6a9SWarner Losh	Merge PR #99, which gets the right header for strcasecmp.
46*f39dd6a9SWarner Losh	Thanks to GitHub user michaelforney.
47*f39dd6a9SWarner Losh
48*f39dd6a9SWarner LoshDecember 8, 2020:
49*f39dd6a9SWarner Losh	Merge PR #98: Disallow hex data. Allow only +nan, -nan,
50*f39dd6a9SWarner Losh	+inf, -inf (case independent) to give NaN and infinity values.
51*f39dd6a9SWarner Losh	Improve things so that string to double conversion is only
52*f39dd6a9SWarner Losh	done once, yielding something of a speedup.  This obviate
53*f39dd6a9SWarner Losh	PR #95. Thanks to Arnold Robbins.
54*f39dd6a9SWarner Losh
55*f39dd6a9SWarner LoshDecember 3, 2020:
56*f39dd6a9SWarner Losh	Fix to argument parsing to avoid printing spurious newlines.
57*f39dd6a9SWarner Losh	Thanks to Todd Miller. Merges PR #97.
58*f39dd6a9SWarner Losh
59*f39dd6a9SWarner LoshOctober 13, 2020:
60*f39dd6a9SWarner Losh	Add casts before all the calls to malloc/calloc/realloc in order
61*f39dd6a9SWarner Losh	to get it to compile with g++. Thanks to Arnold Robbins.
62*f39dd6a9SWarner Losh
63*f39dd6a9SWarner LoshAugust 16, 2020:
64*f39dd6a9SWarner Losh	Additional fixes for DJGPP. Thanks to Eli Zaretskii for
65*f39dd6a9SWarner Losh	the testing.
66*f39dd6a9SWarner Losh
67*f39dd6a9SWarner LoshAugust 7, 2020:
68*f39dd6a9SWarner Losh	Merge PR #93, which adds casts to (void*) for debug prints
69*f39dd6a9SWarner Losh	using the %p format specifier. Thanks to GitHub user YongHaoWu
70*f39dd6a9SWarner Losh	("Chris") for the fixes.
71*f39dd6a9SWarner Losh
72*f39dd6a9SWarner LoshAugust 4, 2020:
73*f39dd6a9SWarner Losh	In run.c, use non-restartable multibyte routines to attain
74*f39dd6a9SWarner Losh	portability to DJGPP. Should fix Issue 92. Thanks to Albert Wik
75*f39dd6a9SWarner Losh	for the report and to Todd Miller for the suggested fix.
76*f39dd6a9SWarner Losh
77*f39dd6a9SWarner LoshJuly 30, 2020:
78*f39dd6a9SWarner Losh	Merge PRs 88-91 which fix small bugs. Thanks to Todd Miller and
79*f39dd6a9SWarner Losh	Tim van der Molen for the fixes.
80*f39dd6a9SWarner Losh
81*f39dd6a9SWarner Losh	In order to make life easier, we move exclusively to bison
82*f39dd6a9SWarner Losh	as the parser generator.
83*f39dd6a9SWarner Losh
84*f39dd6a9SWarner LoshJuly 2, 2020:
85*f39dd6a9SWarner Losh	Merge PRs 85 and 86 which fix regressions. Thanks to
86*f39dd6a9SWarner Losh	Tim van der Molen for the fixes.
87*f39dd6a9SWarner Losh
88*f39dd6a9SWarner LoshJune 25, 2020:
89*f39dd6a9SWarner Losh	Merge PRs 82 and 84. The latter fixes issue #83. Thanks to
90*f39dd6a9SWarner Losh	Todd Miller and awkfan77.
91*f39dd6a9SWarner Losh
92*f39dd6a9SWarner LoshJune 12, 2020:
93*f39dd6a9SWarner Losh	Clear errno before calling errcheck to avoid any spurious errors
94*f39dd6a9SWarner Losh	left over from previous calls that may have set it. Thanks to
95*f39dd6a9SWarner Losh	Todd Miller for the fix, from PR #80.
96*f39dd6a9SWarner Losh
97*f39dd6a9SWarner Losh	Fix Issue #78 by allowing \r to follow floating point numbers in
98*f39dd6a9SWarner Losh	lib.c:is_number. Thanks to GitHub user ajcarr for the report
99*f39dd6a9SWarner Losh	and to Arnold Robbins for the fix.
100*f39dd6a9SWarner Losh
101*f39dd6a9SWarner LoshJune 5, 2020:
102*f39dd6a9SWarner Losh	In fldbld(), make sure that inputFS is set before trying to
103*f39dd6a9SWarner Losh	use it. Thanks to  Steffen Nurpmeso <steffen@sdaoden.eu>
104*f39dd6a9SWarner Losh	for the report.
105*f39dd6a9SWarner Losh
106*f39dd6a9SWarner LoshMay 5, 2020:
107*f39dd6a9SWarner Losh	Fix checks for compilers that can handle noreturn. Thanks to
108*f39dd6a9SWarner Losh	GitHub user enh-google for pointing it out. Closes Issue #79.
109*f39dd6a9SWarner Losh
110*f39dd6a9SWarner LoshApril 16, 2020:
111*f39dd6a9SWarner Losh	Handle old compilers that don't support C11 (for noreturn).
112*f39dd6a9SWarner Losh	Thanks to Arnold Robbins.
113*f39dd6a9SWarner Losh
114*f39dd6a9SWarner LoshApril 5, 2020:
115*f39dd6a9SWarner Losh	Use <stdnoreturn.h> and noreturn instead of GCC attributes.
116*f39dd6a9SWarner Losh	Thanks to GitHub user awkfan77. Closes PR #77.
117*f39dd6a9SWarner Losh
118*f39dd6a9SWarner LoshFebruary 28, 2020:
119*f39dd6a9SWarner Losh	More cleanups from Christos Zoulas: notably backslash continuation
120*f39dd6a9SWarner Losh	inside strings removes the newline and a fix for RS = "^a".
121*f39dd6a9SWarner Losh	Fix for address sanitizer-found problem. Thanks to GitHub user
122*f39dd6a9SWarner Losh	enh-google.
123*f39dd6a9SWarner Losh
124*f39dd6a9SWarner LoshFebruary 19, 2020:
125*f39dd6a9SWarner Losh	More small cleanups from Christos Zoulas.
126*f39dd6a9SWarner Losh
127*f39dd6a9SWarner LoshFebruary 18, 2020:
128*f39dd6a9SWarner Losh	Additional cleanups from Christos Zoulas. It's no longer necessary
129*f39dd6a9SWarner Losh	to use the -y flag to bison.
130*f39dd6a9SWarner Losh
131*f39dd6a9SWarner LoshFebruary 6, 2020:
132*f39dd6a9SWarner Losh	Additional small cleanups from Christos Zoulas. awk is now
133*f39dd6a9SWarner Losh	a little more robust about reporting I/O errors upon exit.
134*f39dd6a9SWarner Losh
135*f39dd6a9SWarner LoshJanuary 31, 2020:
136*f39dd6a9SWarner Losh	Merge PR #70, which avoids use of variable length arrays. Thanks
137*f39dd6a9SWarner Losh	to GitHub user michaelforney.  Fix issue #60 ({0} in interval
138*f39dd6a9SWarner Losh	expressions doesn't work).  Also get all tests working again.
139*f39dd6a9SWarner Losh	Thanks to Arnold Robbins.
140*f39dd6a9SWarner Losh
141*f39dd6a9SWarner LoshJanuary 24, 2020:
142*f39dd6a9SWarner Losh	A number of small cleanups from Christos Zoulas.  Add the close
143*f39dd6a9SWarner Losh	on exec flag to files/pipes opened for redirection; courtesy of
144*f39dd6a9SWarner Losh	Arnold Robbins.
145*f39dd6a9SWarner Losh
146*f39dd6a9SWarner LoshJanuary 19, 2020:
147*f39dd6a9SWarner Losh	If POSIXLY_CORRECT is set in the environment, then sub and gsub
148*f39dd6a9SWarner Losh	use POSIX rules for multiple backslashes.  This fixes Issue #66,
149*f39dd6a9SWarner Losh	while maintaining backwards compatibility.
150*f39dd6a9SWarner Losh
151*f39dd6a9SWarner LoshJanuary 9, 2020:
152*f39dd6a9SWarner Losh	Input/output errors on closing files are now fatal instead of
153*f39dd6a9SWarner Losh	mere warnings. Thanks to Martijn Dekker <martijn@inlv.org>.
154*f39dd6a9SWarner Losh
155*f39dd6a9SWarner LoshJanuary 5, 2020:
156*f39dd6a9SWarner Losh	Fix a bug in the concatentation of two string constants into
157*f39dd6a9SWarner Losh	one done in the grammar.  Fixes GitHub issue #61.  Thanks
158*f39dd6a9SWarner Losh	to GitHub user awkfan77 for pointing out the direction for
159*f39dd6a9SWarner Losh	the fix.  New test T.concat added to the test suite.
160*f39dd6a9SWarner Losh	Fix a few memory leaks reported by valgrind, as well.
161*f39dd6a9SWarner Losh
162*f39dd6a9SWarner LoshDecember 27, 2019:
163*f39dd6a9SWarner Losh	Fix a bug whereby a{0,3} could match four a's.  Thanks to
164*f39dd6a9SWarner Losh	"Anonymous AWK fan" for the report.
165*f39dd6a9SWarner Losh
166*f39dd6a9SWarner LoshDecember 11, 2019:
167*f39dd6a9SWarner Losh	Further printf-related fixes for 32 bit systems.
168*f39dd6a9SWarner Losh	Thanks again to Christos Zoulas.
169*f39dd6a9SWarner Losh
170*f39dd6a9SWarner LoshDecember 8, 2019:
171*f39dd6a9SWarner Losh	Fix the return value of sprintf("%d") on 32 bit systems.
172*f39dd6a9SWarner Losh	Thanks to Jim Lowe for the report and to Christos Zoulas
173*f39dd6a9SWarner Losh	for the fix.
174*f39dd6a9SWarner Losh
175*f39dd6a9SWarner LoshNovember 10, 2019:
176*f39dd6a9SWarner Losh	Convert a number of Boolean integer variables into
177*f39dd6a9SWarner Losh	actual bools. Convert compile_time variable into an
178*f39dd6a9SWarner Losh	enum and simplify some of the related code.  Thanks
179*f39dd6a9SWarner Losh	to Arnold Robbins.
180*f39dd6a9SWarner Losh
181*f39dd6a9SWarner LoshNovember 8, 2019:
182*f39dd6a9SWarner Losh	Fix from Ori Bernstein to get UTF-8 characters instead of
183*f39dd6a9SWarner Losh	bytes when FS = "".  This is currently the only bit of
184*f39dd6a9SWarner Losh	the One True Awk that understands multibyte characters.
185*f39dd6a9SWarner Losh	From Arnold Robbins, apply some cleanups in the test suite.
186*f39dd6a9SWarner Losh
187*f39dd6a9SWarner LoshOctober 25, 2019:
188*f39dd6a9SWarner Losh	More fixes and cleanups from NetBSD, courtesy of Christos
189*f39dd6a9SWarner Losh	Zoulas. Merges PRs 54 and 55.
190*f39dd6a9SWarner Losh
191*f39dd6a9SWarner LoshOctober 24, 2019:
192*f39dd6a9SWarner Losh	Import second round of code cleanups from NetBSD. Much thanks
193*f39dd6a9SWarner Losh	to Christos Zoulas (GitHub user zoulasc). Merges PR 53.
194*f39dd6a9SWarner Losh	Add an optimization for string concatenation, also from
195*f39dd6a9SWarner Losh	Christos.
196*f39dd6a9SWarner Losh
197*f39dd6a9SWarner LoshOctober 17, 2019:
198*f39dd6a9SWarner Losh	Import code cleanups from NetBSD. Much thanks to Christos
199*f39dd6a9SWarner Losh	Zoulas (GitHub user zoulasc). Merges PR 51.
200*f39dd6a9SWarner Losh
201*f39dd6a9SWarner LoshOctober 6, 2019:
202*f39dd6a9SWarner Losh	Import code from NetBSD awk that implements RS as a regular
203*f39dd6a9SWarner Losh	expression.
204*f39dd6a9SWarner Losh
205*f39dd6a9SWarner LoshSeptember 10, 2019:
206*f39dd6a9SWarner Losh	Fixes for various array / memory overruns found via gcc's
207*f39dd6a9SWarner Losh	-fsanitize=unknown. Thanks to Alexander Richardson (GitHub
208*f39dd6a9SWarner Losh	user arichardson). Merges PRs 47 and 48.
209*f39dd6a9SWarner Losh
210*f39dd6a9SWarner LoshJuly 28, 2019:
211*f39dd6a9SWarner Losh	Import grammar optimization from NetBSD: Two string constants
212*f39dd6a9SWarner Losh	concatenated together get turned into a single string.
213*f39dd6a9SWarner Losh
214*f39dd6a9SWarner LoshJuly 26, 2019:
215*f39dd6a9SWarner Losh	Support POSIX-specified C-style escape sequences "\a" (alarm)
216*f39dd6a9SWarner Losh	and "\v" (vertical tab) in command line arguments and regular
217*f39dd6a9SWarner Losh	expressions, further to the support for them in strings added on
218*f39dd6a9SWarner Losh	Apr 9, 1989. These now no longer match as literal "a" and "v"
219*f39dd6a9SWarner Losh	characters (as they don't on other awk implementations).
220*f39dd6a9SWarner Losh	Thanks to Martijn Dekker.
221*f39dd6a9SWarner Losh
222*f39dd6a9SWarner LoshJuly 17, 2019:
223*f39dd6a9SWarner Losh	Pull in a number of code cleanups and minor fixes from
224*f39dd6a9SWarner Losh	Warner Losh's bsd-ota branch.  The only user visible change
225*f39dd6a9SWarner Losh	is the use of random(3) as the random number generator.
226*f39dd6a9SWarner Losh	Thanks to Warner Losh for collecting all these fixes in
227*f39dd6a9SWarner Losh	one easy place to get them from.
228*f39dd6a9SWarner Losh
229*f39dd6a9SWarner LoshJuly 16, 2019:
230*f39dd6a9SWarner Losh	Fix field splitting to use FS value as of the time a record
231*f39dd6a9SWarner Losh	was read or assigned to.  Thanks to GitHub user Cody Mello (melloc)
232*f39dd6a9SWarner Losh	for the fix. (Merged from his branch, via PR #42.) Updated
233*f39dd6a9SWarner Losh	testdir/T.split per said PR as well.
234*f39dd6a9SWarner Losh
235*f39dd6a9SWarner LoshJune 24, 2019:
236*f39dd6a9SWarner Losh	Extract awktest.tar into testdir directory. Add some very
237*f39dd6a9SWarner Losh	simple mechanics to the makefile for running the tests and
238*f39dd6a9SWarner Losh	for cleaning up. No changes to awk itself.
239*f39dd6a9SWarner Losh
240*f39dd6a9SWarner LoshJune 17, 2019:
241*f39dd6a9SWarner Losh	Disallow deleting SYMTAB and its elements, which creates
242*f39dd6a9SWarner Losh	use-after-free bugs. Thanks to GitHub user Cody Mello (melloc)
243*f39dd6a9SWarner Losh	for the fix. (Merged from PR #43.)
244*f39dd6a9SWarner Losh
245*f39dd6a9SWarner LoshJune 5, 2019:
246*f39dd6a9SWarner Losh	Allow unmatched right parenthesis in a regular expression to
247*f39dd6a9SWarner Losh	be treated literally. Fixes Issue #40. Thanks to GitHub user
248*f39dd6a9SWarner Losh	Warner Losh (bsdimp) for the report. Thanks to Arnold Robbins
249*f39dd6a9SWarner Losh	for the fix.
250*f39dd6a9SWarner Losh
251b5253557SWarner LoshMay 29,2019:
252b5253557SWarner Losh	Fix check for command line arguments to no longer require that
253b5253557SWarner Losh	first character after '=' not be another '='. Reverts change of
254b5253557SWarner Losh	August 11, 1989. Thanks to GitHub user Jamie Landeg Jones for
255b5253557SWarner Losh	pointing out the issue; from Issue #38.
256b5253557SWarner Losh
257b5253557SWarner LoshApr 7, 2019:
258b5253557SWarner Losh	Update awktest.tar(p.50) to use modern options to sort. Needed
259b5253557SWarner Losh	for Android development. Thanks to GitHub user mohd-akram (Mohamed
260*f39dd6a9SWarner Losh	Akram).  From Issue #33.
261b5253557SWarner Losh
262b5253557SWarner LoshMar 12, 2019:
263b5253557SWarner Losh	Added very simplistic support for cross-compiling in the
264b5253557SWarner Losh	makefile.  We are NOT going to go in the direction of the
265b5253557SWarner Losh	autotools, though.  Thanks to GitHub user nee-san for
266b5253557SWarner Losh	the basic change. (Merged from PR #34.)
267b5253557SWarner Losh
268b5253557SWarner LoshMar 5, 2019:
269b5253557SWarner Losh	Added support for POSIX-standard interval expressions (a.k.a.
270b5253557SWarner Losh	bounds, a.k.a. repetition expressions) in regular expressions,
271b5253557SWarner Losh	backported (via NetBSD) from Apple awk-24 (20070501).
272b5253557SWarner Losh	Thanks to Martijn Dekker <martijn@inlv.org> for the port.
273b5253557SWarner Losh	(Merged from PR #30.)
274b5253557SWarner Losh
275b5253557SWarner LoshMar 3, 2019:
276b5253557SWarner Losh	Merge PRs as follows:
277b5253557SWarner Losh	#12: Avoid undefined behaviour when using ctype(3) functions in
278b5253557SWarner Losh	     relex(). Thanks to GitHub user iamleot.
279b5253557SWarner Losh	#31: Make getline handle numeric strings, and update FIXES. Thanks
280*f39dd6a9SWarner Losh	     to GitHub user arnoldrobbins.
281b5253557SWarner Losh	#32: maketab: support build systems with read-only source. Thanks
282b5253557SWarner Losh	     to GitHub user enh.
283b5253557SWarner Losh
284b5253557SWarner LoshJan 25, 2019:
285b5253557SWarner Losh	Make getline handle numeric strings properly in all cases.
286b5253557SWarner Losh	(Thanks, Arnold.)
287b5253557SWarner Losh
288b5253557SWarner LoshJan 21, 2019:
289b5253557SWarner Losh	Merged a number of small fixes from GitHub pull requests.
290b5253557SWarner Losh	Thanks to GitHub users Arnold Robbins (arnoldrobbins),
291b5253557SWarner Losh	Cody Mello (melloc) and Christoph Junghans (junghans).
292b5253557SWarner Losh	PR numbers: 13-21, 23, 24, 27.
293b5253557SWarner Losh
294b5253557SWarner LoshOct 25, 2018:
295b5253557SWarner Losh	Added test in maketab.c to prevent generating a proctab entry
296b5253557SWarner Losh	for YYSTYPE_IS_DEFINED.  It was harmless but some gcc settings
297b5253557SWarner Losh	generated a warning message.  Thanks to Nan Xiao for report.
298b5253557SWarner Losh
299b5253557SWarner LoshAug 27, 2018:
300b5253557SWarner Losh	Disallow '$' in printf formats; arguments evaluated in order
301b5253557SWarner Losh	and printed in order.
302b5253557SWarner Losh
303b5253557SWarner Losh	Added some casts to silence warnings on debugging printfs.
304b5253557SWarner Losh	(Thanks, Arnold.)
305b5253557SWarner Losh
306b5253557SWarner LoshAug 23, 2018:
307b5253557SWarner Losh        A long list of fixes courtesy of Arnold Robbins,
308b5253557SWarner Losh        to whom profound thanks.
309b5253557SWarner Losh
310b5253557SWarner Losh        1. ofs-rebuild: OFS value used to rebuild the record was incorrect.
311b5253557SWarner Losh        Fixed August 19, 2014. Revised fix August 2018.
312b5253557SWarner Losh
313b5253557SWarner Losh        2. system-status: Instead of a floating-point division by 256, use
314b5253557SWarner Losh        the wait(2) macros to create a reasonable exit status.
315b5253557SWarner Losh        Fixed March 12, 2016.
316b5253557SWarner Losh
317b5253557SWarner Losh        3. space: Use provided xisblank() function instead of ispace() for
318b5253557SWarner Losh        matching [[:blank:]].
319b5253557SWarner Losh
320b5253557SWarner Losh        4. a-format: Add POSIX standard %a and %A to supported formats. Check
321b5253557SWarner Losh        at runtime that this format is available.
322b5253557SWarner Losh
323b5253557SWarner Losh        5. decr-NF: Decrementing NF did not change $0. This is a decades-old
324b5253557SWarner Losh        bug. There are interactions with the old and new value of OFS as well.
325b5253557SWarner Losh        Most of the fix came from the NetBSD awk.
326b5253557SWarner Losh
327b5253557SWarner Losh        6. string-conv: String conversions of scalars were sticky.  Once a
328b5253557SWarner Losh        conversion to string happened, even with OFMT, that value was used until
329b5253557SWarner Losh        a new numeric value was assigned, even if OFMT differed from CONVFMT,
330b5253557SWarner Losh        and also if CONVFMT changed.
331b5253557SWarner Losh
332b5253557SWarner Losh        7. unary-plus: Unary plus on a string constant returned the string.
333b5253557SWarner Losh        Instead, it should convert the value to numeric and give that value.
334b5253557SWarner Losh
335b5253557SWarner Losh	Also added Arnold's tests for these to awktest.tar as T.arnold.
336b5253557SWarner Losh
337b5253557SWarner LoshAug 15, 2018:
338b5253557SWarner Losh	fixed mangled awktest.tar (thanks, Arnold), posted all
339b5253557SWarner Losh	current (very minor) fixes to github / onetrueawk
340b5253557SWarner Losh
341b5253557SWarner LoshJun 7, 2018:
342b5253557SWarner Losh	(yes, a long layoff)
343b5253557SWarner Losh	Updated some broken tests (beebe.tar, T.lilly)
344b5253557SWarner Losh	[thanks to Arnold Robbins]
345b5253557SWarner Losh
346b5253557SWarner LoshMar 26, 2015:
347b5253557SWarner Losh	buffer overflow in error reporting; thanks to tobias ulmer
348b5253557SWarner Losh	and john-mark gurney for spotting it and the fix.
349b5253557SWarner Losh
350b5253557SWarner LoshFeb 4, 2013:
351b5253557SWarner Losh	cleaned up a handful of tests that didn't seem to actually
352b5253557SWarner Losh	test for correct behavior: T.latin1, T.gawk.
353b5253557SWarner Losh
354b5253557SWarner LoshJan 5, 2013:
355b5253557SWarner Losh	added ,NULL initializer to static Cells in run.c; not really
356b5253557SWarner Losh	needed but cleaner.  Thanks to Michael Bombardieri.
357b5253557SWarner Losh
3580840e960SXin LIDec 20, 2012:
3590840e960SXin LI	fiddled makefile to get correct yacc and bison flags.  pick yacc
3600840e960SXin LI	(linux) or bison (mac) as necessary.
3610840e960SXin LI
3620840e960SXin LI	added  __attribute__((__noreturn__)) to a couple of lines in
3630840e960SXin LI	proto.h, to silence someone's enthusiastic checker.
3640840e960SXin LI
3650840e960SXin LI	fixed obscure call by value bug in split(a[1],a) reported on
3660840e960SXin LI	9fans.  the management of temporary values is just a mess; i
3670840e960SXin LI	took a shortcut by making an extra string copy.  thanks
3680840e960SXin LI	to paul patience and arnold robbins for passing it on and for
3690840e960SXin LI	proposed patches.
3700840e960SXin LI
3710840e960SXin LI	tiny fiddle in setfval to eliminate -0 results in T.expr, which
3720840e960SXin LI	has irritated me for 20+ years.
3730840e960SXin LI
374aa0da2e4SRuslan ErmilovAug 10, 2011:
375aa0da2e4SRuslan Ermilov	another fix to avoid core dump with delete(ARGV); again, many thanks
376aa0da2e4SRuslan Ermilov	to ruslan ermilov.
377aa0da2e4SRuslan Ermilov
378d86a0988SRuslan ErmilovAug 7, 2011:
379d86a0988SRuslan Ermilov	split(s, a, //) now behaves the same as split(s, a, "")
380d86a0988SRuslan Ermilov
381d86a0988SRuslan ErmilovJun 12, 2011:
382d86a0988SRuslan Ermilov	/pat/, \n /pat/ {...} is now legal, though bad style to use.
383d86a0988SRuslan Ermilov
384d86a0988SRuslan Ermilov	added checks to new -v code that permits -vnospace; thanks to
385d86a0988SRuslan Ermilov	ruslan ermilov for spotting this and providing the patch.
386d86a0988SRuslan Ermilov
387d86a0988SRuslan Ermilov	removed fixed limit on number of open files; thanks to aleksey
388d86a0988SRuslan Ermilov	cheusov and christos zoulos.
389d86a0988SRuslan Ermilov
390d86a0988SRuslan Ermilov	fixed day 1 bug that resurrected deleted elements of ARGV when
391d86a0988SRuslan Ermilov	used as filenames (in lib.c).
392d86a0988SRuslan Ermilov
393d86a0988SRuslan Ermilov	minor type fiddles to make gcc -Wall -pedantic happier (but not
394d86a0988SRuslan Ermilov	totally so); turned on -fno-strict-aliasing in makefile.
395d86a0988SRuslan Ermilov
396b40501fbSRuslan ErmilovMay 6, 2011:
397b40501fbSRuslan Ermilov	added #ifdef for isblank.
398b40501fbSRuslan Ermilov	now allows -ffoo as well as -f foo arguments.
399b40501fbSRuslan Ermilov	(thanks, ruslan)
400b40501fbSRuslan Ermilov
4011b11b783SRuslan ErmilovMay 1, 2011:
4021b11b783SRuslan Ermilov	after advice from todd miller, kevin lo, ruslan ermilov,
4031b11b783SRuslan Ermilov	and arnold robbins, changed srand() to return the previous
4041b11b783SRuslan Ermilov	seed (which is 1 on the first call of srand).  the seed is
4051b11b783SRuslan Ermilov	an Awkfloat internally though converted to unsigned int to
4061b11b783SRuslan Ermilov	pass to the library srand().  thanks, everyone.
4071b11b783SRuslan Ermilov
4081b11b783SRuslan Ermilov	fixed a subtle (and i hope low-probability) overflow error
4091b11b783SRuslan Ermilov	in fldbld, by adding space for one extra \0.  thanks to
4101b11b783SRuslan Ermilov	robert bassett for spotting this one and providing a fix.
4111b11b783SRuslan Ermilov
4121b11b783SRuslan Ermilov	removed the files related to compilation on windows.  i no
4131b11b783SRuslan Ermilov	longer have anything like a current windows environment, so
4141b11b783SRuslan Ermilov	i can't test any of it.
4151b11b783SRuslan Ermilov
4161b11b783SRuslan ErmilovMay 23, 2010:
4171b11b783SRuslan Ermilov	fixed long-standing overflow bug in run.c; many thanks to
4181b11b783SRuslan Ermilov	nelson beebe for spotting it and providing the fix.
4191b11b783SRuslan Ermilov
4201b11b783SRuslan Ermilov	fixed bug that didn't parse -vd=1 properly; thanks to santiago
4211b11b783SRuslan Ermilov	vila for spotting it.
4221b11b783SRuslan Ermilov
4231b11b783SRuslan ErmilovFeb 8, 2010:
4241b11b783SRuslan Ermilov	i give up.  replaced isblank with isspace in b.c; there are
4251b11b783SRuslan Ermilov	no consistent header files.
4261b11b783SRuslan Ermilov
42791217c1cSRuslan ErmilovNov 26, 2009:
42891217c1cSRuslan Ermilov	fixed a long-standing issue with when FS takes effect.  a
42991217c1cSRuslan Ermilov	change to FS is now noticed immediately for subsequent splits.
43091217c1cSRuslan Ermilov
43191217c1cSRuslan Ermilov	changed the name getline() to awkgetline() to avoid yet another
43291217c1cSRuslan Ermilov	name conflict somewhere.
43391217c1cSRuslan Ermilov
43491217c1cSRuslan ErmilovFeb 11, 2009:
43591217c1cSRuslan Ermilov	temporarily for now defined HAS_ISBLANK, since that seems to
43691217c1cSRuslan Ermilov	be the best way through the thicket.  isblank arrived in C99,
43791217c1cSRuslan Ermilov	but seems to be arriving at different systems at different
43891217c1cSRuslan Ermilov	times.
43991217c1cSRuslan Ermilov
44091217c1cSRuslan ErmilovOct 8, 2008:
44191217c1cSRuslan Ermilov	fixed typo in b.c that set tmpvec wrongly.  no one had ever
44291217c1cSRuslan Ermilov	run into the problem, apparently.  thanks to alistair crooks.
44391217c1cSRuslan Ermilov
444d2f6e492SDavid E. O'BrienOct 23, 2007:
445d2f6e492SDavid E. O'Brien	minor fix in lib.c: increase inputFS to 100, change malloc
446d2f6e492SDavid E. O'Brien	for fields to n+1.
447d2f6e492SDavid E. O'Brien
448d2f6e492SDavid E. O'Brien	fixed memory fault caused by out of order test in setsval.
449d2f6e492SDavid E. O'Brien
450d2f6e492SDavid E. O'Brien	thanks to david o'brien, freebsd, for both fixes.
451d2f6e492SDavid E. O'Brien
452addad6afSRong-En FanMay 1, 2007:
453addad6afSRong-En Fan	fiddle in makefile to fix for BSD make; thanks to igor sobrado.
454addad6afSRong-En Fan
455addad6afSRong-En FanMar 31, 2007:
456addad6afSRong-En Fan	fixed some null pointer refs calling adjbuf.
457addad6afSRong-En Fan
458addad6afSRong-En FanFeb 21, 2007:
459addad6afSRong-En Fan	fixed a bug in matching the null RE in sub and gsub.  thanks to al aho
460addad6afSRong-En Fan	who actually did the fix (in b.c), and to wolfgang seeberg for finding
461addad6afSRong-En Fan	it and providing a very compact test case.
462addad6afSRong-En Fan
463addad6afSRong-En Fan	fixed quotation in b.c; thanks to Hal Pratt and the Princeton Dante
464addad6afSRong-En Fan	Project.
465addad6afSRong-En Fan
466addad6afSRong-En Fan	removed some no-effect asserts in run.c.
467addad6afSRong-En Fan
468addad6afSRong-En Fan	fiddled maketab.c to not complain about bison-generated values.
469addad6afSRong-En Fan
470addad6afSRong-En Fan	removed the obsolete -V argument; fixed --version to print the
471addad6afSRong-En Fan	version and exit.
472addad6afSRong-En Fan
473addad6afSRong-En Fan	fixed wording and an outright error in the usage message; thanks to igor
474addad6afSRong-En Fan	sobrado and jason mcintyre.
475addad6afSRong-En Fan
476addad6afSRong-En Fan	fixed a bug in -d that caused core dump if no program followed.
477addad6afSRong-En Fan
478addad6afSRong-En FanJan 1, 2007:
479addad6afSRong-En Fan	dropped mac.code from makefile; there are few non-MacOSX
480addad6afSRong-En Fan	mac's these days.
481addad6afSRong-En Fan
482addad6afSRong-En FanJan 17, 2006:
483addad6afSRong-En Fan	system() not flagged as unsafe in the unadvertised -safe option.
484addad6afSRong-En Fan	found it while enhancing tests before shipping the ;login: article.
485addad6afSRong-En Fan	practice what you preach.
486addad6afSRong-En Fan
487addad6afSRong-En Fan	removed the 9-years-obsolete -mr and -mf flags.
488addad6afSRong-En Fan
489addad6afSRong-En Fan	added -version and --version options.
490addad6afSRong-En Fan
491addad6afSRong-En Fan	core dump on linux with BEGIN {nextfile}, now fixed.
492addad6afSRong-En Fan
493addad6afSRong-En Fan	removed some #ifdef's in run.c and lex.c that appear to no
494addad6afSRong-En Fan	longer be necessary.
495addad6afSRong-En Fan
496c263f9bfSRuslan ErmilovApr 24, 2005:
497c263f9bfSRuslan Ermilov	modified lib.c so that values of $0 et al are preserved in the END
498c263f9bfSRuslan Ermilov	block, apparently as required by posix.  thanks to havard eidnes
499c263f9bfSRuslan Ermilov	for the report and code.
500c263f9bfSRuslan Ermilov
501c263f9bfSRuslan ErmilovJan 14, 2005:
502c263f9bfSRuslan Ermilov	fixed infinite loop in parsing, originally found by brian tsang.
503c263f9bfSRuslan Ermilov	thanks to arnold robbins for a suggestion that started me
504c263f9bfSRuslan Ermilov	rethinking it.
505c263f9bfSRuslan Ermilov
506c263f9bfSRuslan ErmilovDec 31, 2004:
507c263f9bfSRuslan Ermilov	prevent overflow of -f array in main, head off potential error in
508c263f9bfSRuslan Ermilov	call of SYNTAX(), test malloc return in lib.c, all with thanks to
509c263f9bfSRuslan Ermilov	todd miller.
510c263f9bfSRuslan Ermilov
511c263f9bfSRuslan ErmilovDec 22, 2004:
512c263f9bfSRuslan Ermilov	cranked up size of NCHARS; coverity thinks it can be overrun with
513c263f9bfSRuslan Ermilov	smaller size, and i think that's right.  added some assertions to b.c
514c263f9bfSRuslan Ermilov	to catch places where it might overrun.  the RE code is still fragile.
515c263f9bfSRuslan Ermilov
516c263f9bfSRuslan ErmilovDec 5, 2004:
517c263f9bfSRuslan Ermilov	fixed a couple of overflow problems with ridiculous field numbers:
518c263f9bfSRuslan Ermilov	e.g., print $(2^32-1).  thanks to ruslan ermilov, giorgos keramidas
519c263f9bfSRuslan Ermilov	and david o'brien at freebsd.org for patches.  this really should
520c263f9bfSRuslan Ermilov	be re-done from scratch.
521c263f9bfSRuslan Ermilov
522c263f9bfSRuslan ErmilovNov 21, 2004:
523c263f9bfSRuslan Ermilov	fixed another 25-year-old RE bug, in split.  it's another failure
524c263f9bfSRuslan Ermilov	to (re-)initialize.  thanks to steve fisher for spotting this and
525c263f9bfSRuslan Ermilov	providing a good test case.
526c263f9bfSRuslan Ermilov
52762ebc626SRuslan ErmilovNov 22, 2003:
52862ebc626SRuslan Ermilov	fixed a bug in regular expressions that dates (so help me) from 1977;
52962ebc626SRuslan Ermilov	it's been there from the beginning.  an anchored longest match that
53062ebc626SRuslan Ermilov	was longer than the number of states triggered a failure to initialize
53162ebc626SRuslan Ermilov	the machine properly.  many thanks to moinak ghosh for not only finding
53262ebc626SRuslan Ermilov	this one but for providing a fix, in some of the most mysterious
53362ebc626SRuslan Ermilov	code known to man.
53462ebc626SRuslan Ermilov
53562ebc626SRuslan Ermilov	fixed a storage leak in call() that appears to have been there since
53662ebc626SRuslan Ermilov	1983 or so -- a function without an explicit return that assigns a
53762ebc626SRuslan Ermilov	string to a parameter leaked a Cell.  thanks to moinak ghosh for
53862ebc626SRuslan Ermilov	spotting this very subtle one.
53962ebc626SRuslan Ermilov
54062ebc626SRuslan ErmilovJul 31, 2003:
54162ebc626SRuslan Ermilov	fixed, thanks to andrey chernov and ruslan ermilov, a bug in lex.c
54262ebc626SRuslan Ermilov	that mis-handled the character 255 in input.  (it was being compared
54362ebc626SRuslan Ermilov	to EOF with a signed comparison.)
54462ebc626SRuslan Ermilov
54588b8d487SRuslan ErmilovJul 29, 2003:
54688b8d487SRuslan Ermilov	fixed (i think) the long-standing botch that included the beginning of
54788b8d487SRuslan Ermilov	line state ^ for RE's in the set of valid characters; this led to a
54888b8d487SRuslan Ermilov	variety of odd problems, including failure to properly match certain
54988b8d487SRuslan Ermilov	regular expressions in non-US locales.  thanks to ruslan for keeping
55088b8d487SRuslan Ermilov	at this one.
55188b8d487SRuslan Ermilov
55288b8d487SRuslan ErmilovJul 28, 2003:
55388b8d487SRuslan Ermilov	n-th try at getting internationalization right, with thanks to volker
55488b8d487SRuslan Ermilov	kiefel, arnold robbins and ruslan ermilov for advice, though they
55588b8d487SRuslan Ermilov	should not be blamed for the outcome.  according to posix, "."  is the
55688b8d487SRuslan Ermilov	radix character in programs and command line arguments regardless of
55788b8d487SRuslan Ermilov	the locale; otherwise, the locale should prevail for input and output
55888b8d487SRuslan Ermilov	of numbers.  so it's intended to work that way.
55988b8d487SRuslan Ermilov
56088b8d487SRuslan Ermilov	i have rescinded the attempt to use strcoll in expanding shorthands in
56188b8d487SRuslan Ermilov	regular expressions (cclenter).  its properties are much too
56288b8d487SRuslan Ermilov	surprising; for example [a-c] matches aAbBc in locale en_US but abBcC
56388b8d487SRuslan Ermilov	in locale fr_CA.  i can see how this might arise by implementation
56488b8d487SRuslan Ermilov	but i cannot explain it to a human user.  (this behavior can be seen
56588b8d487SRuslan Ermilov	in gawk as well; we're leaning on the same library.)
56688b8d487SRuslan Ermilov
56788b8d487SRuslan Ermilov	the issue appears to be that strcoll is meant for sorting, where
56888b8d487SRuslan Ermilov	merging upper and lower case may make sense (though note that unix
56988b8d487SRuslan Ermilov	sort does not do this by default either).  it is not appropriate
57088b8d487SRuslan Ermilov	for regular expressions, where the goal is to match specific
57188b8d487SRuslan Ermilov	patterns of characters.  in any case, the notations [:lower:], etc.,
57288b8d487SRuslan Ermilov	are available in awk, and they are more likely to work correctly in
57388b8d487SRuslan Ermilov	most locales.
57488b8d487SRuslan Ermilov
57588b8d487SRuslan Ermilov	a moratorium is hereby declared on internationalization changes.
57688b8d487SRuslan Ermilov	i apologize to friends and colleagues in other parts of the world.
57788b8d487SRuslan Ermilov	i would truly like to get this "right", but i don't know what
57888b8d487SRuslan Ermilov	that is, and i do not want to keep making changes until it's clear.
57988b8d487SRuslan Ermilov
58088b8d487SRuslan ErmilovJul 4, 2003:
58188b8d487SRuslan Ermilov	fixed bug that permitted non-terminated RE, as in "awk /x".
58288b8d487SRuslan Ermilov
58388b8d487SRuslan ErmilovJun 1, 2003:
58488b8d487SRuslan Ermilov	subtle change to split: if source is empty, number of elems
58588b8d487SRuslan Ermilov	is always 0 and the array is not set.
58688b8d487SRuslan Ermilov
58788b8d487SRuslan ErmilovMar 21, 2003:
58888b8d487SRuslan Ermilov	added some parens to isblank, in another attempt to make things
58988b8d487SRuslan Ermilov	internationally portable.
59088b8d487SRuslan Ermilov
591fc6b1dfeSDavid E. O'BrienMar 14, 2003:
592fc6b1dfeSDavid E. O'Brien	the internationalization changes, somewhat modified, are now
593fc6b1dfeSDavid E. O'Brien	reinstated.  in theory awk will now do character comparisons
594fc6b1dfeSDavid E. O'Brien	and case conversions in national language, but "." will always
595fc6b1dfeSDavid E. O'Brien	be the decimal point separator on input and output regardless
596fc6b1dfeSDavid E. O'Brien	of national language.  isblank(){} has an #ifndef.
597fc6b1dfeSDavid E. O'Brien
598fc6b1dfeSDavid E. O'Brien	this no longer compiles on windows: LC_MESSAGES isn't defined
599fc6b1dfeSDavid E. O'Brien	in vc6++.
600fc6b1dfeSDavid E. O'Brien
601fc6b1dfeSDavid E. O'Brien	fixed subtle behavior in field and record splitting: if FS is
602fc6b1dfeSDavid E. O'Brien	a single character and RS is not empty, \n is NOT a separator.
603fc6b1dfeSDavid E. O'Brien	this tortuous reading is found in the awk book; behavior now
604fc6b1dfeSDavid E. O'Brien	matches gawk and mawk.
605fc6b1dfeSDavid E. O'Brien
60672969a22SDavid E. O'BrienDec 13, 2002:
60772969a22SDavid E. O'Brien	for the moment, the internationalization changes of nov 29 are
60872969a22SDavid E. O'Brien	rolled back -- programs like x = 1.2 don't work in some locales,
60972969a22SDavid E. O'Brien	because the parser is expecting x = 1,2.  until i understand this
61072969a22SDavid E. O'Brien	better, this will have to wait.
61172969a22SDavid E. O'Brien
612813da98dSDavid E. O'BrienNov 29, 2002:
613813da98dSDavid E. O'Brien	modified b.c (with tiny changes in main and run) to support
614813da98dSDavid E. O'Brien	locales, using strcoll and iswhatever tests for posix character
615813da98dSDavid E. O'Brien	classes.  thanks to ruslan ermilov (ru@freebsd.org) for code.
616813da98dSDavid E. O'Brien	the function isblank doesn't seem to have propagated to any
617813da98dSDavid E. O'Brien	header file near me, so it's there explicitly.  not properly
618813da98dSDavid E. O'Brien	tested on non-ascii character sets by me.
619813da98dSDavid E. O'Brien
620813da98dSDavid E. O'BrienJun 28, 2002:
621813da98dSDavid E. O'Brien	modified run/format() and tran/getsval() to do a slightly better
622813da98dSDavid E. O'Brien	job on using OFMT for output from print and CONVFMT for other
623813da98dSDavid E. O'Brien	number->string conversions, as promised by posix and done by
624813da98dSDavid E. O'Brien	gawk and mawk.  there are still places where it doesn't work
625813da98dSDavid E. O'Brien	right if CONVFMT is changed; by then the STR attribute of the
626813da98dSDavid E. O'Brien	variable has been irrevocably set.  thanks to arnold robbins for
627813da98dSDavid E. O'Brien	code and examples.
628813da98dSDavid E. O'Brien
629813da98dSDavid E. O'Brien	fixed subtle bug in format that could get core dump.  thanks to
630813da98dSDavid E. O'Brien	Jaromir Dolecek <jdolecek@NetBSD.org> for finding and fixing.
631813da98dSDavid E. O'Brien	minor cleanup in run.c / format() at the same time.
632813da98dSDavid E. O'Brien
633813da98dSDavid E. O'Brien	added some tests for null pointers to debugging printf's, which
634813da98dSDavid E. O'Brien	were never intended for external consumption.  thanks to dave
635813da98dSDavid E. O'Brien	kerns (dkerns@lucent.com) for pointing this out.
636813da98dSDavid E. O'Brien
637813da98dSDavid E. O'Brien	GNU compatibility: an empty regexp matches anything (thanks to
638813da98dSDavid E. O'Brien	dag-erling smorgrav, des@ofug.org).  subject to reversion if
639813da98dSDavid E. O'Brien	this does more harm than good.
640813da98dSDavid E. O'Brien
641813da98dSDavid E. O'Brien	pervasive small changes to make things more const-correct, as
642813da98dSDavid E. O'Brien	reported by gcc's -Wwrite-strings.  as it says in the gcc manual,
643813da98dSDavid E. O'Brien	this may be more nuisance than useful.  provoked by a suggestion
644813da98dSDavid E. O'Brien	and code from arnaud desitter, arnaud@nimbus.geog.ox.ac.uk
645813da98dSDavid E. O'Brien
646813da98dSDavid E. O'Brien	minor documentation changes to note that this now compiles out
647813da98dSDavid E. O'Brien	of the box on Mac OS X.
648813da98dSDavid E. O'Brien
649007c6572SDag-Erling SmørgravFeb 10, 2002:
650007c6572SDag-Erling Smørgrav	changed types in posix chars structure to quiet solaris cc.
651007c6572SDag-Erling Smørgrav
652007c6572SDag-Erling SmørgravJan 1, 2002:
653007c6572SDag-Erling Smørgrav	fflush() or fflush("") flushes all files and pipes.
654007c6572SDag-Erling Smørgrav
655007c6572SDag-Erling Smørgrav	length(arrayname) returns number of elements; thanks to
656007c6572SDag-Erling Smørgrav	arnold robbins for suggestion.
657007c6572SDag-Erling Smørgrav
658007c6572SDag-Erling Smørgrav	added a makefile.win to make it easier to build on windows.
659007c6572SDag-Erling Smørgrav	based on dan allen's buildwin.bat.
660007c6572SDag-Erling Smørgrav
661007c6572SDag-Erling SmørgravNov 16, 2001:
662007c6572SDag-Erling Smørgrav	added support for posix character class names like [:digit:],
663007c6572SDag-Erling Smørgrav	which are not exactly shorter than [0-9] and perhaps no more
664007c6572SDag-Erling Smørgrav	portable.  thanks to dag-erling smorgrav for code.
665007c6572SDag-Erling Smørgrav
666007c6572SDag-Erling SmørgravFeb 16, 2001:
667007c6572SDag-Erling Smørgrav	removed -m option; no longer needed, and it was actually
668007c6572SDag-Erling Smørgrav	broken (noted thanks to volker kiefel).
669007c6572SDag-Erling Smørgrav
670007c6572SDag-Erling SmørgravFeb 10, 2001:
671007c6572SDag-Erling Smørgrav	fixed an appalling bug in gettok: any sequence of digits, +,-, E, e,
672007c6572SDag-Erling Smørgrav	and period was accepted as a valid number if it started with a period.
673007c6572SDag-Erling Smørgrav	this would never have happened with the lex version.
674007c6572SDag-Erling Smørgrav
675007c6572SDag-Erling Smørgrav	other 1-character botches, now fixed, include a bare $ and a
676007c6572SDag-Erling Smørgrav	bare " at the end of the input.
677007c6572SDag-Erling Smørgrav
678007c6572SDag-Erling SmørgravFeb 7, 2001:
679007c6572SDag-Erling Smørgrav	more (const char *) casts in b.c and tran.c to silence warnings.
680007c6572SDag-Erling Smørgrav
6812a55deb1SDavid E. O'BrienNov 15, 2000:
6822a55deb1SDavid E. O'Brien	fixed a bug introduced in august 1997 that caused expressions
6832a55deb1SDavid E. O'Brien	like $f[1] to be syntax errors.  thanks to arnold robbins for
6842a55deb1SDavid E. O'Brien	noticing this and providing a fix.
6852a55deb1SDavid E. O'Brien
6862a55deb1SDavid E. O'BrienOct 30, 2000:
6872a55deb1SDavid E. O'Brien	fixed some nextfile bugs: not handling all cases.  thanks to
6882a55deb1SDavid E. O'Brien	arnold robbins for pointing this out.  new regressions added.
6892a55deb1SDavid E. O'Brien
6902a55deb1SDavid E. O'Brien	close() is now a function.  it returns whatever the library
6912a55deb1SDavid E. O'Brien	fclose returns, and -1 for closing a file or pipe that wasn't
6922a55deb1SDavid E. O'Brien	opened.
6932a55deb1SDavid E. O'Brien
6942a55deb1SDavid E. O'BrienSep 24, 2000:
6952a55deb1SDavid E. O'Brien	permit \n explicitly in character classes; won't work right
6962a55deb1SDavid E. O'Brien	if comes in as "[\n]" but ok as /[\n]/, because of multiple
6972a55deb1SDavid E. O'Brien	processing of \'s.  thanks to arnold robbins.
6982a55deb1SDavid E. O'Brien
6992a55deb1SDavid E. O'BrienJuly 5, 2000:
7002a55deb1SDavid E. O'Brien	minor fiddles in tran.c to keep compilers happy about uschar.
7012a55deb1SDavid E. O'Brien	thanks to norman wilson.
7022a55deb1SDavid E. O'Brien
7032a55deb1SDavid E. O'BrienMay 25, 2000:
7042a55deb1SDavid E. O'Brien	yet another attempt at making 8-bit input work, with another
7052a55deb1SDavid E. O'Brien	band-aid in b.c (member()), and some (uschar) casts to head
7062a55deb1SDavid E. O'Brien	off potential errors in subscripts (like isdigit).  also
7072a55deb1SDavid E. O'Brien	changed HAT to NCHARS-2.  thanks again to santiago vila.
7082a55deb1SDavid E. O'Brien
7092a55deb1SDavid E. O'Brien	changed maketab.c to ignore apparently out of range definitions
7102a55deb1SDavid E. O'Brien	instead of halting; new freeBSD generates one.  thanks to
7112a55deb1SDavid E. O'Brien	jon snader <jsnader@ix.netcom.com> for pointing out the problem.
7122a55deb1SDavid E. O'Brien
7132a55deb1SDavid E. O'BrienMay 2, 2000:
7142a55deb1SDavid E. O'Brien	fixed an 8-bit problem in b.c by making several char*'s into
7152a55deb1SDavid E. O'Brien	unsigned char*'s.  not clear i have them all yet.  thanks to
7162a55deb1SDavid E. O'Brien	Santiago Vila <sanvila@unex.es> for the bug report.
7172a55deb1SDavid E. O'Brien
7182a55deb1SDavid E. O'BrienApr 21, 2000:
7192a55deb1SDavid E. O'Brien	finally found and fixed a memory leak in function call; it's
7202a55deb1SDavid E. O'Brien	been there since functions were added ~1983.  thanks to
7212a55deb1SDavid E. O'Brien	jon bentley for the test case that found it.
7222a55deb1SDavid E. O'Brien
7232a55deb1SDavid E. O'Brien	added test in envinit to catch environment "variables" with
724c263f9bfSRuslan Ermilov	names beginning with '='; thanks to Berend Hasselman.
7252a55deb1SDavid E. O'Brien
7262a55deb1SDavid E. O'BrienJul 28, 1999:
7272a55deb1SDavid E. O'Brien	added test in defn() to catch function foo(foo), which
7282a55deb1SDavid E. O'Brien	otherwise recurses until core dump.  thanks to arnold
7292a55deb1SDavid E. O'Brien	robbins for noticing this.
7302a55deb1SDavid E. O'Brien
7312a55deb1SDavid E. O'BrienJun 20, 1999:
7322a55deb1SDavid E. O'Brien	added *bp in gettok in lex.c; appears possible to exit function
7332a55deb1SDavid E. O'Brien	without terminating the string.  thanks to russ cox.
7342a55deb1SDavid E. O'Brien
7352a55deb1SDavid E. O'BrienJun 2, 1999:
7362a55deb1SDavid E. O'Brien	added function stdinit() to run to initialize files[] array,
7372a55deb1SDavid E. O'Brien	in case stdin, etc., are not constants; some compilers care.
7382a55deb1SDavid E. O'Brien
7392a55deb1SDavid E. O'BrienMay 10, 1999:
7402a55deb1SDavid E. O'Brien	replaced the ERROR ... FATAL, etc., macros with functions
7412a55deb1SDavid E. O'Brien	based on vprintf, to avoid problems caused by overrunning
7422a55deb1SDavid E. O'Brien	fixed-size errbuf array.  thanks to ralph corderoy for the
7432a55deb1SDavid E. O'Brien	impetus, and for pointing out a string termination bug in
7442a55deb1SDavid E. O'Brien	qstring as well.
7452a55deb1SDavid E. O'Brien
7462a55deb1SDavid E. O'BrienApr 21, 1999:
7472a55deb1SDavid E. O'Brien	fixed bug that caused occasional core dumps with commandline
7482a55deb1SDavid E. O'Brien	variable with value ending in \.  (thanks to nelson beebe for
7492a55deb1SDavid E. O'Brien	the test case.)
7502a55deb1SDavid E. O'Brien
7512a55deb1SDavid E. O'BrienApr 16, 1999:
7522a55deb1SDavid E. O'Brien	with code kindly provided by Bruce Lilly, awk now parses
7532a55deb1SDavid E. O'Brien	/=/ and similar constructs more sensibly in more places.
7542a55deb1SDavid E. O'Brien	Bruce also provided some helpful test cases.
7552a55deb1SDavid E. O'Brien
7562a55deb1SDavid E. O'BrienApr 5, 1999:
7572a55deb1SDavid E. O'Brien	changed true/false to True/False in run.c to make it
7582a55deb1SDavid E. O'Brien	easier to compile with C++.  Added some casts on malloc
7592a55deb1SDavid E. O'Brien	and realloc to be honest about casts; ditto.  changed
7602a55deb1SDavid E. O'Brien	ltype int to long in struct rrow to reduce some 64-bit
7612a55deb1SDavid E. O'Brien	complaints; other changes scattered throughout for the
7622a55deb1SDavid E. O'Brien	same purpose.  thanks to Nelson Beebe for these portability
7632a55deb1SDavid E. O'Brien	improvements.
7642a55deb1SDavid E. O'Brien
7652a55deb1SDavid E. O'Brien	removed some horrible pointer-int casting in b.c and elsewhere
7662a55deb1SDavid E. O'Brien	by adding ptoi and itonp to localize the casts, which are
7672a55deb1SDavid E. O'Brien	all benign.  fixed one incipient bug that showed up on sgi
7682a55deb1SDavid E. O'Brien	in 64-bit mode.
7692a55deb1SDavid E. O'Brien
7702a55deb1SDavid E. O'Brien	reset lineno for new source file; include filename in error
7712a55deb1SDavid E. O'Brien	message.  also fixed line number error in continuation lines.
7722a55deb1SDavid E. O'Brien	(thanks to Nelson Beebe for both of these.)
7732a55deb1SDavid E. O'Brien
7742a55deb1SDavid E. O'BrienMar 24, 1999:
7752a55deb1SDavid E. O'Brien	Nelson Beebe notes that irix 5.3 yacc dies with a bogus
7762a55deb1SDavid E. O'Brien	error; use a newer version or switch to bison, since sgi
7772a55deb1SDavid E. O'Brien	is unlikely to fix it.
7782a55deb1SDavid E. O'Brien
7792a55deb1SDavid E. O'BrienMar 5, 1999:
7802a55deb1SDavid E. O'Brien	changed isnumber to is_number to avoid the problem caused by
7812a55deb1SDavid E. O'Brien	versions of ctype.h that include the name isnumber.
7822a55deb1SDavid E. O'Brien
7832a55deb1SDavid E. O'Brien	distribution now includes a script for building on a Mac,
7842a55deb1SDavid E. O'Brien	thanks to Dan Allen.
7852a55deb1SDavid E. O'Brien
7862a55deb1SDavid E. O'BrienFeb 20, 1999:
7872a55deb1SDavid E. O'Brien	fixed memory leaks in run.c (call) and tran.c (setfval).
7882a55deb1SDavid E. O'Brien	thanks to Stephen Nutt for finding these and providing the fixes.
7892a55deb1SDavid E. O'Brien
7902a55deb1SDavid E. O'BrienJan 13, 1999:
7912a55deb1SDavid E. O'Brien	replaced srand argument by (unsigned int) in run.c;
7922a55deb1SDavid E. O'Brien	avoids problem on Mac and potentially on Unix & Windows.
7932a55deb1SDavid E. O'Brien	thanks to Dan Allen.
7942a55deb1SDavid E. O'Brien
7952a55deb1SDavid E. O'Brien	added a few (int) casts to silence useless compiler warnings.
7962a55deb1SDavid E. O'Brien	e.g., errorflag= in run.c jump().
7972a55deb1SDavid E. O'Brien
7982a55deb1SDavid E. O'Brien	added proctab.c to the bundle outout; one less thing
7992a55deb1SDavid E. O'Brien	to have to compile out of the box.
8002a55deb1SDavid E. O'Brien
8012a55deb1SDavid E. O'Brien	added calls to _popen and _pclose to the win95 stub for
8022a55deb1SDavid E. O'Brien	pipes (thanks to Steve Adams for this helpful suggestion).
8032a55deb1SDavid E. O'Brien	seems to work, though properties are not well understood
8042a55deb1SDavid E. O'Brien	by me, and it appears that under some circumstances the
8052a55deb1SDavid E. O'Brien	pipe output is truncated.  Be careful.
8062a55deb1SDavid E. O'Brien
8072a55deb1SDavid E. O'BrienOct 19, 1998:
8082a55deb1SDavid E. O'Brien	fixed a couple of bugs in getrec: could fail to update $0
8092a55deb1SDavid E. O'Brien	after a getline var; because inputFS wasn't initialized,
8102a55deb1SDavid E. O'Brien	could split $0 on every character, a misleading diversion.
8112a55deb1SDavid E. O'Brien
8122a55deb1SDavid E. O'Brien	fixed caching bug in makedfa: LRU was actually removing
8132a55deb1SDavid E. O'Brien	least often used.
8142a55deb1SDavid E. O'Brien
8152a55deb1SDavid E. O'Brien	thanks to ross ridge for finding these, and for providing
8162a55deb1SDavid E. O'Brien	great bug reports.
8172a55deb1SDavid E. O'Brien
8182a55deb1SDavid E. O'BrienMay 12, 1998:
8192a55deb1SDavid E. O'Brien	fixed potential bug in readrec: might fail to update record
8202a55deb1SDavid E. O'Brien	pointer after growing.  thanks to dan levy for spotting this
8212a55deb1SDavid E. O'Brien	and suggesting the fix.
8222a55deb1SDavid E. O'Brien
8232a55deb1SDavid E. O'BrienMar 12, 1998:
8242a55deb1SDavid E. O'Brien	added -V to print version number and die.
8252a55deb1SDavid E. O'Brien
826b5253557SWarner Losh[notify dave kerns, dkerns@dacsoup.ih.lucent.com]
827b5253557SWarner Losh
8282a55deb1SDavid E. O'BrienFeb 11, 1998:
8292a55deb1SDavid E. O'Brien	subtle silent bug in lex.c: if the program ended with a number
8302a55deb1SDavid E. O'Brien	longer than 1 digit, part of the input would be pushed back and
8312a55deb1SDavid E. O'Brien	parsed again because token buffer wasn't terminated right.
8322a55deb1SDavid E. O'Brien	example:  awk 'length($0) > 10'.  blush.  at least i found it
8332a55deb1SDavid E. O'Brien	myself.
8342a55deb1SDavid E. O'Brien
8352a55deb1SDavid E. O'BrienAug 31, 1997:
8362a55deb1SDavid E. O'Brien	s/adelete/awkdelete/: SGI uses this in malloc.h.
8372a55deb1SDavid E. O'Brien	thanks to nelson beebe for pointing this one out.
8382a55deb1SDavid E. O'Brien
8392a55deb1SDavid E. O'BrienAug 21, 1997:
8402a55deb1SDavid E. O'Brien	fixed some bugs in sub and gsub when replacement includes \\.
8412a55deb1SDavid E. O'Brien	this is a dark, horrible corner, but at least now i believe that
8422a55deb1SDavid E. O'Brien	the behavior is the same as gawk and the intended posix standard.
8432a55deb1SDavid E. O'Brien	thanks to arnold robbins for advice here.
8442a55deb1SDavid E. O'Brien
8452a55deb1SDavid E. O'BrienAug 9, 1997:
8462a55deb1SDavid E. O'Brien	somewhat regretfully, replaced the ancient lex-based lexical
8472a55deb1SDavid E. O'Brien	analyzer with one written in C.  it's longer, generates less code,
8482a55deb1SDavid E. O'Brien	and more portable; the old one depended too much on mysterious
8492a55deb1SDavid E. O'Brien	properties of lex that were not preserved in other environments.
8502a55deb1SDavid E. O'Brien	in theory these recognize the same language.
8512a55deb1SDavid E. O'Brien
8522a55deb1SDavid E. O'Brien	now using strtod to test whether a string is a number, instead of
8532a55deb1SDavid E. O'Brien	the convoluted original function.  should be more portable and
8542a55deb1SDavid E. O'Brien	reliable if strtod is implemented right.
8552a55deb1SDavid E. O'Brien
8562a55deb1SDavid E. O'Brien	removed now-pointless optimization in makefile that tries to avoid
8572a55deb1SDavid E. O'Brien	recompilation when awkgram.y is changed but symbols are not.
8582a55deb1SDavid E. O'Brien
8592a55deb1SDavid E. O'Brien	removed most fixed-size arrays, though a handful remain, some
8602a55deb1SDavid E. O'Brien	of which are unchecked.  you have been warned.
8612a55deb1SDavid E. O'Brien
8622a55deb1SDavid E. O'BrienAug 4, 1997:
8632a55deb1SDavid E. O'Brien	with some trepidation, replaced the ancient code that managed
8642a55deb1SDavid E. O'Brien	fields and $0 in fixed-size arrays with arrays that grow on
8652a55deb1SDavid E. O'Brien	demand.  there is still some tension between trying to make this
8662a55deb1SDavid E. O'Brien	run fast and making it clean; not sure it's right yet.
8672a55deb1SDavid E. O'Brien
8682a55deb1SDavid E. O'Brien	the ill-conceived -mr and -mf arguments are now useful only
8692a55deb1SDavid E. O'Brien	for debugging.  previous dynamic string code removed.
8702a55deb1SDavid E. O'Brien
8712a55deb1SDavid E. O'Brien	numerous other minor cleanups along the way.
8722a55deb1SDavid E. O'Brien
8732a55deb1SDavid E. O'BrienJul 30, 1997:
8742a55deb1SDavid E. O'Brien	using code provided by dan levy (to whom profuse thanks), replaced
8752a55deb1SDavid E. O'Brien	fixed-size arrays and awkward kludges by a fairly uniform mechanism
8762a55deb1SDavid E. O'Brien	to grow arrays as needed for printf, sub, gsub, etc.
8772a55deb1SDavid E. O'Brien
8782a55deb1SDavid E. O'BrienJul 23, 1997:
8792a55deb1SDavid E. O'Brien	falling off the end of a function returns "" and 0, not 0.
8802a55deb1SDavid E. O'Brien	thanks to arnold robbins.
8812a55deb1SDavid E. O'Brien
8822a55deb1SDavid E. O'BrienJun 17, 1997:
8832a55deb1SDavid E. O'Brien	replaced several fixed-size arrays by dynamically-created ones
8842a55deb1SDavid E. O'Brien	in run.c; added overflow tests to some previously unchecked cases.
8852a55deb1SDavid E. O'Brien	getline, toupper, tolower.
8862a55deb1SDavid E. O'Brien
8872a55deb1SDavid E. O'Brien	getline code is still broken in that recursive calls may wind
8882a55deb1SDavid E. O'Brien	up using the same space.  [fixed later]
8892a55deb1SDavid E. O'Brien
8902a55deb1SDavid E. O'Brien	increased RECSIZE to 8192 to push problems further over the horizon.
8912a55deb1SDavid E. O'Brien
8922a55deb1SDavid E. O'Brien	added \r to \n as input line separator for programs, not data.
8932a55deb1SDavid E. O'Brien	damn CRLFs.
8942a55deb1SDavid E. O'Brien
8952a55deb1SDavid E. O'Brien	modified format() to permit explicit printf("%c", 0) to include
8962a55deb1SDavid E. O'Brien	a null byte in output.  thanks to ken stailey for the fix.
8972a55deb1SDavid E. O'Brien
8982a55deb1SDavid E. O'Brien	added a "-safe" argument that disables file output (print >,
8992a55deb1SDavid E. O'Brien	print >>), process creation (cmd|getline, print |, system), and
9002a55deb1SDavid E. O'Brien	access to the environment (ENVIRON).  this is a first approximation
9012a55deb1SDavid E. O'Brien	to a "safe" version of awk, but don't rely on it too much.  thanks
9022a55deb1SDavid E. O'Brien	to joan feigenbaum and matt blaze for the inspiration long ago.
9032a55deb1SDavid E. O'Brien
9042a55deb1SDavid E. O'BrienJul 8, 1996:
9052a55deb1SDavid E. O'Brien	fixed long-standing bug in sub, gsub(/a/, "\\\\&"); thanks to
9062a55deb1SDavid E. O'Brien	ralph corderoy.
9072a55deb1SDavid E. O'Brien
9082a55deb1SDavid E. O'BrienJun 29, 1996:
9092a55deb1SDavid E. O'Brien	fixed awful bug in new field splitting; didn't get all the places
9102a55deb1SDavid E. O'Brien	where input was done.
9112a55deb1SDavid E. O'Brien
9122a55deb1SDavid E. O'BrienJun 28, 1996:
9132a55deb1SDavid E. O'Brien	changed field-splitting to conform to posix definition: fields are
9142a55deb1SDavid E. O'Brien	split using the value of FS at the time of input; it used to be
9152a55deb1SDavid E. O'Brien	the value when the field or NF was first referred to, a much less
9162a55deb1SDavid E. O'Brien	predictable definition.  thanks to arnold robbins for encouragement
9172a55deb1SDavid E. O'Brien	to do the right thing.
9182a55deb1SDavid E. O'Brien
9192a55deb1SDavid E. O'BrienMay 28, 1996:
9202a55deb1SDavid E. O'Brien	fixed appalling but apparently unimportant bug in parsing octal
9212a55deb1SDavid E. O'Brien	numbers in reg exprs.
9222a55deb1SDavid E. O'Brien
9232a55deb1SDavid E. O'Brien	explicit hex in reg exprs now limited to 2 chars: \xa, \xaa.
9242a55deb1SDavid E. O'Brien
9252a55deb1SDavid E. O'BrienMay 27, 1996:
9262a55deb1SDavid E. O'Brien	cleaned up some declarations so gcc -Wall is now almost silent.
9272a55deb1SDavid E. O'Brien
9282a55deb1SDavid E. O'Brien	makefile now includes backup copies of ytab.c and lexyy.c in case
9292a55deb1SDavid E. O'Brien	one makes before looking; it also avoids recreating lexyy.c unless
9302a55deb1SDavid E. O'Brien	really needed.
9312a55deb1SDavid E. O'Brien
9322a55deb1SDavid E. O'Brien	s/aprintf/awkprint, s/asprintf/awksprintf/ to avoid some name clashes
9332a55deb1SDavid E. O'Brien	with unwisely-written header files.
9342a55deb1SDavid E. O'Brien
9352a55deb1SDavid E. O'Brien	thanks to jeffrey friedl for several of these.
9362a55deb1SDavid E. O'Brien
9372a55deb1SDavid E. O'BrienMay 26, 1996:
9382a55deb1SDavid E. O'Brien	an attempt to rationalize the (unsigned) char issue.  almost all
9392a55deb1SDavid E. O'Brien	instances of unsigned char have been removed; the handful of places
9402a55deb1SDavid E. O'Brien	in b.c where chars are used as table indices have been hand-crafted.
9412a55deb1SDavid E. O'Brien	added some latin-1 tests to the regression, but i'm not confident;
9422a55deb1SDavid E. O'Brien	none of my compilers seem to care much.  thanks to nelson beebe for
9432a55deb1SDavid E. O'Brien	pointing out some others that do care.
9442a55deb1SDavid E. O'Brien
9452a55deb1SDavid E. O'BrienMay 2, 1996:
9462a55deb1SDavid E. O'Brien	removed all register declarations.
9472a55deb1SDavid E. O'Brien
9482a55deb1SDavid E. O'Brien	enhanced split(), as in gawk, etc:  split(s, a, "") splits s into
9492a55deb1SDavid E. O'Brien	a[1]...a[length(s)] with each character a single element.
9502a55deb1SDavid E. O'Brien
9512a55deb1SDavid E. O'Brien	made the same changes for field-splitting if FS is "".
9522a55deb1SDavid E. O'Brien
9532a55deb1SDavid E. O'Brien	added nextfile, as in gawk: causes immediate advance to next
9542a55deb1SDavid E. O'Brien	input file. (thanks to arnold robbins for inspiration and code).
9552a55deb1SDavid E. O'Brien
9562a55deb1SDavid E. O'Brien	small fixes to regexpr code:  can now handle []], [[], and
9572a55deb1SDavid E. O'Brien	variants;  [] is now a syntax error, rather than matching
9582a55deb1SDavid E. O'Brien	everything;  [z-a] is now empty, not z.  far from complete
9592a55deb1SDavid E. O'Brien	or correct, however.  (thanks to jeffrey friedl for pointing out
9602a55deb1SDavid E. O'Brien	some awful behaviors.)
9612a55deb1SDavid E. O'Brien
9622a55deb1SDavid E. O'BrienApr 29, 1996:
963c263f9bfSRuslan Ermilov	replaced uchar by uschar everywhere; apparently some compilers
9642a55deb1SDavid E. O'Brien	usurp this name and this causes conflicts.
9652a55deb1SDavid E. O'Brien
9662a55deb1SDavid E. O'Brien	fixed call to time in run.c (bltin); arg is time_t *.
9672a55deb1SDavid E. O'Brien
9682a55deb1SDavid E. O'Brien	replaced horrible pointer/long punning in b.c by a legitimate
9692a55deb1SDavid E. O'Brien	union.  should be safer on 64-bit machines and cleaner everywhere.
9702a55deb1SDavid E. O'Brien	(thanks to nelson beebe for pointing out some of these problems.)
9712a55deb1SDavid E. O'Brien
9722a55deb1SDavid E. O'Brien	replaced nested comments by #if 0...#endif in run.c, lib.c.
9732a55deb1SDavid E. O'Brien
9742a55deb1SDavid E. O'Brien	removed getsval, setsval, execute macros from run.c and lib.c.
9752a55deb1SDavid E. O'Brien	machines are 100x faster than they were when these macros were
9762a55deb1SDavid E. O'Brien	first used.
9772a55deb1SDavid E. O'Brien
9782a55deb1SDavid E. O'Brien	revised filenames: awk.g.y => awkgram.y, awk.lx.l => awklex.l,
9792a55deb1SDavid E. O'Brien	y.tab.[ch] => ytab.[ch], lex.yy.c => lexyy.c, all in the aid of
9802a55deb1SDavid E. O'Brien	portability to nameless systems.
9812a55deb1SDavid E. O'Brien
9822a55deb1SDavid E. O'Brien	"make bundle" now includes yacc and lex output files for recipients
9832a55deb1SDavid E. O'Brien	who don't have yacc or lex.
9842a55deb1SDavid E. O'Brien
9852a55deb1SDavid E. O'BrienAug 15, 1995:
9862a55deb1SDavid E. O'Brien	initialized Cells in setsymtab more carefully; some fields
9872a55deb1SDavid E. O'Brien	were not set.  (thanks to purify, all of whose complaints i
9882a55deb1SDavid E. O'Brien	think i now understand.)
9892a55deb1SDavid E. O'Brien
9902a55deb1SDavid E. O'Brien	fixed at least one error in gsub that looked at -1-th element
9912a55deb1SDavid E. O'Brien	of an array when substituting for a null match (e.g., $).
9922a55deb1SDavid E. O'Brien
9932a55deb1SDavid E. O'Brien	delete arrayname is now legal; it clears the elements but leaves
9942a55deb1SDavid E. O'Brien	the array, which may not be the right behavior.
9952a55deb1SDavid E. O'Brien
9962a55deb1SDavid E. O'Brien	modified makefile: my current make can't cope with the test used
9972a55deb1SDavid E. O'Brien	to avoid unnecessary yacc invocations.
9982a55deb1SDavid E. O'Brien
9992a55deb1SDavid E. O'BrienJul 17, 1995:
10002a55deb1SDavid E. O'Brien	added dynamically growing strings to awk.lx.l and b.c
10012a55deb1SDavid E. O'Brien	to permit regular expressions to be much bigger.
10022a55deb1SDavid E. O'Brien	the state arrays can still overflow.
10032a55deb1SDavid E. O'Brien
10042a55deb1SDavid E. O'BrienAug 24, 1994:
10052a55deb1SDavid E. O'Brien	detect duplicate arguments in function definitions (mdm).
10062a55deb1SDavid E. O'Brien
10072a55deb1SDavid E. O'BrienMay 11, 1994:
10082a55deb1SDavid E. O'Brien	trivial fix to printf to limit string size in sub().
10092a55deb1SDavid E. O'Brien
10102a55deb1SDavid E. O'BrienApr 22, 1994:
10112a55deb1SDavid E. O'Brien	fixed yet another subtle self-assignment problem:
10122a55deb1SDavid E. O'Brien	$1 = $2; $1 = $1 clobbered $1.
10132a55deb1SDavid E. O'Brien
10142a55deb1SDavid E. O'Brien	Regression tests now use private echo, to avoid quoting problems.
10152a55deb1SDavid E. O'Brien
10162a55deb1SDavid E. O'BrienFeb 2, 1994:
10172a55deb1SDavid E. O'Brien	changed error() to print line number as %d, not %g.
10182a55deb1SDavid E. O'Brien
10192a55deb1SDavid E. O'BrienJul 23, 1993:
10202a55deb1SDavid E. O'Brien	cosmetic changes: increased sizes of some arrays,
10212a55deb1SDavid E. O'Brien	reworded some error messages.
10222a55deb1SDavid E. O'Brien
10232a55deb1SDavid E. O'Brien	added CONVFMT as in posix (just replaced OFMT in getsval)
10242a55deb1SDavid E. O'Brien
10252a55deb1SDavid E. O'Brien	FILENAME is now "" until the first thing that causes a file
10262a55deb1SDavid E. O'Brien	to be opened.
10272a55deb1SDavid E. O'Brien
10282a55deb1SDavid E. O'BrienNov 28, 1992:
10292a55deb1SDavid E. O'Brien	deleted yyunput and yyoutput from proto.h;
10302a55deb1SDavid E. O'Brien	different versions of lex give these different declarations.
10312a55deb1SDavid E. O'Brien
10322a55deb1SDavid E. O'BrienMay 31, 1992:
10332a55deb1SDavid E. O'Brien	added -mr N and -mf N options: more record and fields.
10342a55deb1SDavid E. O'Brien	these really ought to adjust automatically.
10352a55deb1SDavid E. O'Brien
10362a55deb1SDavid E. O'Brien	cleaned up some error messages; "out of space" now means
10372a55deb1SDavid E. O'Brien	malloc returned NULL in all cases.
10382a55deb1SDavid E. O'Brien
10392a55deb1SDavid E. O'Brien	changed rehash so that if it runs out, it just returns;
10402a55deb1SDavid E. O'Brien	things will continue to run slow, but maybe a bit longer.
10412a55deb1SDavid E. O'Brien
10422a55deb1SDavid E. O'BrienApr 24, 1992:
10432a55deb1SDavid E. O'Brien	remove redundant close of stdin when using -f -.
10442a55deb1SDavid E. O'Brien
10452a55deb1SDavid E. O'Brien	got rid of core dump with -d; awk -d just prints date.
10462a55deb1SDavid E. O'Brien
10472a55deb1SDavid E. O'BrienApr 12, 1992:
10482a55deb1SDavid E. O'Brien	added explicit check for /dev/std(in,out,err) in redirection.
10492a55deb1SDavid E. O'Brien	unlike gawk, no /dev/fd/n yet.
10502a55deb1SDavid E. O'Brien
10512a55deb1SDavid E. O'Brien	added (file/pipe) builtin.  hard to test satisfactorily.
10522a55deb1SDavid E. O'Brien	not posix.
10532a55deb1SDavid E. O'Brien
10542a55deb1SDavid E. O'BrienFeb 20, 1992:
10552a55deb1SDavid E. O'Brien	recompile after abortive changes;  should be unchanged.
10562a55deb1SDavid E. O'Brien
10572a55deb1SDavid E. O'BrienDec 2, 1991:
10582a55deb1SDavid E. O'Brien	die-casting time:  converted to ansi C, installed that.
10592a55deb1SDavid E. O'Brien
10602a55deb1SDavid E. O'BrienNov 30, 1991:
10612a55deb1SDavid E. O'Brien	fixed storage leak in freefa, failing to recover [N]CCL.
10622a55deb1SDavid E. O'Brien	thanks to Bill Jones (jones@cs.usask.ca)
10632a55deb1SDavid E. O'Brien
10642a55deb1SDavid E. O'BrienNov 19, 1991:
10652a55deb1SDavid E. O'Brien	use RAND_MAX instead of literal in builtin().
10662a55deb1SDavid E. O'Brien
10672a55deb1SDavid E. O'BrienNov 12, 1991:
10682a55deb1SDavid E. O'Brien	cranked up some fixed-size arrays in b.c, and added a test for
10692a55deb1SDavid E. O'Brien	overflow in penter.  thanks to mark larsen.
10702a55deb1SDavid E. O'Brien
10712a55deb1SDavid E. O'BrienSep 24, 1991:
10722a55deb1SDavid E. O'Brien	increased buffer in gsub.  a very crude fix to a general problem.
10732a55deb1SDavid E. O'Brien	and again on Sep 26.
10742a55deb1SDavid E. O'Brien
10752a55deb1SDavid E. O'BrienAug 18, 1991:
10762a55deb1SDavid E. O'Brien	enforce variable name syntax for commandline variables: has to
10772a55deb1SDavid E. O'Brien	start with letter or _.
10782a55deb1SDavid E. O'Brien
10792a55deb1SDavid E. O'BrienJul 27, 1991:
10802a55deb1SDavid E. O'Brien	allow newline after ; in for statements.
10812a55deb1SDavid E. O'Brien
10822a55deb1SDavid E. O'BrienJul 21, 1991:
10832a55deb1SDavid E. O'Brien	fixed so that in self-assignment like $1=$1, side effects
10842a55deb1SDavid E. O'Brien	like recomputing $0 take place.  (this is getting subtle.)
10852a55deb1SDavid E. O'Brien
10862a55deb1SDavid E. O'BrienJun 30, 1991:
10872a55deb1SDavid E. O'Brien	better test for detecting too-long output record.
10882a55deb1SDavid E. O'Brien
10892a55deb1SDavid E. O'BrienJun 2, 1991:
10902a55deb1SDavid E. O'Brien	better defense against very long printf strings.
10912a55deb1SDavid E. O'Brien	made break and continue illegal outside of loops.
10922a55deb1SDavid E. O'Brien
10932a55deb1SDavid E. O'BrienMay 13, 1991:
10942a55deb1SDavid E. O'Brien	removed extra arg on gettemp, tempfree.  minor error message rewording.
10952a55deb1SDavid E. O'Brien
10962a55deb1SDavid E. O'BrienMay 6, 1991:
10972a55deb1SDavid E. O'Brien	fixed silly bug in hex parsing in hexstr().
10982a55deb1SDavid E. O'Brien	removed an apparently unnecessary test in isnumber().
10992a55deb1SDavid E. O'Brien	warn about weird printf conversions.
11002a55deb1SDavid E. O'Brien	fixed unchecked array overwrite in relex().
11012a55deb1SDavid E. O'Brien
11022a55deb1SDavid E. O'Brien	changed for (i in array) to access elements in sorted order.
11032a55deb1SDavid E. O'Brien	then unchanged it -- it really does run slower in too many cases.
11042a55deb1SDavid E. O'Brien	left the code in place, commented out.
11052a55deb1SDavid E. O'Brien
11062a55deb1SDavid E. O'BrienFeb 10, 1991:
11072a55deb1SDavid E. O'Brien	check error status on all writes, to avoid banging on full disks.
11082a55deb1SDavid E. O'Brien
11092a55deb1SDavid E. O'BrienJan 28, 1991:
11102a55deb1SDavid E. O'Brien	awk -f - reads the program from stdin.
11112a55deb1SDavid E. O'Brien
11122a55deb1SDavid E. O'BrienJan 11, 1991:
11132a55deb1SDavid E. O'Brien	failed to set numeric state on $0 in cmd|getline context in run.c.
11142a55deb1SDavid E. O'Brien
11152a55deb1SDavid E. O'BrienNov 2, 1990:
11162a55deb1SDavid E. O'Brien	fixed sleazy test for integrality in getsval;  use modf.
11172a55deb1SDavid E. O'Brien
11182a55deb1SDavid E. O'BrienOct 29, 1990:
11192a55deb1SDavid E. O'Brien	fixed sleazy buggy code in lib.c that looked (incorrectly) for
11202a55deb1SDavid E. O'Brien	too long input lines.
11212a55deb1SDavid E. O'Brien
11222a55deb1SDavid E. O'BrienOct 14, 1990:
11232a55deb1SDavid E. O'Brien	fixed the bug on p. 198 in which it couldn't deduce that an
11242a55deb1SDavid E. O'Brien	argument was an array in some contexts.  replaced the error
11252a55deb1SDavid E. O'Brien	message in intest() by code that damn well makes it an array.
11262a55deb1SDavid E. O'Brien
11272a55deb1SDavid E. O'BrienOct 8, 1990:
11282a55deb1SDavid E. O'Brien	fixed horrible bug:  types and values were not preserved in
11292a55deb1SDavid E. O'Brien	some kinds of self-assignment. (in assign().)
11302a55deb1SDavid E. O'Brien
11312a55deb1SDavid E. O'BrienAug 24, 1990:
11322a55deb1SDavid E. O'Brien	changed NCHARS to 256 to handle 8-bit characters in strings
11332a55deb1SDavid E. O'Brien	presented to match(), etc.
11342a55deb1SDavid E. O'Brien
11352a55deb1SDavid E. O'BrienJun 26, 1990:
11362a55deb1SDavid E. O'Brien	changed struct rrow (awk.h) to use long instead of int for lval,
11372a55deb1SDavid E. O'Brien	since cfoll() stores a pointer in it.  now works better when int's
11382a55deb1SDavid E. O'Brien	are smaller than pointers!
11392a55deb1SDavid E. O'Brien
11402a55deb1SDavid E. O'BrienMay 6, 1990:
11412a55deb1SDavid E. O'Brien	AVA fixed the grammar so that ! is uniformly of the same precedence as
11422a55deb1SDavid E. O'Brien	unary + and -.  This renders illegal some constructs like !x=y, which
11432a55deb1SDavid E. O'Brien	now has to be parenthesized as !(x=y), and makes others work properly:
11442a55deb1SDavid E. O'Brien	!x+y is (!x)+y, and x!y is x !y, not two pattern-action statements.
11452a55deb1SDavid E. O'Brien	(These problems were pointed out by Bob Lenk of Posix.)
11462a55deb1SDavid E. O'Brien
11472a55deb1SDavid E. O'Brien	Added \x to regular expressions (already in strings).
11482a55deb1SDavid E. O'Brien	Limited octal to octal digits; \8 and \9 are not octal.
11492a55deb1SDavid E. O'Brien	Centralized the code for parsing escapes in regular expressions.
11502a55deb1SDavid E. O'Brien	Added a bunch of tests to T.re and T.sub to verify some of this.
11512a55deb1SDavid E. O'Brien
11522a55deb1SDavid E. O'BrienFeb 9, 1990:
11532a55deb1SDavid E. O'Brien	fixed null pointer dereference bug in main.c:  -F[nothing].  sigh.
11542a55deb1SDavid E. O'Brien
11552a55deb1SDavid E. O'Brien	restored srand behavior:  it returns the current seed.
11562a55deb1SDavid E. O'Brien
11572a55deb1SDavid E. O'BrienJan 18, 1990:
11582a55deb1SDavid E. O'Brien	srand now returns previous seed value (0 to start).
11592a55deb1SDavid E. O'Brien
11602a55deb1SDavid E. O'BrienJan 5, 1990:
11612a55deb1SDavid E. O'Brien	fix potential problem in tran.c -- something was freed,
11622a55deb1SDavid E. O'Brien	then used in freesymtab.
11632a55deb1SDavid E. O'Brien
11642a55deb1SDavid E. O'BrienOct 18, 1989:
11652a55deb1SDavid E. O'Brien	another try to get the max number of open files set with
11662a55deb1SDavid E. O'Brien	relatively machine-independent code.
11672a55deb1SDavid E. O'Brien
11682a55deb1SDavid E. O'Brien	small fix to input() in case of multiple reads after EOF.
11692a55deb1SDavid E. O'Brien
11702a55deb1SDavid E. O'BrienOct 11, 1989:
11712a55deb1SDavid E. O'Brien	FILENAME is now defined in the BEGIN block -- too many old
11722a55deb1SDavid E. O'Brien	programs broke.
11732a55deb1SDavid E. O'Brien
11742a55deb1SDavid E. O'Brien	"-" means stdin in getline as well as on the commandline.
11752a55deb1SDavid E. O'Brien
11762a55deb1SDavid E. O'Brien	added a bunch of casts to the code to tell the truth about
11772a55deb1SDavid E. O'Brien	char * vs. unsigned char *, a right royal pain.  added a
11782a55deb1SDavid E. O'Brien	setlocale call to the front of main, though probably no one
11792a55deb1SDavid E. O'Brien	has it usefully implemented yet.
11802a55deb1SDavid E. O'Brien
11812a55deb1SDavid E. O'BrienAug 24, 1989:
11822a55deb1SDavid E. O'Brien	removed redundant relational tests against nullnode if parse
11832a55deb1SDavid E. O'Brien	tree already had a relational at that point.
11842a55deb1SDavid E. O'Brien
11852a55deb1SDavid E. O'BrienAug 11, 1989:
11862a55deb1SDavid E. O'Brien	fixed bug:  commandline variable assignment has to look like
11872a55deb1SDavid E. O'Brien	var=something.  (consider the man page for =, in file =.1)
11882a55deb1SDavid E. O'Brien
11892a55deb1SDavid E. O'Brien	changed number of arguments to functions to static arrays
11902a55deb1SDavid E. O'Brien	to avoid repeated malloc calls.
11912a55deb1SDavid E. O'Brien
11922a55deb1SDavid E. O'BrienAug 2, 1989:
11932a55deb1SDavid E. O'Brien	restored -F (space) separator
11942a55deb1SDavid E. O'Brien
11952a55deb1SDavid E. O'BrienJul 30, 1989:
11962a55deb1SDavid E. O'Brien	added -v x=1 y=2 ... for immediate commandline variable assignment;
11972a55deb1SDavid E. O'Brien	done before the BEGIN block for sure.  they have to precede the
11982a55deb1SDavid E. O'Brien	program if the program is on the commandline.
11992a55deb1SDavid E. O'Brien	Modified Aug 2 to require a separate -v for each assignment.
12002a55deb1SDavid E. O'Brien
12012a55deb1SDavid E. O'BrienJul 10, 1989:
12022a55deb1SDavid E. O'Brien	fixed ref-thru-zero bug in environment code in tran.c
12032a55deb1SDavid E. O'Brien
12042a55deb1SDavid E. O'BrienJun 23, 1989:
12052a55deb1SDavid E. O'Brien	add newline to usage message.
12062a55deb1SDavid E. O'Brien
12072a55deb1SDavid E. O'BrienJun 14, 1989:
12082a55deb1SDavid E. O'Brien	added some missing ansi printf conversion letters: %i %X %E %G.
12092a55deb1SDavid E. O'Brien	no sensible meaning for h or L, so they may not do what one expects.
12102a55deb1SDavid E. O'Brien
12112a55deb1SDavid E. O'Brien	made %* conversions work.
12122a55deb1SDavid E. O'Brien
12132a55deb1SDavid E. O'Brien	changed x^y so that if n is a positive integer, it's done
12142a55deb1SDavid E. O'Brien	by explicit multiplication, thus achieving maximum accuracy.
12152a55deb1SDavid E. O'Brien	(this should be done by pow() but it seems not to be locally.)
12162a55deb1SDavid E. O'Brien	done to x ^= y as well.
12172a55deb1SDavid E. O'Brien
12182a55deb1SDavid E. O'BrienJun 4, 1989:
12192a55deb1SDavid E. O'Brien	ENVIRON array contains environment: if shell variable V=thing,
12202a55deb1SDavid E. O'Brien		ENVIRON["V"] is "thing"
12212a55deb1SDavid E. O'Brien
12222a55deb1SDavid E. O'Brien	multiple -f arguments permitted.  error reporting is naive.
12232a55deb1SDavid E. O'Brien	(they were permitted before, but only the last was used.)
12242a55deb1SDavid E. O'Brien
12252a55deb1SDavid E. O'Brien	fixed a really stupid botch in the debugging macro dprintf
12262a55deb1SDavid E. O'Brien
12272a55deb1SDavid E. O'Brien	fixed order of evaluation of commandline assignments to match
12282a55deb1SDavid E. O'Brien	what the book claims:  an argument of the form x=e is evaluated
12292a55deb1SDavid E. O'Brien	at the time it would have been opened if it were a filename (p 63).
12302a55deb1SDavid E. O'Brien	this invalidates the suggested answer to ex 4-1 (p 195).
12312a55deb1SDavid E. O'Brien
12322a55deb1SDavid E. O'Brien	removed some code that permitted -F (space) fieldseparator,
12332a55deb1SDavid E. O'Brien	since it didn't quite work right anyway.  (restored aug 2)
12342a55deb1SDavid E. O'Brien
12352a55deb1SDavid E. O'BrienApr 27, 1989:
12362a55deb1SDavid E. O'Brien	Line number now accumulated correctly for comment lines.
12372a55deb1SDavid E. O'Brien
12382a55deb1SDavid E. O'BrienApr 26, 1989:
12392a55deb1SDavid E. O'Brien	Debugging output now includes a version date,
12402a55deb1SDavid E. O'Brien	if one compiles it into the source each time.
12412a55deb1SDavid E. O'Brien
12422a55deb1SDavid E. O'BrienApr 9, 1989:
12432a55deb1SDavid E. O'Brien	Changed grammar to prohibit constants as 3rd arg of sub and gsub;
12442a55deb1SDavid E. O'Brien	prevents class of overwriting-a-constant errors.  (Last one?)
12452a55deb1SDavid E. O'Brien	This invalidates the "banana" example on page 43 of the book.
12462a55deb1SDavid E. O'Brien
12472a55deb1SDavid E. O'Brien	Added \a ("alert"), \v (vertical tab), \xhhh (hexadecimal),
12482a55deb1SDavid E. O'Brien	as in ANSI, for strings.  Rescinded the sloppiness that permitted
12492a55deb1SDavid E. O'Brien	non-octal digits in \ooo.  Warning:  not all compilers and libraries
12502a55deb1SDavid E. O'Brien	will be able to deal with \x correctly.
12512a55deb1SDavid E. O'Brien
12522a55deb1SDavid E. O'BrienJan 9, 1989:
12532a55deb1SDavid E. O'Brien	Fixed bug that caused tempcell list to contain a duplicate.
12542a55deb1SDavid E. O'Brien	The fix is kludgy.
12552a55deb1SDavid E. O'Brien
12562a55deb1SDavid E. O'BrienDec 17, 1988:
12572a55deb1SDavid E. O'Brien	Catches some more commandline errors in main.
12582a55deb1SDavid E. O'Brien	Removed redundant decl of modf in run.c (confuses some compilers).
12592a55deb1SDavid E. O'Brien	Warning:  there's no single declaration of malloc, etc., in awk.h
12602a55deb1SDavid E. O'Brien	that seems to satisfy all compilers.
12612a55deb1SDavid E. O'Brien
12622a55deb1SDavid E. O'BrienDec 7, 1988:
12632a55deb1SDavid E. O'Brien	Added a bit of code to error printing to avoid printing nulls.
12642a55deb1SDavid E. O'Brien	(Not clear that it actually would.)
12652a55deb1SDavid E. O'Brien
12662a55deb1SDavid E. O'BrienNov 27, 1988:
12672a55deb1SDavid E. O'Brien	With fear and trembling, modified the grammar to permit
12682a55deb1SDavid E. O'Brien	multiple pattern-action statements on one line without
12692a55deb1SDavid E. O'Brien	an explicit separator.  By definition, this capitulation
12702a55deb1SDavid E. O'Brien	to the ghost of ancient implementations remains undefined
12712a55deb1SDavid E. O'Brien	and thus subject to change without notice or apology.
12722a55deb1SDavid E. O'Brien	DO NOT COUNT ON IT.
12732a55deb1SDavid E. O'Brien
12742a55deb1SDavid E. O'BrienOct 30, 1988:
12752a55deb1SDavid E. O'Brien	Fixed bug in call() that failed to recover storage.
12762a55deb1SDavid E. O'Brien
12772a55deb1SDavid E. O'Brien	A warning is now generated if there are more arguments
12782a55deb1SDavid E. O'Brien	in the call than in the definition (in lieu of fixing
12792a55deb1SDavid E. O'Brien	another storage leak).
12802a55deb1SDavid E. O'Brien
12812a55deb1SDavid E. O'BrienOct 20, 1988:
12822a55deb1SDavid E. O'Brien	Fixed %c:  if expr is numeric, use numeric value;
12832a55deb1SDavid E. O'Brien	otherwise print 1st char of string value.  still
12842a55deb1SDavid E. O'Brien	doesn't work if the value is 0 -- won't print \0.
12852a55deb1SDavid E. O'Brien
12862a55deb1SDavid E. O'Brien	Added a few more checks for running out of malloc.
12872a55deb1SDavid E. O'Brien
12882a55deb1SDavid E. O'BrienOct 12, 1988:
12892a55deb1SDavid E. O'Brien	Fixed bug in call() that freed local arrays twice.
12902a55deb1SDavid E. O'Brien
12912a55deb1SDavid E. O'Brien	Fixed to handle deletion of non-existent array right;
12922a55deb1SDavid E. O'Brien	complains about attempt to delete non-array element.
12932a55deb1SDavid E. O'Brien
12942a55deb1SDavid E. O'BrienSep 30, 1988:
12952a55deb1SDavid E. O'Brien	Now guarantees to evaluate all arguments of built-in
12962a55deb1SDavid E. O'Brien	functions, as in C;  the appearance is that arguments
12972a55deb1SDavid E. O'Brien	are evaluated before the function is called.  Places
12982a55deb1SDavid E. O'Brien	affected are sub (gsub was ok), substr, printf, and
12992a55deb1SDavid E. O'Brien	all the built-in arithmetic functions in bltin().
13002a55deb1SDavid E. O'Brien	A warning is generated if a bltin() is called with
13012a55deb1SDavid E. O'Brien	the wrong number of arguments.
13022a55deb1SDavid E. O'Brien
13032a55deb1SDavid E. O'Brien	This requires changing makeprof on p167 of the book.
13042a55deb1SDavid E. O'Brien
13052a55deb1SDavid E. O'BrienAug 23, 1988:
13062a55deb1SDavid E. O'Brien	setting FILENAME in BEGIN caused core dump, apparently
13072a55deb1SDavid E. O'Brien	because it was freeing space not allocated by malloc.
13082a55deb1SDavid E. O'Brien
13092a55deb1SDavid E. O'BrienJuly 24, 1988:
13102a55deb1SDavid E. O'Brien	fixed egregious error in toupper/tolower functions.
13112a55deb1SDavid E. O'Brien	still subject to rescinding, however.
13122a55deb1SDavid E. O'Brien
13132a55deb1SDavid E. O'BrienJuly 2, 1988:
13142a55deb1SDavid E. O'Brien	flush stdout before opening file or pipe
13152a55deb1SDavid E. O'Brien
13162a55deb1SDavid E. O'BrienJuly 2, 1988:
13172a55deb1SDavid E. O'Brien	performance bug in b.c/cgoto(): not freeing some sets of states.
13182a55deb1SDavid E. O'Brien	partial fix only right now, and the number of states increased
13192a55deb1SDavid E. O'Brien	to make it less obvious.
13202a55deb1SDavid E. O'Brien
13212a55deb1SDavid E. O'BrienJune 1, 1988:
13222a55deb1SDavid E. O'Brien	check error status on close
13232a55deb1SDavid E. O'Brien
13242a55deb1SDavid E. O'BrienMay 28, 1988:
13252a55deb1SDavid E. O'Brien	srand returns seed value it's using.
13262a55deb1SDavid E. O'Brien	see 1/18/90
13272a55deb1SDavid E. O'Brien
13282a55deb1SDavid E. O'BrienMay 22, 1988:
13292a55deb1SDavid E. O'Brien	Removed limit on depth of function calls.
13302a55deb1SDavid E. O'Brien
13312a55deb1SDavid E. O'BrienMay 10, 1988:
13322a55deb1SDavid E. O'Brien	Fixed lib.c to permit _ in commandline variable names.
13332a55deb1SDavid E. O'Brien
13342a55deb1SDavid E. O'BrienMar 25, 1988:
13352a55deb1SDavid E. O'Brien	main.c fixed to recognize -- as terminator of command-
13362a55deb1SDavid E. O'Brien	line options.  Illegal options flagged.
13372a55deb1SDavid E. O'Brien	Error reporting slightly cleaned up.
13382a55deb1SDavid E. O'Brien
13392a55deb1SDavid E. O'BrienDec 2, 1987:
13402a55deb1SDavid E. O'Brien	Newer C compilers apply a strict scope rule to extern
13412a55deb1SDavid E. O'Brien	declarations within functions.  Two extern declarations in
13422a55deb1SDavid E. O'Brien	lib.c and tran.c have been moved to obviate this problem.
13432a55deb1SDavid E. O'Brien
13442a55deb1SDavid E. O'BrienOct xx, 1987:
13452a55deb1SDavid E. O'Brien	Reluctantly added toupper and tolower functions.
13462a55deb1SDavid E. O'Brien	Subject to rescinding without notice.
13472a55deb1SDavid E. O'Brien
13482a55deb1SDavid E. O'BrienSep 17, 1987:
13492a55deb1SDavid E. O'Brien	Error-message printer had printf(s) instead of
13502a55deb1SDavid E. O'Brien	printf("%s",s);  got core dumps when the message
13512a55deb1SDavid E. O'Brien	included a %.
13522a55deb1SDavid E. O'Brien
13532a55deb1SDavid E. O'BrienSep 12, 1987:
13542a55deb1SDavid E. O'Brien	Very long printf strings caused core dump;
13552a55deb1SDavid E. O'Brien	fixed aprintf, asprintf, format to catch them.
13562a55deb1SDavid E. O'Brien	Can still get a core dump in printf itself.
13572a55deb1SDavid E. O'Brien
13582a55deb1SDavid E. O'Brien
1359