Unix curses-based interface for Glen Summers' Level-9 game interpreter by jim
 (jim@madeira.physiol.ucl.ac.uk).

 --- PORTING ---

For the impatient among us ... to get it to compile, you must check the
 Makefile in the top directory and uncomment the set of compiler options
 relevant to your curses implementation and OS type. curses by default
 redefines a couple of functions, so if link complains about undefined symbols
 'index' and 'rindex' you will need to uncomment the bottom set of options to
 define SYSV even if you are not on a true System-V derivative (I needed it
 under SunOS). The other vital option is the LITTLEENDIAN macro in
 os/unix-curses.c---the code checks byte sex on startup, so if level9 bombs
 with a 'compiled with wrong byte sex' message you need to change this. Other
 #defines in os/unix-curses.c are described below.

You might need to look elsewhere for ncurses.h---mine lives in
 <ncurses/curses.h>, but other programs seem to expect it to be in
 <ncurses/ncurses.h> . Perhaps it is a Slackware thing...

You also need some Level9 game files to play 8-) These can be downloaded from
 various web sites. Glen's interpreter will find valid games at any point in
 the file, so e.g. Spectrum snapshots will work.

I've managed to compile on Linux 2.0 (Slackware), SunOS 5 and AIX, so it
 should be fairly easy to port to other machines. E-mail me with your
 successes (and failures!)

 --- DESCRIPTION, OPTIONS, VARIOUS WITTERINGS ---

09-Jun-1998 Fixed a bug in restore (urg, braino) and added some code to
 simulate the Lenslok test in some games (Colossal). It will now print out the
 code before it asks you for it. You'll have to be quick, as it times out very
 fast on modern machines ... some time I'll put in a delay loop. Meanwhile, if
 it's really too fast, try slowing down your machine ... I find that starting
 a few Emacs sessions in the background works a treat 8-)

I can't imagine how a retro games package came to be distributed without a
 Unix port in the first place 8-) ... This is a couple-of-weekends hack, and I
 don't claim it to be a masterpiece of perfect code. It has a rudimentary
 command-line editor and a history list similar to that used by bash(1), which
 works as you would expect (translation: it works as I would expect had I not
 written it), so there should be no surprises there. It also has text
 justification, but it isn't all that pretty and you might want to disable
 it---use `#define JUSTIFY 0' in unix-curses.c

Other defines of interest (n.b. these are Boolean defines, not ifdef/ifndef):

 LITTLEENDIAN		signifies that the host machine is little-endian (!)
			 i.e. stores multi-byte quantities low-byte
			 low-address. (Intel, ARM). You MUST undefine this or
			 set it to 0 if you are on a big-endian machine
			 (Motorola).

 EMACS_TYPE_KEYS	allows the (default) Emacs key-bindings Ctrl-A
			 (beginning of line), Ctrl-E (end of line), Ctrl-B
			 (back 1 character), Ctrl-F (forward 1 character),
			 Ctrl-K (delete to end of line) to be used in addition
			 to the normal cursor keys during command-line
			 editing. The only reason I can see to undefine this
			 is if you are a manic Emacs-hater and don't want any
			 hint of Emacs contaminating your game 8-)

 REPRINT_FLUSHED_TEXT	controls how the justification routine deals with
			 output being flushed in the middle of a line. If this
			 is true previously-flushed output will be backed over
			 and overwritten by the justified version, otherwise
			 flushed output will always be left on the screen and
			 the justifier will do the best it can with the
			 remaining space. Reprinting looks nicer, but is a bit
			 of a squalid hack. If you don't use justification the
			 appearance won't change, so you should not use this
			 option.

 --- BUGS ---

Don't be rude 8-)

Under AIX, if I ctrl-C out of the game it leaves my xterm in an unusable
 state. Anybody care to give me feedback on this?

Command-line editing will get a bit weird if you go over the end of a line.
 I'm aware of this and will sort it when I get a round tuit. Or I might just
 disallow multi-line editing.

Text justify isn't very sophisticated. I'd like to have the spaces following
 punctuation to be expanded in preference to others.
