Mon Jun 16 10:26:58 EDT 1980


	EXPORT STAR_DREK


	The modules that make up Star_Drek are:

log.o           Print welcome message, display standings, exec playing part,
		(must be setuid to owner of records files)

st_def.h	definitions and structures for all progs

st_glb.c	global data areas

st_main.o       most of the game part (two versions, Est_main & NEst_main,
		are provided, see below)

st_com.o        command input and interpretation (again, two versions)

st_sub.o        subroutines for st_main and st_com

st_viz.c        device dependent routines for bridge monitor and misc display

stlib.a         miscellaneous subroutines swiped from all over the system

snoop.o         utility to snoop on questionnaire answers

helm.o          Independent process that gathers input chars and passes
		them to st_com routines.  This is ONLY needed for systems
		without the empty() system call, (see below).

st_txt.nr       Brief instructions.  This should be nroff'ed into "st_txt".
		Note that any changes to the keyboard characters used for
		commands should be reflected in this document.

st_10q          Thank-you letter automatically sent to members of the
		Starfleet who get squeezed out by new members.

to.c            Interface to std Unix "mail" program, used in several spots.


To install:
0)        The game, as shipped, is set up for the modified P.E. OWL terminals.
	If you're using something else you must make changes in
	"st_glb.c" and "st_viz.c" to accomodate your cursor-addressing,
	line-closing, etc.
	In particular:
	  If your terminals don't have the ability to close a line and
	    scroll the bottom of the screen up you should use "-DNOCRTLDEL"
	    when you compile st_viz.c.
	  You will probably want to redefine crtinit[] in st_glb.c
	    to be:  char  crtinit[] { 0 };  unless you have some nice way
	    of drawing boxes on your screen.
	  You may want to change the definition of BODY_FILL in st_viz.c
	    if your terminal doesn't display a blob for the <DEL> character.
	  If you have cursor motion keys, (up, down, left, right), move
	    the appropriate codes, (cPXROT, cMXROT, cMYROT, cPYROT),
	    in "com_map" to the positions that correspond to the characters
	    generated by your cursor keys.
1)        Look though st_glb.c and find all path names, (marked with /*PATH*/),
	and modify them to work with your file structure.
2)        In "st_def.h" set PRIVUID to be the your uid.
	Similarly, put your logname in the initialization of "st_mother".
3)        The routines myruid() and myeuid() ar expected to return "real"
	and "effective" uids, if those aren't the low & high bytes of
	getuid() then you should rewrite these two subros at the end of
	st_glb.c.
4)        The program "/bin/to" is our local mail program.  It uses three
	arguments, "user.name", "-Ssubject", and "-Ttext.of.the.message".
	"Log" execls the string in "toprog", passing arguments of this type
	to inform st_mother of new applicants.  If you have the Vanilla
	Unix "mail" program you may want to use the "to.c" which I've
	included as an example of an interface that uses these arguments.
5)        Choose the appropriate modules for your system.  If you have
	the "empty" system call, or can fake it, (empty(fh) returns 1
	iff a read on file handle "fh" would hang waiting for input,
	otherwise it returns 0), then rename "Est_com.o" to be "st_com.o",
	and "Est_main.o" to be "st_main.o".  If you don't have empty()
	then rename "NEst_com.o" and "NEst_main.o" to be "st_com.o" and
	"st_main.o", respectively.
6)        Compile the ".c" pieces of the playing part:
	cc -O -c st_glb.c st_viz.c           : if you have the empty sys call
	cc -O -c -DNOEMPTY st_glb.c st_viz.c : if not
7)        Load the playing part:
	cc -n st_main.o st_com.o st_viz.o st_sub.o st_glb.o stlib.a -lS
	mv a.out main
	("cc -n -O st_*.c st_*.o stlib.a -lS; mv a.out main" would work.)
8)        If you're unfortunate enough not to have the empty() system call:
	cc -n helm.o st_glb.o stlib.a -lS; mv a.out helm
9)        Load the rest
	cc -n log.o st_glb.o stlib.a -lS; cop a.out log; chmod 4755 log
	cc snoop.o st_glb.o stlib.a -lS; mv a.out snoop
10)       You're all set.
	Run "log", (which in turn may run "main" and "helm").
	Note: neither "main" nor "helm" should be run directly.
	The program "snoop" allows you to display all the information
	stored for each Star_Drekker.

		    Have fun!                           psl

Note: Star_drek expects to find user names in the file /etc/passwd in the
vanilla unix style.  If your system is different you must create a
subroutine called "uidnam" of the following form:
char *uidnam(uid)
int  uid;
{
	static char buf[32];
/* find the log name of the user associated with "uid" and put it in buf */
	return(buf);
}
then do:
cc -O -c uidnam.c
ar r stlib.a uidnam.o

(c) 1978, P. Langston, NYC NY   Not to be copied or further distributed.
