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