*BSD News Article 81629


Return to BSD News archive

Newsgroups: comp.bugs.2bsd
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!howland.erols.net!newsfeed.internetmci.com!in3.uu.net!news.new-york.net!wlbr!moe.2bsd.com!sms
From: sms@moe.2bsd.com (Steven M. Schultz)
Subject: battlestar(6) and phantasia(6) fail to compile (#334)
Organization: 2BSD, Simi Valley CA USA
Message-ID: <Dzyorz.JAF@moe.2bsd.com>
Date: Mon, 28 Oct 1996 01:14:23 GMT
Lines: 1166

Subject: battlestar(6) and phantasia(6) fail to compile (#334)
Index:	games/battlestar,phantasia 2.11BSD

Description:
	Two of the games in /usr/src/games now fail to compile due to
	changes in the system header files.

Repeat-By:
	cd /usr/src/games/battlestar (or /usr/src/games/phantasia)
	make

Fix:
	The problem is one of name collisions.  Previous versions of the
	system header files did not declare 'time' or 'howmany'.  When
	the system .h files were modified (by importing 4.4BSD features)
	some programs broke.

	There was also a bug in the use of 'sigblock' which has been
	fixed.

	Granted these are not the most important programs around but
	they are fun to play once in a while (besides, they used to
	compile just fine).

	Cut where indicated, saving to a file (/tmp/334).  Then:

		patch -p0 < /tmp/334
		cd /usr/src/games/battlestar
		make
		make install
		make clean
		cd /usr/src/games/phantasia
		make
		make install
		make clean

	As always this and previous updates to 2.11BSD are available via
	anonymous FTP to either FTP.IIPO.GTEGSC.COM or MOE.2BSD.COM in
	the directory /pub/2.11BSD.

----------------------cut here----------------------
*** /usr/src/games/battlestar/com1.c.old	Fri Jul 31 20:55:55 1987
--- /usr/src/games/battlestar/com1.c	Sat Oct 26 17:13:48 1996
***************
*** 5,11 ****
   */
  
  #if !defined(lint) && !defined(pdp11)
! static char sccsid[] = "@(#)com1.c	1.3 4/24/85";
  #endif
  
  #include "externs.h"
--- 5,11 ----
   */
  
  #if !defined(lint) && !defined(pdp11)
! static char sccsid[] = "@(#)com1.c	1.3.1 1996/10/26";
  #endif
  
  #include "externs.h"
***************
*** 18,24 ****
  		if (thataway) {
  			position = thataway;
  			newway(token);
! 			time++;
  		}
  		else {
  			puts("You can't go this way.");
--- 18,24 ----
  		if (thataway) {
  			position = thataway;
  			newway(token);
! 			Time++;
  		}
  		else {
  			puts("You can't go this way.");
***************
*** 61,84 ****
  	register int n;
  	int hurt;
  
! 	if (time > 30 && position < 32){
  		puts("An explosion of shuddering magnitude splinters bulkheads and");
  		puts("ruptures the battlestar's hull.  You are sucked out into the");
  		puts("frozen void of space and killed.");
  		die();
  	}
! 	if (time > 20 && position < 32)
  		puts("Explosions rock the battlestar.");
! 	if (time > snooze){
  		puts("You drop from exhaustion...");
  		zzz();
  	}
! 	if (time > snooze - 5)
  		puts("You're getting tired.");
! 	if (time > (rythmn + CYCLE)) {
  		if (location == nightfile) {
  			convert(TODAY);
! 			if (OUTSIDE && time - rythmn - CYCLE < 10) {
  				puts("Dew lit sunbeams stretch out from a watery sunrise and herald the dawn.");
  				puts("You awake from a misty dream-world into stark reality.");
  				puts("It is day.");
--- 61,84 ----
  	register int n;
  	int hurt;
  
! 	if (Time > 30 && position < 32){
  		puts("An explosion of shuddering magnitude splinters bulkheads and");
  		puts("ruptures the battlestar's hull.  You are sucked out into the");
  		puts("frozen void of space and killed.");
  		die();
  	}
! 	if (Time > 20 && position < 32)
  		puts("Explosions rock the battlestar.");
! 	if (Time > snooze){
  		puts("You drop from exhaustion...");
  		zzz();
  	}
! 	if (Time > snooze - 5)
  		puts("You're getting tired.");
! 	if (Time > (rythmn + CYCLE)) {
  		if (location == nightfile) {
  			convert(TODAY);
! 			if (OUTSIDE && Time - rythmn - CYCLE < 10) {
  				puts("Dew lit sunbeams stretch out from a watery sunrise and herald the dawn.");
  				puts("You awake from a misty dream-world into stark reality.");
  				puts("It is day.");
***************
*** 86,92 ****
  		} else {
  			convert(TONIGHT);
  			clearbit(location[POOLS].objects, BATHGOD);
! 			if (OUTSIDE && time - rythmn - CYCLE < 10) {
  				puts("The dying sun sinks into the ocean, leaving a blood stained sunset.");
  				puts("The sky slowly fades from orange to violet to black.  A few stars");
  				puts("flicker on, and it is night.");
--- 86,92 ----
  		} else {
  			convert(TONIGHT);
  			clearbit(location[POOLS].objects, BATHGOD);
! 			if (OUTSIDE && Time - rythmn - CYCLE < 10) {
  				puts("The dying sun sinks into the ocean, leaving a blood stained sunset.");
  				puts("The sky slowly fades from orange to violet to black.  A few stars");
  				puts("flicker on, and it is night.");
***************
*** 93,99 ****
  				puts("The world seems completly different at night.");
  			}
  		}
! 		rythmn = time - time % CYCLE;
  	}
  	if (!wiz && !tempwiz)
  		if ((testbit(inven,TALISMAN) || testbit(wear,TALISMAN)) && (testbit(inven,MEDALION) || testbit(wear,MEDALION)) && (testbit(inven,AMULET) || testbit(wear,AMULET))){
--- 93,99 ----
  				puts("The world seems completly different at night.");
  			}
  		}
! 		rythmn = Time - Time % CYCLE;
  	}
  	if (!wiz && !tempwiz)
  		if ((testbit(inven,TALISMAN) || testbit(wear,TALISMAN)) && (testbit(inven,MEDALION) || testbit(wear,MEDALION)) && (testbit(inven,AMULET) || testbit(wear,AMULET))){
***************
*** 142,157 ****
  	}
  	if (testbit(location[position].objects, GIRL))
  		meetgirl = 1;
! 	if (meetgirl && CYCLE * 1.5 - time < 10){
  		setbit(location[GARDEN].objects,GIRLTALK);
  		setbit(location[GARDEN].objects,LAMPON);
  		setbit(location[GARDEN].objects,ROPE);
  	}
! 	if (position == DOCK && (beenthere[position] || time > CYCLE)){
  		clearbit(location[DOCK].objects, GIRL);
  		clearbit(location[DOCK].objects,MAN);
  	}
! 	if (meetgirl && time - CYCLE * 1.5 > 10){
  		clearbit(location[GARDEN].objects,GIRLTALK);
  		clearbit(location[GARDEN].objects,LAMPON);
  		clearbit(location[GARDEN].objects,ROPE);
--- 142,157 ----
  	}
  	if (testbit(location[position].objects, GIRL))
  		meetgirl = 1;
! 	if (meetgirl && CYCLE * 1.5 - Time < 10){
  		setbit(location[GARDEN].objects,GIRLTALK);
  		setbit(location[GARDEN].objects,LAMPON);
  		setbit(location[GARDEN].objects,ROPE);
  	}
! 	if (position == DOCK && (beenthere[position] || Time > CYCLE)){
  		clearbit(location[DOCK].objects, GIRL);
  		clearbit(location[DOCK].objects,MAN);
  	}
! 	if (meetgirl && Time - CYCLE * 1.5 > 10){
  		clearbit(location[GARDEN].objects,GIRLTALK);
  		clearbit(location[GARDEN].objects,LAMPON);
  		clearbit(location[GARDEN].objects,ROPE);
***************
*** 221,227 ****
  		}
  		notes[LAUNCHED] = 0;
  		setbit(location[position].objects,CRASH);
! 		time += rnd(CYCLE/4);
  		puts("The viper explodes into the ground and you lose consciousness...");
  		zzz();
  		hurt1 = rnd(NUMOFINJURIES - 2) + 2;
--- 221,227 ----
  		}
  		notes[LAUNCHED] = 0;
  		setbit(location[position].objects,CRASH);
! 		Time += rnd(CYCLE/4);
  		puts("The viper explodes into the ground and you lose consciousness...");
  		zzz();
  		hurt1 = rnd(NUMOFINJURIES - 2) + 2;
*** /usr/src/games/battlestar/com2.c.old	Thu Jul 30 21:37:31 1987
--- /usr/src/games/battlestar/com2.c	Sat Oct 26 17:14:35 1996
***************
*** 5,11 ****
   */
  
  #if !defined(lint) && !defined(pdp11)
! static char sccsid[] = "@(#)com2.c	1.3 4/24/85";
  #endif
  
  #include "externs.h"
--- 5,11 ----
   */
  
  #if !defined(lint) && !defined(pdp11)
! static char sccsid[] = "@(#)com2.c	1.3.1 1996/10/26";
  #endif
  
  #include "externs.h"
***************
*** 54,60 ****
  					setbit(wear,value);
  					carrying -= objwt[value];
  					encumber -= objcumber[value];
! 					time++;
  					printf("You are now wearing %s %s.\n",(objsht[value][n-1] == 's' ? "the" : "a"), objsht[value]);
  				}
  				else if (testbit(wear,value))
--- 54,60 ----
  					setbit(wear,value);
  					carrying -= objwt[value];
  					encumber -= objcumber[value];
! 					Time++;
  					printf("You are now wearing %s %s.\n",(objsht[value][n-1] == 's' ? "the" : "a"), objsht[value]);
  				}
  				else if (testbit(wear,value))
***************
*** 102,108 ****
  				location[position].down = 160;
  				whichway(location[position]);
  				puts("The waves subside and it is possible to descend to the sea cave now.");
! 				time++;
  				return(-1);
  			}
  		}
--- 102,108 ----
  				location[position].down = 160;
  				whichway(location[position]);
  				puts("The waves subside and it is possible to descend to the sea cave now.");
! 				Time++;
  				return(-1);
  			}
  		}
***************
*** 112,118 ****
  			position = 224;
  		else
  			position = 229;
! 		time++;
  		return(0);
  	}
  	else if (position == FINAL)
--- 112,118 ----
  			position = 224;
  		else
  			position = 229;
! 		Time++;
  		return(0);
  	}
  	else if (position == FINAL)
***************
*** 198,204 ****
  {
  	while (wordtype[++wordnumber] != NOUNS && wordnumber <= wordcount);
  	if (wordtype[wordnumber] == NOUNS && testbit(location[position].objects,wordvalue[wordnumber])){
! 		time++;
  		switch(wordvalue[wordnumber]){
  			case NORMGOD:
  				puts("You attack the goddess, and she screams as you beat her.  She falls down");
--- 198,204 ----
  {
  	while (wordtype[++wordnumber] != NOUNS && wordnumber <= wordcount);
  	if (wordtype[wordnumber] == NOUNS && testbit(location[position].objects,wordvalue[wordnumber])){
! 		Time++;
  		switch(wordvalue[wordnumber]){
  			case NORMGOD:
  				puts("You attack the goddess, and she screams as you beat her.  She falls down");
***************
*** 245,251 ****
  
  follow()
  {
! 	if (followfight == time){
  		puts("The Dark Lord leaps away and runs down secret tunnels and corridoors.");
  		puts("You chase him through the darkness and splash in pools of water.");
  		puts("You have cornered him.  His laser sword extends as he steps forward.");
--- 245,251 ----
  
  follow()
  {
! 	if (followfight == Time){
  		puts("The Dark Lord leaps away and runs down secret tunnels and corridoors.");
  		puts("You chase him through the darkness and splash in pools of water.");
  		puts("You have cornered him.  His laser sword extends as he steps forward.");
***************
*** 255,261 ****
  		setbit(location[position].objects,AMULET);
  		return(0);
  	}
! 	else if (followgod == time){
  		puts("The goddess leads you down a steamy tunnel and into a high, wide chamber.");
  		puts("She sits down on a throne.");
  		position = 268;
--- 255,261 ----
  		setbit(location[position].objects,AMULET);
  		return(0);
  	}
! 	else if (followgod == Time){
  		puts("The goddess leads you down a steamy tunnel and into a high, wide chamber.");
  		puts("She sits down on a throne.");
  		position = 268;
*** /usr/src/games/battlestar/com3.c.old	Thu Jul 30 21:37:38 1987
--- /usr/src/games/battlestar/com3.c	Sat Oct 26 17:15:24 1996
***************
*** 5,11 ****
   */
  
  #if !defined(lint) && !defined(pdp11)
! static char sccsid[] = "@(#)com3.c	1.2 4/24/85";
  #endif
  
  #include "externs.h"
--- 5,11 ----
   */
  
  #if !defined(lint) && !defined(pdp11)
! static char sccsid[] = "@(#)com3.c	1.2.1 1996/10/26";
  #endif
  
  #include "externs.h"
***************
*** 14,20 ****
  {
  	if (testbit(inven,SHOVEL)){
  		puts("OK");
! 		time++;
  		switch(position){
  			case 144:		/* copse near beach */
  				if (!notes[DUG]){
--- 14,20 ----
  {
  	if (testbit(inven,SHOVEL)){
  		puts("OK");
! 		Time++;
  		switch(position){
  			case 144:		/* copse near beach */
  				if (!notes[DUG]){
***************
*** 149,155 ****
  		CUMBER = MAXCUMBER;
  		for (n=0; n < NUMOFINJURIES; n++)
  			injuries[n] = 0;
! 		time++;
  		zzz();
  	}
  	else
--- 149,155 ----
  		CUMBER = MAXCUMBER;
  		for (n=0; n < NUMOFINJURIES; n++)
  			injuries[n] = 0;
! 		Time++;
  		zzz();
  	}
  	else
***************
*** 172,178 ****
  			for (n=0; objsht[value][n]; n++);
  			if (testbit(location[position].objects,value)){
  				clearbit(location[position].objects,value);
! 				time++;
  				printf("The %s explode%s\n",objsht[value],(objsht[value][n-1]=='s' ? (objsht[value][n-2]=='s' ? "s." : ".") : "s."));
  				if (value == BOMB)
  					die();
--- 172,178 ----
  			for (n=0; objsht[value][n]; n++);
  			if (testbit(location[position].objects,value)){
  				clearbit(location[position].objects,value);
! 				Time++;
  				printf("The %s explode%s\n",objsht[value],(objsht[value][n-1]=='s' ? (objsht[value][n-2]=='s' ? "s." : ".") : "s."));
  				if (value == BOMB)
  					die();
***************
*** 187,193 ****
  			    /* special cases with their own return()'s */
  
  		if (wordnumber <= wordcount && wordtype[wordnumber] == NOUNS){
! 			time++;
  			switch(wordvalue[wordnumber]){
  			
  				case DOOR:
--- 187,193 ----
  			    /* special cases with their own return()'s */
  
  		if (wordnumber <= wordcount && wordtype[wordnumber] == NOUNS){
! 			Time++;
  			switch(wordvalue[wordnumber]){
  			
  				case DOOR:
*** /usr/src/games/battlestar/com4.c.old	Thu Jul 30 21:37:43 1987
--- /usr/src/games/battlestar/com4.c	Sat Oct 26 17:16:08 1996
***************
*** 5,11 ****
   */
  
  #if !defined(lint) && !defined(pdp11)
! static char sccsid[] = "@(#)com4.c	1.3 4/24/85";
  #endif
  
  #include "externs.h"
--- 5,11 ----
   */
  
  #if !defined(lint) && !defined(pdp11)
! static char sccsid[] = "@(#)com4.c	1.3.1 1996/10/26";
  #endif
  
  #include "externs.h"
***************
*** 34,40 ****
  				setbit(inven,value);
  				carrying += objwt[value];
  				encumber += objcumber[value];
! 				time++;
  				if (testbit(from,value))
  					printf("Taken.\n");
  				else
--- 34,40 ----
  				setbit(inven,value);
  				carrying += objwt[value];
  				encumber += objcumber[value];
! 				Time++;
  				if (testbit(from,value))
  					printf("Taken.\n");
  				else
***************
*** 138,144 ****
  					puts("ties it at the waist.  Around her neck hangs a golden amulet.");
  					puts("She bids you to follow her.");
  					pleasure++;
! 					followgod = time;
  					clearbit(location[position].objects,BATHGOD);
  				} else if (!testbit(location[position].objects,BATHGOD))
  					puts("You're in no position to take her.");
--- 138,144 ----
  					puts("ties it at the waist.  Around her neck hangs a golden amulet.");
  					puts("She bids you to follow her.");
  					pleasure++;
! 					followgod = Time;
  					clearbit(location[position].objects,BATHGOD);
  				} else if (!testbit(location[position].objects,BATHGOD))
  					puts("You're in no position to take her.");
***************
*** 258,264 ****
  				setbit(location[position].objects,value);
  			else
  				tempwiz = 0;
! 			time++;
  			if (*name == 'K')
  				puts("Drop kicked.");
  			else
--- 258,264 ----
  				setbit(location[position].objects,value);
  			else
  				tempwiz = 0;
! 			Time++;
  			if (*name == 'K')
  				puts("Drop kicked.");
  			else
***************
*** 324,339 ****
  			case MANGO:
  
  				printf("%s:\n",objsht[value]);
! 				if (testbit(inven,value) && time > ate - CYCLE && testbit(inven,KNIFE)){
  					clearbit(inven,value);
  					carrying -= objwt[value];
  					encumber -= objcumber[value];
! 					ate = max(time,ate) + CYCLE/3;
  					snooze += CYCLE/10;
! 					time++;
  					puts("Eaten.  You can explore a little longer now.");
  				}
! 				else if (time < ate - CYCLE)
  					puts("You're stuffed.");
  				else if (!testbit(inven,KNIFE))
  					puts("You need a knife.");
--- 324,339 ----
  			case MANGO:
  
  				printf("%s:\n",objsht[value]);
! 				if (testbit(inven,value) && Time > ate - CYCLE && testbit(inven,KNIFE)){
  					clearbit(inven,value);
  					carrying -= objwt[value];
  					encumber -= objcumber[value];
! 					ate = max(Time,ate) + CYCLE/3;
  					snooze += CYCLE/10;
! 					Time++;
  					puts("Eaten.  You can explore a little longer now.");
  				}
! 				else if (Time < ate - CYCLE)
  					puts("You're stuffed.");
  				else if (!testbit(inven,KNIFE))
  					puts("You need a knife.");
*** /usr/src/games/battlestar/com5.c.old	Thu Jul 30 21:37:49 1987
--- /usr/src/games/battlestar/com5.c	Sat Oct 26 17:17:19 1996
***************
*** 5,11 ****
   */
  
  #if !defined(lint) && !defined(pdp11)
! static char sccsid[] = "@(#)com5.c	1.3 4/24/85";
  #endif
  
  #include "externs.h"
--- 5,11 ----
   */
  
  #if !defined(lint) && !defined(pdp11)
! static char sccsid[] = "@(#)com5.c	1.3.1 1996/10/26";
  #endif
  
  #include "externs.h"
***************
*** 73,79 ****
  				if (!loved)
  					setbit(location[position].objects,MEDALION);
  				loved = 1;
! 				time += 10;
  				zzz();
  			}
  			else {
--- 73,79 ----
  				if (!loved)
  					setbit(location[position].objects,MEDALION);
  				loved = 1;
! 				Time += 10;
  				zzz();
  			}
  			else {
***************
*** 85,91 ****
  			power++;
  			pleasure += 5;
  			printf("Girl:\n");
! 			time += 10;
  			zzz();
  		}
  		printf("Loved.\n");
--- 85,91 ----
  			power++;
  			pleasure += 5;
  			printf("Girl:\n");
! 			Time += 10;
  			zzz();
  		}
  		printf("Loved.\n");
***************
*** 98,113 ****
  	int oldtime;
  	register int n;
  
! 	oldtime = time;
! 	if ((snooze - time) < (0.75 * CYCLE)){
! 		time += 0.75 * CYCLE - (snooze - time);
  		printf("<zzz>");
! 		for (n = 0; n < time - oldtime; n++)
  			printf(".");
  		printf("\n");
! 		snooze += 3 * (time - oldtime);
  		if (notes[LAUNCHED]){
! 			fuel -= (time - oldtime);
  			if (location[position].down){
  				position = location[position].down;
  				crash();
--- 98,113 ----
  	int oldtime;
  	register int n;
  
! 	oldtime = Time;
! 	if ((snooze - Time) < (0.75 * CYCLE)){
! 		Time += 0.75 * CYCLE - (snooze - Time);
  		printf("<zzz>");
! 		for (n = 0; n < Time - oldtime; n++)
  			printf(".");
  		printf("\n");
! 		snooze += 3 * (Time - oldtime);
  		if (notes[LAUNCHED]){
! 			fuel -= (Time - oldtime);
  			if (location[position].down){
  				position = location[position].down;
  				crash();
***************
*** 150,157 ****
  
  chime()
  {
! 	if ((time / CYCLE + 1) % 2 && OUTSIDE)
! 		switch((time % CYCLE)/(CYCLE / 7)){
  			case 0:
  				puts("It is just after sunrise.");
  				break;
--- 150,157 ----
  
  chime()
  {
! 	if ((Time / CYCLE + 1) % 2 && OUTSIDE)
! 		switch((Time % CYCLE)/(CYCLE / 7)){
  			case 0:
  				puts("It is just after sunrise.");
  				break;
***************
*** 175,181 ****
  				break;
  		}
  	else if (OUTSIDE)
! 		switch((time % CYCLE)/(CYCLE / 7)){
  			case 0:
  				puts("It is just after sunset.");
  				break;
--- 175,181 ----
  				break;
  		}
  	else if (OUTSIDE)
! 		switch((Time % CYCLE)/(CYCLE / 7)){
  			case 0:
  				puts("It is just after sunset.");
  				break;
***************
*** 232,238 ****
  	}
  	if (result != -1 && (testbit(location[position].objects,obj) || obj == AMULET || obj == MEDALION || obj == TALISMAN)){
  		clearbit(location[position].objects,obj);
! 		time++;
  		ego++;
  		switch(person){
  			case NATIVE:
--- 232,238 ----
  	}
  	if (result != -1 && (testbit(location[position].objects,obj) || obj == AMULET || obj == MEDALION || obj == TALISMAN)){
  		clearbit(location[position].objects,obj);
! 		Time++;
  		ego++;
  		switch(person){
  			case NATIVE:
***************
*** 261,267 ****
  						puts("after having been out drinking with the girls, she kicks the throne particulary");
  						puts("hard and wakes you up.  (If you want to win this game, you're going to have to\nshoot her!)");
  						clearbit(location[position].objects,MEDALION);
! 						wintime = time;
  					}
  				}
  				break;
--- 261,267 ----
  						puts("after having been out drinking with the girls, she kicks the throne particulary");
  						puts("hard and wakes you up.  (If you want to win this game, you're going to have to\nshoot her!)");
  						clearbit(location[position].objects,MEDALION);
! 						wintime = Time;
  					}
  				}
  				break;
*** /usr/src/games/battlestar/com6.c.old	Thu Jul 30 21:37:55 1987
--- /usr/src/games/battlestar/com6.c	Sat Oct 26 17:19:48 1996
***************
*** 5,11 ****
   */
  
  #if !defined(lint) && !defined(pdp11)
! static char sccsid[] = "@(#)com6.c	1.3 4/24/85";
  #endif
  
  #include "externs.h"
--- 5,11 ----
   */
  
  #if !defined(lint) && !defined(pdp11)
! static char sccsid[] = "@(#)com6.c	1.3.1 1996/10/26";
  #endif
  
  #include "externs.h"
***************
*** 17,23 ****
  			clearbit(location[position].objects,VIPER);
  			position = location[position].up;
  			notes[LAUNCHED] = 1;
! 			time++;
  			fuel -= 4;
  			puts("You climb into the viper and prepare for launch.");
  			puts("With a touch of your thumb the turbo engines ignite, thrusting you back into\nyour seat.");
--- 17,23 ----
  			clearbit(location[position].objects,VIPER);
  			position = location[position].up;
  			notes[LAUNCHED] = 1;
! 			Time++;
  			fuel -= 4;
  			puts("You climb into the viper and prepare for launch.");
  			puts("With a touch of your thumb the turbo engines ignite, thrusting you back into\nyour seat.");
***************
*** 38,44 ****
  		position = location[position].down;
  		setbit(location[position].objects,VIPER);
  		fuel -= 2;
! 		time++;
  		puts("You are down.");
  		return(1);
  	}
--- 38,44 ----
  		position = location[position].down;
  		setbit(location[position].objects,VIPER);
  		fuel -= 2;
! 		Time++;
  		puts("You are down.");
  		return(1);
  	}
***************
*** 62,67 ****
--- 62,68 ----
  }
  
  #include <sys/time.h>
+ 
  post(ch)
  char ch;
  {
***************
*** 68,76 ****
  	FILE *fp;
  	struct timeval tv;
  	char *date;
! 	int s = sigblock(sigmask(SIGINT));
  
! 	gettimeofday(&tv, (struct timezone *)0);	/* can't call time */
  	date = ctime(&tv.tv_sec);
  	date[24] = '\0';
  	if (fp = fopen(logfile,"a")) {
--- 69,77 ----
  	FILE *fp;
  	struct timeval tv;
  	char *date;
! 	long s = sigblock(sigmask(SIGINT));
  
! 	gettimeofday(&tv, (struct timezone *)0);
  	date = ctime(&tv.tv_sec);
  	date[24] = '\0';
  	if (fp = fopen(logfile,"a")) {
***************
*** 131,137 ****
  		clearbit(location[position].objects,CAR);
  		setbit(location[position].objects,CRASH);
  		injuries[5] = injuries[6] = injuries[7] = injuries[8] = 1;
! 		time += 15;
  		zzz();
  		return(0);
  	}
--- 132,138 ----
  		clearbit(location[position].objects,CAR);
  		setbit(location[position].objects,CRASH);
  		injuries[5] = injuries[6] = injuries[7] = injuries[8] = 1;
! 		Time += 15;
  		zzz();
  		return(0);
  	}
***************
*** 166,172 ****
  {		/* for matches, cigars */
  	if (testbit(inven,MATCHES) && matchcount){
  		puts("Your match splutters to life.");
! 		time++;
  		matchlight = 1;
  		matchcount--;
  		if (position == 217){
--- 167,173 ----
  {		/* for matches, cigars */
  	if (testbit(inven,MATCHES) && matchcount){
  		puts("Your match splutters to life.");
! 		Time++;
  		matchlight = 1;
  		matchcount--;
  		if (position == 217){
*** /usr/src/games/battlestar/com7.c.old	Thu Jul 30 21:38:01 1987
--- /usr/src/games/battlestar/com7.c	Sat Oct 26 17:20:28 1996
***************
*** 5,11 ****
   */
  
  #if !defined(lint) && !defined(pdp11)
! static char sccsid[] = "@(#)com7.c	1.3 4/24/85";
  #endif
  
  #include "externs.h"
--- 5,11 ----
   */
  
  #if !defined(lint) && !defined(pdp11)
! static char sccsid[] = "@(#)com7.c	1.3.1 1996/10/26";
  #endif
  
  #include "externs.h"
***************
*** 21,35 ****
  	int exhaustion;
  
  fighton:
! 	time++;
  	snooze -= 5;
! 	if (snooze > time)
! 		exhaustion = CYCLE/(snooze - time);
  	else {
  		puts("You collapse exhausted, and he pulverizes your skull.");
  		die();
  	}
! 	if (snooze - time < 20)
  		puts("You look tired! I hope you're able to fight.");
  	next = getcom(auxbuf, LINELENGTH, "<fight!>-: ", 0);
  	for (i=0; next && i < 10; i++)
--- 21,35 ----
  	int exhaustion;
  
  fighton:
! 	Time++;
  	snooze -= 5;
! 	if (snooze > Time)
! 		exhaustion = CYCLE/(snooze - Time);
  	else {
  		puts("You collapse exhausted, and he pulverizes your skull.");
  		die();
  	}
! 	if (snooze - Time < 20)
  		puts("You look tired! I hope you're able to fight.");
  	next = getcom(auxbuf, LINELENGTH, "<fight!>-: ", 0);
  	for (i=0; next && i < 10; i++)
***************
*** 159,165 ****
  					puts("he flees down the dark caverns.");
  					clearbit(location[position].objects,DARK);
  					injuries[SKULL] = 1;
! 					followfight = time;
  					return (0);
  				}
  				else{
--- 159,165 ----
  					puts("he flees down the dark caverns.");
  					clearbit(location[position].objects,DARK);
  					injuries[SKULL] = 1;
! 					followfight = Time;
  					return (0);
  				}
  				else{
***************
*** 204,210 ****
  		case DROP:
  		case DRAW:
  			cypher();
! 			time--;
  			break;
  		
  		default:
--- 204,210 ----
  		case DROP:
  		case DRAW:
  			cypher();
! 			Time--;
  			break;
  		
  		default:
*** /usr/src/games/battlestar/cypher.c.old	Thu Jul 30 21:38:08 1987
--- /usr/src/games/battlestar/cypher.c	Sat Oct 26 17:21:04 1996
***************
*** 5,11 ****
   */
  
  #if !defined(lint) && !defined(pdp11)
! static char sccsid[] = "@(#)cypher.c	1.3 4/24/85";
  #endif
  
  #include "externs.h"
--- 5,11 ----
   */
  
  #if !defined(lint) && !defined(pdp11)
! static char sccsid[] = "@(#)cypher.c	1.3.1 1996/10/26";
  #endif
  
  #include "externs.h"
***************
*** 256,265 ****
  				fgets(buffer,10,stdin);
  				if (*buffer != '\n')
  					sscanf(buffer,"%d", &position);
! 				printf("Time (was %d) = ",time);
  				fgets(buffer,10,stdin);
  				if (*buffer != '\n')
! 					sscanf(buffer,"%d", &time);
  				printf("Fuel (was %d) = ",fuel);
  				fgets(buffer,10,stdin);
  				if (*buffer != '\n')
--- 256,265 ----
  				fgets(buffer,10,stdin);
  				if (*buffer != '\n')
  					sscanf(buffer,"%d", &position);
! 				printf("Time (was %d) = ",Time);
  				fgets(buffer,10,stdin);
  				if (*buffer != '\n')
! 					sscanf(buffer,"%d", &Time);
  				printf("Fuel (was %d) = ",fuel);
  				fgets(buffer,10,stdin);
  				if (*buffer != '\n')
***************
*** 297,303 ****
  			 case SCORE:
  				printf("\tPLEASURE\tPOWER\t\tEGO\n");
  				printf("\t%3d\t\t%3d\t\t%3d\n\n",pleasure,power,ego);
! 				printf("This gives you the rating of %s in %d turns.\n",rate(),time);
  				printf("You have visited %d out of %d rooms this run (%d%%).\n",card(beenthere,NUMOFROOMS),NUMOFROOMS,card(beenthere,NUMOFROOMS)*100/NUMOFROOMS);
  				break;
  
--- 297,303 ----
  			 case SCORE:
  				printf("\tPLEASURE\tPOWER\t\tEGO\n");
  				printf("\t%3d\t\t%3d\t\t%3d\n\n",pleasure,power,ego);
! 				printf("This gives you the rating of %s in %d turns.\n",rate(),Time);
  				printf("You have visited %d out of %d rooms this run (%d%%).\n",card(beenthere,NUMOFROOMS),NUMOFROOMS,card(beenthere,NUMOFROOMS)*100/NUMOFROOMS);
  				break;
  
*** /usr/src/games/battlestar/externs.h.old	Fri Jul 31 23:09:42 1987
--- /usr/src/games/battlestar/externs.h	Sat Oct 26 17:22:19 1996
***************
*** 4,10 ****
   * the terms of the Berkeley Software License Agreement.
   */
  
! /* @(#)externs.h	1.3 4/24/85 */
  
  #include <sys/signal.h>
  #include <stdio.h>
--- 4,10 ----
   * the terms of the Berkeley Software License Agreement.
   */
  
! /* @(#)externs.h	1.3.1 1996/10/26 */
  
  #include <sys/signal.h>
  #include <stdio.h>
***************
*** 237,243 ****
  char *getcom(), *getword();
  
  	/* state of the game */
! int time;
  int position;
  int direction;
  int left, right, ahead, back;
--- 237,243 ----
  char *getcom(), *getword();
  
  	/* state of the game */
! int Time;
  int position;
  int direction;
  int left, right, ahead, back;
*** /usr/src/games/battlestar/init.c.old	Fri Jul 31 20:32:35 1987
--- /usr/src/games/battlestar/init.c	Sat Oct 26 17:23:24 1996
***************
*** 5,11 ****
   */
  
  #if !defined(lint) && !defined(pdp11)
! static char sccsid[] = "@(#)init.c	1.3 4/24/85";
  #endif
  
  #include "externs.h"
--- 5,11 ----
   */
  
  #if !defined(lint) && !defined(pdp11)
! static char sccsid[] = "@(#)init.c	1.3.1 1996/10/26";
  #endif
  
  #include "externs.h"
***************
*** 27,33 ****
  	if (startup) {
  		location = dayfile;
  		direction = NORTH;
! 		time = 0;
  		snooze = CYCLE * 1.5;
  		position = 22;
  		setbit(wear, PAJAMAS);
--- 27,33 ----
  	if (startup) {
  		location = dayfile;
  		direction = NORTH;
! 		Time = 0;
  		snooze = CYCLE * 1.5;
  		position = 22;
  		setbit(wear, PAJAMAS);
*** /usr/src/games/battlestar/save.c.old	Sat Aug  1 00:33:06 1987
--- /usr/src/games/battlestar/save.c	Sat Oct 26 17:24:52 1996
***************
*** 5,11 ****
   */
  
  #if !defined(lint) && !defined(pdp11)
! static char sccsid[] = "@(#)save.c	1.4 11/7/85";
  #endif
  
  #include "externs.h"
--- 5,11 ----
   */
  
  #if !defined(lint) && !defined(pdp11)
! static char sccsid[] = "@(#)save.c	1.4.1 1996/10/26";
  #endif
  
  #include "externs.h"
***************
*** 41,47 ****
  	fread(notes, sizeof notes, 1, fp);
  	fread(&direction, sizeof direction, 1, fp);
  	fread(&position, sizeof position, 1, fp);
! 	fread(&time, sizeof time, 1, fp);
  	fread(&fuel, sizeof fuel, 1, fp);
  	fread(&torps, sizeof torps, 1, fp);
  	fread(&carrying, sizeof carrying, 1, fp);
--- 41,47 ----
  	fread(notes, sizeof notes, 1, fp);
  	fread(&direction, sizeof direction, 1, fp);
  	fread(&position, sizeof position, 1, fp);
! 	fread(&Time, sizeof Time, 1, fp);
  	fread(&fuel, sizeof fuel, 1, fp);
  	fread(&torps, sizeof torps, 1, fp);
  	fread(&carrying, sizeof carrying, 1, fp);
***************
*** 97,103 ****
  	fwrite(notes, sizeof notes, 1, fp);
  	fwrite(&direction, sizeof direction, 1, fp);
  	fwrite(&position, sizeof position, 1, fp);
! 	fwrite(&time, sizeof time, 1, fp);
  	fwrite(&fuel, sizeof fuel, 1, fp);
  	fwrite(&torps, sizeof torps, 1, fp);
  	fwrite(&carrying, sizeof carrying, 1, fp);
--- 97,103 ----
  	fwrite(notes, sizeof notes, 1, fp);
  	fwrite(&direction, sizeof direction, 1, fp);
  	fwrite(&position, sizeof position, 1, fp);
! 	fwrite(&Time, sizeof Time, 1, fp);
  	fwrite(&fuel, sizeof fuel, 1, fp);
  	fwrite(&torps, sizeof torps, 1, fp);
  	fwrite(&carrying, sizeof carrying, 1, fp);
*** /usr/src/games/phantasia/fight.c.old	Mon May 19 18:12:25 1986
--- /usr/src/games/phantasia/fight.c	Sat Oct 26 19:38:20 1996
***************
*** 1,5 ****
--- 1,7 ----
  /*
   * fight.c   Phantasia monster fighting routine
+  *
+  *	1.1	(2.11BSD) 1996/10/26
   */
  
  /*
***************
*** 16,22 ****
  char	aline[80];
  double	monhit, mdamage, sdamage, monspd, maxspd, inflict, monstr, temp, shield;
  int	ch;
! reg	int	whichm, size, howmany, lines;
  struct	mstats	monster;
  
  	fghting = changed = TRUE;
--- 18,24 ----
  char	aline[80];
  double	monhit, mdamage, sdamage, monspd, maxspd, inflict, monstr, temp, shield;
  int	ch;
! reg	int	whichm, size, hwmany, lines;
  struct	mstats	monster;
  
  	fghting = changed = TRUE;
***************
*** 23,29 ****
  	shield = 0.0;
  	if (setjmp(fightenv) == 2)
  		shield = roll(100 + (stat->mxn + stat->shd)*6.2,3000);
! 	howmany = 0;
  	size = (valhala) ? stat->lvl/5 : circ(stat->x,stat->y);
  	if (particular >= 0)
  		whichm = particular;
--- 25,31 ----
  	shield = 0.0;
  	if (setjmp(fightenv) == 2)
  		shield = roll(100 + (stat->mxn + stat->shd)*6.2,3000);
! 	hwmany = 0;
  	size = (valhala) ? stat->lvl/5 : circ(stat->x,stat->y);
  	if (particular >= 0)
  		whichm = particular;
***************
*** 47,53 ****
  	callmonster(whichm,size,&monster);
  	if (stat->blind)
  		strcpy(monster.name,"a monster");
! 	++howmany;
  	if (monster.typ == 1)	/* unicorn */
  		if (stat->vrg)
  			{
--- 49,55 ----
  	callmonster(whichm,size,&monster);
  	if (stat->blind)
  		strcpy(monster.name,"a monster");
! 	++hwmany;
  	if (monster.typ == 1)	/* unicorn */
  		if (stat->vrg)
  			{
***************
*** 592,598 ****
  		fghttofin = FALSE;
  		goto CALL;
  		}
! 	else if (size > 1 && monster.trs && rnd() > pow(0.6,(double) (howmany/3 + size/3)))	/* this takes # of flocks and size into account */
  		{
  		paws(lines);
  		treasure(stat,monster.trs,size);
--- 594,600 ----
  		fghttofin = FALSE;
  		goto CALL;
  		}
! 	else if (size > 1 && monster.trs && rnd() > pow(0.6,(double) (hwmany/3 + size/3)))	/* this takes # of flocks and size into account */
  		{
  		paws(lines);
  		treasure(stat,monster.trs,size);
*** /VERSION.old	Sun Oct 27 16:30:59 1996
--- /VERSION	Sun Oct 27 16:58:47 1996
***************
*** 1,4 ****
! Current Patch Level: 333
  
  2.11 BSD
  ============
--- 1,4 ----
! Current Patch Level: 334
  
  2.11 BSD
  ============