summaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>1999-11-16 10:26:38 +0000
committermarcel <marcel@FreeBSD.org>1999-11-16 10:26:38 +0000
commit520fff788fc8f2154247a6cff986abf634fdbb51 (patch)
tree839b85661e38597650d090e9cb482291451611bb /games
parent44fac3a89d25ca434f91c4f961a363ea590faae8 (diff)
downloadFreeBSD-src-520fff788fc8f2154247a6cff986abf634fdbb51.zip
FreeBSD-src-520fff788fc8f2154247a6cff986abf634fdbb51.tar.gz
Add type int to those variables without a type. This is caused by the
frequent use of ``register var'' instead of ``register int var'' and the removal of the register hint in the previous commit.
Diffstat (limited to 'games')
-rw-r--r--games/hack/hack.apply.c2
-rw-r--r--games/hack/hack.bones.c4
-rw-r--r--games/hack/hack.c18
-rw-r--r--games/hack/hack.cmd.c6
-rw-r--r--games/hack/hack.do.c4
-rw-r--r--games/hack/hack.do_name.c4
-rw-r--r--games/hack/hack.eat.c8
-rw-r--r--games/hack/hack.end.c6
-rw-r--r--games/hack/hack.fight.c6
-rw-r--r--games/hack/hack.invent.c10
-rw-r--r--games/hack/hack.lev.c16
-rw-r--r--games/hack/hack.main.c4
-rw-r--r--games/hack/hack.makemon.c4
-rw-r--r--games/hack/hack.mhitu.c4
-rw-r--r--games/hack/hack.mklev.c34
-rw-r--r--games/hack/hack.mkmaze.c2
-rw-r--r--games/hack/hack.mkobj.c6
-rw-r--r--games/hack/hack.mkshop.c4
-rw-r--r--games/hack/hack.mon.c16
-rw-r--r--games/hack/hack.o_init.c4
-rw-r--r--games/hack/hack.potion.c2
-rw-r--r--games/hack/hack.pri.c26
-rw-r--r--games/hack/hack.read.c4
-rw-r--r--games/hack/hack.rip.c2
-rw-r--r--games/hack/hack.save.c10
-rw-r--r--games/hack/hack.shk.c8
-rw-r--r--games/hack/hack.steal.c6
-rw-r--r--games/hack/hack.termcap.c4
-rw-r--r--games/hack/hack.track.c2
-rw-r--r--games/hack/hack.trap.c4
-rw-r--r--games/hack/hack.tty.c2
-rw-r--r--games/hack/hack.vault.c6
-rw-r--r--games/hack/hack.wield.c2
-rw-r--r--games/hack/hack.worm.c14
-rw-r--r--games/hack/hack.zap.c6
-rw-r--r--games/hack/rnd.c10
36 files changed, 135 insertions, 135 deletions
diff --git a/games/hack/hack.apply.c b/games/hack/hack.apply.c
index 12fb470..fa939d6 100644
--- a/games/hack/hack.apply.c
+++ b/games/hack/hack.apply.c
@@ -242,7 +242,7 @@ static boolean dig_down;
static
dig() {
struct rm *lev;
- dpx = dig_pos.x, dpy = dig_pos.y;
+ int 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 */
diff --git a/games/hack/hack.bones.c b/games/hack/hack.bones.c
index 960e44b..4f67997 100644
--- a/games/hack/hack.bones.c
+++ b/games/hack/hack.bones.c
@@ -12,7 +12,7 @@ char bones[] = "bones_xx";
/* save bones and possessions of a deceased adventurer */
savebones(){
-fd;
+int fd;
struct obj *otmp;
struct trap *ttmp;
struct monst *mtmp;
@@ -74,7 +74,7 @@ struct monst *mtmp;
}
getbones(){
-fd,x,y,ok;
+int 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;
diff --git a/games/hack/hack.c b/games/hack/hack.c
index 8cb99bd..1e023fc 100644
--- a/games/hack/hack.c
+++ b/games/hack/hack.c
@@ -17,7 +17,7 @@ extern boolean hmon();
3. when walking out of a lit room
*/
unsee() {
- x,y;
+ int x,y;
struct rm *lev;
/*
@@ -53,7 +53,7 @@ unsee() {
*/
seeoff(mode) /* 1 to redo @, 0 to leave them */
{ /* 1 means misc movement, 0 means blindness */
- x,y;
+ int x,y;
struct rm *lev;
if(u.udispl && mode){
@@ -466,7 +466,7 @@ pickup(all)
/* turn around a corner if that is the only way we can proceed */
/* do not turn left or right twice */
lookaround(){
-x,y,i,x0,y0,m0,i0 = 9;
+int x,y,i,x0,y0,m0,i0 = 9;
int corrct = 0, noturn = 0;
struct monst *mtmp;
#ifdef lint
@@ -649,7 +649,7 @@ setsee()
setsee()
{
- x,y;
+ int x,y;
if(Blind) {
pru();
@@ -681,7 +681,7 @@ setsee()
#endif QUEST
nomul(nval)
-nval;
+int 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' */
-num;
+int num;
{
u.ustr -= num;
while(u.ustr < 3) {
@@ -724,7 +724,7 @@ num;
}
losehp(n,knam)
-n;
+int n;
char *knam;
{
u.uhp -= n;
@@ -738,7 +738,7 @@ char *knam;
}
losehp_m(n,mtmp)
-n;
+int n;
struct monst *mtmp;
{
u.uhp -= n;
@@ -749,7 +749,7 @@ struct monst *mtmp;
losexp() /* hit by V or W */
{
- num;
+ int num;
extern long newuexp();
if(u.ulevel > 1)
diff --git a/games/hack/hack.cmd.c b/games/hack/hack.cmd.c
index ba2f428..27beaae 100644
--- a/games/hack/hack.cmd.c
+++ b/games/hack/hack.cmd.c
@@ -95,7 +95,7 @@ char *cmd;
{
struct func_tab *tlist = cmdlist;
boolean firsttime = FALSE;
- res;
+ int res;
if(!cmd) {
firsttime = TRUE;
@@ -256,7 +256,7 @@ boolean s;
confdir()
{
- x = rn2(8);
+ int x = rn2(8);
u.dx = xdir[x];
u.dy = ydir[x];
}
@@ -297,7 +297,7 @@ isroom(x,y) x,y; { /* what about POOL? */
}
#endif QUEST
-isok(x,y) x,y; {
+isok(x,y) int 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);
}
diff --git a/games/hack/hack.do.c b/games/hack/hack.do.c
index 8e7a52f..547a455 100644
--- a/games/hack/hack.do.c
+++ b/games/hack/hack.do.c
@@ -121,7 +121,7 @@ goto_level(newlevel, at_stairs)
int newlevel;
boolean at_stairs;
{
- fd;
+ int fd;
boolean up = (newlevel < dlevel);
if(newlevel <= 0) done("escaped"); /* in fact < 0 is impossible */
@@ -253,7 +253,7 @@ dothrow()
{
struct obj *obj;
struct monst *mon;
- tmp;
+ int tmp;
obj = getobj("#)", "throw"); /* it is also possible to throw food */
/* (or jewels, or iron balls ... ) */
diff --git a/games/hack/hack.do_name.c b/games/hack/hack.do_name.c
index ab33c42..add0b8a 100644
--- a/games/hack/hack.do_name.c
+++ b/games/hack/hack.do_name.c
@@ -8,7 +8,7 @@ extern char plname[];
coord
getpos(force,goal) int force; char *goal; {
-cx,cy,i,c;
+int cx,cy,i,c;
extern char sdir[]; /* defined in hack.c */
extern schar xdir[], ydir[]; /* idem */
extern char *visctrl(); /* see below */
@@ -99,7 +99,7 @@ extern char *lmonnam();
*/
do_oname(obj) struct obj *obj; {
struct obj *otmp, *otmp2;
-lth;
+int lth;
char buf[BUFSZ];
pline("What do you want to name %s? ", doname(obj));
getlin(buf);
diff --git a/games/hack/hack.eat.c b/games/hack/hack.eat.c
index a490be8..8c023a6 100644
--- a/games/hack/hack.eat.c
+++ b/games/hack/hack.eat.c
@@ -90,7 +90,7 @@ Meatdone(){
doeat(){
struct obj *otmp;
struct objclass *ftmp;
- tmp;
+ int tmp;
/* Is there some food (probably a heavy corpse) here on the ground? */
if(!Levitation)
@@ -277,13 +277,13 @@ gethungry(){
}
/* called after vomiting and after performing feats of magic */
-morehungry(num) num; {
+morehungry(num) int num; {
u.uhunger -= num;
newuhs(TRUE);
}
/* called after eating something (and after drinking fruit juice) */
-lesshungry(num) num; {
+lesshungry(num) int num; {
u.uhunger += num;
newuhs(FALSE);
}
@@ -362,7 +362,7 @@ struct obj *otmp;
/* returns 1 if some text was printed */
eatcorpse(otmp) struct obj *otmp; {
char let = CORPSE_I_TO_C(otmp->otyp);
-tp = 0;
+int tp = 0;
if(let != 'a' && moves > otmp->age + 50 + rn2(100)) {
tp++;
pline("Ulch -- that meat was tainted!");
diff --git a/games/hack/hack.end.c b/games/hack/hack.end.c
index a49d758..98c8336 100644
--- a/games/hack/hack.end.c
+++ b/games/hack/hack.end.c
@@ -224,7 +224,7 @@ topten(){
char *reclock = "record_lock";
int sleepct = 300;
FILE *rfile;
- flg = 0;
+ int flg = 0;
extern char *getdate();
#define HUP if(!done_hup)
while(link(recfile, reclock) == -1) {
@@ -466,7 +466,7 @@ int d = n%10;
}
clearlocks(){
-x;
+int x;
(void) signal(SIGHUP,SIG_IGN);
for(x = maxdlevel; x >= 0; x--) {
glo(x);
@@ -511,7 +511,7 @@ prscore(argc,argv) int argc; char **argv; {
struct toptenentry *t1, *t2;
char *recfile = RECORD;
FILE *rfile;
- flg = 0;
+ int flg = 0;
int i;
#ifdef nonsense
long total_score = 0L;
diff --git a/games/hack/hack.fight.c b/games/hack/hack.fight.c
index 2a39474..000c58f 100644
--- a/games/hack/hack.fight.c
+++ b/games/hack/hack.fight.c
@@ -108,7 +108,7 @@ struct monst *mon;
/* u is hit by sth, but not a monster */
thitu(tlev,dam,name)
-tlev,dam;
+int tlev,dam;
char *name;
{
char buf[BUFSZ];
@@ -131,9 +131,9 @@ boolean
hmon(mon,obj,thrown) /* return TRUE if mon still alive */
struct monst *mon;
struct obj *obj;
-thrown;
+int thrown;
{
- tmp;
+ int tmp;
boolean hittxt = FALSE;
if(!obj){
diff --git a/games/hack/hack.invent.c b/games/hack/hack.invent.c
index 819bcff..7fc170c 100644
--- a/games/hack/hack.invent.c
+++ b/games/hack/hack.invent.c
@@ -170,7 +170,7 @@ struct wseg *m_atseg;
struct monst *
m_at(x,y)
-x,y;
+int x,y;
{
struct monst *mtmp;
#ifndef NOWORM
@@ -196,7 +196,7 @@ x,y;
struct obj *
o_at(x,y)
-x,y;
+int x,y;
{
struct obj *otmp;
@@ -207,7 +207,7 @@ x,y;
struct obj *
sobj_at(n,x,y)
-n,x,y;
+int n,x,y;
{
struct obj *otmp;
@@ -246,7 +246,7 @@ o_on(id, objchn) unsigned int id; struct obj *objchn; {
struct trap *
t_at(x,y)
-x,y;
+int x,y;
{
struct trap *trap = ftrap;
while(trap) {
@@ -258,7 +258,7 @@ x,y;
struct gold *
g_at(x,y)
-x,y;
+int x,y;
{
struct gold *gold = fgold;
while(gold) {
diff --git a/games/hack/hack.lev.c b/games/hack/hack.lev.c
index 4047e45..bdc542e 100644
--- a/games/hack/hack.lev.c
+++ b/games/hack/hack.lev.c
@@ -28,7 +28,7 @@ xchar lev;
{
#ifndef NOWORM
struct wseg *wtmp, *wtmp2;
- tmp;
+ int tmp;
#endif NOWORM
if(fd < 0) panic("Save on bad file!"); /* impossible */
@@ -72,7 +72,7 @@ xchar lev;
}
bwrite(fd,loc,num)
-fd;
+int fd;
char *loc;
unsigned num;
{
@@ -82,7 +82,7 @@ unsigned num;
}
saveobjchn(fd,otmp)
-fd;
+int fd;
struct obj *otmp;
{
struct obj *otmp2;
@@ -101,7 +101,7 @@ struct obj *otmp;
}
savemonchn(fd,mtmp)
-fd;
+int fd;
struct monst *mtmp;
{
struct monst *mtmp2;
@@ -124,7 +124,7 @@ struct monst *mtmp;
}
savegoldchn(fd,gold)
-fd;
+int fd;
struct gold *gold;
{
struct gold *gold2;
@@ -138,7 +138,7 @@ struct gold *gold;
}
savetrapchn(fd,trap)
-fd;
+int fd;
struct trap *trap;
{
struct trap *trap2;
@@ -160,7 +160,7 @@ xchar lev;
#ifndef NOWORM
struct wseg *wtmp;
#endif NOWORM
- tmp;
+ int tmp;
long omoves;
int hpid;
xchar dlvl;
@@ -256,7 +256,7 @@ xchar lev;
}
mread(fd, buf, len)
-fd;
+int fd;
char *buf;
unsigned len;
{
diff --git a/games/hack/hack.main.c b/games/hack/hack.main.c
index 0d07c6e..b29320a 100644
--- a/games/hack/hack.main.c
+++ b/games/hack/hack.main.c
@@ -405,7 +405,7 @@ not_recovered:
}
glo(foo)
-foo;
+int foo;
{
/* construct the string xlock.n */
char *tf;
@@ -480,7 +480,7 @@ boolean wr;
/* perhaps we should also test whether . is writable */
/* unfortunately the access systemcall is worthless */
if(wr) {
- fd;
+ int fd;
if(dir == NULL)
dir = ".";
diff --git a/games/hack/hack.makemon.c b/games/hack/hack.makemon.c
index cce2183..64e1ecf 100644
--- a/games/hack/hack.makemon.c
+++ b/games/hack/hack.makemon.c
@@ -21,7 +21,7 @@ makemon(ptr,x,y)
struct permonst *ptr;
{
struct monst *mtmp;
- tmp, ct;
+ int tmp, ct;
boolean anything = (!ptr);
extern boolean in_mklev;
@@ -160,7 +160,7 @@ goodpos(x,y) /* used only in mnexto and rloc */
rloc(mtmp)
struct monst *mtmp;
{
- tx,ty;
+ int tx,ty;
char ch = mtmp->data->mlet;
#ifndef NOWORM
diff --git a/games/hack/hack.mhitu.c b/games/hack/hack.mhitu.c
index 4d71229..b3a316f 100644
--- a/games/hack/hack.mhitu.c
+++ b/games/hack/hack.mhitu.c
@@ -320,9 +320,9 @@ struct monst *mtmp;
hitu(mtmp,dam)
struct monst *mtmp;
-dam;
+int dam;
{
- tmp, res;
+ int tmp, res;
nomul(0);
if(u.uswallow) return(0);
diff --git a/games/hack/hack.mklev.c b/games/hack/hack.mklev.c
index 760c401..b9b3f04 100644
--- a/games/hack/hack.mklev.c
+++ b/games/hack/hack.mklev.c
@@ -41,7 +41,7 @@ makelevel()
{
struct mkroom *croom, *troom;
unsigned tryct;
- x,y;
+ int x,y;
nroom = 0;
doorindex = 0;
@@ -290,7 +290,7 @@ struct mkroom *x,*y;
coord
finddpos(xl,yl,xh,yh) {
coord ff;
- x,y;
+ int 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)
-x,y;
+int 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,7 +328,7 @@ x,y;
}
dodoor(x,y,aroom)
-x,y;
+int x,y;
struct mkroom *aroom;
{
if(doorindex >= DOORMAX) {
@@ -341,12 +341,12 @@ struct mkroom *aroom;
}
dosdoor(x,y,aroom,type)
-x,y;
+int x,y;
struct mkroom *aroom;
-type;
+int type;
{
struct mkroom *broom;
- tmp;
+ int tmp;
if(!IS_WALL(levl[x][y].typ)) /* avoid SDOORs with '+' as scrsym */
type = DOOR;
@@ -369,8 +369,8 @@ maker(lowx,ddx,lowy,ddy)
schar lowx,ddx,lowy,ddy;
{
struct mkroom *croom;
- x, y, hix = lowx+ddx, hiy = lowy+ddy;
- xlim = XLIM + secret, ylim = YLIM + secret;
+ int x, y, hix = lowx+ddx, hiy = lowy+ddy;
+ int xlim = XLIM + secret, ylim = YLIM + secret;
if(nroom >= MAXNROFROOMS) return(0);
if(lowx < XLIM) lowx = XLIM;
@@ -443,7 +443,7 @@ chk:
}
makecorridors() {
- a,b;
+ int a,b;
nxcor = 0;
for(a = 0; a < nroom-1; a++)
@@ -465,13 +465,13 @@ makecorridors() {
}
join(a,b)
-a,b;
+int a,b;
{
coord cc,tt;
- tx, ty, xx, yy;
+ int tx, ty, xx, yy;
struct rm *crm;
struct mkroom *croom, *troom;
- dx, dy, dix, diy, cct;
+ int dx, dy, dix, diy, cct;
croom = &rooms[a];
troom = &rooms[b];
@@ -552,7 +552,7 @@ a,b;
/* do we have to change direction ? */
if(dy && dix > diy) {
- ddx = (xx > tx) ? -1 : 1;
+ int ddx = (xx > tx) ? -1 : 1;
crm = &levl[xx+ddx][yy];
if(!crm->typ || crm->typ == CORR || crm->typ == SCORR) {
@@ -561,7 +561,7 @@ a,b;
continue;
}
} else if(dx && diy > dix) {
- ddy = (yy > ty) ? -1 : 1;
+ int ddy = (yy > ty) ? -1 : 1;
crm = &levl[xx][yy+ddy];
if(!crm->typ || crm->typ == CORR || crm->typ == SCORR) {
@@ -623,7 +623,7 @@ boolean with_trap;
struct rm *rm;
int vct = 8;
coord dd;
- dy,xx,yy;
+ int dy,xx,yy;
struct trap *ttmp;
if(doorindex < DOORMAX)
@@ -666,7 +666,7 @@ boolean with_trap;
/* make a trap somewhere (in croom if mazeflag = 0) */
mktrap(num,mazeflag,croom)
-num,mazeflag;
+int num,mazeflag;
struct mkroom *croom;
{
struct trap *ttmp;
diff --git a/games/hack/hack.mkmaze.c b/games/hack/hack.mkmaze.c
index 620d83b..769cd5d 100644
--- a/games/hack/hack.mkmaze.c
+++ b/games/hack/hack.mkmaze.c
@@ -14,7 +14,7 @@ struct permonst hell_hound =
makemaz()
{
int x,y;
- zx,zy;
+ int zx,zy;
coord mm;
boolean al = (dlevel >= 30 && !flags.made_amulet);
diff --git a/games/hack/hack.mkobj.c b/games/hack/hack.mkobj.c
index 61b4235..a9098a6 100644
--- a/games/hack/hack.mkobj.c
+++ b/games/hack/hack.mkobj.c
@@ -9,7 +9,7 @@ struct obj *mkobj(), *mksobj();
struct obj *
mkobj_at(let,x,y)
-let,x,y;
+int let,x,y;
{
struct obj *otmp = mkobj(let);
otmp->ox = x;
@@ -20,7 +20,7 @@ let,x,y;
}
mksobj_at(otyp,x,y)
-otyp,x,y;
+int otyp,x,y;
{
struct obj *otmp = mksobj(otyp);
otmp->ox = x;
@@ -47,7 +47,7 @@ struct obj zeroobj;
struct obj *
mksobj(otyp)
-otyp;
+int otyp;
{
struct obj *otmp;
char let = objects[otyp].oc_olet;
diff --git a/games/hack/hack.mkshop.c b/games/hack/hack.mkshop.c
index 289368c..1a43f30 100644
--- a/games/hack/hack.mkshop.c
+++ b/games/hack/hack.mkshop.c
@@ -233,9 +233,9 @@ mkswamp() /* Michiel Huisjes & Fred de Wilde */
}
nexttodoor(sx,sy)
-sx,sy;
+int sx,sy;
{
- dx,dy;
+ int 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 ||
diff --git a/games/hack/hack.mon.c b/games/hack/hack.mon.c
index 90511b1..218761f 100644
--- a/games/hack/hack.mon.c
+++ b/games/hack/hack.mon.c
@@ -122,7 +122,7 @@ char *name;
youswld(mtmp,dam,die,name)
struct monst *mtmp;
-dam,die;
+int dam,die;
char *name;
{
if(mtmp != u.ustuck) return;
@@ -137,10 +137,10 @@ char *name;
}
dochugw(mtmp) struct monst *mtmp; {
-x = mtmp->mx;
-y = mtmp->my;
-d = dochug(mtmp);
-dd;
+int x = mtmp->mx;
+int y = mtmp->my;
+int d = dochug(mtmp);
+int dd;
if(!d) /* monster still alive */
if(Warning)
if(!mtmp->mpeaceful)
@@ -157,7 +157,7 @@ dochug(mtmp)
struct monst *mtmp;
{
struct permonst *mdat;
- tmp, nearby, scared;
+ int tmp, nearby, scared;
if(mtmp->cham && !rn2(6))
(void) newcham(mtmp, &mons[dlevel+14+rn2(CMNUM-14-dlevel)]);
@@ -239,7 +239,7 @@ m_move(mtmp,after)
struct monst *mtmp;
{
struct monst *mtmp2;
- nx,ny,omx,omy,appr,nearer,cnt,i,j;
+ int nx,ny,omx,omy,appr,nearer,cnt,i,j;
xchar gx,gy,nix,niy,chcnt;
schar chi;
boolean likegold, likegems, likeobjs;
@@ -786,7 +786,7 @@ newcham(mtmp,mdat) /* make a chameleon look like a new monster */
struct monst *mtmp;
struct permonst *mdat;
{
- mhp, hpn, hpd;
+ int mhp, hpn, hpd;
if(mdat == mtmp->data) return(0); /* still the same monster */
#ifndef NOWORM
diff --git a/games/hack/hack.o_init.c b/games/hack/hack.o_init.c
index 6cac5dd..0bb9418 100644
--- a/games/hack/hack.o_init.c
+++ b/games/hack/hack.o_init.c
@@ -99,7 +99,7 @@ oinit() /* level dependent initialization */
extern long *alloc();
-savenames(fd) fd; {
+savenames(fd) int fd; {
int i;
unsigned len;
bwrite(fd, (char *) bases, sizeof bases);
@@ -116,7 +116,7 @@ unsigned len;
}
}
-restnames(fd) fd; {
+restnames(fd) int fd; {
int i;
unsigned len;
mread(fd, (char *) bases, sizeof bases);
diff --git a/games/hack/hack.potion.c b/games/hack/hack.potion.c
index 5709f25..751b7e0 100644
--- a/games/hack/hack.potion.c
+++ b/games/hack/hack.potion.c
@@ -191,7 +191,7 @@ use_it:
pluslvl()
{
- num;
+ int num;
pline("You feel more experienced.");
num = rnd(10);
diff --git a/games/hack/hack.pri.c b/games/hack/hack.pri.c
index a948cb4..9dfd8c8 100644
--- a/games/hack/hack.pri.c
+++ b/games/hack/hack.pri.c
@@ -52,7 +52,7 @@ char *str;
}
atl(x,y,ch)
-x,y;
+int x,y;
{
struct rm *crm = &levl[x][y];
@@ -67,7 +67,7 @@ x,y;
}
on_scr(x,y)
-x,y;
+int 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! */
-xx,yy;
+int xx,yy;
if((int)x == -1) {
if(y > 0) { /* open call */
let = y;
@@ -184,7 +184,7 @@ doredraw()
docrt()
{
- x,y;
+ int x,y;
struct rm *room;
struct monst *mtmp;
@@ -221,8 +221,8 @@ docrt()
bot();
}
-docorner(xmin,ymax) xmin,ymax; {
- x,y;
+docorner(xmin,ymax) int xmin,ymax; {
+ int x,y;
struct rm *room;
struct monst *mtmp;
@@ -382,7 +382,7 @@ xchar x,y;
}
newsym(x,y)
-x,y;
+int x,y;
{
atl(x,y,news0(x,y));
}
@@ -390,7 +390,7 @@ x,y;
/* used with wand of digging (or pick-axe): fill scrsym and force display */
/* also when a POOL evaporates */
mnewsym(x,y)
-x,y;
+int x,y;
{
struct rm *room;
char newscrsym;
@@ -406,7 +406,7 @@ x,y;
}
nosee(x,y)
-x,y;
+int x,y;
{
struct rm *room;
@@ -421,7 +421,7 @@ x,y;
#ifndef QUEST
prl1(x,y)
-x,y;
+int x,y;
{
if(u.dx) {
if(u.dy) {
@@ -443,7 +443,7 @@ x,y;
}
nose1(x,y)
-x,y;
+int x,y;
{
if(u.dx) {
if(u.dy) {
@@ -466,7 +466,7 @@ x,y;
#endif QUEST
vism_at(x,y)
-x,y;
+int x,y;
{
struct monst *mtmp;
@@ -563,7 +563,7 @@ unpmon(mon) struct monst *mon; {
nscr()
{
- x,y;
+ int x,y;
struct rm *room;
if(u.uswallow || u.ux == FAR || flags.nscrinh) return;
diff --git a/games/hack/hack.read.c b/games/hack/hack.read.c
index 3c81d93..c0175d1 100644
--- a/games/hack/hack.read.c
+++ b/games/hack/hack.read.c
@@ -280,7 +280,7 @@ doread() {
docrt();
break;
case SCR_FOOD_DETECTION:
- { ct = 0, ctu = 0;
+ { int ct = 0, ctu = 0;
struct obj *obj;
char foodsym = confused ? POTION_SYM : FOOD_SYM;
@@ -448,7 +448,7 @@ struct obj *otmp;
litroom(on)
boolean on;
{
- num,zx,zy;
+ int num,zx,zy;
/* first produce the text (provided he is not blind) */
if(Blind) goto do_it;
diff --git a/games/hack/hack.rip.c b/games/hack/hack.rip.c
index 843d3cc..f37b9ec 100644
--- a/games/hack/hack.rip.c
+++ b/games/hack/hack.rip.c
@@ -29,7 +29,7 @@ outrip(){
char **dp = rip;
char *dpx;
char buf[BUFSZ];
- x,y;
+ int x,y;
cls();
(void) strcpy(buf, plname);
diff --git a/games/hack/hack.save.c b/games/hack/hack.save.c
index 9f13c99..46d3ba1 100644
--- a/games/hack/hack.save.c
+++ b/games/hack/hack.save.c
@@ -32,7 +32,7 @@ hangup(){
/* returns 1 if save successful */
dosave0(hu) int hu; {
- fd, ofd;
+ int fd, ofd;
int tmp; /* not ! */
(void) signal(SIGHUP, SIG_IGN);
@@ -89,9 +89,9 @@ dosave0(hu) int hu; {
}
dorecover(fd)
-fd;
+int fd;
{
- nfd;
+ int nfd;
int tmp; /* not a ! */
unsigned mid; /* idem */
struct obj *otmp;
@@ -172,7 +172,7 @@ fd;
struct obj *
restobjchn(fd)
-fd;
+int fd;
{
struct obj *otmp, *otmp2;
struct obj *first = 0;
@@ -200,7 +200,7 @@ fd;
struct monst *
restmonchn(fd)
-fd;
+int fd;
{
struct monst *mtmp, *mtmp2;
struct monst *first = 0;
diff --git a/games/hack/hack.shk.c b/games/hack/hack.shk.c
index a648761..4104ba8 100644
--- a/games/hack/hack.shk.c
+++ b/games/hack/hack.shk.c
@@ -122,7 +122,7 @@ struct monst *mtmp;
static
addupbill(){ /* delivers result in total */
/* caller has checked that shopkeeper exists */
-ct = ESHK(shopkeeper)->billct;
+int ct = ESHK(shopkeeper)->billct;
struct bill_x *bp = bill;
total = 0;
while(ct--){
@@ -132,7 +132,7 @@ struct bill_x *bp = bill;
}
inshop(){
-roomno = inroom(u.ux,u.uy);
+int roomno = inroom(u.ux,u.uy);
static void findshk();
@@ -230,7 +230,7 @@ roomno = inroom(u.ux,u.uy);
static void
findshk(roomno)
-roomno;
+int roomno;
{
struct monst *mtmp;
for(mtmp = fmon; mtmp; mtmp = mtmp->nmon)
@@ -753,7 +753,7 @@ int tmp, ac;
static
realhunger(){ /* not completely foolproof */
-tmp = u.uhunger;
+int tmp = u.uhunger;
struct obj *otmp = invent;
while(otmp){
if(otmp->olet == FOOD_SYM && !otmp->unpaid)
diff --git a/games/hack/hack.steal.c b/games/hack/hack.steal.c
index e6a2a1a..6c97a58 100644
--- a/games/hack/hack.steal.c
+++ b/games/hack/hack.steal.c
@@ -65,8 +65,8 @@ steal(mtmp)
struct monst *mtmp;
{
struct obj *otmp;
- tmp;
- named = 0;
+ int tmp;
+ int named = 0;
if(!invent){
if(Blind)
@@ -178,7 +178,7 @@ struct monst *mtmp;
/* release the objects the killed animal has stolen */
relobj(mtmp,show)
struct monst *mtmp;
-show;
+int show;
{
struct obj *otmp, *otmp2;
diff --git a/games/hack/hack.termcap.c b/games/hack/hack.termcap.c
index 586f56f..c4a3a82 100644
--- a/games/hack/hack.termcap.c
+++ b/games/hack/hack.termcap.c
@@ -160,7 +160,7 @@ nocmov(x, y)
}
cmov(x, y)
-x, y;
+int 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 */
- cx = curx, cy = cury;
+ int cx = curx, cy = cury;
while(curx < COLNO) {
xputc(' ');
diff --git a/games/hack/hack.track.c b/games/hack/hack.track.c
index 92d4890..0062ae9 100644
--- a/games/hack/hack.track.c
+++ b/games/hack/hack.track.c
@@ -24,7 +24,7 @@ settrack(){
}
coord *
-gettrack(x,y) x,y; {
+gettrack(x,y) int x,y; {
int i,cnt,dist;
coord tc;
cnt = utcnt;
diff --git a/games/hack/hack.trap.c b/games/hack/hack.trap.c
index 502773d..ea99f2f 100644
--- a/games/hack/hack.trap.c
+++ b/games/hack/hack.trap.c
@@ -22,7 +22,7 @@ char *traps[] = {
struct trap *
maketrap(x,y,typ)
-x,y,typ;
+int x,y,typ;
{
struct trap *ttmp;
@@ -268,7 +268,7 @@ vtele() {
struct mkroom *croom;
for(croom = &rooms[0]; croom->hx >= 0; croom++)
if(croom->rtype == VAULT) {
- x,y;
+ int x,y;
x = rn2(2) ? croom->lx : croom->hx;
y = rn2(2) ? croom->ly : croom->hy;
diff --git a/games/hack/hack.tty.c b/games/hack/hack.tty.c
index 671def6..5ad41cd 100644
--- a/games/hack/hack.tty.c
+++ b/games/hack/hack.tty.c
@@ -281,7 +281,7 @@ char *
parse()
{
static char inputline[COLNO];
- foo;
+ int foo;
flags.move = 1;
if(!Invisible) curs_on_u(); else home();
diff --git a/games/hack/hack.vault.c b/games/hack/hack.vault.c
index 5bce18d..472de9a 100644
--- a/games/hack/hack.vault.c
+++ b/games/hack/hack.vault.c
@@ -37,7 +37,7 @@ static int gdlevel;
static
restfakecorr()
{
- fcx,fcy,fcbeg;
+ int fcx,fcy,fcbeg;
struct rm *crm;
while((fcbeg = EGD->fcbeg) < EGD->fcend) {
@@ -79,14 +79,14 @@ struct monst *mtmp;
}
invault(){
-tmp = inroom(u.ux, u.uy);
+int 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];
- x,y,dd,gx,gy;
+ int x,y,dd,gx,gy;
/* first find the goal for the guard */
for(dd = 1; (dd < ROWNO || dd < COLNO); dd++) {
diff --git a/games/hack/hack.wield.c b/games/hack/hack.wield.c
index 751be01..7533de6 100644
--- a/games/hack/hack.wield.c
+++ b/games/hack/hack.wield.c
@@ -57,7 +57,7 @@ corrode_weapon(){
chwepon(otmp,amount)
struct obj *otmp;
-amount;
+int amount;
{
char *color = (amount < 0) ? "black" : "green";
char *time;
diff --git a/games/hack/hack.worm.c b/games/hack/hack.worm.c
index 5785f6d..3c3ba1b 100644
--- a/games/hack/hack.worm.c
+++ b/games/hack/hack.worm.c
@@ -11,7 +11,7 @@ struct wseg *wheads[32];
long wgrowtime[32];
getwn(mtmp) struct monst *mtmp; {
-tmp;
+int tmp;
for(tmp=1; tmp<32; tmp++) if(!wsegs[tmp]) {
mtmp->wormno = tmp;
return(1);
@@ -22,7 +22,7 @@ tmp;
/* called to initialize a worm unless cut in half */
initworm(mtmp) struct monst *mtmp; {
struct wseg *wtmp;
-tmp = mtmp->wormno;
+int tmp = mtmp->wormno;
if(!tmp) return;
wheads[tmp] = wsegs[tmp] = wtmp = newseg();
wgrowtime[tmp] = 0;
@@ -34,7 +34,7 @@ tmp = mtmp->wormno;
worm_move(mtmp) struct monst *mtmp; {
struct wseg *wtmp, *whd;
-tmp = mtmp->wormno;
+int tmp = mtmp->wormno;
wtmp = newseg();
wtmp->wx = mtmp->mx;
wtmp->wy = mtmp->my;
@@ -60,7 +60,7 @@ tmp = mtmp->wormno;
}
worm_nomove(mtmp) struct monst *mtmp; {
-tmp;
+int tmp;
struct wseg *wtmp;
tmp = mtmp->wormno;
wtmp = wsegs[tmp];
@@ -72,7 +72,7 @@ struct wseg *wtmp;
}
wormdead(mtmp) struct monst *mtmp; {
-tmp = mtmp->wormno;
+int tmp = mtmp->wormno;
struct wseg *wtmp, *wtmp2;
if(!tmp) return;
mtmp->wormno = 0;
@@ -84,7 +84,7 @@ struct wseg *wtmp, *wtmp2;
}
wormhit(mtmp) struct monst *mtmp; {
-tmp = mtmp->wormno;
+int tmp = mtmp->wormno;
struct wseg *wtmp;
if(!tmp) return; /* worm without tail */
for(wtmp = wsegs[tmp]; wtmp; wtmp = wtmp->nseg)
@@ -115,7 +115,7 @@ uchar weptyp; /* uwep->otyp or 0 */
{
struct wseg *wtmp, *wtmp2;
struct monst *mtmp2;
- tmp,tmp2;
+ int tmp,tmp2;
if(mtmp->mx == x && mtmp->my == y) return; /* hit headon */
/* cutting goes best with axe or sword */
diff --git a/games/hack/hack.zap.c b/games/hack/hack.zap.c
index 20f5a91..957b46c44 100644
--- a/games/hack/hack.zap.c
+++ b/games/hack/hack.zap.c
@@ -386,7 +386,7 @@ boomhit(dx,dy) {
}
char
-dirlet(dx,dy) dx,dy; {
+dirlet(dx,dy) int dx,dy; {
return
(dx == dy) ? '\\' : (dx && dy) ? '/' : dx ? '-' : '|';
}
@@ -543,7 +543,7 @@ int dx,dy;
zhit(mon,type) /* returns damage to mon */
struct monst *mon;
-type;
+int type;
{
int tmp = 0;
@@ -595,7 +595,7 @@ struct obj *obj;
rloco(obj)
struct obj *obj;
{
- tx,ty,otx,oty;
+ int tx,ty,otx,oty;
otx = obj->ox;
oty = obj->oy;
diff --git a/games/hack/rnd.c b/games/hack/rnd.c
index b209e38..037b2d9 100644
--- a/games/hack/rnd.c
+++ b/games/hack/rnd.c
@@ -6,27 +6,27 @@
#define RND(x) (random() % x)
rn1(x,y)
-x,y;
+int x,y;
{
return(RND(x)+y);
}
rn2(x)
-x;
+int x;
{
return(RND(x));
}
rnd(x)
-x;
+int x;
{
return(RND(x)+1);
}
d(n,x)
-n,x;
+int n,x;
{
- tmp = n;
+ int tmp = n;
while(n--) tmp += RND(x);
return(tmp);
OpenPOWER on IntegriCloud