::::::::::::::
inbox/793
::::::::::::::
Return-Path: zabel@plains.NoDak.edu
Received: from bank.ecn.purdue.edu by chainsaw.ecn.purdue.edu (5.65/1.32jrs)
	id AA01556; Fri, 23 Apr 93 06:43:45 -0500
Received: from plains.NoDak.edu by bank.ecn.purdue.edu (5.65/1.32jrs)
	id AA18131; Fri, 23 Apr 93 06:43:37 -0500
Received: by plains.NoDak.edu; Fri, 23 Apr 1993 06:43:35 -0500
From: Chad Zabel <zabel@plains.NoDak.edu>
Message-Id: <199304231143.AA05457@plains.NoDak.edu>
Subject: Re: Files
To: ts@ecn.purdue.edu (Thomas Ruschak)
Date: Fri, 23 Apr 93 6:43:35 CDT
In-Reply-To: <9304222224.AA08841@chainsaw.ecn.purdue.edu>; from "Thomas Ruschak" at Apr 22, 93 5:24 pm
X-Mailer: ELM [version 2.3 PL11]

sure no problem.

A majority of the work that need to be done would be rewriting
an older KSU patch file.  When I set this up originally I had to
apply that patch by hand cause there were just enough changes
most of them comments added to the files so it wouldn't work but
it wouldn't take much effort to fix that.

I'll go threw and comment the 1 major hack that is needed to
get the game to update on time and then ship ya the whole mess. 

chad

::::::::::::::
inbox/803
::::::::::::::
Return-Path: zabel@plains.NoDak.edu
Received: from plains.NoDak.edu by chainsaw.ecn.purdue.edu (5.65/1.32jrs)
	id AA03353; Fri, 23 Apr 93 08:04:59 -0500
Received: by plains.NoDak.edu; Fri, 23 Apr 1993 08:04:51 -0500
From: Chad Zabel <zabel@plains.NoDak.edu>
Message-Id: <199304231304.AA09710@plains.NoDak.edu>
Subject: NeXT Chain 2.3
To: ts@chainsaw.ecn.purdue.edu
Date: Fri, 23 Apr 93 8:04:50 CDT
X-Mailer: ELM [version 2.3 PL11]

Ok, here are the major files that have had changes in them.

tm/schedule.c   (added a call to force updates to be on time))
tm.h            (added Global for forced updates))       
update/main.c   (added a chuck of code you provided to kill update proc.)

All the other changes that I applied I got from
Next-ksu-patch-tar.Z ( I'll mail that to ya also )

The patch file simple needs to be updated.
Added comments to the code have changed line numbers,ect.
Someday I had planned on doing it myself but since we got this game
up I've decided to sit back and relax a bit.  I have finals coming
up here real quick.

The addition to the schedule.c is the only minor hack made.
I commented it all real good so you should understand how it was done.
As I pointed out in the comments it should probably be all
#defined.

Now lets see if I can get all this mailed to ya before my
local link drops. :)

Chad
  
::::::::::::::
inbox/804
::::::::::::::
Return-Path: zabel@plains.NoDak.edu
Received: from plains.NoDak.edu by chainsaw.ecn.purdue.edu (5.65/1.32jrs)
	id AA03370; Fri, 23 Apr 93 08:05:36 -0500
Received: by plains.NoDak.edu; Fri, 23 Apr 1993 08:05:29 -0500
From: Chad Zabel <zabel@plains.NoDak.edu>
Message-Id: <199304231305.AA09763@plains.NoDak.edu>
Subject: no subject (file transmission)
To: ts@chainsaw.ecn.purdue.edu
Date: Fri, 23 Apr 93 8:05:28 CDT
X-Mailer: ELM [version 2.3 PL11]

/*
 * tm.h
 *
 * empire transaction manager
 *
 * Dave Pare, 1986
 * $Revision: 1.1 $ $Date: 91/03/19 23:18:15 $
 */

/*
 * commands to the server
 */
#define	C_LOCK		1
#define C_UNLOCK	2
#define C_IDENT		3
#define C_NATMOD	4
#define C_NEWS		5
#define C_SYNC		6
#ifdef	DEMANDUPDATE
#define C_WANTUPDATE	7
#endif	DEMANDUPDATE
#define C_CLOSE		8

/*
 * response from the transaction manager
 */
#define TM_MOD		1
#define	TM_OK		2
#define	TM_ERROR	3
#define TM_PANIC	4
#define TM_ABORT	5

/*
 * two types of updates
 */
#define	MOBILITY	1
#define PRODUCE		2

/* NeXT Patch */

/* For those with unreliable itimers
 * value is in seconds.
 */

#define UPDATE_CHECK    600
::::::::::::::
inbox/805
::::::::::::::
Return-Path: zabel@plains.NoDak.edu
Received: from plains.NoDak.edu by chainsaw.ecn.purdue.edu (5.65/1.32jrs)
	id AA03363; Fri, 23 Apr 93 08:05:20 -0500
Received: by plains.NoDak.edu; Fri, 23 Apr 1993 08:05:14 -0500
From: Chad Zabel <zabel@plains.NoDak.edu>
Message-Id: <199304231305.AA09741@plains.NoDak.edu>
Subject: no subject (file transmission)
To: ts@chainsaw.ecn.purdue.edu
Date: Fri, 23 Apr 93 8:05:14 CDT
X-Mailer: ELM [version 2.3 PL11]

#ifndef lint
static char *RCSid = "$Header: schedule.c,v 1.15 90/04/13 12:25:46 mr-frog Exp $";
#endif

/*
 * schedule.c
 *
 * called by interrupt to either immediately schedule
 * the execution of an update, or to plan on interrupting
 * the currently executing empire job which is blocking
 * execution of the update.
 *
 * Dave Pare, 1986
 *
 * NeXT patch: itimer has a problem on the NeXT.
 *             It thinks 1 second = 1.042 seconds. (something like that)
 *             This little hack forces a call to check for the update
 *             determined by the UPDATE_CHECK time (in seconds).
 *             Someday this should all be #defined but for now it works.
 *             Without this your updates will be on average of
 *             3-5 minutes late depending on how often the game updates.
 *             Even with this code the update might be a bit off
 *             but its better then nothing.  Chad Zabel/93
 *
 * Coder     : Matt Miller
 * Added     : March 30, 1993            
 */

#include <stdio.h>
#include "misc.h"
#include "user.h"
#include "tm.h"
#include "file.h"
#include "keyword.h"

#include <fcntl.h>
#include <netinet/in.h>
#include <errno.h>
#include <sys/wait.h>
#include <signal.h>

int	blocked = 0;
int	kind = 0;
int	tm_flags = 0;

/* NeXT Patch */
static  timeof_nextupdate = 0;
/* end */

schedule_update()
{
#ifdef	UPDATESCHED
	time_t	now;
	time_t	delta;
	time_t	when;
	
	/* NeXT Patch */
        time_t  timeof_lastupdate = 0;
        /* end */
	
	blocked = 0;
	tm_flags = 0;
	time(&now);
	next_update_check_time(&now, &when, &delta);

#else	UPDATESCHED
	extern	int s_p_etu;
	extern	int etu_per_update;
	extern	int adj_update;
	time_t	now;
	time_t	delta;
	s_char	*p;
	int	hour[2];
	int	secs_per_update;
	
         /* NeXT Patch */
        time_t timeof_lastupdate = 0;
         /* end */
	
	blocked = 0;
	tm_flags = 0;
	time(&now);
	(void) gamehours(now, hour);
	if (p = kw_find("s_p_etu"))
		kw_parse(CF_VALUE, p, &s_p_etu);
	if (p = kw_find("etu_per_update"))
		kw_parse(CF_VALUE, p, &etu_per_update);
	if (p = kw_find("adj_update"))
		kw_parse(CF_VALUE, p, &adj_update);
	now += adj_update;
	secs_per_update = etu_per_update * s_p_etu;
	delta = secs_per_update - (now % secs_per_update);
#endif	UPDATESCHED
	
	/* NeXT patch  */
	time(&timeof_lastupdate);
	timeof_nextupdate = timeof_lastupdate + delta;
	alarm(UPDATE_CHECK);
	logerror("Next update in %d seconds",delta);
	logerror("Checking updates every %d seconds", UPDATE_CHECK);
        /* end */
	
	/* This chunk of code was replaced by the lines above.
	*
	*  logerror("Next update in %d seconds", delta);
	*  alarm(delta);
	*/
} 

static	int pid;

int
execute()
{
	extern  int etu_per_update;
	register int i;
	int	lock;
	int	hour[2];
	time_t	now;
	
        /* NeXT Patch */
	struct  itimerval delta;
        time_t  diff;
	/* end */

	
	time(&now);

	/* NeXT Patch */
	
	/* First check and see if we do want an update not just
	 * an UPDATE_CHECK call.
	 */
	if ( now < timeof_nextupdate )
	{ if (( diff = timeof_nextupdate - now) > UPDATE_CHECK ) {
	    alarm(UPDATE_CHECK);
	    return;
	  }
	else {
	    alarm(diff);
	    return;
	  }
	}
           /* end NeXT patch */
	
	/* if not back to normal updates */
	if (!gamehours(now, hour)) {
		logerror("No update permitted (hours restriction)");
		schedule_update();
		return;
	}
#ifdef	UPDATESCHED
	if ((tm_flags == 0) && !updatetime(&now)) {
		logerror("No update wanted");
		schedule_update();
		return;
	}
#endif	UPDATESCHED
	if (tm_flags == 0) {
		tm_flags = L_NOLOCK;
		lock = 0;
		for (i=0; i<EF_MAX; i++)
			lock += listlock(i);
		if (lock) {
			blocked = 1;
			(void) alarm(10);
			return;
		}
	} else {
		blocked++;
		lock = 0;
		for (i=0; i<EF_MAX; i++) 
			lock += listlock(i);
		if (lock != 0 && blocked > 0) {
			for (i=0; i<EF_MAX; i++) 
				breaklock(i);
			lock = 0;
			io_flush();
		} 
		if (lock != 0) {
			(void) alarm(10);
			return;
		}
	}
	pid = doupdate(PRODUCE, etu_per_update);
}

exec_done()
{
#ifdef hpux
	extern	int child();	/* arrgh! */
#endif
	extern	s_char *signame();
	int	n;
	union	wait w;

	while ((n = wait(&w)) != pid && n != -1)
		;
	if (n == -1) {
		logerror("exec_done: wait on %d failed", pid);
		return;
	}
	if (w.w_termsig)
		logerror("update terminated, %s%s", signame(w.w_termsig),
			w.w_coredump ? " (core dumped)" : "");
	else if (w.w_retcode)
		logerror("update terminated, return %d", w.w_retcode);
#ifdef hpux
	/* HP-UX can't reinstall signal handler until wait(2) done */
	(void) signal(SIGCLD, child);
#endif
	schedule_update();
}

int
doupdate(kind, etu)
	int	kind;
	int	etu;
{
	extern	s_char updatebin[];
	int	pid;
	s_char	av2[32];
	s_char	*argv[4];

	if ((pid = fork()) < 0) {
		logerror("doupdate: fork failed");
		schedule_update();
		return -1;
	}
	if (pid == 0) {
		argv[0] = "update";
		if (kind == PRODUCE)
			argv[1] = "produce";
		else
			argv[1] = "mob";
		sprintf(av2, "%d", etu);
		argv[2] = av2;
		argv[3] = 0;
		execv(updatebin, argv);
		logerror("exec %s failed", updatebin);
		_exit(1);
		/*NOTREACHED*/
	}
	return pid;
}




::::::::::::::
inbox/806
::::::::::::::
Return-Path: zabel@plains.NoDak.edu
Received: from plains.NoDak.edu by chainsaw.ecn.purdue.edu (5.65/1.32jrs)
	id AA03386; Fri, 23 Apr 93 08:06:23 -0500
Received: by plains.NoDak.edu; Fri, 23 Apr 1993 08:06:20 -0500
From: Chad Zabel <zabel@plains.NoDak.edu>
Message-Id: <199304231306.AA09804@plains.NoDak.edu>
Subject: no subject (file transmission)
To: ts@chainsaw.ecn.purdue.edu
Date: Fri, 23 Apr 93 8:06:20 CDT
X-Mailer: ELM [version 2.3 PL11]

 The following architecture-dependent variables may be configured.
 Any of them may be excluded if they are not needed.
OCALCFLAGS := $(LOCALCFLAGS) -bsd -fwritabl -strings -traditional -Dconst="" -Dinline=""
OCALIFLAGS := $(LOCALIFLAGS)
OCALLFLAGS := $(LOCALLFLAGS)
OCALSFLAGS := $(LOCALSFLAGS)
::::::::::::::
inbox/807
::::::::::::::
Return-Path: zabel@plains.NoDak.edu
Received: from plains.NoDak.edu by chainsaw.ecn.purdue.edu (5.65/1.32jrs)
	id AA03372; Fri, 23 Apr 93 08:05:49 -0500
Received: by plains.NoDak.edu; Fri, 23 Apr 1993 08:05:44 -0500
From: Chad Zabel <zabel@plains.NoDak.edu>
Message-Id: <199304231305.AA09776@plains.NoDak.edu>
Subject: no subject (file transmission)
To: ts@chainsaw.ecn.purdue.edu
Date: Fri, 23 Apr 93 8:05:43 CDT
X-Mailer: ELM [version 2.3 PL11]

#ifndef lint
static char *RCSid = "$Header: /u/dhay/stan/kent/update/RCS/main.c,v 1.1 91/03/19 23:39:18 dhay Exp Locker: dhay $";
#endif

/*
 * main.c
 *
 * main command loop and initialization
 * for empire tm server
 *
 * Dave Pare, 1986
 */

#include "misc.h"
#include "tm.h"
#include "bit.h"
#include "nat.h"
#include "file.h"
#include "io_mask.h"
#include "io.h"
#ifdef BUDGET
#include "sect.h"
#endif /* BUDGET */

#include <sys/socket.h>
#include <sys/wait.h>
#include <sys/time.h>
#include <sys/un.h>
#include <signal.h>
#include <errno.h>
#include <sys/ioctl.h>
#include <fcntl.h>

extern	int errno;

s_char	*program = "update";
int	(*leprfunc)();
int	aborted;

long	money[MAXNOC];
long	pops[MAXNOC];
long	sea_money[MAXNOC];
long	air_money[MAXNOC];
natid	cnum = 0;

main(argc, argv)
	int	argc;
	s_char	**argv;
{
	extern	int etu_per_update;
	extern	double money_res;
	long	now;
	int	etu;
	int	produce;
	int	n;
#ifdef BUDGET
	int	x;
#endif /* BUDGET */
#ifdef SLOW_WAR
	int	cn,cn2,rel;
	struct	natstr *cnp;
#endif /* SLOW_WAR */
	struct	natstr *np;

	if (argc < 3) {
		logerror("usage: %s \"produce|mob\" #etus\n", program);
		exit(1);
	}
	time(&now);
	srandom(now);
	produce = 0;
	if (strcmp(argv[1], "produce") == 0)
		produce = 1;
	else if (strcmp(argv[1], "mob") != 0) {
		logerror("no such update type %s\n", argv[1]);
		exit(1);
	}
	if ((etu = atoi(argv[2])) <= 0) {
		logerror("etu value must be positive\n");
		exit(1);
	}
	if (etu != etu_per_update) {
		logerror("warning: etu_per_update: %d, argv[2]: %d",
			etu_per_update, etu);
	}
	errno = 0;
	logerror("%s update pid %d", argv[1], getpid());
	io_init();
	if (!tm_connect()) {
		logerror("can't connect to transaction manager");
		exit(1);
	}
	ef_open(EF_NATION, O_RDONLY, EFF_MEM);
	ef_open(EF_SECTOR, O_RDWR, EFF_MEM);
	ef_open(EF_SHIP, O_RDWR, EFF_MEM);
	ef_open(EF_PLANE, O_RDWR, EFF_MEM);
	if (produce) {
		/*
		 * set up all the variables which get used in the
		 * sector production routine (for producing education,
		 * happiness, and printing out the state of the nation)
		 */
		logerror("production update (%d etus)", etu);
		ef_open(EF_NEWS, O_RDWR, 0);
		bzero((s_char *)pops, sizeof(pops));
		bzero((s_char *)air_money, sizeof(air_money));
		bzero((s_char *)sea_money, sizeof(sea_money));
		for (n=0; n<MAXNOC; n++) {
			money[n] = 0;
			if ((np = getnatp(n)) == (struct natstr *)0)
				continue;
			money[n] = np->nat_money;
		}
#ifndef BUDGET
		prod_ship(etu);
		prod_plane(etu);
		/*
		 * NOTE: prod_sect MUST be last after all other production
		 * in order to have a proper tally of the pop and money
		 * used this update
		 */
		prod_sect(etu);
#else
		prepare_sects(etu);
		for(x=0;x<MAXNOC;x++){
			int	y,z,sb=0,sm=0,pb=0,pm=0;
			struct natstr *np;

			if ((np = getnatp(x)) == (struct natstr *)0)
				continue;

			np->nat_money += (int) (np->nat_reserve * money_res);
			for(y=1;y<SCT_MAXDEF+6;y++){
				for(z=0;z<SCT_MAXDEF+6;z++)
					if (np->nat_priorities[z] == y)
						do_prod(z,etu,x,
							&sb,&sm,&pb,&pm);
			}
			/* 0 is maintain, 1 is build */
			if (!sm) prod_ship(etu,x,0);
			if (!sb) prod_ship(etu,x,1);
			if (!pm) prod_plane(etu,x,0);
			if (!pb) prod_plane(etu,x,1);
			/* produce all sects that haven't produced yet */
			produce_sect(x,etu,-1);
		}
		finish_sects(etu);
#endif /* BUDGET */
		prod_nat(etu);
		age_levels(etu);
		ef_close(EF_NEWS);
		flushwu();
#ifdef SLOW_WAR
		/* Update war declarations */
		/* MOBILIZATION->SITZKRIEG->AT_WAR */
		for (cn=1; cn < MAXNOC; cn++){
			if ((cnp = getnatp(cn)) == 0)
				break;
			for (cn2=1; cn2 < MAXNOC; cn2++) {
				if (cn2 == cn)
                        		continue;
				rel=getrel(cnp,cn2);
				if (rel == MOBILIZATION){
				    rel = SITZKRIEG;
				    setrel(cn,cn2,rel);
				}
				else if (rel == SITZKRIEG){
				    rel = AT_WAR;
				    setrel(cn,cn2,rel);
			    	}
			}
        	}
#endif /* SLOW_WAR */
	}
	mob_ship(etu);
	mob_sect(etu);
	mob_plane(etu);
#ifdef DEMANDUPDATE
	update_removewants();
#endif DEMANDUPDATE
	ef_close(EF_SECTOR);
	ef_close(EF_SHIP);
	ef_close(EF_PLANE);
	logerror("End %s update", argv[1]);
	tm_exit(0);
	ef_close(EF_NATION);
}

tm_exit(code)
	int	code;
{
	extern	iop_t iop;
	
/*  commented out to fix, Toms fix.   by   (chad , 3/23/93)
*   Update process hangs around and won't die!!
*       tm_close();
*	io_noblocking(iop, 1);
*	while (!io_eof(iop) && !io_error(iop)){
*		io_flush();
*		io_select(0);
*		io_input(iop);
*		io_output(iop);
*	}
*/
	
	/* added to fix hanging updates */
	
	io_input(iop);        /* ignore input */
	io_noblocking(iop,0);
	while (io_output(iop) > 0 )
	       ;
	io_close(iop);
	logerror("exiting");
	exit(code);

      
	io_close(iop);
	logerror("exiting");
	exit(code);
}
        /* End addition to hanging updates */
    

#ifdef BUDGET
do_prod(sector_type,etu,n,ship_build,ship_maint,plane_build,plane_maint)
	int sector_type;
	int n,*ship_build,*ship_maint;
	int *plane_build,*plane_maint;
{
	if (sector_type == PRI_SMAINT){
		prod_ship(etu,n,0);
		*ship_maint=1;
	}
	else
	if (sector_type == PRI_SBUILD){
		prod_ship(etu,n,1);
		*ship_build=1;
	}
	else
	if (sector_type == PRI_PMAINT){
		prod_plane(etu,n,0);
		*plane_maint=1;
	}
	else
	if (sector_type == PRI_PBUILD){
		prod_plane(etu,n,1);
		*plane_build=1;
	}
	else
		produce_sect(n,etu,sector_type);
}
#endif /* BUDGET */

(Message inbox:808)
Return-Path: zabel@plains.NoDak.edu
Received: from plains.NoDak.edu by chainsaw.ecn.purdue.edu (5.65/1.32jrs)
	id AA03382; Fri, 23 Apr 93 08:06:15 -0500
Received: by plains.NoDak.edu; Fri, 23 Apr 1993 08:06:05 -0500
From: Chad Zabel <zabel@plains.NoDak.edu>
Message-Id: <199304231306.AA09793@plains.NoDak.edu>
Subject: no subject (file transmission)
To: ts@chainsaw.ecn.purdue.edu
Date: Fri, 23 Apr 93 8:06:05 CDT
X-Mailer: ELM [version 2.3 PL11]

*** EMP.KSU.1.03/client/GNUmakefile	Wed Mar 27 16:31:05 1991
--- EMP/client/GNUmakefile	Fri Oct 18 16:34:30 1991
***************
*** 5,11 ****
  LOCALLFLAGS :=
  LOCALSFLAGS :=
  
! LIBS := -ltermlib -lc
  BIN := emp_client
  IMPORTS := bit.h misc.h proto.h queue.h
  #-----------------------------------#
--- 5,11 ----
  LOCALLFLAGS :=
  LOCALSFLAGS :=
  
! LIBS := -ltermlib -lsys_s
  BIN := emp_client
  IMPORTS := bit.h misc.h proto.h queue.h
  #-----------------------------------#

*** EMP.KSU.1.03/client/expect.c	Thu Jun  7 12:37:00 1990
--- EMP/client/expect.c	Fri Oct 18 16:33:18 1991
***************
*** 23,29 ****
--- 23,31 ----
  	int	match;
  	char	*buf;
  {
+ #ifndef index
  	extern	char *index();
+ #endif
  	int	size;
  	char	*p;
  	int	n;

*** EMP.KSU.1.03/client/misc.h	Thu May 23 00:09:53 1991
--- EMP/client/misc.h	Fri Oct 18 16:34:11 1991
***************
*** 77,84 ****
--- 77,88 ----
  extern	char *ctime();
  extern	char *strncpy();
  extern	char *strcpy();
+ #ifndef index
  extern	char *index();
+ #endif
+ #ifndef index
  extern	char *rindex();
+ #endif
  
  extern	time_t time();
  extern	double atof();

*** EMP.KSU.1.03/h/misc.h	Fri Jun 28 02:25:08 1991
--- EMP/h/misc.h	Fri Oct 18 16:47:45 1991
***************
*** 77,84 ****
--- 77,88 ----
  extern	char *ctime();
  extern	char *strncpy();
  extern	char *strcpy();
+ #ifndef index
  extern	char *index();
+ #endif
+ #ifndef rindex
  extern	char *rindex();
+ #endif
  
  extern	time_t time();
  extern	double atof();

*** EMP.KSU.1.03/lib/common/keyword.c	Thu Jun  7 12:36:31 1990
--- EMP/lib/common/keyword.c	Fri Oct 18 16:37:42 1991
***************
*** 87,93 ****
--- 87,95 ----
  	char	*text;
  	int	*data;
  {
+ #ifndef index
  	extern	char *index();
+ #endif
  	char	*get_time();
  	char	*weekday();
  	char	*next;

*** EMP.KSU.1.03/lib/common/log.c	Thu Jun  7 12:36:30 1990
--- EMP/lib/common/log.c	Fri Oct 18 16:37:57 1991
***************
*** 36,42 ****
--- 36,44 ----
  logerror(va_alist)
  	va_dcl
  {
+ #ifndef index
  	extern	char *index();
+ #endif
  	extern	char *program;
  	extern	char logfil[];
  	extern	char *sys_errlist[];

*** EMP.KSU.1.03/lib/gen/inet.c	Thu Jun  7 12:36:07 1990
--- EMP/lib/gen/inet.c	Fri Oct 18 17:35:12 1991
***************
*** 10,16 ****
  #include <sys/types.h>
  #include <netinet/in.h>
  
! char *
  inet_ntoa(addr)
  	struct in_addr addr;
  {
--- 10,22 ----
  #include <sys/types.h>
  #include <netinet/in.h>
  
! /* Commented out for compatibility with already existing function on 
! * the NeXT. Should be #ifdef'ed, but I'm not sure how to managed it.
! *
! * Matt Rollefson
! * 10-18-91 */
! 
! /* char *
  inet_ntoa(addr)
  	struct in_addr addr;
  {
***************
*** 20,23 ****
  	p = (u_char *)&addr;
  	sprintf(str, "%d.%d.%d.%d", p[0], p[1], p[2], p[3]);
  	return str;
! }
--- 26,29 ----
  	p = (u_char *)&addr;
  	sprintf(str, "%d.%d.%d.%d", p[0], p[1], p[2], p[3]);
  	return str;
! } */

*** EMP.KSU.1.03/lib/gen/vsprintf.c	Thu Jun  7 12:36:06 1990
--- EMP/lib/gen/vsprintf.c	Fri Oct 18 16:39:51 1991
***************
*** 71,77 ****
  
  typedef int *intp;
  
! int vsprintf(dest, format, args)
  char *dest;
  register char *format;
  va_list args;
--- 71,83 ----
  
  typedef int *intp;
  
! /* Commented out because there's already one resident on the NeXT -
! * I should really figure out how to #ifdef this out instead.
! *
! * 10-18-91
! * Matt Rollefson */
! 
! /* int vsprintf(dest, format, args)
  char *dest;
  register char *format;
  va_list args;
***************
*** 178,181 ****
      }
      *dp = '\0';
      return dp - dest;
! }
--- 184,187 ----
      }
      *dp = '\0';
      return dp - dest;
! } */

*** EMP.KSU.1.03/login/GNUmakefile	Thu Jun  7 12:37:09 1990
--- EMP/login/GNUmakefile	Fri Oct 18 16:40:45 1991
***************
*** 5,11 ****
  LOCALLFLAGS :=
  LOCALSFLAGS :=
  
! LIBS := ../lib/libcommon.a ../lib/libgen.a ../lib/libglobal.a -lc
  BIN := emp_login
  #-----------------------------------#
  
--- 5,11 ----
  LOCALLFLAGS :=
  LOCALSFLAGS :=
  
! LIBS := ../lib/libcommon.a ../lib/libgen.a ../lib/libglobal.a -lsys_s
  BIN := emp_login
  #-----------------------------------#
  
*** EMP.KSU.1.03/player/GNUmakefile	Thu Jun 14 03:06:36 1990
--- EMP/player/GNUmakefile	Fri Oct 18 16:43:23 1991
***************
*** 7,13 ****
  
  DIRS := commands subs
  LIBS := commands.a subs.a ../lib/libclient.a ../lib/libcommon.a \
! 	../lib/libgen.a ../lib/libglobal.a -lm -lc
  LINTLIBS := commands subs
  BIN := emp_player
  #-----------------------------------#
--- 7,13 ----
  
  DIRS := commands subs
  LIBS := commands.a subs.a ../lib/libclient.a ../lib/libcommon.a \
! 	../lib/libgen.a ../lib/libglobal.a -lm -lsys_s
  LINTLIBS := commands subs
  BIN := emp_player
  #-----------------------------------#

*** EMP.KSU.1.03/tm/GNUmakefile	Thu Jun 14 03:23:36 1990
--- EMP/tm/GNUmakefile	Fri Oct 18 16:45:12 1991
***************
*** 5,11 ****
  LOCALLFLAGS :=
  LOCALSFLAGS :=
  
! LIBS := ../lib/libcommon.a ../lib/libgen.a ../lib/libglobal.a -lc
  BIN := emp_tm
  #-----------------------------------#
  
--- 5,11 ----
  LOCALLFLAGS :=
  LOCALSFLAGS :=
  
! LIBS := ../lib/libcommon.a ../lib/libgen.a ../lib/libglobal.a -lsys_s
  BIN := emp_tm
  #-----------------------------------#
  
*** EMP.KSU.1.03/update/GNUmakefile	Thu Jun 14 03:23:56 1990
--- EMP/update/GNUmakefile	Fri Oct 18 16:45:46 1991
***************
*** 6,12 ****
  LOCALSFLAGS :=
  
  LIBS := ../lib/libclient.a ../lib/libcommon.a ../lib/libgen.a \
! 	../lib/libglobal.a -lm -lc
  BIN := emp_update
  #-----------------------------------#
  
--- 6,12 ----
  LOCALSFLAGS :=
  
  LIBS := ../lib/libclient.a ../lib/libcommon.a ../lib/libgen.a \
! 	../lib/libglobal.a -lm -lsys_s
  BIN := emp_update
  #-----------------------------------#
  
*** EMP.KSU.1.03/util/GNUmakefile	Wed Jun 12 19:14:47 1991
--- EMP/util/GNUmakefile	Fri Oct 18 16:46:16 1991
***************
*** 6,12 ****
  LOCALSFLAGS :=
  
  LIBS := ../lib/$(ARCH)/libcommon.a ../lib/$(ARCH)/libgen.a \
! 	../lib/$(ARCH)/libglobal.a -lc
  BINS := empchk file land ore randpop vchk setup land_old wldchk newore
  #-----------------------------------#
  
--- 6,12 ----
  LOCALSFLAGS :=
  
  LIBS := ../lib/$(ARCH)/libcommon.a ../lib/$(ARCH)/libgen.a \
! 	../lib/$(ARCH)/libglobal.a -lsys_s
  BINS := empchk file land ore randpop vchk setup land_old wldchk newore
  #-----------------------------------#
  


*** EMP.KSU.1.03/make/Systems/NeXT	Wed Jun 12 19:14:47 1991
--- EMP/make/Systems/NeXT	Fri Oct 18 16:46:16 1991
***************
*** 0,0 ****
--- 1,7 ----
+# The following architecture-dependent variables may be configured.
+# Any of them may be excluded if they are not needed.
+
+LOCALCFLAGS := $(LOCALCFLAGS) -bsd -fwritable-strings -traditional -Dconst="" -Dinline=""
+LOCALIFLAGS := $(LOCALIFLAGS)
+LOCALLFLAGS := $(LOCALLFLAGS)
+LOCALSFLAGS := $(LOCALSFLAGS)

