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
+2 -2
View File
@@ -427,7 +427,7 @@ E int NDECL(dothrow);
E int NDECL(dofire); E int NDECL(dofire);
E void FDECL(hitfloor, (struct obj *)); E void FDECL(hitfloor, (struct obj *));
E void FDECL(hurtle, (int,int,int,BOOLEAN_P)); 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 void FDECL(throwit, (struct obj *,long,BOOLEAN_P));
E int FDECL(omon_adj, (struct monst *,struct obj *,BOOLEAN_P)); E int FDECL(omon_adj, (struct monst *,struct obj *,BOOLEAN_P));
E int FDECL(thitmonst, (struct monst *,struct obj *)); 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 void FDECL(mon_regen, (struct monst *,BOOLEAN_P));
E int FDECL(dochugw, (struct monst *)); E int FDECL(dochugw, (struct monst *));
E boolean FDECL(onscary, (int,int,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(dochug, (struct monst *));
E int FDECL(m_move, (struct monst *,int)); E int FDECL(m_move, (struct monst *,int));
E boolean FDECL(closed_door, (int,int)); E boolean FDECL(closed_door, (int,int));
+2 -1
View File
@@ -169,7 +169,8 @@ register struct obj *sobj;
struct obj *temp; struct obj *temp;
boolean stale; 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) */ /* look for gold carried by monsters (might be in a container) */
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) { for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
+2 -3
View File
@@ -611,10 +611,9 @@ hurtle(dx, dy, range, verbose)
/* Move a monster through the air for a few squares. /* Move a monster through the air for a few squares.
*/ */
void void
mhurtle(mon, dx, dy, range, verbose) mhurtle(mon, dx, dy, range)
struct monst *mon; struct monst *mon;
int dx, dy, range; int dx, dy, range;
boolean verbose;
{ {
coord mc, cc; 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)) && 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) (Upolyd ? (u.mh < 5 && u.mh != u.mhmax)
: (u.uhp < 10 && u.uhp != u.uhpmax)) && : (u.uhp < 10 && u.uhp != u.uhpmax)) &&
obj->owt > (unsigned)((Upolyd ? u.mh : u.uhp) * 2) && obj->owt > (unsigned)((Upolyd ? u.mh : u.uhp) * 2) &&
+1 -1
View File
@@ -336,7 +336,7 @@ register int x,y;
char *et; char *et;
unsigned maxelen = BUFSZ - sizeof("You feel the words: \"\". "); unsigned maxelen = BUFSZ - sizeof("You feel the words: \"\". ");
if (strlen(ep->engr_txt) > maxelen) { if (strlen(ep->engr_txt) > maxelen) {
(void) strncpy(buf, ep->engr_txt, maxelen); (void) strncpy(buf, ep->engr_txt, (int)maxelen);
buf[maxelen] = '\0'; buf[maxelen] = '\0';
et = buf; et = buf;
} else } else
+1 -1
View File
@@ -670,7 +670,7 @@ static void findtravelpath()
int set=0; int set=0;
int dia=1; int dia=1;
(void) memset(travel,0,sizeof(travel)); (void) memset((genericptr_t)travel,0,sizeof(travel));
travelstepx[0][0] = u.tx; travelstepx[0][0] = u.tx;
travelstepy[0][0] = u.ty; travelstepy[0][0] = u.ty;
+1
View File
@@ -56,6 +56,7 @@ int explcolors[] = {
# endif # endif
#endif #endif
/*ARGSUSED*/
void void
mapglyph(glyph, ochar, ocolor, ospecial, x, y) mapglyph(glyph, ochar, ocolor, ospecial, x, y)
int glyph, *ocolor, x, y; int glyph, *ocolor, x, y;
+4 -4
View File
@@ -35,8 +35,8 @@ STATIC_DCL int FDECL(choose_magic_spell, (int));
STATIC_DCL int FDECL(choose_clerical_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_wizard_spell,(struct monst *, int,int));
STATIC_DCL void FDECL(cast_cleric_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(is_undirected_spell,(unsigned int,int));
STATIC_DCL boolean FDECL(spell_would_be_useless,(struct monst *,int,int)); STATIC_DCL boolean FDECL(spell_would_be_useless,(struct monst *,unsigned int,int));
#ifdef OVL0 #ifdef OVL0
@@ -660,7 +660,7 @@ int spellnum;
STATIC_DCL STATIC_DCL
boolean boolean
is_undirected_spell(adtyp, spellnum) is_undirected_spell(adtyp, spellnum)
int adtyp; unsigned int adtyp;
int spellnum; int spellnum;
{ {
if (adtyp == AD_SPEL) { if (adtyp == AD_SPEL) {
@@ -692,8 +692,8 @@ STATIC_DCL
boolean boolean
spell_would_be_useless(mtmp, adtyp, spellnum) spell_would_be_useless(mtmp, adtyp, spellnum)
struct monst *mtmp; struct monst *mtmp;
unsigned int adtyp;
int spellnum; int spellnum;
int adtyp;
{ {
/* Some spells don't require the player to really be there and can be cast /* 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 * by the monster when you're invisible, yet still shouldn't be cast when
+4 -4
View File
@@ -206,10 +206,10 @@ disturb(mtmp)
* if fleemsg, prints a message about new flight, otherwise, caller should */ * if fleemsg, prints a message about new flight, otherwise, caller should */
void void
monflee(mtmp, fleetime, first, fleemsg) monflee(mtmp, fleetime, first, fleemsg)
struct monst *mtmp; struct monst *mtmp;
unsigned int fleetime; int fleetime;
boolean first; boolean first;
boolean fleemsg; boolean fleemsg;
{ {
if (u.ustuck == mtmp) { if (u.ustuck == mtmp) {
if (u.uswallow) if (u.uswallow)
+2 -2
View File
@@ -313,7 +313,7 @@ register struct monst *oracl;
Sprintf(qbuf, Sprintf(qbuf,
"\"Wilt thou settle for a minor consultation?\" (%d %s)", "\"Wilt thou settle for a minor consultation?\" (%d %s)",
minor_cost, currency(minor_cost)); minor_cost, currency((long)minor_cost));
switch (ynq(qbuf)) { switch (ynq(qbuf)) {
default: default:
case 'q': case 'q':
@@ -338,7 +338,7 @@ register struct monst *oracl;
(oracle_cnt == 1 || oracle_flg < 0)) return 0; (oracle_cnt == 1 || oracle_flg < 0)) return 0;
Sprintf(qbuf, Sprintf(qbuf,
"\"Then dost thou desire a major one?\" (%d %s)", "\"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; if (yn(qbuf) != 'y') return 0;
#ifndef GOLDOBJ #ifndef GOLDOBJ
u_pay = (u.ugold < (long)major_cost ? (int)u.ugold u_pay = (u.ugold < (long)major_cost ? (int)u.ugold
+1 -1
View File
@@ -463,7 +463,7 @@ dismount_steed(reason)
You("%s off of %s!", verb, mon_nam(mtmp)); You("%s off of %s!", verb, mon_nam(mtmp));
if (!have_spot) have_spot = landing_spot(&cc,1); if (!have_spot) have_spot = landing_spot(&cc,1);
losehp(rn1(10,10), "riding accident", KILLED_BY_AN); 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; repair_leg_damage = FALSE;
break; break;
case DISMOUNT_POLY: case DISMOUNT_POLY:
+3 -3
View File
@@ -896,7 +896,7 @@ int thrown;
if (jousting) { if (jousting) {
You("joust %s%s", You("joust %s%s",
mon_nam(mon), canseemon(mon) ? exclam(tmp) : "."); mon_nam(mon), canseemon(mon) ? exclam(tmp) : ".");
mhurtle(mon, u.dx, u.dy, 1, TRUE); mhurtle(mon, u.dx, u.dy, 1);
hittxt = TRUE; hittxt = TRUE;
} else } else
#endif #endif
@@ -908,7 +908,7 @@ int thrown;
if (canspotmon(mon)) if (canspotmon(mon))
pline("%s %s from your powerful strike!", Monnam(mon), pline("%s %s from your powerful strike!", Monnam(mon),
makeplural(stagger(mon->data, "stagger"))); makeplural(stagger(mon->data, "stagger")));
mhurtle(mon, u.dx, u.dy, 1, TRUE); mhurtle(mon, u.dx, u.dy, 1);
hittxt = TRUE; hittxt = TRUE;
} }
} }
@@ -918,7 +918,7 @@ int thrown;
destroyed = TRUE; destroyed = TRUE;
if (mon->mtame && (!mon->mflee || mon->mfleetim) && tmp > 0) { if (mon->mtame && (!mon->mflee || mon->mfleetim) && tmp > 0) {
abuse_dog(mon); 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]) if((mdat == &mons[PM_BLACK_PUDDING] || mdat == &mons[PM_BROWN_PUDDING])
&& obj && obj == uwep && obj && obj == uwep