[net.micro.amiga] Wecker's VT-100 emulator and Lattice C

banks@viking.dec.com (08/04/86)

Re: Making Wecker's VT-100 work with Lattice C:

We've been successfully running said terminal emulator, compiled with Lattice
for a few days now.  It wasn't too hard to get it to work, although we still
haven't gotten around to getting the Kermit code to work.  In general, we
brute forced a few undefined routines (make getenv be a null routine, etc).
That much is pretty obvious.

The show stopping bugs are related to bugs in Lattice C.  The first is 3.03's
inability to deal with [n+1], a construct which appears in many places in the
initialization module.  Declare m, m=n+1, replace [n+1] with [m] in all the
places, and it successfully initializes.

The second big bug is that Lattice sscanf always stores a long value, even if
you didn't say "l" in the format string.  The original VT-100 emulator code
sscanfs into short ints, causing random memory to be overwritten when Lattice
stores the longword instead.  The solution is simple enough:  search for all
the scanf calls, and replace the definitions for all the scanf destinations
with "int", defaulting to the native size for whatever compiler you're using.

There are a couple of other bugs in the logic itself, which may or may not
cause a guru.  I'll post the fixes as soon as I get around to uploading them.

All in all, I think it's a pretty neat emulator.  It's the best VT-100 emulation
I've seen on an Amiga so far, and it's nice to have a full 80 columns for a
change.  Thank you very much, Mr. Wecker!

{Normal disclaimer about not representing or resenting my employer here ...}

(DEC E-NET)	Viking::Banks
(UUCP)		{decvax, ucbvax, allegra}!decwrl!dec-rhea!dec-Viking!Banks
(ARPA)		Banks%Viking.DEC@decwrl.ARPA