Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!seismo!elsie!ado From: ado@elsie.UUCP Newsgroups: comp.bugs.4bsd,comp.unix.wizards Subject: Re: awk bug, fix wanted (bsd42 maybe others too) Message-ID: <7369@elsie.UUCP> Date: Wed, 25-Mar-87 23:00:05 EST Article-I.D.: elsie.7369 Posted: Wed Mar 25 23:00:05 1987 Date-Received: Fri, 27-Mar-87 06:18:31 EST References: <309@bsiao.UUCP> Organization: NIH-LEC, Bethesda, MD Lines: 44 Xref: utgpu comp.bugs.4bsd:244 comp.unix.wizards:1540 Summary: Fix > [A] call to awk (to be used in a shell script) gives the > error message 'funny variable' when called with a parameter >49. The fix is to the file lib.c in the awk source directory. As usual, the trade secret status of the code involved precludes a clearer posting. *** OLD/lib.c Wed Mar 25 22:54:04 1987 --- NEW/lib.c Wed Mar 25 22:53:54 1987 *************** *** 1,4 **** --- 1,11 ---- + #ifndef ASWAS #ifndef lint + #ifndef NOID + static char elsieid[] = "@(#)lib.c 3.4"; + #endif /* !NOID */ + #endif /* !lint */ + #endif /* !ASWAS */ + #ifndef lint static char sccsid[] = "@(#)lib.c 4.4 9/17/84"; #endif *************** *** 40,45 **** --- 47,59 ---- extern char **svargv; register c, sep; + #ifndef ASWAS + static int did; + + if (did == 0) + for (did = 2; did < sizeof fldtab / sizeof fldtab[0]; ++did) + fldtab[did] = fldtab[1]; + #endif /* !ASWAS */ dprintf("**RS=%o, **FS=%o\n", **RS, **FS, NULL); donefld = 0; donerec = 1; -- "We must choose: the stars or the starving. Which shall it be?" UUCP: ..seismo!elsie!ado ARPA: elsie!ado@seismo.ARPA Elsie and Ado are trademarks of Borden, Inc. and Ampex.