Sync our register usage with NetBSD's (non-)usage.

This commit is contained in:
Bill Fumerola 1999-11-16 02:58:06 +00:00
parent 879099e556
commit 727bf60729
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=53210
242 changed files with 2006 additions and 2011 deletions

View File

@ -118,8 +118,8 @@ u_long crc(ptr, nr) /* Process nr bytes at a time; ptr points to them */
const char *ptr;
int nr;
{
register int i;
register const char *p;
int i;
const char *p;
while (nr > 0)
for (p = ptr; nr--; ++p)

View File

@ -48,7 +48,7 @@ static char sccsid[] = "@(#)done.c 8.1 (Berkeley) 5/31/93";
#include "hdr.h"
score() /* sort of like 20000 */
{ register int scor,i;
{ int scor,i;
mxscor=scor=0;
for (i=50; i<=maxtrs; i++)
{ if (ptext[i].txtlen==0) continue;
@ -85,7 +85,7 @@ score() /* sort of like 20000 */
done(entry) /* entry=1 means goto 13000 */ /* game is over */
int entry; /* entry=2 means goto 20000 */ /* 3=19000 */
{ register int i,sc;
{ int i,sc;
if (entry==1) mspeak(1);
if (entry==3) rspeak(136);
printf("\n\n\nYou scored %d out of a ",(sc=score()));
@ -114,7 +114,7 @@ int entry; /* entry=2 means goto 20000 */ /* 3=19000 */
void
die(entry) /* label 90 */
int entry;
{ register int i;
{ int i;
if (entry != 99)
{ rspeak(23);
oldlc2=loc;

View File

@ -78,7 +78,7 @@ char a,b,c,d,e;
}
linkdata() /* secondary data manipulation */
{ register int i,j;
{ int i,j;
/* array linkages */
for (i=1; i<=LOCSIZ; i++)

View File

@ -53,7 +53,7 @@ static char sccsid[] = "@(#)io.c 8.1 (Berkeley) 5/31/93";
getin(wrd1,wrd2) /* get command from user */
char **wrd1,**wrd2; /* no prompt, usually */
{ register char *s;
{ char *s;
static char wd1buf[MAXSTR],wd2buf[MAXSTR];
int first, numch;
@ -98,7 +98,7 @@ char **wrd1,**wrd2; /* no prompt, usually */
yes(x,y,z) /* confirm with rspeak */
int x,y,z;
{ register int result;
{ int result;
int ch;
for (;;)
{ rspeak(x); /* tell him what we want*/
@ -120,7 +120,7 @@ int x,y,z;
yesm(x,y,z) /* confirm with mspeak */
int x,y,z;
{ register int result;
{ int result;
int ch;
for (;;)
{ mspeak(x); /* tell him what we want*/
@ -165,8 +165,8 @@ next() /* next virtual char, bump adr */
char breakch; /* tell which char ended rnum */
rdata() /* "read" data from virtual file*/
{ register int sect;
register char ch;
{ int sect;
char ch;
inptr = data_file; /* Pointer to virtual data file */
srandom(SEED); /* which is lightly encrypted. */
@ -235,7 +235,7 @@ char nbf[12];
rnum() /* read initial location num */
{ register char *s;
{ char *s;
tape = iotape; /* restart encryption tape */
for (s=nbf,*s=0;; s++)
if ((*s=next())==TAB || *s=='\n' || *s==LF)
@ -250,8 +250,8 @@ char *seekhere;
rdesc(sect) /* read description-format msgs */
int sect;
{ register char *s,*t;
register int locc;
{ char *s,*t;
int locc;
char *seekstart, *maystart, *adrstart;
char *entry;
@ -314,9 +314,9 @@ int sect;
rtrav() /* read travel table */
{ register int locc;
register struct travlist *t;
register char *s;
{ int locc;
struct travlist *t;
char *s;
char buf[12];
int len,m,n,entries;
for (oldloc= -1;;) /* get another line */
@ -367,7 +367,7 @@ rtrav() /* read travel table */
twrite(loq) /* travel options from this loc */
int loq;
{ register struct travlist *t;
{ struct travlist *t;
printf("If");
speak(&ltext[loq]);
printf("then\n");
@ -386,8 +386,8 @@ int loq;
#endif DEBUG
rvoc()
{ register char *s; /* read the vocabulary */
register int index;
{ char *s; /* read the vocabulary */
int index;
char buf[6];
for (;;)
{ index=rnum();
@ -423,7 +423,7 @@ rdflt() /* default verb messages */
}
rliq() /* liquid assets &c: cond bits */
{ register int bitnum;
{ int bitnum;
for (;;) /* read new bit list */
{ if ((bitnum=rnum())<0) break;
for (;;) /* read locs for bits */
@ -434,7 +434,7 @@ rliq() /* liquid assets &c: cond bits */
}
rhints()
{ register int hintnum,i;
{ int hintnum,i;
hntmax=0;
for (;;)
{ if ((hintnum=rnum())<0) break;
@ -460,7 +460,7 @@ int msg;
speak(msg) /* read, decrypt, and print a message (not ptext) */
const struct text *msg;/* msg is a pointer to seek address and length of mess */
{
register char *s, nonfirst;
char *s, nonfirst;
s = msg->seekadr;
nonfirst=0;
@ -485,7 +485,7 @@ pspeak(m,skip) /* read, decrypt an print a ptext message */
int m; /* msg is the number of all the p msgs for this place */
int skip; /* assumes object 1 doesn't have prop 1, obj 2 no prop 2 &c*/
{
register char *s,nonfirst;
char *s,nonfirst;
char *numst, save;
struct text *msg;
char *tbuf;

View File

@ -62,7 +62,7 @@ int argc;
char **argv;
{
extern int errno;
register int i;
int i;
int rval,ll;
struct text *kk;
extern trapdel();

View File

@ -73,7 +73,7 @@ int pbotl;
}
liq()
{ register int i;
{ int i;
i=prop[bottle];
if (i>-1-i) return(liq2(i));
else return(liq2(-1-i));
@ -81,7 +81,7 @@ liq()
liqloc(locc) /* may want to clean this one up a bit */
int locc;
{ register int i,j,l;
{ int i,j,l;
i=cond[locc]/2;
j=((i*2)%8)-5;
l=cond[locc]/4;
@ -115,8 +115,8 @@ int n;
fdwarf() /* 71 */
{ register int i,j;
register struct travlist *kk;
{ int i,j;
struct travlist *kk;
if (newloc!=loc&&!forced(loc)&&!bitset(loc,3))
{ for (i=1; i<=5; i++)
@ -233,7 +233,7 @@ fdwarf() /* 71 */
march() /* label 8 */
{ register int ll1,ll2;
{ int ll1,ll2;
if ((tkk=travel[newloc=loc])==0) bug(26);
if (k==null) return(2);
@ -298,8 +298,8 @@ l12: /* alternative to probability move */
mback() /* 20 */
{ register struct travlist *tk2,*j;
register int ll;
{ struct travlist *tk2,*j;
int ll;
if (forced(k=oldloc)) k=oldlc2; /* k=location */
oldlc2=oldloc;
oldloc=loc;
@ -399,7 +399,7 @@ int n;
void
checkhints() /* 2600 &c */
{ register int hint;
{ int hint;
for (hint=4; hint<=hntmax; hint++)
{ if (hinted[hint]) continue;
if (!bitset(loc,hint)) hintlc[hint]= -1;
@ -437,7 +437,7 @@ checkhints() /* 2600 &c */
trsay() /* 9030 */
{ register int i;
{ int i;
if (*wd2!=0) strcpy(wd1,wd2);
i=vocab(wd1,-1);
if (i==62||i==65||i==71||i==2025)
@ -451,7 +451,7 @@ trsay() /* 9030 */
trtake() /* 9010 */
{ register int i;
{ int i;
if (toting(obj)) return(2011); /* 9010 */
spk=25;
if (obj==plant&&prop[plant]<=0) spk=115;
@ -607,7 +607,7 @@ tropen() /* 9040 */
trkill() /* 9120 */
{ register int i;
{ int i;
for (i=1; i<=5; i++)
if (dloc[i]==loc&&dflag>=2) break;
if (i==6) i=0;
@ -664,7 +664,7 @@ trkill() /* 9120 */
trtoss() /* 9170: throw */
{ register int i;
{ int i;
if (toting(rod2)&&obj==rod&&!toting(rod)) obj=rod2;
if (!toting(obj)) return(2011);
if (obj>=50&&obj<=maxtrs&&at(troll))
@ -781,7 +781,7 @@ trfill() /* 9220 */
void
closing() /* 10000 */
{ register int i;
{ int i;
prop[grate]=prop[fissur]=0;
for (i=1; i<=6; i++)
@ -806,7 +806,7 @@ closing() /* 10000 */
void
caveclose() /* 11000 */
{ register int i;
{ int i;
prop[bottle]=put(bottle,115,1);
prop[plant]=put(plant,115,0);
prop[oyster]=put(oyster,115,0);

View File

@ -56,7 +56,7 @@ int object;
juggle(object)
int object;
{ register int i,j;
{ int i,j;
i=place[object];
j=fixed[object];
@ -67,7 +67,7 @@ int object;
move(object,where)
int object,where;
{ register int from;
{ int from;
if (object<=100)
from=place[object];
@ -86,7 +86,7 @@ int object,where,pval;
carry(object,where)
int object,where;
{ register int temp;
{ int temp;
if (object<=100)
{ if (place[object]== -1) return;
@ -119,9 +119,9 @@ vocab(word,type,value) /* look up or store a word */
const char *word;
int type; /* -2 for store, -1 for user word, >=0 for canned lookup*/
int value; /* used for storing only */
{ register int adr;
{ int adr;
const char *s;
register char *t;
char *t;
int hash, i;
struct hashtab *h;
@ -175,7 +175,7 @@ int value; /* used for storing only */
}
prht() /* print hash table */
{ register int i,j,l;
{ int i,j,l;
char *c;
struct hashtab *h;
for (i=0; i<HTSIZE/10+1; i++)

View File

@ -103,7 +103,7 @@ Start()
}
wizard() /* not as complex as advent/10 (for now) */
{ register int wiz;
{ int wiz;
char *word,*x;
if (!yesm(16,0,7)) return(FALSE);
mspeak(17);
@ -117,8 +117,8 @@ wizard() /* not as complex as advent/10 (for now) */
}
ciao()
{ register char *c;
register int outfd, size;
{ char *c;
int outfd, size;
char fname[80], buf[512];
extern unsigned filesize;

View File

@ -113,7 +113,7 @@ main(argc, argv)
while ((ch = getopt(argc, argv, "r:o:")) != -1)
switch(ch) {
case 'o': {
register const char *p;
const char *p;
for (p = keys = optarg; *p; ++p)
if (!index(keylist, *p)) {
@ -184,7 +184,7 @@ showstats()
*/
problem()
{
register char *p;
char *p;
time_t start, finish;
int left, op, right, result;
char line[80];
@ -317,7 +317,7 @@ getrandom(maxval, op, operand)
int maxval, op, operand;
{
int value;
register struct penalty **pp, *p;
struct penalty **pp, *p;
op = opnum(op);
value = random() % (maxval + penalty[op][operand]);

View File

@ -126,7 +126,7 @@ init_gr()
setup_screen(scp)
const C_SCREEN *scp;
{
register int i, j;
int i, j;
char str[3];
const char *airstr;

View File

@ -50,7 +50,7 @@ FILE *trace;
*/
dble () {
register int resp; /* response to y/n */
int resp; /* response to y/n */
for (;;) {
writel (" doubles."); /* indicate double */
@ -115,12 +115,12 @@ dble () {
*/
dblgood () {
register int n; /* accumulated judgment */
register int OFFC = *offptr; /* no. of computer's men off */
register int OFFO = *offopp; /* no. of player's men off */
int n; /* accumulated judgment */
int OFFC = *offptr; /* no. of computer's men off */
int OFFO = *offopp; /* no. of player's men off */
#ifdef DEBUG
register int i;
int i;
if (trace == NULL)
trace = fopen ("bgtrace","w");
#endif
@ -193,7 +193,7 @@ freemen (b)
int b;
{
register int i, inc, lim;
int i, inc, lim;
odds(0,0,0);
if (board[b] == 0)
@ -212,7 +212,7 @@ trapped (n,inc)
int n, inc;
{
register int i, j, k;
int i, j, k;
int c, l, ct;
ct = 0;
@ -237,7 +237,7 @@ int n, inc;
eval () {
register int i, j;
int i, j;
for (j = i = 0; i < 26; i++)
j += (board[i] >= 0 ? i*board[i] : (25-i)*board[i]);

View File

@ -96,9 +96,9 @@ int argc;
char **argv;
{
register int i; /* non-descript index */
register int l; /* non-descript index */
register char c; /* non-descript character storage */
int i; /* non-descript index */
int l; /* non-descript index */
char c; /* non-descript character storage */
/* revoke privs */
setgid(getgid());

View File

@ -89,8 +89,8 @@ static int race; /* game reduced to a race */
move (okay)
int okay; /* zero if first move */
{
register int i; /* index */
register int l; /* last man */
int i; /* index */
int l; /* last man */
if (okay) {
/* see if comp should double */
@ -177,12 +177,12 @@ int okay; /* zero if first move */
}
trymove (mvnum,swapped)
register int mvnum; /* number of move (rel zero) */
int mvnum; /* number of move (rel zero) */
int swapped; /* see if swapped also tested */
{
register int pos; /* position on board */
register int rval; /* value of roll */
int pos; /* position on board */
int rval; /* value of roll */
/* if recursed through all dice
* values, compare move */
@ -233,7 +233,7 @@ int swapped; /* see if swapped also tested */
struct BOARD *
bsave () {
register int i; /* index */
int i; /* index */
struct BOARD *now; /* current position */
now = nextfree (); /* get free BOARD */
@ -255,8 +255,8 @@ bsave () {
binsert (new)
struct BOARD *new; /* item to insert */
{
register struct BOARD *p = checkq; /* queue pointer */
register int result; /* comparison result */
struct BOARD *p = checkq; /* queue pointer */
int result; /* comparison result */
if (p == 0) { /* check if queue empty */
checkq = p = new;
@ -299,9 +299,9 @@ bcomp (a,b)
struct BOARD *a;
struct BOARD *b;
{
register int *aloc = a->b_board; /* pointer to board a */
register int *bloc = b->b_board; /* pointer to board b */
register int i; /* index */
int *aloc = a->b_board; /* pointer to board a */
int *bloc = b->b_board; /* pointer to board b */
int i; /* index */
int result; /* comparison result */
for (i = 0; i < 26; i++) { /* compare boards */
@ -313,11 +313,11 @@ struct BOARD *b;
}
mvcheck (incumbent,candidate)
register struct BOARD *incumbent;
register struct BOARD *candidate;
struct BOARD *incumbent;
struct BOARD *candidate;
{
register int i;
register int result;
int i;
int result;
for (i = 0; i < mvlim; i++) {
result = cturn*(candidate->b_st[i]-incumbent->b_st[i]);
@ -361,8 +361,8 @@ nextfree () {
pickmove () {
/* current game position */
register struct BOARD *now = bsave();
register struct BOARD *next; /* next move */
struct BOARD *now = bsave();
struct BOARD *next; /* next move */
#ifdef DEBUG
if (trace == NULL)
@ -382,9 +382,9 @@ pickmove () {
}
boardcopy (s)
register struct BOARD *s; /* game situation */
struct BOARD *s; /* game situation */
{
register int i; /* index */
int i; /* index */
for (i = 0; i < 26; i++)
board[i] = s->b_board[i];
@ -399,8 +399,8 @@ register struct BOARD *s; /* game situation */
}
movcmp () {
register int i;
register int c;
int i;
int c;
#ifdef DEBUG
if (trace == NULL)
@ -472,7 +472,7 @@ movcmp () {
}
movegood () {
register int n;
int n;
if (*offptr == 15)
return (1);

View File

@ -111,7 +111,7 @@ text (t)
const char *const *t;
{
register int i;
int i;
const char *s, *a;
fixtty (noech);

View File

@ -41,7 +41,7 @@ static char sccsid[] = "@(#)allow.c 8.1 (Berkeley) 5/31/93";
movallow () {
register int i, m, iold;
int i, m, iold;
int r;
if (d0)

View File

@ -44,7 +44,7 @@ static int i, j, k;
static char ln[60];
wrboard () {
register int l;
int l;
static const char bl[] =
"| | | |\n";
static const char sv[] =
@ -160,8 +160,8 @@ lastline:
}
wrbsub () {
register int m;
register char d;
int m;
char d;
if (board[k] > 0) {
m = board[k];

View File

@ -40,7 +40,7 @@ static char sccsid[] = "@(#)check.c 8.1 (Berkeley) 5/31/93";
#include "back.h"
getmove () {
register int i, c;
int i, c;
c = 0;
for (;;) {
@ -103,10 +103,10 @@ getmove () {
}
movokay (mv)
register int mv;
int mv;
{
register int i, m;
int i, m;
if (d0)
swap;

View File

@ -86,7 +86,7 @@ int realc;
int addbuf __P((int));
fboard () {
register int i, j, l;
int i, j, l;
curmove (0,0); /* do top line */
for (i = 0; i < 53; i++)
@ -200,9 +200,9 @@ int cpos; /* column of position */
int cnext; /* direction of position */
{
register int j; /* index */
register int n; /* number of men on position */
register int bct; /* counter */
int j; /* index */
int n; /* number of men on position */
int bct; /* counter */
int k; /* index */
char pc; /* color of men on position */
@ -254,7 +254,7 @@ int cnext; /* direction of position */
}
refresh() {
register int i, r, c;
int i, r, c;
r = curr; /* save current position */
c = curc;
@ -314,7 +314,7 @@ fixpos (old,new,r,c,inc)
int old, new, r, c, inc;
{
register int o, n, nv;
int o, n, nv;
int ov, nc;
char col;
@ -381,11 +381,10 @@ int old, new, r, c, inc;
}
fixcol (r,c,l,ch,inc)
register int l, ch;
int r, c, inc;
int l, ch, r, c, inc;
{
register int i;
int i;
curmove (r,c);
fancyc (ch);
@ -396,7 +395,7 @@ int r, c, inc;
}
curmove (r,c)
register int r, c;
int r, c;
{
if (curr == r && curc == c)
@ -410,9 +409,9 @@ register int r, c;
}
newpos () {
register int r; /* destination row */
register int c; /* destination column */
register int mode = -1; /* mode of movement */
int r; /* destination row */
int c; /* destination column */
int mode = -1; /* mode of movement */
int count = 1000; /* character count */
int i; /* index */
@ -577,7 +576,7 @@ newpos () {
}
clear () {
register int i;
int i;
/* double space if can't clear */
if (CL == 0) {
@ -595,9 +594,9 @@ clear () {
fancyc (c)
register char c; /* character to output */
char c; /* character to output */
{
register int sp; /* counts spaces in a tab */
int sp; /* counts spaces in a tab */
if (c == '\007') { /* bells go in blindly */
addbuf (c);
@ -651,8 +650,8 @@ register char c; /* character to output */
}
clend() {
register int i;
register char *s;
int i;
char *s;
if (CD) {
@ -673,9 +672,9 @@ clend() {
}
cline () {
register int i;
register int c;
register char *s;
int i;
int c;
char *s;
if (curc > linect[curr])
return;
@ -707,8 +706,8 @@ getcaps (s)
const char *s;
{
register char *code; /* two letter code */
register char ***cap; /* pointer to cap string */
char *code; /* two letter code */
char ***cap; /* pointer to cap string */
char *bufp; /* pointer to cap buffer */
char tentry[1024]; /* temporary uncoded caps buffer */

View File

@ -40,10 +40,10 @@ static char sccsid[] = "@(#)odds.c 8.1 (Berkeley) 5/31/93";
#include "back.h"
odds (r1,r2,val)
register int r1;
int r1;
int r2, val;
{
register int i, j;
int i, j;
if (r1 == 0) {
for (i = 0; i < 6; i++)
@ -65,9 +65,9 @@ int r2, val;
}
count () {
register int i;
register int j;
register int total;
int i;
int j;
int total;
total = 0;
for (i = 0; i < 6; i++)
@ -80,7 +80,7 @@ canhit (i,c)
int i, c;
{
register int j, k, b;
int j, k, b;
int a, d, diff, place, addon, menstuck;
if (c == 0)

View File

@ -40,10 +40,10 @@ static char sccsid[] = "@(#)one.c 8.1 (Berkeley) 5/31/93";
#include "back.h"
makmove (i)
register int i;
int i;
{
register int n, d;
int n, d;
int max;
d = d0;
@ -94,10 +94,10 @@ register int i;
}
moverr (i)
register int i;
int i;
{
register int j;
int j;
if (tflag)
curmove (20,0);
@ -117,7 +117,7 @@ register int i;
checkd (d)
register int d;
int d;
{
if (d0 != d)
@ -126,7 +126,7 @@ register int d;
}
last () {
register int i;
int i;
for (i = home-6*cturn; i != home; i += cturn)
if (board[i]*cturn > 0)
@ -134,17 +134,17 @@ last () {
}
movback (i)
register int i;
int i;
{
register int j;
int j;
for (j = i-1; j >= 0; j--)
backone(j);
}
backone (i)
register int i;
int i;
{
board[p[i]] += cturn;

View File

@ -53,11 +53,11 @@ static const char rec[] = "\" to recover your game.\n\n";
static const char cantrec[] = "Can't recover file: ";
save (n)
register int n;
int n;
{
register int fdesc;
register char *fs;
int fdesc;
char *fs;
char fname[50];
if (n) {
@ -148,7 +148,7 @@ recover (s)
const char *s;
{
register int i;
int i;
int fdesc;
if ((fdesc = open (s,O_RDONLY)) == -1)

View File

@ -63,7 +63,7 @@ const char *const descr[] = {
};
errexit (s)
register char *s;
char *s;
{
write (2,"\n",1);
perror (s);
@ -71,7 +71,7 @@ register char *s;
}
int addbuf (c)
register int c;
int c;
{
buffnum++;
@ -169,7 +169,7 @@ proll () {
wrint (n)
int n;
{
register int i, j, t;
int i, j, t;
for (i = 4; i > 0; i--) {
t = 1;
@ -182,7 +182,7 @@ int n;
}
gwrite() {
register int r, c;
int r, c;
if (tflag) {
r = curr;
@ -224,7 +224,7 @@ gwrite() {
}
quit () {
register int i;
int i;
if (tflag) {
curmove (20,0);
@ -245,10 +245,10 @@ quit () {
}
yorn (special)
register char special; /* special response */
char special; /* special response */
{
register char c;
register int i;
char c;
int i;
i = 1;
while ( (c = readc()) != 'Y' && c != 'N') {
@ -275,7 +275,7 @@ register char special; /* special response */
}
wrhit (i)
register int i;
int i;
{
writel ("Blot hit on ");
wrint (i);
@ -284,7 +284,7 @@ register int i;
}
nexturn () {
register int c;
int c;
cturn = -cturn;
c = cturn/abs(cturn);
@ -299,11 +299,11 @@ nexturn () {
}
getarg (argc, argv)
register int argc;
register char **argv;
int argc;
char **argv;
{
register char ch;
char ch;
extern int optind;
extern char *optarg;
int i;
@ -384,7 +384,7 @@ register char **argv;
}
init () {
register int i;
int i;
for (i = 0; i < 26;)
board[i++] = 0;
board[1] = 2;
@ -435,9 +435,9 @@ getout () {
exit(0);
}
roll () {
register char c;
register int row;
register int col;
char c;
int row;
int col;
if (iroll) {
if (tflag) {

View File

@ -81,8 +81,8 @@ checkmove (ist)
int ist;
{
register int j, n;
register char c;
int j, n;
char c;
char a;
domove:
@ -202,10 +202,10 @@ dochar:
dotable (c,i)
char c;
register int i;
int i;
{
register int a, j;
int a, j;
int test;
test = (c == 'R');
@ -298,7 +298,7 @@ register int i;
}
rsetbrd () {
register int i, j, n;
int i, j, n;
n = 0;
mvl = 0;

View File

@ -82,7 +82,7 @@ int argc;
char **argv;
{
register int i;
int i;
/* revoke privs */
setgid(getgid());
@ -160,7 +160,7 @@ char **argv;
}
leave() {
register int i;
int i;
if (tflag)
clear();
else

View File

@ -49,7 +49,7 @@ static const char better[] = "That is a legal move, but there is a better one.\n
void
tutor () {
register int i, j;
int i, j;
i = 0;
begscr = 18;
@ -133,7 +133,7 @@ tutor () {
}
clrest () {
register int r, c, j;
int r, c, j;
r = curr;
c = curc;

View File

@ -66,7 +66,7 @@ convert(tothis) /* Converts day to night and vice versa. */
int tothis; /* Day objects are permanent. Night objects are added*/
{ /* at dusk, and subtracted at dawn. */
const struct objs *p;
register i, j;
int i, j;
if (tothis == TONIGHT) {
for (i = 1; i <= NUMOFROOMS; i++)
@ -87,7 +87,7 @@ int tothis; /* Day objects are permanent. Night objects are added*/
news()
{
register int n;
int n;
int hurt;
if (gtime > 30 && position < 32){

View File

@ -41,7 +41,7 @@ static char sccsid[] = "@(#)com2.c 8.1 (Berkeley) 5/31/93";
wearit() /* synonyms = {sheathe, sheath} */
{
register int n;
int n;
int firstnumber, value;
firstnumber = wordnumber;
@ -160,7 +160,7 @@ use()
murder()
{
register int n;
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; n++);
if (n == NUMOFOBJECTS)

View File

@ -65,7 +65,7 @@ dig()
jump()
{
register int n;
int n;
switch(position){
default:
@ -167,7 +167,7 @@ bury()
drink()
{
register int n;
int n;
if (testbit(inven,POTION)){
puts("The cool liquid runs down your throat but turns to fire and you choke.");
@ -188,7 +188,7 @@ drink()
shoot()
{
int firstnumber, value;
register int n;
int n;
firstnumber = wordnumber;
if (!testbit(inven,LASER))

View File

@ -44,7 +44,7 @@ take(from)
unsigned int from[];
{
int firstnumber, heavy, bulky, value;
register int n;
int n;
firstnumber = wordnumber;
if (wordnumber < wordcount && wordvalue[wordnumber+1] == OFF){

View File

@ -80,7 +80,7 @@ kiss()
love()
{
register int n;
int n;
while (wordtype[++wordnumber] != NOUNS && wordnumber <= wordcount);
if (wordtype[wordnumber] == NOUNS && testbit(location[position].objects,wordvalue[wordnumber])){
@ -126,7 +126,7 @@ love()
zzz()
{
int oldtime;
register int n;
int n;
oldtime = gtime;
if ((snooze - gtime) < (0.75 * CYCLE)){

View File

@ -41,7 +41,7 @@ static char sccsid[] = "@(#)cypher.c 8.1 (Berkeley) 5/31/93";
cypher()
{
register int n;
int n;
int junk;
int lflag = -1;
char buffer[10];

View File

@ -178,7 +178,7 @@ visual()
screen()
{
register int r,c,n;
int r,c,n;
int i;
clear();
@ -194,7 +194,7 @@ screen()
target()
{
register int n;
int n;
move(MIDR,MIDC-10);
addstr("------- + -------");
@ -206,7 +206,7 @@ target()
notarget()
{
register int n;
int n;
move(MIDR,MIDC-10);
addstr(" ");
@ -218,7 +218,7 @@ notarget()
blast()
{
register int n;
int n;
alarm(0);
move(LINES-1, 24);

View File

@ -69,8 +69,8 @@ getcom(buf, size, prompt, error)
*/
char *
getword(buf1, buf2, flag)
register char *buf1, *buf2;
register flag;
char *buf1, *buf2;
int flag;
{
while (isspace(*buf1))
buf1++;

View File

@ -45,7 +45,7 @@ card(array, size) /* for beenthere, injuries */
int size;
{
const char *end = array + size;
register int i = 0;
int i = 0;
while (array < end)
if (*array++)
@ -57,7 +57,7 @@ int
ucard(array)
const unsigned int *array;
{
register int j = 0, n;
int j = 0, n;
for (n = 0; n < NUMOFOBJECTS; n++)
if (testbit(array, n))

View File

@ -41,7 +41,7 @@ static char sccsid[] = "@(#)parse.c 8.1 (Berkeley) 5/31/93";
wordinit()
{
register struct wlist *w;
struct wlist *w;
for (w = wlist; w->string; w++)
install(w);
@ -51,7 +51,7 @@ int
hash(s)
const char *s;
{
register hashval = 0;
int hashval = 0;
while (*s) {
hashval += *s++;
@ -65,7 +65,7 @@ struct wlist *
lookup(s)
const char *s;
{
register struct wlist *wp;
struct wlist *wp;
for (wp = hashtab[hash(s)]; wp != NULL; wp = wp->next)
if (*s == *wp->string && strcmp(s, wp->string) == 0)
@ -74,7 +74,7 @@ lookup(s)
}
install(wp)
register struct wlist *wp;
struct wlist *wp;
{
int hashval;
@ -88,8 +88,8 @@ install(wp)
parse()
{
register struct wlist *wp;
register n;
struct wlist *wp;
int n;
wordnumber = 0; /* for cypher */
for (n = 0; n <= wordcount; n++) {

View File

@ -43,7 +43,7 @@ writedes()
{
int compass;
const char *p;
register c;
int c;
printf("\n\t%s\n", location[position].name);
if (beenthere[position] < 3) {
@ -61,8 +61,8 @@ writedes()
printobjs()
{
register int *p = location[position].objects;
register n;
int *p = location[position].objects;
int n;
printf("\n");
for (n = 0; n < NUMOFOBJECTS; n++)

View File

@ -50,9 +50,9 @@ restore()
{
char *home;
char home1[MAXPATHLEN];
register int n;
int n;
int tmp;
register FILE *fp;
FILE *fp;
if ( (home = getenv("HOME")) != NULL)
sprintf(home1, "%.*s/Bstar", MAXPATHLEN - 7, home);
@ -108,7 +108,7 @@ save()
struct stat sbuf;
char *home;
char home1[MAXPATHLEN];
register int n;
int n;
int tmp, fd;
FILE *fp;

View File

@ -149,11 +149,11 @@ main(argc, argv)
#define COLUMNS 48
printcard(str)
register char *str;
char *str;
{
static char rowchars[] = " 123456789";
register int i, row;
register char *p;
int i, row;
char *p;
char *index();
/* ruthlessly remove newlines and truncate at 48 characters. */

View File

@ -306,8 +306,8 @@ static void randomplace(b, ss)
int b;
ship_t *ss;
{
register int bwidth = BWIDTH - ss->length;
register int bdepth = BDEPTH - ss->length;
int bwidth = BWIDTH - ss->length;
int bdepth = BDEPTH - ss->length;
do {
ss->y = rnd(bdepth);
@ -702,7 +702,7 @@ static int awinna()
}
static ship_t *hitship(x, y)
/* register a hit on the targeted ship */
/* a hit on the targeted ship */
int x, y;
{
ship_t *sb, *ss;
@ -1113,7 +1113,7 @@ static void do_options(c,op)
int c;
char *op[];
{
register int i;
int i;
if (c > 1)
{
@ -1167,8 +1167,8 @@ char *op[];
static int scount(who)
int who;
{
register int i, shots;
register ship_t *sp;
int i, shots;
ship_t *sp;
if (who)
sp = cpuship; /* count cpu shots */
@ -1210,7 +1210,7 @@ char *argv[];
}
else
{
register int i;
int i;
i = scount(turn);
while (i--)

View File

@ -87,8 +87,8 @@ main(argc, argv)
int argc;
char **argv;
{
register int ch, dot, i, nread, winnerdot = 0;
register char *inbuf;
int ch, dot, i, nread, winnerdot = 0;
char *inbuf;
int obs[26], try, winner;
/* revoke setgid privileges */
@ -159,7 +159,7 @@ main(argc, argv)
void printit(arg)
char *arg;
{
register int ch, rot;
int ch, rot;
if ((rot = atoi(arg)) < 0) {
(void)fprintf(stderr, "caesar: bad rotation value.\n");

View File

@ -632,7 +632,7 @@ fndbase(cp, column, row)
*/
initgame()
{
register i;
int i;
for (i=0; i<18; i++) {
deck[i]->visible = TRUE;
@ -677,7 +677,7 @@ initgame()
*/
startgame()
{
register int j;
int j;
shuffle(deck);
initgame();
@ -907,7 +907,7 @@ movetotalon()
showstat()
{
int row, col;
register struct cardtype *ptr;
struct cardtype *ptr;
if (!Cflag)
return;
@ -1003,7 +1003,7 @@ usedstock()
*/
showcards()
{
register struct cardtype *ptr;
struct cardtype *ptr;
int row;
if (!Cflag || cardsoff == 52)
@ -1053,7 +1053,7 @@ updatebettinginfo()
long thiscosts, gamecosts, totalcosts;
double thisreturn, gamereturn, totalreturn;
time_t now;
register long dollars;
long dollars;
time(&now);
dollars = (now - acctstart) / secondsperdollar;
@ -1163,7 +1163,7 @@ tabprint(sour, des)
* procedure to move from the tableau to the tableau
*/
tabtotab(sour, des)
register int sour, des;
int sour, des;
{
struct cardtype *temp;
@ -1536,7 +1536,7 @@ char *bettinginstructions[] = {
*/
instruct()
{
register char **cp;
char **cp;
move(originrow, origincol);
printw("This is the game of solitaire called Canfield. Do\n");

View File

@ -66,7 +66,7 @@ main(argc, argv)
int argc;
char *argv[];
{
register struct passwd *pw;
struct passwd *pw;
int uid;
if (argc > 2) {
@ -108,7 +108,7 @@ main(argc, argv)
* print out info for specified password entry
*/
printuser(pw, printfail)
register struct passwd *pw;
struct passwd *pw;
int printfail;
{
struct betinfo total;

View File

@ -53,7 +53,7 @@ void
makedeck(d)
CARD d[];
{
register int i, j, k;
int i, j, k;
srandomdev();
k = 0;
@ -72,7 +72,7 @@ void
shuffle(d)
CARD d[];
{
register int j, k;
int j, k;
CARD c;
for (j = CARDS; j > 0; --j) {
@ -101,7 +101,7 @@ isone(a, b, n)
CARD a, b[];
int n;
{
register int i;
int i;
for (i = 0; i < n; i++)
if (eq(a, b[i]))
@ -117,7 +117,7 @@ cremove(a, d, n)
CARD a, d[];
int n;
{
register int i, j;
int i, j;
for (i = j = 0; i < n; i++)
if (!eq(a, d[i]))
@ -132,10 +132,10 @@ cremove(a, d, n)
*/
void
sorthand(h, n)
register CARD h[];
CARD h[];
int n;
{
register CARD *cp, *endp;
CARD *cp, *endp;
CARD c;
for (endp = &h[n]; h < endp - 1; h++)

View File

@ -195,7 +195,7 @@ gamescore()
void
game()
{
register int i, j;
int i, j;
BOOLEAN flag;
BOOLEAN compcrib;
@ -286,7 +286,7 @@ int
playhand(mycrib)
BOOLEAN mycrib;
{
register int deckpos;
int deckpos;
werase(Compwin);
@ -315,7 +315,7 @@ int
deal(mycrib)
BOOLEAN mycrib;
{
register int i, j;
int i, j;
for (i = j = 0; i < FULLHAND; i++) {
if (mycrib) {
@ -338,7 +338,7 @@ void
discard(mycrib)
BOOLEAN mycrib;
{
register char *prompt;
char *prompt;
CARD crd;
prcrib(mycrib, TRUE);
@ -369,7 +369,7 @@ cut(mycrib, pos)
BOOLEAN mycrib;
int pos;
{
register int i;
int i;
BOOLEAN win;
win = FALSE;
@ -412,7 +412,7 @@ void
prcrib(mycrib, blank)
BOOLEAN mycrib, blank;
{
register int y, cardx;
int y, cardx;
if (mycrib)
cardx = CRIB_X;
@ -443,10 +443,10 @@ peg(mycrib)
BOOLEAN mycrib;
{
static CARD ch[CINHAND], ph[CINHAND];
register int i, j, k;
register int l;
register int cnum, pnum, sum;
register BOOLEAN myturn, mego, ugo, last, played;
int i, j, k;
int l;
int cnum, pnum, sum;
BOOLEAN myturn, mego, ugo, last, played;
CARD crd;
cnum = pnum = CINHAND;

View File

@ -169,7 +169,7 @@ prhand(h, n, win, blank)
WINDOW *win;
BOOLEAN blank;
{
register int i;
int i;
werase(win);
for (i = 0; i < n; i++)
@ -188,7 +188,7 @@ infrom(hand, n, prompt)
int n;
char *prompt;
{
register int i, j;
int i, j;
CARD crd;
if (n < 1) {
@ -242,7 +242,7 @@ int
incard(crd)
CARD *crd;
{
register int i;
int i;
int rnk, sut;
char *line, *p, *p1;
BOOLEAN retval;
@ -326,7 +326,7 @@ gotit:
int
getuchar()
{
register int c;
int c;
c = readchar();
if (islower(c))
@ -345,8 +345,8 @@ number(lo, hi, prompt)
int lo, hi;
char *prompt;
{
register char *p;
register int sum;
char *p;
int sum;
for (sum = 0;;) {
msg(prompt);
@ -441,8 +441,8 @@ void
endmsg()
{
static int lastline = 0;
register int len;
register char *mp, *omp;
int len;
char *mp, *omp;
/* All messages should start with uppercase */
mvaddch(lastline + Y_MSG_START, SCORE_X, ' ');
@ -510,9 +510,9 @@ do_wait()
*/
void
wait_for(ch)
register int ch;
int ch;
{
register char c;
char c;
if (ch == '\n')
while ((c = readchar()) != '\n')
@ -529,7 +529,7 @@ wait_for(ch)
int
readchar()
{
register int cnt;
int cnt;
char c;
over:
@ -557,9 +557,9 @@ over:
char *
getline()
{
register char *sp;
register int c, oy, ox;
register WINDOW *oscr;
char *sp;
int c, oy, ox;
WINDOW *oscr;
oscr = stdscr;
stdscr = Msgwin;
@ -572,7 +572,7 @@ getline()
else
if (c == erasechar()) { /* process erase character */
if (sp > linebuf) {
register int i;
int i;
sp--;
for (i = strlen(unctrl(*sp)); i; i--)

View File

@ -105,15 +105,15 @@ static int pairpoints, runpoints; /* Globals from pairuns. */
*/
int
scorehand(hand, starter, n, crb, do_explain)
register CARD hand[];
CARD hand[];
CARD starter;
int n;
BOOLEAN crb; /* true if scoring crib */
BOOLEAN do_explain; /* true if must explain this hand */
{
register int i, k;
register int score;
register BOOLEAN flag;
int i, k;
int score;
BOOLEAN flag;
CARD h[(CINHAND + 1)];
char buf[32];
@ -180,12 +180,12 @@ scorehand(hand, starter, n, crb, do_explain)
*/
int
fifteens(hand, n)
register CARD hand[];
CARD hand[];
int n;
{
register int *sp, *np;
register int i;
register CARD *endp;
int *sp, *np;
int i;
CARD *endp;
static int sums[15], nsums[15];
np = nsums;
@ -226,7 +226,7 @@ pairuns(h, n)
CARD h[];
int n;
{
register int i;
int i;
int runlength, runmult, lastmult, curmult;
int mult1, mult2, pair1, pair2;
BOOLEAN run;
@ -296,7 +296,7 @@ pegscore(crd, tbl, n, sum)
int n, sum;
{
BOOLEAN got[RANKS];
register int i, j, scr;
int i, j, scr;
int k, lo, hi;
sum += VAL(crd.rank);

View File

@ -58,7 +58,7 @@ cchose(h, n, s)
CARD h[];
int n, s;
{
register int i, j, l;
int i, j, l;
if (n <= 1)
return (0);
@ -128,8 +128,8 @@ plyrhand(hand, s)
char *s;
{
static char prompt[BUFSIZ];
register int i, j;
register BOOLEAN win;
int i, j;
BOOLEAN win;
prhand(hand, CINHAND, Playwin, FALSE);
(void) sprintf(prompt, "Your %s scores ", s);
@ -163,7 +163,7 @@ comphand(h, s)
CARD h[];
char *s;
{
register int j;
int j;
j = scorehand(h, turnover, CINHAND, strcmp(s, "crib") == 0, FALSE);
prhand(h, CINHAND, Compwin, FALSE);
@ -202,11 +202,11 @@ chkscr(scr, inc)
*/
void
prpeg(score, peg, myturn)
register int score;
int score;
int peg;
BOOLEAN myturn;
{
register int y, x;
int y, x;
if (!myturn)
y = SCORE_Y + 2;
@ -244,7 +244,7 @@ cdiscard(mycrib)
BOOLEAN mycrib;
{
CARD d[CARDS], h[FULLHAND], cb[2];
register int i, j, k;
int i, j, k;
int nc, ns;
long sums[15];
static int undo1[15] = {0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 3, 3, 4};
@ -297,7 +297,7 @@ anymove(hand, n, sum)
CARD hand[];
int n, sum;
{
register int i, j;
int i, j;
if (n < 1)
return (FALSE);
@ -318,7 +318,7 @@ anysumto(hand, n, s, t)
CARD hand[];
int n, s, t;
{
register int i;
int i;
for (i = 0; i < n; i++) {
if (s + VAL(hand[i].rank) == t)
@ -335,7 +335,7 @@ numofval(h, n, v)
CARD h[];
int n, v;
{
register int i, j;
int i, j;
j = 0;
for (i = 0; i < n; i++) {
@ -353,7 +353,7 @@ makeknown(h, n)
CARD h[];
int n;
{
register int i;
int i;
for (i = 0; i < n; i++)
known[knownum++] = h[i];

View File

@ -252,7 +252,7 @@ load()
users()
{
register int nusers, utmp;
int nusers, utmp;
struct utmp buf;
if ((utmp = open(_PATH_UTMP, O_RDONLY, 0)) < 0) {
@ -268,7 +268,7 @@ users()
nogamefile()
{
register int fd, n;
int fd, n;
char buf[BUFSIZ];
if ((fd = open(_PATH_NOGAMES, O_RDONLY, 0)) >= 0) {

View File

@ -125,8 +125,8 @@ istart: for (;;) {
usermove()
{
register int n;
register char **p;
int n;
char **p;
char buf[256];
(void)printf("\nYour hand is:");
@ -196,7 +196,7 @@ compmove()
promove()
{
register int i, max;
int i, max;
for (i = 0; i < RANKS; ++i)
if (userasked[i] &&
@ -295,9 +295,9 @@ goodmove(player, move, hand, opphand)
chkwinner(player, hand)
int player;
register int *hand;
int *hand;
{
register int cb, i, ub;
int cb, i, ub;
for (i = 0; i < RANKS; ++i)
if (hand[i] > 0 && hand[i] < CARDS)
@ -338,7 +338,7 @@ printplayer(player)
printhand(hand)
int *hand;
{
register int book, i, j;
int book, i, j;
for (book = i = 0; i < RANKS; i++)
if (hand[i] < CARDS)
@ -356,9 +356,9 @@ printhand(hand)
}
countcards(hand)
register int *hand;
int *hand;
{
register int i, count;
int i, count;
for (count = i = 0; i < RANKS; i++)
count += *hand++;
@ -383,7 +383,7 @@ countbooks(hand)
init()
{
register int i, rank;
int i, rank;
for (i = 0; i < RANKS; ++i)
deck[i] = CARDS;

View File

@ -241,8 +241,8 @@ void
display(fp)
FILEDESC *fp;
{
register char *p;
register unsigned char ch;
char *p;
unsigned char ch;
char line[BUFSIZ];
open_fp(fp);
@ -274,7 +274,7 @@ FILEDESC *fp;
int
fortlen()
{
register int nchar;
int nchar;
char line[BUFSIZ];
if (!(Fortfile->tbl.str_flags & (STR_RANDOM | STR_ORDERED)))
@ -296,12 +296,12 @@ fortlen()
*/
void
getargs(argc, argv)
register int argc;
register char **argv;
int argc;
char **argv;
{
register int ignore_case;
int ignore_case;
# ifndef NO_REGEX
register char *pat;
char *pat;
# endif /* NO_REGEX */
extern char *optarg;
extern int optind;
@ -400,11 +400,11 @@ register char **argv;
*/
int
form_file_list(files, file_cnt)
register char **files;
register int file_cnt;
char **files;
int file_cnt;
{
register int i, percent;
register char *sp;
int i, percent;
char *sp;
if (file_cnt == 0) {
if (Find_files) {
@ -465,16 +465,16 @@ register int file_cnt;
int
add_file(percent, file, dir, head, tail, parent)
int percent;
register char *file;
char *file;
char *dir;
FILEDESC **head, **tail;
FILEDESC *parent;
{
register FILEDESC *fp;
register int fd;
register char *path, *offensive;
register bool was_malloc;
register bool isdir;
FILEDESC *fp;
int fd;
char *path, *offensive;
bool was_malloc;
bool isdir;
if (dir == NULL) {
path = file;
@ -595,7 +595,7 @@ over:
FILEDESC *
new_fp()
{
register FILEDESC *fp;
FILEDESC *fp;
fp = (FILEDESC *) do_malloc(sizeof *fp);
fp->datfd = -1;
@ -648,12 +648,12 @@ char *file;
*/
void
all_forts(fp, offensive)
register FILEDESC *fp;
FILEDESC *fp;
char *offensive;
{
register char *sp;
register FILEDESC *scene, *obscene;
register int fd;
char *sp;
FILEDESC *scene, *obscene;
int fd;
auto char *datfile, *posfile;
if (fp->child != NULL) /* this is a directory, not a file */
@ -698,10 +698,10 @@ char *offensive;
*/
int
add_dir(fp)
register FILEDESC *fp;
FILEDESC *fp;
{
register DIR *dir;
register struct dirent *dirent;
DIR *dir;
struct dirent *dirent;
auto FILEDESC *tailp;
auto char *name;
@ -759,9 +759,9 @@ is_fortfile(file, datp, posp, check_for_offend)
char *file, **datp, **posp;
int check_for_offend;
{
register int i;
register char *sp;
register char *datfile;
int i;
char *sp;
char *datfile;
static char *suflist[] = { /* list of "illegal" suffixes" */
"dat", "pos", "c", "h", "p", "i", "f",
"pas", "ftn", "ins.c", "ins,pas",
@ -886,8 +886,8 @@ void *ptr;
void
init_prob()
{
register FILEDESC *fp, *last = NULL;
register int percent, num_noprob, frac;
FILEDESC *fp, *last = NULL;
int percent, num_noprob, frac;
/*
* Distribute the residual probability (if any) across all
@ -958,8 +958,8 @@ init_prob()
void
get_fort()
{
register FILEDESC *fp;
register int choice;
FILEDESC *fp;
int choice;
if (File_list->next == NULL || File_list->percent == NO_PROB)
fp = File_list;
@ -1022,8 +1022,8 @@ FILEDESC *
pick_child(parent)
FILEDESC *parent;
{
register FILEDESC *fp;
register int choice;
FILEDESC *fp;
int choice;
if (Equal_probs) {
choice = random() % parent->num_children;
@ -1057,7 +1057,7 @@ FILEDESC *parent;
*/
void
sum_noprobs(fp)
register FILEDESC *fp;
FILEDESC *fp;
{
static bool did_noprobs = FALSE;
@ -1074,7 +1074,7 @@ register FILEDESC *fp;
int
max(i, j)
register int i, j;
int i, j;
{
return (i >= j ? i : j);
}
@ -1148,7 +1148,7 @@ get_tbl(fp)
FILEDESC *fp;
{
auto int fd;
register FILEDESC *child;
FILEDESC *child;
if (fp->read_tbl)
return;
@ -1185,7 +1185,7 @@ FILEDESC *fp;
*/
void
zero_tbl(tp)
register STRFILE *tp;
STRFILE *tp;
{
tp->str_numstr = 0;
tp->str_longlen = 0;
@ -1198,7 +1198,7 @@ register STRFILE *tp;
*/
void
sum_tbl(t1, t2)
register STRFILE *t1, *t2;
STRFILE *t1, *t2;
{
t1->str_numstr += t2->str_numstr;
if (t1->str_longlen < t2->str_longlen)
@ -1225,7 +1225,7 @@ print_file_list()
*/
void
print_list(list, lev)
register FILEDESC *list;
FILEDESC *list;
int lev;
{
while (list != NULL) {
@ -1251,11 +1251,11 @@ int lev;
*/
char *
conv_pat(orig)
register char *orig;
char *orig;
{
register char *sp;
register unsigned int cnt;
register char *new;
char *sp;
unsigned int cnt;
char *new;
cnt = 1; /* allow for '\0' */
for (sp = orig; *sp != '\0'; sp++)
@ -1314,8 +1314,8 @@ int
maxlen_in_list(list)
FILEDESC *list;
{
register FILEDESC *fp;
register int len, maxlen;
FILEDESC *fp;
int len, maxlen;
maxlen = 0;
for (fp = list; fp != NULL; fp = fp->next) {
@ -1340,8 +1340,8 @@ void
matches_in_list(list)
FILEDESC *list;
{
register char *sp, *p;
register FILEDESC *fp;
char *sp, *p;
FILEDESC *fp;
int in_file;
unsigned char ch;

View File

@ -147,12 +147,12 @@ int main(ac, av)
int ac;
char **av;
{
register char *sp, dc;
register FILE *inf, *outf;
register long last_off, length, pos, *p;
register int first, cnt;
register char *nsp;
register STR *fp;
char *sp, dc;
FILE *inf, *outf;
long last_off, length, pos, *p;
int first, cnt;
char *nsp;
STR *fp;
static char string[257];
(void) setlocale(LC_ALL, "");
@ -349,9 +349,9 @@ long off;
*/
void do_order()
{
register int i;
register long *lp;
register STR *fp;
int i;
long *lp;
STR *fp;
Sort_1 = fopen(Infile, "r");
Sort_2 = fopen(Infile, "r");
@ -390,8 +390,8 @@ static int collate_range_cmp (c1, c2)
int cmp_str(p1, p2)
STR *p1, *p2;
{
register int c1, c2;
register int n1, n2;
int c1, c2;
int n1, n2;
int r;
# define SET_N(nf,ch) (nf = (ch == '\n'))
@ -441,9 +441,9 @@ STR *p1, *p2;
*/
void randomize()
{
register int cnt, i;
register long tmp;
register long *sp;
int cnt, i;
long tmp;
long *sp;
srandomdev();

View File

@ -112,7 +112,7 @@ char **av;
}
void getargs(av)
register char *av[];
char *av[];
{
if (!*++av) {
(void) fprintf(stderr, "usage: unstr datafile\n");
@ -124,10 +124,10 @@ register char *av[];
}
void order_unstr(tbl)
register STRFILE *tbl;
STRFILE *tbl;
{
register int i;
register char *sp;
int i;
char *sp;
long pos;
char buf[BUFSIZ];

View File

@ -24,9 +24,9 @@ long dummy = ftell(stderr);
long *
alloc(lth)
register unsigned lth;
unsigned lth;
{
register char *ptr;
char *ptr;
if(!(ptr = malloc(lth)))
panic("Cannot get %d bytes", lth);
@ -35,10 +35,10 @@ register unsigned lth;
long *
enlarge(ptr,lth)
register char *ptr;
register unsigned lth;
char *ptr;
unsigned lth;
{
register char *nptr;
char *nptr;
if(!(nptr = realloc(ptr,lth)))
panic("Cannot reallocate %d bytes", lth);

View File

@ -17,8 +17,8 @@ static void use_camera(), use_ice_box(), use_whistle(), use_magic_whistle();
static int use_pick_axe();
doapply() {
register struct obj *obj;
register int res = 1;
struct obj *obj;
int res = 1;
obj = getobj("(", "use or apply");
if(!obj) return(0);
@ -65,8 +65,8 @@ doapply() {
/* ARGSUSED */
static void
use_camera(obj) /* register */ struct obj *obj; {
register struct monst *mtmp;
use_camera(obj) /* */ struct obj *obj; {
struct monst *mtmp;
if(!getdir(1)){ /* ask: in what direction? */
flags.move = multi = 0;
return;
@ -87,8 +87,8 @@ register struct monst *mtmp;
} else
if(mtmp->data->mlet != 'y')
if(mtmp->mcansee || mtmp->mblinded){
register int tmp = dist(mtmp->mx,mtmp->my);
register int tmp2;
int tmp = dist(mtmp->mx,mtmp->my);
int tmp2;
if(cansee(mtmp->mx,mtmp->my))
pline("%s is blinded by the flash!", Monnam(mtmp));
setmangry(mtmp);
@ -112,7 +112,7 @@ static
struct obj *current_ice_box; /* a local variable of use_ice_box, to be
used by its local procedures in/ck_ice_box */
static
in_ice_box(obj) register struct obj *obj; {
in_ice_box(obj) struct obj *obj; {
if(obj == current_ice_box ||
(Punished && (obj == uball || obj == uchain))){
pline("You must be kidding.");
@ -143,13 +143,13 @@ in_ice_box(obj) register struct obj *obj; {
}
static
ck_ice_box(obj) register struct obj *obj; {
ck_ice_box(obj) struct obj *obj; {
return(obj->o_cnt_id == current_ice_box->o_id);
}
static
out_ice_box(obj) register struct obj *obj; {
register struct obj *otmp;
out_ice_box(obj) struct obj *obj; {
struct obj *otmp;
if(obj == fcobj) fcobj = fcobj->nobj;
else {
for(otmp = fcobj; otmp->nobj != obj; otmp = otmp->nobj)
@ -162,9 +162,9 @@ register struct obj *otmp;
}
static void
use_ice_box(obj) register struct obj *obj; {
register int cnt = 0;
register struct obj *otmp;
use_ice_box(obj) struct obj *obj; {
int cnt = 0;
struct obj *otmp;
current_ice_box = obj; /* for use by in/out_ice_box */
for(otmp = fcobj; otmp; otmp = otmp->nobj)
if(otmp->o_cnt_id == obj->o_id)
@ -186,9 +186,9 @@ register struct obj *otmp;
static
struct monst *
bchit(ddx,ddy,range,sym) register int ddx,ddy,range; char sym; {
register struct monst *mtmp = (struct monst *) 0;
register int bchx = u.ux, bchy = u.uy;
bchit(ddx,ddy,range,sym) int ddx,ddy,range; char sym; {
struct monst *mtmp = (struct monst *) 0;
int bchx = u.ux, bchy = u.uy;
if(sym) Tmp_at(-1, sym); /* open call */
while(range--) {
@ -210,7 +210,7 @@ bchit(ddx,ddy,range,sym) register int ddx,ddy,range; char sym; {
/* ARGSUSED */
static void
use_whistle(obj) struct obj *obj; {
register struct monst *mtmp = fmon;
struct monst *mtmp = fmon;
pline("You produce a high whistling sound.");
while(mtmp) {
if(dist(mtmp->mx,mtmp->my) < u.ulevel*20) {
@ -226,7 +226,7 @@ register struct monst *mtmp = fmon;
/* ARGSUSED */
static void
use_magic_whistle(obj) struct obj *obj; {
register struct monst *mtmp = fmon;
struct monst *mtmp = fmon;
pline("You produce a strange whistling sound.");
while(mtmp) {
if(mtmp->mtame) mnexto(mtmp);
@ -241,8 +241,8 @@ static boolean dig_down;
static
dig() {
register struct rm *lev;
register dpx = dig_pos.x, dpy = dig_pos.y;
struct rm *lev;
dpx = dig_pos.x, dpy = dig_pos.y;
/* perhaps a nymph stole his pick-axe while he was busy digging */
/* or perhaps he teleported away */
@ -263,7 +263,7 @@ dig() {
return(0); /* done with digging */
}
if(dig_effort > 50) {
register struct trap *ttmp = t_at(dpx,dpy);
struct trap *ttmp = t_at(dpx,dpy);
if(!ttmp) {
ttmp = maketrap(dpx,dpy,PIT);
@ -276,8 +276,8 @@ dig() {
}
} else
if(dig_effort > 100) {
register char *digtxt;
register struct obj *obj;
char *digtxt;
struct obj *obj;
lev = &levl[dpx][dpy];
if(obj = sobj_at(ENORMOUS_ROCK, dpx, dpy)) {
@ -298,7 +298,7 @@ dig() {
return(0);
} else {
if(IS_WALL(levl[dpx][dpy].typ)) {
register int rno = inroom(dpx,dpy);
int rno = inroom(dpx,dpy);
if(rno >= 0 && rooms[rno].rtype >= 8) {
pline("This wall seems too hard to dig into.");
@ -317,7 +317,7 @@ holetime() {
dighole()
{
register struct trap *ttmp = t_at(u.ux, u.uy);
struct trap *ttmp = t_at(u.ux, u.uy);
if(!xdnstair) {
pline("The floor here seems too hard to dig in.");
@ -347,10 +347,10 @@ struct obj *obj;
{
char dirsyms[12];
extern char sdir[];
register char *dsp = dirsyms, *sdp = sdir;
register struct monst *mtmp;
register struct rm *lev;
register int rx, ry, res = 0;
char *dsp = dirsyms, *sdp = sdir;
struct monst *mtmp;
struct rm *lev;
int rx, ry, res = 0;
if(obj != uwep) {
if(uwep && uwep->cursed) {

View File

@ -12,10 +12,10 @@ char bones[] = "bones_xx";
/* save bones and possessions of a deceased adventurer */
savebones(){
register fd;
register struct obj *otmp;
register struct trap *ttmp;
register struct monst *mtmp;
fd;
struct obj *otmp;
struct trap *ttmp;
struct monst *mtmp;
if(dlevel <= 0 || dlevel > MAXLEVEL) return;
if(!rn2(1 + dlevel/2)) return; /* not so many ghosts on low levels */
bones[6] = '0' + (dlevel/10);
@ -74,7 +74,7 @@ register struct monst *mtmp;
}
getbones(){
register fd,x,y,ok;
fd,x,y,ok;
if(rn2(3)) return(0); /* only once in three times do we find bones */
bones[6] = '0' + dlevel/10;
bones[7] = '0' + dlevel%10;

View File

@ -17,8 +17,8 @@ extern boolean hmon();
3. when walking out of a lit room
*/
unsee() {
register x,y;
register struct rm *lev;
x,y;
struct rm *lev;
/*
if(u.udispl){
@ -53,8 +53,8 @@ unsee() {
*/
seeoff(mode) /* 1 to redo @, 0 to leave them */
{ /* 1 means misc movement, 0 means blindness */
register x,y;
register struct rm *lev;
x,y;
struct rm *lev;
if(u.udispl && mode){
u.udispl = 0;
@ -79,10 +79,10 @@ seeoff(mode) /* 1 to redo @, 0 to leave them */
domove()
{
xchar oldx,oldy;
register struct monst *mtmp;
register struct rm *tmpr,*ust;
struct monst *mtmp;
struct rm *tmpr,*ust;
struct trap *trap;
register struct obj *otmp;
struct obj *otmp;
u_wipe_engr(rnd(5));
@ -156,8 +156,8 @@ domove()
return;
}
while(otmp = sobj_at(ENORMOUS_ROCK, u.ux+u.dx, u.uy+u.dy)) {
register xchar rx = u.ux+2*u.dx, ry = u.uy+2*u.dy;
register struct trap *ttmp;
xchar rx = u.ux+2*u.dx, ry = u.uy+2*u.dy;
struct trap *ttmp;
nomul(0);
if(isok(rx,ry) && !IS_ROCK(levl[rx][ry].typ) &&
(levl[rx][ry].typ != DOOR || !(u.dx && u.dy)) &&
@ -308,8 +308,8 @@ domove()
}
movobj(obj, ox, oy)
register struct obj *obj;
register int ox, oy;
struct obj *obj;
int ox, oy;
{
/* Some dirty programming to get display right */
freeobj(obj);
@ -335,9 +335,9 @@ dopickup(){
pickup(all)
{
register struct gold *gold;
register struct obj *obj, *obj2;
register int wt;
struct gold *gold;
struct obj *obj, *obj2;
int wt;
if(Levitation) return;
while(gold = g_at(u.ux,u.uy)) {
@ -351,7 +351,7 @@ pickup(all)
/* check for more than one object */
if(!all) {
register int ct = 0;
int ct = 0;
for(obj = fobj; obj; obj = obj->nobj)
if(obj->ox == u.ux && obj->oy == u.uy)
@ -466,9 +466,9 @@ pickup(all)
/* turn around a corner if that is the only way we can proceed */
/* do not turn left or right twice */
lookaround(){
register x,y,i,x0,y0,m0,i0 = 9;
register int corrct = 0, noturn = 0;
register struct monst *mtmp;
x,y,i,x0,y0,m0,i0 = 9;
int corrct = 0, noturn = 0;
struct monst *mtmp;
#ifdef lint
/* suppress "used before set" message */
x0 = y0 = 0;
@ -561,8 +561,8 @@ register struct monst *mtmp;
/* something like lookaround, but we are not running */
/* react only to monsters that might hit us */
monster_nearby() {
register int x,y;
register struct monst *mtmp;
int x,y;
struct monst *mtmp;
if(!Blind)
for(x = u.ux-1; x <= u.ux+1; x++) for(y = u.uy-1; y <= u.uy+1; y++){
if(x == u.ux && y == u.uy) continue;
@ -577,7 +577,7 @@ register struct monst *mtmp;
#ifdef QUEST
cansee(x,y) xchar x,y; {
register int dx,dy,adx,ady,sdx,sdy,dmax,d;
int dx,dy,adx,ady,sdx,sdy,dmax,d;
if(Blind) return(0);
if(!isok(x,y)) return(0);
d = dist(x,y);
@ -610,7 +610,7 @@ register int dx,dy,adx,ady,sdx,sdy,dmax,d;
}
}
rroom(x,y) register int x,y; {
rroom(x,y) int x,y; {
return(IS_ROOM(levl[u.ux+x][u.uy+y].typ));
}
@ -625,14 +625,14 @@ cansee(x,y) xchar x,y; {
}
#endif QUEST
sgn(a) register int a; {
sgn(a) int a; {
return((a > 0) ? 1 : (a == 0) ? 0 : -1);
}
#ifdef QUEST
setsee()
{
register x,y;
x,y;
if(Blind) {
pru();
@ -649,7 +649,7 @@ setsee()
setsee()
{
register x,y;
x,y;
if(Blind) {
pru();
@ -681,7 +681,7 @@ setsee()
#endif QUEST
nomul(nval)
register nval;
nval;
{
if(multi < 0) return;
multi = nval;
@ -712,7 +712,7 @@ dbon()
}
losestr(num) /* may kill you; cause may be poison or monster like 'A' */
register num;
num;
{
u.ustr -= num;
while(u.ustr < 3) {
@ -724,8 +724,8 @@ register num;
}
losehp(n,knam)
register n;
register char *knam;
n;
char *knam;
{
u.uhp -= n;
if(u.uhp > u.uhpmax)
@ -738,8 +738,8 @@ register char *knam;
}
losehp_m(n,mtmp)
register n;
register struct monst *mtmp;
n;
struct monst *mtmp;
{
u.uhp -= n;
flags.botl = 1;
@ -749,7 +749,7 @@ register struct monst *mtmp;
losexp() /* hit by V or W */
{
register num;
num;
extern long newuexp();
if(u.ulevel > 1)
@ -764,9 +764,9 @@ losexp() /* hit by V or W */
}
inv_weight(){
register struct obj *otmp = invent;
register int wt = (u.ugold + 500)/1000;
register int carrcap;
struct obj *otmp = invent;
int wt = (u.ugold + 500)/1000;
int carrcap;
if(Levitation) /* pugh@cornell */
carrcap = MAX_CARR_CAP;
else {
@ -783,8 +783,8 @@ register int carrcap;
}
inv_cnt(){
register struct obj *otmp = invent;
register int ct = 0;
struct obj *otmp = invent;
int ct = 0;
while(otmp){
ct++;
otmp = otmp->nobj;

View File

@ -91,11 +91,11 @@ struct ext_func_tab extcmdlist[] = {
extern char *parse(), lowc(), unctrl(), quitchars[];
rhack(cmd)
register char *cmd;
char *cmd;
{
register struct func_tab *tlist = cmdlist;
struct func_tab *tlist = cmdlist;
boolean firsttime = FALSE;
register res;
res;
if(!cmd) {
firsttime = TRUE;
@ -170,7 +170,7 @@ register char *cmd;
tlist++;
}
{ char expcmd[10];
register char *cp = expcmd;
char *cp = expcmd;
while(*cmd && cp-expcmd < sizeof(expcmd)-2) {
if(*cmd >= 040 && *cmd < 0177)
*cp++ = *cmd++;
@ -188,7 +188,7 @@ register char *cmd;
doextcmd() /* here after # - now read a full-word command */
{
char buf[BUFSZ];
register struct ext_func_tab *efp = extcmdlist;
struct ext_func_tab *efp = extcmdlist;
pline("# ");
getlin(buf);
@ -227,7 +227,7 @@ schar zdir[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 1,-1 };
movecmd(sym) /* also sets u.dz, but returns false for <> */
char sym;
{
register char *dp;
char *dp;
u.dz = 0;
if(!(dp = index(sdir, sym))) return(0);
@ -256,14 +256,14 @@ boolean s;
confdir()
{
register x = rn2(8);
x = rn2(8);
u.dx = xdir[x];
u.dy = ydir[x];
}
#ifdef QUEST
finddir(){
register int i, ui = u.di;
int i, ui = u.di;
for(i = 0; i <= 8; i++){
if(flags.run & 1) ui++; else ui += 7;
ui %= 8;
@ -291,13 +291,13 @@ register int i, ui = u.di;
u.dy = ydir[ui];
}
isroom(x,y) register x,y; { /* what about POOL? */
isroom(x,y) x,y; { /* what about POOL? */
return(isok(x,y) && (levl[x][y].typ == ROOM ||
(levl[x][y].typ >= LDOOR && flags.run >= 6)));
}
#endif QUEST
isok(x,y) register x,y; {
isok(x,y) x,y; {
/* x corresponds to curx, so x==1 is the first column. Ach. %% */
return(x >= 1 && x <= COLNO-1 && y >= 0 && y <= ROWNO-1);
}

View File

@ -20,10 +20,10 @@ dodrop() {
}
static int
drop(obj) register struct obj *obj; {
drop(obj) struct obj *obj; {
if(!obj) return(0);
if(obj->olet == '$') { /* pseudo object */
register long amount = OGOLD(obj);
long amount = OGOLD(obj);
if(amount == 0)
pline("You didn't drop any gold pieces.");
@ -54,14 +54,14 @@ drop(obj) register struct obj *obj; {
/* Called in several places - should not produce texts */
dropx(obj)
register struct obj *obj;
struct obj *obj;
{
freeinv(obj);
dropy(obj);
}
dropy(obj)
register struct obj *obj;
struct obj *obj;
{
if(obj->otyp == CRYSKNIFE)
obj->otyp = WORM_TOOTH;
@ -118,11 +118,11 @@ doup()
}
goto_level(newlevel, at_stairs)
register int newlevel;
register boolean at_stairs;
int newlevel;
boolean at_stairs;
{
register fd;
register boolean up = (newlevel < dlevel);
fd;
boolean up = (newlevel < dlevel);
if(newlevel <= 0) done("escaped"); /* in fact < 0 is impossible */
if(newlevel > MAXLEVEL) newlevel = MAXLEVEL; /* strange ... */
@ -204,7 +204,7 @@ register boolean at_stairs;
selftouch("Falling, you");
}
}
{ register struct monst *mtmp = m_at(u.ux, u.uy);
{ struct monst *mtmp = m_at(u.ux, u.uy);
if(mtmp)
mnexto(mtmp);
}
@ -227,7 +227,7 @@ register boolean at_stairs;
initrack();
losedogs();
{ register struct monst *mtmp;
{ struct monst *mtmp;
if(mtmp = m_at(u.ux, u.uy)) mnexto(mtmp); /* riv05!a3 */
}
flags.nscrinh = 0;
@ -251,9 +251,9 @@ dopray() {
struct monst *bhit(), *boomhit();
dothrow()
{
register struct obj *obj;
register struct monst *mon;
register tmp;
struct obj *obj;
struct monst *mon;
tmp;
obj = getobj("#)", "throw"); /* it is also possible to throw food */
/* (or jewels, or iron balls ... ) */
@ -415,7 +415,7 @@ dothrow()
if(u.utraptype == TT_PIT)
pline("The ball pulls you out of the pit!");
else {
register long side =
long side =
rn2(3) ? LEFT_SIDE : RIGHT_SIDE;
pline("The ball pulls you out of the bear trap.");
pline("Your %s leg is severely damaged.",
@ -440,8 +440,8 @@ dothrow()
/* split obj so that it gets size num */
/* remainder is put in the object structure delivered by this call */
struct obj *
splitobj(obj, num) register struct obj *obj; register int num; {
register struct obj *otmp;
splitobj(obj, num) struct obj *obj; int num; {
struct obj *otmp;
otmp = newobj(0);
*otmp = *obj; /* copies whole structure */
otmp->o_id = flags.ident++;
@ -456,7 +456,7 @@ register struct obj *otmp;
}
more_experienced(exp,rexp)
register int exp, rexp;
int exp, rexp;
{
extern char pl_character[];
@ -468,8 +468,8 @@ register int exp, rexp;
}
set_wounded_legs(side, timex)
register long side;
register int timex;
long side;
int timex;
{
if(!Wounded_legs || (Wounded_legs & TIMEOUT))
Wounded_legs |= side + timex;

View File

@ -8,7 +8,7 @@ extern char plname[];
coord
getpos(force,goal) int force; char *goal; {
register cx,cy,i,c;
cx,cy,i,c;
extern char sdir[]; /* defined in hack.c */
extern schar xdir[], ydir[]; /* idem */
extern char *visctrl(); /* see below */
@ -48,8 +48,8 @@ coord cc;
do_mname(){
char buf[BUFSZ];
coord cc;
register int cx,cy,lth,i;
register struct monst *mtmp, *mtmp2;
int cx,cy,lth,i;
struct monst *mtmp, *mtmp2;
extern char *lmonnam();
cc = getpos(0, "the monster you want to name");
cx = cc.x;
@ -97,9 +97,9 @@ extern char *lmonnam();
* when there might be pointers around in unknown places. For now: only
* when obj is in the inventory.
*/
do_oname(obj) register struct obj *obj; {
register struct obj *otmp, *otmp2;
register lth;
do_oname(obj) struct obj *obj; {
struct obj *otmp, *otmp2;
lth;
char buf[BUFSZ];
pline("What do you want to name %s? ", doname(obj));
getlin(buf);
@ -136,7 +136,7 @@ char buf[BUFSZ];
ddocall()
{
register struct obj *obj;
struct obj *obj;
pline("Do you want to name an individual object? [ny] ");
switch(readchar()) {
@ -154,13 +154,13 @@ ddocall()
}
docall(obj)
register struct obj *obj;
struct obj *obj;
{
char buf[BUFSZ];
struct obj otemp;
register char **str1;
char **str1;
extern char *xname();
register char *str;
char *str;
otemp = *obj;
otemp.quan = 1;
@ -186,7 +186,7 @@ char *ghostnames[] = { /* these names should have length < PL_NSIZ */
};
char *
xmonnam(mtmp, vb) register struct monst *mtmp; int vb; {
xmonnam(mtmp, vb) struct monst *mtmp; int vb; {
static char buf[BUFSZ]; /* %% */
extern char *shkname();
if(mtmp->mnamelth && !vb) {
@ -195,7 +195,7 @@ extern char *shkname();
}
switch(mtmp->data->mlet) {
case ' ':
{ register char *gn = (char *) mtmp->mextra;
{ char *gn = (char *) mtmp->mextra;
if(!*gn) { /* might also look in scorefile */
gn = ghostnames[rn2(SIZE(ghostnames))];
if(!rn2(2)) (void)
@ -223,28 +223,28 @@ extern char *shkname();
}
char *
lmonnam(mtmp) register struct monst *mtmp; {
lmonnam(mtmp) struct monst *mtmp; {
return(xmonnam(mtmp, 1));
}
char *
monnam(mtmp) register struct monst *mtmp; {
monnam(mtmp) struct monst *mtmp; {
return(xmonnam(mtmp, 0));
}
char *
Monnam(mtmp) register struct monst *mtmp; {
register char *bp = monnam(mtmp);
Monnam(mtmp) struct monst *mtmp; {
char *bp = monnam(mtmp);
if('a' <= *bp && *bp <= 'z') *bp += ('A' - 'a');
return(bp);
}
char *
amonnam(mtmp,adj)
register struct monst *mtmp;
register char *adj;
struct monst *mtmp;
char *adj;
{
register char *bp = monnam(mtmp);
char *bp = monnam(mtmp);
static char buf[BUFSZ]; /* %% */
if(!strncmp(bp, "the ", 4)) bp += 4;
@ -254,18 +254,18 @@ register char *adj;
char *
Amonnam(mtmp, adj)
register struct monst *mtmp;
register char *adj;
struct monst *mtmp;
char *adj;
{
register char *bp = amonnam(mtmp,adj);
char *bp = amonnam(mtmp,adj);
*bp = 'T';
return(bp);
}
char *
Xmonnam(mtmp) register struct monst *mtmp; {
register char *bp = Monnam(mtmp);
Xmonnam(mtmp) struct monst *mtmp; {
char *bp = Monnam(mtmp);
if(!strncmp(bp, "The ", 4)) {
bp += 2;
*bp = 'A';

View File

@ -8,12 +8,12 @@ extern char *nomovemsg;
extern char quitchars[];
extern char *Doname();
off_msg(otmp) register struct obj *otmp; {
off_msg(otmp) struct obj *otmp; {
pline("You were wearing %s.", doname(otmp));
}
doremarm() {
register struct obj *otmp;
struct obj *otmp;
if(!uarm && !uarmh && !uarms && !uarmg) {
pline("Not wearing any armor.");
return(0);
@ -69,14 +69,14 @@ doremring() {
#endif lint
}
dorr(otmp) register struct obj *otmp; {
dorr(otmp) struct obj *otmp; {
if(cursed(otmp)) return(0);
ringoff(otmp);
off_msg(otmp);
return(1);
}
cursed(otmp) register struct obj *otmp; {
cursed(otmp) struct obj *otmp; {
if(otmp->cursed){
pline("You can't. It appears to be cursed.");
return(1);
@ -84,8 +84,8 @@ cursed(otmp) register struct obj *otmp; {
return(0);
}
armoroff(otmp) register struct obj *otmp; {
register int delay = -objects[otmp->otyp].oc_delay;
armoroff(otmp) struct obj *otmp; {
int delay = -objects[otmp->otyp].oc_delay;
if(cursed(otmp)) return(0);
setworn((struct obj *) 0, otmp->owornmask & W_ARMOR);
if(delay) {
@ -107,9 +107,9 @@ register int delay = -objects[otmp->otyp].oc_delay;
}
doweararm() {
register struct obj *otmp;
register int delay;
register int err = 0;
struct obj *otmp;
int delay;
int err = 0;
long mask = 0;
otmp = getobj("[", "wear");
@ -166,7 +166,7 @@ doweararm() {
}
dowearring() {
register struct obj *otmp;
struct obj *otmp;
long mask = 0;
long oldprop;
@ -235,9 +235,9 @@ dowearring() {
}
ringoff(obj)
register struct obj *obj;
struct obj *obj;
{
register long mask;
long mask;
mask = obj->owornmask & W_RING;
setworn((struct obj *) 0, obj->owornmask);
if(!(u.uprops[PROP(obj->otyp)].p_flgs & mask))
@ -271,7 +271,7 @@ register long mask;
}
find_ac(){
register int uac = 10;
int uac = 10;
if(uarm) uac -= ARM_BONUS(uarm);
if(uarm2) uac -= ARM_BONUS(uarm2);
if(uarmh) uac -= ARM_BONUS(uarmh);
@ -286,7 +286,7 @@ register int uac = 10;
}
glibr(){
register struct obj *otmp;
struct obj *otmp;
int xfl = 0;
if(!uarmg) if(uleft || uright) {
/* Note: at present also cursed rings fall off */
@ -313,7 +313,7 @@ int xfl = 0;
struct obj *
some_armor(){
register struct obj *otmph = uarm;
struct obj *otmph = uarm;
if(uarmh && (!otmph || !rn2(4))) otmph = uarmh;
if(uarmg && (!otmph || !rn2(4))) otmph = uarmg;
if(uarms && (!otmph || !rn2(4))) otmph = uarms;
@ -321,7 +321,7 @@ register struct obj *otmph = uarm;
}
corrode_armor(){
register struct obj *otmph = some_armor();
struct obj *otmph = some_armor();
if(otmph){
if(otmph->rustfree ||
otmph->otyp == ELVEN_CLOAK ||

View File

@ -17,12 +17,12 @@ struct permonst la_dog =
makedog(){
register struct monst *mtmp = makemon(&li_dog,u.ux,u.uy);
struct monst *mtmp = makemon(&li_dog,u.ux,u.uy);
if(!mtmp) return; /* dogs were genocided */
initedog(mtmp);
}
initedog(mtmp) register struct monst *mtmp; {
initedog(mtmp) struct monst *mtmp; {
mtmp->mtame = mtmp->mpeaceful = 1;
EDOG(mtmp)->hungrytime = 1000 + moves;
EDOG(mtmp)->eattime = 0;
@ -38,7 +38,7 @@ struct monst *fallen_down = 0; /* monsters that fell through a trapdoor */
/* they will appear on the next level @ goes to, even if he goes up! */
losedogs(){
register struct monst *mtmp;
struct monst *mtmp;
while(mtmp = mydogs){
mydogs = mtmp->nmon;
mtmp->nmon = fmon;
@ -54,7 +54,7 @@ register struct monst *mtmp;
}
keepdogs(){
register struct monst *mtmp;
struct monst *mtmp;
for(mtmp = fmon; mtmp; mtmp = mtmp->nmon)
if(dist(mtmp->mx,mtmp->my) < 3 && follower(mtmp)
&& !mtmp->msleep && !mtmp->mfroz) {
@ -67,7 +67,7 @@ register struct monst *mtmp;
}
}
fall_down(mtmp) register struct monst *mtmp; {
fall_down(mtmp) struct monst *mtmp; {
relmon(mtmp);
mtmp->nmon = fallen_down;
fallen_down = mtmp;
@ -83,7 +83,7 @@ fall_down(mtmp) register struct monst *mtmp; {
#define APPORT 4
#define POISON 5
#define UNDEF 6
dogfood(obj) register struct obj *obj; {
dogfood(obj) struct obj *obj; {
switch(obj->olet) {
case FOOD_SYM:
return(
@ -105,12 +105,12 @@ dogfood(obj) register struct obj *obj; {
}
/* return 0 (no move), 1 (move) or 2 (dead) */
dog_move(mtmp, after) register struct monst *mtmp; {
register int nx,ny,omx,omy,appr,nearer,j;
dog_move(mtmp, after) struct monst *mtmp; {
int nx,ny,omx,omy,appr,nearer,j;
int udist,chi,i,whappr;
register struct monst *mtmp2;
register struct permonst *mdat = mtmp->data;
register struct edog *edog = EDOG(mtmp);
struct monst *mtmp2;
struct permonst *mdat = mtmp->data;
struct edog *edog = EDOG(mtmp);
struct obj *obj;
struct trap *trap;
xchar cnt,chcnt,nix,niy;
@ -255,7 +255,7 @@ int info[9];
if(gx == u.ux && gy == u.uy && (dogroom != uroom || dogroom < 0)){
extern coord *gettrack();
register coord *cp;
coord *cp;
cp = gettrack(omx,omy);
if(cp){
gx = cp->x;
@ -367,7 +367,7 @@ newdogpos:
/* return roomnumber or -1 */
inroom(x,y) xchar x,y; {
#ifndef QUEST
register struct mkroom *croom = &rooms[0];
struct mkroom *croom = &rooms[0];
while(croom->hx >= 0){
if(croom->hx >= x-1 && croom->lx <= x+1 &&
croom->hy >= y-1 && croom->ly <= y+1)
@ -379,10 +379,10 @@ inroom(x,y) xchar x,y; {
}
tamedog(mtmp, obj)
register struct monst *mtmp;
register struct obj *obj;
struct monst *mtmp;
struct obj *obj;
{
register struct monst *mtmp2;
struct monst *mtmp2;
if(flags.moonphase == FULL_MOON && night() && rn2(6))
return(0);

View File

@ -50,7 +50,7 @@ static struct {
} tin;
opentin(){
register int r;
int r;
if(!carried(tin.tin)) /* perhaps it was stolen? */
return(0); /* %% probably we should use tinoid */
@ -88,9 +88,9 @@ Meatdone(){
}
doeat(){
register struct obj *otmp;
register struct objclass *ftmp;
register tmp;
struct obj *otmp;
struct objclass *ftmp;
tmp;
/* Is there some food (probably a heavy corpse) here on the ground? */
if(!Levitation)
@ -139,7 +139,7 @@ gotit:
if(Glib) {
pline("The tin slips out of your hands.");
if(otmp->quan > 1) {
register struct obj *obj;
struct obj *obj;
extern struct obj *splitobj();
obj = splitobj(otmp, 1);
@ -277,13 +277,13 @@ gethungry(){
}
/* called after vomiting and after performing feats of magic */
morehungry(num) register num; {
morehungry(num) num; {
u.uhunger -= num;
newuhs(TRUE);
}
/* called after eating something (and after drinking fruit juice) */
lesshungry(num) register num; {
lesshungry(num) num; {
u.uhunger += num;
newuhs(FALSE);
}
@ -294,7 +294,7 @@ unfaint(){
}
newuhs(incr) boolean incr; {
register int newhs, h = u.uhunger;
int newhs, h = u.uhunger;
newhs = (h > 1000) ? SATIATED :
(h > 150) ? NOT_HUNGRY :
@ -354,15 +354,15 @@ newuhs(incr) boolean incr; {
? 'a' + (otyp - DEAD_ACID_BLOB)\
: '@' + (otyp - DEAD_HUMAN))
poisonous(otmp)
register struct obj *otmp;
struct obj *otmp;
{
return(index(POISONOUS, CORPSE_I_TO_C(otmp->otyp)) != 0);
}
/* returns 1 if some text was printed */
eatcorpse(otmp) register struct obj *otmp; {
register char let = CORPSE_I_TO_C(otmp->otyp);
register tp = 0;
eatcorpse(otmp) struct obj *otmp; {
char let = CORPSE_I_TO_C(otmp->otyp);
tp = 0;
if(let != 'a' && moves > otmp->age + 50 + rn2(100)) {
tp++;
pline("Ulch -- that meat was tainted!");

View File

@ -44,7 +44,7 @@ done_hangup(){
done_intr();
}
done_in_by(mtmp) register struct monst *mtmp; {
done_in_by(mtmp) struct monst *mtmp; {
static char buf[BUFSZ];
pline("You die ...");
if(mtmp->data->mlet == ' '){
@ -65,7 +65,7 @@ static char buf[BUFSZ];
"burned", "starved" or "tricked" */
/* Be careful not to call panic from here! */
done(st1)
register char *st1;
char *st1;
{
#ifdef WIZARD
@ -120,10 +120,10 @@ register char *st1;
}
if(*st1 == 'e') {
extern struct monst *mydogs;
register struct monst *mtmp;
register struct obj *otmp;
register int i;
register unsigned worthlessct = 0;
struct monst *mtmp;
struct obj *otmp;
int i;
unsigned worthlessct = 0;
boolean has_amulet = FALSE;
killer = st1;
@ -219,12 +219,12 @@ topten(){
int uid = getuid();
int rank, rank0 = -1, rank1 = 0;
int occ_cnt = PERSMAX;
register struct toptenentry *t0, *t1, *tprev;
struct toptenentry *t0, *t1, *tprev;
char *recfile = RECORD;
char *reclock = "record_lock";
int sleepct = 300;
FILE *rfile;
register flg = 0;
flg = 0;
extern char *getdate();
#define HUP if(!done_hup)
while(link(recfile, reclock) == -1) {
@ -374,7 +374,7 @@ unlock:
outheader() {
char linebuf[BUFSZ];
register char *bp;
char *bp;
(void) strcpy(linebuf, "Number Points Name");
bp = eos(linebuf);
while(bp < linebuf + COLNO - 9) *bp++ = ' ';
@ -384,7 +384,7 @@ register char *bp;
/* so>0: standout line; so=0: ordinary line; so<0: no output, return lth */
int
outentry(rank,t1,so) register struct toptenentry *t1; {
outentry(rank,t1,so) struct toptenentry *t1; {
boolean quit = FALSE, killed = FALSE, starv = FALSE;
char linebuf[BUFSZ];
linebuf[0] = 0;
@ -426,7 +426,7 @@ char linebuf[BUFSZ];
t1->death);
Sprintf(eos(linebuf), ".");
if(t1->maxhp) {
register char *bp = eos(linebuf);
char *bp = eos(linebuf);
char hpbuf[10];
int hppos;
Sprintf(hpbuf, (t1->hp > 0) ? itoa(t1->hp) : "-");
@ -439,7 +439,7 @@ char linebuf[BUFSZ];
}
if(so == 0) puts(linebuf);
else if(so > 0) {
register char *bp = eos(linebuf);
char *bp = eos(linebuf);
if(so >= COLNO) so = COLNO-1;
while(bp < linebuf + so) *bp++ = ' ';
*bp = 0;
@ -460,13 +460,13 @@ static char buf[12];
char *
ordin(n) int n; {
register int d = n%10;
int d = n%10;
return((d==0 || d>3 || n/10==1) ? "th" : (d==1) ? "st" :
(d==2) ? "nd" : "rd");
}
clearlocks(){
register x;
x;
(void) signal(SIGHUP,SIG_IGN);
for(x = maxdlevel; x >= 0; x--) {
glo(x);
@ -485,14 +485,14 @@ hangup()
char *
eos(s)
register char *s;
char *s;
{
while(*s) s++;
return(s);
}
/* it is the callers responsibility to check that there is room for c */
charcat(s,c) register char *s, c; {
charcat(s,c) char *s, c; {
while(*s) s++;
*s++ = c;
*s = 0;
@ -508,11 +508,11 @@ prscore(argc,argv) int argc; char **argv; {
char **players;
int playerct;
int rank;
register struct toptenentry *t1, *t2;
struct toptenentry *t1, *t2;
char *recfile = RECORD;
FILE *rfile;
register flg = 0;
register int i;
flg = 0;
int i;
#ifdef nonsense
long total_score = 0L;
char totchars[10];

View File

@ -20,8 +20,8 @@ struct engr {
} *head_engr;
struct engr *
engr_at(x,y) register xchar x,y; {
register struct engr *ep = head_engr;
engr_at(x,y) xchar x,y; {
struct engr *ep = head_engr;
while(ep) {
if(x == ep->engr_x && y == ep->engr_y)
return(ep);
@ -30,10 +30,10 @@ register struct engr *ep = head_engr;
return((struct engr *) 0);
}
sengr_at(s,x,y) register char *s; register xchar x,y; {
register struct engr *ep = engr_at(x,y);
register char *t;
register int n;
sengr_at(s,x,y) char *s; xchar x,y; {
struct engr *ep = engr_at(x,y);
char *t;
int n;
if(ep && ep->engr_time <= moves) {
t = ep->engr_txt;
/*
@ -49,15 +49,15 @@ register int n;
}
u_wipe_engr(cnt)
register int cnt;
int cnt;
{
if(!u.uswallow && !Levitation)
wipe_engr_at(u.ux, u.uy, cnt);
}
wipe_engr_at(x,y,cnt) register xchar x,y,cnt; {
register struct engr *ep = engr_at(x,y);
register int lth,pos;
wipe_engr_at(x,y,cnt) xchar x,y,cnt; {
struct engr *ep = engr_at(x,y);
int lth,pos;
char ch;
if(ep){
if((ep->engr_type != DUST) || Levitation) {
@ -80,8 +80,8 @@ char ch;
}
}
read_engr_at(x,y) register int x,y; {
register struct engr *ep = engr_at(x,y);
read_engr_at(x,y) int x,y; {
struct engr *ep = engr_at(x,y);
if(ep && ep->engr_txt[0]) {
switch(ep->engr_type) {
case DUST:
@ -101,10 +101,10 @@ register struct engr *ep = engr_at(x,y);
}
make_engr_at(x,y,s)
register int x,y;
register char *s;
int x,y;
char *s;
{
register struct engr *ep;
struct engr *ep;
if(ep = engr_at(x,y))
del_engr(ep);
@ -122,13 +122,13 @@ register char *s;
}
doengrave(){
register int len;
register char *sp;
register struct engr *ep, *oep = engr_at(u.ux,u.uy);
int len;
char *sp;
struct engr *ep, *oep = engr_at(u.ux,u.uy);
char buf[BUFSZ];
xchar type;
int spct; /* number of leading spaces */
register struct obj *otmp;
struct obj *otmp;
multi = 0;
if(u.uswallow) {
@ -259,7 +259,7 @@ register struct obj *otmp;
}
save_engravings(fd) int fd; {
register struct engr *ep = head_engr;
struct engr *ep = head_engr;
while(ep) {
if(!ep->engr_lth || !ep->engr_txt[0]){
ep = ep->nxt_engr;
@ -274,7 +274,7 @@ register struct engr *ep = head_engr;
}
rest_engravings(fd) int fd; {
register struct engr *ep;
struct engr *ep;
unsigned lth;
head_engr = 0;
while(1) {
@ -288,8 +288,8 @@ unsigned lth;
}
}
del_engr(ep) register struct engr *ep; {
register struct engr *ept;
del_engr(ep) struct engr *ep; {
struct engr *ept;
if(ep == head_engr)
head_engr = ep->nxt_engr;
else {

View File

@ -11,8 +11,8 @@ static boolean far_noise;
static long noisetime;
/* hitmm returns 0 (miss), 1 (hit), or 2 (kill) */
hitmm(magr,mdef) register struct monst *magr,*mdef; {
register struct permonst *pa = magr->data, *pd = mdef->data;
hitmm(magr,mdef) struct monst *magr,*mdef; {
struct permonst *pa = magr->data, *pd = mdef->data;
int hit;
schar tmp;
boolean vis;
@ -68,8 +68,8 @@ boolean vis;
}
/* drop (perhaps) a cadaver and remove monster */
mondied(mdef) register struct monst *mdef; {
register struct permonst *pd = mdef->data;
mondied(mdef) struct monst *mdef; {
struct permonst *pd = mdef->data;
if(letter(pd->mlet) && rn2(3)){
(void) mkobj_at(pd->mlet,mdef->mx,mdef->my);
if(cansee(mdef->mx,mdef->my)){
@ -82,7 +82,7 @@ register struct permonst *pd = mdef->data;
}
/* drop a rock and remove monster */
monstone(mdef) register struct monst *mdef; {
monstone(mdef) struct monst *mdef; {
extern char mlarge[];
if(index(mlarge, mdef->data->mlet))
mksobj_at(ENORMOUS_ROCK, mdef->mx, mdef->my);
@ -96,8 +96,8 @@ monstone(mdef) register struct monst *mdef; {
}
fightm(mtmp) register struct monst *mtmp; {
register struct monst *mon;
fightm(mtmp) struct monst *mtmp; {
struct monst *mon;
for(mon = fmon; mon; mon = mon->nmon) if(mon != mtmp) {
if(DIST(mon->mx,mon->my,mtmp->mx,mtmp->my) < 3)
if(rn2(4))
@ -108,8 +108,8 @@ register struct monst *mon;
/* u is hit by sth, but not a monster */
thitu(tlev,dam,name)
register tlev,dam;
register char *name;
tlev,dam;
char *name;
{
char buf[BUFSZ];
setan(name,buf);
@ -129,11 +129,11 @@ char mlarge[] = "bCDdegIlmnoPSsTUwY',&";
boolean
hmon(mon,obj,thrown) /* return TRUE if mon still alive */
register struct monst *mon;
register struct obj *obj;
register thrown;
struct monst *mon;
struct obj *obj;
thrown;
{
register tmp;
tmp;
boolean hittxt = FALSE;
if(!obj){
@ -249,11 +249,11 @@ register thrown;
/* try to attack; return FALSE if monster evaded */
/* u.dx and u.dy must be set */
attack(mtmp)
register struct monst *mtmp;
struct monst *mtmp;
{
schar tmp;
boolean malive = TRUE;
register struct permonst *mdat;
struct permonst *mdat;
mdat = mtmp->data;
u_wipe_engr(3); /* andrew@orca: prevent unlimited pick-axe attacks */
@ -283,7 +283,7 @@ register struct monst *mtmp;
wakeup(mtmp);
if(mtmp->mhide && mtmp->mundetected){
register struct obj *obj;
struct obj *obj;
mtmp->mundetected = 0;
if((obj = o_at(mtmp->mx,mtmp->my)) && !Blind)

View File

@ -20,11 +20,11 @@ extern struct wseg *wsegs[32];
static int lastinvnr = 51; /* 0 ... 51 */
static
assigninvlet(otmp)
register struct obj *otmp;
struct obj *otmp;
{
boolean inuse[52];
register int i;
register struct obj *obj;
int i;
struct obj *obj;
for(i = 0; i < 52; i++) inuse[i] = FALSE;
for(obj = invent; obj; obj = obj->nobj) if(obj != otmp) {
@ -47,9 +47,9 @@ register struct obj *otmp;
struct obj *
addinv(obj)
register struct obj *obj;
struct obj *obj;
{
register struct obj *otmp;
struct obj *otmp;
/* merge or attach to end of chain */
if(!invent) {
@ -94,7 +94,7 @@ register struct obj *obj;
}
useup(obj)
register struct obj *obj;
struct obj *obj;
{
if(obj->quan > 1){
obj->quan--;
@ -107,9 +107,9 @@ register struct obj *obj;
}
freeinv(obj)
register struct obj *obj;
struct obj *obj;
{
register struct obj *otmp;
struct obj *otmp;
if(obj == invent)
invent = invent->nobj;
@ -121,15 +121,15 @@ register struct obj *obj;
}
/* destroy object in fobj chain (if unpaid, it remains on the bill) */
delobj(obj) register struct obj *obj; {
delobj(obj) struct obj *obj; {
freeobj(obj);
unpobj(obj);
obfree(obj, (struct obj *) 0);
}
/* unlink obj from chain starting with fobj */
freeobj(obj) register struct obj *obj; {
register struct obj *otmp;
freeobj(obj) struct obj *obj; {
struct obj *otmp;
if(obj == fobj) fobj = fobj->nobj;
else {
@ -140,8 +140,8 @@ freeobj(obj) register struct obj *obj; {
}
/* Note: freegold throws away its argument! */
freegold(gold) register struct gold *gold; {
register struct gold *gtmp;
freegold(gold) struct gold *gold; {
struct gold *gtmp;
if(gold == fgold) fgold = gold->ngold;
else {
@ -153,9 +153,9 @@ freegold(gold) register struct gold *gold; {
}
deltrap(trap)
register struct trap *trap;
struct trap *trap;
{
register struct trap *ttmp;
struct trap *ttmp;
if(trap == ftrap)
ftrap = ftrap->ntrap;
@ -170,11 +170,11 @@ struct wseg *m_atseg;
struct monst *
m_at(x,y)
register x,y;
x,y;
{
register struct monst *mtmp;
struct monst *mtmp;
#ifndef NOWORM
register struct wseg *wtmp;
struct wseg *wtmp;
#endif NOWORM
m_atseg = 0;
@ -196,9 +196,9 @@ register x,y;
struct obj *
o_at(x,y)
register x,y;
x,y;
{
register struct obj *otmp;
struct obj *otmp;
for(otmp = fobj; otmp; otmp = otmp->nobj)
if(otmp->ox == x && otmp->oy == y) return(otmp);
@ -207,9 +207,9 @@ register x,y;
struct obj *
sobj_at(n,x,y)
register n,x,y;
n,x,y;
{
register struct obj *otmp;
struct obj *otmp;
for(otmp = fobj; otmp; otmp = otmp->nobj)
if(otmp->ox == x && otmp->oy == y && otmp->otyp == n)
@ -217,17 +217,17 @@ register n,x,y;
return(0);
}
carried(obj) register struct obj *obj; {
register struct obj *otmp;
carried(obj) struct obj *obj; {
struct obj *otmp;
for(otmp = invent; otmp; otmp = otmp->nobj)
if(otmp == obj) return(1);
return(0);
}
carrying(type)
register int type;
int type;
{
register struct obj *otmp;
struct obj *otmp;
for(otmp = invent; otmp; otmp = otmp->nobj)
if(otmp->otyp == type)
@ -236,7 +236,7 @@ register int type;
}
struct obj *
o_on(id, objchn) unsigned int id; register struct obj *objchn; {
o_on(id, objchn) unsigned int id; struct obj *objchn; {
while(objchn) {
if(objchn->o_id == id) return(objchn);
objchn = objchn->nobj;
@ -246,9 +246,9 @@ o_on(id, objchn) unsigned int id; register struct obj *objchn; {
struct trap *
t_at(x,y)
register x,y;
x,y;
{
register struct trap *trap = ftrap;
struct trap *trap = ftrap;
while(trap) {
if(trap->tx == x && trap->ty == y) return(trap);
trap = trap->ntrap;
@ -258,9 +258,9 @@ register x,y;
struct gold *
g_at(x,y)
register x,y;
x,y;
{
register struct gold *gold = fgold;
struct gold *gold = fgold;
while(gold) {
if(gold->gx == x && gold->gy == y) return(gold);
gold = gold->ngold;
@ -271,9 +271,9 @@ register x,y;
/* make dummy object structure containing gold - for temporary use only */
struct obj *
mkgoldobj(q)
register long q;
long q;
{
register struct obj *otmp;
struct obj *otmp;
otmp = newobj(0);
/* should set o_id etc. but otmp will be freed soon */
@ -292,14 +292,14 @@ register long q;
*/
struct obj *
getobj(let,word)
register char *let,*word;
char *let,*word;
{
register struct obj *otmp;
register char ilet,ilet1,ilet2;
struct obj *otmp;
char ilet,ilet1,ilet2;
char buf[BUFSZ];
char lets[BUFSZ];
register int foo = 0, foo2;
register char *bp = buf;
int foo = 0, foo2;
char *bp = buf;
xchar allowcnt = 0; /* 0, 1 or 2 */
boolean allowgold = FALSE;
boolean allowall = FALSE;
@ -429,7 +429,7 @@ register char *let,*word;
if(allowcnt == 2) { /* cnt given */
if(cnt == 0) return(0);
if(cnt != otmp->quan) {
register struct obj *obj;
struct obj *obj;
obj = splitobj(otmp, (int) cnt);
if(otmp == uwep) setuwep(obj);
}
@ -437,7 +437,7 @@ register char *let,*word;
return(otmp);
}
ckunpaid(otmp) register struct obj *otmp; {
ckunpaid(otmp) struct obj *otmp; {
return( otmp->unpaid );
}
@ -448,10 +448,10 @@ char *word;
int (*fn)(), max;
{
char buf[BUFSZ];
register char *ip;
register char sym;
register int oletct = 0, iletct = 0;
register boolean allflag = FALSE;
char *ip;
char sym;
int oletct = 0, iletct = 0;
boolean allflag = FALSE;
char olets[20], ilets[20];
int (*ckfn)() = (int (*)()) 0;
xchar allowgold = (u.ugold && !strcmp(word, "drop")) ? 1 : 0; /* BAH */
@ -459,8 +459,8 @@ xchar allowgold = (u.ugold && !strcmp(word, "drop")) ? 1 : 0; /* BAH */
pline("You have nothing to %s.", word);
return(0);
} else {
register struct obj *otmp = invent;
register int uflg = 0;
struct obj *otmp = invent;
int uflg = 0;
if(allowgold) ilets[iletct++] = '$';
ilets[iletct] = 0;
@ -520,14 +520,14 @@ xchar allowgold = (u.ugold && !strcmp(word, "drop")) ? 1 : 0; /* BAH */
*/
askchain(objchn, olets, allflag, fn, ckfn, max)
struct obj *objchn;
register char *olets;
char *olets;
int allflag;
int (*fn)(), (*ckfn)();
int max;
{
register struct obj *otmp, *otmp2;
register char sym, ilet;
register int cnt = 0;
struct obj *otmp, *otmp2;
char sym, ilet;
int cnt = 0;
ilet = 'a'-1;
for(otmp = objchn; otmp; otmp = otmp2){
if(ilet == 'z') ilet = 'A'; else ilet++;
@ -560,10 +560,10 @@ ret:
}
obj_to_let(obj) /* should of course only be called for things in invent */
register struct obj *obj;
struct obj *obj;
{
register struct obj *otmp;
register char ilet;
struct obj *otmp;
char ilet;
if(flags.invlet_constant)
return(obj->invlet);
@ -574,15 +574,15 @@ register struct obj *obj;
}
prinv(obj)
register struct obj *obj;
struct obj *obj;
{
pline(xprname(obj, obj_to_let(obj)));
}
static char *
xprname(obj,let)
register struct obj *obj;
register char let;
struct obj *obj;
char let;
{
static char li[BUFSZ];
@ -601,10 +601,10 @@ ddoinv()
/* called with 0 or "": all objects in inventory */
/* otherwise: all objects with (serial) letter in lets */
doinv(lets)
register char *lets;
char *lets;
{
register struct obj *otmp;
register char ilet;
struct obj *otmp;
char ilet;
int ct = 0;
char any[BUFSZ];
@ -634,8 +634,8 @@ dotypeinv () /* free after Robert Viduya */
{
char c, ilet;
char stuff[BUFSZ];
register int stct;
register struct obj *otmp;
int stct;
struct obj *otmp;
boolean billx = inshop() && doinvbill(0);
boolean unpd = FALSE;
@ -702,8 +702,8 @@ dotypeinv () /* free after Robert Viduya */
/* look at what is here */
dolook() {
register struct obj *otmp, *otmp0;
register struct gold *gold;
struct obj *otmp, *otmp0;
struct gold *gold;
char *verb = Blind ? "feel" : "see";
int ct = 0;
@ -758,8 +758,8 @@ dolook() {
return(!!Blind);
}
stackobj(obj) register struct obj *obj; {
register struct obj *otmp = fobj;
stackobj(obj) struct obj *obj; {
struct obj *otmp = fobj;
for(otmp = fobj; otmp; otmp = otmp->nobj) if(otmp != obj)
if(otmp->ox == obj->ox && otmp->oy == obj->oy &&
merged(obj,otmp,1))
@ -767,7 +767,7 @@ register struct obj *otmp = fobj;
}
/* merge obj with otmp and delete obj if types agree */
merged(otmp,obj,lose) register struct obj *otmp, *obj; {
merged(otmp,obj,lose) struct obj *otmp, *obj; {
if(obj->otyp == otmp->otyp &&
obj->unpaid == otmp->unpaid &&
obj->spe == otmp->spe &&
@ -831,7 +831,7 @@ doprarm(){
pline("You are not wearing any armor.");
else {
char lets[6];
register int ct = 0;
int ct = 0;
if(uarm) lets[ct++] = obj_to_let(uarm);
if(uarm2) lets[ct++] = obj_to_let(uarm2);
@ -849,7 +849,7 @@ doprring(){
pline("You are not wearing any rings.");
else {
char lets[3];
register int ct = 0;
int ct = 0;
if(uleft) lets[ct++] = obj_to_let(uleft);
if(uright) lets[ct++] = obj_to_let(uright);

View File

@ -27,8 +27,8 @@ int fd;
xchar lev;
{
#ifndef NOWORM
register struct wseg *wtmp, *wtmp2;
register tmp;
struct wseg *wtmp, *wtmp2;
tmp;
#endif NOWORM
if(fd < 0) panic("Save on bad file!"); /* impossible */
@ -72,9 +72,9 @@ xchar lev;
}
bwrite(fd,loc,num)
register fd;
register char *loc;
register unsigned num;
fd;
char *loc;
unsigned num;
{
/* lint wants the 3rd arg of write to be an int; lint -p an unsigned */
if(write(fd, loc, (int) num) != num)
@ -82,10 +82,10 @@ register unsigned num;
}
saveobjchn(fd,otmp)
register fd;
register struct obj *otmp;
fd;
struct obj *otmp;
{
register struct obj *otmp2;
struct obj *otmp2;
unsigned xl;
int minusone = -1;
@ -101,10 +101,10 @@ register struct obj *otmp;
}
savemonchn(fd,mtmp)
register fd;
register struct monst *mtmp;
fd;
struct monst *mtmp;
{
register struct monst *mtmp2;
struct monst *mtmp2;
unsigned xl;
int minusone = -1;
struct permonst *monbegin = &mons[0];
@ -124,10 +124,10 @@ register struct monst *mtmp;
}
savegoldchn(fd,gold)
register fd;
register struct gold *gold;
fd;
struct gold *gold;
{
register struct gold *gold2;
struct gold *gold2;
while(gold) {
gold2 = gold->ngold;
bwrite(fd, (char *) gold, sizeof(struct gold));
@ -138,10 +138,10 @@ register struct gold *gold;
}
savetrapchn(fd,trap)
register fd;
register struct trap *trap;
fd;
struct trap *trap;
{
register struct trap *trap2;
struct trap *trap2;
while(trap) {
trap2 = trap->ntrap;
bwrite(fd, (char *) trap, sizeof(struct trap));
@ -155,12 +155,12 @@ getlev(fd,pid,lev)
int fd,pid;
xchar lev;
{
register struct gold *gold;
register struct trap *trap;
struct gold *gold;
struct trap *trap;
#ifndef NOWORM
register struct wseg *wtmp;
struct wseg *wtmp;
#endif NOWORM
register tmp;
tmp;
long omoves;
int hpid;
xchar dlvl;
@ -188,7 +188,7 @@ xchar lev;
/* regenerate animals while on another level */
{ long tmoves = (moves > omoves) ? moves-omoves : 0;
register struct monst *mtmp, *mtmp2;
struct monst *mtmp, *mtmp2;
extern char genocided[];
for(mtmp = fmon; mtmp; mtmp = mtmp2) {
@ -256,11 +256,11 @@ xchar lev;
}
mread(fd, buf, len)
register fd;
register char *buf;
register unsigned len;
fd;
char *buf;
unsigned len;
{
register int rlen;
int rlen;
extern boolean restoring;
rlen = read(fd, buf, (int) len);

View File

@ -45,9 +45,9 @@ main(argc,argv)
int argc;
char *argv[];
{
register int fd;
int fd;
#ifdef CHDIR
register char *dir;
char *dir;
#endif
hname = argv[0];
@ -89,7 +89,7 @@ char *argv[];
* Note that we trust him here; it is possible to play under
* somebody else's name.
*/
{ register char *s;
{ char *s;
initoptions();
if(!*plname && (s = getenv("USER")))
@ -214,7 +214,7 @@ char *argv[];
getlock(); /* sets lock if locknum != 0 */
#ifdef WIZARD
} else {
register char *sfoo;
char *sfoo;
(void) strcpy(lock,plname);
if(sfoo = getenv("MAGIC"))
while(*sfoo) {
@ -225,8 +225,8 @@ char *argv[];
}
if(sfoo = getenv("GENOCIDED")){
if(*sfoo == '!'){
register struct permonst *pm = mons;
register char *gp = genocided;
struct permonst *pm = mons;
char *gp = genocided;
while(pm < mons+CMNUM+2){
if(!index(sfoo, pm->mlet))
@ -270,7 +270,7 @@ not_recovered:
setsee();
flags.botlx = 1;
makedog();
{ register struct monst *mtmp;
{ struct monst *mtmp;
if(mtmp = m_at(u.ux, u.uy)) mnexto(mtmp); /* riv05!a3 */
}
seemons();
@ -405,10 +405,10 @@ not_recovered:
}
glo(foo)
register foo;
foo;
{
/* construct the string xlock.n */
register char *tf;
char *tf;
tf = lock;
while(*tf && *tf != '.') tf++;
@ -421,7 +421,7 @@ register foo;
* It may still contain a suffix denoting pl_character.
*/
askname(){
register int c,ct;
int c,ct;
printf("\nWho are you? ");
(void) fflush(stdout);
ct = 0;
@ -442,7 +442,7 @@ register int c,ct;
/*VARARGS1*/
impossible(s,x1,x2)
register char *s;
char *s;
{
pline(s,x1,x2);
pline("Program in disorder - perhaps you'd better Quit.");
@ -480,7 +480,7 @@ boolean wr;
/* perhaps we should also test whether . is writable */
/* unfortunately the access systemcall is worthless */
if(wr) {
register fd;
fd;
if(dir == NULL)
dir = ".";

View File

@ -18,10 +18,10 @@ struct monst zeromonst;
*/
struct monst *
makemon(ptr,x,y)
register struct permonst *ptr;
struct permonst *ptr;
{
register struct monst *mtmp;
register tmp, ct;
struct monst *mtmp;
tmp, ct;
boolean anything = (!ptr);
extern boolean in_mklev;
@ -94,7 +94,7 @@ gotmon:
if(anything) if(ptr->mlet == 'O' || ptr->mlet == 'k') {
coord enexto();
coord mm;
register int cnt = rnd(10);
int cnt = rnd(10);
mm.x = x;
mm.y = y;
while(cnt--) {
@ -108,9 +108,9 @@ gotmon:
coord
enexto(xx,yy)
register xchar xx,yy;
xchar xx,yy;
{
register xchar x,y;
xchar x,y;
coord foo[15], *tfoo;
int range;
@ -160,8 +160,8 @@ goodpos(x,y) /* used only in mnexto and rloc */
rloc(mtmp)
struct monst *mtmp;
{
register tx,ty;
register char ch = mtmp->data->mlet;
tx,ty;
char ch = mtmp->data->mlet;
#ifndef NOWORM
if(ch == 'w' && mtmp->mx) return; /* do not relocate worms */
@ -185,10 +185,10 @@ struct monst *mtmp;
struct monst *
mkmon_at(let,x,y)
char let;
register int x,y;
int x,y;
{
register int ct;
register struct permonst *ptr;
int ct;
struct permonst *ptr;
for(ct = 0; ct < CMNUM; ct++) {
ptr = &mons[ct];

View File

@ -10,10 +10,10 @@ extern struct monst *makemon();
* returns 1 if monster dies (e.g. 'y', 'F'), 0 otherwise
*/
mhitu(mtmp)
register struct monst *mtmp;
struct monst *mtmp;
{
register struct permonst *mdat = mtmp->data;
register int tmp, ctmp;
struct permonst *mdat = mtmp->data;
int tmp, ctmp;
nomul(0);
@ -294,7 +294,7 @@ register struct monst *mtmp;
(void) hitu(mtmp,rnd(5));
break;
case 'x':
{ register long side = rn2(2) ? RIGHT_SIDE : LEFT_SIDE;
{ long side = rn2(2) ? RIGHT_SIDE : LEFT_SIDE;
pline("%s pricks in your %s leg!",
Monnam(mtmp), (side == RIGHT_SIDE) ? "right" : "left");
set_wounded_legs(side, rnd(50));
@ -319,10 +319,10 @@ register struct monst *mtmp;
}
hitu(mtmp,dam)
register struct monst *mtmp;
register dam;
struct monst *mtmp;
dam;
{
register tmp, res;
tmp, res;
nomul(0);
if(u.uswallow) return(0);
@ -330,7 +330,7 @@ register dam;
if(mtmp->mhide && mtmp->mundetected) {
mtmp->mundetected = 0;
if(!Blind) {
register struct obj *obj;
struct obj *obj;
extern char * Xmonnam();
if(obj = o_at(mtmp->mx,mtmp->my))
pline("%s was hidden under %s!",

View File

@ -39,9 +39,9 @@ int rscnt,rsmax; /* 0..rscnt-1: currently under consideration */
makelevel()
{
register struct mkroom *croom, *troom;
register unsigned tryct;
register x,y;
struct mkroom *croom, *troom;
unsigned tryct;
x,y;
nroom = 0;
doorindex = 0;
@ -141,8 +141,8 @@ makelevel()
}
makerooms() {
register struct rectangle *rsp;
register int lx, ly, hx, hy, lowx, lowy, hix, hiy, dx, dy;
struct rectangle *rsp;
int lx, ly, hx, hy, lowx, lowy, hix, hiy, dx, dy;
int tryct = 0, xlim, ylim;
/* init */
@ -213,10 +213,10 @@ int tryct = 0, xlim, ylim;
}
addrs(lowx,lowy,hix,hiy)
register int lowx,lowy,hix,hiy;
int lowx,lowy,hix,hiy;
{
register struct rectangle *rsp;
register int lx,ly,hx,hy,xlim,ylim;
struct rectangle *rsp;
int lx,ly,hx,hy,xlim,ylim;
boolean discarded;
xlim = XLIM + secret;
@ -249,10 +249,10 @@ register int lowx,lowy,hix,hiy;
}
addrsx(lx,ly,hx,hy,discarded)
register int lx,ly,hx,hy;
int lx,ly,hx,hy;
boolean discarded; /* piece of a discarded area */
{
register struct rectangle *rsp;
struct rectangle *rsp;
/* check inclusions */
for(rsp = rs; rsp < &rs[rsmax]; rsp++) {
@ -281,7 +281,7 @@ boolean discarded; /* piece of a discarded area */
}
comp(x,y)
register struct mkroom *x,*y;
struct mkroom *x,*y;
{
if(x->lx < y->lx) return(-1);
return(x->lx > y->lx);
@ -290,7 +290,7 @@ register struct mkroom *x,*y;
coord
finddpos(xl,yl,xh,yh) {
coord ff;
register x,y;
x,y;
x = (xl == xh) ? xl : (xl + rn2(xh-xl+1));
y = (yl == yh) ? yl : (yl + rn2(yh-yl+1));
@ -315,7 +315,7 @@ gotit:
/* see whether it is allowable to create a door at [x,y] */
okdoor(x,y)
register x,y;
x,y;
{
if(levl[x-1][y].typ == DOOR || levl[x+1][y].typ == DOOR ||
levl[x][y+1].typ == DOOR || levl[x][y-1].typ == DOOR ||
@ -328,8 +328,8 @@ register x,y;
}
dodoor(x,y,aroom)
register x,y;
register struct mkroom *aroom;
x,y;
struct mkroom *aroom;
{
if(doorindex >= DOORMAX) {
impossible("DOORMAX exceeded?");
@ -341,12 +341,12 @@ register struct mkroom *aroom;
}
dosdoor(x,y,aroom,type)
register x,y;
register struct mkroom *aroom;
register type;
x,y;
struct mkroom *aroom;
type;
{
register struct mkroom *broom;
register tmp;
struct mkroom *broom;
tmp;
if(!IS_WALL(levl[x][y].typ)) /* avoid SDOORs with '+' as scrsym */
type = DOOR;
@ -368,9 +368,9 @@ register type;
maker(lowx,ddx,lowy,ddy)
schar lowx,ddx,lowy,ddy;
{
register struct mkroom *croom;
register x, y, hix = lowx+ddx, hiy = lowy+ddy;
register xlim = XLIM + secret, ylim = YLIM + secret;
struct mkroom *croom;
x, y, hix = lowx+ddx, hiy = lowy+ddy;
xlim = XLIM + secret, ylim = YLIM + secret;
if(nroom >= MAXNROFROOMS) return(0);
if(lowx < XLIM) lowx = XLIM;
@ -443,7 +443,7 @@ chk:
}
makecorridors() {
register a,b;
a,b;
nxcor = 0;
for(a = 0; a < nroom-1; a++)
@ -465,13 +465,13 @@ makecorridors() {
}
join(a,b)
register a,b;
a,b;
{
coord cc,tt;
register tx, ty, xx, yy;
register struct rm *crm;
register struct mkroom *croom, *troom;
register dx, dy, dix, diy, cct;
tx, ty, xx, yy;
struct rm *crm;
struct mkroom *croom, *troom;
dx, dy, dix, diy, cct;
croom = &rooms[a];
troom = &rooms[b];
@ -552,7 +552,7 @@ register a,b;
/* do we have to change direction ? */
if(dy && dix > diy) {
register ddx = (xx > tx) ? -1 : 1;
ddx = (xx > tx) ? -1 : 1;
crm = &levl[xx+ddx][yy];
if(!crm->typ || crm->typ == CORR || crm->typ == SCORR) {
@ -561,7 +561,7 @@ register a,b;
continue;
}
} else if(dx && diy > dix) {
register ddy = (yy > ty) ? -1 : 1;
ddy = (yy > ty) ? -1 : 1;
crm = &levl[xx][yy+ddy];
if(!crm->typ || crm->typ == CORR || crm->typ == SCORR) {
@ -607,7 +607,7 @@ register a,b;
make_niches()
{
register int ct = rnd(nroom/2 + 1);
int ct = rnd(nroom/2 + 1);
while(ct--) makeniche(FALSE);
}
@ -619,12 +619,12 @@ makevtele()
makeniche(with_trap)
boolean with_trap;
{
register struct mkroom *aroom;
register struct rm *rm;
register int vct = 8;
struct mkroom *aroom;
struct rm *rm;
int vct = 8;
coord dd;
register dy,xx,yy;
register struct trap *ttmp;
dy,xx,yy;
struct trap *ttmp;
if(doorindex < DOORMAX)
while(vct--) {
@ -666,12 +666,12 @@ boolean with_trap;
/* make a trap somewhere (in croom if mazeflag = 0) */
mktrap(num,mazeflag,croom)
register num,mazeflag;
register struct mkroom *croom;
num,mazeflag;
struct mkroom *croom;
{
register struct trap *ttmp;
register int kind,nopierc,nomimic,fakedoor,fakegold,tryct = 0;
register xchar mx,my;
struct trap *ttmp;
int kind,nopierc,nomimic,fakedoor,fakegold,tryct = 0;
xchar mx,my;
extern char fut_geno[];
if(!num || num >= TRAPNUM) {
@ -683,7 +683,7 @@ register struct mkroom *croom;
} else kind = num;
if(kind == MIMIC) {
register struct monst *mtmp;
struct monst *mtmp;
fakedoor = (!rn2(3) && !mazeflag);
fakegold = (!fakedoor && !rn2(2));

View File

@ -14,7 +14,7 @@ struct permonst hell_hound =
makemaz()
{
int x,y;
register zx,zy;
zx,zy;
coord mm;
boolean al = (dlevel >= 30 && !flags.made_amulet);
@ -22,7 +22,7 @@ makemaz()
for(y = 2; y < ROWNO-1; y++)
levl[x][y].typ = (x%2 && y%2) ? 0 : HWALL;
if(al) {
register struct monst *mtmp;
struct monst *mtmp;
zx = 2*(COLNO/4) - 1;
zy = 2*(ROWNO/4) - 1;
@ -88,7 +88,7 @@ makemaz()
}
walkfrom(x,y) int x,y; {
register int q,a,dir;
int q,a,dir;
int dirs[4];
levl[x][y].typ = ROOM;
while(1) {
@ -105,8 +105,8 @@ int dirs[4];
}
move(x,y,dir)
register int *x, *y;
register int dir;
int *x, *y;
int dir;
{
switch(dir){
case 0: --(*y); break;
@ -118,7 +118,7 @@ register int dir;
okay(x,y,dir)
int x,y;
register int dir;
int dir;
{
move(&x,&y,dir);
move(&x,&y,dir);

View File

@ -9,9 +9,9 @@ struct obj *mkobj(), *mksobj();
struct obj *
mkobj_at(let,x,y)
register let,x,y;
let,x,y;
{
register struct obj *otmp = mkobj(let);
struct obj *otmp = mkobj(let);
otmp->ox = x;
otmp->oy = y;
otmp->nobj = fobj;
@ -20,9 +20,9 @@ register let,x,y;
}
mksobj_at(otyp,x,y)
register otyp,x,y;
otyp,x,y;
{
register struct obj *otmp = mksobj(otyp);
struct obj *otmp = mksobj(otyp);
otmp->ox = x;
otmp->oy = y;
otmp->nobj = fobj;
@ -47,9 +47,9 @@ struct obj zeroobj;
struct obj *
mksobj(otyp)
register otyp;
otyp;
{
register struct obj *otmp;
struct obj *otmp;
char let = objects[otyp].oc_olet;
otmp = newobj(0);
@ -123,17 +123,17 @@ letter(c) {
}
weight(obj)
register struct obj *obj;
struct obj *obj;
{
register int wt = objects[obj->otyp].oc_weight;
int wt = objects[obj->otyp].oc_weight;
return(wt ? wt*obj->quan : (obj->quan + 1)/2);
}
mkgold(num,x,y)
register long num;
long num;
{
register struct gold *gold;
register long amount = (num ? num : 1 + (rnd(dlevel+2) * rnd(30)));
struct gold *gold;
long amount = (num ? num : 1 + (rnd(dlevel+2) * rnd(30)));
if(gold = g_at(x,y))
gold->amount += amount;

View File

@ -15,15 +15,15 @@ extern char shtypes[]; /* = "=/)%?!["; 8 types: 7 specialized, 1 mixed */
schar shprobs[] = { 3,3,5,5,10,10,14,50 }; /* their probabilities */
mkshop(){
register struct mkroom *sroom;
register int sh,sx,sy,i = -1;
register char let;
struct mkroom *sroom;
int sh,sx,sy,i = -1;
char let;
int roomno;
register struct monst *shk;
struct monst *shk;
#ifdef WIZARD
/* first determine shoptype */
if(wizard){
register char *ep = getenv("SHOPTYPE");
char *ep = getenv("SHOPTYPE");
if(ep){
if(*ep == 'z' || *ep == 'Z'){
mkzoo(ZOO);
@ -65,7 +65,7 @@ gottype:
}
if(i < 0) { /* shoptype not yet determined */
register int j;
int j;
for(j = rn2(100), i = 0; (j -= shprobs[i])>= 0; i++)
if(!shtypes[i]) break; /* superfluous */
@ -84,7 +84,7 @@ gottype:
#ifdef WIZARD
/* This is said to happen sometimes, but I've never seen it. */
if(wizard) {
register int j = sroom->doorct;
int j = sroom->doorct;
extern int doorindex;
pline("Where is shopdoor?");
@ -118,7 +118,7 @@ gottype:
findname(ESHK->shknam, let);
for(sx = sroom->lx; sx <= sroom->hx; sx++)
for(sy = sroom->ly; sy <= sroom->hy; sy++){
register struct monst *mtmp;
struct monst *mtmp;
if((sx == sroom->lx && doors[sh].x == sx-1) ||
(sx == sroom->hx && doors[sh].x == sx+1) ||
(sy == sroom->ly && doors[sh].y == sy-1) ||
@ -137,9 +137,9 @@ gottype:
mkzoo(type)
int type;
{
register struct mkroom *sroom;
register struct monst *mon;
register int sh,sx,sy,i;
struct mkroom *sroom;
struct monst *mon;
int sh,sx,sy,i;
int goldlim = 500 * dlevel;
int moct = 0;
struct permonst *morguemon();
@ -197,7 +197,7 @@ struct permonst *
morguemon()
{
extern struct permonst pm_ghost;
register int i = rn2(100), hd = rn2(dlevel);
int i = rn2(100), hd = rn2(dlevel);
if(hd > 10 && i < 10) return(PM_DEMON);
if(hd > 8 && i > 85) return(PM_VAMPIRE);
@ -206,8 +206,8 @@ morguemon()
mkswamp() /* Michiel Huisjes & Fred de Wilde */
{
register struct mkroom *sroom;
register int sx,sy,i,eelct = 0;
struct mkroom *sroom;
int sx,sy,i,eelct = 0;
extern struct permonst pm_eel;
for(i=0; i<5; i++) { /* 5 tries */
@ -233,10 +233,10 @@ mkswamp() /* Michiel Huisjes & Fred de Wilde */
}
nexttodoor(sx,sy)
register sx,sy;
sx,sy;
{
register dx,dy;
register struct rm *lev;
dx,dy;
struct rm *lev;
for(dx = -1; dx <= 1; dx++) for(dy = -1; dy <= 1; dy++)
if((lev = &levl[sx+dx][sy+dy])->typ == DOOR ||
lev->typ == SDOOR || lev->typ == LDOOR)
@ -245,23 +245,23 @@ register sx,sy;
}
has_dnstairs(sroom)
register struct mkroom *sroom;
struct mkroom *sroom;
{
return(sroom->lx <= xdnstair && xdnstair <= sroom->hx &&
sroom->ly <= ydnstair && ydnstair <= sroom->hy);
}
has_upstairs(sroom)
register struct mkroom *sroom;
struct mkroom *sroom;
{
return(sroom->lx <= xupstair && xupstair <= sroom->hx &&
sroom->ly <= yupstair && yupstair <= sroom->hy);
}
isbig(sroom)
register struct mkroom *sroom;
struct mkroom *sroom;
{
register int area = (sroom->hx - sroom->lx) * (sroom->hy - sroom->ly);
int area = (sroom->hx - sroom->lx) * (sroom->hy - sroom->ly);
return( area > 20 );
}

View File

@ -21,8 +21,8 @@ char *warnings[] = {
movemon()
{
register struct monst *mtmp;
register int fr;
struct monst *mtmp;
int fr;
warnlevel = 0;
@ -80,7 +80,7 @@ movemon()
warnlevel = SIZE(warnings)-1;
if(warnlevel >= 0)
if(warnlevel > lastwarnlev || moves > lastwarntime + 5){
register char *rr;
char *rr;
switch(Warning & (LEFT_RING | RIGHT_RING)){
case LEFT_RING:
rr = "Your left ring glows";
@ -104,7 +104,7 @@ movemon()
}
justswld(mtmp,name)
register struct monst *mtmp;
struct monst *mtmp;
char *name;
{
@ -121,8 +121,8 @@ char *name;
}
youswld(mtmp,dam,die,name)
register struct monst *mtmp;
register dam,die;
struct monst *mtmp;
dam,die;
char *name;
{
if(mtmp != u.ustuck) return;
@ -136,11 +136,11 @@ char *name;
/* flags.botlx = 1; */ /* should we show status line ? */
}
dochugw(mtmp) register struct monst *mtmp; {
register x = mtmp->mx;
register y = mtmp->my;
register d = dochug(mtmp);
register dd;
dochugw(mtmp) struct monst *mtmp; {
x = mtmp->mx;
y = mtmp->my;
d = dochug(mtmp);
dd;
if(!d) /* monster still alive */
if(Warning)
if(!mtmp->mpeaceful)
@ -154,10 +154,10 @@ register dd;
/* returns 1 if monster died moving, 0 otherwise */
dochug(mtmp)
register struct monst *mtmp;
struct monst *mtmp;
{
register struct permonst *mdat;
register tmp, nearby, scared;
struct permonst *mdat;
tmp, nearby, scared;
if(mtmp->cham && !rn2(6))
(void) newcham(mtmp, &mons[dlevel+14+rn2(CMNUM-14-dlevel)]);
@ -236,10 +236,10 @@ register struct monst *mtmp;
}
m_move(mtmp,after)
register struct monst *mtmp;
struct monst *mtmp;
{
register struct monst *mtmp2;
register nx,ny,omx,omy,appr,nearer,cnt,i,j;
struct monst *mtmp2;
nx,ny,omx,omy,appr,nearer,cnt,i,j;
xchar gx,gy,nix,niy,chcnt;
schar chi;
boolean likegold, likegems, likeobjs;
@ -327,7 +327,7 @@ not_special:
if(msym == '@' ||
('a' <= msym && msym <= 'z')) {
extern coord *gettrack();
register coord *cp;
coord *cp;
schar mroom;
mroom = inroom(omx,omy);
if(mroom < 0 || mroom != inroom(u.ux,u.uy)){
@ -345,9 +345,9 @@ not_special:
likeobjs = mtmp->mhide;
#define SRCHRADIUS 25
{ xchar mind = SRCHRADIUS; /* not too far away */
register int dd;
int dd;
if(likegold){
register struct gold *gold;
struct gold *gold;
for(gold = fgold; gold; gold = gold->ngold)
if((dd = DIST(omx,omy,gold->gx,gold->gy)) < mind){
mind = dd;
@ -356,7 +356,7 @@ not_special:
}
}
if(likegems || likeobjs){
register struct obj *otmp;
struct obj *otmp;
for(otmp = fobj; otmp; otmp = otmp->nobj)
if(likeobjs || otmp->olet == GEM_SYM)
if(msym != 'u' ||
@ -449,8 +449,8 @@ postmov:
return(mmoved);
}
mpickgold(mtmp) register struct monst *mtmp; {
register struct gold *gold;
mpickgold(mtmp) struct monst *mtmp; {
struct gold *gold;
while(gold = g_at(mtmp->mx, mtmp->my)){
mtmp->mgold += gold->amount;
freegold(gold);
@ -459,8 +459,8 @@ register struct gold *gold;
}
}
mpickgems(mtmp) register struct monst *mtmp; {
register struct obj *otmp;
mpickgems(mtmp) struct monst *mtmp; {
struct obj *otmp;
for(otmp = fobj; otmp; otmp = otmp->nobj)
if(otmp->olet == GEM_SYM)
if(otmp->ox == mtmp->mx && otmp->oy == mtmp->my)
@ -475,12 +475,12 @@ register struct obj *otmp;
/* return number of acceptable neighbour positions */
mfndpos(mon,poss,info,flag)
register struct monst *mon;
struct monst *mon;
coord poss[9];
int info[9], flag;
{
register int x,y,nx,ny,cnt = 0,ntyp;
register struct monst *mtmp;
int x,y,nx,ny,cnt = 0,ntyp;
struct monst *mtmp;
int nowtyp;
boolean pool;
@ -530,8 +530,8 @@ nexttry: /* eels prefer the water, but if there is no water nearby,
info[cnt] |= NOTONL;
}
/* we cannot avoid traps of an unknown kind */
{ register struct trap *ttmp = t_at(nx, ny);
register int tt;
{ struct trap *ttmp = t_at(nx, ny);
int tt;
if(ttmp) {
tt = 1 << ttmp->ttyp;
if(mon->mtrapseen & tt){
@ -556,9 +556,9 @@ dist(x,y) int x,y; {
}
poisoned(string, pname)
register char *string, *pname;
char *string, *pname;
{
register int i;
int i;
if(Blind) pline("It was poisoned.");
else pline("The %s was poisoned!",string);
@ -582,7 +582,7 @@ register char *string, *pname;
}
mondead(mtmp)
register struct monst *mtmp;
struct monst *mtmp;
{
relobj(mtmp,1);
unpmon(mtmp);
@ -598,7 +598,7 @@ register struct monst *mtmp;
/* called when monster is moved to larger structure */
replmon(mtmp,mtmp2)
register struct monst *mtmp, *mtmp2;
struct monst *mtmp, *mtmp2;
{
relmon(mtmp);
monfree(mtmp);
@ -610,9 +610,9 @@ register struct monst *mtmp, *mtmp2;
}
relmon(mon)
register struct monst *mon;
struct monst *mon;
{
register struct monst *mtmp;
struct monst *mtmp;
if(mon == fmon) fmon = fmon->nmon;
else {
@ -625,13 +625,13 @@ register struct monst *mon;
available shortly after their demise */
struct monst *fdmon; /* chain of dead monsters, need not to be saved */
monfree(mtmp) register struct monst *mtmp; {
monfree(mtmp) struct monst *mtmp; {
mtmp->nmon = fdmon;
fdmon = mtmp;
}
dmonsfree(){
register struct monst *mtmp;
struct monst *mtmp;
while(mtmp = fdmon){
fdmon = mtmp->nmon;
free((char *) mtmp);
@ -639,7 +639,7 @@ register struct monst *mtmp;
}
unstuck(mtmp)
register struct monst *mtmp;
struct monst *mtmp;
{
if(u.ustuck == mtmp) {
if(u.uswallow){
@ -654,13 +654,13 @@ register struct monst *mtmp;
}
killed(mtmp)
register struct monst *mtmp;
struct monst *mtmp;
{
#ifdef lint
#define NEW_SCORING
#endif lint
register int tmp,tmp2,nk,x,y;
register struct permonst *mdat;
int tmp,tmp2,nk,x,y;
struct permonst *mdat;
extern long newuexp();
if(mtmp->cham) mtmp->data = PM_CHAMELEON;
@ -754,7 +754,7 @@ register struct monst *mtmp;
if(ACCESSIBLE(levl[x][y].typ)) /* might be mimic in wall or dead eel*/
if(x != u.ux || y != u.uy) /* might be here after swallowed */
if(index("NTVm&",mdat->mlet) || rn2(5)) {
register struct obj *obj2 = mkobj_at(tmp,x,y);
struct obj *obj2 = mkobj_at(tmp,x,y);
if(cansee(x,y))
atl(x,y,obj2->olet);
stackobj(obj2);
@ -762,7 +762,7 @@ register struct monst *mtmp;
}
kludge(str,arg)
register char *str,*arg;
char *str,*arg;
{
if(Blind) {
if(*str == '%') pline(str,"It");
@ -772,7 +772,7 @@ register char *str,*arg;
rescham() /* force all chameleons to become normal */
{
register struct monst *mtmp;
struct monst *mtmp;
for(mtmp = fmon; mtmp; mtmp = mtmp->nmon)
if(mtmp->cham) {
@ -783,10 +783,10 @@ rescham() /* force all chameleons to become normal */
newcham(mtmp,mdat) /* make a chameleon look like a new monster */
/* returns 1 if the monster actually changed */
register struct monst *mtmp;
register struct permonst *mdat;
struct monst *mtmp;
struct permonst *mdat;
{
register mhp, hpn, hpd;
mhp, hpn, hpd;
if(mdat == mtmp->data) return(0); /* still the same monster */
#ifndef NOWORM
@ -832,11 +832,11 @@ struct monst *mtmp;
pmon(mtmp);
}
ishuman(mtmp) register struct monst *mtmp; {
ishuman(mtmp) struct monst *mtmp; {
return(mtmp->data->mlet == '@');
}
setmangry(mtmp) register struct monst *mtmp; {
setmangry(mtmp) struct monst *mtmp; {
if(!mtmp->mpeaceful) return;
if(mtmp->mtame) return;
mtmp->mpeaceful = 0;
@ -846,7 +846,7 @@ setmangry(mtmp) register struct monst *mtmp; {
/* not one hundred procent correct: now a snake may hide under an
invisible object */
canseemon(mtmp)
register struct monst *mtmp;
struct monst *mtmp;
{
return((!mtmp->minvis || See_invisible)
&& (!mtmp->mhide || !o_at(mtmp->mx,mtmp->my))

View File

@ -9,17 +9,17 @@
extern char *index();
int
letindex(let) register char let; {
register int i = 0;
register char ch;
letindex(let) char let; {
int i = 0;
char ch;
while((ch = obj_symbols[i++]) != 0)
if(ch == let) return(i);
return(0);
}
init_objects(){
register int i, j, first, last, sum, end;
register char let, *tmp;
int i, j, first, last, sum, end;
char let, *tmp;
/* init base; if probs given check that they add up to 100,
otherwise compute probs; shuffle descriptions */
end = SIZE(objects);
@ -64,9 +64,9 @@ register char let, *tmp;
}
}
probtype(let) register char let; {
register int i = bases[letindex(let)];
register int prob = rn2(100);
probtype(let) char let; {
int i = bases[letindex(let)];
int prob = rn2(100);
while((prob -= objects[i].oc_prob) >= 0) i++;
if(objects[i].oc_olet != let || !objects[i].oc_name)
panic("probtype(%c) error, i=%d", let, i);
@ -75,7 +75,7 @@ register int prob = rn2(100);
setgemprobs()
{
register int j,first;
int j,first;
extern xchar dlevel;
first = bases[letindex(GEM_SYM)];
@ -99,8 +99,8 @@ oinit() /* level dependent initialization */
extern long *alloc();
savenames(fd) register fd; {
register int i;
savenames(fd) fd; {
int i;
unsigned len;
bwrite(fd, (char *) bases, sizeof bases);
bwrite(fd, (char *) objects, sizeof objects);
@ -116,8 +116,8 @@ unsigned len;
}
}
restnames(fd) register fd; {
register int i;
restnames(fd) fd; {
int i;
unsigned len;
mread(fd, (char *) bases, sizeof bases);
mread(fd, (char *) objects, sizeof objects);
@ -131,7 +131,7 @@ unsigned len;
dodiscovered() /* free after Robert Viduya */
{
extern char *typename();
register int i, end;
int i, end;
int ct = 0;
cornline(0, "Discoveries");
@ -153,7 +153,7 @@ dodiscovered() /* free after Robert Viduya */
}
interesting_to_discover(i)
register int i;
int i;
{
return(
objects[i].oc_uname != NULL ||

View File

@ -11,8 +11,8 @@ extern char *eos();
extern int bases[];
char *
strprepend(s,pref) register char *s, *pref; {
register int i = strlen(pref);
strprepend(s,pref) char *s, *pref; {
int i = strlen(pref);
if(i > PREFIX) {
pline("WARNING: prefix too short.");
return(s);
@ -31,14 +31,14 @@ static char buf[13];
char *
typename(otyp)
register int otyp;
int otyp;
{
static char buf[BUFSZ];
register struct objclass *ocl = &objects[otyp];
register char *an = ocl->oc_name;
register char *dn = ocl->oc_descr;
register char *un = ocl->oc_uname;
register int nn = ocl->oc_name_known;
struct objclass *ocl = &objects[otyp];
char *an = ocl->oc_name;
char *dn = ocl->oc_descr;
char *un = ocl->oc_uname;
int nn = ocl->oc_name_known;
switch(ocl->oc_olet) {
case POTION_SYM:
Strcpy(buf, "potion");
@ -82,15 +82,15 @@ register int nn = ocl->oc_name_known;
char *
xname(obj)
register struct obj *obj;
struct obj *obj;
{
static char bufr[BUFSZ];
register char *buf = &(bufr[PREFIX]); /* leave room for "17 -3 " */
register int nn = objects[obj->otyp].oc_name_known;
register char *an = objects[obj->otyp].oc_name;
register char *dn = objects[obj->otyp].oc_descr;
register char *un = objects[obj->otyp].oc_uname;
register int pl = (obj->quan != 1);
char *buf = &(bufr[PREFIX]); /* leave room for "17 -3 " */
int nn = objects[obj->otyp].oc_name_known;
char *an = objects[obj->otyp].oc_name;
char *dn = objects[obj->otyp].oc_descr;
char *un = objects[obj->otyp].oc_uname;
int pl = (obj->quan != 1);
if(!obj->dknown && !Blind) obj->dknown = 1; /* %% doesnt belong here */
switch(obj->olet) {
case AMULET_SYM:
@ -210,12 +210,12 @@ register int pl = (obj->quan != 1);
obj->olet,obj->olet,obj->otyp,obj->spe);
}
if(pl) {
register char *p;
char *p;
for(p = buf; *p; p++) {
if(!strncmp(" of ", p, 4)) {
/* pieces of, cloves of, lumps of */
register int c1, c2 = 's';
int c1, c2 = 's';
do {
c1 = c2; c2 = *p; *p++ = c1;
@ -242,10 +242,10 @@ nopl:
char *
doname(obj)
register struct obj *obj;
struct obj *obj;
{
char prefix[PREFIX];
register char *bp = xname(obj);
char *bp = xname(obj);
if(obj->quan != 1)
Sprintf(prefix, "%u ", obj->quan);
else
@ -290,7 +290,7 @@ register char *bp = xname(obj);
/* used only in hack.fight.c (thitu) */
setan(str,buf)
register char *str,*buf;
char *str,*buf;
{
if(index(vowels,*str))
Sprintf(buf, "an %s", str);
@ -299,8 +299,8 @@ register char *str,*buf;
}
char *
aobjnam(otmp,verb) register struct obj *otmp; register char *verb; {
register char *bp = xname(otmp);
aobjnam(otmp,verb) struct obj *otmp; char *verb; {
char *bp = xname(otmp);
char prefix[PREFIX];
if(otmp->quan != 1) {
Sprintf(prefix, "%u ", otmp->quan);
@ -324,9 +324,9 @@ char prefix[PREFIX];
char *
Doname(obj)
register struct obj *obj;
struct obj *obj;
{
register char *s = doname(obj);
char *s = doname(obj);
if('a' <= *s && *s <= 'z') *s -= ('a' - 'A');
return(s);
@ -336,9 +336,9 @@ char *wrp[] = { "wand", "ring", "potion", "scroll", "gem" };
char wrpsym[] = { WAND_SYM, RING_SYM, POTION_SYM, SCROLL_SYM, GEM_SYM };
struct obj *
readobjnam(bp) register char *bp; {
register char *p;
register int i;
readobjnam(bp) char *bp; {
char *p;
int i;
int cnt, spe, spesgn, typ, heavy;
char let;
char *un, *dn, *an;
@ -461,7 +461,7 @@ sing:
goto srch;
}
for(i = 0; i < sizeof(wrpsym); i++) {
register int j = strlen(wrp[i]);
int j = strlen(wrp[i]);
if(!strncmp(bp, wrp[i], j)){
let = wrpsym[i];
bp += j;
@ -496,7 +496,7 @@ srch:
i = 1;
if(let) i = bases[letindex(let)];
while(i <= NROFOBJECTS && (!let || objects[i].oc_olet == let)){
register char *zn = objects[i].oc_name;
char *zn = objects[i].oc_name;
if(!zn) goto nxti;
if(an && strcmp(an, zn))
@ -514,7 +514,7 @@ any:
if(!let) let = wrpsym[rn2(sizeof(wrpsym))];
typ = probtype(let);
typfnd:
{ register struct obj *otmp;
{ struct obj *otmp;
extern struct obj *mksobj();
let = objects[typ].oc_olet;
otmp = mksobj(typ);

View File

@ -9,7 +9,7 @@ extern char *eos();
initoptions()
{
register char *opts;
char *opts;
flags.time = flags.nonews = flags.notombstone = flags.end_own =
flags.standout = flags.nonull = FALSE;
@ -24,10 +24,10 @@ initoptions()
}
parseoptions(opts, from_env)
register char *opts;
char *opts;
boolean from_env;
{
register char *op,*op2;
char *op,*op2;
unsigned num;
boolean negated;
@ -193,7 +193,7 @@ doset()
flags.end_top, flags.end_around);
if(flags.end_own) (void) strcat(buf, "/own scores");
} else {
register char *eop = eos(buf);
char *eop = eos(buf);
if(*--eop == ',') *eop = 0;
}
pline(buf);

View File

@ -21,7 +21,7 @@ dowhatis()
{
FILE *fp;
char bufr[BUFSZ+6];
register char *buf = &bufr[6], *ep, q;
char *buf = &bufr[6], *ep, q;
extern char readchar();
if(!(fp = fopen(DATAFILE, "r")))
@ -71,7 +71,7 @@ page_more(fp,strip)
FILE *fp;
int strip; /* nr of chars to be stripped from each line (0 or 1) */
{
register char *bufr, *ep;
char *bufr, *ep;
sig_t prevsig = signal(SIGINT, intruph);
set_pager(0);
@ -103,7 +103,7 @@ set_whole_screen() { /* called in termcap as soon as LI is known */
#ifdef NEWS
readnews() {
register int ret;
int ret;
whole_screen = TRUE; /* force a docrt(), our first */
ret = page_file(NEWS, TRUE);
@ -113,7 +113,7 @@ readnews() {
#endif NEWS
set_pager(mode)
register int mode; /* 0: open 1: wait+close 2: close */
int mode; /* 0: open 1: wait+close 2: close */
{
static boolean so;
if(mode == 0) {
@ -143,7 +143,7 @@ register int mode; /* 0: open 1: wait+close 2: close */
}
page_line(s) /* returns 1 if we should quit */
register char *s;
char *s;
{
extern char morc;
@ -190,7 +190,7 @@ char *text;
} *texthead, *texttail;
static int maxlen;
static int linect;
register struct line *tl;
struct line *tl;
if(mode == 0) {
texthead = 0;
@ -204,7 +204,7 @@ char *text;
}
if(mode == 1) {
register int len;
int len;
if(!text) return; /* superfluous, just to be sure */
linect++;
@ -229,7 +229,7 @@ char *text;
pline(texthead->line_text);
else
if(mode == 2) {
register int curline, lth;
int curline, lth;
if(flags.toplin == 1) more(); /* ab@unido */
remember_topl();
@ -290,14 +290,14 @@ dohelp()
}
page_file(fnam, silent) /* return: 0 - cannot open fnam; 1 - otherwise */
register char *fnam;
char *fnam;
boolean silent;
{
#ifdef DEF_PAGER /* this implies that UNIX is defined */
{
/* use external pager; this may give security problems */
register int fd = open(fnam, 0);
int fd = open(fnam, 0);
if(fd < 0) {
if(!silent) pline("Cannot open %s.", fnam);
@ -341,7 +341,7 @@ boolean silent;
#ifdef UNIX
#ifdef SHELL
dosh(){
register char *str;
char *str;
if(child(0)) {
if(str = getenv("SHELL"))
execl(str, str, (char *) 0);
@ -375,7 +375,7 @@ union wait { /* used only for the cast (union wait *) 0 */
child(wt) {
int status;
register int f;
int f;
f = fork();
if(f == 0){ /* child */

View File

@ -9,9 +9,9 @@ extern struct monst youmonst;
extern struct monst *makemon();
dodrink() {
register struct obj *otmp,*objs;
register struct monst *mtmp;
register int unkn = 0, nothing = 0;
struct obj *otmp,*objs;
struct monst *mtmp;
int unkn = 0, nothing = 0;
otmp = getobj("!", "drink");
if(!otmp) return(0);
@ -191,7 +191,7 @@ use_it:
pluslvl()
{
register num;
num;
pline("You feel more experienced.");
num = rnd(10);
@ -207,8 +207,8 @@ pluslvl()
}
strange_feeling(obj,txt)
register struct obj *obj;
register char *txt;
struct obj *obj;
char *txt;
{
if(flags.beginner)
pline("You have a strange feeling for a moment, then it passes.");
@ -224,11 +224,11 @@ char *bottlenames[] = {
};
potionhit(mon, obj)
register struct monst *mon;
register struct obj *obj;
struct monst *mon;
struct obj *obj;
{
extern char *xname();
register char *botlnam = bottlenames[rn2(SIZE(bottlenames))];
char *botlnam = bottlenames[rn2(SIZE(bottlenames))];
boolean uclose, isyou = (mon == &youmonst);
if(isyou) {
@ -296,7 +296,7 @@ register struct obj *obj;
}
potionbreathe(obj)
register struct obj *obj;
struct obj *obj;
{
switch(obj->otyp) {
case POT_RESTORE_STRENGTH:
@ -355,7 +355,7 @@ register struct obj *obj;
* -- become a jug? Etc.
*/
dodip(){
register struct obj *potion, *obj;
struct obj *potion, *obj;
if(!(obj = getobj("#", "dip")))
return(0);
@ -374,7 +374,7 @@ dodip(){
ghost_from_bottle(){
extern struct permonst pm_ghost;
register struct monst *mtmp;
struct monst *mtmp;
if(!(mtmp = makemon(PM_GHOST,u.ux,u.uy))){
pline("This bottle turns out to be empty.");

View File

@ -52,9 +52,9 @@ char *str;
}
atl(x,y,ch)
register x,y;
x,y;
{
register struct rm *crm = &levl[x][y];
struct rm *crm = &levl[x][y];
if(x<0 || x>COLNO-1 || y<0 || y>ROWNO-1){
impossible("atl(%d,%d,%c)",x,y,ch);
@ -67,7 +67,7 @@ register x,y;
}
on_scr(x,y)
register x,y;
x,y;
{
if(x < scrlx) scrlx = x;
if(x > scrhx) scrhx = x;
@ -114,7 +114,7 @@ Tmp_at(x,y) schar x,y; {
static char let;
static xchar cnt;
static coord tc[COLNO]; /* but watch reflecting beams! */
register xx,yy;
xx,yy;
if((int)x == -1) {
if(y > 0) { /* open call */
let = y;
@ -152,7 +152,7 @@ setclipped(){
}
at(x,y,ch)
register xchar x,y;
xchar x,y;
char ch;
{
#ifndef lint
@ -184,9 +184,9 @@ doredraw()
docrt()
{
register x,y;
register struct rm *room;
register struct monst *mtmp;
x,y;
struct rm *room;
struct monst *mtmp;
if(u.uswallow) {
swallowed();
@ -221,10 +221,10 @@ docrt()
bot();
}
docorner(xmin,ymax) register xmin,ymax; {
register x,y;
register struct rm *room;
register struct monst *mtmp;
docorner(xmin,ymax) xmin,ymax; {
x,y;
struct rm *room;
struct monst *mtmp;
if(u.uswallow) { /* Can be done more efficiently */
swallowed();
@ -292,9 +292,9 @@ extern struct wseg *m_atseg;
/* print a position that is visible for @ */
prl(x,y)
{
register struct rm *room;
register struct monst *mtmp;
register struct obj *otmp;
struct rm *room;
struct monst *mtmp;
struct obj *otmp;
if(x == u.ux && y == u.uy && (!Invisible)) {
pru();
@ -333,12 +333,12 @@ prl(x,y)
char
news0(x,y)
register xchar x,y;
xchar x,y;
{
register struct obj *otmp;
register struct trap *ttmp;
struct obj *otmp;
struct trap *ttmp;
struct rm *room;
register char tmp;
char tmp;
room = &levl[x][y];
if(!room->seen) tmp = ' ';
@ -382,7 +382,7 @@ register xchar x,y;
}
newsym(x,y)
register x,y;
x,y;
{
atl(x,y,news0(x,y));
}
@ -390,9 +390,9 @@ register x,y;
/* used with wand of digging (or pick-axe): fill scrsym and force display */
/* also when a POOL evaporates */
mnewsym(x,y)
register x,y;
x,y;
{
register struct rm *room;
struct rm *room;
char newscrsym;
if(!vism_at(x,y)) {
@ -406,9 +406,9 @@ register x,y;
}
nosee(x,y)
register x,y;
x,y;
{
register struct rm *room;
struct rm *room;
if(!isok(x,y)) return;
room = &levl[x][y];
@ -421,7 +421,7 @@ register x,y;
#ifndef QUEST
prl1(x,y)
register x,y;
x,y;
{
if(u.dx) {
if(u.dy) {
@ -443,7 +443,7 @@ register x,y;
}
nose1(x,y)
register x,y;
x,y;
{
if(u.dx) {
if(u.dy) {
@ -466,9 +466,9 @@ register x,y;
#endif QUEST
vism_at(x,y)
register x,y;
x,y;
{
register struct monst *mtmp;
struct monst *mtmp;
return((x == u.ux && y == u.uy && !Invisible)
? 1 :
@ -478,8 +478,8 @@ register x,y;
}
#ifdef NEWSCR
pobj(obj) register struct obj *obj; {
register int show = (!obj->oinvis || See_invisible) &&
pobj(obj) struct obj *obj; {
int show = (!obj->oinvis || See_invisible) &&
cansee(obj->ox,obj->oy);
if(obj->odispl){
if(obj->odx != obj->ox || obj->ody != obj->oy || !show)
@ -497,7 +497,7 @@ register int show = (!obj->oinvis || See_invisible) &&
}
#endif NEWSCR
unpobj(obj) register struct obj *obj; {
unpobj(obj) struct obj *obj; {
/* if(obj->odispl){
if(!vism_at(obj->odx, obj->ody))
newsym(obj->odx, obj->ody);
@ -509,7 +509,7 @@ unpobj(obj) register struct obj *obj; {
}
seeobjs(){
register struct obj *obj, *obj2;
struct obj *obj, *obj2;
for(obj = fobj; obj; obj = obj2) {
obj2 = obj->nobj;
if(obj->olet == FOOD_SYM && obj->otyp >= CORPSE
@ -525,7 +525,7 @@ register struct obj *obj, *obj2;
}
seemons(){
register struct monst *mtmp;
struct monst *mtmp;
for(mtmp = fmon; mtmp; mtmp = mtmp->nmon){
if(mtmp->data->mlet == ';')
mtmp->minvis = (u.ustuck != mtmp &&
@ -537,8 +537,8 @@ register struct monst *mtmp;
}
}
pmon(mon) register struct monst *mon; {
register int show = (Blind && Telepat) || canseemon(mon);
pmon(mon) struct monst *mon; {
int show = (Blind && Telepat) || canseemon(mon);
if(mon->mdispl){
if(mon->mdx != mon->mx || mon->mdy != mon->my || !show)
unpmon(mon);
@ -554,7 +554,7 @@ register int show = (Blind && Telepat) || canseemon(mon);
}
}
unpmon(mon) register struct monst *mon; {
unpmon(mon) struct monst *mon; {
if(mon->mdispl){
newsym(mon->mdx, mon->mdy);
mon->mdispl = 0;
@ -563,8 +563,8 @@ unpmon(mon) register struct monst *mon; {
nscr()
{
register x,y;
register struct rm *room;
x,y;
struct rm *room;
if(u.uswallow || u.ux == FAR || flags.nscrinh) return;
pru();
@ -582,7 +582,7 @@ nscr()
/* 100 suffices for bot(); no relation with COLNO */
char oldbot[100], newbot[100];
cornbot(lth)
register int lth;
int lth;
{
if(lth < sizeof(oldbot)) {
oldbot[lth] = 0;
@ -592,8 +592,8 @@ register int lth;
bot()
{
register char *ob = oldbot, *nb = newbot;
register int i;
char *ob = oldbot, *nb = newbot;
int i;
extern char *eos();
if(flags.botlx) *ob = 0;
flags.botl = flags.botlx = 0;
@ -622,7 +622,7 @@ extern char *eos();
if(flags.time)
(void) sprintf(eos(newbot), " %ld", moves);
if(strlen(newbot) >= COLNO) {
register char *bp0, *bp1;
char *bp0, *bp1;
bp0 = bp1 = newbot;
do {
if(*bp0 != ' ' || bp0[1] != ' ' || bp0[2] != ' ')
@ -642,7 +642,7 @@ extern char *eos();
}
#ifdef WAN_PROBING
mstatusline(mtmp) register struct monst *mtmp; {
mstatusline(mtmp) struct monst *mtmp; {
pline("Status of %s: ", monnam(mtmp));
pline("Level %-2d Gold %-5lu Hp %3d(%d) Ac %-2d Dam %d",
mtmp->data->mlevel, mtmp->mgold, mtmp->mhp, mtmp->mhpmax,

View File

@ -9,9 +9,9 @@ extern struct obj *mkobj_at();
int identify();
doread() {
register struct obj *scroll;
register boolean confused = (Confusion != 0);
register boolean known = FALSE;
struct obj *scroll;
boolean confused = (Confusion != 0);
boolean known = FALSE;
extern struct obj *some_armor();
scroll = getobj("?", "read");
@ -34,7 +34,7 @@ doread() {
break;
#endif MAIL
case SCR_ENCHANT_ARMOR:
{ register struct obj *otmp = some_armor();
{ struct obj *otmp = some_armor();
if(!otmp) {
strange_feeling(scroll,"Your skin glows then fades.");
return(1);
@ -59,7 +59,7 @@ doread() {
}
case SCR_DESTROY_ARMOR:
if(confused) {
register struct obj *otmp = some_armor();
struct obj *otmp = some_armor();
if(!otmp) {
strange_feeling(scroll,"Your bones itch.");
return(1);
@ -94,8 +94,8 @@ doread() {
}
break;
case SCR_SCARE_MONSTER:
{ register int ct = 0;
register struct monst *mtmp;
{ int ct = 0;
struct monst *mtmp;
for(mtmp = fmon; mtmp; mtmp = mtmp->nmon)
if(cansee(mtmp->mx,mtmp->my)) {
@ -121,7 +121,7 @@ doread() {
pline("This scroll seems to be blank.");
break;
case SCR_REMOVE_CURSE:
{ register struct obj *obj;
{ struct obj *obj;
if(confused)
pline("You feel like you need some help.");
else
@ -141,7 +141,7 @@ doread() {
break;
}
case SCR_CREATE_MONSTER:
{ register int cnt = 1;
{ int cnt = 1;
if(!rn2(73)) cnt += rnd(4);
if(confused) cnt += 12;
@ -169,9 +169,9 @@ doread() {
return(1);
break;
case SCR_TAMING:
{ register int i,j;
register int bd = confused ? 5 : 1;
register struct monst *mtmp;
{ int i,j;
int bd = confused ? 5 : 1;
struct monst *mtmp;
for(i = -bd; i <= bd; i++) for(j = -bd; j <= bd; j++)
if(mtmp = m_at(u.ux+i, u.uy+j))
@ -181,7 +181,7 @@ doread() {
case SCR_GENOCIDE:
{ extern char genocided[], fut_geno[];
char buf[BUFSZ];
register struct monst *mtmp, *mtmp2;
struct monst *mtmp, *mtmp2;
pline("You have found a scroll of genocide!");
known = TRUE;
@ -220,11 +220,11 @@ doread() {
level_tele();
else {
#ifdef QUEST
register int oux = u.ux, ouy = u.uy;
int oux = u.ux, ouy = u.uy;
tele();
if(dist(oux, ouy) > 100) known = TRUE;
#else QUEST
register int uroom = inroom(u.ux, u.uy);
int uroom = inroom(u.ux, u.uy);
tele();
if(uroom != inroom(u.ux, u.uy)) known = TRUE;
#endif QUEST
@ -234,7 +234,7 @@ doread() {
/* Unfortunately this code has become slightly less elegant,
now that gold and traps no longer are of the same type. */
if(confused) {
register struct trap *ttmp;
struct trap *ttmp;
if(!ftrap) {
strange_feeling(scroll, "Your toes stop itching.");
@ -254,7 +254,7 @@ doread() {
pline("You feel very greedy!");
}
} else {
register struct gold *gtmp;
struct gold *gtmp;
if(!fgold) {
strange_feeling(scroll, "You feel materially poor.");
@ -280,9 +280,9 @@ doread() {
docrt();
break;
case SCR_FOOD_DETECTION:
{ register ct = 0, ctu = 0;
register struct obj *obj;
register char foodsym = confused ? POTION_SYM : FOOD_SYM;
{ ct = 0, ctu = 0;
struct obj *obj;
char foodsym = confused ? POTION_SYM : FOOD_SYM;
for(obj = fobj; obj; obj = obj->nobj)
if(obj->olet == FOOD_SYM) {
@ -326,8 +326,8 @@ doread() {
);
return(1);
case SCR_MAGIC_MAPPING:
{ register struct rm *lev;
register int num, zx, zy;
{ struct rm *lev;
int num, zx, zy;
known = TRUE;
pline("On this scroll %s a map!",
@ -361,7 +361,7 @@ doread() {
break;
}
case SCR_AMNESIA:
{ register int zx, zy;
{ int zx, zy;
known = TRUE;
for(zx = 0; zx < COLNO; zx++) for(zy = 0; zy < ROWNO; zy++)
@ -373,8 +373,8 @@ doread() {
break;
}
case SCR_FIRE:
{ register int num;
register struct monst *mtmp;
{ int num;
struct monst *mtmp;
known = TRUE;
if(confused) {
@ -437,7 +437,7 @@ doread() {
}
identify(otmp) /* also called by newmail() */
register struct obj *otmp;
struct obj *otmp;
{
objects[otmp->otyp].oc_name_known = 1;
otmp->known = otmp->dknown = 1;
@ -446,9 +446,9 @@ register struct obj *otmp;
}
litroom(on)
register boolean on;
boolean on;
{
register num,zx,zy;
num,zx,zy;
/* first produce the text (provided he is not blind) */
if(Blind) goto do_it;
@ -521,9 +521,9 @@ do_it:
/* Test whether we may genocide all monsters with symbol ch */
monstersym(ch) /* arnold@ucsfcgl */
register char ch;
char ch;
{
register struct permonst *mp;
struct permonst *mp;
extern struct permonst pm_eel;
/*

View File

@ -26,10 +26,10 @@ static char *rip[] = {
};
outrip(){
register char **dp = rip;
register char *dpx;
char **dp = rip;
char *dpx;
char buf[BUFSZ];
register x,y;
x,y;
cls();
(void) strcpy(buf, plname);
@ -44,7 +44,7 @@ outrip(){
center(8, buf);
(void) strcpy(buf, killer);
if(strlen(buf) > 16) {
register int i,i0,i1;
int i,i0,i1;
i0 = i1 = 0;
for(i = 0; i <= 16; i++)
if(buf[i] == ' ') i0 = i, i1 = i+1;
@ -75,7 +75,7 @@ outrip(){
}
center(line, text) int line; char *text; {
register char *ip,*op;
char *ip,*op;
ip = text;
op = &rip[line][28 - ((strlen(text)+1)/2)];
while(*ip) *op++ = *ip++;

View File

@ -11,8 +11,8 @@ int n_rumors = 0;
int n_used_rumors = -1;
char *usedbits;
init_rumors(rumf) register FILE *rumf; {
register int i;
init_rumors(rumf) FILE *rumf; {
int i;
n_used_rumors = 0;
while(skipline(rumf)) n_rumors++;
rewind(rumf);
@ -21,7 +21,7 @@ register int i;
for( ; i>=0; i--) usedbits[i] = 0;
}
skipline(rumf) register FILE *rumf; {
skipline(rumf) FILE *rumf; {
char line[COLNO];
while(1) {
if(!fgets(line, sizeof(line), rumf)) return(0);
@ -29,9 +29,9 @@ char line[COLNO];
}
}
outline(rumf) register FILE *rumf; {
outline(rumf) FILE *rumf; {
char line[COLNO];
register char *ep;
char *ep;
if(!fgets(line, sizeof(line), rumf)) return;
if((ep = index(line, '\n')) != 0) *ep = 0;
pline("This cookie has a scrap of paper inside! It reads: ");
@ -39,8 +39,8 @@ register char *ep;
}
outrumor(){
register int rn,i;
register FILE *rumf;
int rn,i;
FILE *rumf;
if(n_rumors <= n_used_rumors ||
(rumf = fopen(RUMORFILE, "r")) == (FILE *) 0) return;
if(n_used_rumors < 0) init_rumors(rumf);
@ -59,6 +59,6 @@ none:
(void) fclose(rumf);
}
used(i) register int i; {
used(i) int i; {
return(usedbits[i/CHARSZ] & (1 << (i % CHARSZ)));
}

View File

@ -32,8 +32,8 @@ hangup(){
/* returns 1 if save successful */
dosave0(hu) int hu; {
register fd, ofd;
int tmp; /* not register ! */
fd, ofd;
int tmp; /* not ! */
(void) signal(SIGHUP, SIG_IGN);
(void) signal(SIGINT, SIG_IGN);
@ -89,10 +89,10 @@ dosave0(hu) int hu; {
}
dorecover(fd)
register fd;
fd;
{
register nfd;
int tmp; /* not a register ! */
nfd;
int tmp; /* not a ! */
unsigned mid; /* idem */
struct obj *otmp;
extern boolean restoring;
@ -154,7 +154,7 @@ register fd;
}
}
if(u.ustuck) {
register struct monst *mtmp;
struct monst *mtmp;
for(mtmp = fmon; mtmp; mtmp = mtmp->nmon)
if(mtmp->m_id == mid) goto monfnd;
@ -172,10 +172,10 @@ register fd;
struct obj *
restobjchn(fd)
register fd;
fd;
{
register struct obj *otmp, *otmp2;
register struct obj *first = 0;
struct obj *otmp, *otmp2;
struct obj *first = 0;
int xl;
#ifdef lint
/* suppress "used before set" warning from lint */
@ -200,10 +200,10 @@ register fd;
struct monst *
restmonchn(fd)
register fd;
fd;
{
register struct monst *mtmp, *mtmp2;
register struct monst *first = 0;
struct monst *mtmp, *mtmp2;
struct monst *first = 0;
int xl;
struct permonst *monbegin;

View File

@ -9,9 +9,9 @@ extern struct monst *makemon();
findit() /* returns number of things found */
{
int num;
register xchar zx,zy;
register struct trap *ttmp;
register struct monst *mtmp;
xchar zx,zy;
struct trap *ttmp;
struct monst *mtmp;
xchar lx,hx,ly,hy;
if(u.uswallow) return(0);
@ -51,9 +51,9 @@ findit() /* returns number of things found */
dosearch()
{
register xchar x,y;
register struct trap *trap;
register struct monst *mtmp;
xchar x,y;
struct trap *trap;
struct monst *mtmp;
if(u.uswallow)
pline("What are you looking for? The exit?");
@ -98,8 +98,8 @@ dosearch()
}
doidtrap() {
register struct trap *trap;
register int x,y;
struct trap *trap;
int x,y;
if(!getdir(1)) return(0);
x = u.ux + u.dx;
y = u.uy + u.dy;
@ -116,7 +116,7 @@ register int x,y;
}
wakeup(mtmp)
register struct monst *mtmp;
struct monst *mtmp;
{
mtmp->msleep = 0;
setmangry(mtmp);
@ -125,7 +125,7 @@ register struct monst *mtmp;
/* NOTE: we must check if(mtmp->mimic) before calling this routine */
seemimic(mtmp)
register struct monst *mtmp;
struct monst *mtmp;
{
mtmp->mimic = 0;
mtmp->mappearance = 0;

View File

@ -7,7 +7,7 @@
int shlevel = 0;
struct monst *shopkeeper = 0;
struct obj *billobjs = 0;
obfree(obj,merge) register struct obj *obj, *merge; {
obfree(obj,merge) struct obj *obj, *merge; {
free((char *) obj);
}
inshop(){ return(0); }
@ -65,7 +65,7 @@ static char *shopnam[] = {
char *
shkname(mtmp) /* called in do_name.c */
register struct monst *mtmp;
struct monst *mtmp;
{
return(ESHK(mtmp)->shknam);
}
@ -73,9 +73,9 @@ register struct monst *mtmp;
static void setpaid();
shkdead(mtmp) /* called in mon.c */
register struct monst *mtmp;
struct monst *mtmp;
{
register struct eshk *eshk = ESHK(mtmp);
struct eshk *eshk = ESHK(mtmp);
if(eshk->shoplevel == dlevel)
rooms[eshk->shoproom].rtype = 0;
@ -87,7 +87,7 @@ register struct monst *mtmp;
}
replshk(mtmp,mtmp2)
register struct monst *mtmp, *mtmp2;
struct monst *mtmp, *mtmp2;
{
if(mtmp == shopkeeper) {
shopkeeper = mtmp2;
@ -98,8 +98,8 @@ register struct monst *mtmp, *mtmp2;
static void
setpaid(){ /* caller has checked that shopkeeper exists */
/* either we paid or left the shop or he just died */
register struct obj *obj;
register struct monst *mtmp;
struct obj *obj;
struct monst *mtmp;
for(obj = invent; obj; obj = obj->nobj)
obj->unpaid = 0;
for(obj = fobj; obj; obj = obj->nobj)
@ -122,8 +122,8 @@ register struct monst *mtmp;
static
addupbill(){ /* delivers result in total */
/* caller has checked that shopkeeper exists */
register ct = ESHK(shopkeeper)->billct;
register struct bill_x *bp = bill;
ct = ESHK(shopkeeper)->billct;
struct bill_x *bp = bill;
total = 0;
while(ct--){
total += bp->price * bp->bquan;
@ -132,7 +132,7 @@ register struct bill_x *bp = bill;
}
inshop(){
register roomno = inroom(u.ux,u.uy);
roomno = inroom(u.ux,u.uy);
static void findshk();
@ -161,8 +161,8 @@ register roomno = inroom(u.ux,u.uy);
/* Did we just enter a zoo of some kind? */
if(roomno >= 0) {
register int rt = rooms[roomno].rtype;
register struct monst *mtmp;
int rt = rooms[roomno].rtype;
struct monst *mtmp;
if(rt == ZOO) {
pline("Welcome to David's treasure zoo!");
} else
@ -230,9 +230,9 @@ register roomno = inroom(u.ux,u.uy);
static void
findshk(roomno)
register roomno;
roomno;
{
register struct monst *mtmp;
struct monst *mtmp;
for(mtmp = fmon; mtmp; mtmp = mtmp->nmon)
if(mtmp->isshk && ESHK(mtmp)->shoproom == roomno
&& ESHK(mtmp)->shoplevel == dlevel) {
@ -252,8 +252,8 @@ register struct monst *mtmp;
}
static struct bill_x *
onbill(obj) register struct obj *obj; {
register struct bill_x *bp;
onbill(obj) struct obj *obj; {
struct bill_x *bp;
if(!shopkeeper) return(0);
for(bp = bill; bp < &bill[ESHK(shopkeeper)->billct]; bp++)
if(bp->bo_id == obj->o_id) {
@ -265,9 +265,9 @@ register struct bill_x *bp;
}
/* called with two args on merge */
obfree(obj,merge) register struct obj *obj, *merge; {
register struct bill_x *bp = onbill(obj);
register struct bill_x *bpm;
obfree(obj,merge) struct obj *obj, *merge; {
struct bill_x *bp = onbill(obj);
struct bill_x *bpm;
if(bp) {
if(!merge){
bp->useup = 1;
@ -294,7 +294,7 @@ register struct bill_x *bpm;
static
pay(tmp,shkp)
long tmp;
register struct monst *shkp;
struct monst *shkp;
{
long robbed = ESHK(shkp)->robbed;
@ -310,8 +310,8 @@ register struct monst *shkp;
dopay(){
long ltmp;
register struct bill_x *bp;
register struct monst *shkp;
struct bill_x *bp;
struct monst *shkp;
int pass, tmp;
static int dopayobj();
@ -427,8 +427,8 @@ int pass, tmp;
/* 0 if not enough money */
/* -1 if object could not be found (but was paid) */
static
dopayobj(bp) register struct bill_x *bp; {
register struct obj *obj;
dopayobj(bp) struct bill_x *bp; {
struct obj *obj;
long ltmp;
/* find the object on one of the lists */
@ -457,7 +457,7 @@ long ltmp;
pline("You bought %s for %ld gold piece%s.",
doname(obj), ltmp, plur(ltmp));
if(bp->useup) {
register struct obj *otmp = billobjs;
struct obj *otmp = billobjs;
if(obj == billobjs)
billobjs = obj->nobj;
else {
@ -492,11 +492,11 @@ paybill(){
/* find obj on one of the lists */
struct obj *
bp_to_obj(bp)
register struct bill_x *bp;
struct bill_x *bp;
{
register struct obj *obj;
register struct monst *mtmp;
register unsigned id = bp->bo_id;
struct obj *obj;
struct monst *mtmp;
unsigned id = bp->bo_id;
if(bp->useup)
obj = o_on(id, billobjs);
@ -516,8 +516,8 @@ register struct bill_x *bp;
static int getprice();
/* called in hack.c when we pickup an object */
addtobill(obj) register struct obj *obj; {
register struct bill_x *bp;
addtobill(obj) struct obj *obj; {
struct bill_x *bp;
if(!inshop() ||
(u.ux == ESHK(shopkeeper)->shk.x && u.uy == ESHK(shopkeeper)->shk.y) ||
(u.ux == ESHK(shopkeeper)->shd.x && u.uy == ESHK(shopkeeper)->shd.y) ||
@ -536,10 +536,10 @@ register struct bill_x *bp;
obj->unpaid = 1;
}
splitbill(obj,otmp) register struct obj *obj, *otmp; {
splitbill(obj,otmp) struct obj *obj, *otmp; {
/* otmp has been split off from obj */
register struct bill_x *bp;
register int tmp;
struct bill_x *bp;
int tmp;
bp = onbill(obj);
if(!bp) {
impossible("splitbill: not on bill?");
@ -566,11 +566,11 @@ register int tmp;
}
}
subfrombill(obj) register struct obj *obj; {
subfrombill(obj) struct obj *obj; {
long ltmp;
register int tmp;
register struct obj *otmp;
register struct bill_x *bp;
int tmp;
struct obj *otmp;
struct bill_x *bp;
if(!inshop() || (u.ux == ESHK(shopkeeper)->shk.x && u.uy == ESHK(shopkeeper)->shk.y) ||
(u.ux == ESHK(shopkeeper)->shd.x && u.uy == ESHK(shopkeeper)->shd.y))
return;
@ -632,13 +632,13 @@ pline("Thank you for your contribution to restock this recently plundered shop."
doinvbill(mode)
int mode; /* 0: deliver count 1: paged */
{
register struct bill_x *bp;
register struct obj *obj;
struct bill_x *bp;
struct obj *obj;
long totused, thisused;
char buf[BUFSZ];
if(mode == 0) {
register int cnt = 0;
int cnt = 0;
if(shopkeeper)
for(bp = bill; bp - bill < ESHK(shopkeeper)->billct; bp++)
@ -665,7 +665,7 @@ int mode; /* 0: deliver count 1: paged */
goto quit;
}
if(bp->useup || bp->bquan > obj->quan) {
register int cnt, oquan, uquan;
int cnt, oquan, uquan;
oquan = obj->quan;
uquan = (bp->useup ? bp->bquan : bp->bquan - oquan);
@ -693,8 +693,8 @@ quit:
}
static
getprice(obj) register struct obj *obj; {
register int tmp, ac;
getprice(obj) struct obj *obj; {
int tmp, ac;
static int realhunger();
switch(obj->olet){
@ -753,8 +753,8 @@ register int tmp, ac;
static
realhunger(){ /* not completely foolproof */
register tmp = u.uhunger;
register struct obj *otmp = invent;
tmp = u.uhunger;
struct obj *otmp = invent;
while(otmp){
if(otmp->olet == FOOD_SYM && !otmp->unpaid)
tmp += objects[otmp->otyp].nutrition;
@ -764,9 +764,9 @@ register struct obj *otmp = invent;
}
shkcatch(obj)
register struct obj *obj;
struct obj *obj;
{
register struct monst *shkp = shopkeeper;
struct monst *shkp = shopkeeper;
if(u.uinshop && shkp && !shkp->mfroz && !shkp->msleep &&
u.dx && u.dy &&
@ -785,13 +785,13 @@ register struct obj *obj;
* shk_move: return 1: he moved 0: he didnt -1: let m_move do it
*/
shk_move(shkp)
register struct monst *shkp;
struct monst *shkp;
{
register struct monst *mtmp;
register struct permonst *mdat = shkp->data;
register xchar gx,gy,omx,omy,nx,ny,nix,niy;
register schar appr,i;
register int udist;
struct monst *mtmp;
struct permonst *mdat = shkp->data;
xchar gx,gy,omx,omy,nx,ny,nix,niy;
schar appr,i;
int udist;
int z;
schar shkroom,chi,chcnt,cnt;
boolean uondoor, satdoor, avoid, badinv;
@ -903,7 +903,7 @@ register struct monst *shkp;
|| ESHK(shkp)->following) {
#ifdef STUPID
/* cater for stupid compilers */
register int zz;
int zz;
#endif STUPID
if(uondoor && (ib = sobj_at(ICE_BOX, nx, ny))) {
nix = nx; niy = ny; chi = i; break;
@ -947,7 +947,7 @@ register struct monst *shkp;
/* He is digging in the shop. */
shopdig(fall)
register int fall;
int fall;
{
if(!fall) {
if(u.utraptype == TT_PIT)
@ -955,7 +955,7 @@ register int fall;
else
pline("\"Please, do not damage the floor here.\"");
} else if(dist(shopkeeper->mx, shopkeeper->my) < 3) {
register struct obj *obj, *obj2;
struct obj *obj, *obj2;
pline("%s grabs your backpack!", shkname(shopkeeper));
for(obj = invent; obj; obj = obj2) {
@ -978,7 +978,7 @@ online(x,y) {
/* Does this monster follow me downstairs? */
follower(mtmp)
register struct monst *mtmp;
struct monst *mtmp;
{
return( mtmp->mtame || index("1TVWZi&, ", mtmp->data->mlet)
#ifndef QUEST

View File

@ -125,9 +125,9 @@ struct shk_nx {
};
findname(nampt, let) char *nampt; char let; {
register struct shk_nx *p = shk_nx;
register char **q;
register int i;
struct shk_nx *p = shk_nx;
char **q;
int i;
while(p->x && p->x != let) p++;
q = p->xn;
for(i=0; i<dlevel; i++) if(!q[i]){

View File

@ -10,9 +10,9 @@ somegold(){
(u.ugold > 10000) ? rnd(10000) : rnd((int) u.ugold) );
}
stealgold(mtmp) register struct monst *mtmp; {
register struct gold *gold = g_at(u.ux, u.uy);
register long tmp;
stealgold(mtmp) struct monst *mtmp; {
struct gold *gold = g_at(u.ux, u.uy);
long tmp;
if(gold && ( !u.ugold || gold->amount > u.ugold || !rn2(5))) {
mtmp->mgold += gold->amount;
freegold(gold);
@ -37,8 +37,8 @@ register long tmp;
unsigned stealoid; /* object to be stolen */
unsigned stealmid; /* monster doing the stealing */
stealarm(){
register struct monst *mtmp;
register struct obj *otmp;
struct monst *mtmp;
struct obj *otmp;
for(otmp = invent; otmp; otmp = otmp->nobj)
if(otmp->o_id == stealoid) {
@ -64,9 +64,9 @@ stealarm(){
steal(mtmp)
struct monst *mtmp;
{
register struct obj *otmp;
register tmp;
register named = 0;
struct obj *otmp;
tmp;
named = 0;
if(!invent){
if(Blind)
@ -150,17 +150,17 @@ struct monst *mtmp;
}
mpickobj(mtmp,otmp)
register struct monst *mtmp;
register struct obj *otmp;
struct monst *mtmp;
struct obj *otmp;
{
otmp->nobj = mtmp->minvent;
mtmp->minvent = otmp;
}
stealamulet(mtmp)
register struct monst *mtmp;
struct monst *mtmp;
{
register struct obj *otmp;
struct obj *otmp;
for(otmp = invent; otmp; otmp = otmp->nobj) {
if(otmp->olet == AMULET_SYM) {
@ -177,10 +177,10 @@ register struct monst *mtmp;
/* release the objects the killed animal has stolen */
relobj(mtmp,show)
register struct monst *mtmp;
register show;
struct monst *mtmp;
show;
{
register struct obj *otmp, *otmp2;
struct obj *otmp, *otmp2;
for(otmp = mtmp->minvent; otmp; otmp = otmp2){
otmp->ox = mtmp->mx;
@ -194,7 +194,7 @@ register show;
}
mtmp->minvent = (struct obj *) 0;
if(mtmp->mgold || mtmp->data->mlet == 'L') {
register long tmp;
long tmp;
tmp = (mtmp->mgold > 10000) ? 10000 : mtmp->mgold;
mkgold((long)(tmp + d(dlevel,30)), mtmp->mx, mtmp->my);

View File

@ -20,8 +20,8 @@ int CO, LI; /* used in pri.c and whatis.c */
startup()
{
register char *term;
register char *tptr;
char *term;
char *tptr;
char *tbufptr, *pc;
tptr = (char *) alloc(1024);
@ -92,7 +92,7 @@ end_screen()
extern xchar curx, cury;
curs(x, y)
register int x, y; /* not xchar: perhaps xchar is unsigned and
int x, y; /* not xchar: perhaps xchar is unsigned and
curx-x would be unsigned as well */
{
@ -160,7 +160,7 @@ nocmov(x, y)
}
cmov(x, y)
register x, y;
x, y;
{
xputs(tgoto(CM, x-1, y-1));
cury = y;
@ -181,7 +181,7 @@ cl_end() {
else { /* no-CE fix - free after Harold Rynes */
/* this looks terrible, especially on a slow terminal
but is better than nothing */
register cx = curx, cy = cury;
cx = curx, cy = cury;
while(curx < COLNO) {
xputc(' ');
@ -250,8 +250,8 @@ delay_output() {
}
else if(ospeed > 0 || ospeed < SIZE(tmspc10)) if(CM) {
/* delay by sending cm(here) an appropriate number of times */
register int cmlen = strlen(tgoto(CM, curx-1, cury-1));
register int i = 500 + tmspc10[ospeed]/2;
int cmlen = strlen(tgoto(CM, curx-1, cury-1));
int i = 500 + tmspc10[ospeed]/2;
while(i > 0) {
cmov(curx, cury);
@ -267,7 +267,7 @@ cl_eos() /* free after Robert Viduya */
if(CD)
xputs(CD);
else {
register int cx = curx, cy = cury;
int cx = curx, cy = cury;
while(cury <= LI-2) {
cl_end();
xputc('\n');

View File

@ -5,7 +5,7 @@
#include "hack.h"
timeout(){
register struct prop *upp;
struct prop *upp;
if(Stoned) stoned_dialogue();
for(upp = u.uprops; upp < u.uprops+SIZE(u.uprops); upp++)
if((upp->p_flgs & TIMEOUT) && !--upp->p_flgs) {
@ -52,7 +52,7 @@ char *stoned_texts[] = {
stoned_dialogue()
{
register long i = (Stoned & TIMEOUT);
long i = (Stoned & TIMEOUT);
if(i > 0 && i <= SIZE(stoned_texts))
pline(stoned_texts[SIZE(stoned_texts) - i]);

View File

@ -41,8 +41,8 @@ redotoplin() {
}
remember_topl() {
register struct topl *tl;
register int cnt = OTLMAX;
struct topl *tl;
int cnt = OTLMAX;
if(last_redone_topl &&
!strcmp(toplines, last_redone_topl->topl_text)) return;
if(old_toplines &&
@ -101,7 +101,7 @@ more(){
}
cmore(s)
register char *s;
char *s;
{
xmore(s);
}
@ -118,11 +118,11 @@ clrlin(){
/*VARARGS1*/
pline(line,arg1,arg2,arg3,arg4,arg5,arg6)
register char *line,*arg1,*arg2,*arg3,*arg4,*arg5,*arg6;
char *line,*arg1,*arg2,*arg3,*arg4,*arg5,*arg6;
{
char pbuf[BUFSZ];
register char *bp = pbuf, *tl;
register int n,n0;
char *bp = pbuf, *tl;
int n,n0;
if(!line || !*line) return;
if(!index(line, '%')) (void) strcpy(pbuf,line); else
@ -188,6 +188,6 @@ putsym(c) char c; {
(void) putchar(c);
}
putstr(s) register char *s; {
putstr(s) char *s; {
while(*s) putsym(*s++);
}

View File

@ -24,8 +24,8 @@ settrack(){
}
coord *
gettrack(x,y) register x,y; {
register int i,cnt,dist;
gettrack(x,y) x,y; {
int i,cnt,dist;
coord tc;
cnt = utcnt;
for(i = utpnt-1; cnt--; i--){

View File

@ -22,9 +22,9 @@ char *traps[] = {
struct trap *
maketrap(x,y,typ)
register x,y,typ;
x,y,typ;
{
register struct trap *ttmp;
struct trap *ttmp;
ttmp = newtrap();
ttmp->ttyp = typ;
@ -37,8 +37,8 @@ register x,y,typ;
return(ttmp);
}
dotrap(trap) register struct trap *trap; {
register int ttype = trap->ttyp;
dotrap(trap) struct trap *trap; {
int ttype = trap->ttyp;
nomul(0);
if(trap->tseen && !rn2(5) && ttype != PIT)
@ -86,7 +86,7 @@ if(uarmh) pline("Fortunately, you are wearing a helmet!");
stackobj(fobj);
if(Invisible) newsym(u.ux, u.uy);
} else {
register int newlevel = dlevel + 1;
int newlevel = dlevel + 1;
while(!rn2(4) && newlevel < 29)
newlevel++;
pline("A trap door opens up under you!");
@ -136,16 +136,16 @@ if(uarmh) pline("Fortunately, you are wearing a helmet!");
}
}
mintrap(mtmp) register struct monst *mtmp; {
register struct trap *trap = t_at(mtmp->mx, mtmp->my);
register int wasintrap = mtmp->mtrapped;
mintrap(mtmp) struct monst *mtmp; {
struct trap *trap = t_at(mtmp->mx, mtmp->my);
int wasintrap = mtmp->mtrapped;
if(!trap) {
mtmp->mtrapped = 0; /* perhaps teleported? */
} else if(wasintrap) {
if(!rn2(40)) mtmp->mtrapped = 0;
} else {
register int tt = trap->ttyp;
int tt = trap->ttyp;
int in_sight = cansee(mtmp->mx,mtmp->my);
extern char mlarge[];
@ -248,7 +248,7 @@ float_up(){
}
float_down(){
register struct trap *trap;
struct trap *trap;
pline("You float gently to the ground.");
if(trap = t_at(u.ux,u.uy))
switch(trap->ttyp) {
@ -265,10 +265,10 @@ float_down(){
vtele() {
#include "def.mkroom.h"
register struct mkroom *croom;
struct mkroom *croom;
for(croom = &rooms[0]; croom->hx >= 0; croom++)
if(croom->rtype == VAULT) {
register x,y;
x,y;
x = rn2(2) ? croom->lx : croom->hx;
y = rn2(2) ? croom->ly : croom->hy;
@ -283,7 +283,7 @@ vtele() {
tele() {
extern coord getpos();
coord cc;
register int nux,nuy;
int nux,nuy;
if(Teleport_control) {
pline("To what position do you want to be teleported?");
@ -304,7 +304,7 @@ tele() {
}
teleds(nux, nuy)
register int nux,nuy;
int nux,nuy;
{
if(Punished) unplacebc();
unsee();
@ -326,7 +326,7 @@ register int nux,nuy;
if(!Blind) read_engr_at(u.ux,u.uy);
}
teleok(x,y) register int x,y; { /* might throw him into a POOL */
teleok(x,y) int x,y; { /* might throw him into a POOL */
return( isok(x,y) && !IS_ROCK(levl[x][y].typ) && !m_at(x,y) &&
!sobj_at(ENORMOUS_ROCK,x,y) && !t_at(x,y)
);
@ -381,7 +381,7 @@ unplacebc(){
}
level_tele() {
register int newlevel;
int newlevel;
if(Teleport_control) {
char buf[BUFSZ];
@ -432,7 +432,7 @@ drown()
pline("You can't swim!");
if(rn2(3) < u.uluck+2) {
/* most scrolls become unreadable */
register struct obj *obj;
struct obj *obj;
for(obj = invent; obj; obj = obj->nobj)
if(obj->olet == SCROLL_SYM && rn2(12) > u.uluck)

View File

@ -149,9 +149,9 @@ setctty(){
setftty(){
register int ef = 0; /* desired value of flags & ECHO */
register int cf = CBRKON(CBRKMASK); /* desired value of flags & CBREAK */
register int change = 0;
int ef = 0; /* desired value of flags & ECHO */
int cf = CBRKON(CBRKMASK); /* desired value of flags & CBREAK */
int change = 0;
flags.cbreak = ON;
flags.echo = OFF;
/* Should use (ECHO|CRMOD) here instead of ECHO */
@ -194,10 +194,10 @@ error(s,x,y) char *s; {
* resulting string is "\033".
*/
getlin(bufp)
register char *bufp;
char *bufp;
{
register char *obufp = bufp;
register int c;
char *obufp = bufp;
int c;
flags.toplin = 2; /* nonempty, no --More-- required */
for(;;) {
@ -243,7 +243,7 @@ getret() {
}
cgetret(s)
register char *s;
char *s;
{
putsym('\n');
if(flags.standout)
@ -259,9 +259,9 @@ register char *s;
char morc; /* tell the outside world what char he used */
xwaitforspace(s)
register char *s; /* chars allowed besides space or return */
char *s; /* chars allowed besides space or return */
{
register int c;
int c;
morc = 0;
@ -281,7 +281,7 @@ char *
parse()
{
static char inputline[COLNO];
register foo;
foo;
flags.move = 1;
if(!Invisible) curs_on_u(); else home();
@ -310,7 +310,7 @@ parse()
char
readchar() {
register int sym;
int sym;
(void) fflush(stdout);
if((sym = getchar()) == EOF)
@ -320,7 +320,7 @@ readchar() {
* (?like when one hits break or for interrupted systemcalls?),
* and we must see several before we quit.
*/
register int cnt = NR_OF_EOFS;
int cnt = NR_OF_EOFS;
while (cnt--) {
clearerr(stdin); /* omit if clearerr is undefined */
if((sym = getchar()) != EOF) goto noteof;

View File

@ -95,7 +95,7 @@ struct trobj Wizard[] = {
};
u_init(){
register int i;
int i;
char exper = 'y', pc;
extern char readchar();
if(flags.female) /* should have been set in HACKOPTIONS */
@ -237,7 +237,7 @@ got_suffix:
}
find_ac();
if(!rn2(20)) {
register int d = rn2(7) - 2; /* biased variation */
int d = rn2(7) - 2; /* biased variation */
u.ustr += d;
u.ustrmax += d;
}
@ -251,8 +251,8 @@ got_suffix:
u.ustr++, u.ustrmax++;
}
ini_inv(trop) register struct trobj *trop; {
register struct obj *obj;
ini_inv(trop) struct trobj *trop; {
struct obj *obj;
extern struct obj *mkobj();
while(trop->trolet) {
obj = mkobj(trop->trolet);
@ -308,9 +308,9 @@ extern struct obj *mkobj();
#ifdef WIZARD
wiz_inv(){
register struct trobj *trop = &Extra_objs[0];
register char *ep = getenv("INVENT");
register int type;
struct trobj *trop = &Extra_objs[0];
char *ep = getenv("INVENT");
int type;
while(ep && *ep) {
type = atoi(ep);
ep = index(ep, ',');
@ -334,7 +334,7 @@ register int type;
#endif WIZARD
plnamesuffix() {
register char *p;
char *p;
if(p = rindex(plname, '-')) {
*p = 0;
pl_character[0] = p[1];
@ -350,7 +350,7 @@ role_index(pc)
char pc;
{ /* must be called only from u_init() */
/* so that rolesyms[] is defined */
register char *cp;
char *cp;
if(cp = index(rolesyms, pc))
return(cp - rolesyms);

View File

@ -46,7 +46,7 @@ char *
getdate()
{
static char datestr[7];
register struct tm *lt = getlt();
struct tm *lt = getlt();
(void) snprintf(datestr, sizeof(datestr), "%02d%02d%02d",
lt->tm_year % 100, lt->tm_mon + 1, lt->tm_mday);
@ -56,8 +56,8 @@ getdate()
phase_of_the_moon() /* 0-7, with 0: new, 4: full */
{ /* moon period: 29.5306 days */
/* year: 365.2422 days */
register struct tm *lt = getlt();
register int epact, diy, golden;
struct tm *lt = getlt();
int epact, diy, golden;
diy = lt->tm_yday;
golden = (lt->tm_year % 19) + 1;
@ -70,7 +70,7 @@ phase_of_the_moon() /* 0-7, with 0: new, 4: full */
night()
{
register int hour = getlt()->tm_hour;
int hour = getlt()->tm_hour;
return(hour < 6 || hour > 21);
}
@ -84,7 +84,7 @@ struct stat buf, hbuf;
gethdate(name) char *name; {
/* old version - for people short of space */
register char *np;
char *np;
name = "/usr/games/hide/hack";
if(stat(name, &hbuf))
@ -101,7 +101,7 @@ register char *np;
*/
#define MAXPATHLEN 1024
register char *np, *path;
char *np, *path;
char filename[MAXPATHLEN+1];
if (index(name, '/') != NULL || (path = getenv("PATH")) == NULL)
path = "";
@ -141,7 +141,7 @@ uptodate(fd) {
/* see whether we should throw away this xlock file */
veryold(fd) {
register int i;
int i;
time_t date;
if(fstat(fd, &buf)) return(0); /* cannot get status */
@ -175,13 +175,13 @@ veryold(fd) {
getlock()
{
extern int errno, hackpid, locknum;
register int i = 0, fd;
int i = 0, fd;
(void) fflush(stdout);
/* we ignore QUIT and INT at this point */
if (link(HLOCK, LLOCK) == -1) {
register int errnosv = errno;
int errnosv = errno;
perror(HLOCK);
printf("Cannot link %s to %s\n", LLOCK, HLOCK);
@ -316,8 +316,8 @@ ckmailstatus() {
newmail() {
/* produce a scroll of mail */
register struct obj *obj;
register struct monst *md;
struct obj *obj;
struct monst *md;
extern char plname[];
extern struct obj *mksobj(), *addinv();
extern struct monst *makemon();
@ -344,14 +344,14 @@ newmail() {
/* make md run through the cave */
mdrush(md,away)
register struct monst *md;
struct monst *md;
boolean away;
{
register int uroom = inroom(u.ux, u.uy);
int uroom = inroom(u.ux, u.uy);
if(uroom >= 0) {
register int tmp = rooms[uroom].fdoor;
register int cnt = rooms[uroom].doorct;
register int fx = u.ux, fy = u.uy;
int tmp = rooms[uroom].fdoor;
int cnt = rooms[uroom].doorct;
int fx = u.ux, fy = u.uy;
while(cnt--) {
if(dist(fx,fy) < dist(doors[tmp].x, doors[tmp].y)){
fx = doors[tmp].x;
@ -366,7 +366,7 @@ boolean away;
tmp = fy; fy = md->my; md->my = tmp;
}
while(fx != md->mx || fy != md->my) {
register int dx,dy,nfx = fx,nfy = fy,d1,d2;
int dx,dy,nfx = fx,nfy = fy,d1,d2;
tmp_at(fx,fy);
d1 = DIST(fx,fy,md->mx,md->my);
@ -398,7 +398,7 @@ boolean away;
readmail() {
#ifdef DEF_MAILREADER /* This implies that UNIX is defined */
register char *mr = 0;
char *mr = 0;
more();
if(!(mr = getenv("MAILREADER")))
mr = DEF_MAILREADER;
@ -416,9 +416,9 @@ readmail() {
#endif MAIL
regularize(s) /* normalize file name - we don't like ..'s or /'s */
register char *s;
char *s;
{
register char *lp;
char *lp;
while((lp = index(s, '.')) || (lp = index(s, '/')))
*lp = '_';

View File

@ -37,8 +37,8 @@ static int gdlevel;
static
restfakecorr()
{
register fcx,fcy,fcbeg;
register struct rm *crm;
fcx,fcy,fcbeg;
struct rm *crm;
while((fcbeg = EGD->fcbeg) < EGD->fcend) {
fcx = EGD->fakecorr[fcbeg].fx;
@ -60,7 +60,7 @@ restfakecorr()
static
goldincorridor()
{
register int fci;
int fci;
for(fci = EGD->fcbeg; fci < EGD->fcend; fci++)
if(g_at(EGD->fakecorr[fci].fx, EGD->fakecorr[fci].fy))
@ -69,7 +69,7 @@ goldincorridor()
}
setgd(){
register struct monst *mtmp;
struct monst *mtmp;
for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) if(mtmp->isgd){
guard = mtmp;
gdlevel = dlevel;
@ -79,14 +79,14 @@ register struct monst *mtmp;
}
invault(){
register tmp = inroom(u.ux, u.uy);
tmp = inroom(u.ux, u.uy);
if(tmp < 0 || rooms[tmp].rtype != VAULT) {
u.uinvault = 0;
return;
}
if(++u.uinvault % 50 == 0 && (!guard || gdlevel != dlevel)) {
char buf[BUFSZ];
register x,y,dd,gx,gy;
x,y,dd,gx,gy;
/* first find the goal for the guard */
for(dd = 1; (dd < ROWNO || dd < COLNO); dd++) {
@ -109,7 +109,7 @@ fnd:
/* next find a good place for a door in the wall */
x = u.ux; y = u.uy;
while(levl[x][y].typ == ROOM) {
register int dx,dy;
int dx,dy;
dx = (gx > x) ? 1 : (gx < x) ? -1 : 0;
dy = (gy > y) ? 1 : (gy < y) ? -1 : 0;
@ -163,9 +163,9 @@ fnd:
}
gd_move(){
register int x,y,dx,dy,gx,gy,nx,ny,typ;
register struct fakecorridor *fcp;
register struct rm *crm;
int x,y,dx,dy,gx,gy,nx,ny,typ;
struct fakecorridor *fcp;
struct rm *crm;
if(!guard || gdlevel != dlevel){
impossible("Where is the guard?");
return(2); /* died */
@ -183,7 +183,7 @@ register struct rm *crm;
if(nx == x || ny == y) if(nx != x || ny != y)
if(isok(nx,ny))
if(!IS_WALL(typ = (crm = &levl[nx][ny])->typ) && typ != POOL) {
register int i;
int i;
for(i = EGD->fcbeg; i < EGD->fcend; i++)
if(EGD->fakecorr[i].fx == nx &&
EGD->fakecorr[i].fy == ny)
@ -251,7 +251,7 @@ gddead(){
}
replgd(mtmp,mtmp2)
register struct monst *mtmp, *mtmp2;
struct monst *mtmp, *mtmp2;
{
if(mtmp == guard)
guard = mtmp2;

View File

@ -5,14 +5,14 @@
#include "hack.h"
extern struct obj zeroobj;
setuwep(obj) register struct obj *obj; {
setuwep(obj) struct obj *obj; {
setworn(obj, W_WEP);
}
dowield()
{
register struct obj *wep;
register int res = 0;
struct obj *wep;
int res = 0;
multi = 0;
if(!(wep = getobj("#-)", "wield"))) /* nothing */;
@ -56,11 +56,11 @@ corrode_weapon(){
}
chwepon(otmp,amount)
register struct obj *otmp;
register amount;
struct obj *otmp;
amount;
{
register char *color = (amount < 0) ? "black" : "green";
register char *time;
char *color = (amount < 0) ? "black" : "green";
char *time;
if(!uwep || uwep->olet != WEAPON_SYM) {
strange_feeling(otmp,
(amount > 0) ? "Your hands twitch."

View File

@ -15,8 +15,8 @@ char wizapp[] = "@DNPTUVXcemntx";
/* If he has found the Amulet, make the wizard appear after some time */
amulet(){
register struct obj *otmp;
register struct monst *mtmp;
struct obj *otmp;
struct monst *mtmp;
if(!flags.made_amulet || !flags.no_of_wizards)
return;
@ -35,7 +35,7 @@ amulet(){
}
wiz_hit(mtmp)
register struct monst *mtmp;
struct monst *mtmp;
{
/* if we have stolen or found the amulet, we disappear */
if(mtmp->minvent && mtmp->minvent->olet == AMULET_SYM &&
@ -47,7 +47,7 @@ register struct monst *mtmp;
/* if it is lying around someplace, we teleport to it */
if(!carrying(AMULET_OF_YENDOR)) {
register struct obj *otmp;
struct obj *otmp;
for(otmp = fobj; otmp; otmp = otmp->nobj)
if(otmp->olet == AMULET_SYM && !otmp->spe) {
@ -81,9 +81,9 @@ hithim:
}
inrange(mtmp)
register struct monst *mtmp;
struct monst *mtmp;
{
register schar tx,ty;
schar tx,ty;
/* do nothing if cancelled (but make '1' say something) */
if(mtmp->data->mlet != '1' && mtmp->mcan)
@ -167,7 +167,7 @@ register struct monst *mtmp;
aggravate()
{
register struct monst *mtmp;
struct monst *mtmp;
for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
mtmp->msleep = 0;
@ -177,9 +177,9 @@ aggravate()
}
clonewiz(mtmp)
register struct monst *mtmp;
struct monst *mtmp;
{
register struct monst *mtmp2;
struct monst *mtmp2;
if(mtmp2 = makemon(PM_WIZARD, mtmp->mx, mtmp->my)) {
flags.no_of_wizards = 2;

Some files were not shown because too many files have changed in this diff Show More