[net.sources.games] Adventures

chris@umcp-cs.UUCP (Chris Torek) (08/01/85)

For some reason, this stuff resurfaced recently, and I decided to
clean it up a little and post it.  What it is is the original Scott
Adams adventure, "Adventure Land", and Alexis Adams' "Pirate's
Adventure".  These were published long ago in Creative Computing,
in (ugh) BASIC.  One of the first things I wrote in C was something
to do a similar job.  I also transcribed the data files for the
two adventures.  (By the way, I should mention that I use a sort
of adventure compiler to turn a slightly more readable source
format into the data files given here.)

The code is quite old, and there are a lot of things I would do
differently if I were to really rewrite it, but it does work.  You
will need the Maryland Windows package (by yours truly) to run it.
(I originally used curses, but the display update was just too
painful.  I imagine it could be converted back without too much
effort.)

(Manual entry?  What manual entry?)
-----------------------snip snip snip---------------------------
: Run this shell script with "sh" not "csh"
PATH=:/bin:/usr/bin:/usr/ucb
export PATH
all=FALSE
if [ $1x = -ax ]; then
	all=TRUE
fi
/bin/echo 'Making directory "adv"'
mkdir adv
/bin/echo 'Extracting adv/Makefile'
sed 's/^X//' <<'//go.sysin dd *' >adv/Makefile
DESTDIR=
CFLAGS=	-O
OBJS=	main.o alc.o str.o readin.o nxtwrd.o rdr.o init.o\
	play.o misc.o prt.o file.o disply.o
SRCS=	main.c alc.c str.c readin.c nxtwrd.c rdr.c init.c\
	play.c misc.c prt.c file.c disply.c

adv:	$(OBJS)
	$(CC) $(CFLAGS) -o adv $(OBJS) -lwinlib -ltermlib

$(OBJS): adv.h

lint:
	lint -h adv.h $(SRCS)
	
list:
	llist -t adv DOC adv.h $(SRCS)

clean:
	rm -f core *.o adv

install: adv
	install -s adv $(DESTDIR)/usr/local/bin/adv

depend:
//go.sysin dd *
made=TRUE
if [ $made = TRUE ]; then
	/bin/chmod 644 adv/Makefile
	/bin/echo -n '	'; /bin/ls -ld adv/Makefile
fi
/bin/echo 'Extracting adv/adv.h'
sed 's/^X//' <<'//go.sysin dd *' >adv/adv.h
#include <stdio.h>
#include <local/window.h>

#define	refresh() (WRCurRow = BaseWin->w_cursor.row, \
		   WRCurCol = BaseWin->w_cursor.col, \
		   Wrefresh(0))

#define BOOL		char
#ifndef TRUE
# define TRUE		1
# define FALSE		0
#endif
#define	when		break; case
#define	iconv(c)	((c) & 255)
#define	skpwht(s)	while (*(s) == ' ' || *(s) == '\t') (s)++
#define	alcz(v)		alc(v, 1)
#define	alcnz(v)	alc(v, 0)
#define	lighted(ruum)	(items[lititm].rm == -1 || items[lititm].rm == (ruum))
#define	LINELEN		256
X/*#define DEBUG*/

#ifdef DEBUG
#define PDEBUG	/* Playing-debugging */
#endif

FILE	*file;			/* Adventure file for reader */
Win	*TopWin;		/* Top window - room description */
Win	*BaseWin;		/* Base window - commands, etc */
int	ROWS, COLS;		/* Screen size */
int	ReadingTerminal;	/* True => in a getchar() */
int	rm;			/* Current room */
int	i_rm;			/* Initial room */
int	trsrm;			/* Treasure room */
int	tottrs;			/* Total treasures */
int	wrdsiz;			/* Significant letters in words */
int	hellrm;			/* "Hell" room # */
int	nitems;			/* # items */
int	nrooms;			/* # rooms */
int	npcts;			/* # %s */
int	nactns;			/* # actns */
int	nverbs;			/* # verbs */
int	nobjs;			/* # objs */
int	nmsgs;			/* # msgs */
int	verbv;			/* Verb wordvalue */
int	objv;			/* Object wordvalue if any */
int	lititm;			/* Lit lamp item # */
int	littim;			/* Current light time */
int	litmax;			/* Max light time */
int	warnpt;			/* When to say 'light runs out...' */
int	maxinv;			/* Max carry */

struct room {
	int dirs[6];		/* Where to - NSEWUD */
	BOOL dark;		/* Set if it's dark */
	char *desc;		/* Room description */
} *rooms, *roome;

struct item {
	int i_rm, rm;		/* Initial/Current Rooms */
	char *name;		/* Name by which to GET */
	char *desc;		/* Description */
} *items, *iteme;

struct word {
	int val;		/* Value */
	char *word;		/* Word */
};

struct word *verbs, *verbe;
struct word *objs, *obje;
char	**pct,			/* Base addr for %s */
	**actn,			/* Base addr for actions */
	**msg,			/* Base addr for msgs */
	*name,			/* The poor sap's name */
	*dirs[6],		/* Names of directions */
	*toomch,		/* "I've too much to carry" */
	*qcom,			/* Special commands/objects */
	*scom,
	*lcom,
	*gobj,
	var[256],		/* Gen. purpose vars/flags */
	fname[LINELEN+1];	/* The source adventure file */
char	linebuf[LINELEN+1],
	buf2[LINELEN+1];
BOOL	isdark,			/* If it's dark */
	isend;			/* Set when game done */

char *strsav(), *alc(), *rdr(), *nxtwrd(), *itoa();
//go.sysin dd *
made=TRUE
if [ $made = TRUE ]; then
	/bin/chmod 644 adv/adv.h
	/bin/echo -n '	'; /bin/ls -ld adv/adv.h
fi
/bin/echo 'Extracting adv/alc.c'
sed 's/^X//' <<'//go.sysin dd *' >adv/alc.c
X/*
 * Return pointer to len bytes (if zero, set to 0).
 */

#include "adv.h"

#ifdef SYS5
#define bzero(addr, len) memcpy(addr, 0, len)
#endif

char *
alc(len, zero)
	int len, zero;
{
	register char *s;
	char *malloc();

	s = malloc(len);
	if (s == NULL) {
		perror("adv: out of memory");
		if (TopWin != NULL)
			Wexit(100);
		exit(100);
	}
#ifdef DEBUG
	printf ("Allocated %d bytes at %X (%szeroed)\n", len, (long)s,
	    zero ? "" : "not ");
#endif
	if (zero)
		bzero(s, len);
	return (s);
}
//go.sysin dd *
made=TRUE
if [ $made = TRUE ]; then
	/bin/chmod 644 adv/alc.c
	/bin/echo -n '	'; /bin/ls -ld adv/alc.c
fi
/bin/echo 'Extracting adv/disply.c'
sed 's/^X//' <<'//go.sysin dd *' >adv/disply.c
#include "adv.h"

extern int (*nl_proc)();	/* called by prt before writing newline */

static int dlleft;		/* display lines left */
static int fullsize = TRUE;	/* true => top window is full screen */

X/*
 * Before prt dumps a newline into the top window, prt calls this
 * routine.  We make sure that there is enough room in the top
 * window, enlarging it if necessary.
 */
dl_newline()
{

	if (fullsize)		/* already as big as possible */
		return;
	if (--dlleft > 0)	/* top window still has room left */
		return;
	Wsize(TopWin, COLS, ROWS);
	fullsize = TRUE;
}

X/*
 * Display the current room in the top window.
 */
disply()
{
	register int temp, i;
	register struct room *rp;
	register struct item *ip;
	register char *s;
	static int f1, f2, f3, f4, f5, f6, f7, f8;
	int (*oldnlproc)();

	/*
	 * Fetch the window frame characters if we haven't got them
	 * yet.  (This needs to be done another way; someday I'll
	 * finish rewriting windows.)
	 */
	if (f1 == 0)
		Wgetframe(&f1, &f2, &f3, &f4, &f5, &f6, &f7, &f8);

	/*
	 * Flush pending line (if any).  Switch output to top window,
	 * and clear it.
	 */
	prt(0);			/* Flush pending output */
	CurWin = TopWin;	/* prt() sends to CurWin */
	Wclear(TopWin, 2);
	WAcursor(TopWin, 0, 0);

	/*
	 * We now have TopWin->IYE lines available to us for printing
	 * description text.  Set the newline procedure so that we can
	 * enlarge the top window if necessary.
	 */
	dlleft = TopWin->IYE;
	oldnlproc = nl_proc;
	nl_proc = dl_newline;

	/*
	 * If it's dark, just say so.  Otherwise find all the items
	 * in the room and display their descriptions.
	 */
	if (isdark) {
		prt("I can't see, it's too dark.\n");
		goto cleanup;
	}
	rp = &rooms[rm];
	s = rp->desc;
	if (*s == '*')
		s++;
	else
		prt("I'm in a ");
	prt(s);
	prt(".\n");
	temp = 0;
	for (ip = &items[1]; ip < iteme; ip++) {
		if (ip->rm == rm) {
			if (temp == 0) {
				temp++;
				prt("\nVisible items here: ");
			}
			else
				prt(". ");
			prt(0);		/* fix w_cursor */
			if (TopWin->w_cursor.col + strlen(ip->desc) > COLS-3)
				prt("\n");
			prt(ip->desc);
		}
	}
	if (temp)
		prt(".\n");

	/*
	 * Print the "obvious" exits.
	 */
	temp = 0;
	for (i = 0; i < 6; i++) {
		if (rp->dirs[i]) {
			if (temp == 0) {
				temp++;
				prt("\nObvious exits: ");
			}
			prt(dirs[i]);
			prt(" ");
		}
	}
	if (temp)
		prt("\n");

cleanup:
	/*
	 * Put up a nice bottom border, adjusting the window size to
	 * the number of lines used.  Set the margins so that the
	 * bottom border shows, but the rest is re-"glassed".
	 */
	temp = TopWin->w_cursor.row + 1;
	if (temp < 3)			/* this is a kludge */
		temp = 3;
	if (temp != TopWin->OYE) {	/* avoid work if possible */
		Wsize(TopWin, COLS, temp);
		Wborder(TopWin, '#', '#', '#', '#', '#', f7, f7, f7);
		Wsetmargins(TopWin, 0, 0, COLS, TopWin->OYE - 1);
		fullsize = FALSE;
	}

	/*
	 * Switch output back to the base window.
	 */
	CurWin = BaseWin;
	nl_proc = oldnlproc;		/* restore */
}
//go.sysin dd *
made=TRUE
if [ $made = TRUE ]; then
	/bin/chmod 644 adv/disply.c
	/bin/echo -n '	'; /bin/ls -ld adv/disply.c
fi
/bin/echo 'Extracting adv/file.c'
sed 's/^X//' <<'//go.sysin dd *' >adv/file.c
X/*
 * Save and load game
 */

#include "adv.h"

save()
{
	register int i;
	register FILE *fp;

	for (;;) {
		getnam();
		if (*buf2 == 0) {
			prt("Whatever you say boss!\n");
			return;
		}
		if ((fp = fopen(buf2, "w")) != NULL)
			break;
		prt("Can't open that file for writing; try again\n");
		prt("(Just hit RETURN if you changed your mind.)\n");
	}

	fprintf(fp, "%s\n", fname);
	fprintf(fp, "%d %d\n", rm, littim);
	for (i = 0; i < nitems; i++)
		fprintf(fp, "%d ", items[i].rm);
	fputs("\n:v\n", fp);
	fwrite(var, sizeof var, 1, fp);
	if (ferror(fp))
		prt("WARNING: error writing file\n");
	fclose(fp);
}

X/*
 * As a hack, we just compare the last component of a filename, since
 * Unix lets people use "../../foo" or "/usr/chris/foo" to mean the
 * same file.  Not 100% correct but probably good enough....
 */
static char *
tail(s)
	register char *s;
{
	register char *p = s;

	while (*p)
		if (*p++ == '/' && *p != '/' && *p)
			s = p;
	return (s);
}

load()
{
	register int i;
	register FILE *fp;

	for (;;) {
		getnam();
		if (*buf2 == 0) {
			prt("Ok\n");
			return;
		}
		if ((fp = fopen(buf2, "r")) != NULL) {
			fgets(buf2, sizeof buf2, fp);
			buf2[strlen(buf2) - 1] = 0;
			if (strcmp(tail(buf2), tail(fname)) == 0)
				break;
			prt("That file isn't for this adventure.\n");
		}
		else {
			prt("No such file; try again\n");
			prt("(Just hit RETURN to get out of this mode.)\n");
		}
	}

	(void) fscanf(fp, "%d%d", &rm, &littim);
	for (i = 0; i < nitems; i++)
		(void) fscanf(fp, "%d", &items[i].rm);
	while ((i = getc(fp)) != ':' && i != EOF)
		;
	if (i != ':' || getc(fp) != 'v' || getc (fp) != '\n') {
		prt("Strange file!\n");
		isend = TRUE;	/* abort, stuff probably clobbered */
	}
	else {
		fread(var, sizeof var, 1, fp);
		if (feof(fp)) {
			prt("Unexpected EOF!\n");
			isend = TRUE;
		}
	}
	fclose(fp);
}

X/*
 * Filename expansion hack: if the filename contains "glob" characters,
 * call the shell to expand the name.
 */
#define	ISGLOB(c)	((c) == '[' || (c) == '*' || (c) == '`' ||\
			 (c) == '?' || (c) == '{' || (c) == '$')

getnam()
{
	register int i;
	register char *s;
	int pid, pvec[2], status;
	char ch;

	/* Get a name from him */

	prt("Filename: ");
	prt(0);
	wgets(buf2, sizeof buf2 - 8);
	if (*buf2 != '~') {
		for (s = buf2; *s; s++)
			if (ISGLOB(*s))
				break;
		if (*s == 0)	/* No funny characters! */
			return;
	}

	/* Now have the C shell (sigh) glob it for us */
	if (pipe(pvec) < 0) {
nope:
		prt("[can't call csh; name not expanded]\n");
		return;
	}
	if ((pid = fork()) < 0) {
		close(pvec[0]);
		close(pvec[1]);
		goto nope;
	}
	for (i = strlen(buf2) + 1; i >= 0; --i)
		buf2[i+5] = buf2[i];
	buf2[0] = 'e';
	buf2[1] = 'c';
	buf2[2] = 'h';
	buf2[3] = 'o';
	buf2[4] = ' ';
	if (pid == 0) {
		dup2(pvec[1], 1);
		close(pvec[0]);
		close(2);		/* errors just disappear */
		open("/dev/null", 1);
		execl("/bin/csh", "csh", "-c", buf2, 0);
		_exit(1);
	}
	close(pvec[1]);
	while(wait (&status) != pid)	/* Let it run */
		;
	if (status) {
		prt("Warning: csh failed; name not expanded!\n");
		strcpy(buf2, buf2+5);
	}
	else {
		/*
		 * Efficiency?  What efficiency?
		 */
		i = 0;
		while (read(pvec[0], &ch, 1) == 1 && ch != ' ' && ch != '\n')
			buf2[i++] = ch;
		if (ch)
			buf2[i] = 0;
	}
	close(pvec[0]);
}
//go.sysin dd *
made=TRUE
if [ $made = TRUE ]; then
	/bin/chmod 644 adv/file.c
	/bin/echo -n '	'; /bin/ls -ld adv/file.c
fi
/bin/echo 'Extracting adv/init.c'
sed 's/^X//' <<'//go.sysin dd *' >adv/init.c
#include "adv.h"

X/*
 * Initialize game variables.  Move to init room; carrying nothing;
 * light has full time; move items to initial rooms; set vars to 0.
 * Clear the base window and print the startup message.
 */
init()
{
	register int i;
	register struct item *ip;

	rm = i_rm;
	littim = litmax;
	for (ip = items; ip < iteme; ip++)
		ip->rm = ip->i_rm;
	for (i = 0; i < 256; ++i)
		var[i] = 0;
	isend = FALSE;

	CurWin = BaseWin;
	Wclear(BaseWin, 2);
	WAcursor(BaseWin, ROWS - 1, 0);
	prt(msg[0]);
	prt("\n");
}
//go.sysin dd *
made=TRUE
if [ $made = TRUE ]; then
	/bin/chmod 644 adv/init.c
	/bin/echo -n '	'; /bin/ls -ld adv/init.c
fi
/bin/echo 'Extracting adv/main.c'
sed 's/^X//' <<'//go.sysin dd *' >adv/main.c
X/*
 * Adventure Driver Program
 *
 * Version 1.0, 29 December 1981
 * Chris Torek
 * advent [-name] [adventure file]
 *
 * Lots of hacks sometime in '85
 */

#include "adv.h"
#undef TRUE
#undef FALSE
#undef LL
#include <pwd.h>
#include <ctype.h>
#include <signal.h>

int IntCatch();
char *getlogin();
struct passwd *getpwuid();

X/*
 * Start up.  Handle the single option ("-username"), get the
 * name of the adventure file, and run it.
 */
main(argc, argv)
	register argc;
	register char **argv;
{
	register int c;

	++argv;
	if (argc > 1 && **argv == '-') {
		--argc;
		name = (*argv++) + 1;
	}
	else {
		name = getlogin();
		if (name == 0) {
			struct passwd *p = getpwuid(getuid());

			if (p)
				name = p->pw_name;
			else {
				fprintf(stderr, "Who are you?\n");
				exit(1);
			}
		}
	}
	if (--argc)
		strcpy(fname, *argv);
	else {
		printf("Enter the adventure filename: ");
		fgets(fname, sizeof fname, stdin);
		fname[strlen(fname) - 1] = 0;
	}
#ifdef DEBUG
	printf ("Starting adventure %s for %s\n", fname, name);
#endif
	srand(getpid() + time((long *)0));
	file = fopen(fname, "r");
	if (file == NULL) {
		printf("There's no such adventure!\n");
		exit(1);
	}

	/*
	 * Fire up windows.
	 */
	if (Winit(0, 0)) {
		printf ("Sorry, this program won't run on your terminal.\n");
		exit(1);
	}
	printf("Hi %s, just a second while I create the world...\r\n", name);
	fflush(stdout);

	/*
	 * Get some windows and set them up our way (no cursor, nice
	 * newline mode); we'll use the real screen cursor for input.
	 * N.B.: it is important that TopWin is initially as large as
	 * the real screen.
	 */
	Wscreensize(&ROWS, &COLS);
	BaseWin = Wopen(1, 0, 0, COLS, ROWS, 0, 0);
	TopWin = Wopen(0, 0, 0, COLS, ROWS, 0, 0);
	Woncursor(BaseWin, 0);
	Woncursor(TopWin, 0);
	Wnewline(BaseWin, 1);
	Wnewline(TopWin, 1);
	WSetRealCursor++;

	/*
	 * Read in the adventure file.
	 */
	readin();

	/*
	 * All set.
	 */
#ifdef BSD41				/* 4.1 */
	sigset(SIGINT, IntCatch);
	sigset(SIGQUIT, IntCatch);
#else					/* 4.2 */
	signal(SIGINT, IntCatch);
	signal(SIGQUIT, IntCatch);
#endif
	do {
		init();
		play();
		prt("Do you wish to play again (Y/N)? ");
		prt(0);
		refresh();
		do {
			ReadingTerminal++;
			c = getchar();
			ReadingTerminal = 0;
			if (isupper(c))
				c = tolower(c);
		} while (c != 'y' && c != 'n');
		prt(c == 'n' ? "No\n" : "Yes\n");
		Wrefresh(0);
	} while (c != 'n');
	prt("Goodbye!\n");
	refresh();
	Wexit(0);
}

X/*
 * Handle interrupts - just print a message about how to quit.
 */
IntCatch()
{
	static char msg[] = " *** Use the QUIT command to quit.";

	if (ReadingTerminal == 2) {	/* print our msg in TopWin */
		WAcursor(TopWin, 1, 0);
		Wputs(msg, TopWin);
	}
	else {
		if (BaseWin->w_cursor.col)
			Wputc('\n', BaseWin);
		Wputs(msg, BaseWin);
		Wputc('\n', BaseWin);
	}
	if (ReadingTerminal)
		refresh();
}
//go.sysin dd *
made=TRUE
if [ $made = TRUE ]; then
	/bin/chmod 644 adv/main.c
	/bin/echo -n '	'; /bin/ls -ld adv/main.c
fi
/bin/echo 'Extracting adv/misc.c'
sed 's/^X//' <<'//go.sysin dd *' >adv/misc.c
#include "adv.h"
#include <ctype.h>

X/*
 * Get input line; break into words;
 * If 'verb' matches objects 1-6, make 'verb' "GO" and 'object'
 * 'verb'; else match verb/object.
 */

char	*wrdbrk();

parse()
{
	register char *vp, *op;

	for (;;) {
		vp = wrdbrk(0);
		op = wrdbrk(1);
#ifdef DEBUG
		prt("verb: %s; obj: %s\n", vp, op);
#endif
		/*
		 * Handle "save game", "load game", and "quit".
		 */
		if (strcmp(vp, scom) == 0 && strcmp(op, gobj) == 0) {
			save();
			continue;
		}
		if (strcmp(vp, lcom) == 0 && strcmp(op, gobj) == 0) {
			load();
			continue;
		}
		if (strcmp(vp, qcom) == 0) {
			isend = TRUE;
			return;
		}

		/*
		 * Convert verb & object strings to numeric equivalents.
		 */
		if (*op)
			objv = wrdval(nobjs, objs, op);
		else {
			objv = wrdval(nobjs, objs, vp);
			if (objv > 0 && objv < 7) {
				verbv = 1;/* Special hack: "go" dir */
				return;
			}
			objv = 0;
		}
		verbv = wrdval(nverbs, verbs, vp);
		if (verbv == -1 || objv == -1)
			prt("You use word(s) I don't know.\n");
		else
			return;
	}
}

X/*
 * Find a word in a wordlist
 */
wrdval(n, wl, s)
	register int n;
	register struct word *wl;
	register char *s;
{

	while (--n > 0) {
		wl++;
		if (strcmp(wl->word, s) == 0)
			return (wl->val);
	}
	return (-1);
}

X/*
 * Break off a word.  Obj is true if we can ignore the lack of a word
 * (i.e., we're looking for an object).  Words come in pairs, unless
 * separated by periods.
 */
char *wrdbrk(obj)
	int obj;
{
	register char *cp;
	char *st, *en;
	int lpcount = 0;
	static char *lp = "";
	static char inbuf[LINELEN+1];
	static BOOL per = FALSE;

	/*
	 * If we saw a period (or the end of an input line), and we're
	 * looking for an object, return the null string.
	 * In any case clear the period/end-of-line flag.
	 */
	if (per) {
		per = FALSE;
		if (obj)
			return ("");
	}

	/*
	 * Start searching from previous stop point.
	 */
	cp = lp;
	for (;;) {
		/*
		 * Find the beginning of the next word.  If there is
		 * a word, take it, and note whether it is followed by
		 * a period (or end of line).
		 */
		skpwht(cp);
		if (*cp) {
			st = cp;
			while (*cp && !isspace(*cp) && *cp != '.')
				cp++;
			en = cp;
			if (en - st > wrdsiz)
				en = st + wrdsiz;
			skpwht(cp);
			if (*cp == '.') {
				cp++;
				per = TRUE;
				skpwht(cp);
			}
			if (*cp == 0)
				per = TRUE;
			lp = cp;
			*en = 0;
			return (st);
		}

		/*
		 * Read an input line from the user.  Convert to
		 * uppercase.  (Ok, so it oughta use lowercase....)
		 */
		disply();
		prt("Tell me what to do: ");
		prt(0);
		wgets(inbuf, sizeof inbuf);
		cp = inbuf;
		while (*cp) {
			if (islower(*cp))
				*cp = toupper(*cp);
			cp++;
		}
		cp = inbuf;
	}
}

X/*
 * Let the user type in a string, but only choice characters
 * (and at most bs-1 of them).
 */
wgets(bp, bs)
	register char *bp;
	register int bs;
{
	register int nch = 0, c;
#define Ctl(c) ((c) & 0x1f)

	/*
	 * What is this doing here?
	 */
	if (COLS - CurWin->w_cursor.col > bs) {
		if (COLS - CurWin->w_cursor.col < 4)
			Wputc('\n', CurWin);
		if (COLS - CurWin->w_cursor.col > bs)
			bs = COLS - CurWin->w_cursor.col;
	}

	/*
	 * Should probably use user's editing chars, but for now...
	 */
	refresh();
	ReadingTerminal = 2;
	while ((c = getchar()) != '\n' &&c != '\r') {
		ReadingTerminal = 0;
		if (c == '\b' || c == 0177) {
			if (nch) {
				--nch;
				Wputs("\b \b", CurWin);
			}
		}
		else if (c == Ctl('u') || c == Ctl('x')) {
			while (--nch >= 0)
				Wputs("\b \b", CurWin);
			nch = 0;
		}
		else if (c == Ctl('w')) {
			while (--nch >= 0 && bp[nch] == ' ')
				Wputs("\b \b", CurWin);
			nch++;
			while (--nch >= 0 && bp[nch] != ' ')
				Wputs("\b \b", CurWin);
			nch++;
		}
		else if (c == Ctl('l'))	/* redraw screen */
			ScreenGarbaged++;
		else if (c >= ' ' && c < 0177) {
			bp[nch++] =c;
			if (nch > bs)
				--nch;
			else
				Wputc(c, CurWin);
		}
		refresh();
		ReadingTerminal = 2;
	}
	ReadingTerminal = 0;
	bp[nch] = 0;
	Wputc('\n', CurWin);
#undef Ctl
}
//go.sysin dd *
made=TRUE
if [ $made = TRUE ]; then
	/bin/chmod 644 adv/misc.c
	/bin/echo -n '	'; /bin/ls -ld adv/misc.c
fi
/bin/echo 'Extracting adv/nxtwrd.c'
sed 's/^X//' <<'//go.sysin dd *' >adv/nxtwrd.c
X/*
 * Break off the next word from the string *s; leave *s pointing
 * to the 'separator' character that ended the scan.  Return a
 * pointer to a strsav() of the word.
 */

#include "adv.h"
#include <ctype.h>

#define	notsep(c)	(c && c != ' ' && c != ',' && c != ':')

char *nxtwrd(sp, ml)
	register char **sp;
	register int ml;	/* max length */
{
	register char *bp = buf2, *s = *sp;
	register int n = 0;

	skpwht(s);		/* skip whitespace */
	while (notsep(*s)) {
		*bp++ = islower (*s) ? toupper(*s++) : *s++;
		if (++n >= ml)
			break;
	}
	if (notsep(*s))		/* if *s is not a separator */
		while (notsep(*s))/* then search forward for one */
			s++;
	*bp = 0;
	*sp = s;
	return (strsav(buf2));
}
//go.sysin dd *
made=TRUE
if [ $made = TRUE ]; then
	/bin/chmod 644 adv/nxtwrd.c
	/bin/echo -n '	'; /bin/ls -ld adv/nxtwrd.c
fi
/bin/echo 'Extracting adv/play.c'
sed 's/^X//' <<'//go.sysin dd *' >adv/play.c
X/*
 * Strategy:
 * Run the %chancer
 * Display current room (on top 1/2 of screen if possible),
 * Print "Tell me what to do:" (on bottom 1/2),
 * Parse input; take special actions if required (SAVE/LOAD GAME,QUIT)
 * take semispecial actions when required (N,S,E,W,U,D are like GO N)
 * Perform action - GET, DROP, & GO are special
 * Continue forever
 */

#include "adv.h"

BOOL	huhwhat,		/* True => command not understood */
	nocando;		/* True => can't do it (yet?) */

play()
{

	while (!isend) {
		percnt();
		if (isend)
			break;
		parse();
		if (isend)
			break;
#ifdef DEBUG
		printf("Verbv=%d, objv=%d\n",verbv,objv);
#endif
		actout();
		if (huhwhat)
			prt("I don't understand your command.\n");
		else if (nocando)
			prt("I can't do that...yet!\n");
	}
}

X/*
 * Run the random chance events.  An event fires if the random number
 * generator picks a number <= to its chance value.
 */
percnt()
{
	register int i, j;

	for (i = 0; i < npcts; i++) {
		do {
			j = (rand() >> 8) & 255;
		} while (j == 0);
		if (j <= iconv(pct[i][0]))
			acton(pct[i]+1);
	}
}

X/*
 * Act out the (verb, object) command pair.  Handle motion
 * commands by moving to the appropriate destination.
 * Search for an action for other (verb, obj) pairs; if
 * not found, handle GET and PUT command default actions.
 */
actout()
{
    register int i, j;
    register struct item *ip;

    /*
     * Initially assume the command is bad, and that we can't do it.
     */
    huhwhat = TRUE;
    nocando = TRUE;
    if (verbv == 1 && objv < 7) {		/* GO [NSEWUD] */
	/*
	 * Move in the indicated direction.  If the user tries to
	 * move somewhere he can't, and it's dark, kill him.
	 */
	huhwhat = nocando = FALSE;
	if (isdark)
	    prt("It's dangerous to move in the dark!\n");
	if (!objv)
	    prt("I need a direction too.\n");
	else {
	    i = rooms[rm].dirs[objv-1];
	    if (i) {
		isdark = rooms[i].dark && !lighted(i);
		rm = i;
	    }
	    else {
		if (isdark) {
		    prt("I fell down and broke my neck.\n");
		    rm = hellrm;
		    isdark = rooms[rm].dark && !lighted(rm);
		}
		else
		    prt("I can't go in that direction.\n");
	    }
	}
	return;
    }

    /*
     * Search the action table.  If we get a hit, and we can do the
     * action, stop right away.  (That is, disjunction in the tables
     * is like ||, not like |.)
     */
    for (i = 0; i < nactns; i++) {
	register int t1, t2;

	t1 = iconv(actn[i][0]);
	t2 = iconv(actn[i][1]);
	if ((t1 == 255 || t1 == verbv) && (t2 == 255 || objv && t2 == objv)) {
	    huhwhat = FALSE;
	    acton(actn[i] + 2);
	    if (!nocando)
		return;
	}
    }

    /*
     * If the command was not understood and it was GET or DROP,
     * take the default action.
     */
    if (!huhwhat)
	return;
    if (verbv != 2 && verbv != 3)
	return;

    nocando = huhwhat = FALSE;
    if (objv == 0)
	prt("WHAT?\n");
    else {			/* GET or DROP item */

#define	e_Ok			(-1)	/* No error ("Ok") */
#define e_AlreadyCarrying	0	/* already carring item */
#define	e_NotCarrying		1	/* not carrying item */
#define	e_NotHere		2	/* item not in room */
#define e_BeyondPower		3	/* "beyond my power to do that" */

	int errcod = e_BeyondPower;
	static char *errmsg[] = {
	    "I'm already carrying it!\n",
	    "I'm not carrying it.\n",
	    "I don't see it here.\n",
	    "It's beyond my power to do that.\n",
	};

	/* Look for the named item */
	for (ip = &items[1]; ip < iteme; ip++) {
	    if (*ip->name && wrdval(nobjs, objs, ip->name) == objv) {
		j = ip->rm;		/* What room is it in? */
		if (j == -1) {		/* He is carrying it */
		    if (verbv == 2)
			errcod = e_AlreadyCarrying;
		    else {
			ip->rm = rm;
			prt("Ok, ");	/* Drop it */
			errcod = e_Ok;
			break;
		    }
		}
		else {			/* He is not carrying it */
		    if (verbv == 3)
			errcod = e_NotCarrying;
		    else {
			if (j == rm) {	/* If it is in the room... */
			    register struct item *p;
			    register int curinv = 0;

			    errcod = e_Ok;
			    for (p = &items[1]; p < iteme; p++)
				if (p->rm == -1)
				    curinv++;
			    if (curinv >= maxinv)
				prt(toomch);/* "Carrying too much" */
			    else {	/* Pick it up */
				ip->rm = -1;
				prt("Ok, ");
				break;
			    }
			}
			else		/* It is not in the room */
			    errcod = e_NotHere;
		    }
		}
	    }
	}
	if (errcod >= 0)
	    prt(errmsg[errcod]);
    }
}

X/*
 * Act on a set of conditions.  If all the conditions hold,
 * act on the predicate.
 */
acton(cp)
    register char *cp;		/* Condition/predicate */
{
    register BOOL test;
    register struct item *ip;
    int m, n, c, temp;

    /*
     * Magic numbers, yucko.  Things between 9 and 26 have one parameter
     * (n); things 27 up have 2 (n, m).
     */
    while (c = iconv(*cp++)) {
	if (c > 26)
	    m = iconv(*cp++);
	if (c > 8)
	    n = iconv(*cp++);
	/*
	 * Even numbers are inverted tests; decrement those.
	 */
	switch (c - ((c & 1) == 0)) {
	case 1:				/* Be emptyhanded */
	    test = 1;
	    for (ip = &items[1]; ip < iteme; ip++)
		if (ip->rm == -1)
		    test = 0;
	when 3:				/* Be dark */
	    test = isdark;
	when 5:				/* V0=0 */
	    test = var[0] == 0;
	when 7:				/* V0>0 */
	    test = var[0] > 0;
	when 9:				/* Vn=0 */
	    test = var[n] == 0;
	when 11:			/* Vn>0 */
	    test = var[n] > 0;
	when 13:			/* V0=n */
	    test = var[0] == n;
	when 15:			/* V0>n */
	    test = var[0] > n;
	when 17:			/* Carrying item n */
	    test = items[n].rm == -1;
	when 19:			/* Item n in room */
	    test = items[n].rm == rm;
	when 21:			/* Item n in room or carried */
	    test = items[n].rm == rm || items[n].rm == -1;
	when 23:			/* Be in room n */
	    test = rm == n;
	when 25:			/* Item n in limbo */
	    test = items[n].rm == 0;
	when 27:			/* Item m in room n */
	    test = items[m].rm == n;
	when 29:			/* Vm=n */
	    test = var[m] == n;
	when 31:			/* Vm>n */
	    test = var[m] > n;
	}
	if ((c & 1) == 0)
	    test = !test;
	if (!test)
	    return;
    }

    /*
     * We made it.  Perform the actions.
     */
    nocando = FALSE;
    while (c = iconv(*cp++)) {
	if (c > 26)
	    m = iconv(*cp++);
	if (c > 13)
	    n = iconv(*cp++);
	switch (c) {
	case 1:				/* Win */
win:
	    prt("FANTASTIC!! You've won, ");
	    prt(name);
	    prt("!\n");
	    isend = TRUE;
	    return;
	case 2:				/* Die */
	    prt(name);
	    prt(", you're dead...\n");
	    rm = hellrm;
	    isdark = rooms[rm].dark && !lighted(rm);
	when 3:				/* Quit */
	    prt("The game is now over.\n");
	    disply();
	    isend = TRUE;
	    return;
	case 4:				/* Inventory */
	    prt("I'm carrying");
	    test = TRUE;
	    for (ip = &items[1]; ip < iteme; ip++) {
		if (ip->rm == -1) {
		    if (test) {
			prt(":\n");
			test = FALSE;
		    }
		    if (CurWin->w_cursor.col + strlen(ip->desc) > COLS-3)
			prt("\n");
		    prt(ip->desc);
		    prt(". ");
		}
	    }
	    prt(test ? " nothing\n" : "\n");
	when 5:				/* Make dark */
	    isdark = TRUE;
	when 6:				/* Make light */
	    isdark = FALSE;
	when 7:				/* Refill lamp */
	    littim = litmax;
	    items[lititm].rm = -1;
	    isdark = FALSE;
	when 8:				/* Score */
	    temp = 0;
	    for (ip = &items[1]; ip < iteme; ip++)
		if (ip->rm == trsrm && *ip->desc == '*')
		    ++temp;
	    prt("I've stored ");
	    prt(itoa (temp));
	    prt(" treasure");
	    if (temp != 1)
		prt("s");
	    prt(".  On a scale of 0 to 100 that rates a ");
	    prt(itoa ((temp * 100) / tottrs));
	    prt(".\n");
	    if (temp == tottrs)
		goto win;
	when 9:				/* V0=0 */
	    var[0] = 0;
	when 10:			/* V0=1 */
	    var[0] = 1;
	when 11:			/* V0++ */
	    var[0]++;
	when 12:			/* V0-- */
	    var[0]--;
	when 13:			/* Print V0 */
	    prt(itoa(iconv(var[0])));
	when 14:			/* Print msg n */
	    prt(msg[n]);
	when 15:			/* Print Vn */
	    prt(itoa(iconv(var[n])));
	when 16:			/* Vn=0 */
	    var[n] = 0;
	when 17:			/* Vn=1 */
	    var[n] = 1;
	when 18:			/* Vn++ */
	    var[n]++;
	when 19:			/* Vn-- */
	    var[n]--;
	when 20:			/* V0=n */
	    var[0] = n;
	when 21:			/* V0+=n */
	    var[0] += n;
	when 22:			/* Move to room n */
	    rm = n;
	    isdark = rooms[rm].dark && !lighted(rm);
	when 23:			/* Get item n */
	    if (items[n].rm == -1)
		break;
#if 0
	    /* this can really kill a game! */
	    temp = 0;
	    for (ip = &items[1]; ip < iteme; ip++)
		if (ip->rm == -1)
		    ++temp;
	    if (temp >= maxinv)
		prt(toomch);
	    else
#endif
		items[n].rm = -1;
	when 24:			/* Drop item n */
	    if (items[n].rm != -1)
		prt("I'm not carrying it!\n");
	    else
		items[n].rm = rm;
	when 25:			/* Move item n to limbo */
	    items[n].rm = 0;
	when 26:			/* Move item n to room */
	    items[n].rm = rm;
	when 27:			/* Vm=n */
	    var[m] = n;
	when 28:			/* Vm+=n */
	    var[m] += n;
	when 29:			/* Move item m to room n */
	    items[m].rm = n;
	when 30:			/* Swap items m,n */
	    temp = items[m].rm;
	    items[m].rm = items[n].rm;
	    items[n].rm = temp;
	}
    }
}
//go.sysin dd *
made=TRUE
if [ $made = TRUE ]; then
	/bin/chmod 644 adv/play.c
	/bin/echo -n '	'; /bin/ls -ld adv/play.c
fi
/bin/echo 'Extracting adv/prt.c'
sed 's/^X//' <<'//go.sysin dd *' >adv/prt.c
X/*
 * Print string s in an orderly fashion.  (Provide linebreaks
 * where necessary.)
 */

#include "adv.h"

int (*nl_proc)();		/* if not null, called before printing \n */

static char pbuf[256];
static int pp;

prt(s)
	register char *s;
{
	if (s == 0) {
		pflush();
		return;
	}
	while (*s)
		if (*s == '\n') {
			pflush();
			if (nl_proc)
				(*nl_proc)();
			Wputc(*s++, CurWin);
		}
		else
			pput(*s++);
}

X/*
 * Put character into buffer up to blank; then flush buffer
 * If current character would "spill over", go to next line.
 */
pput(c)
	register int c;
{
	register char *p;

	pbuf[pp++] = c;
	if (CurWin->w_cursor.col + pp >= COLS) {
		p = &pbuf[pp];
		*p = 0;
		while (--p >= pbuf)
			if (*p == ' ')
				break;
		if (p < pbuf)
			p = &pbuf[pp];
		c = *p;
		*p = 0;
		Wputs(pbuf, CurWin);
		*p = c;
		if (CurWin->w_cursor.col) {
			if (nl_proc)
				(*nl_proc)();
			Wputc('\n', CurWin);
		}
		while (*p == ' ')
			p++;
		if (*p) {
			strcpy(pbuf, p);
			pp = strlen(pbuf);
		}
		else
			pp = 0;
	}
}

X/*
 * Write the buffered chars to the window
 */
pflush()
{

	pbuf[pp] = 0;
	Wputs(pbuf, CurWin);
	pp = 0;
}
//go.sysin dd *
made=TRUE
if [ $made = TRUE ]; then
	/bin/chmod 644 adv/prt.c
	/bin/echo -n '	'; /bin/ls -ld adv/prt.c
fi
/bin/echo 'Extracting adv/rdr.c'
sed 's/^X//' <<'//go.sysin dd *' >adv/rdr.c
X/*
 * The line reader.  Reads in source lines, skips whitespace (if
 * any), converts inline $n's to newlines, $t's to tabs,
 * $[0-9A-Fa-f][0-9A-Fa-f]'s to their hex characters; then return
 * a pointer to the created line (linebuf).  Also, concatenates
 * lines ending in '$'.
 */

#include "adv.h"
#include <ctype.h>

X/*
 * isxdigit is undocumented!
 */
#ifdef isxdigit
#define hex(c) isxdigit(c)
#else
#define	hex(c) ((c)>='0'&&(c)<='9'||(c)>='A'&&(c)<='F'||(c)>='a'&&(c)<='f')
#endif

char *
rdr()
{
	char lbuf[LINELEN+1], c;
	register char *lb, *bp = linebuf;
	register int t, q = 0;

	do {
		do {
			lb = lbuf;
			if (fgets(lbuf, sizeof lbuf, file) == NULL) {
				Wcleanup();
				printf("Premature EOF on input file!\n");
				exit(100);
			}
			skpwht(lb);
			t = strlen(lb);
		} while (t < 2);	/* fgets() keeps newline! */
		while (--t) {
			if (t > 1 && *lb == '$') {
				t--;
				++lb;
				if (*lb == 'n')
					c = '\n';
				else if (*lb == 't')
					c = '\t';
				else if (hex(*lb)) {
					c = todec(*lb++);
					if (t && hex(*lb)) {
						c <<= 4;
						c += todec(*lb);
						t--;
					}
				}
				else
					c = *lb;
			}
			else
				c = *lb;
			*bp++ = c;
			lb++;
			if (++q >= LINELEN && c) {
				Wcleanup();
				printf("Input line too long:\n%s\n", linebuf);
				exit(100);
			}
		}
		--bp;
	} while (*--lb == '$');
	*++bp = 0;
#ifdef DEBUG
	printf("Line: %s\n", linebuf);
#endif
	return (linebuf);
}

todec(c)
	register int c;
{

	if (c <= '9')
		return (c - '0');
	else if (c <= 'F')
		return (c - ('A' - 10));
	else
		return (c - ('a' - 10));
}
//go.sysin dd *
made=TRUE
if [ $made = TRUE ]; then
	/bin/chmod 644 adv/rdr.c
	/bin/echo -n '	'; /bin/ls -ld adv/rdr.c
fi
/bin/echo 'Extracting adv/readin.c'
sed 's/^X//' <<'//go.sysin dd *' >adv/readin.c
X/*
 * readin()
 * Reads the source file & allocates initial values & such.
 */

#include "adv.h"
#include <ctype.h>

char *b2, *bs, *savb2();

readin()
{
	register struct room *rp;
	register struct word *p;
	register struct item *ip;
	char	*s;			/* String ptr */
	char	c;
	int	i, j;			/* Temporaries */
	int	dflag = 0,		/* Directions flag */
		hflag = 0;		/* Hellroom flag */

	wrdsiz = 3;
	s = rdr();

	/*
	 * Init specials
	 */
	while (*s == '!') {
		++s;
		switch (toupper(*s)) {
		case 'D':
			for (dflag = 0; dflag < 6; dflag++) {
				if (*s)
					++s;
				dirs[dflag] = nxtwrd(&s, 255);
			}
		when 'W':
			wrdsiz = atoi(++s);
		when 'L':
			lititm = atoi(++s);
		when 'H':
			hellrm = atoi(++s);
			++hflag;
		}
		s = rdr();
	}

	/*
	 * Init initials
	 */
	i_rm = atoi(s);
	trsrm = atoi(rdr());
	tottrs = atoi(rdr());
	maxinv = atoi(rdr());
	litmax = atoi(rdr());
	warnpt = atoi(rdr());

	/*
	 * Init rooms
	 */
	nrooms = atoi(rdr());
	rooms = (struct room *)alcz(nrooms * sizeof (struct room));
	roome = &rooms[nrooms];
	for (rp = rooms; rp < roome; rp++) {
		s = rdr();
		while (*s) {
			c = islower (*s) ? toupper (*s++) : *s++;
			switch (c) {
			case 'N':
				rp->dirs[0] = atoi(s);
			when 'S':
				rp->dirs[1] = atoi(s);
			when 'E':
				rp->dirs[2] = atoi(s);
			when 'W':
				rp->dirs[3] = atoi(s);
			when 'U':
				rp->dirs[4] = atoi(s);
			when 'D':
				rp->dirs[5] = atoi(s);
			when '%':
				rp->dark = TRUE;
			when ':':
				skpwht(s);
				rp->desc = strsav(s);
				goto r_nxt;
			}
		}
		Wcleanup();
		printf("Bad room %d -- no description!\n", rp - rooms);
		exit(100);
r_nxt:	;
	}

	/*
	 * Init verbs, objects
	 */
	nverbs = atoi(rdr());
	verbs = (struct word *)alcnz(nverbs * sizeof (struct word));
	verbe = &verbs[nverbs];
	s = "";
	j = -1;
	for (p = verbs; p < verbe; p++) {
		if (*s == 0)
			s = rdr();
		if (*s == '*') {
			s++;
			p->val = j;
		}
		else
			p->val = ++j;
		p->word = nxtwrd(&s, wrdsiz);
		if (*s)
			s++;
		skpwht(s);
	}
	nobjs = atoi(rdr());
	objs = (struct word *)alcnz(nobjs * sizeof (struct word));
	obje = &objs[nobjs];
	s = "";
	j = -1;
	for (p = objs; p < obje; p++) {
		if (*s == 0)
			s = rdr();
		if (*s == '*') {
			s++;
			p->val = j;
		}
		else
			p->val = ++j;
		p->word = nxtwrd(&s, wrdsiz);
		if (*s)
			s++;
		skpwht(s);
	}

	/*
	 * Init items
	 */
	nitems = atoi(rdr());
	items = (struct item *)alcnz(nitems * sizeof (struct item));
	iteme = &items[nitems];
	for (ip = items; ip < iteme; ip++) {
		s = rdr();
		ip->i_rm = atoi(s);
		while (*s && *s != '=' && *s != ':')
			s++;
		if (*s == 0)
			goto baditm;
		if (*s == '=') {
			s++;
			ip->name = nxtwrd(&s, wrdsiz);
			skpwht(s);
		}
		else
			ip->name = "";
		if (*s != ':')
			goto baditm;
		s++;
		skpwht(s);
		ip->desc = strsav(s);
		continue;
baditm:
		Wcleanup();
		printf("Bad item %d -- no description!\n", ip - items);
		exit(100);
	}

	/*
	 * Init msgs
	 */
	nmsgs = atoi(rdr());
	msg = (char **)alcnz(nmsgs * sizeof (char *));
	for (i = 0; i < nmsgs; ++i)
		msg[i] = strsav(rdr());

	/*
	 * Init %s, actions
	 */
	npcts = atoi(rdr());
	pct = (char **)alcz(npcts * sizeof (char *));
	bs = "";
	for (i = 0; i < npcts; ++i) {
		b2 = buf2;
		while (rdbyte());
		while (rdbyte());
		pct[i] = savb2();
	}
	nactns = atoi(rdr());
	actn = (char **)alcz(nactns * sizeof (char *));
	bs = "";
	for (i = 0; i < nactns; i++) {
		b2 = buf2;
		while (rdbyte());
		while (rdbyte());
		actn[i] = savb2();
	}
	fclose(file);
	if (!hflag)
		hellrm = nrooms-1;
	if (!dflag) {
		dirs[0] = "North";
		dirs[1] = "South";
		dirs[2] = "East";
		dirs[3] = "West";
		dirs[4] = "Up";
		dirs[5] = "Down";
	}
	toomch = "I've too much to carry.  Try -TAKE INVENTORY-\n";
	s = "QUIT SAVE LOAD GAME";
	qcom = nxtwrd(&s, wrdsiz);
	s++;
	scom = nxtwrd(&s, wrdsiz);
	s++;
	lcom = nxtwrd(&s, wrdsiz);
	s++;
	gobj = nxtwrd(&s, wrdsiz);
}

rdbyte()
{

	if (*bs == 0) {
		bs = rdr();
		skpwht(bs);
	}
	*b2 = atoi(bs);
	while (*bs >= '0' && *bs <= '9')
		++bs;
	if (*bs == ',')
		++bs;
	skpwht(bs);
	return (*b2++ & 255);
}

char *
savb2()
{
	register int t = b2 - buf2;
	char *p;

	p = alcnz(t);
	bcopy(buf2, p, t);	/* copy from buf2 to p */
#ifdef DEBUG
	printf("Allocated %d bytes for action\n", t);
#endif
	return (p);
}
//go.sysin dd *
made=TRUE
if [ $made = TRUE ]; then
	/bin/chmod 644 adv/readin.c
	/bin/echo -n '	'; /bin/ls -ld adv/readin.c
fi
/bin/echo 'Extracting adv/str.c'
sed 's/^X//' <<'//go.sysin dd *' >adv/str.c
X/*
 * strsav(s)
 * Save string in memory; return pointer to it.
 */

#include "adv.h"

char *
strsav(s)
	register char *s;
{
	register char *t;
	char *rv;

	t = s;
	while (*t++)
		;
	rv = t = alcnz(t - s);
	while (*t++ = *s++)
		;
	return (rv);
}

X/*
 * itoa(i)
 * Convert int to ascii; return ptr to it.
 */
char *
itoa(i)
	int i;
{
	static char buf[10];

	sprintf(buf, "%d", i);
	return (buf);
}
//go.sysin dd *
made=TRUE
if [ $made = TRUE ]; then
	/bin/chmod 644 adv/str.c
	/bin/echo -n '	'; /bin/ls -ld adv/str.c
fi
made=TRUE
if [ $made = TRUE ]; then
	/bin/chmod 755 adv
	/bin/echo -n '	'; /bin/ls -ld adv
fi
/bin/echo 'Extracting al'
sed 's/^X//' <<'//go.sysin dd *' >al
!l9
11
3
13
5
125
25
30
:
N23S1E1W25:Dismal Swamp
D1:top of a tall cypress tree
N1S1E1W1U1D4:large hollow damp stump in the swamp
U3D5:root chamber under the swamp
U4:semi-dark hole by the root chamber
U5D7%:long down sloping hall
N8S9W27U6D12%:large cavern
S7%:large 8-sided room
N7U20%:Royal Anteroom
N11S10W1D26:*I'm on the shore of a lake
N11S11E23W11:forest
N13S15E15D13%:maze of pits
W14U12%:maze of pits
N17S12E13W16U16D17%:maze of pits
N12E13W12U13%:maze of pits
S17U14D17%:maze of pits
N17S12E12W15U14D18%:maze of pits
U17%:bottom of a chasm.  Above me is a pair of ledges.  One has a bricked up window across its face.  The other faces a Throne Room
W20%:*I'm on a narrow ledge by a chasm.  Across the chasm is the Throne Room
D9%:Royal Chamber
%:*I'm on a narrow ledge by a throne room.  Across the chasm is another ledge
W21%:Throne Room
N10S1E10W11:sunny meadow
:*I think I'm in REAL TROUBLE now.  There's a fellow here with a PITCHFORK and POINTED TAIL.....OH HELL!!
N11E1W11:hidden grove
:quick-sand bog
E7%:memory chip for a minicomputer.  I took a wrong turn!..
D11:*I'm at the top of an oak.  To the east I see a meadow; beyond that a lake
S24E11W24U28D24:large misty room with strange unreadable letters all over the exits
53
--,GO,*ENT,*RUN,*WAL,*CLI,TAK,*GET,*PIC,*CAT,DRO
*REL,*SPI,*LEA,JUM,BEA,CHO,*CUT,LIG,*TUR,*LAM,*BUR
AWA,THR,*TOS,SWI,RUB,LOOK,*SHO,*SEE,DRA,SCO,INV
*I,SAV,WAK,UNL,REA,OPE,ATT,*KIL,DRI,*EAT,BUN
FIN,*LOC,HEL,SAY,WIN,DOO,SCR,*YEL,*HOL
66
--,NOR,*N,SOU,*S,EAS,*E,WES,*W,UP,*U
DOW,*D,NET,FIS,AWA,MIR,AXE,*AX,WAT,BOT,HOL
LAM,*ON,OFF,DOO,MUD,*MED,BEE,SCO,GAS,FLI,EGG
OIL,*SLI,KEY,HEL,BUN,INV,LED,THR,CRO,BRI,BEA
DRA,RUG,RUB,HON,FRU,OX,RIN,CHI,*BIT,BRA,SIG
BLA,WEB,*WRI,SWA,LAV,ARO,HAL,TRE,*STU,FIR,WIN
59
0:
4:Dark hole
4=RUB:*Pot of Rubies*
2:Spider web with writing on it
0:-HOLLOW- stump and remains of a felled tree
1:Cypress tree
10:Water
1=MUD:Evil smelling mud
10=FIS:*Golden Fish*
0=LAM:Lit brass lamp
3=LAM:Old fashioned brass lamp
10=AXE:Rusty axe (magic word -BUNYON- on it)
3=BOT:Bottle with water
0=BOT:Empty bottle
2=KEY:Ring of skeleton keys
3:Sign -LEAVE TREASURES HERE.  SAY SCORE-
5:Locked door
0:Open door with a hallway beyond
1:Swamp gas
18=NET:*Golden Net*
0:Chigger bites
0:Infected chigger bites
1:Floating patches of oily slime
8=HON:*Royal Honey*
8:Large African bees
21:Very thin black bear
0=BOT:Bees in a bottle
23:Large sleeping dragon
13=FLI:Flint & steel
17=RUG:*Thick Persian Rug*
18:Sign -MAGIC WORD IS AWAY.  LOOK LA$n(rest of sign is missing)
0=BLA:Distended gas bladder
20:Bricked up window
23:Sign here says -IN MANY CASES MUD IS GOOD.  IN OTHERS...
18:Stream of lava
0:Bricked up window with a hole in it
0:Loose fire bricks
22=CRO:*Gold Crown*
21:*Magic Mirror*
0:Sleeping bear
9=BLA:Empty wine bladder
0:Broken glass
1=CHI:Chiggers
0:Dead bear
0=EGG:*Dragon Eggs* (very rare)
0:Lava stream with brick dam
25=FRU:*Jeweled Fruit*
26=OX:*Small Statue of a Blue Ox*
0=RIN:*Diamond Ring*
0=BRA:*Diamond Bracelet*
14:Strange scratchings on rock says -ALADDIN WAS HERE-
29:Sign says -LIMBO.  FIND RIGHT EXIT AND LIVE AGAIN!-
0:Smoking hole.  Pieces of dragon and gore
10:Sign says -NO SWIMMING ALLOWED HERE-
17:Arrow pointing down
0=FIS:Dead fish
0=FIR:*Firestone* (cold now)
25:Sign says -PAUL'S PLACE-
11:Trees
70
Welcome to -Adventure Land-$n$n
Nothing happens.$n
-CHOP 'ER DOWN!-$n
Boy that really hit the spot!$n
Dragon smells something.  Awakens.  ATTACKS ME!$n
Lock shatters.$n
I can't - it's locked.$n
TIMBER!  Something fell from the tree top and vanished!$n
TIMBER!$n
Lamp is off.$n
Flameless lamp is on.  Try -LAMP OFF-$n
I'm bit by a spider.$n
My chigger bites are now infected.$n
My bites have rotted my whole body.$n
Bear eats the honey and falls asleep.$n
Bees sting me.$n
I've no container.$n
The bees all suffocated and disappeared.$n
Something I'm holding vibrates and...$n
I've nothing to light it with.$n
Gas bladder blew up and knocked a hole in the bricks.$n
Gas bladder blew up in my hands!$n
Gas needs to be contained before it will burn.$n
Gas dissipates.  (I think you blew it!)$n
That won't ignite.$n
HOW?  JUMP?$n
Bear won't let me.$n
Don't waste *HONEY* get mad instead.  Dam lava!?$n
Bees madden bear.  Bear then attacks me!$n
It soaks into the ground.$n
In 1 word tell me at what.$n
OH NO....Bear dodges...CRASH!$n
It's heavy!$n
Something's too heavy.  I fall.$n
To stop game say QUIT.$n
Mirror hits floor and shatters into million pieces.$n
Mirror lands softly on rug.  Lights up and says:$n
You lost *ALL* treasures.$n
Not carrying axe.  Take inventory!$n
It doesn't bother him at all.$n
The mud dried up and fell off.$n
Bear is startled.  Fell off ledge.$n
*DRAGON STING* and fades.  I don't get it.  I hope you do.$n
The bees attack the dragon which gets so annoyed it gets up and flies away...$n
Magic oil attracts magic lamp.  Lamp is now full.$n
Ouch!  I'm bit by chiggers.$n
There's something there all right!  Maybe I should go there?$n
Maybe if I threw something?...$n
Too dry.  Fish die.$n
A glowing genie appears.  Drops something.  Then vanishes.$n
A glowing genie appears.  Says -Boy you ARE selfish-$ntakes something and then makes -ME- vanish!$n
No.  It's too hot.$n
Not here.$n
Try the swamp.$n
Use one word.$n
Try--> LOOK JUMP SWIM CLIMB THROW FIND TAKE INVENTORY SCORE DROP$nand any other verb you think of.  Some may not need a noun.$n
Only 3 things will wake the dragon and 1 item is dangerous by itself!!$n
If you ever want a hint on something try 'HELP'.$n
Read the sign in the meadow!$n
You may need magic words here.$n
A voice BOOOOMS out:$n
PLEASE LEAVE IT ALONE!$n
Can only throw axe.$n
Medicine is good for bites.$n
I don't know where it is.$n
Treasures have an asterisk (*) in their names.  Say 'SCORE'.$n
Blow it up.$n
Fish escape back to lake.$n
Swuck!  The bladder is now full of swamp gas.$n
(He looked awful mad....)$n
15
204,17,8,18,19,0,29,8,10,14,67,0
25,17,20,18,7,0,14,12,30,20,21,0
20,17,21,0,14,13,2,0
7,17,26,0,14,17,30,13,26,0
255,23,24,0,14,37,3,0
12,17,7,18,12,0,14,40,29,7,1,0
12,18,20,18,21,19,22,18,7,21,42,0,23,20,14,45,0
20,19,24,22,7,0,14,15,2,0
127,17,8,18,12,0,14,48,30,55,8,0
127,17,42,18,21,18,20,18,7,0,23,20,14,45,0
127,19,27,17,7,0,14,4,2,0
255,12,1,0,17,1,14,60,14,65,14,57,0
12,19,42,18,21,18,20,0,23,20,14,45,0
255,11,2,12,3,0,14,42,16,2,17,3,0
255,11,2,11,3,0,14,27,16,2,16,3,0
131
12,14,19,1,0,14,46,0
12,20,0,8,0
12,47,19,34,0,14,46,0
12,50,19,4,0,14,46,0
12,255,0,0
2,18,19,7,17,21,0,25,21,23,7,14,3,0
2,18,19,7,17,20,0,25,20,23,7,14,3,0
2,37,19,23,18,7,19,24,0,14,15,2,0
3,37,17,23,19,25,0,25,23,14,14,30,39,25,0
3,37,0,24,23,0
2,19,19,24,18,7,0,14,15,2,0
2,19,19,24,17,7,18,13,0,14,16,0
2,19,19,24,17,7,17,13,0,30,13,26,0
2,28,0,4,0
15,255,0,4,0
8,255,17,29,23,17,0,22,23,14,18,0
7,21,21,31,18,28,0,14,19,0
7,21,17,31,17,28,0,14,21,25,31,2,0
7,21,19,31,17,28,0,14,20,30,31,36,30,32,35,0
24,39,0,14,64,0
1,29,23,20,19,35,0,22,19,0
2,21,23,1,18,40,0,14,16,0
2,21,23,1,17,40,0,30,40,31,14,68,0
3,21,17,31,0,30,40,31,14,23,0
7,21,19,18,17,28,0,14,22,0
24,46,0,14,64,0
1,30,23,19,0,14,25,0
2,10,19,38,20,25,0,23,38,0
3,10,17,38,19,29,0,26,38,14,36,17,2,0
22,38,17,46,0,14,3,25,46,0
2,12,19,6,17,13,0,30,13,12,0
4,255,23,19,18,36,0,22,21,0
4,255,23,21,0,22,19,0
1,30,23,21,19,25,0,14,26,0
1,30,23,21,20,25,0,22,22,0
1,47,19,34,0,14,51,0
3,19,17,26,19,25,0,14,28,30,26,13,26,24,2,0
2,12,19,6,18,13,0,14,16,0
19,45,19,3,0,14,2,0
1,50,19,5,0,22,2,0
1,50,19,4,0,22,3,0
3,12,17,12,0,30,12,13,14,29,0
2,24,19,22,0,25,22,25,10,7,14,44,0
6,50,19,5,22,14,17,11,0,30,4,5,14,7,0
20,17,23,5,19,16,18,14,0,14,6,0
18,17,23,5,19,16,18,14,0,14,6,0
9,11,17,11,0,14,30,17,4,0
20,17,19,16,17,14,0,30,16,17,0
3,32,17,36,20,34,0,26,36,0
4,255,23,19,17,36,0,14,33,2,0
3,32,17,36,0,30,34,45,26,56,25,36,0
2,32,19,36,0,14,32,23,36,0
2,10,19,38,19,25,0,14,26,0
3,10,17,38,20,29,0,14,35,30,38,41,0
5,255,11,4,20,25,0,14,52,0
5,255,11,4,20,38,0,14,61,16,4,24,11,0
13,255,11,4,19,27,0,14,39,16,4,24,11,0
14,255,0,8,0
25,255,17,20,0,14,60,14,63,14,55,0
25,255,17,21,0,14,60,14,63,14,55,0
1,29,23,18,0,14,52,0
2,47,19,34,0,14,51,0
29,255,19,25,0,14,41,29,43,18,25,25,0
3,19,17,26,19,27,0,26,24,30,44,27,14,43,0
27,255,11,4,0,16,4,14,1,14,60,14,57,24,11,0
20,17,19,17,0,0
1,14,19,35,0,22,19,0
1,52,19,35,0,22,19,0
5,255,11,4,19,25,0,14,31,25,38,29,41,21,24,11,0
24,11,0,14,60,14,64,0
17,255,0,14,1,14,47,0
6,50,19,5,17,11,21,14,0,30,4,5,14,8,0
21,33,19,25,0,14,26,14,47,0
21,34,19,27,0,14,39,14,47,0
22,12,17,12,0,14,3,30,12,13,0
22,12,19,6,0,14,3,0
22,37,17,23,0,14,3,25,23,0
28,255,11,4,19,16,0,30,16,17,14,5,16,4,24,11,0
10,255,23,26,2,0,14,33,0
10,255,23,26,1,0,22,10,0
6,255,18,11,0,14,38,0
23,255,21,47,17,11,0,14,18,29,11,25,29,47,25,4,0
23,255,17,11,24,26,0,14,18,29,11,25,4,0
11,15,21,9,0,14,51,0
2,18,19,7,0,23,7,0
11,15,21,10,9,5,0,14,49,26,48,18,5,0
11,15,21,10,29,5,1,0,14,49,14,69,26,49,18,5,0
11,15,21,10,29,5,2,0,14,50,25,49,18,5,2,0
11,15,21,10,29,5,3,0,14,50,25,48,18,5,2,0
11,15,21,10,29,5,4,0,14,1,0
21,41,17,20,0,14,1,14,12,30,20,21,0
29,255,17,21,0,14,1,14,13,2,0
10,255,24,26,0,14,52,0
8,255,18,29,0,14,1,0
23,255,0,14,1,0
7,15,21,9,0,14,10,0
24,50,0,14,53,0
3,19,17,26,0,30,24,26,23,13,0
24,25,0,14,53,0
24,18,0,14,53,0
26,255,0,14,54,0
1,50,23,11,0,22,28,0
25,255,23,26,0,14,60,14,55,14,59,0
25,255,23,11,0,14,60,14,55,0
25,255,23,19,0,14,60,14,55,0
25,255,23,23,0,14,60,14,56,0
25,255,23,13,0,14,60,14,59,0
25,255,23,17,0,14,60,14,59,0
25,255,23,15,0,14,60,14,59,0
25,255,23,21,0,14,60,14,55,0
25,255,23,8,0,14,60,14,58,0
18,17,17,14,19,16,0,30,16,17,0
1,49,19,17,0,22,6,0
7,15,17,10,0,30,10,9,14,10,6,0
7,16,17,9,0,30,9,10,14,9,0
18,15,17,9,0,30,9,10,14,9,0
2,45,19,3,0,14,11,2,0
1,14,19,52,0,22,24,0
2,43,0,14,60,14,61,0
7,255,17,28,20,18,0,14,24,0
29,255,0,14,1,0
8,255,17,29,24,17,0,22,17,14,18,0
25,255,23,1,0,14,60,14,66,14,53,0
9,11,18,11,0,14,38,0
25,255,23,20,0,14,60,14,66,14,53,0
24,20,0,8,0
1,14,23,4,0,22,5,0
2,37,19,23,0,23,23,0
25,255,0,14,1,0
6,255,0,14,1,14,47,0
9,255,0,14,62,0
//go.sysin dd *
made=TRUE
if [ $made = TRUE ]; then
	/bin/chmod 644 al
	/bin/echo -n '	'; /bin/ls -ld al
fi
/bin/echo 'Extracting p'
sed 's/^X//' <<'//go.sysin dd *' >p
!l9
1
1
2
5
200
25
34
:
:*I'm in an apartment in London
D1:*I'm in an alcove
E4W2:secret passageway
W3:musty attic
:*I'm outside an open window on a ledge on the side of a very tall building
E8:sandy beach on a tropical isle
S12E13W14D11%:maze of caves
E14W6:meadow
W8:grass shack
N10S24E10W10:*I'm in the ocean
U7%:pit
N7E14W13%:maze of caves
N7S14E12W19%:maze of caves
W8:*I'm at the foot of a cave ridden hill.  A path leads to the top
N17%:tool shed
E17%:long hallway
W16%:large cavern
D14:*I'm on top of a hill.  Below is Pirate Island.  Across the sea off in the distance I see *TREASURE* ISLAND
S14E14W13%:maze of caves
:*I'm aboard a pirate ship anchored off shore
S22:*I'm on the beach at Treasure Island
N21E23:spooky old graveyard filled with piles of empty and broken rum bottles
W22:large barren field
N10S6E6W6:shallow lagoon.  To the north is the ocean
W23:sacked and deserted monastery
:
:
:
:
:
:
:
:*Welcome to Never Never Land!
55
--,GO,*CLI,*WAL,*RUN,*ENT,*PAC,*FOL,GET,*TAK,*CAT
*PIC,*REM,*WAK,*PUL,DRO,*REL,*THR,*LEA,*GIV,SAY,SAI
FLY,DRI,*EAT,INV,*I,SAI,LOO,*SHO,WAI,REA,YOH
SCO,KIL,*ATT,LIG,OPE,*SMA,UNL,HEL,AWA,*BUN,QUI
BUI,*MAK,WAK,SET,CAS,DIG,BUR,FIN,JUM,EMP,WEI
65
--,NOR,*N,SOU,*S,EAS,*E,WES,*W,UP,*U
DOW,*D,STA,PAS,HAL,BOO,BOT,*RUM,WIN,MON,PIR
ARO,BAG,*DUF,TOR,OFF,MAT,YOH,30,LUM,RUG,KEY
INV,DUB,SAI,FIS,ANC,SHA,PLA,CAV,PAT,DOO,CHE
PAR,HAM,NAI,BOA,*SHI,SHE,CRA,WAT,*SAL,LAG,*TID
PIT,SHO,*BEA,MAP,PAC,BON,HOL,SAN,BOX,SNE
60
0:
2:Open window
2:Bookcase
0=BOO:Large leather-bound book
0:Bookcase with secret passage behind it
4=BAG:Pirate's duffel bag
1:Sign on wall -RETURN TREASURES HERE.  SAY SCORE-.$nSign by stairs -ANTONYM OF LIGHT IS UNLIGHT-
0=BOT:Empty bottle
4=TOR:Unlit torch
0=TOR:Lit torch
0=MAT:Matches
6:Small ship's keel and mast
9:Wicked looking pirate
8=CHE:Treasure Chest
8=MON:Mongoose
24=ANC:Rusty anchor
8:Grass shack
11:Mean and hungry looking CROCODILES
11:Locked door
0:Open door with hall beyond
17=SAI:Pile of sails
10=FIS:Fish
25=DUB:*DUBLOONS*
25=SNA:Deadly Mamba snakes
9=PAR:Parrot
1=BOT:Bottle of Rum
0=RUG:Rug
0=KEY:Ring of keys
0=CHE:Open treasure chest
0=PLA:Set of plans
1:Rug
15=HAM:Claw hammer
0=NAI:Nails
17=LUM:Pile of precut lumber
17:Tool shed
16:Locked door
0:Open door with pit beyond
0:Pirate ship
18:Rock wall with narrow crack in it
17:Narrow crack in the rock
10:Salt water
0:Sleeping pirate
0=BOT:Bottle of salt water
4:Pieces of broken rum bottles
1=SNE:Non-skid sneakers
0=MAP:Map
16=SHO:Shovel
0=BON:Mouldy old bones
6=SAN:Sand
0=BOT:Bottles of rum
0=STA:*RARE OLD PRICELESS STAMPS*
6:Lagoon
24:The tide is out
0:The tide is coming in
15=WIN:Water wings
0:Flotsam and Jetsam
23:Monastery
0=BOX:Plain wooden box
0:Dead squirrel
1:Flight of stairs
73
* Welcome to -PIRATE'S ADVENTURE- by Alexis Adams *$n
There's a strange sound --$n
The name of the book is -TREASURE ISLAND-.$nThere's a word engraved in the flyleaf -YOHO-$nand a message: -LONG JOHN SILVER LEFT 2 TREASURES ON TREASURE ISLAND!-$n
Nothing happens.$n
There's something there all right.  Maybe I should$20
That's not very safe.$n
You may need magic here.$n
Everything spins around and suddenly you are elsewhere...$n
Torch is lit.$n
I was wrong.  I guess it's not a mongoose 'cause the snakes bit it.$n
I'm snake bit.$n
Parrot attacks snakes and drives them off.$n
Pirate won't let me.$n
It's locked.$n
It's open.$n
There is a set of plans in it.$n
Not while I'm carrying it!$n
Crocs stop me.$n
Sorry I can't.$n
Wrong game you silly goose!$n
I don't have it.$n
Pirate grabs rum and scuttles off chortling.$n
X... I think it's me.  HEE HEE.$n
It's nailed to the floor!$n
-MAGIC WORD-  HO AND A ...           (Work on it.  You'll get it.)$n
No.  Something is missing!$n
It was a tight squeeze!$n
Something won't fit.$n
Since nothing is happening,$20
I slipped and fell...$n
Something falls out.$n
They're plans to build Jolly Roger (a PIRATE SHIP!)$nYou'll need HAMMER NAILS LUMBER ANCHOR SAILS and KEEL.$n
I've no container.$n
It soaks into the ground.$n
Too dry.  Fish vanish.$n
Pirate awakens.  Says -AYE MATEY WE BE CASTING OFF SOON-$nHe then vanishes.$n
What a waste...$n
I've no crew.$n
Pirate says -AYE MATEY WE BE NEEDING A MAP FIRST-$n
After two days at sea we set anchor off of a sandy beach.$nALL ASHORE WHO'S GOING ASHORE...$n
Try -WEIGH ANCHOR-$n
There's a map in it!$n
It's a map to Treasure Island.  At the bottom it says$n                 -30 PACES AND THEN DIG!-$n
--------
It's empty.$n
I've no plans!$n
open it?$n
go there?$n
I found something!$n
I didn't find anything.$n
I don't see it here.$n
OK.  I walked off 30 paces.$n
CONGRATULATIONS !!!$nBut your adventure is not over yet...$n
READING EXPANDS THE MIND.$n
The parrot cries:$20$20
-CHECK THE BAG MATEY-$n
-CHECK THE CHEST MATEY-$n
from the other side!$n
Open the book!$n
There's multiple exits here!$n
Crocs eat fish and leave.$n
I'm underwater.  I CAN'T SWIM!!!!  BLUB BLUB...$n
-PIECES OF EIGHT-$n
It's stuck in the sand.$n
Use 1 word.$n
Pirate says -AYE MATEY WE BE WAITING FOR THE TIDE TO COME IN-$n
The tide is out.$n
The tide is coming in.$n
About 20 pounds.  Try -SET SAIL-$n
-TIDES A CHANGING MATEY-$n
Note here -I BE LIKING PARROTS.  THEY BE SMART MATEY-$n
Pirate follows you ashore as if he is waiting for something.$n
Sorry I can't -- it's locked from the other side!$n
18
204,19,21,19,17,0,14,60,25,21,25,17,0
204,19,23,19,24,0,14,54,14,62,14,11,25,23,0
255,17,26,22,27,12,1,0,14,1,26,27,17,1,0
7,21,24,0,14,54,14,62,0
63,23,33,0,14,28,3,0
102,23,5,18,44,0,14,29,2,0
204,19,12,19,25,0,29,41,4,14,21,29,7,4,25,12,25,25,0
89,17,21,18,42,0,14,34,29,21,10,0
127,19,12,19,49,0,14,21,29,41,22,25,12,0
89,21,24,12,2,0,14,54,14,55,0
25,21,24,12,3,0,14,54,14,56,0
127,23,24,26,53,18,54,0,14,67,14,61,2,0
127,23,10,18,54,0,14,61,2,0
25,12,4,0,30,52,53,30,15,55,17,5,0
25,11,4,12,6,0,30,52,53,17,5,0
216,21,24,11,5,0,14,54,14,69,16,5,0
255,11,5,0,16,5,0
204,19,23,19,14,0,14,9,30,14,58,0
122
1,8,19,4,0,22,3,0
12,10,17,3,0,14,2,0
1,12,19,1,0,22,5,0
28,255,0,14,58,0
13,255,23,5,17,3,0,14,7,22,6,0
13,255,24,5,17,3,12,6,0,14,7,22,5,0
10,12,19,1,0,14,4,14,47,0
16,17,17,8,21,10,0,30,8,9,14,8,6,0
18,17,17,9,0,30,8,9,0
19,255,23,5,0,14,6,0
2,26,20,23,0,23,22,0
2,26,19,22,19,23,0,14,5,14,10,2,0
1,30,19,16,0,22,9,0
2,35,19,13,19,12,0,14,12,0
2,35,20,12,0,23,13,0
17,35,19,13,19,12,0,14,12,0
17,35,19,13,20,12,0,14,13,0
18,35,19,13,20,12,17,27,0,14,14,30,13,28,0
17,35,17,13,0,14,16,0
10,35,17,28,0,14,16,0
10,35,21,13,0,14,18,14,13,0
10,35,19,28,12,7,12,3,0,14,15,26,29,17,7,0
10,35,12,3,19,28,11,7,0,14,41,26,45,17,3,0
10,35,11,3,19,28,0,14,44,0
10,16,21,5,12,2,0,14,4,14,46,0
10,16,21,5,11,2,0,14,44,0
17,34,19,17,0,14,17,0
17,34,19,18,0,14,18,14,13,0
17,34,19,19,0,14,14,0
1,9,19,19,0,22,16,0
18,34,19,17,19,18,0,14,17,0
18,34,20,17,19,18,17,27,0,25,18,26,19,30,35,36,0
7,11,21,25,0,14,1,14,22,0
8,255,0,4,0
10,51,21,57,22,50,0,14,4,14,46,0
20,255,0,14,19,14,3,0
12,10,18,3,0,14,18,14,27,0
14,255,0,8,0
22,39,22,29,0,14,18,14,45,0
1,32,23,14,0,22,7,0
10,43,25,52,0,14,4,14,47,14,67,0
10,43,26,52,0,14,4,14,47,14,66,0
10,30,19,16,0,14,4,14,47,0
10,41,19,38,0,14,4,14,47,0
1,41,19,39,17,46,0,14,18,14,27,0
1,41,19,38,17,13,0,14,18,14,27,0
2,23,19,30,0,14,18,14,23,0
2,38,17,31,19,30,0,23,32,26,26,25,30,0
1,41,19,39,17,33,0,14,18,14,27,0
22,39,21,31,21,29,21,15,21,32,21,33,21,20,0,25,33,30,37,11,14,52,25,32,25,20,25,15,0
22,39,0,14,25,0
1,44,19,36,0,22,11,0
1,41,19,38,17,3,0,14,18,14,27,0
10,255,0,0
2,23,21,26,0,23,26,0
1,41,19,38,0,22,17,14,26,0
1,41,19,39,0,22,18,0
24,27,23,20,19,12,26,52,12,6,0,14,65,0
13,255,0,14,3,0
17,16,21,5,12,2,0,14,30,26,10,17,2,0
17,16,11,2,0,14,3,14,44,0
2,42,18,7,0,14,32,0
2,42,19,40,17,7,0,25,7,23,42,0
3,42,17,42,0,25,42,23,7,14,33,0
7,42,19,40,0,14,5,2,0
7,42,17,42,0,14,5,25,42,23,7,2,0
2,14,19,41,0,14,35,25,41,29,12,20,0
17,11,21,25,0,14,14,0
30,11,17,25,0,14,36,25,25,23,7,14,33,0
1,39,19,37,0,22,20,0
1,45,23,20,11,6,19,12,0,22,21,26,12,14,71,0
1,45,23,20,12,6,0,22,6,0
24,27,23,20,20,12,0,14,18,14,37,0
24,27,23,20,20,45,0,14,18,14,38,0
24,27,23,20,12,6,0,14,39,17,6,29,37,21,0
24,27,23,20,11,6,0,14,39,16,6,29,37,6,0
25,18,0,14,40,0
12,46,21,45,0,14,42,0
5,255,0,14,40,0
2,10,19,3,0,23,3,0
17,10,21,3,0,14,70,0
1,45,23,20,11,6,0,22,21,0
1,33,23,14,0,22,18,0
2,36,19,24,19,12,0,14,12,0
2,36,19,24,0,23,24,14,54,14,62,0
1,40,19,34,0,22,15,0
1,21,12,8,23,23,0,17,8,14,51,0
1,21,0,17,9,14,51,0
26,255,23,22,17,46,22,47,0,14,48,26,47,0
26,255,23,6,17,46,0,14,49,0
26,255,23,21,22,49,17,46,0,26,49,14,48,0
29,255,23,5,0,14,5,0
26,255,23,23,11,8,17,46,22,57,0,26,57,14,48,0
2,38,21,32,0,23,32,0
1,12,23,5,0,22,2,0
19,255,23,2,0,14,53,0
12,31,21,29,0,14,31,0
18,34,19,35,17,27,0,14,72,0
17,34,19,35,0,14,18,14,13,0
17,34,19,36,0,14,14,0
1,43,19,51,0,22,24,0
1,7,23,1,0,22,2,0
2,10,23,2,20,4,0,23,3,14,1,30,2,4,0
2,29,19,15,11,4,0,23,15,0
2,29,19,15,12,4,0,14,18,14,63,0
2,29,20,15,0,14,18,14,50,0
30,11,17,42,0,30,7,42,0
1,13,19,56,0,22,25,0
5,39,0,14,40,0
19,255,23,14,0,14,59,0
31,29,0,14,68,0
26,255,17,46,12,4,19,15,0,17,4,0
27,255,0,14,18,0
17,51,17,31,21,57,0,14,30,26,50,0
15,14,0,14,12,0
19,255,23,11,0,14,66,14,67,14,69,0
4,255,0,14,64,0
19,255,23,6,0,14,59,0
11,255,11,4,0,30,52,53,14,69,0
19,255,23,9,19,12,0,14,24,0
26,255,17,46,0,14,49,16,9,16,8,0
19,255,0,14,3,0
//go.sysin dd *
made=TRUE
if [ $made = TRUE ]; then
	/bin/chmod 644 p
	/bin/echo -n '	'; /bin/ls -ld p
fi
exit 0
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 4251)
UUCP:	seismo!umcp-cs!chris
CSNet:	chris@umcp-cs		ARPA:	chris@maryland