> 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. :-)
You could also #ifdef out fit_line(), and provide your own which
always returns 1.
> 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.
A related extra feature would be to provide hooks in the save_undo,
restore_undo parts, to allow the interface to give a bit of memory to
do the saving and restoring in. (Or just have the save_undo tell the
interface about the id of a saved state, for a more object-oriented
feel.) That would allow interfaces to keep multiple levels of undo,
on machines where that was sensible. It would also help if the core
adopted something like what Bryan Scattergood's Psion interpreter
does, so that saved states were ~2K rather than ~40K (Graham Nelson's
Specification gives a hint).
-- Bruce Institute of Advanced Scientific Computation bruce@liverpool.ac.uk University of Liverpool http://supr.scm.liv.ac.uk/~bruce/