Lint part 2, mostly parameters.

This commit is contained in:
jwalz
2002-03-10 04:05:59 +00:00
parent 3294d0b818
commit 3e6e2ff7c6
11 changed files with 23 additions and 22 deletions

View File

@@ -427,7 +427,7 @@ E int NDECL(dothrow);
E int NDECL(dofire);
E void FDECL(hitfloor, (struct obj *));
E void FDECL(hurtle, (int,int,int,BOOLEAN_P));
E void FDECL(mhurtle, (struct monst *,int,int,int,BOOLEAN_P));
E void FDECL(mhurtle, (struct monst *,int,int,int));
E void FDECL(throwit, (struct obj *,long,BOOLEAN_P));
E int FDECL(omon_adj, (struct monst *,struct obj *,BOOLEAN_P));
E int FDECL(thitmonst, (struct monst *,struct obj *));
@@ -1153,7 +1153,7 @@ E boolean FDECL(mb_trapped, (struct monst *));
E void FDECL(mon_regen, (struct monst *,BOOLEAN_P));
E int FDECL(dochugw, (struct monst *));
E boolean FDECL(onscary, (int,int,struct monst *));
E void FDECL(monflee, (struct monst *, unsigned int, BOOLEAN_P, BOOLEAN_P));
E void FDECL(monflee, (struct monst *, int, BOOLEAN_P, BOOLEAN_P));
E int FDECL(dochug, (struct monst *));
E int FDECL(m_move, (struct monst *,int));
E boolean FDECL(closed_door, (int,int));

View File

@@ -169,7 +169,8 @@ register struct obj *sobj;
struct obj *temp;
boolean stale;
known = stale = clear_stale_map(GOLD_CLASS, sobj->blessed ? GOLD : 0);
known = stale = clear_stale_map(GOLD_CLASS,
(unsigned)(sobj->blessed ? GOLD : 0));
/* look for gold carried by monsters (might be in a container) */
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {

View File

@@ -611,10 +611,9 @@ hurtle(dx, dy, range, verbose)
/* Move a monster through the air for a few squares.
*/
void
mhurtle(mon, dx, dy, range, verbose)
mhurtle(mon, dx, dy, range)
struct monst *mon;
int dx, dy, range;
boolean verbose;
{
coord mc, cc;
@@ -852,7 +851,7 @@ boolean twoweap; /* used to restore twoweapon mode if wielded weapon returns */
}
if ((u.dx || u.dy || (u.dz < 1)) &&
calc_capacity(obj->owt) > SLT_ENCUMBER &&
calc_capacity((int)obj->owt) > SLT_ENCUMBER &&
(Upolyd ? (u.mh < 5 && u.mh != u.mhmax)
: (u.uhp < 10 && u.uhp != u.uhpmax)) &&
obj->owt > (unsigned)((Upolyd ? u.mh : u.uhp) * 2) &&

View File

@@ -336,7 +336,7 @@ register int x,y;
char *et;
unsigned maxelen = BUFSZ - sizeof("You feel the words: \"\". ");
if (strlen(ep->engr_txt) > maxelen) {
(void) strncpy(buf, ep->engr_txt, maxelen);
(void) strncpy(buf, ep->engr_txt, (int)maxelen);
buf[maxelen] = '\0';
et = buf;
} else

View File

@@ -670,7 +670,7 @@ static void findtravelpath()
int set=0;
int dia=1;
(void) memset(travel,0,sizeof(travel));
(void) memset((genericptr_t)travel,0,sizeof(travel));
travelstepx[0][0] = u.tx;
travelstepy[0][0] = u.ty;

View File

@@ -56,6 +56,7 @@ int explcolors[] = {
# endif
#endif
/*ARGSUSED*/
void
mapglyph(glyph, ochar, ocolor, ospecial, x, y)
int glyph, *ocolor, x, y;

View File

@@ -35,8 +35,8 @@ STATIC_DCL int FDECL(choose_magic_spell, (int));
STATIC_DCL int FDECL(choose_clerical_spell, (int));
STATIC_DCL void FDECL(cast_wizard_spell,(struct monst *, int,int));
STATIC_DCL void FDECL(cast_cleric_spell,(struct monst *, int,int));
STATIC_DCL boolean FDECL(is_undirected_spell,(int,int));
STATIC_DCL boolean FDECL(spell_would_be_useless,(struct monst *,int,int));
STATIC_DCL boolean FDECL(is_undirected_spell,(unsigned int,int));
STATIC_DCL boolean FDECL(spell_would_be_useless,(struct monst *,unsigned int,int));
#ifdef OVL0
@@ -660,7 +660,7 @@ int spellnum;
STATIC_DCL
boolean
is_undirected_spell(adtyp, spellnum)
int adtyp;
unsigned int adtyp;
int spellnum;
{
if (adtyp == AD_SPEL) {
@@ -692,8 +692,8 @@ STATIC_DCL
boolean
spell_would_be_useless(mtmp, adtyp, spellnum)
struct monst *mtmp;
unsigned int adtyp;
int spellnum;
int adtyp;
{
/* Some spells don't require the player to really be there and can be cast
* by the monster when you're invisible, yet still shouldn't be cast when

View File

@@ -206,10 +206,10 @@ disturb(mtmp)
* if fleemsg, prints a message about new flight, otherwise, caller should */
void
monflee(mtmp, fleetime, first, fleemsg)
struct monst *mtmp;
unsigned int fleetime;
boolean first;
boolean fleemsg;
struct monst *mtmp;
int fleetime;
boolean first;
boolean fleemsg;
{
if (u.ustuck == mtmp) {
if (u.uswallow)

View File

@@ -313,7 +313,7 @@ register struct monst *oracl;
Sprintf(qbuf,
"\"Wilt thou settle for a minor consultation?\" (%d %s)",
minor_cost, currency(minor_cost));
minor_cost, currency((long)minor_cost));
switch (ynq(qbuf)) {
default:
case 'q':
@@ -338,7 +338,7 @@ register struct monst *oracl;
(oracle_cnt == 1 || oracle_flg < 0)) return 0;
Sprintf(qbuf,
"\"Then dost thou desire a major one?\" (%d %s)",
major_cost, currency(major_cost));
major_cost, currency((long)major_cost));
if (yn(qbuf) != 'y') return 0;
#ifndef GOLDOBJ
u_pay = (u.ugold < (long)major_cost ? (int)u.ugold

View File

@@ -463,7 +463,7 @@ dismount_steed(reason)
You("%s off of %s!", verb, mon_nam(mtmp));
if (!have_spot) have_spot = landing_spot(&cc,1);
losehp(rn1(10,10), "riding accident", KILLED_BY_AN);
set_wounded_legs(BOTH_SIDES, HWounded_legs + rn1(5,5));
set_wounded_legs(BOTH_SIDES, (int)HWounded_legs + rn1(5,5));
repair_leg_damage = FALSE;
break;
case DISMOUNT_POLY:

View File

@@ -896,7 +896,7 @@ int thrown;
if (jousting) {
You("joust %s%s",
mon_nam(mon), canseemon(mon) ? exclam(tmp) : ".");
mhurtle(mon, u.dx, u.dy, 1, TRUE);
mhurtle(mon, u.dx, u.dy, 1);
hittxt = TRUE;
} else
#endif
@@ -908,7 +908,7 @@ int thrown;
if (canspotmon(mon))
pline("%s %s from your powerful strike!", Monnam(mon),
makeplural(stagger(mon->data, "stagger")));
mhurtle(mon, u.dx, u.dy, 1, TRUE);
mhurtle(mon, u.dx, u.dy, 1);
hittxt = TRUE;
}
}
@@ -918,7 +918,7 @@ int thrown;
destroyed = TRUE;
if (mon->mtame && (!mon->mflee || mon->mfleetim) && tmp > 0) {
abuse_dog(mon);
monflee(mon, (unsigned)(10 * rnd(tmp)), FALSE, FALSE);
monflee(mon, 10 * rnd(tmp), FALSE, FALSE);
}
if((mdat == &mons[PM_BLACK_PUDDING] || mdat == &mons[PM_BROWN_PUDDING])
&& obj && obj == uwep