make style consistent for function ptr arguments

This commit is contained in:
nhmall
2024-02-19 17:21:04 -05:00
parent 688ac6ffbe
commit 0a985459f0
24 changed files with 207 additions and 207 deletions
+1 -1
View File
@@ -568,7 +568,7 @@ ckmailstatus(void)
void void
read_simplemail(const char *mbox, boolean adminmsg) read_simplemail(const char *mbox, boolean adminmsg)
{ {
FILE* mb = fopen(mbox, "r"); FILE *mb = fopen(mbox, "r");
char curline[128], *msg; char curline[128], *msg;
boolean seen_one_already = FALSE; boolean seen_one_already = FALSE;
#ifdef SIMPLE_MAIL #ifdef SIMPLE_MAIL
+1 -1
View File
@@ -449,7 +449,7 @@ litstate_rnd(int litstate)
} }
void void
mkmap(lev_init* init_lev) mkmap(lev_init *init_lev)
{ {
schar bg_typ = init_lev->bg, fg_typ = init_lev->fg; schar bg_typ = init_lev->bg, fg_typ = init_lev->fg;
boolean smooth = init_lev->smoothed, join = init_lev->joined; boolean smooth = init_lev->smoothed, join = init_lev->joined;
+4 -4
View File
@@ -715,7 +715,7 @@ migrate_orc(struct monst *mtmp, unsigned long mflags)
} }
static void static void
shiny_orc_stuff(struct monst* mtmp) shiny_orc_stuff(struct monst *mtmp)
{ {
int gemprob, goldprob, otyp; int gemprob, goldprob, otyp;
struct obj *otmp; struct obj *otmp;
@@ -747,7 +747,7 @@ shiny_orc_stuff(struct monst* mtmp)
} }
static void static void
migr_booty_item(int otyp, const char* gang) migr_booty_item(int otyp, const char *gang)
{ {
struct obj *otmp; struct obj *otmp;
@@ -1672,7 +1672,7 @@ water_friction(void)
} }
void void
save_waterlevel(NHFILE* nhfp) save_waterlevel(NHFILE *nhfp)
{ {
struct bubble *b; struct bubble *b;
@@ -1882,7 +1882,7 @@ mk_bubble(coordxy x, coordxy y, int n)
* This property also makes leaving a bubble slightly difficult. * This property also makes leaving a bubble slightly difficult.
*/ */
static void static void
mv_bubble(struct bubble* b, coordxy dx, coordxy dy, boolean ini) mv_bubble(struct bubble *b, coordxy dx, coordxy dy, boolean ini)
{ {
int i, j, colli = 0; int i, j, colli = 0;
coordxy x, y; coordxy x, y;
+1 -1
View File
@@ -3571,7 +3571,7 @@ obj_absorb(struct obj **obj1, struct obj **obj2)
* cleanly (since we don't know which we want to stay around) * cleanly (since we don't know which we want to stay around)
*/ */
struct obj * struct obj *
obj_meld(struct obj** obj1, struct obj** obj2) obj_meld(struct obj **obj1, struct obj **obj2)
{ {
struct obj *otmp1, *otmp2, *result = 0; struct obj *otmp1, *otmp2, *result = 0;
int ox, oy; int ox, oy;
+12 -12
View File
@@ -34,7 +34,7 @@ static boolean invalid_shop_shape(struct mkroom *sroom);
extern const struct shclass shtypes[]; /* defined in shknam.c */ extern const struct shclass shtypes[]; /* defined in shknam.c */
static boolean static boolean
isbig(struct mkroom* sroom) isbig(struct mkroom *sroom)
{ {
int area = (sroom->hx - sroom->lx + 1) int area = (sroom->hx - sroom->lx + 1)
* (sroom->hy - sroom->ly + 1); * (sroom->hy - sroom->ly + 1);
@@ -268,7 +268,7 @@ mk_zoo_thronemon(coordxy x, coordxy y)
} }
void void
fill_zoo(struct mkroom* sroom) fill_zoo(struct mkroom *sroom)
{ {
struct monst *mon; struct monst *mon;
int sx, sy, i; int sx, sy, i;
@@ -628,7 +628,7 @@ nexttodoor(int sx, int sy)
} }
boolean boolean
has_dnstairs(struct mkroom* sroom) has_dnstairs(struct mkroom *sroom)
{ {
stairway *stway = gs.stairs; stairway *stway = gs.stairs;
@@ -641,7 +641,7 @@ has_dnstairs(struct mkroom* sroom)
} }
boolean boolean
has_upstairs(struct mkroom* sroom) has_upstairs(struct mkroom *sroom)
{ {
stairway *stway = gs.stairs; stairway *stway = gs.stairs;
@@ -654,19 +654,19 @@ has_upstairs(struct mkroom* sroom)
} }
int int
somex(struct mkroom* croom) somex(struct mkroom *croom)
{ {
return rn1(croom->hx - croom->lx + 1, croom->lx); return rn1(croom->hx - croom->lx + 1, croom->lx);
} }
int int
somey(struct mkroom* croom) somey(struct mkroom *croom)
{ {
return rn1(croom->hy - croom->ly + 1, croom->ly); return rn1(croom->hy - croom->ly + 1, croom->ly);
} }
boolean boolean
inside_room(struct mkroom* croom, coordxy x, coordxy y) inside_room(struct mkroom *croom, coordxy x, coordxy y)
{ {
if (croom->irregular) { if (croom->irregular) {
int i = (int) ((croom - gr.rooms) + ROOMOFFSET); int i = (int) ((croom - gr.rooms) + ROOMOFFSET);
@@ -682,7 +682,7 @@ inside_room(struct mkroom* croom, coordxy x, coordxy y)
can return a non-accessible location, eg. inside a wall can return a non-accessible location, eg. inside a wall
if a themed room is not irregular, but has some non-room terrain */ if a themed room is not irregular, but has some non-room terrain */
boolean boolean
somexy(struct mkroom *croom,coord *c) somexy(struct mkroom *croom, coord *c)
{ {
int try_cnt = 0; int try_cnt = 0;
int i; int i;
@@ -832,7 +832,7 @@ squadmon(void)
* (if any). * (if any).
*/ */
static void static void
save_room(NHFILE* nhfp, struct mkroom* r) save_room(NHFILE *nhfp, struct mkroom *r)
{ {
short i; short i;
@@ -852,7 +852,7 @@ save_room(NHFILE* nhfp, struct mkroom* r)
* save_rooms : Save all the rooms on disk! * save_rooms : Save all the rooms on disk!
*/ */
void void
save_rooms(NHFILE* nhfp) save_rooms(NHFILE *nhfp)
{ {
short i; short i;
@@ -864,7 +864,7 @@ save_rooms(NHFILE* nhfp)
} }
static void static void
rest_room(NHFILE* nhfp, struct mkroom* r) rest_room(NHFILE *nhfp, struct mkroom *r)
{ {
short i; short i;
@@ -883,7 +883,7 @@ rest_room(NHFILE* nhfp, struct mkroom* r)
* the disk. * the disk.
*/ */
void void
rest_rooms(NHFILE* nhfp) rest_rooms(NHFILE *nhfp)
{ {
short i; short i;
+30 -30
View File
@@ -282,7 +282,7 @@ mon_sanity_check(void)
/* Does not check for actual poison gas at the location. */ /* Does not check for actual poison gas at the location. */
/* Returns one of M_POISONGAS_foo */ /* Returns one of M_POISONGAS_foo */
int int
m_poisongas_ok(struct monst* mtmp) m_poisongas_ok(struct monst *mtmp)
{ {
int px, py; int px, py;
boolean is_you = (mtmp == &gy.youmonst); boolean is_you = (mtmp == &gy.youmonst);
@@ -733,7 +733,7 @@ make_corpse(struct monst *mtmp, unsigned int corpseflags)
/* check mtmp and water/lava for compatibility, 0 (survived), 1 (died) */ /* check mtmp and water/lava for compatibility, 0 (survived), 1 (died) */
int int
minliquid(struct monst* mtmp) minliquid(struct monst *mtmp)
{ {
int res; int res;
@@ -747,7 +747,7 @@ minliquid(struct monst* mtmp)
/* guts of minliquid() */ /* guts of minliquid() */
static int static int
minliquid_core(struct monst* mtmp) minliquid_core(struct monst *mtmp)
{ {
boolean inpool, inlava, infountain; boolean inpool, inlava, infountain;
boolean waterwall = is_waterwall(mtmp->mx,mtmp->my); boolean waterwall = is_waterwall(mtmp->mx,mtmp->my);
@@ -1594,7 +1594,7 @@ mon_givit(struct monst *mtmp, struct permonst *ptr)
} }
void void
mpickgold(struct monst* mtmp) mpickgold(struct monst *mtmp)
{ {
struct obj *gold; struct obj *gold;
int mat_idx; int mat_idx;
@@ -1681,7 +1681,7 @@ mpickstuff(struct monst *mtmp)
} }
int int
curr_mon_load(struct monst* mtmp) curr_mon_load(struct monst *mtmp)
{ {
int curload = 0; int curload = 0;
struct obj *obj; struct obj *obj;
@@ -1695,7 +1695,7 @@ curr_mon_load(struct monst* mtmp)
} }
int int
max_mon_load(struct monst* mtmp) max_mon_load(struct monst *mtmp)
{ {
long maxload; long maxload;
@@ -1758,7 +1758,7 @@ can_touch_safely(struct monst *mtmp, struct obj *otmp)
* likesgold handling m_move results in picking up the whole stack. * likesgold handling m_move results in picking up the whole stack.
*/ */
int int
can_carry(struct monst* mtmp, struct obj* otmp) can_carry(struct monst *mtmp, struct obj *otmp)
{ {
int iquan, otyp = otmp->otyp, newload = otmp->owt; int iquan, otyp = otmp->otyp, newload = otmp->owt;
struct permonst *mdat = mtmp->data; struct permonst *mdat = mtmp->data;
@@ -1832,7 +1832,7 @@ monlineu(struct monst *mon, int nx, int ny)
/* return flags based on monster data, for mfndpos() */ /* return flags based on monster data, for mfndpos() */
long long
mon_allowflags(struct monst* mtmp) mon_allowflags(struct monst *mtmp)
{ {
long allowflags = 0L; long allowflags = 0L;
boolean can_open = !(nohands(mtmp->data) || verysmall(mtmp->data)); boolean can_open = !(nohands(mtmp->data) || verysmall(mtmp->data));
@@ -2336,7 +2336,7 @@ relmon(
} }
void void
copy_mextra(struct monst* mtmp2, struct monst* mtmp1) copy_mextra(struct monst *mtmp2, struct monst *mtmp1)
{ {
if (!mtmp2 || !mtmp1 || !mtmp1->mextra) if (!mtmp2 || !mtmp1 || !mtmp1->mextra)
return; return;
@@ -2382,7 +2382,7 @@ copy_mextra(struct monst* mtmp2, struct monst* mtmp1)
} }
void void
dealloc_mextra(struct monst* m) dealloc_mextra(struct monst *m)
{ {
struct mextra *x = m->mextra; struct mextra *x = m->mextra;
@@ -2556,7 +2556,7 @@ set_mon_min_mhpmax(
/* find the worn amulet of life saving which will save a monster */ /* find the worn amulet of life saving which will save a monster */
struct obj * struct obj *
mlifesaver(struct monst* mon) mlifesaver(struct monst *mon)
{ {
if (!nonliving(mon->data) || is_vampshifter(mon)) { if (!nonliving(mon->data) || is_vampshifter(mon)) {
struct obj *otmp = which_armor(mon, W_AMUL); struct obj *otmp = which_armor(mon, W_AMUL);
@@ -2568,7 +2568,7 @@ mlifesaver(struct monst* mon)
} }
static void static void
lifesaved_monster(struct monst* mtmp) lifesaved_monster(struct monst *mtmp)
{ {
boolean surviver; boolean surviver;
struct obj *lifesave = mlifesaver(mtmp); struct obj *lifesave = mlifesaver(mtmp);
@@ -2936,7 +2936,7 @@ corpse_chance(
/* drop (perhaps) a cadaver and remove monster */ /* drop (perhaps) a cadaver and remove monster */
void void
mondied(struct monst* mdef) mondied(struct monst *mdef)
{ {
mondead(mdef); mondead(mdef);
if (!DEADMONSTER(mdef)) if (!DEADMONSTER(mdef))
@@ -2950,7 +2950,7 @@ mondied(struct monst* mdef)
/* monster disappears, not dies */ /* monster disappears, not dies */
void void
mongone(struct monst* mdef) mongone(struct monst *mdef)
{ {
mdef->mhp = 0; /* can skip some inventory bookkeeping */ mdef->mhp = 0; /* can skip some inventory bookkeeping */
@@ -2970,7 +2970,7 @@ mongone(struct monst* mdef)
/* drop a statue or rock and remove monster */ /* drop a statue or rock and remove monster */
void void
monstone(struct monst* mdef) monstone(struct monst *mdef)
{ {
struct obj *otmp, *obj, *oldminvent; struct obj *otmp, *obj, *oldminvent;
coordxy x = mdef->mx, y = mdef->my; coordxy x = mdef->mx, y = mdef->my;
@@ -3152,7 +3152,7 @@ unstuck(struct monst *mtmp)
} }
void void
killed(struct monst* mtmp) killed(struct monst *mtmp)
{ {
xkilled(mtmp, XKILL_GIVEMSG); xkilled(mtmp, XKILL_GIVEMSG);
} }
@@ -3414,7 +3414,7 @@ xkilled(
/* changes the monster into a stone monster of the same type /* changes the monster into a stone monster of the same type
this should only be called when poly_when_stoned() is true */ this should only be called when poly_when_stoned() is true */
void void
mon_to_stone(struct monst* mtmp) mon_to_stone(struct monst *mtmp)
{ {
if (mtmp->data->mlet == S_GOLEM) { if (mtmp->data->mlet == S_GOLEM) {
/* it's a golem, and not a stone golem */ /* it's a golem, and not a stone golem */
@@ -3756,7 +3756,7 @@ mnearto(
/* monster responds to player action; not the same as a passive attack; /* monster responds to player action; not the same as a passive attack;
assumes reason for response has been tested, and response _must_ be made */ assumes reason for response has been tested, and response _must_ be made */
void void
m_respond(struct monst* mtmp) m_respond(struct monst *mtmp)
{ {
if (mtmp->data->msound == MS_SHRIEK) { if (mtmp->data->msound == MS_SHRIEK) {
if (!Deaf) { if (!Deaf) {
@@ -3910,7 +3910,7 @@ peacefuls_respond(struct monst *mtmp)
where mtmp was already hostile; it checks for situations where the player where mtmp was already hostile; it checks for situations where the player
shouldn't be attacking and any ramifications /that/ might have. */ shouldn't be attacking and any ramifications /that/ might have. */
void void
setmangry(struct monst* mtmp, boolean via_attack) setmangry(struct monst *mtmp, boolean via_attack)
{ {
if (via_attack && sengr_at("Elbereth", u.ux, u.uy, TRUE) if (via_attack && sengr_at("Elbereth", u.ux, u.uy, TRUE)
/* only hypocritical if monster is vulnerable to Elbereth (or /* only hypocritical if monster is vulnerable to Elbereth (or
@@ -3977,7 +3977,7 @@ wake_msg(struct monst *mtmp, boolean interesting)
/* wake up a monster, possibly making it angry in the process */ /* wake up a monster, possibly making it angry in the process */
void void
wakeup(struct monst* mtmp, boolean via_attack) wakeup(struct monst *mtmp, boolean via_attack)
{ {
boolean was_sleeping = mtmp->msleeping; boolean was_sleeping = mtmp->msleeping;
@@ -4047,7 +4047,7 @@ wake_nearto(coordxy x, coordxy y, int distance)
/* NOTE: we must check for mimicry before calling this routine */ /* NOTE: we must check for mimicry before calling this routine */
void void
seemimic(struct monst* mtmp) seemimic(struct monst *mtmp)
{ {
boolean is_blocker_appear = (is_lightblocker_mappear(mtmp)); boolean is_blocker_appear = (is_lightblocker_mappear(mtmp));
@@ -4395,7 +4395,7 @@ hideunder(struct monst *mtmp)
/* called when returning to a previously visited level */ /* called when returning to a previously visited level */
void void
hide_monst(struct monst* mon) hide_monst(struct monst *mon)
{ {
boolean hider_under = hides_under(mon->data) || mon->data->mlet == S_EEL; boolean hider_under = hides_under(mon->data) || mon->data->mlet == S_EEL;
@@ -4566,7 +4566,7 @@ pickvampshape(struct monst *mon)
/* nonshapechangers who warrant special polymorph handling */ /* nonshapechangers who warrant special polymorph handling */
static boolean static boolean
isspecmon(struct monst* mon) isspecmon(struct monst *mon)
{ {
return (mon->isshk || mon->ispriest || mon->isgd return (mon->isshk || mon->ispriest || mon->isgd
|| mon->m_id == gq.quest_status.leader_m_id); || mon->m_id == gq.quest_status.leader_m_id);
@@ -4576,7 +4576,7 @@ isspecmon(struct monst* mon)
vault guards) to forms that allow them to behave sensibly (catching vault guards) to forms that allow them to behave sensibly (catching
gold, speaking?) so that they don't need too much extra code */ gold, speaking?) so that they don't need too much extra code */
static boolean static boolean
validspecmon(struct monst* mon, int mndx) validspecmon(struct monst *mon, int mndx)
{ {
if (mndx == NON_PM) if (mndx == NON_PM)
return TRUE; /* caller wants random */ return TRUE; /* caller wants random */
@@ -4611,7 +4611,7 @@ valid_vampshiftform(int base, int form)
/* prevent wizard mode user from specifying invalid vampshifter shape /* prevent wizard mode user from specifying invalid vampshifter shape
when using monpolycontrol to assign a new form to a vampshifter */ when using monpolycontrol to assign a new form to a vampshifter */
boolean boolean
validvamp(struct monst* mon, int* mndx_p, int monclass) validvamp(struct monst *mon, int *mndx_p, int monclass)
{ {
/* simplify caller's usage */ /* simplify caller's usage */
if (!is_vampshifter(mon)) if (!is_vampshifter(mon))
@@ -4739,7 +4739,7 @@ wiz_force_cham_form(struct monst *mon)
} }
int int
select_newcham_form(struct monst* mon) select_newcham_form(struct monst *mon)
{ {
int mndx = NON_PM, tryct; int mndx = NON_PM, tryct;
@@ -5169,7 +5169,7 @@ dead_species(int m_idx, boolean egg)
/* kill off any eggs of genocided monsters */ /* kill off any eggs of genocided monsters */
static void static void
kill_eggs(struct obj* obj_list) kill_eggs(struct obj *obj_list)
{ {
struct obj *otmp; struct obj *otmp;
@@ -5240,7 +5240,7 @@ kill_genocided_monsters(void)
} }
void void
golemeffects(struct monst* mon, int damtype, int dam) golemeffects(struct monst *mon, int damtype, int dam)
{ {
int heal = 0, slow = 0; int heal = 0, slow = 0;
@@ -5339,7 +5339,7 @@ pacify_guards(void)
} }
void void
mimic_hit_msg(struct monst* mtmp, short otyp) mimic_hit_msg(struct monst *mtmp, short otyp)
{ {
short ap = mtmp->mappearance; short ap = mtmp->mappearance;
@@ -5359,7 +5359,7 @@ mimic_hit_msg(struct monst* mtmp, short otyp)
} }
boolean boolean
usmellmon(struct permonst* mdat) usmellmon(struct permonst *mdat)
{ {
int mndx; int mndx;
boolean nonspecific = FALSE; boolean nonspecific = FALSE;
+11 -11
View File
@@ -102,7 +102,7 @@ monhaskey(
} }
void void
mon_yells(struct monst* mon, const char* shout) mon_yells(struct monst *mon, const char *shout)
{ {
if (Deaf) { if (Deaf) {
if (canspotmon(mon)) if (canspotmon(mon))
@@ -158,7 +158,7 @@ m_break_boulder(struct monst *mtmp, coordxy x, coordxy y)
} }
static void static void
watch_on_duty(struct monst* mtmp) watch_on_duty(struct monst *mtmp)
{ {
coordxy x, y; coordxy x, y;
@@ -366,7 +366,7 @@ find_pmmonst(int pm)
will eat it if there is no queen bee on the level; return 1: mon died, will eat it if there is no queen bee on the level; return 1: mon died,
0: mon ate jelly and lived; -1: mon didn't eat jelly to use its move */ 0: mon ate jelly and lived; -1: mon didn't eat jelly to use its move */
int int
bee_eat_jelly(struct monst* mon, struct obj* obj) bee_eat_jelly(struct monst *mon, struct obj *obj)
{ {
int m_delay; int m_delay;
struct monst *mtmp = find_pmmonst(PM_QUEEN_BEE); struct monst *mtmp = find_pmmonst(PM_QUEEN_BEE);
@@ -519,7 +519,7 @@ distfleeck(
/* perform a special one-time action for a monster; returns -1 if nothing /* perform a special one-time action for a monster; returns -1 if nothing
special happened, 0 if monster uses up its turn, 1 if monster is killed */ special happened, 0 if monster uses up its turn, 1 if monster is killed */
static int static int
m_arrival(struct monst* mon) m_arrival(struct monst *mon)
{ {
mon->mstrategy &= ~STRAT_ARRIVE; /* always reset */ mon->mstrategy &= ~STRAT_ARRIVE; /* always reset */
@@ -528,7 +528,7 @@ m_arrival(struct monst* mon)
/* a mind flayer unleashes a mind blast */ /* a mind flayer unleashes a mind blast */
static void static void
mind_blast(struct monst* mtmp) mind_blast(struct monst *mtmp)
{ {
struct monst *m2, *nmon = (struct monst *) 0; struct monst *m2, *nmon = (struct monst *) 0;
@@ -597,7 +597,7 @@ mind_blast(struct monst* mtmp)
* code. --KAA * code. --KAA
*/ */
int int
dochug(struct monst* mtmp) dochug(struct monst *mtmp)
{ {
struct permonst *mdat; struct permonst *mdat;
int status = MMOVE_NOTHING; int status = MMOVE_NOTHING;
@@ -964,7 +964,7 @@ mon_would_consume_item(struct monst *mtmp, struct obj *otmp)
} }
boolean boolean
itsstuck(struct monst* mtmp) itsstuck(struct monst *mtmp)
{ {
if (sticks(gy.youmonst.data) && mtmp == u.ustuck && !u.uswallow) { if (sticks(gy.youmonst.data) && mtmp == u.ustuck && !u.uswallow) {
pline("%s cannot escape from you!", Monnam(mtmp)); pline("%s cannot escape from you!", Monnam(mtmp));
@@ -1088,7 +1088,7 @@ leppie_stash(struct monst *mtmp)
/* does monster want to avoid you? */ /* does monster want to avoid you? */
static boolean static boolean
m_balks_at_approaching(struct monst* mtmp) m_balks_at_approaching(struct monst *mtmp)
{ {
/* peaceful, far away, or can't see you */ /* peaceful, far away, or can't see you */
if (mtmp->mpeaceful if (mtmp->mpeaceful
@@ -2156,7 +2156,7 @@ undesirable_disp(
* Used by can_ooze() and can_fog(). * Used by can_ooze() and can_fog().
*/ */
static boolean static boolean
stuff_prevents_passage(struct monst* mtmp) stuff_prevents_passage(struct monst *mtmp)
{ {
struct obj *chain, *obj; struct obj *chain, *obj;
@@ -2193,7 +2193,7 @@ stuff_prevents_passage(struct monst* mtmp)
} }
boolean boolean
can_ooze(struct monst* mtmp) can_ooze(struct monst *mtmp)
{ {
if (!amorphous(mtmp->data) || stuff_prevents_passage(mtmp)) if (!amorphous(mtmp->data) || stuff_prevents_passage(mtmp))
return FALSE; return FALSE;
@@ -2202,7 +2202,7 @@ can_ooze(struct monst* mtmp)
/* monster can change form into a fog if necessary */ /* monster can change form into a fog if necessary */
boolean boolean
can_fog(struct monst* mtmp) can_fog(struct monst *mtmp)
{ {
if (!(gm.mvitals[PM_FOG_CLOUD].mvflags & G_GENOD) && is_vampshifter(mtmp) if (!(gm.mvitals[PM_FOG_CLOUD].mvflags & G_GENOD) && is_vampshifter(mtmp)
&& !Protection_from_shape_changers && !stuff_prevents_passage(mtmp)) && !Protection_from_shape_changers && !stuff_prevents_passage(mtmp))
+2 -2
View File
@@ -92,7 +92,7 @@ get_mplname(struct monst* mtmp, char *nam)
} }
static void static void
mk_mplayer_armor(struct monst* mon, short typ) mk_mplayer_armor(struct monst *mon, short typ)
{ {
struct obj *obj; struct obj *obj;
@@ -351,7 +351,7 @@ create_mplayers(int num, boolean special)
} }
void void
mplayer_talk(struct monst* mtmp) mplayer_talk(struct monst *mtmp)
{ {
static const char static const char
*same_class_msg[3] = { *same_class_msg[3] = {
+14 -14
View File
@@ -8,7 +8,7 @@
static int monmulti(struct monst *, struct obj *, struct obj *); static int monmulti(struct monst *, struct obj *, struct obj *);
static void monshoot(struct monst *, struct obj *, struct obj *); static void monshoot(struct monst *, struct obj *, struct obj *);
static boolean ucatchgem(struct obj *, struct monst *); static boolean ucatchgem(struct obj *, struct monst *);
static const char* breathwep_name(int); static const char *breathwep_name(int);
static boolean drop_throw(struct obj *, boolean, coordxy, coordxy); static boolean drop_throw(struct obj *, boolean, coordxy, coordxy);
static boolean blocking_terrain(coordxy, coordxy); static boolean blocking_terrain(coordxy, coordxy);
static int m_lined_up(struct monst *, struct monst *) NONNULLARG12; static int m_lined_up(struct monst *, struct monst *) NONNULLARG12;
@@ -53,7 +53,7 @@ rnd_hallublast(void)
} }
boolean boolean
m_has_launcher_and_ammo(struct monst* mtmp) m_has_launcher_and_ammo(struct monst *mtmp)
{ {
struct obj *mwep = MON_WEP(mtmp); struct obj *mwep = MON_WEP(mtmp);
@@ -196,7 +196,7 @@ drop_throw(
/* calculate multishot volley count for mtmp throwing otmp (if not ammo) or /* calculate multishot volley count for mtmp throwing otmp (if not ammo) or
shooting otmp with mwep (if otmp is ammo and mwep appropriate launcher) */ shooting otmp with mwep (if otmp is ammo and mwep appropriate launcher) */
static int static int
monmulti(struct monst* mtmp, struct obj* otmp, struct obj* mwep) monmulti(struct monst *mtmp, struct obj *otmp, struct obj *mwep)
{ {
int multishot = 1; int multishot = 1;
@@ -255,7 +255,7 @@ monmulti(struct monst* mtmp, struct obj* otmp, struct obj* mwep)
/* mtmp throws otmp, or shoots otmp with mwep, at hero or at monster mtarg */ /* mtmp throws otmp, or shoots otmp with mwep, at hero or at monster mtarg */
static void static void
monshoot(struct monst* mtmp, struct obj* otmp, struct obj* mwep) monshoot(struct monst *mtmp, struct obj *otmp, struct obj *mwep)
{ {
struct monst *mtarg = gm.mtarget; struct monst *mtarg = gm.mtarget;
int dm = distmin(mtmp->mx, mtmp->my, int dm = distmin(mtmp->mx, mtmp->my,
@@ -776,7 +776,7 @@ m_throw(
/* Monster throws item at another monster */ /* Monster throws item at another monster */
int int
thrwmm(struct monst* mtmp, struct monst* mtarg) thrwmm(struct monst *mtmp, struct monst *mtarg)
{ {
struct obj *otmp, *mwep; struct obj *otmp, *mwep;
coordxy x, y; coordxy x, y;
@@ -823,7 +823,7 @@ thrwmm(struct monst* mtmp, struct monst* mtarg)
/* monster spits substance at monster */ /* monster spits substance at monster */
int int
spitmm(struct monst* mtmp, struct attack* mattk, struct monst* mtarg) spitmm(struct monst *mtmp, struct attack *mattk, struct monst *mtarg)
{ {
struct obj *otmp; struct obj *otmp;
@@ -899,7 +899,7 @@ breathwep_name(int typ)
/* monster breathes at monster (ranged) */ /* monster breathes at monster (ranged) */
int int
breamm(struct monst* mtmp, struct attack* mattk, struct monst* mtarg) breamm(struct monst *mtmp, struct attack *mattk, struct monst *mtarg)
{ {
int typ = get_atkdam_type(mattk->adtyp); int typ = get_atkdam_type(mattk->adtyp);
@@ -960,7 +960,7 @@ breamm(struct monst* mtmp, struct attack* mattk, struct monst* mtarg)
/* remove an entire item from a monster's inventory; destroy that item */ /* remove an entire item from a monster's inventory; destroy that item */
void void
m_useupall(struct monst* mon, struct obj* obj) m_useupall(struct monst *mon, struct obj *obj)
{ {
extract_from_minvent(mon, obj, TRUE, FALSE); extract_from_minvent(mon, obj, TRUE, FALSE);
obfree(obj, (struct obj *) 0); obfree(obj, (struct obj *) 0);
@@ -968,7 +968,7 @@ m_useupall(struct monst* mon, struct obj* obj)
/* remove one instance of an item from a monster's inventory */ /* remove one instance of an item from a monster's inventory */
void void
m_useup(struct monst* mon, struct obj* obj) m_useup(struct monst *mon, struct obj *obj)
{ {
if (obj->quan > 1L) { if (obj->quan > 1L) {
obj->quan--; obj->quan--;
@@ -980,7 +980,7 @@ m_useup(struct monst* mon, struct obj* obj)
/* monster attempts ranged weapon attack against player */ /* monster attempts ranged weapon attack against player */
void void
thrwmu(struct monst* mtmp) thrwmu(struct monst *mtmp)
{ {
struct obj *otmp, *mwep; struct obj *otmp, *mwep;
coordxy x, y; coordxy x, y;
@@ -1065,14 +1065,14 @@ thrwmu(struct monst* mtmp)
/* monster spits substance at you */ /* monster spits substance at you */
int int
spitmu(struct monst* mtmp, struct attack* mattk) spitmu(struct monst *mtmp, struct attack *mattk)
{ {
return spitmm(mtmp, mattk, &gy.youmonst); return spitmm(mtmp, mattk, &gy.youmonst);
} }
/* monster breathes at you (ranged) */ /* monster breathes at you (ranged) */
int int
breamu(struct monst* mtmp, struct attack* mattk) breamu(struct monst *mtmp, struct attack *mattk)
{ {
return breamm(mtmp, mattk, &gy.youmonst); return breamm(mtmp, mattk, &gy.youmonst);
} }
@@ -1173,7 +1173,7 @@ linedup(
} }
static int static int
m_lined_up(struct monst* mtarg, struct monst* mtmp) m_lined_up(struct monst *mtarg, struct monst *mtmp)
{ {
boolean utarget = (mtarg == &gy.youmonst); boolean utarget = (mtarg == &gy.youmonst);
coordxy tx = utarget ? mtmp->mux : mtarg->mx; coordxy tx = utarget ? mtmp->mux : mtarg->mx;
@@ -1195,7 +1195,7 @@ m_lined_up(struct monst* mtarg, struct monst* mtmp)
/* is mtmp in position to use ranged attack on hero? */ /* is mtmp in position to use ranged attack on hero? */
boolean boolean
lined_up(struct monst* mtmp) lined_up(struct monst *mtmp)
{ {
return m_lined_up(&gy.youmonst, mtmp) ? TRUE : FALSE; return m_lined_up(&gy.youmonst, mtmp) ? TRUE : FALSE;
} }
+2 -2
View File
@@ -481,7 +481,7 @@ const char *beats[] = {
* The player is trying to extract something from his/her instrument. * The player is trying to extract something from his/her instrument.
*/ */
static int static int
do_improvisation(struct obj* instr) do_improvisation(struct obj *instr)
{ {
int damage, mode, do_spec = !(Stunned || Confusion); int damage, mode, do_spec = !(Stunned || Confusion);
struct obj itmp; struct obj itmp;
@@ -736,7 +736,7 @@ improvised_notes(boolean *same_as_last_time)
* So you want music... * So you want music...
*/ */
int int
do_play_instrument(struct obj* instr) do_play_instrument(struct obj *instr)
{ {
char buf[BUFSZ] = DUMMY, c = 'y'; char buf[BUFSZ] = DUMMY, c = 'y';
char *s; char *s;
+3 -3
View File
@@ -49,7 +49,7 @@ shuffle_tiles(void)
#endif /* TILES_IN_GLYPHMAP */ #endif /* TILES_IN_GLYPHMAP */
static void static void
setgemprobs(d_level* dlev) setgemprobs(d_level *dlev)
{ {
int j, first, lev, sum = 0; int j, first, lev, sum = 0;
@@ -365,7 +365,7 @@ oinit(void)
} }
void void
savenames(NHFILE* nhfp) savenames(NHFILE *nhfp)
{ {
int i; int i;
unsigned int len; unsigned int len;
@@ -398,7 +398,7 @@ savenames(NHFILE* nhfp)
} }
void void
restnames(NHFILE* nhfp) restnames(NHFILE *nhfp)
{ {
int i; int i;
unsigned int len = 0; unsigned int len = 0;
+12 -12
View File
@@ -321,7 +321,7 @@ safe_typename(int otyp)
} }
boolean boolean
obj_is_pname(struct obj* obj) obj_is_pname(struct obj *obj)
{ {
if (!obj->oartifact || !has_oname(obj)) if (!obj->oartifact || !has_oname(obj))
return FALSE; return FALSE;
@@ -1687,21 +1687,21 @@ doname_base(
} }
char * char *
doname(struct obj* obj) doname(struct obj *obj)
{ {
return doname_base(obj, (unsigned) 0); return doname_base(obj, (unsigned) 0);
} }
/* Name of object including price. */ /* Name of object including price. */
char * char *
doname_with_price(struct obj* obj) doname_with_price(struct obj *obj)
{ {
return doname_base(obj, DONAME_WITH_PRICE); return doname_base(obj, DONAME_WITH_PRICE);
} }
/* "some" instead of precise quantity if obj->dknown not set */ /* "some" instead of precise quantity if obj->dknown not set */
char * char *
doname_vague_quan(struct obj* obj) doname_vague_quan(struct obj *obj)
{ {
/* Used by farlook. /* Used by farlook.
* If it hasn't been seen up close and quantity is more than one, * If it hasn't been seen up close and quantity is more than one,
@@ -1720,7 +1720,7 @@ doname_vague_quan(struct obj* obj)
/* used from invent.c */ /* used from invent.c */
boolean boolean
not_fully_identified(struct obj* otmp) not_fully_identified(struct obj *otmp)
{ {
/* gold doesn't have any interesting attributes [yet?] */ /* gold doesn't have any interesting attributes [yet?] */
if (otmp->oclass == COIN_CLASS) if (otmp->oclass == COIN_CLASS)
@@ -1857,7 +1857,7 @@ corpse_xname(
/* xname doesn't include monster type for "corpse"; cxname does */ /* xname doesn't include monster type for "corpse"; cxname does */
char * char *
cxname(struct obj* obj) cxname(struct obj *obj)
{ {
if (obj->otyp == CORPSE) if (obj->otyp == CORPSE)
return corpse_xname(obj, (const char *) 0, CXN_NORMAL); return corpse_xname(obj, (const char *) 0, CXN_NORMAL);
@@ -1866,7 +1866,7 @@ cxname(struct obj* obj)
/* like cxname, but ignores quantity */ /* like cxname, but ignores quantity */
char * char *
cxname_singular(struct obj* obj) cxname_singular(struct obj *obj)
{ {
if (obj->otyp == CORPSE) if (obj->otyp == CORPSE)
return corpse_xname(obj, (const char *) 0, CXN_SINGULAR); return corpse_xname(obj, (const char *) 0, CXN_SINGULAR);
@@ -1875,7 +1875,7 @@ cxname_singular(struct obj* obj)
/* treat an object as fully ID'd when it might be used as reason for death */ /* treat an object as fully ID'd when it might be used as reason for death */
char * char *
killer_xname(struct obj* obj) killer_xname(struct obj *obj)
{ {
struct obj save_obj; struct obj save_obj;
unsigned save_ocknown; unsigned save_ocknown;
@@ -2023,7 +2023,7 @@ short_oname(
* Used if only one of a collection of objects is named (e.g. in eat.c). * Used if only one of a collection of objects is named (e.g. in eat.c).
*/ */
const char * const char *
singular(struct obj* otmp, char* (*func)(OBJ_P)) singular(struct obj *otmp, char *(*func)(OBJ_P))
{ {
long savequan; long savequan;
char *nam; char *nam;
@@ -2103,7 +2103,7 @@ An(const char *str)
* Use type_is_pname() for monster names, not the(). the() is idempotent. * Use type_is_pname() for monster names, not the(). the() is idempotent.
*/ */
char * char *
the(const char* str) the(const char *str)
{ {
const char *aname; const char *aname;
char *buf = nextobuf(); char *buf = nextobuf();
@@ -2725,7 +2725,7 @@ singplur_compound(char *str)
* 3.6.0: made case-insensitive. * 3.6.0: made case-insensitive.
*/ */
char * char *
makeplural(const char* oldstr) makeplural(const char *oldstr)
{ {
char *spot; char *spot;
char lo_c, *str = nextobuf(); char lo_c, *str = nextobuf();
@@ -2926,7 +2926,7 @@ makeplural(const char* oldstr)
* 3.6.0: made case-insensitive. * 3.6.0: made case-insensitive.
*/ */
char * char *
makesingular(const char* oldstr) makesingular(const char *oldstr)
{ {
char *p, *bp; char *p, *bp;
const char *excess = 0; const char *excess = 0;
+14 -14
View File
@@ -65,7 +65,7 @@ learnscrolltyp(short scrolltyp)
/* also called from teleport.c for scroll of teleportation */ /* also called from teleport.c for scroll of teleportation */
void void
learnscroll(struct obj* sobj) learnscroll(struct obj *sobj)
{ {
/* it's implied that sobj->dknown is set; /* it's implied that sobj->dknown is set;
we couldn't be reading this scroll otherwise */ we couldn't be reading this scroll otherwise */
@@ -75,7 +75,7 @@ learnscroll(struct obj* sobj)
/* max spe is +99, min is -99 */ /* max spe is +99, min is -99 */
static void static void
cap_spe(struct obj* obj) cap_spe(struct obj *obj)
{ {
if (obj) { if (obj) {
if (abs(obj->spe) > SPE_LIM) if (abs(obj->spe) > SPE_LIM)
@@ -84,7 +84,7 @@ cap_spe(struct obj* obj)
} }
static char * static char *
erode_obj_text(struct obj* otmp, char* buf) erode_obj_text(struct obj *otmp, char *buf)
{ {
int erosion = greatest_erosion(otmp); int erosion = greatest_erosion(otmp);
@@ -95,7 +95,7 @@ erode_obj_text(struct obj* otmp, char* buf)
} }
char * char *
tshirt_text(struct obj* tshirt, char* buf) tshirt_text(struct obj *tshirt, char *buf)
{ {
static const char *const shirt_msgs[] = { static const char *const shirt_msgs[] = {
/* Scott Bigham */ /* Scott Bigham */
@@ -248,7 +248,7 @@ hawaiian_design(struct obj *shirt, char *buf)
} }
char * char *
apron_text(struct obj* apron, char* buf) apron_text(struct obj *apron, char *buf)
{ {
static const char *const apron_msgs[] = { static const char *const apron_msgs[] = {
"Kiss the cook", "Kiss the cook",
@@ -290,7 +290,7 @@ static const char *const candy_wrappers[] = {
/* return the text of a candy bar's wrapper */ /* return the text of a candy bar's wrapper */
const char * const char *
candy_wrapper_text(struct obj* obj) candy_wrapper_text(struct obj *obj)
{ {
/* modulo operation is just bullet proofing; 'spe' is already in range */ /* modulo operation is just bullet proofing; 'spe' is already in range */
return candy_wrappers[obj->spe % SIZE(candy_wrappers)]; return candy_wrappers[obj->spe % SIZE(candy_wrappers)];
@@ -298,7 +298,7 @@ candy_wrapper_text(struct obj* obj)
/* assign a wrapper to a candy bar stack */ /* assign a wrapper to a candy bar stack */
void void
assign_candy_wrapper(struct obj* obj) assign_candy_wrapper(struct obj *obj)
{ {
if (obj->otyp == CANDY_BAR) { if (obj->otyp == CANDY_BAR) {
/* skips candy_wrappers[0] */ /* skips candy_wrappers[0] */
@@ -309,7 +309,7 @@ assign_candy_wrapper(struct obj* obj)
/* getobj callback for object to read */ /* getobj callback for object to read */
static int static int
read_ok(struct obj* obj) read_ok(struct obj *obj)
{ {
if (!obj) if (!obj)
return GETOBJ_EXCLUDE; return GETOBJ_EXCLUDE;
@@ -644,7 +644,7 @@ doread(void)
RESTORE_WARNING_FORMAT_NONLITERAL RESTORE_WARNING_FORMAT_NONLITERAL
static void static void
stripspe(struct obj* obj) stripspe(struct obj *obj)
{ {
if (obj->blessed || obj->spe <= 0) { if (obj->blessed || obj->spe <= 0) {
pline1(nothing_happens); pline1(nothing_happens);
@@ -659,13 +659,13 @@ stripspe(struct obj* obj)
} }
static void static void
p_glow1(struct obj* otmp) p_glow1(struct obj *otmp)
{ {
pline("%s briefly.", Yobjnam2(otmp, Blind ? "vibrate" : "glow")); pline("%s briefly.", Yobjnam2(otmp, Blind ? "vibrate" : "glow"));
} }
static void static void
p_glow2(struct obj* otmp, const char* color) p_glow2(struct obj *otmp, const char *color)
{ {
pline("%s%s%s for a moment.", Yobjnam2(otmp, Blind ? "vibrate" : "glow"), pline("%s%s%s for a moment.", Yobjnam2(otmp, Blind ? "vibrate" : "glow"),
Blind ? "" : " ", Blind ? "" : hcolor(color)); Blind ? "" : " ", Blind ? "" : hcolor(color));
@@ -673,7 +673,7 @@ p_glow2(struct obj* otmp, const char* color)
/* getobj callback for object to charge */ /* getobj callback for object to charge */
int int
charge_ok(struct obj* obj) charge_ok(struct obj *obj)
{ {
if (!obj) if (!obj)
return GETOBJ_EXCLUDE; return GETOBJ_EXCLUDE;
@@ -713,7 +713,7 @@ charge_ok(struct obj* obj)
/* recharge an object; curse_bless is -1 if the recharging implement /* recharge an object; curse_bless is -1 if the recharging implement
was cursed, +1 if blessed, 0 otherwise. */ was cursed, +1 if blessed, 0 otherwise. */
void void
recharge(struct obj* obj, int curse_bless) recharge(struct obj *obj, int curse_bless)
{ {
int n; int n;
boolean is_cursed, is_blessed; boolean is_cursed, is_blessed;
@@ -2882,7 +2882,7 @@ do_genocide(
} }
void void
punish(struct obj* sobj) punish(struct obj *sobj)
{ {
/* angrygods() calls this with NULL sobj arg */ /* angrygods() calls this with NULL sobj arg */
struct obj *reuse_ball = (sobj && sobj->otyp == HEAVY_IRON_BALL) struct obj *reuse_ball = (sobj && sobj->otyp == HEAVY_IRON_BALL)
+6 -6
View File
@@ -56,7 +56,7 @@ free_rect(void)
*/ */
int int
get_rect_ind(NhRect* r) get_rect_ind(NhRect *r)
{ {
NhRect *rectp; NhRect *rectp;
int lx, ly, hx, hy; int lx, ly, hx, hy;
@@ -78,7 +78,7 @@ get_rect_ind(NhRect* r)
*/ */
NhRect * NhRect *
get_rect(NhRect* r) get_rect(NhRect *r)
{ {
NhRect *rectp; NhRect *rectp;
int lx, ly, hx, hy; int lx, ly, hx, hy;
@@ -112,7 +112,7 @@ rnd_rect(void)
*/ */
static boolean static boolean
intersect(NhRect* r1, NhRect* r2, NhRect* r3) intersect(NhRect *r1, NhRect *r2, NhRect *r3)
{ {
if (r2->lx > r1->hx || r2->ly > r1->hy || r2->hx < r1->lx if (r2->lx > r1->hx || r2->ly > r1->hy || r2->hx < r1->lx
|| r2->hy < r1->ly) || r2->hy < r1->ly)
@@ -143,7 +143,7 @@ rect_bounds(NhRect r1, NhRect r2, NhRect *r3)
*/ */
void void
remove_rect(NhRect* r) remove_rect(NhRect *r)
{ {
int ind; int ind;
@@ -157,7 +157,7 @@ remove_rect(NhRect* r)
*/ */
void void
add_rect(NhRect* r) add_rect(NhRect *r)
{ {
if (rect_cnt >= n_rects) { if (rect_cnt >= n_rects) {
impossible("n_rects may be too small."); impossible("n_rects may be too small.");
@@ -178,7 +178,7 @@ add_rect(NhRect* r)
*/ */
void void
split_rects(NhRect* r1, NhRect* r2) split_rects(NhRect *r1, NhRect *r2)
{ {
NhRect r, old_r; NhRect r, old_r;
int i; int i;
+1 -1
View File
@@ -2106,7 +2106,7 @@ role_init(void)
} }
const char * const char *
Hello(struct monst* mtmp) Hello(struct monst *mtmp)
{ {
switch (Role_switch) { switch (Role_switch) {
case PM_KNIGHT: case PM_KNIGHT:
+24 -24
View File
@@ -105,7 +105,7 @@ static const char *const angrytexts[] = {
* if the monster kept the change. * if the monster kept the change.
*/ */
long long
money2mon(struct monst* mon, long amount) money2mon(struct monst *mon, long amount)
{ {
struct obj *ygold = findgold(gi.invent); struct obj *ygold = findgold(gi.invent);
@@ -134,7 +134,7 @@ money2mon(struct monst* mon, long amount)
* the priest gives you money for an ale. * the priest gives you money for an ale.
*/ */
void void
money2u(struct monst* mon, long amount) money2u(struct monst *mon, long amount)
{ {
struct obj *mongold = findgold(mon->minvent); struct obj *mongold = findgold(mon->minvent);
@@ -565,7 +565,7 @@ remote_burglary(coordxy x, coordxy y)
/* shop merchandise has been taken; pay for it with any credit available; /* shop merchandise has been taken; pay for it with any credit available;
return false if the debt is fully covered by credit, true otherwise */ return false if the debt is fully covered by credit, true otherwise */
static boolean static boolean
rob_shop(struct monst* shkp) rob_shop(struct monst *shkp)
{ {
struct eshk *eshkp; struct eshk *eshkp;
long total; long total;
@@ -601,7 +601,7 @@ rob_shop(struct monst* shkp)
/* give a message when entering an untended shop (caller has verified that) */ /* give a message when entering an untended shop (caller has verified that) */
static void static void
deserted_shop(/*const*/ char* enterstring) deserted_shop(/*const*/ char *enterstring)
{ {
struct monst *mtmp; struct monst *mtmp;
struct mkroom *r = &gr.rooms[(int) *enterstring - ROOMOFFSET]; struct mkroom *r = &gr.rooms[(int) *enterstring - ROOMOFFSET];
@@ -799,7 +799,7 @@ u_entered_shop(char *enterstring)
/* called when removing a pick-axe or mattock from a container */ /* called when removing a pick-axe or mattock from a container */
void void
pick_pick(struct obj* obj) pick_pick(struct obj *obj)
{ {
struct monst *shkp; struct monst *shkp;
@@ -833,7 +833,7 @@ pick_pick(struct obj* obj)
quoted by the shopkeeper and also that they both belong to the same shk. quoted by the shopkeeper and also that they both belong to the same shk.
*/ */
boolean boolean
same_price(struct obj* obj1, struct obj* obj2) same_price(struct obj *obj1, struct obj *obj2)
{ {
struct monst *shkp1, *shkp2; struct monst *shkp1, *shkp2;
struct bill_x *bp1 = 0, *bp2 = 0; struct bill_x *bp1 = 0, *bp2 = 0;
@@ -868,7 +868,7 @@ same_price(struct obj* obj1, struct obj* obj2)
* level is bones data which has a shk on the warpath. * level is bones data which has a shk on the warpath.
*/ */
static long static long
shop_debt(struct eshk* eshkp) shop_debt(struct eshk *eshkp)
{ {
struct bill_x *bp; struct bill_x *bp;
int ct; int ct;
@@ -1035,7 +1035,7 @@ onshopbill(struct obj *obj, struct monst *shkp, boolean silent)
/* check whether an object or any of its contents belongs to a shop */ /* check whether an object or any of its contents belongs to a shop */
boolean boolean
is_unpaid(struct obj* obj) is_unpaid(struct obj *obj)
{ {
return (boolean) (obj->unpaid return (boolean) (obj->unpaid
|| (Has_contents(obj) && count_unpaid(obj->cobj))); || (Has_contents(obj) && count_unpaid(obj->cobj)));
@@ -1043,7 +1043,7 @@ is_unpaid(struct obj* obj)
/* Delete the contents of the given object. */ /* Delete the contents of the given object. */
void void
delete_contents(struct obj* obj) delete_contents(struct obj *obj)
{ {
struct obj *curr; struct obj *curr;
@@ -1055,7 +1055,7 @@ delete_contents(struct obj* obj)
/* called with two args on merge */ /* called with two args on merge */
void void
obfree(struct obj* obj, struct obj* merge) obfree(struct obj *obj, struct obj *merge)
{ {
struct bill_x *bp; struct bill_x *bp;
struct bill_x *bpm; struct bill_x *bpm;
@@ -1151,7 +1151,7 @@ obfree(struct obj* obj, struct obj* merge)
} }
static long static long
check_credit(long tmp, struct monst* shkp) check_credit(long tmp, struct monst *shkp)
{ {
long credit = ESHK(shkp)->credit; long credit = ESHK(shkp)->credit;
@@ -1170,7 +1170,7 @@ check_credit(long tmp, struct monst* shkp)
} }
static void static void
pay(long tmp, struct monst* shkp) pay(long tmp, struct monst *shkp)
{ {
long robbed = ESHK(shkp)->robbed; long robbed = ESHK(shkp)->robbed;
long balance = ((tmp <= 0L) ? tmp : check_credit(tmp, shkp)); long balance = ((tmp <= 0L) ? tmp : check_credit(tmp, shkp));
@@ -2296,7 +2296,7 @@ get_cost_of_shop_item(
} }
static long static long
get_pricing_units(struct obj* obj) get_pricing_units(struct obj *obj)
{ {
long units = obj->quan; long units = obj->quan;
@@ -2314,7 +2314,7 @@ get_pricing_units(struct obj* obj)
/* decide whether to apply a surcharge (or hypothetically, a discount) to obj /* decide whether to apply a surcharge (or hypothetically, a discount) to obj
if it had ID number 'oid'; returns 1: increase, 0: normal, -1: decrease */ if it had ID number 'oid'; returns 1: increase, 0: normal, -1: decrease */
int int
oid_price_adjustment(struct obj* obj, unsigned int oid) oid_price_adjustment(struct obj *obj, unsigned int oid)
{ {
int res = 0, otyp = obj->otyp; int res = 0, otyp = obj->otyp;
@@ -2528,7 +2528,7 @@ dropped_container(
} }
void void
picked_container(struct obj* obj) picked_container(struct obj *obj)
{ {
struct obj *otmp; struct obj *otmp;
@@ -2591,7 +2591,7 @@ special_stock(
/* calculate how much the shk will pay when buying [all of] an object */ /* calculate how much the shk will pay when buying [all of] an object */
static long static long
set_cost(struct obj* obj, struct monst* shkp) set_cost(struct obj *obj, struct monst *shkp)
{ {
long tmp, unit_price = getprice(obj, TRUE), multiplier = 1L, divisor = 1L; long tmp, unit_price = getprice(obj, TRUE), multiplier = 1L, divisor = 1L;
@@ -2794,7 +2794,7 @@ add_one_tobill(struct obj *obj, boolean dummy, struct monst *shkp)
} }
static void static void
add_to_billobjs(struct obj* obj) add_to_billobjs(struct obj *obj)
{ {
if (obj->where != OBJ_FREE) if (obj->where != OBJ_FREE)
panic("add_to_billobjs: obj not free"); panic("add_to_billobjs: obj not free");
@@ -3126,7 +3126,7 @@ sub_one_frombill(struct obj* obj, struct monst* shkp)
/* recursive check of unpaid objects within nested containers. */ /* recursive check of unpaid objects within nested containers. */
void void
subfrombill(struct obj* obj, struct monst* shkp) subfrombill(struct obj *obj, struct monst *shkp)
{ {
struct obj *otmp; struct obj *otmp;
@@ -3745,7 +3745,7 @@ corpsenm_price_adj(struct obj *obj)
} }
static long static long
getprice(struct obj* obj, boolean shk_buying) getprice(struct obj *obj, boolean shk_buying)
{ {
long tmp = (long) objects[obj->otyp].oc_cost; long tmp = (long) objects[obj->otyp].oc_cost;
@@ -4539,7 +4539,7 @@ shopdig(int fall)
} }
static void static void
makekops(coord* mm) makekops(coord *mm)
{ {
static const short k_mndx[4] = { PM_KEYSTONE_KOP, PM_KOP_SERGEANT, static const short k_mndx[4] = { PM_KEYSTONE_KOP, PM_KOP_SERGEANT,
PM_KOP_LIEUTENANT, PM_KOP_KAPTAIN }; PM_KOP_LIEUTENANT, PM_KOP_KAPTAIN };
@@ -4883,7 +4883,7 @@ price_quote(struct obj *first_obj)
} }
static const char * static const char *
shk_embellish(struct obj* itm, long cost) shk_embellish(struct obj *itm, long cost)
{ {
if (!rn2(3)) { if (!rn2(3)) {
int o, choice = rn2(5); int o, choice = rn2(5);
@@ -4936,7 +4936,7 @@ const char *Izchak_speaks[] = {
}; };
void void
shk_chat(struct monst* shkp) shk_chat(struct monst *shkp)
{ {
struct eshk *eshk; struct eshk *eshk;
long shkmoney; long shkmoney;
@@ -5103,7 +5103,7 @@ DISABLE_WARNING_FORMAT_NONLITERAL
* when an object is completely used. * when an object is completely used.
*/ */
void void
check_unpaid_usage(struct obj* otmp, boolean altusage) check_unpaid_usage(struct obj *otmp, boolean altusage)
{ {
struct monst *shkp; struct monst *shkp;
const char *fmt, *arg1, *arg2; const char *fmt, *arg1, *arg2;
@@ -5391,7 +5391,7 @@ sasc_bug(struct obj *op, unsigned x)
* 4. player_owned glob merging into player_owned glob * 4. player_owned glob merging into player_owned glob
*/ */
void void
globby_bill_fixup(struct obj* obj_absorber, struct obj* obj_absorbed) globby_bill_fixup(struct obj *obj_absorber, struct obj *obj_absorbed)
{ {
int x = 0, y = 0; int x = 0, y = 0;
struct bill_x *bp, *bp_absorber = (struct bill_x *) 0; struct bill_x *bp, *bp_absorber = (struct bill_x *) 0;
+12 -12
View File
@@ -447,7 +447,7 @@ mkveggy_at(int sx, int sy)
/* make an object of the appropriate type for a shop square */ /* make an object of the appropriate type for a shop square */
static void static void
mkshobj_at(const struct shclass* shp, int sx, int sy, boolean mkspecl) mkshobj_at(const struct shclass *shp, int sx, int sy, boolean mkspecl)
{ {
struct monst *mtmp; struct monst *mtmp;
struct permonst *ptr; struct permonst *ptr;
@@ -480,7 +480,7 @@ mkshobj_at(const struct shclass* shp, int sx, int sy, boolean mkspecl)
/* extract a shopkeeper name for the given shop type */ /* extract a shopkeeper name for the given shop type */
static void static void
nameshk(struct monst* shk, const char* const* nlp) nameshk(struct monst *shk, const char *const *nlp)
{ {
int i, trycnt, names_avail; int i, trycnt, names_avail;
const char *shname = 0; const char *shname = 0;
@@ -550,7 +550,7 @@ nameshk(struct monst* shk, const char* const* nlp)
} }
void void
neweshk(struct monst* mtmp) neweshk(struct monst *mtmp)
{ {
if (!mtmp->mextra) if (!mtmp->mextra)
mtmp->mextra = newmextra(); mtmp->mextra = newmextra();
@@ -561,7 +561,7 @@ neweshk(struct monst* mtmp)
} }
void void
free_eshk(struct monst* mtmp) free_eshk(struct monst *mtmp)
{ {
if (mtmp->mextra && ESHK(mtmp)) { if (mtmp->mextra && ESHK(mtmp)) {
free((genericptr_t) ESHK(mtmp)); free((genericptr_t) ESHK(mtmp));
@@ -620,7 +620,7 @@ good_shopdoor(struct mkroom *sroom, coordxy *sx, coordxy *sy)
/* create a new shopkeeper in the given room */ /* create a new shopkeeper in the given room */
static int static int
shkinit(const struct shclass* shp, struct mkroom* sroom) shkinit(const struct shclass *shp, struct mkroom *sroom)
{ {
int sh; int sh;
coordxy sx, sy; coordxy sx, sy;
@@ -683,7 +683,7 @@ shkinit(const struct shclass* shp, struct mkroom* sroom)
} }
static boolean static boolean
stock_room_goodpos(struct mkroom* sroom, int rmno, int sh, int sx, int sy) stock_room_goodpos(struct mkroom *sroom, int rmno, int sh, int sx, int sy)
{ {
if (sroom->irregular) { if (sroom->irregular) {
if (levl[sx][sy].edge if (levl[sx][sy].edge
@@ -706,7 +706,7 @@ stock_room_goodpos(struct mkroom* sroom, int rmno, int sh, int sx, int sy)
/* stock a newly-created room with objects */ /* stock a newly-created room with objects */
void void
stock_room(int shp_indx, struct mkroom* sroom) stock_room(int shp_indx, struct mkroom *sroom)
{ {
/* /*
* Someday soon we'll dispatch on the shdist field of shclass to do * Someday soon we'll dispatch on the shdist field of shclass to do
@@ -793,7 +793,7 @@ stock_room(int shp_indx, struct mkroom* sroom)
/* does shkp's shop stock this item type? */ /* does shkp's shop stock this item type? */
boolean boolean
saleable(struct monst* shkp, struct obj* obj) saleable(struct monst *shkp, struct obj *obj)
{ {
int i, shp_indx = ESHK(shkp)->shoptype - SHOPBASE; int i, shp_indx = ESHK(shkp)->shoptype - SHOPBASE;
const struct shclass *shp = &shtypes[shp_indx]; const struct shclass *shp = &shtypes[shp_indx];
@@ -831,7 +831,7 @@ get_shop_item(int type)
/* version of shkname() for beginning of sentence */ /* version of shkname() for beginning of sentence */
char * char *
Shknam(struct monst* mtmp) Shknam(struct monst *mtmp)
{ {
char *nam = shkname(mtmp); char *nam = shkname(mtmp);
@@ -844,7 +844,7 @@ Shknam(struct monst* mtmp)
will yield some other shopkeeper's name (not necessarily one residing will yield some other shopkeeper's name (not necessarily one residing
in the current game's dungeon, or who keeps same type of shop) */ in the current game's dungeon, or who keeps same type of shop) */
char * char *
shkname(struct monst* mtmp) shkname(struct monst *mtmp)
{ {
char *nam; char *nam;
unsigned save_isshk = mtmp->isshk; unsigned save_isshk = mtmp->isshk;
@@ -888,7 +888,7 @@ shkname(struct monst* mtmp)
} }
boolean boolean
shkname_is_pname(struct monst* mtmp) shkname_is_pname(struct monst *mtmp)
{ {
const char *shknm = ESHK(mtmp)->shknam; const char *shknm = ESHK(mtmp)->shknam;
@@ -896,7 +896,7 @@ shkname_is_pname(struct monst* mtmp)
} }
boolean boolean
is_izchak(struct monst* shkp, boolean override_hallucination) is_izchak(struct monst *shkp, boolean override_hallucination)
{ {
const char *shknm; const char *shknm;
+12 -12
View File
@@ -17,7 +17,7 @@ static int mon_in_room(struct monst *, int);
/* this easily could be a macro, but it might overtax dumb compilers */ /* this easily could be a macro, but it might overtax dumb compilers */
static int static int
mon_in_room(struct monst* mon, int rmtyp) mon_in_room(struct monst *mon, int rmtyp)
{ {
int rno = levl[mon->mx][mon->my].roomno; int rno = levl[mon->mx][mon->my].roomno;
if (rno >= ROOMOFFSET) if (rno >= ROOMOFFSET)
@@ -346,7 +346,7 @@ static const char *const h_sounds[] = {
}; };
const char * const char *
growl_sound(struct monst* mtmp) growl_sound(struct monst *mtmp)
{ {
const char *ret; const char *ret;
@@ -397,7 +397,7 @@ growl_sound(struct monst* mtmp)
/* the sounds of a seriously abused pet, including player attacking it */ /* the sounds of a seriously abused pet, including player attacking it */
void void
growl(struct monst* mtmp) growl(struct monst *mtmp)
{ {
const char *growl_verb = 0; const char *growl_verb = 0;
@@ -422,7 +422,7 @@ growl(struct monst* mtmp)
/* the sounds of mistreated pets */ /* the sounds of mistreated pets */
void void
yelp(struct monst* mtmp) yelp(struct monst *mtmp)
{ {
const char *yelp_verb = 0; const char *yelp_verb = 0;
enum sound_effect_entries se = se_yelp; enum sound_effect_entries se = se_yelp;
@@ -474,7 +474,7 @@ yelp(struct monst* mtmp)
/* the sounds of distressed pets */ /* the sounds of distressed pets */
void void
whimper(struct monst* mtmp) whimper(struct monst *mtmp)
{ {
const char *whimper_verb = 0; const char *whimper_verb = 0;
enum sound_effect_entries se = se_canine_whine; enum sound_effect_entries se = se_canine_whine;
@@ -514,7 +514,7 @@ whimper(struct monst* mtmp)
/* pet makes "I'm hungry" noises */ /* pet makes "I'm hungry" noises */
void void
beg(struct monst* mtmp) beg(struct monst *mtmp)
{ {
if (helpless(mtmp) if (helpless(mtmp)
|| !(carnivorous(mtmp->data) || herbivorous(mtmp->data))) || !(carnivorous(mtmp->data) || herbivorous(mtmp->data)))
@@ -541,7 +541,7 @@ beg(struct monst* mtmp)
/* hero has attacked a peaceful monster within 'mon's view */ /* hero has attacked a peaceful monster within 'mon's view */
const char * const char *
maybe_gasp(struct monst* mon) maybe_gasp(struct monst *mon)
{ {
static const char *const Exclam[] = { static const char *const Exclam[] = {
"Gasp!", "Uh-oh.", "Oh my!", "What?", "Why?", "Gasp!", "Uh-oh.", "Oh my!", "What?", "Why?",
@@ -675,7 +675,7 @@ mon_is_gecko(struct monst *mon)
DISABLE_WARNING_FORMAT_NONLITERAL DISABLE_WARNING_FORMAT_NONLITERAL
static int /* check calls to this */ static int /* check calls to this */
domonnoise(struct monst* mtmp) domonnoise(struct monst *mtmp)
{ {
char verbuf[BUFSZ]; char verbuf[BUFSZ];
const char *pline_msg = 0, /* Monnam(mtmp) will be prepended */ const char *pline_msg = 0, /* Monnam(mtmp) will be prepended */
@@ -1546,7 +1546,7 @@ char *sounddir = 0; /* set in files.c */
/* adds a sound file mapping, returns 0 on failure, 1 on success */ /* adds a sound file mapping, returns 0 on failure, 1 on success */
int int
add_sound_mapping(const char* mapping) add_sound_mapping(const char *mapping)
{ {
char text[256]; char text[256];
char filename[256]; char filename[256];
@@ -1616,7 +1616,7 @@ add_sound_mapping(const char* mapping)
} }
static audio_mapping * static audio_mapping *
sound_matches_message(const char* msg) sound_matches_message(const char *msg)
{ {
audio_mapping *snd = soundmap; audio_mapping *snd = soundmap;
@@ -1629,7 +1629,7 @@ sound_matches_message(const char* msg)
} }
void void
play_sound_for_message(const char* msg) play_sound_for_message(const char *msg)
{ {
audio_mapping *snd; audio_mapping *snd;
@@ -1646,7 +1646,7 @@ play_sound_for_message(const char* msg)
} }
void void
maybe_play_sound(const char* msg) maybe_play_sound(const char *msg)
{ {
audio_mapping *snd; audio_mapping *snd;
+8 -8
View File
@@ -121,7 +121,7 @@ spell_let_to_idx(char ilet)
/* TRUE: book should be destroyed by caller */ /* TRUE: book should be destroyed by caller */
static boolean static boolean
cursed_book(struct obj* bp) cursed_book(struct obj *bp)
{ {
boolean was_in_use; boolean was_in_use;
int lev = objects[bp->otyp].oc_level; int lev = objects[bp->otyp].oc_level;
@@ -180,7 +180,7 @@ cursed_book(struct obj* bp)
/* study while confused: returns TRUE if the book is destroyed */ /* study while confused: returns TRUE if the book is destroyed */
static boolean static boolean
confused_book(struct obj* spellbook) confused_book(struct obj *spellbook)
{ {
boolean gone = FALSE; boolean gone = FALSE;
@@ -222,7 +222,7 @@ deadbook_pacify_undead(struct monst *mtmp)
/* special effects for The Book of the Dead; reading it while blind is /* special effects for The Book of the Dead; reading it while blind is
allowed so that needs to be taken into account too */ allowed so that needs to be taken into account too */
static void static void
deadbook(struct obj* book2) deadbook(struct obj *book2)
{ {
struct monst *mtmp; struct monst *mtmp;
coord mm; coord mm;
@@ -448,7 +448,7 @@ learn(void)
RESTORE_WARNING_FORMAT_NONLITERAL RESTORE_WARNING_FORMAT_NONLITERAL
int int
study_book(struct obj* spellbook) study_book(struct obj *spellbook)
{ {
int booktype = spellbook->otyp, i; int booktype = spellbook->otyp, i;
boolean confused = (Confusion != 0); boolean confused = (Confusion != 0);
@@ -624,7 +624,7 @@ study_book(struct obj* spellbook)
/* a spellbook has been destroyed or the character has changed levels; /* a spellbook has been destroyed or the character has changed levels;
the stored address for the current book is no longer valid */ the stored address for the current book is no longer valid */
void void
book_disappears(struct obj* obj) book_disappears(struct obj *obj)
{ {
if (obj == gc.context.spbook.book) { if (obj == gc.context.spbook.book) {
gc.context.spbook.book = (struct obj *) 0; gc.context.spbook.book = (struct obj *) 0;
@@ -636,7 +636,7 @@ book_disappears(struct obj* obj)
so the sequence start reading, get interrupted, name the book, resume so the sequence start reading, get interrupted, name the book, resume
reading would read the "new" book from scratch */ reading would read the "new" book from scratch */
void void
book_substitution(struct obj* old_obj, struct obj* new_obj) book_substitution(struct obj *old_obj, struct obj *new_obj)
{ {
if (old_obj == gc.context.spbook.book) { if (old_obj == gc.context.spbook.book) {
gc.context.spbook.book = new_obj; gc.context.spbook.book = new_obj;
@@ -693,7 +693,7 @@ rejectcasting(void)
* parameter. Otherwise return FALSE. * parameter. Otherwise return FALSE.
*/ */
static boolean static boolean
getspell(int* spell_no) getspell(int *spell_no)
{ {
int nspells, idx; int nspells, idx;
char ilet, lets[BUFSZ], qbuf[QBUFSZ]; char ilet, lets[BUFSZ], qbuf[QBUFSZ];
@@ -2252,7 +2252,7 @@ spellretention(int idx, char * outbuf)
/* Learn a spell during creation of the initial inventory */ /* Learn a spell during creation of the initial inventory */
void void
initialspell(struct obj* obj) initialspell(struct obj *obj)
{ {
int i, otyp = obj->otyp; int i, otyp = obj->otyp;
+4 -4
View File
@@ -55,7 +55,7 @@ somegold(long lmoney)
* Deals in gold only, as leprechauns don't care for lesser coins. * Deals in gold only, as leprechauns don't care for lesser coins.
*/ */
struct obj * struct obj *
findgold(struct obj* argchain) findgold(struct obj *argchain)
{ {
struct obj *chain = argchain; /* allow arg to be nonnull */ struct obj *chain = argchain; /* allow arg to be nonnull */
@@ -68,7 +68,7 @@ findgold(struct obj* argchain)
* Steal gold coins only. Leprechauns don't care for lesser coins. * Steal gold coins only. Leprechauns don't care for lesser coins.
*/ */
void void
stealgold(struct monst* mtmp) stealgold(struct monst *mtmp)
{ {
struct obj *fgold = g_at(u.ux, u.uy); struct obj *fgold = g_at(u.ux, u.uy);
struct obj *ygold; struct obj *ygold;
@@ -356,7 +356,7 @@ worn_item_removal(
* doesn't become a superset of leprechaun's "steal gold" attack). * doesn't become a superset of leprechaun's "steal gold" attack).
*/ */
int int
steal(struct monst* mtmp, char* objnambuf) steal(struct monst *mtmp, char *objnambuf)
{ {
struct obj *otmp; struct obj *otmp;
char Monnambuf[BUFSZ]; char Monnambuf[BUFSZ];
@@ -699,7 +699,7 @@ mpickobj(struct monst *mtmp, struct obj *otmp)
/* called for AD_SAMU (the Wizard and quest nemeses) */ /* called for AD_SAMU (the Wizard and quest nemeses) */
void void
stealamulet(struct monst* mtmp) stealamulet(struct monst *mtmp)
{ {
char buf[BUFSZ]; char buf[BUFSZ];
struct obj *otmp = 0, *obj = 0; struct obj *otmp = 0, *obj = 0;
+6 -6
View File
@@ -23,7 +23,7 @@ rider_cant_reach(void)
/* Can this monster wear a saddle? */ /* Can this monster wear a saddle? */
boolean boolean
can_saddle(struct monst* mtmp) can_saddle(struct monst *mtmp)
{ {
struct permonst *ptr = mtmp->data; struct permonst *ptr = mtmp->data;
@@ -33,7 +33,7 @@ can_saddle(struct monst* mtmp)
} }
int int
use_saddle(struct obj* otmp) use_saddle(struct obj *otmp)
{ {
struct monst *mtmp; struct monst *mtmp;
struct permonst *ptr; struct permonst *ptr;
@@ -138,7 +138,7 @@ use_saddle(struct obj* otmp)
} }
void void
put_saddle_on_mon(struct obj* saddle, struct monst* mtmp) put_saddle_on_mon(struct obj *saddle, struct monst *mtmp)
{ {
if (!can_saddle(mtmp) || which_armor(mtmp, W_SADDLE)) if (!can_saddle(mtmp) || which_armor(mtmp, W_SADDLE))
return; return;
@@ -154,7 +154,7 @@ put_saddle_on_mon(struct obj* saddle, struct monst* mtmp)
/* Can we ride this monster? Caller should also check can_saddle() */ /* Can we ride this monster? Caller should also check can_saddle() */
boolean boolean
can_ride(struct monst* mtmp) can_ride(struct monst *mtmp)
{ {
return (mtmp->mtame && humanoid(gy.youmonst.data) return (mtmp->mtame && humanoid(gy.youmonst.data)
&& !verysmall(gy.youmonst.data) && !bigmonst(gy.youmonst.data) && !verysmall(gy.youmonst.data) && !bigmonst(gy.youmonst.data)
@@ -811,7 +811,7 @@ dismount_steed(
/* when attempting to saddle or mount a sleeping steed, try to wake it up /* when attempting to saddle or mount a sleeping steed, try to wake it up
(for the saddling case, it won't be u.usteed yet) */ (for the saddling case, it won't be u.usteed yet) */
static void static void
maybewakesteed(struct monst* steed) maybewakesteed(struct monst *steed)
{ {
int frozen = (int) steed->mfrozen; int frozen = (int) steed->mfrozen;
boolean wasimmobile = helpless(steed); boolean wasimmobile = helpless(steed);
@@ -882,7 +882,7 @@ stucksteed(boolean checkfeeding)
} }
void void
place_monster(struct monst* mon, coordxy x, coordxy y) place_monster(struct monst *mon, coordxy x, coordxy y)
{ {
struct monst *othermon; struct monst *othermon;
const char *monnm, *othnm; const char *monnm, *othnm;
+4 -4
View File
@@ -295,25 +295,25 @@ switch_symbols(int nondefault)
} }
void void
update_ov_primary_symset(const struct symparse* symp, int val) update_ov_primary_symset(const struct symparse *symp, int val)
{ {
go.ov_primary_syms[symp->idx] = val; go.ov_primary_syms[symp->idx] = val;
} }
void void
update_ov_rogue_symset(const struct symparse* symp, int val) update_ov_rogue_symset(const struct symparse *symp, int val)
{ {
go.ov_rogue_syms[symp->idx] = val; go.ov_rogue_syms[symp->idx] = val;
} }
void void
update_primary_symset(const struct symparse* symp, int val) update_primary_symset(const struct symparse *symp, int val)
{ {
gp.primary_syms[symp->idx] = val; gp.primary_syms[symp->idx] = val;
} }
void void
update_rogue_symset(const struct symparse* symp, int val) update_rogue_symset(const struct symparse *symp, int val)
{ {
gr.rogue_syms[symp->idx] = val; gr.rogue_syms[symp->idx] = val;
} }
+7 -7
View File
@@ -26,7 +26,7 @@ m_blocks_teleporting(struct monst *mtmp)
/* teleporting is prevented on this level for this monster? */ /* teleporting is prevented on this level for this monster? */
boolean boolean
noteleport_level(struct monst* mon) noteleport_level(struct monst *mon)
{ {
/* demon court in Gehennom prevent others from teleporting */ /* demon court in Gehennom prevent others from teleporting */
if (In_hell(&u.uz) && !(is_dlord(mon->data) || is_dprince(mon->data))) if (In_hell(&u.uz) && !(is_dlord(mon->data) || is_dprince(mon->data)))
@@ -759,7 +759,7 @@ vault_tele(void)
} }
boolean boolean
teleport_pet(struct monst* mtmp, boolean force_it) teleport_pet(struct monst *mtmp, boolean force_it)
{ {
struct obj *otmp; struct obj *otmp;
@@ -794,7 +794,7 @@ tele(void)
/* teleport the hero; usually discover scroll of teleportation if via scroll */ /* teleport the hero; usually discover scroll of teleportation if via scroll */
void void
scrolltele(struct obj* scroll) scrolltele(struct obj *scroll)
{ {
coord cc; coord cc;
@@ -1836,7 +1836,7 @@ control_mon_tele(
} }
static void static void
mvault_tele(struct monst* mtmp) mvault_tele(struct monst *mtmp)
{ {
struct mkroom *croom = search_special(VAULT); struct mkroom *croom = search_special(VAULT);
coord c; coord c;
@@ -1849,7 +1849,7 @@ mvault_tele(struct monst* mtmp)
} }
boolean boolean
tele_restrict(struct monst* mon) tele_restrict(struct monst *mon)
{ {
if (noteleport_level(mon)) { if (noteleport_level(mon)) {
if (canseemon(mon)) if (canseemon(mon))
@@ -1861,7 +1861,7 @@ tele_restrict(struct monst* mon)
} }
void void
mtele_trap(struct monst* mtmp, struct trap* trap, int in_sight) mtele_trap(struct monst *mtmp, struct trap *trap, int in_sight)
{ {
char *monname; char *monname;
@@ -2141,7 +2141,7 @@ random_teleport_level(void)
/* you teleport a monster (via wand, spell, or poly'd q.mechanic attack); /* you teleport a monster (via wand, spell, or poly'd q.mechanic attack);
return false iff the attempt fails */ return false iff the attempt fails */
boolean boolean
u_teleport_mon(struct monst* mtmp, boolean give_feedback) u_teleport_mon(struct monst *mtmp, boolean give_feedback)
{ {
coord cc; coord cc;
+16 -16
View File
@@ -449,7 +449,7 @@ burn_away_slime(void)
/* countdown timer for turning into green slime has run out; kill our hero */ /* countdown timer for turning into green slime has run out; kill our hero */
static void static void
slimed_to_death(struct kinfo* kptr) slimed_to_death(struct kinfo *kptr)
{ {
uchar save_mvflags; uchar save_mvflags;
@@ -929,7 +929,7 @@ fall_asleep(int how_long, boolean wakeup_msg)
* existing hatch timer. Pass 0L for random hatch time. * existing hatch timer. Pass 0L for random hatch time.
*/ */
void void
attach_egg_hatch_timeout(struct obj* egg, long when) attach_egg_hatch_timeout(struct obj *egg, long when)
{ {
int i; int i;
@@ -957,7 +957,7 @@ attach_egg_hatch_timeout(struct obj* egg, long when)
/* prevent an egg from ever hatching */ /* prevent an egg from ever hatching */
void void
kill_egg(struct obj* egg) kill_egg(struct obj *egg)
{ {
/* stop previous timer, if any */ /* stop previous timer, if any */
(void) stop_timer(HATCH_EGG, obj_to_any(egg)); (void) stop_timer(HATCH_EGG, obj_to_any(egg));
@@ -1943,7 +1943,7 @@ kind_name(short kind)
} }
static void static void
print_queue(winid win, timer_element* base) print_queue(winid win, timer_element *base)
{ {
timer_element *curr; timer_element *curr;
char buf[BUFSZ]; char buf[BUFSZ];
@@ -2249,7 +2249,7 @@ peek_timer(short type, anything *arg)
* Move all object timers from src to dest, leaving src untimed. * Move all object timers from src to dest, leaving src untimed.
*/ */
void void
obj_move_timers(struct obj* src, struct obj* dest) obj_move_timers(struct obj *src, struct obj *dest)
{ {
int count; int count;
timer_element *curr; timer_element *curr;
@@ -2269,7 +2269,7 @@ obj_move_timers(struct obj* src, struct obj* dest)
* Find all object timers and duplicate them for the new object "dest". * Find all object timers and duplicate them for the new object "dest".
*/ */
void void
obj_split_timers(struct obj* src, struct obj* dest) obj_split_timers(struct obj *src, struct obj *dest)
{ {
timer_element *curr, *next_timer = 0; timer_element *curr, *next_timer = 0;
@@ -2287,7 +2287,7 @@ obj_split_timers(struct obj* src, struct obj* dest)
* all object pointers are unique. * all object pointers are unique.
*/ */
void void
obj_stop_timers(struct obj* obj) obj_stop_timers(struct obj *obj)
{ {
timeout_proc cleanup_func; timeout_proc cleanup_func;
timer_element *curr, *prev, *next_timer = 0; timer_element *curr, *prev, *next_timer = 0;
@@ -2313,7 +2313,7 @@ obj_stop_timers(struct obj* obj)
* Check whether object has a timer of type timer_type. * Check whether object has a timer of type timer_type.
*/ */
boolean boolean
obj_has_timer(struct obj* object, short timer_type) obj_has_timer(struct obj *object, short timer_type)
{ {
long timeout = peek_timer(timer_type, obj_to_any(object)); long timeout = peek_timer(timer_type, obj_to_any(object));
@@ -2375,7 +2375,7 @@ spot_time_left(coordxy x, coordxy y, short func_index)
/* Insert timer into the global queue */ /* Insert timer into the global queue */
static void static void
insert_timer(timer_element* gnu) insert_timer(timer_element *gnu)
{ {
timer_element *curr, *prev; timer_element *curr, *prev;
@@ -2413,7 +2413,7 @@ remove_timer(
} }
static void static void
write_timer(NHFILE* nhfp, timer_element* timer) write_timer(NHFILE *nhfp, timer_element *timer)
{ {
anything arg_save; anything arg_save;
@@ -2473,7 +2473,7 @@ DISABLE_WARNING_UNREACHABLE_CODE
* saved. * saved.
*/ */
boolean boolean
obj_is_local(struct obj* obj) obj_is_local(struct obj *obj)
{ {
switch (obj->where) { switch (obj->where) {
case OBJ_INVENT: case OBJ_INVENT:
@@ -2497,7 +2497,7 @@ obj_is_local(struct obj* obj)
* level is saved. * level is saved.
*/ */
static boolean static boolean
mon_is_local(struct monst* mon) mon_is_local(struct monst *mon)
{ {
struct monst *curr; struct monst *curr;
@@ -2516,7 +2516,7 @@ mon_is_local(struct monst* mon)
* level when the level is saved. * level when the level is saved.
*/ */
static boolean static boolean
timer_is_local(timer_element* timer) timer_is_local(timer_element *timer)
{ {
switch (timer->kind) { switch (timer->kind) {
case TIMER_LEVEL: case TIMER_LEVEL:
@@ -2540,7 +2540,7 @@ RESTORE_WARNING_UNREACHABLE_CODE
* be written. If write_it is true, actually write the timer. * be written. If write_it is true, actually write the timer.
*/ */
static int static int
maybe_write_timer(NHFILE* nhfp, int range, boolean write_it) maybe_write_timer(NHFILE *nhfp, int range, boolean write_it)
{ {
int count = 0; int count = 0;
timer_element *curr; timer_element *curr;
@@ -2581,7 +2581,7 @@ maybe_write_timer(NHFILE* nhfp, int range, boolean write_it)
* + timeouts that stay with the level (obj & monst) * + timeouts that stay with the level (obj & monst)
*/ */
void void
save_timers(NHFILE* nhfp, int range) save_timers(NHFILE *nhfp, int range)
{ {
timer_element *curr, *prev, *next_timer = 0; timer_element *curr, *prev, *next_timer = 0;
int count; int count;
@@ -2620,7 +2620,7 @@ save_timers(NHFILE* nhfp, int range)
* monster pointers. * monster pointers.
*/ */
void void
restore_timers(NHFILE* nhfp, int range, long adjust) restore_timers(NHFILE *nhfp, int range, long adjust)
{ {
int count = 0; int count = 0;
timer_element *curr; timer_element *curr;