Re: Zip V8 (Re-releasing Zip)


Fri, 17 Nov 1995 11:33:39 -0500

Bruce Stephens <bruce@liverpool.ac.uk> writes:
> So make this part of the "user-interface" part too. I think it would
> be nice to have the core code without any nasty #ifdef's (but having a
> configuration header file defining suitable datatypes for the various
> sizes of ints and things required, preferably done using Autoconf,
> with some machine specific ones for machines which can't run Autoconf
> (I can do the Autoconf bit if nobody else is familiar with it)), and
> to cleanly separate out the machine/user-interface stuff.

On this topic, I'll mention that I was right -- the biggest change ZIP
needs to support a fancy story window is to turn off word wrapping. I
did this very simply: I commented out
extern char *line;
in ztypes.h, and
char *line = NULL;
in extern.c. (That's the global variable where the word-wrapping
buffer is stored.) Then I started recompiling, and commented out any
code that produced an undefined variable error. :-)

It would be keen if the ZIP source had #ifdefs to support this; I
could then upgrade my source just about by copying new ZIP source
files in. (Except for osdepend.c, of course.)

Oh, the other noticeable change I've made (outside of machine-specific
code) is to allow the user to specify a saved game to restore when the
interpreter starts up. This would be a new argument in generic code
(it's weirder on the Mac) which sets a flag and a global filename; in
main(), after the call to restart(), I check the flag, and load up the
saved game if it's set. Then on to interpret() as usual.

--Z

"And Aholibamah bare Jeush, and Jaalam, and Korah: these were the borogoves..."