From decwrl!decvax!tektronix!tekgen!tekred!games Wed Dec 28 05:49:01 PST 1988 Article 463 of comp.sources.games: Path: granite!decwrl!decvax!tektronix!tekgen!tekred!games From: games@tekred.TEK.COM Newsgroups: comp.sources.games Subject: v05i098: tess - beyond the tesseract, an abstract adventure game, Patch2 Message-ID: <3399@tekred.TEK.COM> Date: 20 Dec 88 16:51:40 GMT Sender: billr@tekred.TEK.COM Lines: 117 Approved: billr@saab.CNA.TEK.COM Submitted by: Viola lee Comp.sources.games: Volume 5, Issue 98 Archive-name: tess/Patch2 [If you have an uptodate version of patch, you can feed this article to it directly, along with specifing your tess source directory. -br] [[Here are a couple of patches to help "tess" compile under UNIX System V. Basically, they get around the lack of the gettimeofday() call, using the localtime() call instead. It also makes it use the better random number routines in System V. These patches are courtesy of: Dave Yearke, Sigma Systems Technology, Inc. 5813 Main St, Williamsville, NY 14221 ...!sunybcs!sigmast!dgy]] #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh 'patches02' <<'END_OF_FILE' X*** tess.c.sav Sat Dec 17 09:00:35 1988 X--- tess.c Sat Dec 17 09:20:54 1988 X*************** X*** 87,93 **** X--- 87,98 ---- X X #include "tess-def.c" X #include "parser.c" X+ #ifdef SYSV X+ #include X+ #include X+ #else /* !SYSV */ X #include X+ #endif /* !SYSV */ X X X /*------------------------------------------------------------*/ X*************** X*** 126,133 **** X--- 131,143 ---- X InitAdv() X { X int i; X+ #ifdef SYSV X+ time_t now; X+ struct tm *tp; X+ #else /* !SYSV */ X struct timeval tp; X struct timezone tzp; X+ #endif /* !SYSV */ X X for ( i=1; itm_sec); X+ for ( sum=0, i=0; i<3; i++ ) X+ sum += (dc [i] = drand48() & 31); X+ #else /* !SYSV */ X (void)srand ((int)tp.tv_sec); X for ( sum=0, i=0; i<3; i++ ) X sum += (dc [i] = rand() & 31); X+ #endif /* !SYSV */ X X print_room = 1; X } X*** Makefile.orig Tue Nov 29 17:26:32 1988 X--- Makefile Tue Dec 20 08:52:26 1988 X*************** X*** 1,6 **** X # simple makefile for tess X X! CFLAGS = -O X X tess: tess.c tess-def.c parser.c X cc -o tess $(CFLAGS) tess.c X--- 1,7 ---- X # simple makefile for tess X X! DEFINES = #-DSYSV X! CFLAGS = -O $(DEFINES) X X tess: tess.c tess-def.c parser.c X cc -o tess $(CFLAGS) tess.c END_OF_FILE if test 1619 -ne `wc -c <'patches02'`; then echo shar: \"'patches02'\" unpacked with wrong size! fi # end of 'patches02' fi echo shar: End of shell archive. exit 0