games: remove trailing whitespace in *.c and *.h
This commit is contained in:
parent
0527d6d12b
commit
1182a44c59
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: init.c,v 1.21 2014/03/22 20:07:05 dholland Exp $ */
|
||||
/* $NetBSD: init.c,v 1.22 2021/05/02 12:50:43 rillig Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993
|
||||
|
@ -39,7 +39,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)init.c 8.1 (Berkeley) 6/2/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: init.c,v 1.21 2014/03/22 20:07:05 dholland Exp $");
|
||||
__RCSID("$NetBSD: init.c,v 1.22 2021/05/02 12:50:43 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -59,7 +59,7 @@ static void linkdata(void);
|
|||
|
||||
int blklin = TRUE;
|
||||
|
||||
int setbit[16] = {1, 2, 4, 010, 020, 040, 0100, 0200, 0400, 01000, 02000,
|
||||
int setbit[16] = {1, 2, 4, 010, 020, 040, 0100, 0200, 0400, 01000, 02000,
|
||||
04000, 010000, 020000, 040000, 0100000};
|
||||
|
||||
volatile sig_atomic_t delhit;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: io.c,v 1.22 2009/08/25 06:56:52 dholland Exp $ */
|
||||
/* $NetBSD: io.c,v 1.23 2021/05/02 12:50:43 rillig Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991, 1993
|
||||
|
@ -39,7 +39,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)io.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: io.c,v 1.22 2009/08/25 06:56:52 dholland Exp $");
|
||||
__RCSID("$NetBSD: io.c,v 1.23 2021/05/02 12:50:43 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -178,7 +178,7 @@ static const char *tape = iotape; /* pointer to encryption tape */
|
|||
/* next virtual char, bump adr */
|
||||
static int
|
||||
next(void)
|
||||
{
|
||||
{
|
||||
int ch;
|
||||
|
||||
ch = (*inptr ^ random()) & 0xFF; /* Decrypt input data */
|
||||
|
@ -196,7 +196,7 @@ static char breakch; /* tell which char ended rnum */
|
|||
/* "read" data from virtual file */
|
||||
void
|
||||
rdata(void)
|
||||
{
|
||||
{
|
||||
int sect;
|
||||
char ch;
|
||||
|
||||
|
@ -273,7 +273,7 @@ static char nbf[12];
|
|||
/* read initial location num */
|
||||
static int
|
||||
rnum(void)
|
||||
{
|
||||
{
|
||||
char *s;
|
||||
tape = iotape; /* restart encryption tape */
|
||||
for (s = nbf, *s = 0;; s++)
|
||||
|
@ -316,7 +316,7 @@ rdesc(int sect)
|
|||
ptext[oldloc].txtlen = maystart - seekstart;
|
||||
break;
|
||||
case 6:/* random messages */
|
||||
if (oldloc >= RTXSIZE)
|
||||
if (oldloc >= RTXSIZE)
|
||||
errx(1,"Too many random msgs");
|
||||
rtext[oldloc].seekadr = seekhere;
|
||||
rtext[oldloc].txtlen = maystart - seekstart;
|
||||
|
@ -354,7 +354,7 @@ rdesc(int sect)
|
|||
/* read travel table */
|
||||
static void
|
||||
rtrav(void)
|
||||
{
|
||||
{
|
||||
int locc;
|
||||
struct travlist *t = NULL;
|
||||
char *s;
|
||||
|
@ -362,7 +362,7 @@ rtrav(void)
|
|||
int len, m, n, entries = 0;
|
||||
|
||||
for (oldloc = -1;;) { /* get another line */
|
||||
/* end of entry */
|
||||
/* end of entry */
|
||||
if ((locc = rnum()) != oldloc && oldloc >= 0 && t) {
|
||||
t->next = 0; /* terminate the old entry */
|
||||
/* printf("%d:%d entries\n",oldloc,entries); */
|
||||
|
@ -460,7 +460,7 @@ rvoc(void)
|
|||
/* initial object locations */
|
||||
static void
|
||||
rlocs(void)
|
||||
{
|
||||
{
|
||||
for (;;) {
|
||||
if ((obj = rnum()) < 0)
|
||||
break;
|
||||
|
@ -475,7 +475,7 @@ rlocs(void)
|
|||
/* default verb messages */
|
||||
static void
|
||||
rdefault(void)
|
||||
{
|
||||
{
|
||||
for (;;) {
|
||||
if ((verb = rnum()) < 0)
|
||||
break;
|
||||
|
@ -486,7 +486,7 @@ rdefault(void)
|
|||
/* liquid assets &c: cond bits */
|
||||
static void
|
||||
rliq(void)
|
||||
{
|
||||
{
|
||||
int bitnum;
|
||||
for (;;) { /* read new bit list */
|
||||
if ((bitnum = rnum()) < 0)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: main.c,v 1.21 2009/08/25 06:56:52 dholland Exp $ */
|
||||
/* $NetBSD: main.c,v 1.22 2021/05/02 12:50:43 rillig Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991, 1993
|
||||
|
@ -44,7 +44,7 @@ __COPYRIGHT("@(#) Copyright (c) 1991, 1993\
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/2/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: main.c,v 1.21 2009/08/25 06:56:52 dholland Exp $");
|
||||
__RCSID("$NetBSD: main.c,v 1.22 2021/05/02 12:50:43 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -407,7 +407,7 @@ l4080:
|
|||
if (place[eggs] == plac[eggs]
|
||||
|| (toting(eggs) && loc == plac[eggs]))
|
||||
goto l2011;
|
||||
if (place[eggs] == 0 && place[troll] == 0 &&
|
||||
if (place[eggs] == 0 && place[troll] == 0 &&
|
||||
prop[troll] == 0)
|
||||
prop[troll] = 1;
|
||||
k = 2;
|
||||
|
@ -593,7 +593,7 @@ l4090:
|
|||
if (obj == food)
|
||||
goto l8142;
|
||||
if (obj == bird || obj == snake || obj == clam
|
||||
|| obj == oyster || obj == dwarf || obj == dragon
|
||||
|| obj == oyster || obj == dwarf || obj == dragon
|
||||
|| obj == troll || obj == bear)
|
||||
spk = 71;
|
||||
goto l2011;
|
||||
|
@ -634,7 +634,7 @@ l4090:
|
|||
|| k == liqloc(loc))
|
||||
spk = 94;
|
||||
for (i = 1; i <= 5; i++)
|
||||
if (dloc[i] == loc && dflag >= 2
|
||||
if (dloc[i] == loc && dflag >= 2
|
||||
&& obj == dwarf)
|
||||
spk = 94;
|
||||
if (closed)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: setup.c,v 1.11 2005/07/01 00:03:36 jmc Exp $ */
|
||||
/* $NetBSD: setup.c,v 1.12 2021/05/02 12:50:43 rillig Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991, 1993
|
||||
|
@ -39,7 +39,7 @@ static char copyright[] = "@(#) Copyright (c) 1991, 1993\n\
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)setup.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
static char rcsid[] = "$NetBSD: setup.c,v 1.11 2005/07/01 00:03:36 jmc Exp $";
|
||||
static char rcsid[] = "$NetBSD: setup.c,v 1.12 2021/05/02 12:50:43 rillig Exp $";
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -98,7 +98,7 @@ main(int argc, char *argv[])
|
|||
|
||||
while ((c = getc(infile)) != EOF) {
|
||||
if (linestart && c == ' ') { /* Convert first spaces to tab */
|
||||
printf("0x%02x,",
|
||||
printf("0x%02x,",
|
||||
(unsigned int)('\t' ^ random()) & 0xFF);
|
||||
while ((c = getc(infile)) == ' ' && c != EOF);
|
||||
/* Drop the non-whitespace character through */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: subr.c,v 1.13 2009/08/25 06:56:52 dholland Exp $ */
|
||||
/* $NetBSD: subr.c,v 1.14 2021/05/02 12:50:43 rillig Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991, 1993
|
||||
|
@ -39,7 +39,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)subr.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: subr.c,v 1.13 2009/08/25 06:56:52 dholland Exp $");
|
||||
__RCSID("$NetBSD: subr.c,v 1.14 2021/05/02 12:50:43 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -210,7 +210,7 @@ fdwarf(void)
|
|||
j = 1 + ran(j);
|
||||
odloc[i] = dloc[i];
|
||||
dloc[i] = tk[j];
|
||||
dseen[i] = (dseen[i] && loc >= 15) ||
|
||||
dseen[i] = (dseen[i] && loc >= 15) ||
|
||||
(dloc[i] == loc || odloc[i] == loc);
|
||||
if (!dseen[i])
|
||||
continue; /* i.e. goto 6030 */
|
||||
|
@ -298,7 +298,7 @@ l82: if (stick <= 1) { /* 82 */
|
|||
/* label 8 */
|
||||
int
|
||||
march(void)
|
||||
{
|
||||
{
|
||||
int ll1, ll2;
|
||||
|
||||
if ((tkk = travel[newloc = loc]) == 0)
|
||||
|
@ -383,7 +383,7 @@ l12: /* alternative to probability move */
|
|||
/* 20 */
|
||||
static int
|
||||
mback(void)
|
||||
{
|
||||
{
|
||||
struct travlist *tk2, *j;
|
||||
int ll;
|
||||
if (forced(k = oldloc))
|
||||
|
@ -421,7 +421,7 @@ mback(void)
|
|||
/* 30000 */
|
||||
static int
|
||||
specials(void)
|
||||
{
|
||||
{
|
||||
switch (newloc -= 300) {
|
||||
case 1: /* 30100 */
|
||||
newloc = 99 + 100 - loc;
|
||||
|
@ -504,7 +504,7 @@ bug(int n)
|
|||
/* 2600 &c */
|
||||
void
|
||||
checkhints(void)
|
||||
{
|
||||
{
|
||||
int hint;
|
||||
for (hint = 4; hint <= hintmax; hint++) {
|
||||
if (hinted[hint])
|
||||
|
@ -571,7 +571,7 @@ trsay(void)
|
|||
/* 9010 */
|
||||
int
|
||||
trtake(void)
|
||||
{
|
||||
{
|
||||
if (toting(obj))
|
||||
return (2011); /* 9010 */
|
||||
spk = 25;
|
||||
|
@ -626,7 +626,7 @@ l9014: if ((obj == bird || obj == cage) && prop[bird] != 0)
|
|||
/* 9021 */
|
||||
static int
|
||||
dropper(void)
|
||||
{
|
||||
{
|
||||
k = liq();
|
||||
if (k == obj)
|
||||
obj = bottle;
|
||||
|
@ -774,7 +774,7 @@ tropen(void)
|
|||
/* 9120 */
|
||||
int
|
||||
trkill(void)
|
||||
{
|
||||
{
|
||||
int i;
|
||||
for (i = 1; i <= 5; i++)
|
||||
if (dloc[i] == loc && dflag >= 2)
|
||||
|
@ -856,7 +856,7 @@ trkill(void)
|
|||
/* 9170: throw */
|
||||
int
|
||||
trtoss(void)
|
||||
{
|
||||
{
|
||||
int i;
|
||||
if (toting(rod2) && obj == rod && !toting(rod))
|
||||
obj = rod2;
|
||||
|
@ -918,7 +918,7 @@ trtoss(void)
|
|||
/* 9210 */
|
||||
int
|
||||
trfeed(void)
|
||||
{
|
||||
{
|
||||
if (obj == bird) {
|
||||
spk = 100;
|
||||
return (2011);
|
||||
|
@ -1000,7 +1000,7 @@ trfill(void)
|
|||
/* 10000 */
|
||||
void
|
||||
closing(void)
|
||||
{
|
||||
{
|
||||
int i;
|
||||
|
||||
prop[grate] = prop[fissure] = 0;
|
||||
|
@ -1027,7 +1027,7 @@ closing(void)
|
|||
/* 11000 */
|
||||
void
|
||||
caveclose(void)
|
||||
{
|
||||
{
|
||||
int i;
|
||||
prop[bottle] = put(bottle, 115, 1);
|
||||
prop[plant] = put(plant, 115, 0);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: vocab.c,v 1.15 2009/08/25 06:56:52 dholland Exp $ */
|
||||
/* $NetBSD: vocab.c,v 1.16 2021/05/02 12:50:43 rillig Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991, 1993
|
||||
|
@ -39,7 +39,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)vocab.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: vocab.c,v 1.15 2009/08/25 06:56:52 dholland Exp $");
|
||||
__RCSID("$NetBSD: vocab.c,v 1.16 2021/05/02 12:50:43 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -192,7 +192,7 @@ exitloop2: /* hashed entry does not match */
|
|||
/* print hash table (for debugging) */
|
||||
static __unused void
|
||||
prht(void)
|
||||
{
|
||||
{
|
||||
int i, j, l;
|
||||
char *c;
|
||||
struct hashtab *h;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: wizard.c,v 1.16 2012/10/12 15:41:10 dholland Exp $ */
|
||||
/* $NetBSD: wizard.c,v 1.17 2021/05/02 12:50:43 rillig Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991, 1993
|
||||
|
@ -39,7 +39,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)wizard.c 8.1 (Berkeley) 6/2/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: wizard.c,v 1.16 2012/10/12 15:41:10 dholland Exp $");
|
||||
__RCSID("$NetBSD: wizard.c,v 1.17 2021/05/02 12:50:43 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -113,7 +113,7 @@ Start(void)
|
|||
/* not as complex as advent/10 (for now) */
|
||||
static int
|
||||
wizard(void)
|
||||
{
|
||||
{
|
||||
char *word, *x;
|
||||
if (!yesm(16, 0, 7))
|
||||
return (FALSE);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: extern.h,v 1.19 2015/06/25 05:33:02 dholland Exp $ */
|
||||
/* $NetBSD: extern.h,v 1.20 2021/05/02 12:50:43 rillig Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
|
@ -54,7 +54,7 @@ extern time_t start_time;
|
|||
|
||||
#if 0
|
||||
extern FILE *filein, *fileout;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
extern C_SCREEN *sp;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: graphics.c,v 1.20 2015/06/25 05:33:02 dholland Exp $ */
|
||||
/* $NetBSD: graphics.c,v 1.21 2021/05/02 12:50:43 rillig Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
|
@ -46,7 +46,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)graphics.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: graphics.c,v 1.20 2015/06/25 05:33:02 dholland Exp $");
|
||||
__RCSID("$NetBSD: graphics.c,v 1.21 2021/05/02 12:50:43 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -130,7 +130,7 @@ init_gr(void)
|
|||
errx(0, "couldn't initialize screen");
|
||||
setbuf(stdout, buffer);
|
||||
input = newwin(INPUT_LINES, COLS - PLANE_COLS, LINES - INPUT_LINES, 0);
|
||||
credit = newwin(INPUT_LINES, PLANE_COLS, LINES - INPUT_LINES,
|
||||
credit = newwin(INPUT_LINES, PLANE_COLS, LINES - INPUT_LINES,
|
||||
COLS - PLANE_COLS);
|
||||
planes = newwin(LINES - INPUT_LINES, PLANE_COLS, 0, COLS - PLANE_COLS);
|
||||
}
|
||||
|
@ -230,7 +230,7 @@ setup_screen(const C_SCREEN *scp)
|
|||
(void)wmove(radar, scp->airport[iu].y, scp->airport[iu].x * 2);
|
||||
(void)waddstr(radar, str);
|
||||
}
|
||||
|
||||
|
||||
(void)overwrite(radar, cleanradar);
|
||||
(void)wrefresh(radar);
|
||||
(void)wrefresh(credit);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: input.c,v 1.29 2015/06/19 06:02:31 dholland Exp $ */
|
||||
/* $NetBSD: input.c,v 1.30 2021/05/02 12:50:43 rillig Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
|
@ -46,7 +46,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)input.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: input.c,v 1.29 2015/06/19 06:02:31 dholland Exp $");
|
||||
__RCSID("$NetBSD: input.c,v 1.30 2021/05/02 12:50:43 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -138,17 +138,17 @@ static
|
|||
RULE state0[] = { { ALPHATOKEN, 1, "%c:", setplane},
|
||||
{ RETTOKEN, -1, "", NULL },
|
||||
{ HELPTOKEN, 12, " [a-z]<ret>", NULL }},
|
||||
state1[] = { { 't', 2, " turn", turn },
|
||||
{ 'a', 3, " altitude:", NULL },
|
||||
state1[] = { { 't', 2, " turn", turn },
|
||||
{ 'a', 3, " altitude:", NULL },
|
||||
{ 'c', 4, " circle", circle },
|
||||
{ 'm', 7, " mark", mark },
|
||||
{ 'u', 7, " unmark", unmark },
|
||||
{ 'i', 7, " ignore", ignore },
|
||||
{ HELPTOKEN, 12, " tacmui", NULL }},
|
||||
state2[] = { { 'l', 6, " left", left },
|
||||
{ 'r', 6, " right", right },
|
||||
state2[] = { { 'l', 6, " left", left },
|
||||
{ 'r', 6, " right", right },
|
||||
{ 'L', 4, " left 90", Left },
|
||||
{ 'R', 4, " right 90", Right },
|
||||
{ 'R', 4, " right 90", Right },
|
||||
{ 't', 11, " towards", NULL },
|
||||
{ 'w', 4, " to 0", to_dir },
|
||||
{ 'e', 4, " to 45", to_dir },
|
||||
|
@ -159,14 +159,14 @@ RULE state0[] = { { ALPHATOKEN, 1, "%c:", setplane},
|
|||
{ 'a', 4, " to 270", to_dir },
|
||||
{ 'q', 4, " to 315", to_dir },
|
||||
{ HELPTOKEN, 12, " lrLRt<dir>", NULL }},
|
||||
state3[] = { { '+', 10, " climb", climb },
|
||||
{ 'c', 10, " climb", climb },
|
||||
{ '-', 10, " descend", descend },
|
||||
{ 'd', 10, " descend", descend },
|
||||
state3[] = { { '+', 10, " climb", climb },
|
||||
{ 'c', 10, " climb", climb },
|
||||
{ '-', 10, " descend", descend },
|
||||
{ 'd', 10, " descend", descend },
|
||||
{ NUMTOKEN, 7, " %c000 feet", setalt },
|
||||
{ HELPTOKEN, 12, " +-cd[0-9]", NULL }},
|
||||
state4[] = { { '@', 9, " at", NULL },
|
||||
{ 'a', 9, " at", NULL },
|
||||
state4[] = { { '@', 9, " at", NULL },
|
||||
{ 'a', 9, " at", NULL },
|
||||
{ RETTOKEN, -1, "", NULL },
|
||||
{ HELPTOKEN, 12, " @a<ret>", NULL }},
|
||||
state5[] = { { NUMTOKEN, 7, "%c", delayb },
|
||||
|
@ -181,7 +181,7 @@ RULE state0[] = { { ALPHATOKEN, 1, "%c:", setplane},
|
|||
{ 'z', 4, " 225", rel_dir },
|
||||
{ 'a', 4, " 270", rel_dir },
|
||||
{ 'q', 4, " 315", rel_dir },
|
||||
{ RETTOKEN, -1, "", NULL },
|
||||
{ RETTOKEN, -1, "", NULL },
|
||||
{ HELPTOKEN, 12, " @a<dir><ret>",NULL }},
|
||||
state7[] = { { RETTOKEN, -1, "", NULL },
|
||||
{ HELPTOKEN, 12, " <ret>", NULL }},
|
||||
|
@ -192,7 +192,7 @@ RULE state0[] = { { ALPHATOKEN, 1, "%c:", setplane},
|
|||
{ HELPTOKEN, 12, " b*", NULL }},
|
||||
state10[] = { { NUMTOKEN, 7, " %c000 ft", setrelalt},
|
||||
{ HELPTOKEN, 12, " [0-9]", NULL }},
|
||||
state11[] = { { 'b', 8, " beacon #", beacon },
|
||||
state11[] = { { 'b', 8, " beacon #", beacon },
|
||||
{ '*', 8, " beacon #", beacon },
|
||||
{ 'e', 8, " exit #", ex_it },
|
||||
{ 'a', 8, " airport #", airport },
|
||||
|
@ -305,12 +305,12 @@ getcommand(void)
|
|||
return (1); /* forced update */
|
||||
|
||||
dest_type = T_NODEST;
|
||||
|
||||
|
||||
for (i = 0; i < level; i++) {
|
||||
func = st[stack[i].state].rule[stack[i].rule].func;
|
||||
if (func != NULL)
|
||||
if ((s = (*func)(stack[i].ch)) != NULL) {
|
||||
ioerror(stack[i].pos,
|
||||
ioerror(stack[i].pos,
|
||||
(int)strlen(stack[i].str), s);
|
||||
return (-1);
|
||||
}
|
||||
|
@ -370,7 +370,7 @@ gettoken(void)
|
|||
(void)execl(shell, base, (char *) 0);
|
||||
}
|
||||
else
|
||||
(void)execl(_PATH_BSHELL, "sh",
|
||||
(void)execl(_PATH_BSHELL, "sh",
|
||||
(char *) 0);
|
||||
|
||||
exit(0); /* oops */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: list.c,v 1.9 2015/06/19 06:02:31 dholland Exp $ */
|
||||
/* $NetBSD: list.c,v 1.10 2021/05/02 12:50:43 rillig Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
|
@ -46,7 +46,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)list.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: list.c,v 1.9 2015/06/19 06:02:31 dholland Exp $");
|
||||
__RCSID("$NetBSD: list.c,v 1.10 2021/05/02 12:50:43 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -105,7 +105,7 @@ delete(LIST *l, PLANE *p)
|
|||
{
|
||||
if (l->head == NULL)
|
||||
loser(p, "deleted a non-existent plane! Get help!");
|
||||
|
||||
|
||||
if (l->head == p && l->tail == p)
|
||||
l->head = l->tail = NULL;
|
||||
else if (l->head == p) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: log.c,v 1.24 2019/03/19 00:11:34 pgoyette Exp $ */
|
||||
/* $NetBSD: log.c,v 1.25 2021/05/02 12:50:43 rillig Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
|
@ -46,7 +46,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)log.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: log.c,v 1.24 2019/03/19 00:11:34 pgoyette Exp $");
|
||||
__RCSID("$NetBSD: log.c,v 1.25 2021/05/02 12:50:43 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -141,7 +141,7 @@ open_score_file(void)
|
|||
if (fcntl(score_fd, F_SETFD, flags) == -1)
|
||||
err(1, "fcntl F_SETFD");
|
||||
/*
|
||||
* This is done to take advantage of stdio, while still
|
||||
* This is done to take advantage of stdio, while still
|
||||
* allowing a O_CREAT during the open(2) of the log file.
|
||||
*/
|
||||
score_fp = fdopen(score_fd, "r+");
|
||||
|
@ -184,10 +184,10 @@ log_score(int list_em)
|
|||
}
|
||||
for (;;) {
|
||||
good = fscanf(score_fp, SCORE_SCANF_FMT,
|
||||
score[num_scores].name,
|
||||
score[num_scores].host,
|
||||
score[num_scores].name,
|
||||
score[num_scores].host,
|
||||
score[num_scores].game,
|
||||
&score[num_scores].planes,
|
||||
&score[num_scores].planes,
|
||||
&score[num_scores].time,
|
||||
&score[num_scores].real_time);
|
||||
if (good != 6 || ++num_scores >= NUM_SCORES)
|
||||
|
@ -195,19 +195,19 @@ log_score(int list_em)
|
|||
}
|
||||
if (!test_mode && !list_em) {
|
||||
if ((pw = (struct passwd *) getpwuid(getuid())) == NULL) {
|
||||
(void)fprintf(stderr,
|
||||
(void)fprintf(stderr,
|
||||
"getpwuid failed for uid %d. Who are you?\n",
|
||||
(int)getuid());
|
||||
return (-1);
|
||||
}
|
||||
(void)strlcpy(thisscore.name, pw->pw_name, SCORE_NAME_LEN);
|
||||
(void)uname(&lname);
|
||||
(void)strlcpy(thisscore.host, lname.nodename,
|
||||
(void)strlcpy(thisscore.host, lname.nodename,
|
||||
sizeof(thisscore.host));
|
||||
|
||||
cp = strrchr(filename, '/');
|
||||
if (cp == NULL) {
|
||||
(void)fprintf(stderr, "log: where's the '/' in %s?\n",
|
||||
(void)fprintf(stderr, "log: where's the '/' in %s?\n",
|
||||
filename);
|
||||
return (-1);
|
||||
}
|
||||
|
@ -264,7 +264,7 @@ log_score(int list_em)
|
|||
rewind(score_fp);
|
||||
for (i = 0; i < num_scores; i++)
|
||||
(void)fprintf(score_fp, "%s %s %s %d %d %d\n",
|
||||
score[i].name, score[i].host,
|
||||
score[i].name, score[i].host,
|
||||
score[i].game, score[i].planes,
|
||||
score[i].time, score[i].real_time);
|
||||
(void)fflush(score_fp);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: main.c,v 1.24 2015/06/25 05:33:02 dholland Exp $ */
|
||||
/* $NetBSD: main.c,v 1.25 2021/05/02 12:50:43 rillig Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
|
@ -51,7 +51,7 @@ __COPYRIGHT("@(#) Copyright (c) 1990, 1993\
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: main.c,v 1.24 2015/06/25 05:33:02 dholland Exp $");
|
||||
__RCSID("$NetBSD: main.c,v 1.25 2021/05/02 12:50:43 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -101,7 +101,7 @@ main(int argc, char *argv[])
|
|||
switch (ch) {
|
||||
case '?':
|
||||
case 'u':
|
||||
default:
|
||||
default:
|
||||
f_usage = 1;
|
||||
break;
|
||||
case 'l':
|
||||
|
@ -128,7 +128,7 @@ main(int argc, char *argv[])
|
|||
srandom(seed);
|
||||
|
||||
if (f_usage)
|
||||
(void)fprintf(stderr,
|
||||
(void)fprintf(stderr,
|
||||
"Usage: %s -[u?lstp] [-[gf] game_name] [-r random seed]\n",
|
||||
argv[0]);
|
||||
if (f_showscore)
|
||||
|
@ -141,7 +141,7 @@ main(int argc, char *argv[])
|
|||
(void)strlcpy(buf, _PATH_GAMES, 100);
|
||||
(void)puts(buf);
|
||||
}
|
||||
|
||||
|
||||
if (f_usage || f_showscore || f_list || f_printpath)
|
||||
exit(0);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: update.c,v 1.27 2015/06/25 05:33:02 dholland Exp $ */
|
||||
/* $NetBSD: update.c,v 1.28 2021/05/02 12:50:43 rillig Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
|
@ -46,7 +46,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)update.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: update.c,v 1.27 2015/06/25 05:33:02 dholland Exp $");
|
||||
__RCSID("$NetBSD: update.c,v 1.28 2021/05/02 12:50:43 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -172,10 +172,10 @@ update(int dummy __unused)
|
|||
if (pp->xpos == sp->airport[i].x &&
|
||||
pp->ypos == sp->airport[i].y) {
|
||||
if (pp->dest_type == T_AIRPORT)
|
||||
loser(pp,
|
||||
loser(pp,
|
||||
"landed at the wrong airport.");
|
||||
else
|
||||
loser(pp,
|
||||
loser(pp,
|
||||
"landed instead of exited.");
|
||||
}
|
||||
loser(pp, "crashed on the ground.");
|
||||
|
@ -186,10 +186,10 @@ update(int dummy __unused)
|
|||
if (pp->xpos == sp->exit[i].x &&
|
||||
pp->ypos == sp->exit[i].y) {
|
||||
if (pp->dest_type == T_EXIT)
|
||||
loser(pp,
|
||||
loser(pp,
|
||||
"exited via the wrong exit.");
|
||||
else
|
||||
loser(pp,
|
||||
loser(pp,
|
||||
"exited instead of landed.");
|
||||
}
|
||||
loser(pp, "illegally left the flight arena.");
|
||||
|
@ -267,7 +267,7 @@ command(const PLANE *pp)
|
|||
buf[0] = '\0';
|
||||
bp = buf;
|
||||
bpsize = sizeof(buf);
|
||||
(void)snprintf(bp, bpsize, "%c%d%c%c%u: ", name(pp), pp->altitude,
|
||||
(void)snprintf(bp, bpsize, "%c%d%c%c%u: ", name(pp), pp->altitude,
|
||||
(pp->fuel < LOWFUEL) ? '*' : ' ',
|
||||
(pp->dest_type == T_AIRPORT) ? 'A' : 'E', pp->dest_no);
|
||||
|
||||
|
@ -287,7 +287,7 @@ command(const PLANE *pp)
|
|||
|
||||
bp = strchr(buf, '\0');
|
||||
bpsize = buf + sizeof(buf) - bp;
|
||||
if (*comm_start == '\0' &&
|
||||
if (*comm_start == '\0' &&
|
||||
(pp->status == S_UNMARKED || pp->status == S_IGNORED))
|
||||
(void)snprintf(bp, bpsize, "---------");
|
||||
return (buf);
|
||||
|
@ -432,7 +432,7 @@ static int
|
|||
too_close(const PLANE *p1, const PLANE *p2, int dist)
|
||||
{
|
||||
if (ABS(p1->altitude - p2->altitude) <= dist &&
|
||||
ABS(p1->xpos - p2->xpos) <= dist &&
|
||||
ABS(p1->xpos - p2->xpos) <= dist &&
|
||||
ABS(p1->ypos - p2->ypos) <= dist)
|
||||
return (1);
|
||||
else
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: main.c,v 1.33 2019/02/03 10:45:58 mrg Exp $ */
|
||||
/* $NetBSD: main.c,v 1.34 2021/05/02 12:50:43 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
|
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: main.c,v 1.33 2019/02/03 10:45:58 mrg Exp $");
|
||||
__RCSID("$NetBSD: main.c,v 1.34 2021/05/02 12:50:43 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -417,7 +417,7 @@ main(int argc __unused, char **argv)
|
|||
writec('\n');
|
||||
wrtext(helpm);
|
||||
if (tflag)
|
||||
curmove(cturn == -1 ?
|
||||
curmove(cturn == -1 ?
|
||||
18 : 19, 0);
|
||||
else
|
||||
writec('\n');
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: fancy.c,v 1.16 2021/04/13 02:11:39 mrg Exp $ */
|
||||
/* $NetBSD: fancy.c,v 1.17 2021/05/02 12:50:43 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
|
@ -34,7 +34,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)fancy.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: fancy.c,v 1.16 2021/04/13 02:11:39 mrg Exp $");
|
||||
__RCSID("$NetBSD: fancy.c,v 1.17 2021/05/02 12:50:43 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -84,7 +84,7 @@ static char **tstr[] = {&BC, &CD, &CE, &CL, &CM, &HO, &MC, &ML, &ND, &UP};
|
|||
|
||||
static char tbuf[1024]; /* buffer for decoded termcap entries */
|
||||
|
||||
static int oldb[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
static int oldb[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0};
|
||||
|
||||
static int oldr;
|
||||
|
@ -251,7 +251,7 @@ bsect(int b, int rpos, int cpos, int cnext)
|
|||
bct = 3;
|
||||
}
|
||||
}
|
||||
/* reposition cursor */
|
||||
/* reposition cursor */
|
||||
curmove(curr + cnext, curc - bct);
|
||||
}
|
||||
}
|
||||
|
@ -330,27 +330,27 @@ fixpos(int cur, int new, int r, int c, int inc)
|
|||
if (o == 0)
|
||||
nc = c < 54 ? c + 1 : c;
|
||||
if (ov > nv)
|
||||
fixcol(r + inc * (nv - n * 5), nc,
|
||||
fixcol(r + inc * (nv - n * 5), nc,
|
||||
abs(ov - nv), ' ', inc);
|
||||
else
|
||||
fixcol(r + inc * (ov - o * 5), nc,
|
||||
fixcol(r + inc * (ov - o * 5), nc,
|
||||
abs(ov - nv), col, inc);
|
||||
return;
|
||||
} else {
|
||||
if (c < 54) {
|
||||
if (o + n == 1) {
|
||||
if (n) {
|
||||
fixcol(r, c, abs(nv - 5), col,
|
||||
fixcol(r, c, abs(nv - 5), col,
|
||||
inc);
|
||||
if (ov != 5)
|
||||
fixcol(r + inc * ov,
|
||||
fixcol(r + inc * ov,
|
||||
c + 1, abs(ov - 5),
|
||||
col, inc);
|
||||
} else {
|
||||
fixcol(r, c, abs(ov - 5), ' ',
|
||||
fixcol(r, c, abs(ov - 5), ' ',
|
||||
inc);
|
||||
if (nv != 5)
|
||||
fixcol(r + inc * nv,
|
||||
fixcol(r + inc * nv,
|
||||
c + 1, abs(nv - 5),
|
||||
' ', inc);
|
||||
}
|
||||
|
@ -360,28 +360,28 @@ fixpos(int cur, int new, int r, int c, int inc)
|
|||
if (ov != 10)
|
||||
fixcol(r + inc * (ov - 5), c,
|
||||
abs(ov - 10), col, inc);
|
||||
fixcol(r, c + 2, abs(nv - 10), col,
|
||||
fixcol(r, c + 2, abs(nv - 10), col,
|
||||
inc);
|
||||
} else {
|
||||
if (nv != 10)
|
||||
fixcol(r + inc * (nv - 5), c,
|
||||
abs(nv - 10), ' ', inc);
|
||||
fixcol(r, c + 2, abs(ov - 10), ' ',
|
||||
fixcol(r, c + 2, abs(ov - 10), ' ',
|
||||
inc);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (n > o) {
|
||||
fixcol(r + inc * (ov % 5), c + o,
|
||||
fixcol(r + inc * (ov % 5), c + o,
|
||||
abs(5 * n - ov), col, inc);
|
||||
if (nv != 5 * n)
|
||||
fixcol(r, c + n, abs(5 * n - nv),
|
||||
fixcol(r, c + n, abs(5 * n - nv),
|
||||
col, inc);
|
||||
} else {
|
||||
fixcol(r + inc * (nv % 5), c + n,
|
||||
fixcol(r + inc * (nv % 5), c + n,
|
||||
abs(5 * n - nv), ' ', inc);
|
||||
if (ov != 5 * o)
|
||||
fixcol(r, c + o, abs(5 * o - ov),
|
||||
fixcol(r, c + o, abs(5 * o - ov),
|
||||
' ', inc);
|
||||
}
|
||||
return;
|
||||
|
@ -483,13 +483,13 @@ newpos(void)
|
|||
ccount = n;
|
||||
}
|
||||
/* UP and ND */
|
||||
if (c >= curc &&
|
||||
if (c >= curc &&
|
||||
(n = (curr - r) * lUP + (c - curc) * lND) < ccount) {
|
||||
mode = 6;
|
||||
ccount = n;
|
||||
}
|
||||
/* UP and BS */
|
||||
if (c < curc &&
|
||||
if (c < curc &&
|
||||
(n = (curr - r) * lUP + (curc - c) * lBC) < ccount) {
|
||||
mode = 7;
|
||||
ccount = n;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: tutor.c,v 1.11 2012/10/13 19:19:39 dholland Exp $ */
|
||||
/* $NetBSD: tutor.c,v 1.12 2021/05/02 12:50:43 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
|
@ -34,14 +34,14 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)tutor.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: tutor.c,v 1.11 2012/10/13 19:19:39 dholland Exp $");
|
||||
__RCSID("$NetBSD: tutor.c,v 1.12 2021/05/02 12:50:43 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
#include "back.h"
|
||||
#include "tutor.h"
|
||||
|
||||
static const char better[] =
|
||||
static const char better[] =
|
||||
"That is a legal move, but there is a better one.\n";
|
||||
|
||||
static int brdeq(const int *, const int *);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: command1.c,v 1.5 2012/06/19 05:46:08 dholland Exp $ */
|
||||
/* $NetBSD: command1.c,v 1.6 2021/05/02 12:50:43 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
|
@ -34,7 +34,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)com1.c 8.2 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: command1.c,v 1.5 2012/06/19 05:46:08 dholland Exp $");
|
||||
__RCSID("$NetBSD: command1.c,v 1.6 2021/05/02 12:50:43 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -143,8 +143,8 @@ news(void)
|
|||
rythmn = ourtime - ourtime % CYCLE;
|
||||
}
|
||||
if (!wiz && !tempwiz)
|
||||
if ((testbit(inven, TALISMAN) || testbit(wear, TALISMAN)) &&
|
||||
(testbit(inven, MEDALION) || testbit(wear, MEDALION)) &&
|
||||
if ((testbit(inven, TALISMAN) || testbit(wear, TALISMAN)) &&
|
||||
(testbit(inven, MEDALION) || testbit(wear, MEDALION)) &&
|
||||
(testbit(inven, AMULET) || testbit(wear, AMULET))) {
|
||||
tempwiz = 1;
|
||||
printf("The three amulets glow and reenforce each ");
|
||||
|
@ -208,7 +208,7 @@ news(void)
|
|||
printf("Laser blasts sear the cockpit, and the alien ");
|
||||
puts("veers off in a victory roll.");
|
||||
puts("The viper shudders under a terrible explosion.");
|
||||
printf("I'm afraid you have suffered %s.\n",
|
||||
printf("I'm afraid you have suffered %s.\n",
|
||||
ouch[hurt]);
|
||||
} else
|
||||
clearbit(location[position].objects, CYLON);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: command2.c,v 1.4 2019/02/03 03:19:25 mrg Exp $ */
|
||||
/* $NetBSD: command2.c,v 1.5 2021/05/02 12:50:43 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
|
@ -34,7 +34,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)com2.c 8.2 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: command2.c,v 1.4 2019/02/03 03:19:25 mrg Exp $");
|
||||
__RCSID("$NetBSD: command2.c,v 1.5 2021/05/02 12:50:43 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -180,10 +180,10 @@ murder(void)
|
|||
{
|
||||
int n;
|
||||
|
||||
for (n = 0;
|
||||
!((n == SWORD || n == KNIFE || n == TWO_HANDED || n == MACE ||
|
||||
n == CLEAVER || n == BROAD || n == CHAIN || n == SHOVEL ||
|
||||
n == HALBERD) && testbit(inven, n)) && n < NUMOFOBJECTS;
|
||||
for (n = 0;
|
||||
!((n == SWORD || n == KNIFE || n == TWO_HANDED || n == MACE ||
|
||||
n == CLEAVER || n == BROAD || n == CHAIN || n == SHOVEL ||
|
||||
n == HALBERD) && testbit(inven, n)) && n < NUMOFOBJECTS;
|
||||
n++);
|
||||
if (n == NUMOFOBJECTS) {
|
||||
if (testbit(inven, LASER)) {
|
||||
|
@ -226,15 +226,15 @@ murder(void)
|
|||
power += 5;
|
||||
notes[JINXED]++;
|
||||
} else
|
||||
if (testbit(location[position].objects,
|
||||
if (testbit(location[position].objects,
|
||||
NORMGOD)) {
|
||||
printf("The goddess pleads but you ");
|
||||
printf("strike her mercilessly. Her ");
|
||||
printf("broken body lies in a\n");
|
||||
puts("pool of blood.");
|
||||
clearbit(location[position].objects,
|
||||
clearbit(location[position].objects,
|
||||
NORMGOD);
|
||||
setbit(location[position].objects,
|
||||
setbit(location[position].objects,
|
||||
DEADGOD);
|
||||
power += 5;
|
||||
notes[JINXED]++;
|
||||
|
@ -292,9 +292,9 @@ ravage(void)
|
|||
{
|
||||
while (wordtype[++wordnumber] != NOUNS && wordnumber <= wordcount)
|
||||
continue;
|
||||
if (wordtype[wordnumber] == NOUNS &&
|
||||
if (wordtype[wordnumber] == NOUNS &&
|
||||
(testbit(location[position].objects, wordvalue[wordnumber])
|
||||
|| (wordvalue[wordnumber] == NORMGOD &&
|
||||
|| (wordvalue[wordnumber] == NORMGOD &&
|
||||
testbit(location[position].objects, BATHGOD)))) {
|
||||
ourtime++;
|
||||
switch (wordvalue[wordnumber]) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: command3.c,v 1.5 2019/02/03 03:19:25 mrg Exp $ */
|
||||
/* $NetBSD: command3.c,v 1.6 2021/05/02 12:50:43 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
|
@ -34,7 +34,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)com3.c 8.2 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: command3.c,v 1.5 2019/02/03 03:19:25 mrg Exp $");
|
||||
__RCSID("$NetBSD: command3.c,v 1.6 2021/05/02 12:50:43 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -110,33 +110,33 @@ bury(void)
|
|||
int value;
|
||||
|
||||
if (testbit(inven, SHOVEL)) {
|
||||
while (wordtype[++wordnumber] != OBJECT &&
|
||||
while (wordtype[++wordnumber] != OBJECT &&
|
||||
wordtype[wordnumber] != NOUNS && wordnumber < wordcount)
|
||||
continue;
|
||||
value = wordvalue[wordnumber];
|
||||
if (wordtype[wordnumber] == NOUNS &&
|
||||
(testbit(location[position].objects, value) ||
|
||||
if (wordtype[wordnumber] == NOUNS &&
|
||||
(testbit(location[position].objects, value) ||
|
||||
value == BODY))
|
||||
switch (value) {
|
||||
case BODY:
|
||||
wordtype[wordnumber] = OBJECT;
|
||||
if (testbit(inven, MAID) ||
|
||||
if (testbit(inven, MAID) ||
|
||||
testbit(location[position].objects, MAID))
|
||||
value = MAID;
|
||||
if (testbit(inven, DEADWOOD) ||
|
||||
testbit(location[position].objects,
|
||||
if (testbit(inven, DEADWOOD) ||
|
||||
testbit(location[position].objects,
|
||||
DEADWOOD))
|
||||
value = DEADWOOD;
|
||||
if (testbit(inven, DEADGOD) ||
|
||||
testbit(location[position].objects,
|
||||
if (testbit(inven, DEADGOD) ||
|
||||
testbit(location[position].objects,
|
||||
DEADGOD))
|
||||
value = DEADGOD;
|
||||
if (testbit(inven, DEADTIME) ||
|
||||
testbit(location[position].objects,
|
||||
if (testbit(inven, DEADTIME) ||
|
||||
testbit(location[position].objects,
|
||||
DEADTIME))
|
||||
value = DEADTIME;
|
||||
if (testbit(inven, DEADNATIVE) ||
|
||||
testbit(location[position].objects,
|
||||
if (testbit(inven, DEADNATIVE) ||
|
||||
testbit(location[position].objects,
|
||||
DEADNATIVE))
|
||||
value = DEADNATIVE;
|
||||
break;
|
||||
|
@ -159,8 +159,8 @@ bury(void)
|
|||
default:
|
||||
puts("Wha..?");
|
||||
}
|
||||
if (wordtype[wordnumber] == OBJECT && position > 88 &&
|
||||
(testbit(inven, value) ||
|
||||
if (wordtype[wordnumber] == OBJECT && position > 88 &&
|
||||
(testbit(inven, value) ||
|
||||
testbit(location[position].objects, value))) {
|
||||
puts("Buried.");
|
||||
if (testbit(inven, value)) {
|
||||
|
@ -176,7 +176,7 @@ bury(void)
|
|||
case DEADTIME:
|
||||
case DEADGOD:
|
||||
ego += 2;
|
||||
printf("The %s should rest easier now.\n",
|
||||
printf("The %s should rest easier now.\n",
|
||||
objsht[value]);
|
||||
}
|
||||
} else
|
||||
|
@ -217,7 +217,7 @@ shoot(void)
|
|||
puts("You aren't holding a blaster.");
|
||||
else {
|
||||
wordnumber++;
|
||||
while (wordnumber <= wordcount &&
|
||||
while (wordnumber <= wordcount &&
|
||||
wordtype[wordnumber] == OBJECT) {
|
||||
value = wordvalue[wordnumber];
|
||||
printf("%s:\n", objsht[value]);
|
||||
|
@ -229,9 +229,9 @@ shoot(void)
|
|||
if (value == BOMB)
|
||||
die();
|
||||
} else
|
||||
printf("I don't see any %s around here.\n",
|
||||
printf("I don't see any %s around here.\n",
|
||||
objsht[value]);
|
||||
if (wordnumber < wordcount - 1 &&
|
||||
if (wordnumber < wordcount - 1 &&
|
||||
wordvalue[++wordnumber] == AND)
|
||||
wordnumber++;
|
||||
else
|
||||
|
@ -274,7 +274,7 @@ shoot(void)
|
|||
break;
|
||||
|
||||
case NORMGOD:
|
||||
if (testbit(location[position].objects,
|
||||
if (testbit(location[position].objects,
|
||||
BATHGOD)) {
|
||||
printf("The goddess is hit in the ");
|
||||
printf("chest and splashes back ");
|
||||
|
@ -283,7 +283,7 @@ shoot(void)
|
|||
printf("charred blast hole. Her ");
|
||||
puts("naked body floats in the");
|
||||
puts("pools and then off downstream.");
|
||||
clearbit(location[position].objects,
|
||||
clearbit(location[position].objects,
|
||||
BATHGOD);
|
||||
setbit(location[180].objects, DEADGOD);
|
||||
power += 5;
|
||||
|
@ -315,16 +315,16 @@ shoot(void)
|
|||
break;
|
||||
|
||||
case TIMER:
|
||||
if (testbit(location[position].objects,
|
||||
if (testbit(location[position].objects,
|
||||
TIMER)) {
|
||||
printf("The old man slumps over ");
|
||||
puts("the bar.");
|
||||
power++;
|
||||
ego -= 2;
|
||||
notes[JINXED]++;
|
||||
clearbit(location[position].objects,
|
||||
clearbit(location[position].objects,
|
||||
TIMER);
|
||||
setbit(location[position].objects,
|
||||
setbit(location[position].objects,
|
||||
DEADTIME);
|
||||
} else
|
||||
puts("What old-timer?");
|
||||
|
@ -340,14 +340,14 @@ shoot(void)
|
|||
puts("What man?");
|
||||
break;
|
||||
case NATIVE:
|
||||
if (testbit(location[position].objects,
|
||||
if (testbit(location[position].objects,
|
||||
NATIVE)) {
|
||||
printf("The girl is blown backwards ");
|
||||
printf("several feet and lies in a ");
|
||||
puts("pool of blood.");
|
||||
clearbit(location[position].objects,
|
||||
clearbit(location[position].objects,
|
||||
NATIVE);
|
||||
setbit(location[position].objects,
|
||||
setbit(location[position].objects,
|
||||
DEADNATIVE);
|
||||
power += 5;
|
||||
ego -= 2;
|
||||
|
@ -360,7 +360,7 @@ shoot(void)
|
|||
break;
|
||||
|
||||
default:
|
||||
printf("You can't shoot the %s.\n",
|
||||
printf("You can't shoot the %s.\n",
|
||||
objsht[wordvalue[wordnumber]]);
|
||||
}
|
||||
} else
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: command4.c,v 1.3 2005/07/01 06:04:54 jmc Exp $ */
|
||||
/* $NetBSD: command4.c,v 1.4 2021/05/02 12:50:43 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
|
@ -34,7 +34,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)com4.c 8.2 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: command4.c,v 1.3 2005/07/01 06:04:54 jmc Exp $");
|
||||
__RCSID("$NetBSD: command4.c,v 1.4 2021/05/02 12:50:43 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -53,13 +53,13 @@ take(unsigned int from[])
|
|||
return (cypher());
|
||||
} else {
|
||||
wordnumber++;
|
||||
while (wordnumber <= wordcount && wordtype[wordnumber] ==
|
||||
while (wordnumber <= wordcount && wordtype[wordnumber] ==
|
||||
OBJECT) {
|
||||
value = wordvalue[wordnumber];
|
||||
printf("%s:\n", objsht[value]);
|
||||
heavy = (carrying + objwt[value]) <= WEIGHT;
|
||||
bulky = (encumber + objcumber[value]) <= CUMBER;
|
||||
if ((testbit(from, value) || wiz || tempwiz) &&
|
||||
if ((testbit(from, value) || wiz || tempwiz) &&
|
||||
heavy && bulky && !testbit(inven, value)) {
|
||||
setbit(inven, value);
|
||||
carrying += objwt[value];
|
||||
|
@ -77,7 +77,7 @@ take(unsigned int from[])
|
|||
A_OR_AN_OR_BLANK(value),
|
||||
objsht[value]);
|
||||
else if (!testbit(from, value))
|
||||
printf("I don't see any %s around here.\n",
|
||||
printf("I don't see any %s around here.\n",
|
||||
objsht[value]);
|
||||
else if (!heavy)
|
||||
printf("The %s %stoo heavy.\n", objsht[value],
|
||||
|
@ -85,7 +85,7 @@ take(unsigned int from[])
|
|||
else
|
||||
printf("The %s %stoo cumbersome to hold.\n",
|
||||
objsht[value], IS_OR_ARE(value));
|
||||
if (wordnumber < wordcount - 1 &&
|
||||
if (wordnumber < wordcount - 1 &&
|
||||
wordvalue[++wordnumber] == AND)
|
||||
wordnumber++;
|
||||
else
|
||||
|
@ -175,7 +175,7 @@ take(unsigned int from[])
|
|||
return (take(from));
|
||||
|
||||
case NORMGOD:
|
||||
if (testbit(location[position].objects, BATHGOD) &&
|
||||
if (testbit(location[position].objects, BATHGOD) &&
|
||||
(testbit(wear, AMULET) || testbit(inven, AMULET))) {
|
||||
printf("She offers a delicate hand, and you ");
|
||||
puts("help her out of the sparkling springs.");
|
||||
|
@ -192,7 +192,7 @@ take(unsigned int from[])
|
|||
followgod = ourtime;
|
||||
clearbit(location[position].objects, BATHGOD);
|
||||
} else
|
||||
if (!testbit(location[position].objects,
|
||||
if (!testbit(location[position].objects,
|
||||
BATHGOD)) {
|
||||
printf("You're in no position to ");
|
||||
puts("take her.");
|
||||
|
@ -236,7 +236,7 @@ throw(const char *name)
|
|||
break;
|
||||
|
||||
case UP:
|
||||
deposit = location[position].up *
|
||||
deposit = location[position].up *
|
||||
(location[position].access || position == FINAL);
|
||||
break;
|
||||
|
||||
|
@ -247,18 +247,18 @@ throw(const char *name)
|
|||
wordnumber = first + 1;
|
||||
while (wordnumber <= wordcount) {
|
||||
value = wordvalue[wordnumber];
|
||||
if (deposit &&
|
||||
if (deposit &&
|
||||
testbit(location[position].objects, value)) {
|
||||
clearbit(location[position].objects, value);
|
||||
if (value != GRENADE)
|
||||
setbit(location[deposit].objects,
|
||||
setbit(location[deposit].objects,
|
||||
value);
|
||||
else {
|
||||
printf("A thundering explosion ");
|
||||
printf("nearby sends up a cloud of ");
|
||||
puts("smoke and shrapnel.");
|
||||
for (n = 0; n < NUMOFWORDS; n++)
|
||||
location[deposit].objects[n] =
|
||||
location[deposit].objects[n] =
|
||||
0;
|
||||
setbit(location[deposit].objects, CHAR);
|
||||
}
|
||||
|
@ -279,14 +279,14 @@ throw(const char *name)
|
|||
puts("The door is not damaged.");
|
||||
}
|
||||
} else
|
||||
if (value == GRENADE &&
|
||||
testbit(location[position].objects,
|
||||
if (value == GRENADE &&
|
||||
testbit(location[position].objects,
|
||||
value)) {
|
||||
printf("You are blown into shreds ");
|
||||
puts("when your grenade explodes.");
|
||||
die();
|
||||
}
|
||||
if (wordnumber < wordcount - 1 &&
|
||||
if (wordnumber < wordcount - 1 &&
|
||||
wordvalue[++wordnumber] == AND)
|
||||
wordnumber++;
|
||||
else
|
||||
|
@ -305,24 +305,24 @@ drop(const char *name)
|
|||
|
||||
firstnumber = wordnumber;
|
||||
wordnumber++;
|
||||
while (wordnumber <= wordcount &&
|
||||
while (wordnumber <= wordcount &&
|
||||
(wordtype[wordnumber] == OBJECT || wordtype[wordnumber] == NOUNS)) {
|
||||
value = wordvalue[wordnumber];
|
||||
if (value == BODY) { /* special case */
|
||||
wordtype[wordnumber] = OBJECT;
|
||||
if (testbit(inven, MAID) ||
|
||||
if (testbit(inven, MAID) ||
|
||||
testbit(location[position].objects, MAID))
|
||||
value = MAID;
|
||||
else if (testbit(inven, DEADWOOD) ||
|
||||
else if (testbit(inven, DEADWOOD) ||
|
||||
testbit(location[position].objects, DEADWOOD))
|
||||
value = DEADWOOD;
|
||||
else if (testbit(inven, DEADGOD) ||
|
||||
else if (testbit(inven, DEADGOD) ||
|
||||
testbit(location[position].objects, DEADGOD))
|
||||
value = DEADGOD;
|
||||
else if (testbit(inven, DEADTIME) ||
|
||||
else if (testbit(inven, DEADTIME) ||
|
||||
testbit(location[position].objects, DEADTIME))
|
||||
value = DEADTIME;
|
||||
else if (testbit(inven, DEADNATIVE) ||
|
||||
else if (testbit(inven, DEADNATIVE) ||
|
||||
testbit(location[position].objects, DEADNATIVE))
|
||||
value = DEADNATIVE;
|
||||
}
|
||||
|
@ -349,9 +349,9 @@ drop(const char *name)
|
|||
puts("obliterate us.");
|
||||
die();
|
||||
}
|
||||
if (value != AMULET && value != MEDALION &&
|
||||
if (value != AMULET && value != MEDALION &&
|
||||
value != TALISMAN)
|
||||
setbit(location[position].objects,
|
||||
setbit(location[position].objects,
|
||||
value);
|
||||
else
|
||||
tempwiz = 0;
|
||||
|
@ -362,7 +362,7 @@ drop(const char *name)
|
|||
printf("%s.\n", name);
|
||||
} else {
|
||||
if (*name != 'K') {
|
||||
printf("You aren't holding the %s.\n",
|
||||
printf("You aren't holding the %s.\n",
|
||||
objsht[value]);
|
||||
if (testbit(location[position].objects,
|
||||
value)) {
|
||||
|
@ -371,7 +371,7 @@ drop(const char *name)
|
|||
else if (*name == 'G')
|
||||
puts("Given anyway.");
|
||||
}
|
||||
} else if (testbit(location[position].objects,
|
||||
} else if (testbit(location[position].objects,
|
||||
value))
|
||||
puts("Kicked.");
|
||||
else if (testbit(wear, value))
|
||||
|
@ -380,7 +380,7 @@ drop(const char *name)
|
|||
puts("Not found.");
|
||||
}
|
||||
}
|
||||
if (wordnumber < wordcount - 1 &&
|
||||
if (wordnumber < wordcount - 1 &&
|
||||
wordvalue[++wordnumber] == AND)
|
||||
wordnumber++;
|
||||
else
|
||||
|
@ -449,13 +449,13 @@ eat(void)
|
|||
printf("Eaten. You can explore a little ");
|
||||
puts("longer now.");
|
||||
} else if (!testbit(inven, value)) {
|
||||
printf("You aren't holding the %s.\n",
|
||||
printf("You aren't holding the %s.\n",
|
||||
objsht[value]);
|
||||
} else if (!testbit(inven, KNIFE))
|
||||
puts("You need a knife.");
|
||||
else
|
||||
puts("You're stuffed.");
|
||||
if (wordnumber < wordcount - 1 &&
|
||||
if (wordnumber < wordcount - 1 &&
|
||||
wordvalue[++wordnumber] == AND)
|
||||
wordnumber++;
|
||||
else
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: command5.c,v 1.5 2014/03/22 23:31:28 dholland Exp $ */
|
||||
/* $NetBSD: command5.c,v 1.6 2021/05/02 12:50:43 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
|
@ -34,7 +34,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)com5.c 8.2 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: command5.c,v 1.5 2014/03/22 23:31:28 dholland Exp $");
|
||||
__RCSID("$NetBSD: command5.c,v 1.6 2021/05/02 12:50:43 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -53,7 +53,7 @@ kiss(void)
|
|||
return;
|
||||
}
|
||||
if (wordtype[wordnumber] == NOUNS) {
|
||||
if (testbit(location[position].objects,
|
||||
if (testbit(location[position].objects,
|
||||
wordvalue[wordnumber])) {
|
||||
pleasure++;
|
||||
printf("Kissed.\n");
|
||||
|
@ -144,7 +144,7 @@ love(void)
|
|||
}
|
||||
printf("Goddess:\n");
|
||||
if (!loved)
|
||||
setbit(location[position].objects,
|
||||
setbit(location[position].objects,
|
||||
MEDALION);
|
||||
loved = 1;
|
||||
ourtime += 10;
|
||||
|
@ -156,7 +156,7 @@ love(void)
|
|||
return;
|
||||
}
|
||||
}
|
||||
if (testbit(location[position].objects,
|
||||
if (testbit(location[position].objects,
|
||||
wordvalue[wordnumber])) {
|
||||
if (wordvalue[wordnumber] == NATIVE) {
|
||||
printf("The girl is easy prey. She peels ");
|
||||
|
@ -216,7 +216,7 @@ zzz(void)
|
|||
while (!testbit(inven, n))
|
||||
n = rnd(NUMOFOBJECTS);
|
||||
clearbit(inven, n);
|
||||
if (n != AMULET && n != MEDALION &&
|
||||
if (n != AMULET && n != MEDALION &&
|
||||
n != TALISMAN)
|
||||
setbit(
|
||||
location[position].objects,
|
||||
|
@ -305,9 +305,9 @@ give(void)
|
|||
|
||||
last1 = last2 = 0;
|
||||
firstnumber = wordnumber;
|
||||
while (wordtype[++wordnumber] != OBJECT &&
|
||||
wordvalue[wordnumber] != AMULET &&
|
||||
wordvalue[wordnumber] != MEDALION &&
|
||||
while (wordtype[++wordnumber] != OBJECT &&
|
||||
wordvalue[wordnumber] != AMULET &&
|
||||
wordvalue[wordnumber] != MEDALION &&
|
||||
wordvalue[wordnumber] != TALISMAN && wordnumber <= wordcount)
|
||||
continue;
|
||||
if (wordnumber <= wordcount) {
|
||||
|
@ -317,7 +317,7 @@ give(void)
|
|||
last1 = wordnumber;
|
||||
}
|
||||
wordnumber = firstnumber;
|
||||
while ((wordtype[++wordnumber] != NOUNS ||
|
||||
while ((wordtype[++wordnumber] != NOUNS ||
|
||||
wordvalue[wordnumber] == obj) && wordnumber <= wordcount);
|
||||
if (wordtype[wordnumber] == NOUNS) {
|
||||
person = wordvalue[wordnumber];
|
||||
|
@ -338,7 +338,7 @@ give(void)
|
|||
* the same place. */
|
||||
wordnumber = last1 - 1;
|
||||
if (person && testbit(location[position].objects, person)) {
|
||||
if (person == NORMGOD && godready < 2 &&
|
||||
if (person == NORMGOD && godready < 2 &&
|
||||
!(obj == RING || obj == BRACELET))
|
||||
puts("The goddess won't look at you.");
|
||||
else
|
||||
|
@ -348,7 +348,7 @@ give(void)
|
|||
wordnumber = max(last1, last2) + 1;
|
||||
return (0);
|
||||
}
|
||||
if (result != -1 && (testbit(location[position].objects, obj) ||
|
||||
if (result != -1 && (testbit(location[position].objects, obj) ||
|
||||
obj == AMULET || obj == MEDALION || obj == TALISMAN)) {
|
||||
clearbit(location[position].objects, obj);
|
||||
ourtime++;
|
||||
|
@ -366,7 +366,7 @@ give(void)
|
|||
ego += 5;
|
||||
godready += 3;
|
||||
}
|
||||
if (obj == AMULET || obj == MEDALION ||
|
||||
if (obj == AMULET || obj == MEDALION ||
|
||||
obj == TALISMAN) {
|
||||
win++;
|
||||
ego += 5;
|
||||
|
@ -400,7 +400,7 @@ give(void)
|
|||
printf("you want to win this game, ");
|
||||
printf("you're going to have to\n");
|
||||
puts("shoot her!)");
|
||||
clearbit(location[position].objects,
|
||||
clearbit(location[position].objects,
|
||||
MEDALION);
|
||||
wintime = ourtime;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: command6.c,v 1.8 2010/04/24 00:38:30 dholland Exp $ */
|
||||
/* $NetBSD: command6.c,v 1.9 2021/05/02 12:50:43 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
|
@ -34,7 +34,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)com6.c 8.2 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: command6.c,v 1.8 2010/04/24 00:38:30 dholland Exp $");
|
||||
__RCSID("$NetBSD: command6.c,v 1.9 2021/05/02 12:50:43 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -127,7 +127,7 @@ post(int ch)
|
|||
sigprocmask(SIG_BLOCK, &isigset, &osigset);
|
||||
tv = time(NULL);
|
||||
if (score_fp != NULL) {
|
||||
fprintf(score_fp, "%24.24s %8s %c%20s", ctime(&tv), username,
|
||||
fprintf(score_fp, "%24.24s %8s %c%20s", ctime(&tv), username,
|
||||
ch, rate());
|
||||
if (wiz)
|
||||
fprintf(score_fp, " wizard\n");
|
||||
|
@ -206,7 +206,7 @@ ride(void)
|
|||
printf("forward through bush and fern. You are thrown and ");
|
||||
puts("the horse gallops off.");
|
||||
clearbit(location[position].objects, HORSE);
|
||||
while (!(position = rnd(NUMOFROOMS + 1)) || !OUTSIDE ||
|
||||
while (!(position = rnd(NUMOFROOMS + 1)) || !OUTSIDE ||
|
||||
!beenthere[position] || location[position].flyhere)
|
||||
continue;
|
||||
setbit(location[position].objects, HORSE);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: command7.c,v 1.4 2018/02/04 08:48:05 mrg Exp $ */
|
||||
/* $NetBSD: command7.c,v 1.5 2021/05/02 12:50:43 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
|
@ -34,7 +34,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)com7.c 8.2 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: command7.c,v 1.4 2018/02/04 08:48:05 mrg Exp $");
|
||||
__RCSID("$NetBSD: command7.c,v 1.5 2021/05/02 12:50:43 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -71,16 +71,16 @@ fighton:
|
|||
case KILL:
|
||||
case SMITE:
|
||||
if (testbit(inven, TWO_HANDED))
|
||||
hurt = rnd(70) - 2 * card(injuries, NUMOFINJURIES) -
|
||||
hurt = rnd(70) - 2 * card(injuries, NUMOFINJURIES) -
|
||||
ucard(wear) - exhaustion;
|
||||
else if (testbit(inven, SWORD) || testbit(inven, BROAD))
|
||||
hurt = rnd(50) % (WEIGHT - carrying) -
|
||||
card(injuries, NUMOFINJURIES) - encumber -
|
||||
hurt = rnd(50) % (WEIGHT - carrying) -
|
||||
card(injuries, NUMOFINJURIES) - encumber -
|
||||
exhaustion;
|
||||
else if (testbit(inven, KNIFE) || testbit(inven, MALLET) ||
|
||||
testbit(inven, CHAIN) || testbit(inven, MACE) ||
|
||||
else if (testbit(inven, KNIFE) || testbit(inven, MALLET) ||
|
||||
testbit(inven, CHAIN) || testbit(inven, MACE) ||
|
||||
testbit(inven, HALBERD))
|
||||
hurt = rnd(15) - card(injuries, NUMOFINJURIES) -
|
||||
hurt = rnd(15) - card(injuries, NUMOFINJURIES) -
|
||||
exhaustion;
|
||||
else
|
||||
hurt = rnd(7) - encumber;
|
||||
|
@ -130,7 +130,7 @@ fighton:
|
|||
} else if (hurt < 30) {
|
||||
switch (rnd(3)) {
|
||||
case 0:
|
||||
printf("A bloody gash opens up on his %s ",
|
||||
printf("A bloody gash opens up on his %s ",
|
||||
(rnd(2) ? "left" : "right"));
|
||||
printf("side.\n");
|
||||
break;
|
||||
|
@ -195,7 +195,7 @@ fighton:
|
|||
puts("pummels your face.");
|
||||
if (testbit(inven, AMULET) || testbit(wear, AMULET)) {
|
||||
printf("Lifting the amulet from you, ");
|
||||
if (testbit(inven, MEDALION) ||
|
||||
if (testbit(inven, MEDALION) ||
|
||||
testbit(wear, MEDALION)) {
|
||||
printf("his power grows and the ");
|
||||
printf("walls of\nthe earth ");
|
||||
|
@ -244,7 +244,7 @@ fighton:
|
|||
case SHOOT:
|
||||
if (testbit(inven, LASER)) {
|
||||
if (strength - lifeline <= 50) {
|
||||
printf("The %s took a direct hit!\n",
|
||||
printf("The %s took a direct hit!\n",
|
||||
objsht[enemy]);
|
||||
lifeline += 50;
|
||||
} else {
|
||||
|
@ -284,9 +284,9 @@ fighton:
|
|||
}
|
||||
puts("He attacks...");
|
||||
/* Some embellishments. */
|
||||
hurt = rnd(NUMOFINJURIES) - (testbit(inven, SHIELD) != 0) -
|
||||
hurt = rnd(NUMOFINJURIES) - (testbit(inven, SHIELD) != 0) -
|
||||
(testbit(wear, MAIL) != 0) - (testbit(wear, HELM) != 0);
|
||||
hurt += (testbit(wear, AMULET) != 0) +
|
||||
hurt += (testbit(wear, AMULET) != 0) +
|
||||
(testbit(wear, MEDALION) != 0) + (testbit(wear, TALISMAN) != 0);
|
||||
hurt = hurt < 0 ? 0 : hurt;
|
||||
hurt = hurt >= NUMOFINJURIES ? NUMOFINJURIES - 1 : hurt;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cypher.c,v 1.23 2005/07/01 06:04:54 jmc Exp $ */
|
||||
/* $NetBSD: cypher.c,v 1.24 2021/05/02 12:50:43 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
|
@ -34,7 +34,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)cypher.c 8.2 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: cypher.c,v 1.23 2005/07/01 06:04:54 jmc Exp $");
|
||||
__RCSID("$NetBSD: cypher.c,v 1.24 2021/05/02 12:50:43 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -52,10 +52,10 @@ cypher(void)
|
|||
|
||||
while (wordnumber <= wordcount) {
|
||||
if (wordtype[wordnumber] != VERB &&
|
||||
!(wordtype[wordnumber] == OBJECT &&
|
||||
!(wordtype[wordnumber] == OBJECT &&
|
||||
wordvalue[wordnumber] == KNIFE)) {
|
||||
printf("%s: How's that?\n",
|
||||
(wordnumber == wordcount) ? words[0] :
|
||||
(wordnumber == wordcount) ? words[0] :
|
||||
words[wordnumber]);
|
||||
return (-1);
|
||||
}
|
||||
|
@ -116,7 +116,7 @@ cypher(void)
|
|||
break;
|
||||
|
||||
case SHOOT:
|
||||
if (wordnumber < wordcount &&
|
||||
if (wordnumber < wordcount &&
|
||||
wordvalue[wordnumber + 1] == EVERYTHING) {
|
||||
int things;
|
||||
things = 0;
|
||||
|
@ -136,7 +136,7 @@ cypher(void)
|
|||
break;
|
||||
|
||||
case TAKE:
|
||||
if (wordnumber < wordcount &&
|
||||
if (wordnumber < wordcount &&
|
||||
wordvalue[wordnumber + 1] == EVERYTHING) {
|
||||
int things;
|
||||
things = 0;
|
||||
|
@ -187,7 +187,7 @@ cypher(void)
|
|||
break;
|
||||
|
||||
case DROP:
|
||||
if (wordnumber < wordcount &&
|
||||
if (wordnumber < wordcount &&
|
||||
wordvalue[wordnumber + 1] == EVERYTHING) {
|
||||
int things;
|
||||
things = 0;
|
||||
|
@ -207,7 +207,7 @@ cypher(void)
|
|||
|
||||
case KICK:
|
||||
case THROW:
|
||||
if (wordnumber < wordcount &&
|
||||
if (wordnumber < wordcount &&
|
||||
wordvalue[wordnumber + 1] == EVERYTHING) {
|
||||
int things, wv;
|
||||
things = 0;
|
||||
|
@ -221,15 +221,15 @@ cypher(void)
|
|||
}
|
||||
wordnumber += 2;
|
||||
if (!things)
|
||||
printf("Nothing to %s!\n",
|
||||
printf("Nothing to %s!\n",
|
||||
wv == KICK ? "kick" : "throw");
|
||||
} else
|
||||
throw(wordvalue[wordnumber] ==
|
||||
throw(wordvalue[wordnumber] ==
|
||||
KICK ? "Kicked" : "Thrown");
|
||||
break;
|
||||
|
||||
case TAKEOFF:
|
||||
if (wordnumber < wordcount &&
|
||||
if (wordnumber < wordcount &&
|
||||
wordvalue[wordnumber + 1] == EVERYTHING) {
|
||||
int things;
|
||||
things = 0;
|
||||
|
@ -247,7 +247,7 @@ cypher(void)
|
|||
break;
|
||||
|
||||
case DRAW:
|
||||
if (wordnumber < wordcount &&
|
||||
if (wordnumber < wordcount &&
|
||||
wordvalue[wordnumber + 1] == EVERYTHING) {
|
||||
int things;
|
||||
things = 0;
|
||||
|
@ -265,7 +265,7 @@ cypher(void)
|
|||
break;
|
||||
|
||||
case PUTON:
|
||||
if (wordnumber < wordcount &&
|
||||
if (wordnumber < wordcount &&
|
||||
wordvalue[wordnumber + 1] == EVERYTHING) {
|
||||
int things;
|
||||
things = 0;
|
||||
|
@ -284,7 +284,7 @@ cypher(void)
|
|||
break;
|
||||
|
||||
case WEARIT:
|
||||
if (wordnumber < wordcount &&
|
||||
if (wordnumber < wordcount &&
|
||||
wordvalue[wordnumber + 1] == EVERYTHING) {
|
||||
int things;
|
||||
things = 0;
|
||||
|
@ -302,7 +302,7 @@ cypher(void)
|
|||
break;
|
||||
|
||||
case EAT:
|
||||
if (wordnumber < wordcount &&
|
||||
if (wordnumber < wordcount &&
|
||||
wordvalue[wordnumber + 1] == EVERYTHING) {
|
||||
int things;
|
||||
things = 0;
|
||||
|
@ -334,8 +334,8 @@ cypher(void)
|
|||
carrying,
|
||||
(carrying == 1 ? "." : "s."));
|
||||
printf(" (can't lift any weight%s)\n",
|
||||
(carrying ?
|
||||
" or move with what you have" :
|
||||
(carrying ?
|
||||
" or move with what you have" :
|
||||
""));
|
||||
} else
|
||||
printf("\n= %d kilogram%s (%d%%)\n",
|
||||
|
@ -364,7 +364,7 @@ cypher(void)
|
|||
if (injuries[n])
|
||||
printf("\t%s\n", ouch[n]);
|
||||
printf("\nYou can still carry up to ");
|
||||
printf("%d kilogram%s\n", WEIGHT,
|
||||
printf("%d kilogram%s\n", WEIGHT,
|
||||
(WEIGHT == 1 ? "." : "s."));
|
||||
} else
|
||||
puts("\nYou are in perfect health.");
|
||||
|
@ -376,7 +376,7 @@ cypher(void)
|
|||
break;
|
||||
|
||||
case OPEN:
|
||||
if (wordnumber < wordcount &&
|
||||
if (wordnumber < wordcount &&
|
||||
wordvalue[wordnumber + 1] == EVERYTHING) {
|
||||
int things;
|
||||
things = 0;
|
||||
|
@ -459,7 +459,7 @@ cypher(void)
|
|||
printf("%s in %d turns.\n", rate(), ourtime);
|
||||
printf("You have visited %d out of %d rooms ",
|
||||
card(beenthere, NUMOFROOMS), NUMOFROOMS);
|
||||
printf("this run (%d%%).\n",
|
||||
printf("this run (%d%%).\n",
|
||||
card(beenthere, NUMOFROOMS) * 100 / NUMOFROOMS);
|
||||
break;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: fly.c,v 1.15 2012/10/13 19:58:53 dholland Exp $ */
|
||||
/* $NetBSD: fly.c,v 1.16 2021/05/02 12:50:43 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
|
@ -34,7 +34,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)fly.c 8.2 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: fly.c,v 1.15 2012/10/13 19:58:53 dholland Exp $");
|
||||
__RCSID("$NetBSD: fly.c,v 1.16 2021/05/02 12:50:43 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -151,7 +151,7 @@ visual(void)
|
|||
if (torps) {
|
||||
torps -= 2;
|
||||
blast();
|
||||
if (row == MIDR && column < MIDC + 2 &&
|
||||
if (row == MIDR && column < MIDC + 2 &&
|
||||
column > MIDC - 2) {
|
||||
destroyed = 1;
|
||||
alarm(0);
|
||||
|
@ -265,7 +265,7 @@ moveenemy(int dummy __unused)
|
|||
fuel = 0;
|
||||
mvaddstr(0, 60, "*** Out of fuel ***");
|
||||
}
|
||||
d = (double) ((row - MIDR) * (row - MIDR) + (column - MIDC) *
|
||||
d = (double) ((row - MIDR) * (row - MIDR) + (column - MIDC) *
|
||||
(column - MIDC));
|
||||
if (d < 16) {
|
||||
row += (rnd(9) - 4) % (4 - abs(row - MIDR));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: getcom.c,v 1.14 2012/01/16 17:38:16 christos Exp $ */
|
||||
/* $NetBSD: getcom.c,v 1.15 2021/05/02 12:50:43 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
|
@ -34,7 +34,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)getcom.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: getcom.c,v 1.14 2012/01/16 17:38:16 christos Exp $");
|
||||
__RCSID("$NetBSD: getcom.c,v 1.15 2021/05/02 12:50:43 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -85,11 +85,11 @@ getword(char *buf1, char *buf2, int flag)
|
|||
*buf2 = 0;
|
||||
return (0);
|
||||
}
|
||||
while (cnt < WORDLEN && *buf1 &&
|
||||
while (cnt < WORDLEN && *buf1 &&
|
||||
!isspace((unsigned char)*buf1) && *buf1 != ',')
|
||||
if (flag < 0) {
|
||||
if (isupper((unsigned char)*buf1)) {
|
||||
*buf2++ =
|
||||
*buf2++ =
|
||||
tolower((unsigned char)*buf1++);
|
||||
cnt++;
|
||||
} else {
|
||||
|
@ -98,7 +98,7 @@ getword(char *buf1, char *buf2, int flag)
|
|||
}
|
||||
} else if (flag > 0) {
|
||||
if (islower((unsigned char)*buf1)) {
|
||||
*buf2++ =
|
||||
*buf2++ =
|
||||
toupper((unsigned char)*buf1++);
|
||||
cnt++;
|
||||
} else {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: parse.c,v 1.17 2020/02/06 22:09:43 fox Exp $ */
|
||||
/* $NetBSD: parse.c,v 1.18 2021/05/02 12:50:43 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
|
@ -34,7 +34,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)parse.c 8.2 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: parse.c,v 1.17 2020/02/06 22:09:43 fox Exp $");
|
||||
__RCSID("$NetBSD: parse.c,v 1.18 2021/05/02 12:50:43 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -154,9 +154,9 @@ parse(void)
|
|||
while (flag) {
|
||||
flag = 0;
|
||||
for (n = 1; n < wordcount; n++)
|
||||
if ((wordtype[n - 1] == NOUNS ||
|
||||
if ((wordtype[n - 1] == NOUNS ||
|
||||
wordtype[n - 1] == OBJECT) &&
|
||||
wordvalue[n] == AND &&
|
||||
wordvalue[n] == AND &&
|
||||
wordvalue[n + 1] == EVERYTHING) {
|
||||
char tmpword[WORDLEN];
|
||||
wordvalue[n + 1] = wordvalue[n - 1];
|
||||
|
@ -171,7 +171,7 @@ parse(void)
|
|||
/* And trim EVERYTHING AND EVERYTHING. */
|
||||
for (n = 1; n < wordcount; n++)
|
||||
if (wordvalue[n - 1] == EVERYTHING &&
|
||||
wordvalue[n] == AND &&
|
||||
wordvalue[n] == AND &&
|
||||
wordvalue[n + 1] == EVERYTHING) {
|
||||
int i;
|
||||
for (i = n + 1; i < wordcount; i++) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: room.c,v 1.14 2019/10/05 23:34:14 mrg Exp $ */
|
||||
/* $NetBSD: room.c,v 1.15 2021/05/02 12:50:43 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
|
@ -34,7 +34,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)room.c 8.2 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: room.c,v 1.14 2019/10/05 23:34:14 mrg Exp $");
|
||||
__RCSID("$NetBSD: room.c,v 1.15 2021/05/02 12:50:43 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -174,7 +174,7 @@ truedirec(int way, int option)
|
|||
break;
|
||||
}
|
||||
|
||||
printf("Error: room %d. More than four directions wanted.",
|
||||
printf("Error: room %d. More than four directions wanted.",
|
||||
position);
|
||||
return ("!!");
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: extern.h,v 1.11 2009/08/12 05:29:40 dholland Exp $ */
|
||||
/* $NetBSD: extern.h,v 1.12 2021/05/02 12:50:43 rillig Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993
|
||||
|
@ -50,7 +50,7 @@ char *nextword(FILE *);
|
|||
FILE *opendict(const char *);
|
||||
void prompt(const char *);
|
||||
void prtable(const char *const [],
|
||||
int, int, int, void (*)(const char *const [], int),
|
||||
int, int, int, void (*)(const char *const [], int),
|
||||
int (*)(const char *const [], int));
|
||||
void redraw(void);
|
||||
void results(void);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mach.c,v 1.21 2011/08/31 16:24:55 plunky Exp $ */
|
||||
/* $NetBSD: mach.c,v 1.22 2021/05/02 12:50:43 rillig Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993
|
||||
|
@ -37,7 +37,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)mach.c 8.1 (Berkeley) 6/11/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: mach.c,v 1.21 2011/08/31 16:24:55 plunky Exp $");
|
||||
__RCSID("$NetBSD: mach.c,v 1.22 2021/05/02 12:50:43 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -141,7 +141,7 @@ results(void)
|
|||
|
||||
denom1 = npwords + nmwords;
|
||||
denom2 = tnpwords + tnmwords;
|
||||
|
||||
|
||||
move(SCORE_LINE, SCORE_COL);
|
||||
printw("Percentage: %0.2f%% (%0.2f%% over %d game%s)\n",
|
||||
denom1 ? (100.0 * npwords) / (double) (npwords + nmwords) : 0.0,
|
||||
|
@ -441,7 +441,7 @@ findword(void)
|
|||
if (board[wordpath[i]] == 'q')
|
||||
printw("Qu");
|
||||
else
|
||||
printw("%c",
|
||||
printw("%c",
|
||||
toupper((unsigned char)board[wordpath[i]]));
|
||||
move(r, c);
|
||||
refresh();
|
||||
|
@ -457,7 +457,7 @@ findword(void)
|
|||
if (board[wordpath[i]] == 'q')
|
||||
printw("Qu");
|
||||
else
|
||||
printw("%c",
|
||||
printw("%c",
|
||||
toupper((unsigned char)board[wordpath[i]]));
|
||||
}
|
||||
move(r, c);
|
||||
|
@ -597,7 +597,7 @@ stop_catcher(int signo __unused)
|
|||
sigprocmask(SIG_SETMASK, &osigset, (sigset_t *)0);
|
||||
signal(SIGTSTP, stop_catcher);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
cont_catcher(int signo __unused)
|
||||
{
|
||||
|
@ -608,7 +608,7 @@ cont_catcher(int signo __unused)
|
|||
refresh();
|
||||
starttime();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* The signal is caught but nothing is done about it...
|
||||
* It would mean reformatting the entire display
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: prtable.c,v 1.10 2013/10/19 17:23:08 christos Exp $ */
|
||||
/* $NetBSD: prtable.c,v 1.11 2021/05/02 12:50:43 rillig Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993
|
||||
|
@ -36,7 +36,7 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: prtable.c,v 1.10 2013/10/19 17:23:08 christos Exp $");
|
||||
__RCSID("$NetBSD: prtable.c,v 1.11 2021/05/02 12:50:43 rillig Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <curses.h>
|
||||
|
@ -57,14 +57,14 @@ static int get_maxlen(const char *const [], int, int (*)(const char *const *, in
|
|||
* width - max line width if not zero
|
||||
* prentry - address of the routine to call to print the string
|
||||
* length - address of the routine to call to determine the length
|
||||
* of string to be printed
|
||||
* of string to be printed
|
||||
*
|
||||
* prtable and length are called with the address of the base and
|
||||
* an index
|
||||
*/
|
||||
void
|
||||
prtable(const char *const base[], int num, int d_cols, int width,
|
||||
void (*prentry)(const char *const [], int),
|
||||
prtable(const char *const base[], int num, int d_cols, int width,
|
||||
void (*prentry)(const char *const [], int),
|
||||
int (*length)(const char *const [], int))
|
||||
{
|
||||
int c, j;
|
||||
|
@ -113,7 +113,7 @@ prtable(const char *const base[], int num, int d_cols, int width,
|
|||
}
|
||||
|
||||
static int
|
||||
get_maxlen(const char *const base[], int num,
|
||||
get_maxlen(const char *const base[], int num,
|
||||
int (*length)(const char *const *, int))
|
||||
{
|
||||
int i, len, max;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: word.c,v 1.9 2006/03/18 09:40:46 rtr Exp $ */
|
||||
/* $NetBSD: word.c,v 1.10 2021/05/02 12:50:43 rillig Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993
|
||||
|
@ -37,7 +37,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)word.c 8.1 (Berkeley) 6/11/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: word.c,v 1.9 2006/03/18 09:40:46 rtr Exp $");
|
||||
__RCSID("$NetBSD: word.c,v 1.10 2021/05/02 12:50:43 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -74,7 +74,7 @@ nextword(FILE *fp)
|
|||
if (fp == NULL) {
|
||||
if (sp == dictend)
|
||||
return (NULL);
|
||||
|
||||
|
||||
p = buf + (int) *sp++;
|
||||
|
||||
/*
|
||||
|
@ -92,7 +92,7 @@ nextword(FILE *fp)
|
|||
return (NULL);
|
||||
|
||||
p = buf + pcount;
|
||||
|
||||
|
||||
while ((ch = getc(fp)) != EOF && ch >= 'a')
|
||||
if ((*p++ = ch) == 'q')
|
||||
*p++ = 'u';
|
||||
|
@ -102,7 +102,7 @@ nextword(FILE *fp)
|
|||
*p = '\0';
|
||||
return (buf);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Reset the state of nextword() and do the fseek()
|
||||
*/
|
||||
|
@ -184,7 +184,7 @@ loadindex(const char *indexfile)
|
|||
int i, j;
|
||||
char buf[BUFSIZ];
|
||||
FILE *fp;
|
||||
|
||||
|
||||
if ((fp = fopen(indexfile, "r")) == NULL) {
|
||||
warn("Can't open '%s'", indexfile);
|
||||
return (-1);
|
||||
|
@ -212,4 +212,4 @@ loadindex(const char *indexfile)
|
|||
return(-1);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mkdict.c,v 1.11 2005/07/01 16:38:24 jmc Exp $ */
|
||||
/* $NetBSD: mkdict.c,v 1.12 2021/05/02 12:50:44 rillig Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993
|
||||
|
@ -39,8 +39,8 @@ static const char copyright[] =
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)mkdict.c 8.1 (Berkeley) 6/11/93";
|
||||
#else
|
||||
static const char rcsid[] =
|
||||
"$NetBSD: mkdict.c,v 1.11 2005/07/01 16:38:24 jmc Exp $";
|
||||
static const char rcsid[] =
|
||||
"$NetBSD: mkdict.c,v 1.12 2021/05/02 12:50:44 rillig Exp $";
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mkindex.c,v 1.11 2009/08/12 05:29:40 dholland Exp $ */
|
||||
/* $NetBSD: mkindex.c,v 1.12 2021/05/02 12:50:44 rillig Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993
|
||||
|
@ -40,7 +40,7 @@ static char copyright[] = "@(#) Copyright (c) 1993\n\
|
|||
static char sccsid[] = "@(#)mkindex.c 8.1 (Berkeley) 6/11/93";
|
||||
#else
|
||||
static char rcsid[] =
|
||||
"$NetBSD: mkindex.c,v 1.11 2009/08/12 05:29:40 dholland Exp $";
|
||||
"$NetBSD: mkindex.c,v 1.12 2021/05/02 12:50:44 rillig Exp $";
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -112,7 +112,7 @@ nextword(FILE *fp, char *buffer, int *clen, int *rlen)
|
|||
return (NULL);
|
||||
|
||||
p = buf + (*clen = pcount);
|
||||
|
||||
|
||||
while ((ch = getc(fp)) != EOF && ch >= 'a')
|
||||
*p++ = ch;
|
||||
lastch = ch;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: canfield.c,v 1.30 2014/03/22 23:47:03 dholland Exp $ */
|
||||
/* $NetBSD: canfield.c,v 1.31 2021/05/02 12:50:44 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
|
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)canfield.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: canfield.c,v 1.30 2014/03/22 23:47:03 dholland Exp $");
|
||||
__RCSID("$NetBSD: canfield.c,v 1.31 2021/05/02 12:50:44 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -182,7 +182,7 @@ static uid_t uid;
|
|||
#define maxtimecharge 3
|
||||
#define valuepercardup 5
|
||||
/*
|
||||
* Variables associated with betting
|
||||
* Variables associated with betting
|
||||
*/
|
||||
static struct betinfo this, game, total;
|
||||
static bool startedgame = FALSE, infullgame = FALSE;
|
||||
|
@ -614,7 +614,7 @@ printcard(int a, int b, const struct cardtype *cp)
|
|||
}
|
||||
|
||||
/*
|
||||
* procedure to move the top card from one location to the top
|
||||
* procedure to move the top card from one location to the top
|
||||
* of another location. The pointers always point to the top
|
||||
* of the piles.
|
||||
*/
|
||||
|
@ -622,7 +622,7 @@ static void
|
|||
transit(struct cardtype **source, struct cardtype **dest)
|
||||
{
|
||||
struct cardtype *temp;
|
||||
|
||||
|
||||
temp = *source;
|
||||
*source = (*source)->next;
|
||||
temp->next = *dest;
|
||||
|
@ -670,7 +670,7 @@ fndbase(struct cardtype **cp, int column, int row)
|
|||
game.wins += valuepercardup;
|
||||
total.wins += valuepercardup;
|
||||
}
|
||||
} else
|
||||
} else
|
||||
nomore = TRUE;
|
||||
} while (nomore == FALSE);
|
||||
}
|
||||
|
@ -812,7 +812,7 @@ notempty(const struct cardtype *cp)
|
|||
move(msgrow, msgcol);
|
||||
printw("Error: no cards to move");
|
||||
return (FALSE);
|
||||
} else
|
||||
} else
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
|
@ -822,14 +822,14 @@ notempty(const struct cardtype *cp)
|
|||
static bool
|
||||
ranklower(const struct cardtype *cp1, const struct cardtype *cp2)
|
||||
{
|
||||
if (cp2->rank == Ace)
|
||||
if (cp2->rank == Ace)
|
||||
if (cp1->rank == King)
|
||||
return (TRUE);
|
||||
else
|
||||
else
|
||||
return (FALSE);
|
||||
else if (cp1->rank + 1 == cp2->rank)
|
||||
return (TRUE);
|
||||
else
|
||||
else
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
|
@ -841,7 +841,7 @@ diffcolor(const struct cardtype *cp1, const struct cardtype *cp2)
|
|||
{
|
||||
if (cp1->color == cp2->color)
|
||||
return (FALSE);
|
||||
else
|
||||
else
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
|
@ -854,15 +854,15 @@ tabok(const struct cardtype *cp, int des)
|
|||
if ((cp == stock) && (tableau[des] == NIL))
|
||||
return (TRUE);
|
||||
else if (tableau[des] == NIL)
|
||||
if (stock == NIL &&
|
||||
cp != bottom[0] && cp != bottom[1] &&
|
||||
if (stock == NIL &&
|
||||
cp != bottom[0] && cp != bottom[1] &&
|
||||
cp != bottom[2] && cp != bottom[3])
|
||||
return (TRUE);
|
||||
else
|
||||
else
|
||||
return (FALSE);
|
||||
else if (ranklower(cp, tableau[des]) && diffcolor(cp, tableau[des]))
|
||||
return (TRUE);
|
||||
else
|
||||
else
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
|
@ -1187,7 +1187,7 @@ simpletableau(struct cardtype **cp, int des)
|
|||
usedtalon();
|
||||
printcard(taloncol, talonrow, talon);
|
||||
}
|
||||
} else
|
||||
} else
|
||||
destinerror();
|
||||
}
|
||||
}
|
||||
|
@ -1207,7 +1207,7 @@ tabprint(int sour, int des)
|
|||
slength = length[sour];
|
||||
if (slength == tabrow)
|
||||
printcard(pilemap[des], dlength, tableau[sour]);
|
||||
else
|
||||
else
|
||||
while (slength != tabrow - 1) {
|
||||
tempcard = tableau[sour];
|
||||
for (i=1; i<=slength-tabrow; i++)
|
||||
|
@ -1236,11 +1236,11 @@ tabtotab(int sour, int des)
|
|||
temp->next = tableau[des];
|
||||
tableau[des] = tableau[sour];
|
||||
tableau[sour] = NIL;
|
||||
length[des] = length[des] +
|
||||
length[des] = length[des] +
|
||||
(length[sour] - (tabrow - 1));
|
||||
length[sour] = tabrow - 1;
|
||||
timesthru = 0;
|
||||
} else
|
||||
} else
|
||||
destinerror();
|
||||
}
|
||||
}
|
||||
|
@ -1254,11 +1254,11 @@ rankhigher(const struct cardtype *cp, int let)
|
|||
if (found[let]->rank == King)
|
||||
if (cp->rank == Ace)
|
||||
return(TRUE);
|
||||
else
|
||||
else
|
||||
return(FALSE);
|
||||
else if (cp->rank - 1 == found[let]->rank)
|
||||
return(TRUE);
|
||||
else
|
||||
else
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
|
@ -1270,7 +1270,7 @@ samesuit(const struct cardtype *cp, int let)
|
|||
{
|
||||
if (cp->suit == found[let]->suit)
|
||||
return (TRUE);
|
||||
else
|
||||
else
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
|
@ -1299,14 +1299,14 @@ movetofound(struct cardtype **cp, int source)
|
|||
timesthru = 0;
|
||||
if (mtforigin == stk) {
|
||||
usedstock();
|
||||
printcard(stockcol, stockrow,
|
||||
printcard(stockcol, stockrow,
|
||||
stock);
|
||||
} else if (mtforigin == tal) {
|
||||
usedtalon();
|
||||
printcard(taloncol, talonrow,
|
||||
printcard(taloncol, talonrow,
|
||||
talon);
|
||||
} else {
|
||||
removecard(pilemap[source],
|
||||
removecard(pilemap[source],
|
||||
length[source]);
|
||||
length[source]--;
|
||||
}
|
||||
|
@ -1319,7 +1319,7 @@ movetofound(struct cardtype **cp, int source)
|
|||
mtfdone = TRUE;
|
||||
} else
|
||||
tempbase++;
|
||||
else
|
||||
else
|
||||
tempbase++;
|
||||
} while ((tempbase != 4) && !mtfdone);
|
||||
if (!mtfdone)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: score.c,v 1.17 2019/02/03 10:48:46 mrg Exp $ */
|
||||
/* $NetBSD: score.c,v 1.18 2021/05/02 12:50:44 rillig Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1980, 1993
|
||||
|
@ -34,7 +34,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)score.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: score.c,v 1.17 2019/02/03 10:48:46 mrg Exp $");
|
||||
__RCSID("$NetBSD: score.c,v 1.18 2021/05/02 12:50:44 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -108,7 +108,7 @@ static int pairpoints, runpoints; /* Globals from pairuns. */
|
|||
* n must be <= 4
|
||||
*/
|
||||
int
|
||||
scorehand(const CARD hand[], CARD starter, int n, BOOLEAN crb,
|
||||
scorehand(const CARD hand[], CARD starter, int n, BOOLEAN crb,
|
||||
BOOLEAN do_explain)
|
||||
{
|
||||
int i, k;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: random.h,v 1.3 2008/04/28 20:22:54 martin Exp $ */
|
||||
/* $NetBSD: random.h,v 1.4 2021/05/02 12:50:44 rillig Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
||||
|
@ -30,7 +30,7 @@
|
|||
*/
|
||||
|
||||
/*
|
||||
* random.h: Randomizer; returns a random sequence of values from [0..fx)
|
||||
* random.h: Randomizer; returns a random sequence of values from [0..fx)
|
||||
* returning each value exactly once. After fx calls it returns fx.
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dm.c,v 1.29 2009/08/27 00:22:28 dholland Exp $ */
|
||||
/* $NetBSD: dm.c,v 1.30 2021/05/02 12:50:44 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1987, 1993
|
||||
|
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1987, 1993\
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)dm.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: dm.c,v 1.29 2009/08/27 00:22:28 dholland Exp $");
|
||||
__RCSID("$NetBSD: dm.c,v 1.30 2021/05/02 12:50:44 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -172,7 +172,7 @@ c_day(const char *s_day, const char *s_start, const char *s_stop)
|
|||
ct = localtime(&now);
|
||||
if (strcasecmp(s_day, days[ct->tm_wday]))
|
||||
return;
|
||||
if (!isdigit((unsigned char)*s_start) ||
|
||||
if (!isdigit((unsigned char)*s_start) ||
|
||||
!isdigit((unsigned char)*s_stop))
|
||||
return;
|
||||
start = atoi(s_start);
|
||||
|
@ -210,7 +210,7 @@ c_tty(const char *tty)
|
|||
* see if game can be played now.
|
||||
*/
|
||||
static void
|
||||
c_game(const char *s_game, const char *s_load, const char *s_users,
|
||||
c_game(const char *s_game, const char *s_load, const char *s_users,
|
||||
const char *s_priority)
|
||||
{
|
||||
static int found;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: strfile.c,v 1.42 2020/07/26 15:14:09 nia Exp $ */
|
||||
/* $NetBSD: strfile.c,v 1.43 2021/05/02 12:50:44 rillig Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1989, 1993
|
||||
|
@ -47,7 +47,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)strfile.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: strfile.c,v 1.42 2020/07/26 15:14:09 nia Exp $");
|
||||
__RCSID("$NetBSD: strfile.c,v 1.43 2021/05/02 12:50:44 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
#endif /* __NetBSD__ */
|
||||
|
@ -84,7 +84,7 @@ __RCSID("$NetBSD: strfile.c,v 1.42 2020/07/26 15:14:09 nia Exp $");
|
|||
* s - Silent. Give no summary of data processed at the end of
|
||||
* the run.
|
||||
* o - order the strings in alphabetic order
|
||||
* i - if ordering, ignore case
|
||||
* i - if ordering, ignore case
|
||||
* r - randomize the order of the strings
|
||||
* x - set rotated bit
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: bdisp.c,v 1.17 2014/03/22 18:58:57 dholland Exp $ */
|
||||
/* $NetBSD: bdisp.c,v 1.18 2021/05/02 12:50:44 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994
|
||||
|
@ -37,7 +37,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)bdisp.c 8.2 (Berkeley) 5/3/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: bdisp.c,v 1.17 2014/03/22 18:58:57 dholland Exp $");
|
||||
__RCSID("$NetBSD: bdisp.c,v 1.18 2021/05/02 12:50:44 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -336,7 +336,7 @@ get_coord(void)
|
|||
nx = curx;
|
||||
ny = cury;
|
||||
for (;;) {
|
||||
mvprintw(BSZ3, (BSZ -6)/2, "(%c %d) ",
|
||||
mvprintw(BSZ3, (BSZ -6)/2, "(%c %d) ",
|
||||
'A'+ ((curx > 7) ? (curx+1) : curx), cury + 1);
|
||||
BGOTO(cury, curx);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: main.c,v 1.27 2016/06/12 02:15:26 dholland Exp $ */
|
||||
/* $NetBSD: main.c,v 1.28 2021/05/02 12:50:44 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994
|
||||
|
@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1994\
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)main.c 8.4 (Berkeley) 5/4/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: main.c,v 1.27 2016/06/12 02:15:26 dholland Exp $");
|
||||
__RCSID("$NetBSD: main.c,v 1.28 2021/05/02 12:50:44 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -322,7 +322,7 @@ again:
|
|||
if (i != RESIGN) {
|
||||
replay:
|
||||
ask("Play again? ");
|
||||
ch = get_key("YyNnQqSs");
|
||||
ch = get_key("YyNnQqSs");
|
||||
if (ch == 'Y' || ch == 'y')
|
||||
goto again;
|
||||
if (ch == 'S') {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: stoc.c,v 1.12 2009/08/12 06:19:17 dholland Exp $ */
|
||||
/* $NetBSD: stoc.c,v 1.13 2021/05/02 12:50:44 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994
|
||||
|
@ -37,7 +37,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)stoc.c 8.1 (Berkeley) 7/24/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: stoc.c,v 1.12 2009/08/12 06:19:17 dholland Exp $");
|
||||
__RCSID("$NetBSD: stoc.c,v 1.13 2021/05/02 12:50:44 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -53,7 +53,7 @@ struct mvstr {
|
|||
const char *m_text;
|
||||
};
|
||||
static const struct mvstr mv[] = {
|
||||
{ RESIGN, "resign" },
|
||||
{ RESIGN, "resign" },
|
||||
{ RESIGN, "quit" },
|
||||
{ SAVE, "save" },
|
||||
{ -1, 0 }
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: config.h,v 1.10 2011/08/06 19:53:24 dholland Exp $ */
|
||||
/* $NetBSD: config.h,v 1.11 2021/05/02 12:50:44 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
|
||||
|
@ -113,7 +113,7 @@
|
|||
*/
|
||||
/* #define MAIL */
|
||||
#define DEF_MAILREADER _PATH_MAIL /* or e.g. /bin/mail */
|
||||
#define MAILCKFREQ 100
|
||||
#define MAILCKFREQ 100
|
||||
|
||||
|
||||
#define SHELL /* do not delete the '!' command */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: extern.h,v 1.18 2011/08/27 23:42:33 joerg Exp $ */
|
||||
/* $NetBSD: extern.h,v 1.19 2021/05/02 12:50:44 rillig Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
|
@ -178,7 +178,7 @@ struct trap *t_at(int, int);
|
|||
struct gold *g_at(int, int);
|
||||
struct obj *getobj(const char *, const char *);
|
||||
int ggetobj(const char *, int (*fn)(struct obj *), int);
|
||||
int askchain(struct obj *, char *, int, int (*)(struct obj *),
|
||||
int askchain(struct obj *, char *, int, int (*)(struct obj *),
|
||||
int (*)(struct obj *), int);
|
||||
void prinv(struct obj *);
|
||||
int ddoinv(void);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hack.c,v 1.11 2011/08/07 06:03:45 dholland Exp $ */
|
||||
/* $NetBSD: hack.c,v 1.12 2021/05/02 12:50:44 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
|
||||
|
@ -63,7 +63,7 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: hack.c,v 1.11 2011/08/07 06:03:45 dholland Exp $");
|
||||
__RCSID("$NetBSD: hack.c,v 1.12 2021/05/02 12:50:44 rillig Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include "hack.h"
|
||||
|
@ -877,7 +877,7 @@ dbon(void)
|
|||
/* may kill you; cause may be poison or */
|
||||
/* monster like 'A' */
|
||||
void
|
||||
losestr(int num)
|
||||
losestr(int num)
|
||||
{
|
||||
u.ustr -= num;
|
||||
while (u.ustr < 3) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hack.terminfo.c,v 1.2 2011/10/03 12:32:28 roy Exp $ */
|
||||
/* $NetBSD: hack.terminfo.c,v 1.3 2021/05/02 12:50:44 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
|
||||
|
@ -63,7 +63,7 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: hack.terminfo.c,v 1.2 2011/10/03 12:32:28 roy Exp $");
|
||||
__RCSID("$NetBSD: hack.terminfo.c,v 1.3 2021/05/02 12:50:44 rillig Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <string.h>
|
||||
|
@ -124,7 +124,7 @@ xputs(const char *s)
|
|||
static void
|
||||
cmov(int x, int y)
|
||||
{
|
||||
char *p;
|
||||
char *p;
|
||||
|
||||
p = tiparm(cursor_address, y - 1, x - 1);
|
||||
if (p) {
|
||||
|
@ -243,7 +243,7 @@ void
|
|||
home(void)
|
||||
{
|
||||
char *out;
|
||||
|
||||
|
||||
if (cursor_home)
|
||||
xputs(cursor_home);
|
||||
else if ((cursor_address) && (out = tiparm(cursor_address, 0, 0)))
|
||||
|
@ -287,7 +287,7 @@ sound_bell(void)
|
|||
void
|
||||
delay_output(void)
|
||||
{
|
||||
|
||||
|
||||
/* delay 50 ms - could also use a 'nap'-system call */
|
||||
/* or the usleep call like this :-) */
|
||||
usleep(50000);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hack.zap.c,v 1.9 2009/08/12 07:28:41 dholland Exp $ */
|
||||
/* $NetBSD: hack.zap.c,v 1.10 2021/05/02 12:50:44 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
|
||||
|
@ -63,7 +63,7 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: hack.zap.c,v 1.9 2009/08/12 07:28:41 dholland Exp $");
|
||||
__RCSID("$NetBSD: hack.zap.c,v 1.10 2021/05/02 12:50:44 rillig Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include "hack.h"
|
||||
|
@ -723,7 +723,7 @@ rloco(struct obj *obj)
|
|||
/* fractured by pick-axe or wand of striking */
|
||||
/* no texts here! */
|
||||
void
|
||||
fracture_rock(struct obj *obj)
|
||||
fracture_rock(struct obj *obj)
|
||||
{
|
||||
/* unpobj(obj); */
|
||||
obj->otyp = ROCK;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hals_end.c,v 1.1 2013/11/12 17:46:21 mbalmer Exp $ */
|
||||
/* $NetBSD: hals_end.c,v 1.2 2021/05/02 12:50:45 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* hals_end Copyright (C) 2003-2007 marc balmer. BSD license applies.
|
||||
|
@ -68,7 +68,7 @@ void
|
|||
stutter(const char *s)
|
||||
{
|
||||
int sdelay = (100000 + (50000 * emotion)) / speed;
|
||||
|
||||
|
||||
while (*s) {
|
||||
putchar(*s);
|
||||
if (*s == ' ') {
|
||||
|
|
|
@ -1,33 +1,33 @@
|
|||
/* $NetBSD: hunt_private.h,v 1.9 2014/03/30 05:30:28 dholland Exp $ */
|
||||
/* $NetBSD: hunt_private.h,v 1.10 2021/05/02 12:50:45 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983-2003, Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* + Redistributions of source code must retain the above copyright
|
||||
*
|
||||
* + Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* + Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* + Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* + Neither the name of the University of California, San Francisco nor
|
||||
* the names of its contributors may be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* + Neither the name of the University of California, San Francisco nor
|
||||
* the names of its contributors may be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,38 +1,38 @@
|
|||
/* $NetBSD: answer.c,v 1.23 2014/03/30 05:53:12 dholland Exp $ */
|
||||
/* $NetBSD: answer.c,v 1.24 2021/05/02 12:50:45 rillig Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1983-2003, Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* + Redistributions of source code must retain the above copyright
|
||||
*
|
||||
* + Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* + Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* + Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* + Neither the name of the University of California, San Francisco nor
|
||||
* the names of its contributors may be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* + Neither the name of the University of California, San Francisco nor
|
||||
* the names of its contributors may be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: answer.c,v 1.23 2014/03/30 05:53:12 dholland Exp $");
|
||||
__RCSID("$NetBSD: answer.c,v 1.24 2021/05/02 12:50:45 rillig Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -89,7 +89,7 @@ answer(void)
|
|||
machine = ((struct sockaddr_in *)&newaddr)->sin_addr.s_addr;
|
||||
machine = ntohl(machine);
|
||||
break;
|
||||
case AF_INET6:
|
||||
case AF_INET6:
|
||||
{
|
||||
struct sockaddr_in6 *sin6;
|
||||
|
||||
|
|
|
@ -1,38 +1,38 @@
|
|||
/* $NetBSD: draw.c,v 1.9 2014/03/29 19:41:10 dholland Exp $ */
|
||||
/* $NetBSD: draw.c,v 1.10 2021/05/02 12:50:45 rillig Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1983-2003, Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* + Redistributions of source code must retain the above copyright
|
||||
*
|
||||
* + Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* + Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* + Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* + Neither the name of the University of California, San Francisco nor
|
||||
* the names of its contributors may be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* + Neither the name of the University of California, San Francisco nor
|
||||
* the names of its contributors may be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: draw.c,v 1.9 2014/03/29 19:41:10 dholland Exp $");
|
||||
__RCSID("$NetBSD: draw.c,v 1.10 2021/05/02 12:50:45 rillig Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include "hunt.h"
|
||||
|
|
|
@ -1,38 +1,38 @@
|
|||
/* $NetBSD: driver.c,v 1.35 2014/03/30 01:44:37 dholland Exp $ */
|
||||
/* $NetBSD: driver.c,v 1.36 2021/05/02 12:50:45 rillig Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1983-2003, Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* + Redistributions of source code must retain the above copyright
|
||||
*
|
||||
* + Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* + Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* + Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* + Neither the name of the University of California, San Francisco nor
|
||||
* the names of its contributors may be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* + Neither the name of the University of California, San Francisco nor
|
||||
* the names of its contributors may be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: driver.c,v 1.35 2014/03/30 01:44:37 dholland Exp $");
|
||||
__RCSID("$NetBSD: driver.c,v 1.36 2021/05/02 12:50:45 rillig Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
|
|
|
@ -1,38 +1,38 @@
|
|||
/* $NetBSD: execute.c,v 1.12 2014/03/29 21:38:54 dholland Exp $ */
|
||||
/* $NetBSD: execute.c,v 1.13 2021/05/02 12:50:45 rillig Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1983-2003, Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* + Redistributions of source code must retain the above copyright
|
||||
*
|
||||
* + Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* + Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* + Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* + Neither the name of the University of California, San Francisco nor
|
||||
* the names of its contributors may be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* + Neither the name of the University of California, San Francisco nor
|
||||
* the names of its contributors may be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: execute.c,v 1.12 2014/03/29 21:38:54 dholland Exp $");
|
||||
__RCSID("$NetBSD: execute.c,v 1.13 2021/05/02 12:50:45 rillig Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -1,38 +1,38 @@
|
|||
/* $NetBSD: expl.c,v 1.8 2014/03/29 21:33:41 dholland Exp $ */
|
||||
/* $NetBSD: expl.c,v 1.9 2021/05/02 12:50:45 rillig Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1983-2003, Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* + Redistributions of source code must retain the above copyright
|
||||
*
|
||||
* + Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* + Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* + Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* + Neither the name of the University of California, San Francisco nor
|
||||
* the names of its contributors may be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* + Neither the name of the University of California, San Francisco nor
|
||||
* the names of its contributors may be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: expl.c,v 1.8 2014/03/29 21:33:41 dholland Exp $");
|
||||
__RCSID("$NetBSD: expl.c,v 1.9 2021/05/02 12:50:45 rillig Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -1,38 +1,38 @@
|
|||
/* $NetBSD: extern.c,v 1.10 2014/03/30 00:26:58 dholland Exp $ */
|
||||
/* $NetBSD: extern.c,v 1.11 2021/05/02 12:50:45 rillig Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1983-2003, Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* + Redistributions of source code must retain the above copyright
|
||||
*
|
||||
* + Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* + Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* + Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* + Neither the name of the University of California, San Francisco nor
|
||||
* the names of its contributors may be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* + Neither the name of the University of California, San Francisco nor
|
||||
* the names of its contributors may be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: extern.c,v 1.10 2014/03/30 00:26:58 dholland Exp $");
|
||||
__RCSID("$NetBSD: extern.c,v 1.11 2021/05/02 12:50:45 rillig Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include "hunt.h"
|
||||
|
|
|
@ -1,33 +1,33 @@
|
|||
/* $NetBSD: hunt.h,v 1.31 2014/03/30 05:53:12 dholland Exp $ */
|
||||
/* $NetBSD: hunt.h,v 1.32 2021/05/02 12:50:45 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983-2003, Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* + Redistributions of source code must retain the above copyright
|
||||
*
|
||||
* + Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* + Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* + Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* + Neither the name of the University of California, San Francisco nor
|
||||
* the names of its contributors may be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* + Neither the name of the University of California, San Francisco nor
|
||||
* the names of its contributors may be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,38 +1,38 @@
|
|||
/* $NetBSD: makemaze.c,v 1.11 2014/03/29 20:44:20 dholland Exp $ */
|
||||
/* $NetBSD: makemaze.c,v 1.12 2021/05/02 12:50:45 rillig Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1983-2003, Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* + Redistributions of source code must retain the above copyright
|
||||
*
|
||||
* + Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* + Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* + Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* + Neither the name of the University of California, San Francisco nor
|
||||
* the names of its contributors may be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* + Neither the name of the University of California, San Francisco nor
|
||||
* the names of its contributors may be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: makemaze.c,v 1.11 2014/03/29 20:44:20 dholland Exp $");
|
||||
__RCSID("$NetBSD: makemaze.c,v 1.12 2021/05/02 12:50:45 rillig Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include "hunt.h"
|
||||
|
|
|
@ -1,38 +1,38 @@
|
|||
/* $NetBSD: shots.c,v 1.15 2019/10/13 07:42:57 mrg Exp $ */
|
||||
/* $NetBSD: shots.c,v 1.16 2021/05/02 12:50:45 rillig Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1983-2003, Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* + Redistributions of source code must retain the above copyright
|
||||
*
|
||||
* + Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* + Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* + Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* + Neither the name of the University of California, San Francisco nor
|
||||
* the names of its contributors may be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* + Neither the name of the University of California, San Francisco nor
|
||||
* the names of its contributors may be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: shots.c,v 1.15 2019/10/13 07:42:57 mrg Exp $");
|
||||
__RCSID("$NetBSD: shots.c,v 1.16 2021/05/02 12:50:45 rillig Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <err.h>
|
||||
|
|
|
@ -1,38 +1,38 @@
|
|||
/* $NetBSD: terminal.c,v 1.7 2009/07/04 04:29:55 dholland Exp $ */
|
||||
/* $NetBSD: terminal.c,v 1.8 2021/05/02 12:50:45 rillig Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1983-2003, Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* + Redistributions of source code must retain the above copyright
|
||||
*
|
||||
* + Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* + Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* + Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* + Neither the name of the University of California, San Francisco nor
|
||||
* the names of its contributors may be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* + Neither the name of the University of California, San Francisco nor
|
||||
* the names of its contributors may be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: terminal.c,v 1.7 2009/07/04 04:29:55 dholland Exp $");
|
||||
__RCSID("$NetBSD: terminal.c,v 1.8 2021/05/02 12:50:45 rillig Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <stdarg.h>
|
||||
|
|
|
@ -1,33 +1,33 @@
|
|||
/* $NetBSD: hunt_common.h,v 1.4 2014/03/30 05:30:28 dholland Exp $ */
|
||||
/* $NetBSD: hunt_common.h,v 1.5 2021/05/02 12:50:45 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983-2003, Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* + Redistributions of source code must retain the above copyright
|
||||
*
|
||||
* + Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* + Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* + Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* + Neither the name of the University of California, San Francisco nor
|
||||
* the names of its contributors may be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* + Neither the name of the University of California, San Francisco nor
|
||||
* the names of its contributors may be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,32 +1,32 @@
|
|||
/* $NetBSD: pathnames.h,v 1.1 2014/03/29 22:11:19 dholland Exp $ */
|
||||
/* $NetBSD: pathnames.h,v 1.2 2021/05/02 12:50:45 rillig Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1983-2003, Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* + Redistributions of source code must retain the above copyright
|
||||
*
|
||||
* + Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* + Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* + Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* + Neither the name of the University of California, San Francisco nor
|
||||
* the names of its contributors may be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* + Neither the name of the University of California, San Francisco nor
|
||||
* the names of its contributors may be used to endorse or promote
|
||||
* products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
/* $NetBSD: action.c,v 1.1 2008/02/19 06:05:26 dholland Exp $ */
|
||||
/* $NetBSD: action.c,v 1.2 2021/05/02 12:50:45 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* action.c Larn is copyrighted 1986 by Noah Morgan.
|
||||
*
|
||||
*
|
||||
* Routines in this file:
|
||||
*
|
||||
*
|
||||
* ...
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: action.c,v 1.1 2008/02/19 06:05:26 dholland Exp $");
|
||||
__RCSID("$NetBSD: action.c,v 1.2 2021/05/02 12:50:45 rillig Exp $");
|
||||
#endif /* not lint */
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
@ -256,7 +256,7 @@ act_ignore_altar(void)
|
|||
}
|
||||
|
||||
/*
|
||||
* Performs the act of opening a chest.
|
||||
* Performs the act of opening a chest.
|
||||
*
|
||||
* Parameters: x,y location of the chest to open.
|
||||
* Assumptions: cursors() has been called previously
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/* $NetBSD: global.c,v 1.14 2012/06/19 05:30:43 dholland Exp $ */
|
||||
/* $NetBSD: global.c,v 1.15 2021/05/02 12:50:45 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* global.c Larn is copyrighted 1986 by Noah Morgan.
|
||||
*
|
||||
*
|
||||
* raiselevel() subroutine to raise the player one level
|
||||
* loselevel() subroutine to lower the player by one level
|
||||
* raiseexperience(x) subroutine to increase experience points
|
||||
|
@ -21,7 +21,7 @@
|
|||
*/
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: global.c,v 1.14 2012/06/19 05:30:43 dholland Exp $");
|
||||
__RCSID("$NetBSD: global.c,v 1.15 2021/05/02 12:50:45 rillig Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <string.h>
|
||||
|
|
|
@ -1,49 +1,49 @@
|
|||
/* $NetBSD: io.c,v 1.28 2017/01/10 20:41:40 christos Exp $ */
|
||||
/* $NetBSD: io.c,v 1.29 2021/05/02 12:50:45 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* io.c Larn is copyrighted 1986 by Noah Morgan.
|
||||
*
|
||||
*
|
||||
* Below are the functions in this file:
|
||||
*
|
||||
*
|
||||
* setupvt100() Subroutine to set up terminal in correct mode for game
|
||||
* clearvt100() Subroutine to clean up terminal when the game is over
|
||||
* ttgetch() Routine to read in one character from the terminal
|
||||
* scbr() Function to set cbreak -echo for the terminal
|
||||
* sncbr() Function to set -cbreak echo for the terminal
|
||||
* newgame() Subroutine to save the initial time and seed rnd()
|
||||
*
|
||||
*
|
||||
* FILE OUTPUT ROUTINES
|
||||
*
|
||||
*
|
||||
* lprintf(format,args . . .) printf to the output buffer lprint(integer)
|
||||
* end binary integer to output buffer lwrite(buf,len)
|
||||
* rite a buffer to the output buffer lprcat(str)
|
||||
* ent string to output buffer
|
||||
*
|
||||
*
|
||||
* FILE OUTPUT MACROS (in header.h)
|
||||
*
|
||||
*
|
||||
* lprc(character) put the character into the output
|
||||
* buffer
|
||||
*
|
||||
*
|
||||
* FILE INPUT ROUTINES
|
||||
*
|
||||
*
|
||||
* long lgetc() read one character from input buffer
|
||||
* long larn_lrint() read one integer from input buffer
|
||||
* lrfill(address,number) put input bytes into a buffer char
|
||||
* *lgetw() get a whitespace ended word from
|
||||
* input char *lgetl() get a \n or EOF ended line
|
||||
* from input
|
||||
*
|
||||
*
|
||||
* FILE OPEN / CLOSE ROUTINES
|
||||
*
|
||||
*
|
||||
* lcreat(filename) create a new file for write
|
||||
* lopen(filename) open a file for read
|
||||
* lappend(filename) open for append to an existing file
|
||||
* lrclose() close the input file
|
||||
* lwclose() close output file lflush()
|
||||
* lush the output buffer
|
||||
*
|
||||
*
|
||||
* Other Routines
|
||||
*
|
||||
*
|
||||
* cursor(x,y) position cursor at [x,y]
|
||||
* cursors() position cursor at [1,24]
|
||||
* (saves memory) cl_line(x,y) Clear line at [1,y] and leave
|
||||
|
@ -57,12 +57,12 @@
|
|||
* erminal initialization -- setup termcap info * char *tmcapcnv(sd,ss)
|
||||
* outine to convert VT100 \33's to termcap format beep()
|
||||
* e to emit a beep if enabled (see no-beep in .larnopts)
|
||||
*
|
||||
*
|
||||
* Note: ** entries are available only in termcap mode.
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: io.c,v 1.28 2017/01/10 20:41:40 christos Exp $");
|
||||
__RCSID("$NetBSD: io.c,v 1.29 2021/05/02 12:50:45 rillig Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include "header.h"
|
||||
|
@ -324,7 +324,7 @@ lwrite(char *buf, int len)
|
|||
*
|
||||
* Returns 0 if EOF, otherwise the character
|
||||
*/
|
||||
long
|
||||
long
|
||||
lgetc(void)
|
||||
{
|
||||
int i;
|
||||
|
@ -356,7 +356,7 @@ lgetc(void)
|
|||
* The save order is low order first, to high order (4 bytes total)
|
||||
* Returns the int read
|
||||
*/
|
||||
long
|
||||
long
|
||||
larn_lrint(void)
|
||||
{
|
||||
unsigned long i;
|
||||
|
@ -907,7 +907,7 @@ static int vindex = 0;
|
|||
/*
|
||||
* ttputch(ch) Print one character in decoded output buffer.
|
||||
*/
|
||||
static int
|
||||
static int
|
||||
ttputch(int ch)
|
||||
{
|
||||
outbuf[vindex++] = ch;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/* $NetBSD: main.c,v 1.26 2019/02/03 03:19:25 mrg Exp $ */
|
||||
/* $NetBSD: main.c,v 1.27 2021/05/02 12:50:45 rillig Exp $ */
|
||||
|
||||
/* main.c */
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: main.c,v 1.26 2019/02/03 03:19:25 mrg Exp $");
|
||||
__RCSID("$NetBSD: main.c,v 1.27 2021/05/02 12:50:45 rillig Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -1300,7 +1300,7 @@ whatitem(const char *str)
|
|||
subroutine to get a number from the player
|
||||
and allow * to mean return amt, else return the number entered
|
||||
*/
|
||||
unsigned long
|
||||
unsigned long
|
||||
readnum(long mx)
|
||||
{
|
||||
int i;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: monster.c,v 1.19 2019/02/03 03:19:25 mrg Exp $ */
|
||||
/* $NetBSD: monster.c,v 1.20 2021/05/02 12:50:45 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* monster.c Larn is copyrighted 1986 by Noah Morgan.
|
||||
|
@ -100,7 +100,7 @@
|
|||
*/
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: monster.c,v 1.19 2019/02/03 03:19:25 mrg Exp $");
|
||||
__RCSID("$NetBSD: monster.c,v 1.20 2021/05/02 12:50:45 rillig Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <string.h>
|
||||
|
@ -185,7 +185,7 @@ createmonster(int mon)
|
|||
* if monst==TRUE check for no monster at this location
|
||||
* This routine will return FALSE if at a wall or the dungeon exit on level 1
|
||||
*/
|
||||
static int
|
||||
static int
|
||||
cgood(int x, int y, int theitem, int monst)
|
||||
{
|
||||
#define itm __lose
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
/* $NetBSD: moreobj.c,v 1.12 2012/06/19 05:30:43 dholland Exp $ */
|
||||
/* $NetBSD: moreobj.c,v 1.13 2021/05/02 12:50:45 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* moreobj.c Larn is copyrighted 1986 by Noah Morgan.
|
||||
*
|
||||
*
|
||||
* Routines in this file:
|
||||
*
|
||||
*
|
||||
* oaltar() othrone() ochest() ofountain()
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: moreobj.c,v 1.12 2012/06/19 05:30:43 dholland Exp $");
|
||||
__RCSID("$NetBSD: moreobj.c,v 1.13 2021/05/02 12:50:45 rillig Exp $");
|
||||
#endif /* not lint */
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
/* $NetBSD: scores.c,v 1.21 2012/06/19 05:30:44 dholland Exp $ */
|
||||
/* $NetBSD: scores.c,v 1.22 2021/05/02 12:50:45 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* scores.c Larn is copyrighted 1986 by Noah Morgan.
|
||||
*
|
||||
*
|
||||
* Functions in this file are:
|
||||
*
|
||||
*
|
||||
* readboard() Function to read in the scoreboard into a static buffer
|
||||
* writeboard() Function to write the scoreboard from readboard()'s buffer
|
||||
* makeboard() Function to create a new scoreboard (wipe out old one)
|
||||
|
@ -22,11 +22,11 @@
|
|||
* line showing player when he is killed diedlog() Subroutine to read a
|
||||
* log file and print it out in ascii format getplid(name)
|
||||
* on to get players id # from id file
|
||||
*
|
||||
*
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: scores.c,v 1.21 2012/06/19 05:30:44 dholland Exp $");
|
||||
__RCSID("$NetBSD: scores.c,v 1.22 2021/05/02 12:50:45 rillig Exp $");
|
||||
#endif /* not lint */
|
||||
#include <sys/types.h>
|
||||
#include <sys/times.h>
|
||||
|
@ -222,7 +222,7 @@ hashewon(void)
|
|||
* Enter with the amount (in gp) to pay on the taxes.
|
||||
* Returns amount actually paid.
|
||||
*/
|
||||
long
|
||||
long
|
||||
paytaxes(long x)
|
||||
{
|
||||
int i;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: store.c,v 1.16 2012/06/19 05:30:44 dholland Exp $ */
|
||||
/* $NetBSD: store.c,v 1.17 2021/05/02 12:50:45 rillig Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1988 The Regents of the University of California.
|
||||
|
@ -34,7 +34,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)store.c 5.4 (Berkeley) 5/13/91";
|
||||
#else
|
||||
__RCSID("$NetBSD: store.c,v 1.16 2012/06/19 05:30:44 dholland Exp $");
|
||||
__RCSID("$NetBSD: store.c,v 1.17 2021/05/02 12:50:45 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -225,7 +225,7 @@ outofstock(void)
|
|||
nap(2200);
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
nogold(void)
|
||||
{
|
||||
lprcat("\nYou don't have enough gold to pay for that!");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: extern.c,v 1.11 2011/08/16 11:14:04 christos Exp $ */
|
||||
/* $NetBSD: extern.c,v 1.12 2021/05/02 12:50:45 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1993
|
||||
|
@ -34,7 +34,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)extern.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: extern.c,v 1.11 2011/08/16 11:14:04 christos Exp $");
|
||||
__RCSID("$NetBSD: extern.c,v 1.12 2021/05/02 12:50:45 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -64,7 +64,7 @@ static const char *const _cn[NUM_CARDS] = {/* Card name buffer */
|
|||
"Flat Tire",
|
||||
"Accident",
|
||||
"Stop",
|
||||
"Speed Limit",
|
||||
"Speed Limit",
|
||||
"Gasoline",
|
||||
"Spare Tire",
|
||||
"Repairs",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mille.h,v 1.20 2019/12/27 09:17:59 msaitoh Exp $ */
|
||||
/* $NetBSD: mille.h,v 1.21 2021/05/02 12:50:45 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1993
|
||||
|
@ -132,7 +132,7 @@
|
|||
#define C_100 3
|
||||
#define C_200 4
|
||||
#define C_EMPTY 5
|
||||
#define C_FLAT 6
|
||||
#define C_FLAT 6
|
||||
#define C_CRASH 7
|
||||
#define C_STOP 8
|
||||
#define C_LIMIT 9
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: misc.c,v 1.12 2009/05/25 23:24:54 dholland Exp $ */
|
||||
/* $NetBSD: misc.c,v 1.13 2021/05/02 12:50:45 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
|
@ -34,7 +34,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)misc.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: misc.c,v 1.12 2009/05/25 23:24:54 dholland Exp $");
|
||||
__RCSID("$NetBSD: misc.c,v 1.13 2021/05/02 12:50:45 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -161,7 +161,7 @@ done:
|
|||
goto extend;
|
||||
for (miles = 0, i = 0; i < HAND_SZ; i++)
|
||||
if ((safe = pp->hand[i]) <= C_200)
|
||||
miles += Value[safe];
|
||||
miles += Value[safe];
|
||||
if (miles + (Topcard - Deck) * 3 > 1000)
|
||||
goto extend;
|
||||
goto done;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: morse.c,v 1.18 2018/01/16 06:20:24 maya Exp $ */
|
||||
/* $NetBSD: morse.c,v 1.19 2021/05/02 12:50:45 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1993
|
||||
|
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1993\
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)morse.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: morse.c,v 1.18 2018/01/16 06:20:24 maya Exp $");
|
||||
__RCSID("$NetBSD: morse.c,v 1.19 2021/05/02 12:50:45 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -195,7 +195,7 @@ main(int argc, char **argv)
|
|||
morse(ch);
|
||||
show("...-.-"); /* SK */
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -203,13 +203,13 @@ void
|
|||
decode(const char *s)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
for (i = 0; i < 10; i++)
|
||||
if (strcmp(digit[i], s) == 0) {
|
||||
putchar('0' + i);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
for (i = 0; i < 26; i++)
|
||||
if (strcmp(alph[i], s) == 0) {
|
||||
putchar('A' + i);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: number.c,v 1.16 2014/03/23 00:03:04 dholland Exp $ */
|
||||
/* $NetBSD: number.c,v 1.17 2021/05/02 12:50:45 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1993, 1994
|
||||
|
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1993, 1994\
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)number.c 8.3 (Berkeley) 5/4/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: number.c,v 1.16 2014/03/23 00:03:04 dholland Exp $");
|
||||
__RCSID("$NetBSD: number.c,v 1.17 2021/05/02 12:50:45 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -71,7 +71,7 @@ static const char *const name1[] = {
|
|||
"trillion", "quadrillion", "quintillion", "sextillion",
|
||||
"septillion", "octillion", "nonillion", "decillion",
|
||||
"undecillion", "duodecillion", "tredecillion", "quattuordecillion",
|
||||
"quindecillion", "sexdecillion",
|
||||
"quindecillion", "sexdecillion",
|
||||
"septendecillion", "octodecillion",
|
||||
"novemdecillion", "vigintillion",
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: fight.c,v 1.14 2019/02/03 03:19:25 mrg Exp $ */
|
||||
/* $NetBSD: fight.c,v 1.15 2021/05/02 12:50:46 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* fight.c Phantasia monster fighting routines
|
||||
|
@ -1272,7 +1272,7 @@ awardtreasure(void)
|
|||
* l
|
||||
* a
|
||||
* r
|
||||
*
|
||||
*
|
||||
* ri
|
||||
* n
|
||||
* g
|
||||
|
@ -1290,7 +1290,7 @@ awardtreasure(void)
|
|||
/* b
|
||||
* a
|
||||
* d
|
||||
*
|
||||
*
|
||||
* ri
|
||||
* n
|
||||
* g
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: misc.c,v 1.22 2019/02/03 03:19:25 mrg Exp $ */
|
||||
/* $NetBSD: misc.c,v 1.23 2021/05/02 12:50:46 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* misc.c Phantasia miscellaneous support routines
|
||||
|
@ -120,7 +120,7 @@ descrlocation(struct player *playerp, phbool shortflag)
|
|||
label = "The Lord's Chamber";
|
||||
else {
|
||||
/* this
|
||||
*
|
||||
*
|
||||
* expr
|
||||
* essi
|
||||
* on
|
||||
|
@ -132,13 +132,13 @@ descrlocation(struct player *playerp, phbool shortflag)
|
|||
* ent
|
||||
* comp
|
||||
* iler
|
||||
*
|
||||
*
|
||||
* loop
|
||||
*
|
||||
*
|
||||
* with
|
||||
*
|
||||
*
|
||||
* some
|
||||
*
|
||||
*
|
||||
* comp
|
||||
* iler
|
||||
* s */
|
||||
|
@ -151,7 +151,7 @@ descrlocation(struct player *playerp, phbool shortflag)
|
|||
if (shortflag)
|
||||
snprintf(Databuf, SZ_DATABUF, "%.29s", label);
|
||||
else
|
||||
snprintf(Databuf, SZ_DATABUF,
|
||||
snprintf(Databuf, SZ_DATABUF,
|
||||
" is in %s (%.0f,%.0f)",
|
||||
label, playerp->p_x, playerp->p_y);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: setup.c,v 1.22 2017/10/02 22:03:10 joerg Exp $ */
|
||||
/* $NetBSD: setup.c,v 1.23 2021/05/02 12:50:46 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* setup.c - set up all files for Phantasia
|
||||
|
@ -43,15 +43,15 @@ double drandom(void);
|
|||
/
|
||||
/ RETURN VALUE: none
|
||||
/
|
||||
/ MODULES CALLED: time(), exit(), stat(), Error(), creat(), close(), fopen(),
|
||||
/ fgets(), floor(), srandom(), umask(), drandom(), strcpy(), getuid(),
|
||||
/ MODULES CALLED: time(), exit(), stat(), Error(), creat(), close(), fopen(),
|
||||
/ fgets(), floor(), srandom(), umask(), drandom(), strcpy(), getuid(),
|
||||
/ unlink(), fwrite(), fclose(), sscanf(), printf(), strlen(), fprintf()
|
||||
/
|
||||
/ GLOBAL INPUTS: Curmonster, _iob[], Databuf[], *Monstfp, Enrgyvoid
|
||||
/
|
||||
/ GLOBAL OUTPUTS: Curmonster, Databuf[], *Monstfp, Enrgyvoid
|
||||
/
|
||||
/ DESCRIPTION:
|
||||
/ DESCRIPTION:
|
||||
/
|
||||
/ This program tries to verify the parameters specified in
|
||||
/ the Makefile.
|
||||
|
@ -263,7 +263,7 @@ Error(const char *str, const char *file)
|
|||
/
|
||||
/ GLOBAL OUTPUTS: none
|
||||
/
|
||||
/ DESCRIPTION:
|
||||
/ DESCRIPTION:
|
||||
/
|
||||
/ ************************************************************************/
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pom.c,v 1.20 2010/12/05 04:34:22 pgoyette Exp $ */
|
||||
/* $NetBSD: pom.c,v 1.21 2021/05/02 12:50:46 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
|
@ -41,7 +41,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)pom.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: pom.c,v 1.20 2010/12/05 04:34:22 pgoyette Exp $");
|
||||
__RCSID("$NetBSD: pom.c,v 1.21 2021/05/02 12:50:46 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -215,7 +215,7 @@ parsetime(char *p)
|
|||
int yearset = 0;
|
||||
time_t tval;
|
||||
char *t;
|
||||
|
||||
|
||||
for (t = p; *t; ++t) {
|
||||
if (isdigit((unsigned char) *t))
|
||||
continue;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pattern.c,v 1.7 2014/10/02 21:36:37 ast Exp $ */
|
||||
/* $NetBSD: pattern.c,v 1.8 2021/05/02 12:50:46 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
|
@ -38,7 +38,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)pattern.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: pattern.c,v 1.7 2014/10/02 21:36:37 ast Exp $");
|
||||
__RCSID("$NetBSD: pattern.c,v 1.8 2021/05/02 12:50:46 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -47,8 +47,8 @@ __RCSID("$NetBSD: pattern.c,v 1.7 2014/10/02 21:36:37 ast Exp $");
|
|||
*
|
||||
* By Landon Curt Noll, http://www.isthe.com/chongo/index.html /\oo/\
|
||||
*
|
||||
* To avoid excessive sieves for small factors, we use the table below to
|
||||
* setup our sieve blocks. Each element represents a odd number starting
|
||||
* To avoid excessive sieves for small factors, we use the table below to
|
||||
* setup our sieve blocks. Each element represents a odd number starting
|
||||
* with 1. All non-zero elements are factors of 3, 5, 7, 11 and 13.
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: random.c,v 1.15 2020/07/26 15:24:00 nia Exp $ */
|
||||
/* $NetBSD: random.c,v 1.16 2021/05/02 12:50:46 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994
|
||||
|
@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1994\
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)random.c 8.6 (Berkeley) 6/1/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: random.c,v 1.15 2020/07/26 15:24:00 nia Exp $");
|
||||
__RCSID("$NetBSD: random.c,v 1.16 2021/05/02 12:50:46 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -98,7 +98,7 @@ main(int argc, char *argv[])
|
|||
errx(1, "denominator is not valid.");
|
||||
break;
|
||||
default:
|
||||
usage();
|
||||
usage();
|
||||
/* NOTREACHED */
|
||||
}
|
||||
|
||||
|
@ -112,7 +112,7 @@ main(int argc, char *argv[])
|
|||
*/
|
||||
if (unbuffer_output)
|
||||
setbuf(stdout, NULL);
|
||||
|
||||
|
||||
/*
|
||||
* Select whether to print the first line. (Prime the pump.)
|
||||
* We find a random number between 0 and denom - 1 and, if it's
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: message.c,v 1.14 2009/08/12 08:44:45 dholland Exp $ */
|
||||
/* $NetBSD: message.c,v 1.15 2021/05/02 12:50:46 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1993
|
||||
|
@ -37,7 +37,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)message.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: message.c,v 1.14 2009/08/12 08:44:45 dholland Exp $");
|
||||
__RCSID("$NetBSD: message.c,v 1.15 2021/05/02 12:50:46 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -149,9 +149,9 @@ check_message(void)
|
|||
}
|
||||
|
||||
int
|
||||
get_input_line(const char *prompt, const char *insert,
|
||||
char *buf, size_t buflen,
|
||||
const char *if_cancelled,
|
||||
get_input_line(const char *prompt, const char *insert,
|
||||
char *buf, size_t buflen,
|
||||
const char *if_cancelled,
|
||||
boolean add_blank, boolean do_echo)
|
||||
{
|
||||
short ch;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: save.c,v 1.13 2008/01/14 03:50:02 dholland Exp $ */
|
||||
/* $NetBSD: save.c,v 1.14 2021/05/02 12:50:46 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1993
|
||||
|
@ -37,7 +37,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)save.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: save.c,v 1.13 2008/01/14 03:50:02 dholland Exp $");
|
||||
__RCSID("$NetBSD: save.c,v 1.14 2021/05/02 12:50:46 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -56,7 +56,7 @@ __RCSID("$NetBSD: save.c,v 1.13 2008/01/14 03:50:02 dholland Exp $");
|
|||
#include <stdio.h>
|
||||
#include "rogue.h"
|
||||
|
||||
static boolean has_been_touched(const struct rogue_time *,
|
||||
static boolean has_been_touched(const struct rogue_time *,
|
||||
const struct rogue_time *);
|
||||
static void r_read(FILE *, void *, size_t);
|
||||
static void r_write(FILE *, const void *, size_t);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: use.c,v 1.10 2009/08/12 08:44:45 dholland Exp $ */
|
||||
/* $NetBSD: use.c,v 1.11 2021/05/02 12:50:46 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1993
|
||||
|
@ -37,7 +37,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)use.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: use.c,v 1.10 2009/08/12 08:44:45 dholland Exp $");
|
||||
__RCSID("$NetBSD: use.c,v 1.11 2021/05/02 12:50:46 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -65,7 +65,7 @@ short extra_hp = 0;
|
|||
boolean detect_monster = 0;
|
||||
boolean con_mon = 0;
|
||||
|
||||
static const char strange_feeling[] =
|
||||
static const char strange_feeling[] =
|
||||
"you have a strange feeling for a moment, then it passes";
|
||||
|
||||
static const char *get_ench_color(void);
|
||||
|
|
|
@ -118,7 +118,7 @@ array_add(struct array *a, void *val, unsigned *index_ret)
|
|||
* in array.c.
|
||||
*
|
||||
* Example usage in e.g. item.h of some game:
|
||||
*
|
||||
*
|
||||
* DECLARRAY_BYTYPE(stringarray, char);
|
||||
* DECLARRAY(potion);
|
||||
* DECLARRAY(sword);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: testpat.c,v 1.4 2021/01/08 15:16:04 christos Exp $ */
|
||||
/* $NetBSD: testpat.c,v 1.5 2021/05/02 12:50:46 rillig Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2016 Nathanial Sloss <nathanialsloss@yahoo.com.au>
|
||||
|
@ -26,7 +26,7 @@
|
|||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: testpat.c,v 1.4 2021/01/08 15:16:04 christos Exp $");
|
||||
__RCSID("$NetBSD: testpat.c,v 1.5 2021/05/02 12:50:46 rillig Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
|
@ -115,7 +115,7 @@ int main(int argc, char *argv[]) {
|
|||
grid_y = grid_unit;
|
||||
grid_x = grid_unit * 2;
|
||||
|
||||
|
||||
|
||||
ncpos = y_limit * sizeof(*circle_pos)
|
||||
+ y_limit * 2 * sizeof(**circle_pos);
|
||||
circle_pos = malloc(ncpos);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: scores.c,v 1.25 2020/09/07 00:31:11 mrg Exp $ */
|
||||
/* $NetBSD: scores.c,v 1.26 2021/05/02 12:50:46 rillig Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -548,7 +548,7 @@ getscores(int *fdp)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (fdp)
|
||||
*fdp = sd;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: screen.c,v 1.33 2017/03/20 22:05:27 christos Exp $ */
|
||||
/* $NetBSD: screen.c,v 1.34 2021/05/02 12:50:46 rillig Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -318,10 +318,10 @@ scr_update(void)
|
|||
/* draw preview of nextpattern */
|
||||
if (showpreview && (nextshape != lastshape)) {
|
||||
static int r=5, c=2;
|
||||
int tr, tc, t;
|
||||
int tr, tc, t;
|
||||
|
||||
lastshape = nextshape;
|
||||
|
||||
|
||||
/* clean */
|
||||
putpad(exit_standout_mode);
|
||||
moveto(r-1, c-1); putstr(" ");
|
||||
|
@ -331,7 +331,7 @@ scr_update(void)
|
|||
|
||||
moveto(r-3, c-2);
|
||||
putstr("Next shape:");
|
||||
|
||||
|
||||
/* draw */
|
||||
setcolor(nextshape->color);
|
||||
putpad(enter_standout_mode);
|
||||
|
@ -349,7 +349,7 @@ scr_update(void)
|
|||
}
|
||||
putpad(exit_standout_mode);
|
||||
}
|
||||
|
||||
|
||||
bp = &board[D_FIRST * B_COLS];
|
||||
sp = &curscreen[D_FIRST * B_COLS];
|
||||
for (j = D_FIRST; j < D_LAST; j++) {
|
||||
|
@ -415,7 +415,7 @@ scr_update(void)
|
|||
void
|
||||
scr_msg(char *s, int set)
|
||||
{
|
||||
|
||||
|
||||
if (set || clr_eol == NULL) {
|
||||
int l = strlen(s);
|
||||
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
* Log: EXTERN.h,v
|
||||
* Revision 7.0.1.1 86/12/12 16:46:50 lwall
|
||||
* Guarded the undefs.
|
||||
*
|
||||
*
|
||||
* Revision 7.0 86/10/08 15:11:31 lwall
|
||||
* Split into separate files. Added amoebas and pirates.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef EXT
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
* Log: INTERN.h,v
|
||||
* Revision 7.0.1.1 86/12/12 16:51:45 lwall
|
||||
* Guarded the undefs.
|
||||
*
|
||||
*
|
||||
* Revision 7.0 86/10/08 15:11:37 lwall
|
||||
* Split into separate files. Added amoebas and pirates.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef EXT
|
||||
|
|
|
@ -3,16 +3,16 @@
|
|||
/* Log: bang.c,v
|
||||
* Revision 7.0.1.3 86/12/12 16:57:00 lwall
|
||||
* Made circular explosions.
|
||||
*
|
||||
*
|
||||
* Revision 7.0.1.2 86/10/20 14:36:02 lwall
|
||||
* Picked some lint.
|
||||
*
|
||||
*
|
||||
* Revision 7.0.1.1 86/10/16 10:49:45 lwall
|
||||
* Added Damage. Fixed random bugs.
|
||||
*
|
||||
*
|
||||
* Revision 7.0 86/10/08 15:11:57 lwall
|
||||
* Split into separate files. Added amoebas and pirates.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#include "EXTERN.h"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/* Log: bang.h,v
|
||||
* Revision 7.0 86/10/08 15:12:03 lwall
|
||||
* Split into separate files. Added amoebas and pirates.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
EXT long blast[YSIZE][XSIZE];
|
||||
|
|
|
@ -3,19 +3,19 @@
|
|||
/* Log: init.c,v
|
||||
* Revision 7.0.1.4 86/12/12 16:58:03 lwall
|
||||
* Baseline for net release.
|
||||
*
|
||||
*
|
||||
* Revision 7.0.1.3 86/10/20 14:35:31 lwall
|
||||
* Picked some lint.
|
||||
*
|
||||
*
|
||||
* Revision 7.0.1.2 86/10/17 15:53:30 lwall
|
||||
* Added random walk star fields.
|
||||
*
|
||||
*
|
||||
* Revision 7.0.1.1 86/10/16 10:51:19 lwall
|
||||
* Added Damage. Fixed random bugs.
|
||||
*
|
||||
*
|
||||
* Revision 7.0 86/10/08 15:12:10 lwall
|
||||
* Split into separate files. Added amoebas and pirates.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#include "EXTERN.h"
|
||||
|
@ -519,7 +519,7 @@ stars_again:
|
|||
}
|
||||
}
|
||||
|
||||
for (i=0;i<2;i++) for (y=0;y<3;y++) for (x=0;x<3;x++)
|
||||
for (i=0;i<2;i++) for (y=0;y<3;y++) for (x=0;x<3;x++)
|
||||
isatorp[i][y][x]=0;
|
||||
|
||||
whenok = 0;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/* Log: init.h,v
|
||||
* Revision 7.0 86/10/08 15:12:17 lwall
|
||||
* Split into separate files. Added amoebas and pirates.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
void initialize(void);
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
*
|
||||
* Revision 7.0.1.2 86/12/12 16:59:04 lwall
|
||||
* Baseline for net release.
|
||||
*
|
||||
*
|
||||
* Revision 7.0.1.1 86/10/16 10:51:43 lwall
|
||||
* Added Damage. Fixed random bugs.
|
||||
*
|
||||
*
|
||||
* Revision 7.0 86/10/08 15:12:19 lwall
|
||||
* Split into separate files. Added amoebas and pirates.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#include "EXTERN.h"
|
||||
|
@ -56,7 +56,7 @@ intrp_init(char *tcbuf)
|
|||
if (logname == NULL)
|
||||
logname = savestr(getlogin());
|
||||
#endif
|
||||
|
||||
|
||||
/* get the real name of the person (%N) */
|
||||
/* Must be done after logname is read in because BERKNAMES uses that */
|
||||
|
||||
|
@ -304,7 +304,7 @@ dointerp(char *dest, size_t destsize, const char *pattern, const char *stoppers)
|
|||
case '(': {
|
||||
char rch;
|
||||
bool matched;
|
||||
|
||||
|
||||
pattern = dointerp(dest,destsize,pattern+1,"!=");
|
||||
rch = *pattern;
|
||||
if (rch == '!')
|
||||
|
@ -470,9 +470,9 @@ dointerp(char *dest, size_t destsize, const char *pattern, const char *stoppers)
|
|||
else if (*pattern == '\\' && pattern[1]) {
|
||||
++pattern; /* skip backslash */
|
||||
i = *pattern; /* get char into a register */
|
||||
|
||||
|
||||
/* this used to be a switch but the if may save space */
|
||||
|
||||
|
||||
if (i >= '0' && i <= '7') {
|
||||
i = 1;
|
||||
while (i < 01000 && *pattern >= '0' && *pattern <= '7') {
|
||||
|
@ -525,7 +525,7 @@ getrealname(uid_t uid)
|
|||
|
||||
#ifdef PASSNAMES
|
||||
struct passwd *pwd = getpwuid(uid);
|
||||
|
||||
|
||||
s = pwd->pw_gecos;
|
||||
#ifdef BERKNAMES
|
||||
#ifdef BERKJUNK
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
* Log: intrp.h,v
|
||||
* Revision 7.0.1.1 86/12/12 16:59:45 lwall
|
||||
* Baseline for net release.
|
||||
*
|
||||
*
|
||||
* Revision 7.0 86/10/08 15:12:27 lwall
|
||||
* Split into separate files. Added amoebas and pirates.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
EXT char *origdir INIT(NULL); /* cwd when warp invoked */
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
/* Log: move.c,v
|
||||
* Revision 7.0.1.2 86/10/20 14:37:06 lwall
|
||||
* Picked some lint.
|
||||
*
|
||||
*
|
||||
* Revision 7.0.1.1 86/10/16 10:52:09 lwall
|
||||
* Added Damage. Fixed random bugs.
|
||||
*
|
||||
*
|
||||
* Revision 7.0 86/10/08 15:12:40 lwall
|
||||
* Split into separate files. Added amoebas and pirates.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#include "EXTERN.h"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/* Log: move.h,v
|
||||
* Revision 7.0 86/10/08 15:12:46 lwall
|
||||
* Split into separate files. Added amoebas and pirates.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
void move_init(void);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/* Log: object.c,v
|
||||
* Revision 7.0 86/10/08 15:12:55 lwall
|
||||
* Split into separate files. Added amoebas and pirates.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#include "EXTERN.h"
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue