summaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>1997-12-16 07:54:26 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>1997-12-16 07:54:26 +0000
commit8b23506ac3deb4a8af8169adfe290962a7460aa0 (patch)
tree224aec6c7b9e27e01c985a0f4e1f3bd359633a9c /games
parent4b139793bdc5d728d64ba3ffdef1e3eb1f9e23e1 (diff)
Fix annoying warnings.
Diffstat (limited to 'games')
-rw-r--r--games/battlestar/com1.c8
-rw-r--r--games/battlestar/com2.c4
-rw-r--r--games/battlestar/com3.c8
-rw-r--r--games/battlestar/com4.c6
-rw-r--r--games/battlestar/com6.c7
-rw-r--r--games/battlestar/com7.c10
-rw-r--r--games/battlestar/cypher.c4
-rw-r--r--games/battlestar/extern.h4
-rw-r--r--games/battlestar/fly.c16
9 files changed, 35 insertions, 32 deletions
diff --git a/games/battlestar/com1.c b/games/battlestar/com1.c
index 10ad2d967bd..cfe291c9392 100644
--- a/games/battlestar/com1.c
+++ b/games/battlestar/com1.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: com1.c,v 1.4 1997/09/01 18:13:08 millert Exp $ */
+/* $OpenBSD: com1.c,v 1.5 1997/12/16 07:54:21 angelos Exp $ */
/* $NetBSD: com1.c,v 1.3 1995/03/21 15:06:51 cgd Exp $ */
/*
@@ -105,7 +105,7 @@ news()
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();
+ die(0);
}
if (btime > 20 && position < 32)
puts("Explosions rock the battlestar.");
@@ -202,7 +202,7 @@ news()
}
if (injuries[SKULL] && injuries[INCISE] && injuries[NECK]){
puts("I'm afraid you have suffered fatal injuries.");
- die();
+ die(0);
}
for (n=0; n < NUMOFINJURIES; n++)
if (injuries[n] == 1){
@@ -244,7 +244,7 @@ crash()
if (!location[position].down){
puts("Your viper strikes the ground and explodes into firey fragments.");
puts("Thick black smoke billows up from the wreckage.");
- die();
+ die(0);
}
position = location[position].down;
}
diff --git a/games/battlestar/com2.c b/games/battlestar/com2.c
index 69d24e9e582..061fd9f30f1 100644
--- a/games/battlestar/com2.c
+++ b/games/battlestar/com2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: com2.c,v 1.4 1997/09/01 18:13:10 millert Exp $ */
+/* $OpenBSD: com2.c,v 1.5 1997/12/16 07:54:22 angelos Exp $ */
/* $NetBSD: com2.c,v 1.3 1995/03/21 15:06:55 cgd Exp $ */
/*
@@ -219,7 +219,7 @@ murder()
if (testbit(location[position].objects,MAN)){
puts("You strike him to the ground, and he coughs up blood.");
puts("Your fantasy is over.");
- die();
+ die(0);
}
case -1:
puts("Kill what?");
diff --git a/games/battlestar/com3.c b/games/battlestar/com3.c
index a1f81184406..f4ced81e6ec 100644
--- a/games/battlestar/com3.c
+++ b/games/battlestar/com3.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: com3.c,v 1.3 1997/08/24 21:55:02 deraadt Exp $ */
+/* $OpenBSD: com3.c,v 1.4 1997/12/16 07:54:22 angelos Exp $ */
/* $NetBSD: com3.c,v 1.3 1995/03/21 15:07:00 cgd Exp $ */
/*
@@ -215,7 +215,7 @@ shoot()
btime++;
printf("The %s explode%s\n",objsht[value],(objsht[value][n-1]=='s' ? (objsht[value][n-2]=='s' ? "s." : ".") : "s."));
if (value == BOMB)
- die();
+ die(0);
}
else
printf("I dont see any %s around here.\n", objsht[value]);
@@ -250,7 +250,7 @@ shoot()
case 20:
puts("The blast hits the door and it explodes into flame. The magnesium burns");
puts("so rapidly that we have no chance to escape.");
- die();
+ die(0);
default:
puts("Nothing happens.");
}
@@ -297,7 +297,7 @@ shoot()
if (testbit(location[position].objects,MAN)){
puts("The man falls to the ground with blood pouring all over his white suit.");
puts("Your fantasy is over.");
- die();
+ die(0);
}
else puts("What man?");
break;
diff --git a/games/battlestar/com4.c b/games/battlestar/com4.c
index 813485520ec..5d5750d3da1 100644
--- a/games/battlestar/com4.c
+++ b/games/battlestar/com4.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: com4.c,v 1.4 1997/09/01 18:13:11 millert Exp $ */
+/* $OpenBSD: com4.c,v 1.5 1997/12/16 07:54:23 angelos Exp $ */
/* $NetBSD: com4.c,v 1.3 1995/03/21 15:07:04 cgd Exp $ */
/*
@@ -258,7 +258,7 @@ throw(name)
}
else if (value == GRENADE && testbit(location[position].objects,value)){
puts("You are blown into shreds when your grenade explodes.");
- die();
+ die(0);
}
if (wordnumber < wordcount - 1 && wordvalue[++wordnumber] == AND)
wordnumber++;
@@ -289,7 +289,7 @@ char *name;
encumber -= objcumber[value];
if (value == BOMB){
puts("The bomb explodes. A blinding white light and immense concussion obliterate us.");
- die();
+ die(0);
}
if (value != AMULET && value != MEDALION && value != TALISMAN)
setbit(location[position].objects,value);
diff --git a/games/battlestar/com6.c b/games/battlestar/com6.c
index 911f02b9efc..890ebad686e 100644
--- a/games/battlestar/com6.c
+++ b/games/battlestar/com6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: com6.c,v 1.7 1997/09/01 19:30:55 millert Exp $ */
+/* $OpenBSD: com6.c,v 1.8 1997/12/16 07:54:23 angelos Exp $ */
/* $NetBSD: com6.c,v 1.5 1995/04/27 21:30:23 mycroft Exp $ */
/*
@@ -86,7 +86,8 @@ land()
}
void
-die() /* endgame */
+die(sigraised) /* endgame */
+int sigraised;
{
printf("bye.\nYour rating was %s.\n", rate());
post(' ');
@@ -225,7 +226,7 @@ light() /* synonyms = {strike, smoke} */
matchcount--;
if (position == 217){
puts("The whole bungalow explodes with an intense blast.");
- die();
+ die(0);
}
}
else puts("You're out of matches.");
diff --git a/games/battlestar/com7.c b/games/battlestar/com7.c
index c9d3ca35f0f..c55ea52bc1f 100644
--- a/games/battlestar/com7.c
+++ b/games/battlestar/com7.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: com7.c,v 1.4 1997/09/01 18:13:14 millert Exp $ */
+/* $OpenBSD: com7.c,v 1.5 1997/12/16 07:54:24 angelos Exp $ */
/* $NetBSD: com7.c,v 1.3 1995/03/21 15:07:12 cgd Exp $ */
/*
@@ -62,7 +62,7 @@ fighton:
exhaustion = CYCLE/(snooze - btime);
else {
puts("You collapse exhausted, and he pulverizes your skull.");
- die();
+ die(0);
}
if (snooze - btime < 20)
puts("You look tired! I hope you're able to fight.");
@@ -182,7 +182,7 @@ fighton:
puts("his power grows and the walls of\nthe earth tremble.");
puts("When he touches the medallion, your chest explodes and the foundations of the\nearth collapse.");
puts("The planet is consumed by darkness.");
- die();
+ die(0);
}
if (testbit(inven,AMULET)){
clearbit(inven,AMULET);
@@ -199,7 +199,7 @@ fighton:
}
else{
puts("I'm afraid you have been killed.");
- die();
+ die(0);
}
}
else{
@@ -270,7 +270,7 @@ fighton:
puts("You emerge unscathed.");
if (injuries[SKULL] && injuries[INCISE] && injuries[NECK]){
puts("I'm afraid you have suffered fatal injuries.");
- die();
+ die(0);
}
goto fighton;
}
diff --git a/games/battlestar/cypher.c b/games/battlestar/cypher.c
index 5f5e4125175..a01b94b3fa3 100644
--- a/games/battlestar/cypher.c
+++ b/games/battlestar/cypher.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cypher.c,v 1.4 1997/09/01 18:13:15 millert Exp $ */
+/* $OpenBSD: cypher.c,v 1.5 1997/12/16 07:54:24 angelos Exp $ */
/* $NetBSD: cypher.c,v 1.3 1995/03/21 15:07:15 cgd Exp $ */
/*
@@ -424,7 +424,7 @@ cypher()
break;
case QUIT:
- die();
+ die(0);
default:
puts("How's that?");
diff --git a/games/battlestar/extern.h b/games/battlestar/extern.h
index 64d34921682..ea65f0a4285 100644
--- a/games/battlestar/extern.h
+++ b/games/battlestar/extern.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: extern.h,v 1.2 1997/09/01 18:13:16 millert Exp $ */
+/* $OpenBSD: extern.h,v 1.3 1997/12/16 07:54:25 angelos Exp $ */
/* $NetBSD: extern.h,v 1.5 1995/04/24 12:22:18 cgd Exp $ */
/*
@@ -265,7 +265,7 @@ int card __P((char *, int));
void chime __P((void));
void crash __P((void));
int cypher __P((void));
-void die __P((void));
+void die __P((int));
void dig __P((void));
int draw __P((void));
void drink __P((void));
diff --git a/games/battlestar/fly.c b/games/battlestar/fly.c
index 323d7572be8..1139e80fe02 100644
--- a/games/battlestar/fly.c
+++ b/games/battlestar/fly.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fly.c,v 1.4 1997/08/24 21:55:08 deraadt Exp $ */
+/* $OpenBSD: fly.c,v 1.5 1997/12/16 07:54:25 angelos Exp $ */
/* $NetBSD: fly.c,v 1.3 1995/03/21 15:07:28 cgd Exp $ */
/*
@@ -60,14 +60,15 @@ sig_t oldsig;
void blast __P((void));
void endfly __P((void));
-void moveenemy __P((void));
+void moveenemy __P((int));
void notarget __P((void));
void screen __P((void));
-void succumb __P((void));
+void succumb __P((int));
void target __P((void));
void
-succumb()
+succumb(sigraised)
+int sigraised;
{
if (oldsig == SIG_DFL) {
endfly();
@@ -93,7 +94,7 @@ visual()
screen();
row = rnd(LINES-3) + 1;
column = rnd(COLS-2) + 1;
- moveenemy();
+ moveenemy(0);
for (;;) {
switch(getchar()){
@@ -183,7 +184,7 @@ visual()
}
if (bclock <= 0){
endfly();
- die();
+ die(0);
}
}
}
@@ -254,7 +255,8 @@ blast()
}
void
-moveenemy()
+moveenemy(sigraised)
+int sigraised;
{
double d;
int oldr, oldc;