Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!tektronix!tekcrl!tekfdi!videovax!stever From: stever@videovax.Tek.COM (Steven E. Rice, P.E.) Newsgroups: comp.sys.amiga Subject: vt100 version 2.7 and Lattice 3.03 Message-ID: <4691@videovax.Tek.COM> Date: Sat, 21-Nov-87 02:07:31 EST Article-I.D.: videovax.4691 Posted: Sat Nov 21 02:07:31 1987 Date-Received: Mon, 23-Nov-87 03:11:28 EST References: <2037@umd5.umd.edu> <9046@oliveb.UUCP> Reply-To: stever@videovax.Tek.COM (Steven E. Rice, P.E.) Organization: Tektronix Television Systems, Beaverton, Oregon Lines: 63 Summary: One minor change. . . A year or so ago, a sometime bug in an early version of vt100 was traced to improper code generated by the Lattice 3.03 compiler when it encountered a construct of the form: FooBaz[n+1] = something; This was fixed by the simple expedient of creating a new variable, nplus1, and doing the following (if you don't believe me, grep init.c for "nplus1"!). nplus1 = n + 1; FooBaz[nplus1] = something; An expression with a potential for causing this problem cropped up in vt100, version 2.7, in expand.c. A diff file to circumvent the problem (for those who, like me, are stuck with Lattice 3.03) follows: *** Original/expand.c Mon Oct 5 17:13:37 1987 --- expand.c Fri Nov 20 22:30:10 1987 *************** *** 293,298 { register char *s; int i; struct FileLock *lock; char temp[60]; struct FileInfoBlock *fib; --- 293,299 ----- { register char *s; int i; + int iplus1; struct FileLock *lock; char temp[60]; struct FileInfoBlock *fib; *************** *** 305,311 for (i=strlen(MyDir); MyDir[i] != '/' && MyDir[i] != ':'; i--); ! MyDir[i+1] = '\0'; strcat(MyDir, s); } else if (exists(s, ':') == 0) { --- 306,313 ----- for (i=strlen(MyDir); MyDir[i] != '/' && MyDir[i] != ':'; i--); ! iplus1 = i + 1; ! MyDir[iplus1] = '\0'; strcat(MyDir, s); } else if (exists(s, ':') == 0) { Steve Rice ----------------------------------------------------------------------------- new: stever@videovax.tv.Tek.com old: {decvax | hplabs | ihnp4 | uw-beaver}!tektronix!videovax!stever