From 0d34f43830c129d8f675102957dfc637a39ae5b5 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 14 Jul 2019 17:24:58 -0400 Subject: [PATCH] remove STATIC_DCL, STATIC_OVL, STATIC_VAR, STATIC_PTR from core --- include/artilist.h | 2 +- include/hack.h | 21 --- src/allmain.c | 16 +-- src/apply.c | 137 ++++++++++--------- src/artifact.c | 46 +++---- src/attrib.c | 20 +-- src/ball.c | 20 +-- src/bones.c | 16 +-- src/botl.c | 154 +++++++++++----------- src/cmd.c | 238 ++++++++++++++++----------------- src/dbridge.c | 52 ++++---- src/detect.c | 56 ++++---- src/dig.c | 28 ++-- src/display.c | 56 ++++---- src/dlb.c | 52 ++++---- src/do.c | 36 ++--- src/do_name.c | 52 ++++---- src/do_wear.c | 90 ++++++------- src/dog.c | 4 +- src/dogmove.c | 44 +++---- src/dokick.c | 32 ++--- src/dothrow.c | 42 +++--- src/dungeon.c | 118 ++++++++--------- src/eat.c | 139 ++++++++++--------- src/end.c | 70 +++++----- src/engrave.c | 6 +- src/exper.c | 4 +- src/extralev.c | 12 +- src/files.c | 92 ++++++------- src/fountain.c | 20 +-- src/hack.c | 44 +++---- src/hacklib.c | 4 +- src/invent.c | 100 +++++++------- src/light.c | 10 +- src/lock.c | 20 +-- src/mail.c | 16 +-- src/makemon.c | 36 ++--- src/mcastu.c | 32 ++--- src/mhitm.c | 34 ++--- src/mhitu.c | 46 +++---- src/mklev.c | 82 ++++++------ src/mkmap.c | 40 +++--- src/mkmaze.c | 68 +++++----- src/mkobj.c | 50 +++---- src/mkroom.c | 44 +++---- src/mon.c | 64 ++++----- src/monmove.c | 28 ++-- src/mplayer.c | 12 +- src/mthrowu.c | 18 +-- src/muse.c | 62 ++++----- src/music.c | 28 ++-- src/o_init.c | 24 ++-- src/objnam.c | 64 ++++----- src/options.c | 142 ++++++++++---------- src/pager.c | 84 ++++++------ src/pickup.c | 108 +++++++-------- src/polyself.c | 28 ++-- src/potion.c | 20 +-- src/pray.c | 62 ++++----- src/priest.c | 8 +- src/quest.c | 40 +++--- src/questpgr.c | 52 ++++---- src/read.c | 66 +++++----- src/rect.c | 4 +- src/region.c | 4 +- src/restore.c | 78 +++++------ src/rip.c | 4 +- src/role.c | 16 +-- src/rumors.c | 12 +- src/save.c | 68 +++++----- src/sfstruct.c | 4 +- src/shk.c | 170 ++++++++++++------------ src/shknam.c | 28 ++-- src/sounds.c | 16 +-- src/sp_lev.c | 322 ++++++++++++++++++++++----------------------- src/spell.c | 72 +++++----- src/steal.c | 8 +- src/steed.c | 8 +- src/teleport.c | 20 +-- src/timeout.c | 72 +++++----- src/topten.c | 64 ++++----- src/track.c | 4 +- src/trap.c | 110 ++++++++-------- src/u_init.c | 16 +-- src/uhitm.c | 64 ++++----- src/vault.c | 40 +++--- src/version.c | 4 +- src/vision.c | 72 +++++----- src/weapon.c | 30 ++--- src/wield.c | 8 +- src/windows.c | 54 ++++---- src/wizard.c | 28 ++-- src/worm.c | 16 +-- src/worn.c | 12 +- src/write.c | 12 +- src/zap.c | 58 ++++---- 96 files changed, 2339 insertions(+), 2370 deletions(-) diff --git a/include/artilist.h b/include/artilist.h index 8948e521a..26320b080 100644 --- a/include/artilist.h +++ b/include/artilist.h @@ -31,7 +31,7 @@ static const char *artifact_names[] = { #define STUN(a,b) {0,AD_STUN,a,b} /* magical attack */ /* clang-format on */ -STATIC_OVL NEARDATA struct artifact artilist[] = { +static NEARDATA struct artifact artilist[] = { #endif /* MAKEDEFS_C */ /* Artifact cost rationale: diff --git a/include/hack.h b/include/hack.h index d1f02b0b0..369519479 100644 --- a/include/hack.h +++ b/include/hack.h @@ -541,27 +541,6 @@ enum bodypart_types { #define getlogin() ((char *) 0) #endif /* MICRO */ -#if defined(OVERLAY) -#define USE_OVLx -#define STATIC_DCL extern -#define STATIC_OVL -#define STATIC_VAR - -#else /* !OVERLAY */ - -#define STATIC_DCL static -#define STATIC_OVL static -#define STATIC_VAR static - -#endif /* OVERLAY */ - -/* Macro for a few items that are only static if we're not overlaid.... */ -#if defined(USE_TRAMPOLI) || defined(USE_OVLx) -#define STATIC_PTR -#else -#define STATIC_PTR static -#endif - /* The function argument to qsort() requires a particular * calling convention under WINCE which is not the default * in that environment. diff --git a/src/allmain.c b/src/allmain.c index 761017e31..06721616f 100644 --- a/src/allmain.c +++ b/src/allmain.c @@ -13,11 +13,11 @@ #endif #ifdef POSITIONBAR -STATIC_DCL void NDECL(do_positionbar); +static void NDECL(do_positionbar); #endif -STATIC_DCL void FDECL(regen_hp, (int)); -STATIC_DCL void FDECL(interrupt_multi, (const char *)); -STATIC_DCL void FDECL(debug_fields, (const char *)); +static void FDECL(regen_hp, (int)); +static void FDECL(interrupt_multi, (const char *)); +static void FDECL(debug_fields, (const char *)); void early_init() @@ -465,7 +465,7 @@ boolean resuming; } /* maybe recover some lost health (or lose some when an eel out of water) */ -STATIC_OVL void +static void regen_hp(wtcap) int wtcap; { @@ -698,7 +698,7 @@ boolean new_game; /* false => restoring an old game */ } #ifdef POSITIONBAR -STATIC_DCL void +static void do_positionbar() { static char pbar[COLNO]; @@ -753,7 +753,7 @@ do_positionbar() } #endif -STATIC_DCL void +static void interrupt_multi(msg) const char *msg; { @@ -885,7 +885,7 @@ enum earlyarg e_arg; * optimization so that display output * can be debugged without buffering. */ -STATIC_OVL void +static void debug_fields(opts) const char *opts; { diff --git a/src/apply.c b/src/apply.c index 79f259002..c2b6d759d 100644 --- a/src/apply.c +++ b/src/apply.c @@ -5,46 +5,46 @@ #include "hack.h" -STATIC_DCL int FDECL(use_camera, (struct obj *)); -STATIC_DCL int FDECL(use_towel, (struct obj *)); -STATIC_DCL boolean FDECL(its_dead, (int, int, int *)); -STATIC_DCL int FDECL(use_stethoscope, (struct obj *)); -STATIC_DCL void FDECL(use_whistle, (struct obj *)); -STATIC_DCL void FDECL(use_magic_whistle, (struct obj *)); -STATIC_DCL int FDECL(use_leash, (struct obj *)); -STATIC_DCL int FDECL(use_mirror, (struct obj *)); -STATIC_DCL void FDECL(use_bell, (struct obj **)); -STATIC_DCL void FDECL(use_candelabrum, (struct obj *)); -STATIC_DCL void FDECL(use_candle, (struct obj **)); -STATIC_DCL void FDECL(use_lamp, (struct obj *)); -STATIC_DCL void FDECL(light_cocktail, (struct obj **)); -STATIC_PTR void FDECL(display_jump_positions, (int)); -STATIC_DCL void FDECL(use_tinning_kit, (struct obj *)); -STATIC_DCL void FDECL(use_figurine, (struct obj **)); -STATIC_DCL void FDECL(use_grease, (struct obj *)); -STATIC_DCL void FDECL(use_trap, (struct obj *)); -STATIC_DCL void FDECL(use_stone, (struct obj *)); -STATIC_PTR int NDECL(set_trap); /* occupation callback */ -STATIC_DCL int FDECL(use_whip, (struct obj *)); -STATIC_PTR void FDECL(display_polearm_positions, (int)); -STATIC_DCL int FDECL(use_pole, (struct obj *)); -STATIC_DCL int FDECL(use_cream_pie, (struct obj *)); -STATIC_DCL int FDECL(use_grapple, (struct obj *)); -STATIC_DCL int FDECL(do_break_wand, (struct obj *)); -STATIC_DCL boolean FDECL(figurine_location_checks, (struct obj *, +static int FDECL(use_camera, (struct obj *)); +static int FDECL(use_towel, (struct obj *)); +static boolean FDECL(its_dead, (int, int, int *)); +static int FDECL(use_stethoscope, (struct obj *)); +static void FDECL(use_whistle, (struct obj *)); +static void FDECL(use_magic_whistle, (struct obj *)); +static int FDECL(use_leash, (struct obj *)); +static int FDECL(use_mirror, (struct obj *)); +static void FDECL(use_bell, (struct obj **)); +static void FDECL(use_candelabrum, (struct obj *)); +static void FDECL(use_candle, (struct obj **)); +static void FDECL(use_lamp, (struct obj *)); +static void FDECL(light_cocktail, (struct obj **)); +static void FDECL(display_jump_positions, (int)); +static void FDECL(use_tinning_kit, (struct obj *)); +static void FDECL(use_figurine, (struct obj **)); +static void FDECL(use_grease, (struct obj *)); +static void FDECL(use_trap, (struct obj *)); +static void FDECL(use_stone, (struct obj *)); +static int NDECL(set_trap); /* occupation callback */ +static int FDECL(use_whip, (struct obj *)); +static void FDECL(display_polearm_positions, (int)); +static int FDECL(use_pole, (struct obj *)); +static int FDECL(use_cream_pie, (struct obj *)); +static int FDECL(use_grapple, (struct obj *)); +static int FDECL(do_break_wand, (struct obj *)); +static boolean FDECL(figurine_location_checks, (struct obj *, coord *, BOOLEAN_P)); -STATIC_DCL void FDECL(add_class, (char *, CHAR_P)); -STATIC_DCL void FDECL(setapplyclasses, (char *)); -STATIC_PTR boolean FDECL(check_jump, (genericptr_t, int, int)); -STATIC_DCL boolean FDECL(is_valid_jump_pos, (int, int, int, BOOLEAN_P)); -STATIC_DCL boolean FDECL(get_valid_jump_position, (int, int)); -STATIC_DCL boolean FDECL(get_valid_polearm_position, (int, int)); -STATIC_DCL boolean FDECL(find_poleable_mon, (coord *, int, int)); +static void FDECL(add_class, (char *, CHAR_P)); +static void FDECL(setapplyclasses, (char *)); +static boolean FDECL(check_jump, (genericptr_t, int, int)); +static boolean FDECL(is_valid_jump_pos, (int, int, int, BOOLEAN_P)); +static boolean FDECL(get_valid_jump_position, (int, int)); +static boolean FDECL(get_valid_polearm_position, (int, int)); +static boolean FDECL(find_poleable_mon, (coord *, int, int)); static const char no_elbow_room[] = "don't have enough elbow-room to maneuver."; -STATIC_OVL int +static int use_camera(obj) struct obj *obj; { @@ -82,7 +82,7 @@ struct obj *obj; return 1; } -STATIC_OVL int +static int use_towel(obj) struct obj *obj; { @@ -168,7 +168,7 @@ struct obj *obj; } /* maybe give a stethoscope message based on floor objects */ -STATIC_OVL boolean +static boolean its_dead(rx, ry, resp) int rx, ry, *resp; { @@ -290,7 +290,7 @@ static const char hollow_str[] = "a hollow sound. This must be a secret %s!"; not take any time; however, unless it did, the stethoscope would be almost useless. As a compromise, one use per turn is free, another uses up the turn; this makes curse status have a tangible effect. */ -STATIC_OVL int +static int use_stethoscope(obj) register struct obj *obj; { @@ -425,7 +425,7 @@ register struct obj *obj; static const char whistle_str[] = "produce a %s whistling sound."; -STATIC_OVL void +static void use_whistle(obj) struct obj *obj; { @@ -445,7 +445,7 @@ struct obj *obj; } } -STATIC_OVL void +static void use_magic_whistle(obj) struct obj *obj; { @@ -578,7 +578,7 @@ struct monst *mtmp; } /* ARGSUSED */ -STATIC_OVL int +static int use_leash(obj) struct obj *obj; { @@ -802,7 +802,7 @@ beautiful() static const char look_str[] = "look %s."; -STATIC_OVL int +static int use_mirror(obj) struct obj *obj; { @@ -982,7 +982,7 @@ struct obj *obj; return 1; } -STATIC_OVL void +static void use_bell(optr) struct obj **optr; { @@ -1099,7 +1099,7 @@ struct obj **optr; wake_nearby(); } -STATIC_OVL void +static void use_candelabrum(obj) register struct obj *obj; { @@ -1152,7 +1152,7 @@ register struct obj *obj; begin_burn(obj, FALSE); } -STATIC_OVL void +static void use_candle(optr) struct obj **optr; { @@ -1309,7 +1309,7 @@ struct obj *obj; return FALSE; } -STATIC_OVL void +static void use_lamp(obj) struct obj *obj; { @@ -1362,7 +1362,7 @@ struct obj *obj; } } -STATIC_OVL void +static void light_cocktail(optr) struct obj **optr; { @@ -1485,7 +1485,7 @@ enum jump_trajectory { }; /* callback routine for walk_path() */ -STATIC_PTR boolean +static boolean check_jump(arg, x, y) genericptr arg; int x, y; @@ -1518,7 +1518,7 @@ int x, y; return TRUE; } -STATIC_OVL boolean +static boolean is_valid_jump_pos(x, y, magic, showmsg) int x, y, magic; boolean showmsg; @@ -1586,7 +1586,7 @@ boolean showmsg; return TRUE; } -STATIC_OVL boolean +static boolean get_valid_jump_position(x,y) int x,y; { @@ -1595,7 +1595,7 @@ int x,y; && is_valid_jump_pos(x, y, g.jumping_is_magic, FALSE)); } -STATIC_OVL void +static void display_jump_positions(state) int state; { @@ -1792,7 +1792,7 @@ struct obj *corpse; return 1; } -STATIC_OVL void +static void use_tinning_kit(obj) struct obj *obj; { @@ -2168,7 +2168,7 @@ long timeout; newsym(cc.x, cc.y); } -STATIC_OVL boolean +static boolean figurine_location_checks(obj, cc, quietly) struct obj *obj; coord *cc; @@ -2204,7 +2204,7 @@ boolean quietly; return TRUE; } -STATIC_OVL void +static void use_figurine(optr) struct obj **optr; { @@ -2246,7 +2246,7 @@ struct obj **optr; static NEARDATA const char lubricables[] = { ALL_CLASSES, ALLOW_NONE, 0 }; -STATIC_OVL void +static void use_grease(obj) struct obj *obj; { @@ -2297,7 +2297,7 @@ struct obj *obj; } /* touchstones - by Ken Arnold */ -STATIC_OVL void +static void use_stone(tstone) struct obj *tstone; { @@ -2433,7 +2433,7 @@ reset_trapset() } /* Place a landmine/bear trap. Helge Hafting */ -STATIC_OVL void +static void use_trap(otmp) struct obj *otmp; { @@ -2533,8 +2533,7 @@ struct obj *otmp; return; } -STATIC_PTR -int +static int set_trap() { struct obj *otmp = g.trapinfo.tobj; @@ -2575,7 +2574,7 @@ set_trap() return 0; } -STATIC_OVL int +static int use_whip(obj) struct obj *obj; { @@ -2848,7 +2847,7 @@ static const char cant_reach[] = "can't reach that spot from here."; /* find pos of monster in range, if only one monster */ -STATIC_OVL boolean +static boolean find_poleable_mon(pos, min_range, max_range) coord *pos; int min_range, max_range; @@ -2892,7 +2891,7 @@ int min_range, max_range; return TRUE; } -STATIC_OVL boolean +static boolean get_valid_polearm_position(x, y) int x, y; { @@ -2901,7 +2900,7 @@ int x, y; && distu(x, y) <= g.polearm_range_max); } -STATIC_OVL void +static void display_polearm_positions(state) int state; { @@ -2924,7 +2923,7 @@ int state; } /* Distance attacks by pole-weapons */ -STATIC_OVL int +static int use_pole(obj) struct obj *obj; { @@ -3041,7 +3040,7 @@ struct obj *obj; return 1; } -STATIC_OVL int +static int use_cream_pie(obj) struct obj *obj; { @@ -3079,7 +3078,7 @@ struct obj *obj; return 0; } -STATIC_OVL int +static int use_grapple(obj) struct obj *obj; { @@ -3229,7 +3228,7 @@ struct obj *obj; #define BY_OBJECT ((struct monst *) 0) /* return 1 if the wand is broken, hence some time elapsed */ -STATIC_OVL int +static int do_break_wand(obj) struct obj *obj; { @@ -3454,7 +3453,7 @@ discard_broken_wand: return 1; } -STATIC_OVL void +static void add_class(cl, class) char *cl; char class; @@ -3469,7 +3468,7 @@ char class; static const char tools[] = { TOOL_CLASS, WEAPON_CLASS, WAND_CLASS, 0 }; /* augment tools[] if various items are carried */ -STATIC_OVL void +static void setapplyclasses(class_list) char class_list[]; { diff --git a/src/artifact.c b/src/artifact.c index 03df78062..966ab70ca 100644 --- a/src/artifact.c +++ b/src/artifact.c @@ -19,17 +19,17 @@ #define get_artifact(o) \ (((o) && (o)->oartifact) ? &artilist[(int) (o)->oartifact] : 0) -STATIC_DCL boolean FDECL(bane_applies, (const struct artifact *, +static boolean FDECL(bane_applies, (const struct artifact *, struct monst *)); -STATIC_DCL int FDECL(spec_applies, (const struct artifact *, struct monst *)); -STATIC_DCL int FDECL(arti_invoke, (struct obj *)); -STATIC_DCL boolean FDECL(Mb_hit, (struct monst * magr, struct monst *mdef, +static int FDECL(spec_applies, (const struct artifact *, struct monst *)); +static int FDECL(arti_invoke, (struct obj *)); +static boolean FDECL(Mb_hit, (struct monst * magr, struct monst *mdef, struct obj *, int *, int, BOOLEAN_P, char *)); -STATIC_DCL unsigned long FDECL(abil_to_spfx, (long *)); -STATIC_DCL uchar FDECL(abil_to_adtyp, (long *)); -STATIC_DCL int FDECL(glow_strength, (int)); -STATIC_DCL boolean FDECL(untouchable, (struct obj *, BOOLEAN_P)); -STATIC_DCL int FDECL(count_surround_traps, (int, int)); +static unsigned long FDECL(abil_to_spfx, (long *)); +static uchar FDECL(abil_to_adtyp, (long *)); +static int FDECL(glow_strength, (int)); +static boolean FDECL(untouchable, (struct obj *, BOOLEAN_P)); +static int FDECL(count_surround_traps, (int, int)); /* The amount added to the victim's total hit points to insure that the victim will be killed even after damage bonus/penalty adjustments. @@ -41,11 +41,11 @@ STATIC_DCL int FDECL(count_surround_traps, (int, int)); of hit points that will fit in a 15 bit integer. */ #define FATAL_DAMAGE_MODIFIER 200 -STATIC_DCL void NDECL(hack_artifacts); -STATIC_DCL boolean FDECL(attacks, (int, struct obj *)); +static void NDECL(hack_artifacts); +static boolean FDECL(attacks, (int, struct obj *)); /* handle some special cases; must be called after u_init() */ -STATIC_OVL void +static void hack_artifacts() { struct artifact *art; @@ -418,7 +418,7 @@ const char *name; return FALSE; } -STATIC_OVL boolean +static boolean attacks(adtyp, otmp) int adtyp; struct obj *otmp; @@ -649,7 +649,7 @@ long wp_mask; /* touch_artifact()'s return value isn't sufficient to tell whether it dished out damage, and tracking changes to u.uhp, u.mh, Lifesaved when trying to avoid second wounding is too cumbersome */ -STATIC_VAR boolean touch_blasted; /* for retouch_object() */ +static boolean touch_blasted; /* for retouch_object() */ /* * creature (usually hero) tries to touch (pick up or wield) an artifact obj. @@ -747,7 +747,7 @@ int dtyp; || weap->cary.adtyp == dtyp); } -STATIC_OVL boolean +static boolean bane_applies(oart, mon) const struct artifact *oart; struct monst *mon; @@ -764,7 +764,7 @@ struct monst *mon; } /* decide whether an artifact's special attacks apply against mtmp */ -STATIC_OVL int +static int spec_applies(weap, mtmp) register const struct artifact *weap; struct monst *mtmp; @@ -973,7 +973,7 @@ static const char *const mb_verb[2][NUM_MB_INDICES] = { }; /* called when someone is being hit by Magicbane */ -STATIC_OVL boolean +static boolean Mb_hit(magr, mdef, mb, dmgptr, dieroll, vis, hittee) struct monst *magr, *mdef; /* attacker and defender */ struct obj *mb; /* Magicbane */ @@ -1427,7 +1427,7 @@ doinvoke() return arti_invoke(obj); } -STATIC_OVL int +static int arti_invoke(obj) struct obj *obj; { @@ -1752,7 +1752,7 @@ struct obj *otmp; return (100L * (long) objects[otmp->otyp].oc_cost); } -STATIC_OVL uchar +static uchar abil_to_adtyp(abil) long *abil; { @@ -1777,7 +1777,7 @@ long *abil; return 0; } -STATIC_OVL unsigned long +static unsigned long abil_to_spfx(abil) long *abil; { @@ -1874,7 +1874,7 @@ static const char *glow_verbs[] = { }; /* relative strength that Sting is glowing (0..3), to select verb */ -STATIC_OVL int +static int glow_strength(count) int count; { @@ -2007,7 +2007,7 @@ boolean loseit; /* whether to drop it if hero can longer touch it */ something via being carried or which has an #invoke effect currently in operation undergoes a touch test; if it fails, it will be unworn/unwielded and revoked but not dropped */ -STATIC_OVL boolean +static boolean untouchable(obj, drop_untouchable) struct obj *obj; boolean drop_untouchable; @@ -2114,7 +2114,7 @@ int dropflag; /* 0==don't drop, 1==drop all, 2==drop weapon */ clear_bypasses(); /* reset upon final exit */ } -STATIC_OVL int +static int count_surround_traps(x, y) int x, y; { diff --git a/src/attrib.c b/src/attrib.c index b37c6320a..a50d93eb0 100644 --- a/src/attrib.c +++ b/src/attrib.c @@ -103,11 +103,11 @@ static const struct innate { hum_abil[] = { { 0, 0, 0, 0 } }; -STATIC_DCL void NDECL(exerper); -STATIC_DCL void FDECL(postadjabil, (long *)); -STATIC_DCL const struct innate *FDECL(role_abil, (int)); -STATIC_DCL const struct innate *FDECL(check_innate_abil, (long *, long)); -STATIC_DCL int FDECL(innately, (long *)); +static void NDECL(exerper); +static void FDECL(postadjabil, (long *)); +static const struct innate *FDECL(role_abil, (int)); +static const struct innate *FDECL(check_innate_abil, (long *, long)); +static int FDECL(innately, (long *)); /* adjust an attribute; return TRUE if change is made, FALSE otherwise */ boolean @@ -443,7 +443,7 @@ boolean inc_or_dec; (void) encumber_msg(); } -STATIC_OVL void +static void exerper() { if (!(g.moves % 10)) { @@ -683,7 +683,7 @@ redist_attr() (void) encumber_msg(); } -STATIC_OVL +static void postadjabil(ability) long *ability; @@ -694,7 +694,7 @@ long *ability; see_monsters(); } -STATIC_OVL const struct innate * +static const struct innate * role_abil(r) int r; { @@ -724,7 +724,7 @@ int r; return roleabils[i].abil; } -STATIC_OVL const struct innate * +static const struct innate * check_innate_abil(ability, frommask) long *ability; long frommask; @@ -772,7 +772,7 @@ long frommask; #define FROM_LYCN 6 /* check whether particular ability has been obtained via innate attribute */ -STATIC_OVL int +static int innately(ability) long *ability; { diff --git a/src/ball.c b/src/ball.c index 77fa5ecf0..e7ab564d4 100644 --- a/src/ball.c +++ b/src/ball.c @@ -8,11 +8,11 @@ #include "hack.h" -STATIC_DCL int NDECL(bc_order); -STATIC_DCL void NDECL(litter); -STATIC_OVL void NDECL(placebc_core); -STATIC_OVL void NDECL(unplacebc_core); -STATIC_DCL boolean FDECL(check_restriction, (int)); +static int NDECL(bc_order); +static void NDECL(litter); +static void NDECL(placebc_core); +static void NDECL(unplacebc_core); +static boolean FDECL(check_restriction, (int)); static int bcrestriction = 0; #ifdef BREADCRUMBS @@ -114,7 +114,7 @@ ballfall() * * Should not be called while swallowed except on waterlevel. */ -STATIC_OVL void +static void placebc_core() { if (!uchain || !uball) { @@ -141,7 +141,7 @@ placebc_core() bcrestriction = 0; } -STATIC_OVL void +static void unplacebc_core() { if (u.uswallow) { @@ -173,7 +173,7 @@ unplacebc_core() u.bc_felt = 0; /* feel nothing */ } -STATIC_OVL boolean +static boolean check_restriction(restriction) int restriction; { @@ -362,7 +362,7 @@ int linenum; * Return the stacking of the hero's ball & chain. This assumes that the * hero is being punished. */ -STATIC_OVL int +static int bc_order() { struct obj *obj; @@ -977,7 +977,7 @@ xchar x, y; } /* ball&chain cause hero to randomly lose stuff from inventory */ -STATIC_OVL void +static void litter() { struct obj *otmp, *nextobj = 0; diff --git a/src/bones.c b/src/bones.c index 0d9e28b37..0359b386e 100644 --- a/src/bones.c +++ b/src/bones.c @@ -12,12 +12,12 @@ extern long bytes_counted; #endif -STATIC_DCL boolean FDECL(no_bones_level, (d_level *)); -STATIC_DCL void FDECL(goodfruit, (int)); -STATIC_DCL void FDECL(resetobjs, (struct obj *, BOOLEAN_P)); -STATIC_DCL boolean FDECL(fixuporacle, (struct monst *)); +static boolean FDECL(no_bones_level, (d_level *)); +static void FDECL(goodfruit, (int)); +static void FDECL(resetobjs, (struct obj *, BOOLEAN_P)); +static boolean FDECL(fixuporacle, (struct monst *)); -STATIC_OVL boolean +static boolean no_bones_level(lev) d_level *lev; { @@ -42,7 +42,7 @@ d_level *lev; * ID is positive instead of negative). This way, when we later save the * chain of fruit types, we know to only save the types that exist. */ -STATIC_OVL void +static void goodfruit(id) int id; { @@ -52,7 +52,7 @@ int id; f->fid = id; } -STATIC_OVL void +static void resetobjs(ochain, restore) struct obj *ochain; boolean restore; @@ -252,7 +252,7 @@ int x, y; /* possibly restore oracle's room and/or put her back inside it; returns False if she's on the wrong level and should be removed, True otherwise */ -STATIC_OVL boolean +static boolean fixuporacle(oracle) struct monst *oracle; { diff --git a/src/botl.c b/src/botl.c index 79601bbbe..5dd6747a4 100644 --- a/src/botl.c +++ b/src/botl.c @@ -13,9 +13,9 @@ extern const char *hu_stat[]; /* defined in eat.c */ const char *const enc_stat[] = { "", "Burdened", "Stressed", "Strained", "Overtaxed", "Overloaded" }; -STATIC_DCL const char *NDECL(rank); -STATIC_DCL void NDECL(bot_via_windowport); -STATIC_DCL void NDECL(stat_update_time); +static const char *NDECL(rank); +static void NDECL(bot_via_windowport); +static void NDECL(stat_update_time); static char * get_strength_str() @@ -309,7 +309,7 @@ boolean female; return "Player"; } -STATIC_OVL const char * +static const char * rank() { return rank_of(u.ulevel, Role_switch, flags.female); @@ -414,49 +414,49 @@ char *buf; #ifdef STATUS_HILITES #endif /* STATUS_HILITES */ -STATIC_DCL boolean FDECL(eval_notify_windowport_field, (int, boolean *, int)); -STATIC_DCL void FDECL(evaluate_and_notify_windowport, (boolean *, int)); -STATIC_DCL void NDECL(init_blstats); -STATIC_DCL int FDECL(compare_blstats, (struct istat_s *, struct istat_s *)); -STATIC_DCL char *FDECL(anything_to_s, (char *, anything *, int)); -STATIC_DCL int FDECL(percentage, (struct istat_s *, struct istat_s *)); -STATIC_DCL int NDECL(exp_percentage); +static boolean FDECL(eval_notify_windowport_field, (int, boolean *, int)); +static void FDECL(evaluate_and_notify_windowport, (boolean *, int)); +static void NDECL(init_blstats); +static int FDECL(compare_blstats, (struct istat_s *, struct istat_s *)); +static char *FDECL(anything_to_s, (char *, anything *, int)); +static int FDECL(percentage, (struct istat_s *, struct istat_s *)); +static int NDECL(exp_percentage); #ifdef STATUS_HILITES -STATIC_DCL void FDECL(s_to_anything, (anything *, char *, int)); -STATIC_DCL enum statusfields FDECL(fldname_to_bl_indx, (const char *)); -STATIC_DCL boolean FDECL(hilite_reset_needed, (struct istat_s *, long)); -STATIC_DCL boolean FDECL(noneoftheabove, (const char *)); -STATIC_DCL struct hilite_s *FDECL(get_hilite, (int, int, genericptr_t, +static void FDECL(s_to_anything, (anything *, char *, int)); +static enum statusfields FDECL(fldname_to_bl_indx, (const char *)); +static boolean FDECL(hilite_reset_needed, (struct istat_s *, long)); +static boolean FDECL(noneoftheabove, (const char *)); +static struct hilite_s *FDECL(get_hilite, (int, int, genericptr_t, int, int, int *)); -STATIC_DCL void FDECL(split_clridx, (int, int *, int *)); -STATIC_DCL boolean FDECL(is_ltgt_percentnumber, (const char *)); -STATIC_DCL boolean FDECL(has_ltgt_percentnumber, (const char *)); -STATIC_DCL int FDECL(splitsubfields, (char *, char ***, int)); -STATIC_DCL boolean FDECL(is_fld_arrayvalues, (const char *, +static void FDECL(split_clridx, (int, int *, int *)); +static boolean FDECL(is_ltgt_percentnumber, (const char *)); +static boolean FDECL(has_ltgt_percentnumber, (const char *)); +static int FDECL(splitsubfields, (char *, char ***, int)); +static boolean FDECL(is_fld_arrayvalues, (const char *, const char *const *, int, int, int *)); -STATIC_DCL int FDECL(query_arrayvalue, (const char *, const char *const *, +static int FDECL(query_arrayvalue, (const char *, const char *const *, int, int)); -STATIC_DCL void FDECL(status_hilite_add_threshold, (int, struct hilite_s *)); -STATIC_DCL boolean FDECL(parse_status_hl2, (char (*)[QBUFSZ], BOOLEAN_P)); -STATIC_DCL char *FDECL(conditionbitmask2str, (unsigned long)); -STATIC_DCL unsigned long FDECL(match_str2conditionbitmask, (const char *)); -STATIC_DCL unsigned long FDECL(str2conditionbitmask, (char *)); -STATIC_DCL boolean FDECL(parse_condition, (char (*)[QBUFSZ], int)); -STATIC_DCL char *FDECL(hlattr2attrname, (int, char *, int)); -STATIC_DCL void FDECL(status_hilite_linestr_add, (int, struct hilite_s *, +static void FDECL(status_hilite_add_threshold, (int, struct hilite_s *)); +static boolean FDECL(parse_status_hl2, (char (*)[QBUFSZ], BOOLEAN_P)); +static char *FDECL(conditionbitmask2str, (unsigned long)); +static unsigned long FDECL(match_str2conditionbitmask, (const char *)); +static unsigned long FDECL(str2conditionbitmask, (char *)); +static boolean FDECL(parse_condition, (char (*)[QBUFSZ], int)); +static char *FDECL(hlattr2attrname, (int, char *, int)); +static void FDECL(status_hilite_linestr_add, (int, struct hilite_s *, unsigned long, const char *)); -STATIC_DCL void NDECL(status_hilite_linestr_done); -STATIC_DCL int FDECL(status_hilite_linestr_countfield, (int)); -STATIC_DCL void NDECL(status_hilite_linestr_gather_conditions); -STATIC_DCL void NDECL(status_hilite_linestr_gather); -STATIC_DCL char *FDECL(status_hilite2str, (struct hilite_s *)); -STATIC_DCL int NDECL(status_hilite_menu_choose_field); -STATIC_DCL int FDECL(status_hilite_menu_choose_behavior, (int)); -STATIC_DCL int FDECL(status_hilite_menu_choose_updownboth, (int, const char *, +static void NDECL(status_hilite_linestr_done); +static int FDECL(status_hilite_linestr_countfield, (int)); +static void NDECL(status_hilite_linestr_gather_conditions); +static void NDECL(status_hilite_linestr_gather); +static char *FDECL(status_hilite2str, (struct hilite_s *)); +static int NDECL(status_hilite_menu_choose_field); +static int FDECL(status_hilite_menu_choose_behavior, (int)); +static int FDECL(status_hilite_menu_choose_updownboth, (int, const char *, BOOLEAN_P, BOOLEAN_P)); -STATIC_DCL boolean FDECL(status_hilite_menu_add, (int)); +static boolean FDECL(status_hilite_menu_add, (int)); #define has_hilite(i) (g.blstats[0][(i)].thresholds) /* TH_UPDOWN encompasses specific 'up' and 'down' also general 'changed' */ #define Is_Temp_Hilite(rule) ((rule) && (rule)->behavior == BL_TH_UPDOWN) @@ -479,7 +479,7 @@ STATIC_DCL boolean FDECL(status_hilite_menu_add, (int)); /* If entries are added to this, botl.h will require updating too. 'max' value of BL_EXP gets special handling since the percentage involved isn't a direct 100*current/maximum calculation. */ -STATIC_VAR struct istat_s initblstats[MAXBLSTATS] = { +static struct istat_s initblstats[MAXBLSTATS] = { INIT_BLSTAT("title", "%s", ANY_STR, MAXVALWIDTH, BL_TITLE), INIT_BLSTAT("strength", " St:%s", ANY_INT, 10, BL_STR), INIT_BLSTAT("dexterity", " Dx:%s", ANY_INT, 10, BL_DX), @@ -520,7 +520,7 @@ STATIC_VAR struct istat_s initblstats[MAXBLSTATS] = { * without STATUS_HILITES. */ -STATIC_OVL void +static void bot_via_windowport() { char buf[BUFSZ]; @@ -702,7 +702,7 @@ bot_via_windowport() } /* update just the status lines' 'time' field */ -STATIC_OVL void +static void stat_update_time() { int idx = g.now_or_before_idx; /* no 0/1 toggle */ @@ -719,7 +719,7 @@ stat_update_time() return; } -STATIC_OVL boolean +static boolean eval_notify_windowport_field(fld, valsetlist, idx) int fld, idx; boolean *valsetlist; @@ -832,7 +832,7 @@ boolean *valsetlist; return updated; } -STATIC_OVL void +static void evaluate_and_notify_windowport(valsetlist, idx) int idx; boolean *valsetlist; @@ -957,7 +957,7 @@ status_finish() } } -STATIC_OVL void +static void init_blstats() { static boolean initalready = FALSE; @@ -1006,7 +1006,7 @@ init_blstats() * - for strings, 0 = stayed the same, 1 = changed * */ -STATIC_OVL int +static int compare_blstats(bl1, bl2) struct istat_s *bl1, *bl2; { @@ -1079,7 +1079,7 @@ struct istat_s *bl1, *bl2; return result; } -STATIC_OVL char * +static char * anything_to_s(buf, a, anytype) char *buf; anything *a; @@ -1126,7 +1126,7 @@ int anytype; } #ifdef STATUS_HILITES -STATIC_OVL void +static void s_to_anything(a, buf, anytype) anything *a; char *buf; @@ -1175,7 +1175,7 @@ int anytype; } #endif /* STATUS_HILITES */ -STATIC_OVL int +static int percentage(bl, maxbl) struct istat_s *bl, *maxbl; { @@ -1242,7 +1242,7 @@ struct istat_s *bl, *maxbl; /* percentage for both xp (level) and exp (points) is the percentage for (curr_exp - this_level_start) in (next_level_start - this_level_start) */ -STATIC_OVL int +static int exp_percentage() { int res = 0; @@ -1390,7 +1390,7 @@ static const char threshold_value[] = "hilite_status threshold ", /* field name to bottom line index */ -STATIC_OVL enum statusfields +static enum statusfields fldname_to_bl_indx(name) const char *name; { @@ -1429,7 +1429,7 @@ const char *name; return (nmatches == 1) ? fld : BL_FLUSH; } -STATIC_OVL boolean +static boolean hilite_reset_needed(bl_p, augmented_time) struct istat_s *bl_p; long augmented_time; /* no longer augmented; it once encoded fractional @@ -1507,7 +1507,7 @@ reset_status_hilites() /* test whether the text from a title rule matches the string for title-while-polymorphed in the 'textmatch' menu */ -STATIC_OVL boolean +static boolean noneoftheabove(hl_text) const char *hl_text; { @@ -1536,7 +1536,7 @@ const char *hl_text; * Get back: * pointer to rule that applies; Null if no rule does. */ -STATIC_OVL struct hilite_s * +static struct hilite_s * get_hilite(idx, fldidx, vp, chg, pc, colorptr) int idx, fldidx, chg, pc; genericptr_t vp; @@ -1728,7 +1728,7 @@ int *colorptr; return rule; } -STATIC_OVL void +static void split_clridx(idx, coloridx, attrib) int idx; int *coloridx, *attrib; @@ -1804,7 +1804,7 @@ boolean from_configfile; } /* is str in the format of "[<>]?=?[-+]?[0-9]+%?" regex */ -STATIC_OVL boolean +static boolean is_ltgt_percentnumber(str) const char *str; { @@ -1826,7 +1826,7 @@ const char *str; } /* does str only contain "<>=-+0-9%" chars */ -STATIC_OVL boolean +static boolean has_ltgt_percentnumber(str) const char *str; { @@ -1844,7 +1844,7 @@ const char *str; * returns number of strings, or -1 if more than maxsf or MAX_SUBFIELDS */ #define MAX_SUBFIELDS 16 -STATIC_OVL int +static int splitsubfields(str, sfarr, maxsf) char *str; char ***sfarr; @@ -1888,7 +1888,7 @@ int maxsf; } #undef MAX_SUBFIELDS -STATIC_OVL boolean +static boolean is_fld_arrayvalues(str, arr, arrmin, arrmax, retidx) const char *str; const char *const *arr; @@ -1905,7 +1905,7 @@ int *retidx; return FALSE; } -STATIC_OVL int +static int query_arrayvalue(querystr, arr, arrmin, arrmax) const char *querystr; const char *const *arr; @@ -1939,7 +1939,7 @@ int arrmin, arrmax; return ret; } -STATIC_OVL void +static void status_hilite_add_threshold(fld, hilite) int fld; struct hilite_s *hilite; @@ -1964,7 +1964,7 @@ struct hilite_s *hilite; } -STATIC_OVL boolean +static boolean parse_status_hl2(s, from_configfile) char (*s)[QBUFSZ]; boolean from_configfile; @@ -2314,7 +2314,7 @@ query_conditions() return ret; } -STATIC_OVL char * +static char * conditionbitmask2str(ul) unsigned long ul; { @@ -2345,7 +2345,7 @@ unsigned long ul; return buf; } -STATIC_OVL unsigned long +static unsigned long match_str2conditionbitmask(str) const char *str; { @@ -2384,7 +2384,7 @@ const char *str; return mask; } -STATIC_OVL unsigned long +static unsigned long str2conditionbitmask(str) char *str; { @@ -2409,7 +2409,7 @@ char *str; return conditions_bitmask; } -STATIC_OVL boolean +static boolean parse_condition(s, sidx) char (*s)[QBUFSZ]; int sidx; @@ -2550,7 +2550,7 @@ clear_status_hilites() } } -STATIC_OVL char * +static char * hlattr2attrname(attrib, buf, bufsz) int attrib, bufsz; char *buf; @@ -2597,7 +2597,7 @@ struct _status_hilite_line_str { static struct _status_hilite_line_str *status_hilite_str = 0; static int status_hilite_str_id = 0; -STATIC_OVL void +static void status_hilite_linestr_add(fld, hl, mask, str) int fld; struct hilite_s *hl; @@ -2628,7 +2628,7 @@ const char *str; } } -STATIC_OVL void +static void status_hilite_linestr_done() { struct _status_hilite_line_str *nxt, *tmp = status_hilite_str; @@ -2642,7 +2642,7 @@ status_hilite_linestr_done() status_hilite_str_id = 0; } -STATIC_OVL int +static int status_hilite_linestr_countfield(fld) int fld; { @@ -2669,7 +2669,7 @@ count_status_hilites(VOID_ARGS) return count; } -STATIC_OVL void +static void status_hilite_linestr_gather_conditions() { int i; @@ -2749,7 +2749,7 @@ status_hilite_linestr_gather_conditions() } } -STATIC_OVL void +static void status_hilite_linestr_gather() { int i; @@ -2769,7 +2769,7 @@ status_hilite_linestr_gather() } -STATIC_OVL char * +static char * status_hilite2str(hl) struct hilite_s *hl; { @@ -2848,7 +2848,7 @@ struct hilite_s *hl; return buf; } -STATIC_OVL int +static int status_hilite_menu_choose_field() { winid tmpwin; @@ -2882,7 +2882,7 @@ status_hilite_menu_choose_field() return fld; } -STATIC_OVL int +static int status_hilite_menu_choose_behavior(fld) int fld; { @@ -2974,7 +2974,7 @@ int fld; return beh; } -STATIC_OVL int +static int status_hilite_menu_choose_updownboth(fld, str, ltok, gtok) int fld; const char *str; @@ -3052,7 +3052,7 @@ boolean ltok, gtok; return ret; } -STATIC_OVL boolean +static boolean status_hilite_menu_add(origfld) int origfld; { diff --git a/src/cmd.c b/src/cmd.c index e3206bda3..7fdfedd08 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -27,7 +27,7 @@ #define unmeta(c) (0x7f & (c)) #ifdef ALTMETA -STATIC_VAR boolean alt_esc = FALSE; +static boolean alt_esc = FALSE; #endif extern const char *hu_stat[]; /* hunger status from eat.c */ @@ -129,79 +129,79 @@ extern int NDECL(doorganize); /**/ static int NDECL((*timed_occ_fn)); -STATIC_PTR int NDECL(dosuspend_core); -STATIC_PTR int NDECL(dosh_core); -STATIC_PTR int NDECL(doherecmdmenu); -STATIC_PTR int NDECL(dotherecmdmenu); -STATIC_PTR int NDECL(doprev_message); -STATIC_PTR int NDECL(timed_occupation); -STATIC_PTR int NDECL(doextcmd); -STATIC_PTR int NDECL(dotravel); -STATIC_PTR int NDECL(doterrain); -STATIC_PTR int NDECL(wiz_wish); -STATIC_PTR int NDECL(wiz_identify); -STATIC_PTR int NDECL(wiz_intrinsic); -STATIC_PTR int NDECL(wiz_map); -STATIC_PTR int NDECL(wiz_makemap); -STATIC_PTR int NDECL(wiz_genesis); -STATIC_PTR int NDECL(wiz_where); -STATIC_PTR int NDECL(wiz_detect); -STATIC_PTR int NDECL(wiz_panic); -STATIC_PTR int NDECL(wiz_polyself); -STATIC_PTR int NDECL(wiz_level_tele); -STATIC_PTR int NDECL(wiz_level_change); -STATIC_PTR int NDECL(wiz_show_seenv); -STATIC_PTR int NDECL(wiz_show_vision); -STATIC_PTR int NDECL(wiz_smell); -STATIC_PTR int NDECL(wiz_intrinsic); -STATIC_PTR int NDECL(wiz_show_wmodes); -STATIC_DCL void NDECL(wiz_map_levltyp); -STATIC_DCL void NDECL(wiz_levltyp_legend); +static int NDECL(dosuspend_core); +static int NDECL(dosh_core); +static int NDECL(doherecmdmenu); +static int NDECL(dotherecmdmenu); +static int NDECL(doprev_message); +static int NDECL(timed_occupation); +static int NDECL(doextcmd); +static int NDECL(dotravel); +static int NDECL(doterrain); +static int NDECL(wiz_wish); +static int NDECL(wiz_identify); +static int NDECL(wiz_intrinsic); +static int NDECL(wiz_map); +static int NDECL(wiz_makemap); +static int NDECL(wiz_genesis); +static int NDECL(wiz_where); +static int NDECL(wiz_detect); +static int NDECL(wiz_panic); +static int NDECL(wiz_polyself); +static int NDECL(wiz_level_tele); +static int NDECL(wiz_level_change); +static int NDECL(wiz_show_seenv); +static int NDECL(wiz_show_vision); +static int NDECL(wiz_smell); +static int NDECL(wiz_intrinsic); +static int NDECL(wiz_show_wmodes); +static void NDECL(wiz_map_levltyp); +static void NDECL(wiz_levltyp_legend); #if defined(__BORLANDC__) && !defined(_WIN32) extern void FDECL(show_borlandc_stats, (winid)); #endif #ifdef DEBUG_MIGRATING_MONS -STATIC_PTR int NDECL(wiz_migrate_mons); +static int NDECL(wiz_migrate_mons); #endif -STATIC_DCL int FDECL(size_monst, (struct monst *, BOOLEAN_P)); -STATIC_DCL int FDECL(size_obj, (struct obj *)); -STATIC_DCL void FDECL(count_obj, (struct obj *, long *, long *, +static int FDECL(size_monst, (struct monst *, BOOLEAN_P)); +static int FDECL(size_obj, (struct obj *)); +static void FDECL(count_obj, (struct obj *, long *, long *, BOOLEAN_P, BOOLEAN_P)); -STATIC_DCL void FDECL(obj_chain, (winid, const char *, struct obj *, +static void FDECL(obj_chain, (winid, const char *, struct obj *, BOOLEAN_P, long *, long *)); -STATIC_DCL void FDECL(mon_invent_chain, (winid, const char *, struct monst *, +static void FDECL(mon_invent_chain, (winid, const char *, struct monst *, long *, long *)); -STATIC_DCL void FDECL(mon_chain, (winid, const char *, struct monst *, +static void FDECL(mon_chain, (winid, const char *, struct monst *, BOOLEAN_P, long *, long *)); -STATIC_DCL void FDECL(contained_stats, (winid, const char *, long *, long *)); -STATIC_DCL void FDECL(misc_stats, (winid, long *, long *)); -STATIC_PTR int NDECL(wiz_show_stats); -STATIC_DCL boolean FDECL(accept_menu_prefix, (int NDECL((*)))); -STATIC_PTR int NDECL(wiz_rumor_check); -STATIC_PTR int NDECL(doattributes); +static void FDECL(contained_stats, (winid, const char *, long *, long *)); +static void FDECL(misc_stats, (winid, long *, long *)); +static int NDECL(wiz_show_stats); +static boolean FDECL(accept_menu_prefix, (int NDECL((*)))); +static int NDECL(wiz_rumor_check); +static int NDECL(doattributes); -STATIC_DCL void FDECL(enlght_out, (const char *)); -STATIC_DCL void FDECL(enlght_line, (const char *, const char *, const char *, +static void FDECL(enlght_out, (const char *)); +static void FDECL(enlght_line, (const char *, const char *, const char *, const char *)); -STATIC_DCL char *FDECL(enlght_combatinc, (const char *, int, int, char *)); -STATIC_DCL void FDECL(enlght_halfdmg, (int, int)); -STATIC_DCL boolean NDECL(walking_on_water); -STATIC_DCL boolean FDECL(cause_known, (int)); -STATIC_DCL char *FDECL(attrval, (int, int, char *)); -STATIC_DCL void FDECL(background_enlightenment, (int, int)); -STATIC_DCL void FDECL(basics_enlightenment, (int, int)); -STATIC_DCL void FDECL(characteristics_enlightenment, (int, int)); -STATIC_DCL void FDECL(one_characteristic, (int, int, int)); -STATIC_DCL void FDECL(status_enlightenment, (int, int)); -STATIC_DCL void FDECL(attributes_enlightenment, (int, int)); +static char *FDECL(enlght_combatinc, (const char *, int, int, char *)); +static void FDECL(enlght_halfdmg, (int, int)); +static boolean NDECL(walking_on_water); +static boolean FDECL(cause_known, (int)); +static char *FDECL(attrval, (int, int, char *)); +static void FDECL(background_enlightenment, (int, int)); +static void FDECL(basics_enlightenment, (int, int)); +static void FDECL(characteristics_enlightenment, (int, int)); +static void FDECL(one_characteristic, (int, int, int)); +static void FDECL(status_enlightenment, (int, int)); +static void FDECL(attributes_enlightenment, (int, int)); -STATIC_DCL void FDECL(add_herecmd_menuitem, (winid, int NDECL((*)), +static void FDECL(add_herecmd_menuitem, (winid, int NDECL((*)), const char *)); -STATIC_DCL char FDECL(here_cmd_menu, (BOOLEAN_P)); -STATIC_DCL char FDECL(there_cmd_menu, (BOOLEAN_P, int, int)); -STATIC_DCL char *NDECL(parse); -STATIC_DCL void FDECL(show_direction_keys, (winid, CHAR_P, BOOLEAN_P)); -STATIC_DCL boolean FDECL(help_dir, (CHAR_P, int, const char *)); +static char FDECL(here_cmd_menu, (BOOLEAN_P)); +static char FDECL(there_cmd_menu, (BOOLEAN_P, int, int)); +static char *NDECL(parse); +static void FDECL(show_direction_keys, (winid, CHAR_P, BOOLEAN_P)); +static boolean FDECL(help_dir, (CHAR_P, int, const char *)); static const char *readchar_queue = ""; /* for rejecting attempts to use wizard mode commands */ @@ -209,14 +209,14 @@ static const char unavailcmd[] = "Unavailable command '%s'."; /* for rejecting #if !SHELL, !SUSPEND */ static const char cmdnotavail[] = "'%s' command not available."; -STATIC_PTR int +static int doprev_message(VOID_ARGS) { return nh_doprev_message(); } /* Count down by decrementing multi */ -STATIC_PTR int +static int timed_occupation(VOID_ARGS) { (*timed_occ_fn)(); @@ -266,9 +266,9 @@ int xtime; return; } -STATIC_DCL char NDECL(popch); +static char NDECL(popch); -STATIC_OVL char +static char popch() { /* If occupied, return '\0', letting tgetch know a character should @@ -325,7 +325,7 @@ char ch; } /* here after # - now read a full-word command */ -STATIC_PTR int +static int doextcmd(VOID_ARGS) { int idx, retval; @@ -750,7 +750,7 @@ enter_explore_mode(VOID_ARGS) } /* ^W command - wish for something */ -STATIC_PTR int +static int wiz_wish(VOID_ARGS) /* Unlimited wishes for debug mode by Paul Polderman */ { if (wizard) { @@ -766,7 +766,7 @@ wiz_wish(VOID_ARGS) /* Unlimited wishes for debug mode by Paul Polderman */ } /* ^I command - reveal and optionally identify hero's inventory */ -STATIC_PTR int +static int wiz_identify(VOID_ARGS) { if (wizard) { @@ -786,7 +786,7 @@ wiz_identify(VOID_ARGS) } /* #wizmakemap - discard current dungeon level and replace with a new one */ -STATIC_PTR int +static int wiz_makemap(VOID_ARGS) { NHFILE tmpnhfp; @@ -877,7 +877,7 @@ wiz_makemap(VOID_ARGS) } /* ^F command - reveal the level map and any traps on it */ -STATIC_PTR int +static int wiz_map(VOID_ARGS) { if (wizard) { @@ -898,7 +898,7 @@ wiz_map(VOID_ARGS) } /* ^G command - generate monster(s); a count prefix will be honored */ -STATIC_PTR int +static int wiz_genesis(VOID_ARGS) { if (wizard) @@ -909,7 +909,7 @@ wiz_genesis(VOID_ARGS) } /* ^O command - display dungeon layout */ -STATIC_PTR int +static int wiz_where(VOID_ARGS) { if (wizard) @@ -920,7 +920,7 @@ wiz_where(VOID_ARGS) } /* ^E command - detect unseen (secret doors, traps, hidden monsters) */ -STATIC_PTR int +static int wiz_detect(VOID_ARGS) { if (wizard) @@ -931,7 +931,7 @@ wiz_detect(VOID_ARGS) } /* ^V command - level teleport */ -STATIC_PTR int +static int wiz_level_tele(VOID_ARGS) { if (wizard) @@ -942,7 +942,7 @@ wiz_level_tele(VOID_ARGS) } /* #levelchange command - adjust hero's experience level */ -STATIC_PTR int +static int wiz_level_change(VOID_ARGS) { char buf[BUFSZ] = DUMMY; @@ -986,7 +986,7 @@ wiz_level_change(VOID_ARGS) } /* #panic command - test program's panic handling */ -STATIC_PTR int +static int wiz_panic(VOID_ARGS) { if (iflags.debug_fuzzer) { @@ -1001,7 +1001,7 @@ wiz_panic(VOID_ARGS) } /* #polyself command - change hero's form */ -STATIC_PTR int +static int wiz_polyself(VOID_ARGS) { polyself(1); @@ -1009,7 +1009,7 @@ wiz_polyself(VOID_ARGS) } /* #seenv command */ -STATIC_PTR int +static int wiz_show_seenv(VOID_ARGS) { winid win; @@ -1053,7 +1053,7 @@ wiz_show_seenv(VOID_ARGS) } /* #vision command */ -STATIC_PTR int +static int wiz_show_vision(VOID_ARGS) { winid win; @@ -1091,7 +1091,7 @@ wiz_show_vision(VOID_ARGS) } /* #wmode command */ -STATIC_PTR int +static int wiz_show_wmodes(VOID_ARGS) { winid win; @@ -1127,7 +1127,7 @@ wiz_show_wmodes(VOID_ARGS) } /* wizard mode variant of #terrain; internal levl[][].typ values in base-36 */ -STATIC_OVL void +static void wiz_map_levltyp(VOID_ARGS) { winid win; @@ -1290,7 +1290,7 @@ static const char *levltyp[] = { }; /* explanation of base-36 output from wiz_map_levltyp() */ -STATIC_OVL void +static void wiz_levltyp_legend(VOID_ARGS) { winid win; @@ -1330,7 +1330,7 @@ wiz_levltyp_legend(VOID_ARGS) } /* #wizsmell command - test usmellmon(). */ -STATIC_PTR int +static int wiz_smell(VOID_ARGS) { int ans = 0; @@ -1370,7 +1370,7 @@ wiz_smell(VOID_ARGS) } /* #wizinstrinsic command to set some intrinsics for testing */ -STATIC_PTR int +static int wiz_intrinsic(VOID_ARGS) { if (wizard) { @@ -1498,7 +1498,7 @@ wiz_intrinsic(VOID_ARGS) } /* #wizrumorcheck command - verify each rumor access */ -STATIC_PTR int +static int wiz_rumor_check(VOID_ARGS) { rumor_check(); @@ -1506,7 +1506,7 @@ wiz_rumor_check(VOID_ARGS) } /* #terrain command -- show known map, inspired by crawl's '|' command */ -STATIC_PTR int +static int doterrain(VOID_ARGS) { winid men; @@ -1679,7 +1679,7 @@ char *outbuf; } /* report half physical or half spell damage */ -STATIC_OVL void +static void enlght_halfdmg(category, final) int category; int final; @@ -1704,7 +1704,7 @@ int final; } /* is hero actively using water walking capability on water (or lava)? */ -STATIC_OVL boolean +static boolean walking_on_water() { if (u.uinwater || Levitation || Flying) @@ -1716,7 +1716,7 @@ walking_on_water() /* check whether hero is wearing something that player definitely knows confers the target property; item must have been seen and its type discovered but it doesn't necessarily have to be fully identified */ -STATIC_OVL boolean +static boolean cause_known(propindx) int propindx; /* index of a property which can be conveyed by worn item */ { @@ -1736,7 +1736,7 @@ int propindx; /* index of a property which can be conveyed by worn item */ } /* format a characteristic value, accommodating Strength's strangeness */ -STATIC_OVL char * +static char * attrval(attrindx, attrvalue, resultbuf) int attrindx, attrvalue; char resultbuf[]; /* should be at least [7] to hold "18/100\0" */ @@ -1811,7 +1811,7 @@ int final; /* ENL_GAMEINPROGRESS:0, ENL_GAMEOVERALIVE, ENL_GAMEOVERDEAD */ /*ARGSUSED*/ /* display role, race, alignment and such to en_win */ -STATIC_OVL void +static void background_enlightenment(unused_mode, final) int unused_mode UNUSED; int final; @@ -2061,7 +2061,7 @@ int final; /* hit points, energy points, armor class -- essential information which doesn't fit very well in other categories */ /*ARGSUSED*/ -STATIC_OVL void +static void basics_enlightenment(mode, final) int mode UNUSED; int final; @@ -2143,7 +2143,7 @@ int final; } /* characteristics: expanded version of bottom line strength, dexterity, &c */ -STATIC_OVL void +static void characteristics_enlightenment(mode, final) int mode; int final; @@ -2164,7 +2164,7 @@ int final; } /* display one attribute value for characteristics_enlightenment() */ -STATIC_OVL void +static void one_characteristic(mode, final, attrindx) int mode, final, attrindx; { @@ -2259,7 +2259,7 @@ int mode, final, attrindx; } /* status: selected obvious capabilities, assorted troubles */ -STATIC_OVL void +static void status_enlightenment(mode, final) int mode; int final; @@ -2571,7 +2571,7 @@ int final; } /* attributes: intrinsics and the like, other non-obvious capabilities */ -STATIC_OVL void +static void attributes_enlightenment(unused_mode, final) int unused_mode UNUSED; int final; @@ -3016,14 +3016,14 @@ int final; } #if 0 /* no longer used */ -STATIC_DCL boolean NDECL(minimal_enlightenment); +static boolean NDECL(minimal_enlightenment); /* * Courtesy function for non-debug, non-explorer mode players * to help refresh them about who/what they are. * Returns FALSE if menu cancelled (dismissed with ESC), TRUE otherwise. */ -STATIC_OVL boolean +static boolean minimal_enlightenment() { winid tmpwin; @@ -3129,7 +3129,7 @@ minimal_enlightenment() #endif /*0*/ /* ^X command */ -STATIC_PTR int +static int doattributes(VOID_ARGS) { int mode = BASICENLIGHTENMENT; @@ -3826,7 +3826,7 @@ static const char template[] = "%-27s %4ld %6ld"; static const char stats_hdr[] = " count bytes"; static const char stats_sep[] = "--------------------------- ----- -------"; -STATIC_OVL int +static int size_obj(otmp) struct obj *otmp; { @@ -3848,7 +3848,7 @@ struct obj *otmp; return sz; } -STATIC_OVL void +static void count_obj(chain, total_count, total_size, top, recurse) struct obj *chain; long *total_count; @@ -3871,7 +3871,7 @@ boolean recurse; *total_size += size; } -STATIC_OVL void +static void obj_chain(win, src, chain, force, total_count, total_size) winid win; const char *src; @@ -3893,7 +3893,7 @@ long *total_size; } } -STATIC_OVL void +static void mon_invent_chain(win, src, chain, total_count, total_size) winid win; const char *src; @@ -3916,7 +3916,7 @@ long *total_size; } } -STATIC_OVL void +static void contained_stats(win, src, total_count, total_size) winid win; const char *src; @@ -3946,7 +3946,7 @@ long *total_size; } } -STATIC_OVL int +static int size_monst(mtmp, incl_wsegs) struct monst *mtmp; boolean incl_wsegs; @@ -3975,7 +3975,7 @@ boolean incl_wsegs; return sz; } -STATIC_OVL void +static void mon_chain(win, src, chain, force, total_count, total_size) winid win; const char *src; @@ -4003,7 +4003,7 @@ long *total_size; } } -STATIC_OVL void +static void misc_stats(win, total_count, total_size) winid win; long *total_count; @@ -4558,7 +4558,7 @@ boolean initial; } /* non-movement commands which accept 'm' prefix to request menu operation */ -STATIC_OVL boolean +static boolean accept_menu_prefix(cmd_func) int NDECL((*cmd_func)); { @@ -5064,7 +5064,7 @@ retry: return 1; } -STATIC_OVL void +static void show_direction_keys(win, centerchar, nodiag) winid win; /* should specify a window which is using a fixed-width font... */ char centerchar; /* '.' or '@' or ' ' */ @@ -5103,7 +5103,7 @@ boolean nodiag; /* explain choices if player has asked for getdir() help or has given an invalid direction after a prefix key ('F', 'g', 'm', &c), which might be bogus but could be up, down, or self when not applicable */ -STATIC_OVL boolean +static boolean help_dir(sym, spkey, msg) char sym; int spkey; /* NHKF_ code for prefix key, if one was used, or for ESC */ @@ -5285,7 +5285,7 @@ register int x, y; } /* #herecmdmenu command */ -STATIC_PTR int +static int doherecmdmenu(VOID_ARGS) { char ch = here_cmd_menu(TRUE); @@ -5294,7 +5294,7 @@ doherecmdmenu(VOID_ARGS) } /* #therecmdmenu command, a way to test there_cmd_menu without mouse */ -STATIC_PTR int +static int dotherecmdmenu(VOID_ARGS) { char ch; @@ -5310,7 +5310,7 @@ dotherecmdmenu(VOID_ARGS) return ch ? 1 : 0; } -STATIC_OVL void +static void add_herecmd_menuitem(win, func, text) winid win; int NDECL((*func)); @@ -5326,7 +5326,7 @@ const char *text; } } -STATIC_OVL char +static char there_cmd_menu(doit, x, y) boolean doit; int x, y; @@ -5429,7 +5429,7 @@ int x, y; return ch; } -STATIC_OVL char +static char here_cmd_menu(doit) boolean doit; { @@ -5724,7 +5724,7 @@ boolean historical; /* whether to include in message history: True => yes */ } -STATIC_OVL char * +static char * parse() { #ifdef LINT /* static char in_line[COLNO]; */ @@ -5913,7 +5913,7 @@ readchar() } /* '_' command, #travel, via keyboard rather than mouse click */ -STATIC_PTR int +static int dotravel(VOID_ARGS) { static char cmd[2]; @@ -6042,7 +6042,7 @@ const char *prompt; } /* ^Z command, #suspend */ -STATIC_PTR int +static int dosuspend_core(VOID_ARGS) { #ifdef SUSPEND @@ -6057,7 +6057,7 @@ dosuspend_core(VOID_ARGS) } /* '!' command, #shell */ -STATIC_PTR int +static int dosh_core(VOID_ARGS) { #ifdef SHELL diff --git a/src/dbridge.c b/src/dbridge.c index 62842c808..02a54c2d5 100644 --- a/src/dbridge.c +++ b/src/dbridge.c @@ -19,19 +19,19 @@ #include "hack.h" -STATIC_DCL void FDECL(get_wall_for_db, (int *, int *)); -STATIC_DCL struct entity *FDECL(e_at, (int, int)); -STATIC_DCL void FDECL(m_to_e, (struct monst *, int, int, struct entity *)); -STATIC_DCL void FDECL(u_to_e, (struct entity *)); -STATIC_DCL void FDECL(set_entity, (int, int, struct entity *)); -STATIC_DCL const char *FDECL(e_nam, (struct entity *)); -STATIC_DCL const char *FDECL(E_phrase, (struct entity *, const char *)); -STATIC_DCL boolean FDECL(e_survives_at, (struct entity *, int, int)); -STATIC_DCL void FDECL(e_died, (struct entity *, int, int)); -STATIC_DCL boolean FDECL(automiss, (struct entity *)); -STATIC_DCL boolean FDECL(e_missed, (struct entity *, BOOLEAN_P)); -STATIC_DCL boolean FDECL(e_jumps, (struct entity *)); -STATIC_DCL void FDECL(do_entity, (struct entity *)); +static void FDECL(get_wall_for_db, (int *, int *)); +static struct entity *FDECL(e_at, (int, int)); +static void FDECL(m_to_e, (struct monst *, int, int, struct entity *)); +static void FDECL(u_to_e, (struct entity *)); +static void FDECL(set_entity, (int, int, struct entity *)); +static const char *FDECL(e_nam, (struct entity *)); +static const char *FDECL(E_phrase, (struct entity *, const char *)); +static boolean FDECL(e_survives_at, (struct entity *, int, int)); +static void FDECL(e_died, (struct entity *, int, int)); +static boolean FDECL(automiss, (struct entity *)); +static boolean FDECL(e_missed, (struct entity *, BOOLEAN_P)); +static boolean FDECL(e_jumps, (struct entity *)); +static void FDECL(do_entity, (struct entity *)); boolean is_pool(x, y) @@ -205,7 +205,7 @@ int *x, *y; /* * Find the drawbridge wall associated with a drawbridge. */ -STATIC_OVL void +static void get_wall_for_db(x, y) int *x, *y; { @@ -282,7 +282,7 @@ boolean flag; return TRUE; } -STATIC_OVL +static struct entity * e_at(x, y) int x, y; @@ -301,7 +301,7 @@ int x, y; : &(g.occupants[entitycnt]); } -STATIC_OVL void +static void m_to_e(mtmp, x, y, etmp) struct monst *mtmp; int x, y; @@ -319,7 +319,7 @@ struct entity *etmp; etmp->edata = (struct permonst *) 0; } -STATIC_OVL void +static void u_to_e(etmp) struct entity *etmp; { @@ -329,7 +329,7 @@ struct entity *etmp; etmp->edata = g.youmonst.data; } -STATIC_OVL void +static void set_entity(x, y, etmp) int x, y; struct entity *etmp; @@ -353,7 +353,7 @@ struct entity *etmp; /* #define e_strg(etmp, func) (is_u(etmp)? (char *)0 : func(etmp->emon)) */ -STATIC_OVL const char * +static const char * e_nam(etmp) struct entity *etmp; { @@ -364,7 +364,7 @@ struct entity *etmp; * Generates capitalized entity name, makes 2nd -> 3rd person conversion on * verb, where necessary. */ -STATIC_OVL const char * +static const char * E_phrase(etmp, verb) struct entity *etmp; const char *verb; @@ -385,7 +385,7 @@ const char *verb; /* * Simple-minded "can it be here?" routine */ -STATIC_OVL boolean +static boolean e_survives_at(etmp, x, y) struct entity *etmp; int x, y; @@ -409,7 +409,7 @@ int x, y; return TRUE; } -STATIC_OVL void +static void e_died(etmp, xkill_flags, how) struct entity *etmp; int xkill_flags, how; @@ -473,7 +473,7 @@ int xkill_flags, how; /* * These are never directly affected by a bridge or portcullis. */ -STATIC_OVL boolean +static boolean automiss(etmp) struct entity *etmp; { @@ -484,7 +484,7 @@ struct entity *etmp; /* * Does falling drawbridge or portcullis miss etmp? */ -STATIC_OVL boolean +static boolean e_missed(etmp, chunks) struct entity *etmp; boolean chunks; @@ -521,7 +521,7 @@ boolean chunks; /* * Can etmp jump from death? */ -STATIC_OVL boolean +static boolean e_jumps(etmp) struct entity *etmp; { @@ -545,7 +545,7 @@ struct entity *etmp; return (tmp >= rnd(10)) ? TRUE : FALSE; } -STATIC_OVL void +static void do_entity(etmp) struct entity *etmp; { diff --git a/src/detect.c b/src/detect.c index 934ccc055..4ceca787b 100644 --- a/src/detect.c +++ b/src/detect.c @@ -11,25 +11,25 @@ #include "hack.h" #include "artifact.h" -STATIC_DCL boolean NDECL(unconstrain_map); -STATIC_DCL void NDECL(reconstrain_map); -STATIC_DCL void FDECL(browse_map, (int, const char *)); -STATIC_DCL void FDECL(map_monst, (struct monst *, BOOLEAN_P)); -STATIC_DCL void FDECL(do_dknown_of, (struct obj *)); -STATIC_DCL boolean FDECL(check_map_spot, (int, int, CHAR_P, unsigned)); -STATIC_DCL boolean FDECL(clear_stale_map, (CHAR_P, unsigned)); -STATIC_DCL void FDECL(sense_trap, (struct trap *, XCHAR_P, XCHAR_P, int)); -STATIC_DCL int FDECL(detect_obj_traps, (struct obj *, BOOLEAN_P, int)); -STATIC_DCL void FDECL(show_map_spot, (int, int)); -STATIC_PTR void FDECL(findone, (int, int, genericptr_t)); -STATIC_PTR void FDECL(openone, (int, int, genericptr_t)); -STATIC_DCL int FDECL(mfind0, (struct monst *, BOOLEAN_P)); -STATIC_DCL int FDECL(reveal_terrain_getglyph, (int, int, int, +static boolean NDECL(unconstrain_map); +static void NDECL(reconstrain_map); +static void FDECL(browse_map, (int, const char *)); +static void FDECL(map_monst, (struct monst *, BOOLEAN_P)); +static void FDECL(do_dknown_of, (struct obj *)); +static boolean FDECL(check_map_spot, (int, int, CHAR_P, unsigned)); +static boolean FDECL(clear_stale_map, (CHAR_P, unsigned)); +static void FDECL(sense_trap, (struct trap *, XCHAR_P, XCHAR_P, int)); +static int FDECL(detect_obj_traps, (struct obj *, BOOLEAN_P, int)); +static void FDECL(show_map_spot, (int, int)); +static void FDECL(findone, (int, int, genericptr_t)); +static void FDECL(openone, (int, int, genericptr_t)); +static int FDECL(mfind0, (struct monst *, BOOLEAN_P)); +static int FDECL(reveal_terrain_getglyph, (int, int, int, unsigned, int, int)); /* bring hero out from underwater or underground or being engulfed; return True iff any change occurred */ -STATIC_OVL boolean +static boolean unconstrain_map() { boolean res = u.uinwater || u.uburied || u.uswallow; @@ -43,7 +43,7 @@ unconstrain_map() } /* put hero back underwater or underground or engulfed */ -STATIC_OVL void +static void reconstrain_map() { u.uinwater = iflags.save_uinwater, iflags.save_uinwater = 0; @@ -52,7 +52,7 @@ reconstrain_map() } /* use getpos()'s 'autodescribe' to view whatever is currently shown on map */ -STATIC_DCL void +static void browse_map(ter_typ, ter_explain) int ter_typ; const char *ter_explain; @@ -70,7 +70,7 @@ const char *ter_explain; } /* extracted from monster_detection() so can be shared by do_vicinity_map() */ -STATIC_DCL void +static void map_monst(mtmp, showtail) struct monst *mtmp; boolean showtail; @@ -207,7 +207,7 @@ unsigned material; return (struct obj *) 0; } -STATIC_OVL void +static void do_dknown_of(obj) struct obj *obj; { @@ -221,7 +221,7 @@ struct obj *obj; } /* Check whether the location has an outdated object displayed on it. */ -STATIC_OVL boolean +static boolean check_map_spot(x, y, oclass, material) int x, y; char oclass; @@ -278,7 +278,7 @@ unsigned material; * reappear after the detection has completed. Return true if noticeable * change occurs. */ -STATIC_OVL boolean +static boolean clear_stale_map(oclass, material) char oclass; unsigned material; @@ -850,7 +850,7 @@ int mclass; /* monster class, 0 for all */ return 0; } -STATIC_OVL void +static void sense_trap(trap, x, y, src_cursed) struct trap *trap; xchar x, y; @@ -893,7 +893,7 @@ int src_cursed; /* check a list of objects for chest traps; return 1 if found at , 2 if found at some other spot, 3 if both, 0 otherwise; optionally update the map to show where such traps were found */ -STATIC_OVL int +static int detect_obj_traps(objlist, show_them, how) struct obj *objlist; boolean show_them; @@ -1231,7 +1231,7 @@ struct obj **optr; return; } -STATIC_OVL void +static void show_map_spot(x, y) register int x, y; { @@ -1443,7 +1443,7 @@ struct rm *lev; /* find something at one location; it should find all somethings there since it is used for magical detection rather than physical searching */ -STATIC_PTR void +static void findone(zx, zy, num) int zx, zy; genericptr_t num; @@ -1499,7 +1499,7 @@ genericptr_t num; } } -STATIC_PTR void +static void openone(zx, zy, num) int zx, zy; genericptr_t num; @@ -1634,7 +1634,7 @@ struct trap *trap; } } -STATIC_OVL int +static int mfind0(mtmp, via_warning) struct monst *mtmp; boolean via_warning; @@ -1822,7 +1822,7 @@ sokoban_detect() } } -STATIC_DCL int +static int reveal_terrain_getglyph(x, y, full, swallowed, default_glyph, which_subset) int x, y, full; unsigned swallowed; diff --git a/src/dig.c b/src/dig.c index 681ec2bdd..6bd239195 100644 --- a/src/dig.c +++ b/src/dig.c @@ -5,14 +5,14 @@ #include "hack.h" -STATIC_DCL boolean NDECL(rm_waslit); -STATIC_DCL void FDECL(mkcavepos, +static boolean NDECL(rm_waslit); +static void FDECL(mkcavepos, (XCHAR_P, XCHAR_P, int, BOOLEAN_P, BOOLEAN_P)); -STATIC_DCL void FDECL(mkcavearea, (BOOLEAN_P)); -STATIC_DCL int NDECL(dig); -STATIC_DCL void FDECL(dig_up_grave, (coord *)); -STATIC_DCL int FDECL(adj_pit_checks, (coord *, char *)); -STATIC_DCL void FDECL(pit_flow, (struct trap *, SCHAR_P)); +static void FDECL(mkcavearea, (BOOLEAN_P)); +static int NDECL(dig); +static void FDECL(dig_up_grave, (coord *)); +static int FDECL(adj_pit_checks, (coord *, char *)); +static void FDECL(pit_flow, (struct trap *, SCHAR_P)); /* Indices returned by dig_typ() */ enum dig_types { @@ -24,7 +24,7 @@ enum dig_types { DIGTYP_TREE }; -STATIC_OVL boolean +static boolean rm_waslit() { register xchar x, y; @@ -42,7 +42,7 @@ rm_waslit() * boulders in the name of a nice effect. Vision will get fixed up again * immediately after the effect is complete. */ -STATIC_OVL void +static void mkcavepos(x, y, dist, waslit, rockit) xchar x, y; int dist; @@ -85,7 +85,7 @@ boolean waslit, rockit; feel_newsym(x, y); } -STATIC_OVL void +static void mkcavearea(rockit) register boolean rockit; { @@ -235,7 +235,7 @@ int x, y; return TRUE; } -STATIC_OVL int +static int dig(VOID_ARGS) { register struct rm *lev; @@ -893,7 +893,7 @@ coord *cc; return FALSE; } -STATIC_OVL void +static void dig_up_grave(cc) coord *cc; { @@ -1593,7 +1593,7 @@ zap_dig() * you're zapping a wand of digging laterally while * down in the pit. */ -STATIC_OVL int +static int adj_pit_checks(cc, msg) coord *cc; char *msg; @@ -1684,7 +1684,7 @@ char *msg; /* * Ensure that all conjoined pits fill up. */ -STATIC_OVL void +static void pit_flow(trap, filltyp) struct trap *trap; schar filltyp; diff --git a/src/display.c b/src/display.c index 61c94a2d9..0513d35b7 100644 --- a/src/display.c +++ b/src/display.c @@ -123,27 +123,27 @@ */ #include "hack.h" -STATIC_DCL void FDECL(display_monster, +static void FDECL(display_monster, (XCHAR_P, XCHAR_P, struct monst *, int, XCHAR_P)); -STATIC_DCL int FDECL(swallow_to_glyph, (int, int)); -STATIC_DCL void FDECL(display_warning, (struct monst *)); +static int FDECL(swallow_to_glyph, (int, int)); +static void FDECL(display_warning, (struct monst *)); -STATIC_DCL int FDECL(check_pos, (int, int, int)); -STATIC_DCL int FDECL(get_bk_glyph, (XCHAR_P, XCHAR_P)); -STATIC_DCL int FDECL(tether_glyph, (int, int)); +static int FDECL(check_pos, (int, int, int)); +static int FDECL(get_bk_glyph, (XCHAR_P, XCHAR_P)); +static int FDECL(tether_glyph, (int, int)); /*#define WA_VERBOSE*/ /* give (x,y) locations for all "bad" spots */ #ifdef WA_VERBOSE -STATIC_DCL boolean FDECL(more_than_one, (int, int, int, int, int)); +static boolean FDECL(more_than_one, (int, int, int, int, int)); #endif -STATIC_DCL int FDECL(set_twall, (int, int, int, int, int, int, int, int)); -STATIC_DCL int FDECL(set_wall, (int, int, int)); -STATIC_DCL int FDECL(set_corn, (int, int, int, int, int, int, int, int)); -STATIC_DCL int FDECL(set_crosswall, (int, int)); -STATIC_DCL void FDECL(set_seenv, (struct rm *, int, int, int, int)); -STATIC_DCL void FDECL(t_warn, (struct rm *)); -STATIC_DCL int FDECL(wall_angle, (struct rm *)); +static int FDECL(set_twall, (int, int, int, int, int, int, int, int)); +static int FDECL(set_wall, (int, int, int)); +static int FDECL(set_corn, (int, int, int, int, int, int, int, int)); +static int FDECL(set_crosswall, (int, int)); +static void FDECL(set_seenv, (struct rm *, int, int, int, int)); +static void FDECL(t_warn, (struct rm *)); +static int FDECL(wall_angle, (struct rm *)); #define remember_topology(x, y) (g.lastseentyp[x][y] = levl[x][y].typ) @@ -376,7 +376,7 @@ int x, y, show; * a worm tail. * */ -STATIC_OVL void +static void display_monster(x, y, mon, sightflags, worm_tail) register xchar x, y; /* display position */ register struct monst *mon; /* monster to display */ @@ -490,7 +490,7 @@ xchar worm_tail; /* mon is actually a worm tail */ * * Do not call for worm tails. */ -STATIC_OVL void +static void display_warning(mon) register struct monst *mon; { @@ -897,7 +897,7 @@ xchar x, y; } } -STATIC_OVL int +static int tether_glyph(x, y) int x, y; { @@ -1800,7 +1800,7 @@ xchar x, y; * If you don't want a patchwork monster while hallucinating, decide on * a random monster in swallowed() and don't use what_mon() here. */ -STATIC_OVL int +static int swallow_to_glyph(mnum, loc) int mnum; int loc; @@ -1866,7 +1866,7 @@ xchar x, y; * than current data from the map.] */ -STATIC_OVL int +static int get_bk_glyph(x, y) xchar x, y; { @@ -1967,7 +1967,7 @@ int x, y, a, b, c, dd; * * Things that are ambiguous: lava */ -STATIC_OVL int +static int check_pos(x, y, which) int x, y, which; { @@ -1984,7 +1984,7 @@ int x, y, which; /* Return TRUE if more than one is non-zero. */ /*ARGSUSED*/ #ifdef WA_VERBOSE -STATIC_OVL boolean +static boolean more_than_one(x, y, a, b, c) int x, y, a, b, c; { @@ -2000,7 +2000,7 @@ int x, y, a, b, c; #endif /* Return the wall mode for a T wall. */ -STATIC_OVL int +static int set_twall(x0, y0, x1, y1, x2, y2, x3, y3) int x0, y0; /* used #if WA_VERBOSE */ int x1, y1, x2, y2, x3, y3; @@ -2025,7 +2025,7 @@ int x1, y1, x2, y2, x3, y3; } /* Return wall mode for a horizontal or vertical wall. */ -STATIC_OVL int +static int set_wall(x, y, horiz) int x, y, horiz; { @@ -2047,7 +2047,7 @@ int x, y, horiz; } /* Return a wall mode for a corner wall. (x4,y4) is the "inner" position. */ -STATIC_OVL int +static int set_corn(x1, y1, x2, y2, x3, y3, x4, y4) int x1, y1, x2, y2, x3, y3, x4, y4; { @@ -2076,7 +2076,7 @@ int x1, y1, x2, y2, x3, y3, x4, y4; } /* Return mode for a crosswall. */ -STATIC_OVL int +static int set_crosswall(x, y) int x, y; { @@ -2199,7 +2199,7 @@ unsigned char seenv_matrix[3][3] = { { SV2, SV1, SV0 }, #define sign(z) ((z) < 0 ? -1 : ((z) > 0 ? 1 : 0)) /* Set the seen vector of lev as if seen from (x0,y0) to (x,y). */ -STATIC_OVL void +static void set_seenv(lev, x0, y0, x, y) struct rm *lev; int x0, y0, x, y; /* from, to */ @@ -2278,7 +2278,7 @@ static const int cross_matrix[4][6] = { }; /* Print out a T wall warning and all interesting info. */ -STATIC_OVL void +static void t_warn(lev) struct rm *lev; { @@ -2311,7 +2311,7 @@ struct rm *lev; * draw diagrams. See rm.h for more details on the wall modes and * seen vector (SV). */ -STATIC_OVL int +static int wall_angle(lev) struct rm *lev; { diff --git a/src/dlb.c b/src/dlb.c index 12cf3cd21..6bad04fb1 100644 --- a/src/dlb.c +++ b/src/dlb.c @@ -14,14 +14,6 @@ #define DATAPREFIX 4 /* see decl.h */ -#if defined(OVERLAY) -#define STATIC_DCL extern -#define STATIC_OVL -#else /* !OVERLAY */ -#define STATIC_DCL static -#define STATIC_OVL static -#endif /* OVERLAY */ - #ifdef DLB /* * Data librarian. Present a STDIO-like interface to NetHack while @@ -68,18 +60,18 @@ extern FILE *FDECL(fopen_datafile, (const char *, const char *, int)); #define MAX_LIBS 4 static library dlb_libs[MAX_LIBS]; -STATIC_DCL boolean FDECL(readlibdir, (library * lp)); -STATIC_DCL boolean FDECL(find_file, (const char *name, library **lib, +static boolean FDECL(readlibdir, (library * lp)); +static boolean FDECL(find_file, (const char *name, library **lib, long *startp, long *sizep)); -STATIC_DCL boolean NDECL(lib_dlb_init); -STATIC_DCL void NDECL(lib_dlb_cleanup); -STATIC_DCL boolean FDECL(lib_dlb_fopen, (dlb *, const char *, const char *)); -STATIC_DCL int FDECL(lib_dlb_fclose, (dlb *)); -STATIC_DCL int FDECL(lib_dlb_fread, (char *, int, int, dlb *)); -STATIC_DCL int FDECL(lib_dlb_fseek, (dlb *, long, int)); -STATIC_DCL char *FDECL(lib_dlb_fgets, (char *, int, dlb *)); -STATIC_DCL int FDECL(lib_dlb_fgetc, (dlb *)); -STATIC_DCL long FDECL(lib_dlb_ftell, (dlb *)); +static boolean NDECL(lib_dlb_init); +static void NDECL(lib_dlb_cleanup); +static boolean FDECL(lib_dlb_fopen, (dlb *, const char *, const char *)); +static int FDECL(lib_dlb_fclose, (dlb *)); +static int FDECL(lib_dlb_fread, (char *, int, int, dlb *)); +static int FDECL(lib_dlb_fseek, (dlb *, long, int)); +static char *FDECL(lib_dlb_fgets, (char *, int, dlb *)); +static int FDECL(lib_dlb_fgetc, (dlb *)); +static long FDECL(lib_dlb_ftell, (dlb *)); /* not static because shared with dlb_main.c */ boolean FDECL(open_library, (const char *lib_name, library *lp)); @@ -130,7 +122,7 @@ extern char *FDECL(eos, (char *)); * * Return TRUE on success, FALSE on failure. */ -STATIC_OVL boolean +static boolean readlibdir(lp) library *lp; /* library pointer to fill in */ { @@ -179,7 +171,7 @@ library *lp; /* library pointer to fill in */ * Look for the file in our directory structure. Return 1 if successful, * 0 if not found. Fill in the size and starting position. */ -STATIC_OVL boolean +static boolean find_file(name, lib, startp, sizep) const char *name; library **lib; @@ -242,7 +234,7 @@ library *lp; * Open the library file once using stdio. Keep it open, but * keep track of the file position. */ -STATIC_OVL boolean +static boolean lib_dlb_init(VOID_ARGS) { /* zero out array */ @@ -262,7 +254,7 @@ lib_dlb_init(VOID_ARGS) return TRUE; } -STATIC_OVL void +static void lib_dlb_cleanup(VOID_ARGS) { int i; @@ -284,7 +276,7 @@ const char *lf; #endif /*ARGSUSED*/ -STATIC_OVL boolean +static boolean lib_dlb_fopen(dp, name, mode) dlb *dp; const char *name; @@ -306,7 +298,7 @@ const char *mode UNUSED; } /*ARGUSED*/ -STATIC_OVL int +static int lib_dlb_fclose(dp) dlb *dp UNUSED; { @@ -314,7 +306,7 @@ dlb *dp UNUSED; return 0; } -STATIC_OVL int +static int lib_dlb_fread(buf, size, quan, dp) char *buf; int size, quan; @@ -342,7 +334,7 @@ dlb *dp; return nread; } -STATIC_OVL int +static int lib_dlb_fseek(dp, pos, whence) dlb *dp; long pos; @@ -370,7 +362,7 @@ int whence; return 0; } -STATIC_OVL char * +static char * lib_dlb_fgets(buf, len, dp) char *buf; int len; @@ -405,7 +397,7 @@ dlb *dp; return buf; } -STATIC_OVL int +static int lib_dlb_fgetc(dp) dlb *dp; { @@ -416,7 +408,7 @@ dlb *dp; return (int) c; } -STATIC_OVL long +static long lib_dlb_ftell(dp) dlb *dp; { diff --git a/src/do.c b/src/do.c index 95fbcc1a6..f1a515c61 100644 --- a/src/do.c +++ b/src/do.c @@ -8,15 +8,15 @@ #include "hack.h" #include "lev.h" -STATIC_DCL void FDECL(trycall, (struct obj *)); -STATIC_DCL void NDECL(polymorph_sink); -STATIC_DCL boolean NDECL(teleport_sink); -STATIC_DCL void FDECL(dosinkring, (struct obj *)); -STATIC_PTR int FDECL(drop, (struct obj *)); -STATIC_PTR int NDECL(wipeoff); -STATIC_DCL int FDECL(menu_drop, (int)); -STATIC_DCL NHFILE *NDECL(currentlevel_rewrite); -STATIC_DCL void NDECL(final_level); +static void FDECL(trycall, (struct obj *)); +static void NDECL(polymorph_sink); +static boolean NDECL(teleport_sink); +static void FDECL(dosinkring, (struct obj *)); +static int FDECL(drop, (struct obj *)); +static int NDECL(wipeoff); +static int FDECL(menu_drop, (int)); +static NHFILE *NDECL(currentlevel_rewrite); +static void NDECL(final_level); /* static boolean FDECL(badspot, (XCHAR_P,XCHAR_P)); */ static NEARDATA const char drop_types[] = { ALLOW_COUNT, COIN_CLASS, @@ -292,7 +292,7 @@ register struct obj *obj; } } -STATIC_OVL void +static void trycall(obj) register struct obj *obj; { @@ -302,7 +302,7 @@ register struct obj *obj; /* Transforms the sink at the player's position into a fountain, throne, altar or grave. */ -STATIC_DCL void +static void polymorph_sink() { uchar sym = S_sink; @@ -354,7 +354,7 @@ polymorph_sink() /* Teleports the sink at the player's position; return True if sink teleported. */ -STATIC_DCL boolean +static boolean teleport_sink() { int cx, cy; @@ -385,7 +385,7 @@ teleport_sink() } /* obj is a ring being dropped over a kitchen sink */ -STATIC_OVL void +static void dosinkring(obj) register struct obj *obj; { @@ -589,7 +589,7 @@ const char *word; return TRUE; } -STATIC_PTR int +static int drop(obj) register struct obj *obj; { @@ -810,7 +810,7 @@ doddrop() } /* Drop things from the hero's inventory, using a menu. */ -STATIC_OVL int +static int menu_drop(retry) int retry; { @@ -1114,7 +1114,7 @@ doup() } /* check that we can write out the current level */ -STATIC_OVL NHFILE * +static NHFILE * currentlevel_rewrite() { NHFILE *nhfp; @@ -1683,7 +1683,7 @@ boolean at_stairs, falling, portal; (void) pickup(1); } -STATIC_OVL void +static void final_level() { struct monst *mtmp; @@ -1908,7 +1908,7 @@ donull() return 1; /* Do nothing, but let other things happen */ } -STATIC_PTR int +static int wipeoff(VOID_ARGS) { if (u.ucreamed < 4) diff --git a/src/do_name.c b/src/do_name.c index 0200cbba5..9917dac23 100644 --- a/src/do_name.c +++ b/src/do_name.c @@ -5,26 +5,26 @@ #include "hack.h" -STATIC_DCL char *NDECL(nextmbuf); -STATIC_DCL void FDECL(getpos_help, (BOOLEAN_P, const char *)); -STATIC_DCL int FDECL(CFDECLSPEC cmp_coord_distu, (const void *, const void *)); -STATIC_DCL boolean FDECL(gather_locs_interesting, (int, int, int)); -STATIC_DCL void FDECL(gather_locs, (coord **, int *, int)); -STATIC_DCL int FDECL(gloc_filter_floodfill_matcharea, (int, int)); -STATIC_DCL void FDECL(auto_describe, (int, int)); -STATIC_DCL void NDECL(do_mname); -STATIC_DCL boolean FDECL(alreadynamed, (struct monst *, char *, char *)); -STATIC_DCL void FDECL(do_oname, (struct obj *)); -STATIC_PTR char *FDECL(docall_xname, (struct obj *)); -STATIC_DCL void NDECL(namefloorobj); -STATIC_DCL char *FDECL(bogusmon, (char *,char *)); +static char *NDECL(nextmbuf); +static void FDECL(getpos_help, (BOOLEAN_P, const char *)); +static int FDECL(CFDECLSPEC cmp_coord_distu, (const void *, const void *)); +static boolean FDECL(gather_locs_interesting, (int, int, int)); +static void FDECL(gather_locs, (coord **, int *, int)); +static int FDECL(gloc_filter_floodfill_matcharea, (int, int)); +static void FDECL(auto_describe, (int, int)); +static void NDECL(do_mname); +static boolean FDECL(alreadynamed, (struct monst *, char *, char *)); +static void FDECL(do_oname, (struct obj *)); +static char *FDECL(docall_xname, (struct obj *)); +static void NDECL(namefloorobj); +static char *FDECL(bogusmon, (char *,char *)); extern const char what_is_an_unknown_object[]; /* from pager.c */ #define NUMMBUF 5 /* manage a pool of BUFSZ buffers, so callers don't have to */ -STATIC_OVL char * +static char * nextmbuf() { static char NEARDATA bufs[NUMMBUF][BUFSZ]; @@ -87,7 +87,7 @@ int gloc; } /* the response for '?' help request in getpos() */ -STATIC_OVL void +static void getpos_help(force, goal) boolean force; const char *goal; @@ -216,7 +216,7 @@ const char *goal; destroy_nhwindow(tmpwin); } -STATIC_OVL int +static int cmp_coord_distu(a, b) const void *a; const void *b; @@ -272,7 +272,7 @@ int glyph; return 0; } -STATIC_OVL int +static int gloc_filter_floodfill_matcharea(x, y) int x, y; { @@ -332,7 +332,7 @@ gloc_filter_done() } } -STATIC_OVL boolean +static boolean gather_locs_interesting(x, y, gloc) int x, y, gloc; { @@ -404,7 +404,7 @@ int x, y, gloc; } /* gather locations for monsters or objects shown on the map */ -STATIC_OVL void +static void gather_locs(arr_p, cnt_p, gloc) coord **arr_p; int *cnt_p; @@ -531,7 +531,7 @@ char *outbuf, cmode; return outbuf; } -STATIC_OVL void +static void auto_describe(cx, cy) int cx, cy; { @@ -1083,7 +1083,7 @@ const char *name; /* check whether user-supplied name matches or nearly matches an unnameable monster's name; if so, give an alternate reject message for do_mname() */ -STATIC_OVL boolean +static boolean alreadynamed(mtmp, monnambuf, usrbuf) struct monst *mtmp; char *monnambuf, *usrbuf; @@ -1113,7 +1113,7 @@ char *monnambuf, *usrbuf; } /* allow player to assign a name to some chosen monster */ -STATIC_OVL void +static void do_mname() { char buf[BUFSZ], monnambuf[BUFSZ], qbuf[QBUFSZ]; @@ -1197,7 +1197,7 @@ do_mname() * used with extreme care. Applying a name to an object no longer * allocates a replacement object, so that old risk is gone. */ -STATIC_OVL +static void do_oname(obj) register struct obj *obj; @@ -1427,7 +1427,7 @@ docallcmd() } /* for use by safe_qbuf() */ -STATIC_PTR char * +static char * docall_xname(obj) struct obj *obj; { @@ -1507,7 +1507,7 @@ struct obj *obj; } } -STATIC_OVL void +static void namefloorobj() { coord cc; @@ -1974,7 +1974,7 @@ struct monst *mon, *other_mon; } /* fake monsters used to be in a hard-coded array, now in a data file */ -STATIC_OVL char * +static char * bogusmon(buf, code) char *buf, *code; { diff --git a/src/do_wear.c b/src/do_wear.c index 20702cb87..9f9a4c405 100644 --- a/src/do_wear.c +++ b/src/do_wear.c @@ -20,29 +20,29 @@ static NEARDATA const long takeoff_order[] = { WORN_SHIRT, WORN_BOOTS, W_SWAPWEP, W_QUIVER, 0L }; -STATIC_DCL void FDECL(on_msg, (struct obj *)); -STATIC_DCL void FDECL(toggle_stealth, (struct obj *, long, BOOLEAN_P)); -STATIC_DCL void FDECL(toggle_displacement, (struct obj *, long, BOOLEAN_P)); -STATIC_PTR int NDECL(Armor_on); +static void FDECL(on_msg, (struct obj *)); +static void FDECL(toggle_stealth, (struct obj *, long, BOOLEAN_P)); +static void FDECL(toggle_displacement, (struct obj *, long, BOOLEAN_P)); +static int NDECL(Armor_on); /* int NDECL(Boots_on); -- moved to extern.h */ -STATIC_PTR int NDECL(Cloak_on); -STATIC_PTR int NDECL(Helmet_on); -STATIC_PTR int NDECL(Gloves_on); -STATIC_DCL void FDECL(wielding_corpse, (struct obj *, BOOLEAN_P)); -STATIC_PTR int NDECL(Shield_on); -STATIC_PTR int NDECL(Shirt_on); -STATIC_DCL void NDECL(Amulet_on); -STATIC_DCL void FDECL(learnring, (struct obj *, BOOLEAN_P)); -STATIC_DCL void FDECL(Ring_off_or_gone, (struct obj *, BOOLEAN_P)); -STATIC_PTR int FDECL(select_off, (struct obj *)); -STATIC_DCL struct obj *NDECL(do_takeoff); -STATIC_PTR int NDECL(take_off); -STATIC_DCL int FDECL(menu_remarm, (int)); -STATIC_DCL void FDECL(count_worn_stuff, (struct obj **, BOOLEAN_P)); -STATIC_PTR int FDECL(armor_or_accessory_off, (struct obj *)); -STATIC_PTR int FDECL(accessory_or_armor_on, (struct obj *)); -STATIC_DCL void FDECL(already_wearing, (const char *)); -STATIC_DCL void FDECL(already_wearing2, (const char *, const char *)); +static int NDECL(Cloak_on); +static int NDECL(Helmet_on); +static int NDECL(Gloves_on); +static void FDECL(wielding_corpse, (struct obj *, BOOLEAN_P)); +static int NDECL(Shield_on); +static int NDECL(Shirt_on); +static void NDECL(Amulet_on); +static void FDECL(learnring, (struct obj *, BOOLEAN_P)); +static void FDECL(Ring_off_or_gone, (struct obj *, BOOLEAN_P)); +static int FDECL(select_off, (struct obj *)); +static struct obj *NDECL(do_takeoff); +static int NDECL(take_off); +static int FDECL(menu_remarm, (int)); +static void FDECL(count_worn_stuff, (struct obj **, BOOLEAN_P)); +static int FDECL(armor_or_accessory_off, (struct obj *)); +static int FDECL(accessory_or_armor_on, (struct obj *)); +static void FDECL(already_wearing, (const char *)); +static void FDECL(already_wearing2, (const char *, const char *)); void off_msg(otmp) @@ -53,7 +53,7 @@ struct obj *otmp; } /* for items that involve no delay */ -STATIC_OVL void +static void on_msg(otmp) struct obj *otmp; { @@ -73,7 +73,7 @@ struct obj *otmp; /* putting on or taking off an item which confers stealth; give feedback and discover it iff stealth state is changing */ -STATIC_OVL +static void toggle_stealth(obj, oldprop, on) struct obj *obj; @@ -107,7 +107,7 @@ boolean on; /* putting on or taking off an item which confers displacement; give feedback and discover it iff displacement state is changing *and* hero is able to see self (or sense monsters) */ -STATIC_OVL +static void toggle_displacement(obj, oldprop, on) struct obj *obj; @@ -257,7 +257,7 @@ Boots_off(VOID_ARGS) return 0; } -STATIC_PTR int +static int Cloak_on(VOID_ARGS) { long oldprop = @@ -362,7 +362,7 @@ Cloak_off(VOID_ARGS) return 0; } -STATIC_PTR +static int Helmet_on(VOID_ARGS) { @@ -472,7 +472,7 @@ Helmet_off(VOID_ARGS) return 0; } -STATIC_PTR +static int Gloves_on(VOID_ARGS) { @@ -500,7 +500,7 @@ Gloves_on(VOID_ARGS) return 0; } -STATIC_OVL void +static void wielding_corpse(obj, voluntary) struct obj *obj; boolean voluntary; /* taking gloves off on purpose? */ @@ -568,7 +568,7 @@ Gloves_off(VOID_ARGS) return 0; } -STATIC_PTR int +static int Shield_on(VOID_ARGS) { /* no shield currently requires special handling when put on, but we @@ -615,7 +615,7 @@ Shield_off(VOID_ARGS) return 0; } -STATIC_PTR int +static int Shirt_on(VOID_ARGS) { /* no shirt currently requires special handling when put on, but we @@ -650,7 +650,7 @@ Shirt_off(VOID_ARGS) return 0; } -STATIC_PTR +static int Armor_on(VOID_ARGS) { @@ -687,7 +687,7 @@ Armor_gone() return 0; } -STATIC_OVL void +static void Amulet_on() { /* make sure amulet isn't wielded; can't use remove_worn_item() @@ -812,7 +812,7 @@ Amulet_off() } /* handle ring discovery; comparable to learnwand() */ -STATIC_OVL void +static void learnring(ring, observed) struct obj *ring; boolean observed; @@ -961,7 +961,7 @@ register struct obj *obj; } } -STATIC_OVL void +static void Ring_off_or_gone(obj, gone) register struct obj *obj; boolean gone; @@ -1361,10 +1361,10 @@ static NEARDATA const char clothes[] = { static NEARDATA const char accessories[] = { RING_CLASS, AMULET_CLASS, TOOL_CLASS, FOOD_CLASS, ARMOR_CLASS, 0 }; -STATIC_VAR NEARDATA int Narmorpieces, Naccessories; +static NEARDATA int Narmorpieces, Naccessories; /* assign values to Narmorpieces and Naccessories */ -STATIC_OVL void +static void count_worn_stuff(which, accessorizing) struct obj **which; /* caller wants this when count is 1 */ boolean accessorizing; @@ -1402,7 +1402,7 @@ boolean accessorizing; /* take off one piece or armor or one accessory; shared by dotakeoff('T') and doremring('R') */ -STATIC_OVL int +static int armor_or_accessory_off(obj) struct obj *obj; { @@ -1586,14 +1586,14 @@ struct obj *otmp; return 1; } -STATIC_OVL void +static void already_wearing(cc) const char *cc; { You("are already wearing %s%c", cc, (cc == c_that_) ? '!' : '.'); } -STATIC_OVL void +static void already_wearing2(cc1, cc2) const char *cc1, *cc2; { @@ -1782,7 +1782,7 @@ boolean noisy; return !err; } -STATIC_OVL int +static int accessory_or_armor_on(obj) struct obj *obj; { @@ -2217,7 +2217,7 @@ unchanger() return 0; } -STATIC_PTR +static int select_off(otmp) register struct obj *otmp; @@ -2340,7 +2340,7 @@ register struct obj *otmp; return 0; } -STATIC_OVL struct obj * +static struct obj * do_takeoff() { struct obj *otmp = (struct obj *) 0; @@ -2412,7 +2412,7 @@ do_takeoff() } /* occupation callback for 'A' */ -STATIC_PTR +static int take_off(VOID_ARGS) { @@ -2550,7 +2550,7 @@ doddoremarm() return 0; } -STATIC_OVL int +static int menu_remarm(retry) int retry; { diff --git a/src/dog.c b/src/dog.c index 280043bfc..a5946eb76 100644 --- a/src/dog.c +++ b/src/dog.c @@ -5,7 +5,7 @@ #include "hack.h" -STATIC_DCL int NDECL(pet_type); +static int NDECL(pet_type); void newedog(mtmp) @@ -53,7 +53,7 @@ register struct monst *mtmp; EDOG(mtmp)->killed_by_u = 0; } -STATIC_OVL int +static int pet_type() { if (g.urole.petnum != NON_PM) diff --git a/src/dogmove.c b/src/dogmove.c index 44d7bc89c..e74c0a418 100644 --- a/src/dogmove.c +++ b/src/dogmove.c @@ -7,17 +7,17 @@ #include "mfndpos.h" -STATIC_DCL boolean FDECL(dog_hunger, (struct monst *, struct edog *)); -STATIC_DCL int FDECL(dog_invent, (struct monst *, struct edog *, int)); -STATIC_DCL int FDECL(dog_goal, (struct monst *, struct edog *, int, int, int)); -STATIC_DCL struct monst *FDECL(find_targ, (struct monst *, int, int, int)); -STATIC_OVL int FDECL(find_friends, (struct monst *, struct monst *, int)); -STATIC_DCL struct monst *FDECL(best_target, (struct monst *)); -STATIC_DCL long FDECL(score_targ, (struct monst *, struct monst *)); -STATIC_DCL boolean FDECL(can_reach_location, (struct monst *, XCHAR_P, +static boolean FDECL(dog_hunger, (struct monst *, struct edog *)); +static int FDECL(dog_invent, (struct monst *, struct edog *, int)); +static int FDECL(dog_goal, (struct monst *, struct edog *, int, int, int)); +static struct monst *FDECL(find_targ, (struct monst *, int, int, int)); +static int FDECL(find_friends, (struct monst *, struct monst *, int)); +static struct monst *FDECL(best_target, (struct monst *)); +static long FDECL(score_targ, (struct monst *, struct monst *)); +static boolean FDECL(can_reach_location, (struct monst *, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P)); -STATIC_DCL boolean FDECL(could_reach_item, (struct monst *, XCHAR_P, XCHAR_P)); -STATIC_DCL void FDECL(quickmimic, (struct monst *)); +static boolean FDECL(could_reach_item, (struct monst *, XCHAR_P, XCHAR_P)); +static void FDECL(quickmimic, (struct monst *)); /* pick a carried item for pet to drop */ struct obj * @@ -121,7 +121,7 @@ static NEARDATA const char nofetch[] = { BALL_CLASS, CHAIN_CLASS, ROCK_CLASS, 0 }; -STATIC_PTR void FDECL(wantdoor, (int, int, genericptr_t)); +static void FDECL(wantdoor, (int, int, genericptr_t)); boolean cursed_object_at(x, y) @@ -355,7 +355,7 @@ boolean devour; } /* hunger effects -- returns TRUE on starvation */ -STATIC_OVL boolean +static boolean dog_hunger(mtmp, edog) struct monst *mtmp; struct edog *edog; @@ -401,7 +401,7 @@ struct edog *edog; /* do something with object (drop, pick up, eat) at current position * returns 1 if object eaten (since that counts as dog's move), 2 if died */ -STATIC_OVL int +static int dog_invent(mtmp, edog, udist) register struct monst *mtmp; register struct edog *edog; @@ -474,7 +474,7 @@ int udist; /* set dog's goal -- gtyp, gx, gy; returns -1/0/1 (dog's desire to approach player) or -2 (abort move) */ -STATIC_OVL int +static int dog_goal(mtmp, edog, after, udist, whappr) register struct monst *mtmp; struct edog *edog; @@ -618,7 +618,7 @@ int after, udist, whappr; return appr; } -STATIC_OVL struct monst * +static struct monst * find_targ(mtmp, dx, dy, maxdist) register struct monst *mtmp; int dx, dy; @@ -661,7 +661,7 @@ int maxdist; return targ; } -STATIC_OVL int +static int find_friends(mtmp, mtarg, maxdist) struct monst *mtmp, *mtarg; int maxdist; @@ -707,7 +707,7 @@ int maxdist; return 0; } -STATIC_OVL long +static long score_targ(mtmp, mtarg) struct monst *mtmp, *mtarg; { @@ -808,7 +808,7 @@ struct monst *mtmp, *mtarg; return score; } -STATIC_OVL struct monst * +static struct monst * best_target(mtmp) struct monst *mtmp; /* Pet */ { @@ -1268,7 +1268,7 @@ int after; /* this is extra fast monster movement */ } /* check if a monster could pick up objects from a location */ -STATIC_OVL boolean +static boolean could_reach_item(mon, nx, ny) struct monst *mon; xchar nx, ny; @@ -1287,7 +1287,7 @@ xchar nx, ny; * Since the maximum food distance is 5, this should never be more than 5 * calls deep. */ -STATIC_OVL boolean +static boolean can_reach_location(mon, mx, my, fx, fy) struct monst *mon; xchar mx, my, fx, fy; @@ -1323,7 +1323,7 @@ xchar mx, my, fx, fy; } /* do_clear_area client */ -STATIC_PTR void +static void wantdoor(x, y, distance) int x, y; genericptr_t distance; @@ -1369,7 +1369,7 @@ struct monst *mtmp; } } -STATIC_OVL void +static void quickmimic(mtmp) struct monst *mtmp; { diff --git a/src/dokick.c b/src/dokick.c index 6f22ec511..7e89ddb8b 100644 --- a/src/dokick.c +++ b/src/dokick.c @@ -11,20 +11,20 @@ /* g.kickedobj (decl.c) tracks a kicked object until placed or destroyed */ -STATIC_DCL void FDECL(kickdmg, (struct monst *, BOOLEAN_P)); -STATIC_DCL boolean FDECL(maybe_kick_monster, (struct monst *, +static void FDECL(kickdmg, (struct monst *, BOOLEAN_P)); +static boolean FDECL(maybe_kick_monster, (struct monst *, XCHAR_P, XCHAR_P)); -STATIC_DCL void FDECL(kick_monster, (struct monst *, XCHAR_P, XCHAR_P)); -STATIC_DCL int FDECL(kick_object, (XCHAR_P, XCHAR_P, char *)); -STATIC_DCL int FDECL(really_kick_object, (XCHAR_P, XCHAR_P)); -STATIC_DCL char *FDECL(kickstr, (char *, const char *)); -STATIC_DCL void FDECL(otransit_msg, (struct obj *, BOOLEAN_P, long)); -STATIC_DCL void FDECL(drop_to, (coord *, SCHAR_P)); +static void FDECL(kick_monster, (struct monst *, XCHAR_P, XCHAR_P)); +static int FDECL(kick_object, (XCHAR_P, XCHAR_P, char *)); +static int FDECL(really_kick_object, (XCHAR_P, XCHAR_P)); +static char *FDECL(kickstr, (char *, const char *)); +static void FDECL(otransit_msg, (struct obj *, BOOLEAN_P, long)); +static void FDECL(drop_to, (coord *, SCHAR_P)); static const char kick_passes_thru[] = "kick passes harmlessly through"; /* kicking damage when not poly'd into a form with a kick attack */ -STATIC_OVL void +static void kickdmg(mon, clumsy) struct monst *mon; boolean clumsy; @@ -117,7 +117,7 @@ boolean clumsy; use_skill(kick_skill, 1); } -STATIC_OVL boolean +static boolean maybe_kick_monster(mon, x, y) struct monst *mon; xchar x, y; @@ -139,7 +139,7 @@ xchar x, y; return (boolean) (mon != 0); } -STATIC_OVL void +static void kick_monster(mon, x, y) struct monst *mon; xchar x, y; @@ -453,7 +453,7 @@ xchar x, y; /* coordinates where object was before the impact, not after */ } /* jacket around really_kick_object */ -STATIC_OVL int +static int kick_object(x, y, kickobjnam) xchar x, y; char *kickobjnam; @@ -473,7 +473,7 @@ char *kickobjnam; } /* guts of kick_object */ -STATIC_OVL int +static int really_kick_object(x, y) xchar x, y; { @@ -720,7 +720,7 @@ xchar x, y; } /* cause of death if kicking kills kicker */ -STATIC_OVL char * +static char * kickstr(buf, kickobjnam) char *buf; const char *kickobjnam; @@ -1322,7 +1322,7 @@ dokick() return 1; } -STATIC_OVL void +static void drop_to(cc, loc) coord *cc; schar loc; @@ -1733,7 +1733,7 @@ unsigned long deliverflags; } } -STATIC_OVL void +static void otransit_msg(otmp, nodrop, num) register struct obj *otmp; register boolean nodrop; diff --git a/src/dothrow.c b/src/dothrow.c index 6ac0c521b..ec3a6ff63 100644 --- a/src/dothrow.c +++ b/src/dothrow.c @@ -7,18 +7,18 @@ #include "hack.h" -STATIC_DCL int FDECL(throw_obj, (struct obj *, int)); -STATIC_DCL boolean FDECL(ok_to_throw, (int *)); -STATIC_DCL void NDECL(autoquiver); -STATIC_DCL int FDECL(gem_accept, (struct monst *, struct obj *)); -STATIC_DCL void FDECL(tmiss, (struct obj *, struct monst *, BOOLEAN_P)); -STATIC_DCL int FDECL(throw_gold, (struct obj *)); -STATIC_DCL void FDECL(check_shop_obj, (struct obj *, XCHAR_P, XCHAR_P, +static int FDECL(throw_obj, (struct obj *, int)); +static boolean FDECL(ok_to_throw, (int *)); +static void NDECL(autoquiver); +static int FDECL(gem_accept, (struct monst *, struct obj *)); +static void FDECL(tmiss, (struct obj *, struct monst *, BOOLEAN_P)); +static int FDECL(throw_gold, (struct obj *)); +static void FDECL(check_shop_obj, (struct obj *, XCHAR_P, XCHAR_P, BOOLEAN_P)); -STATIC_DCL void FDECL(breakmsg, (struct obj *, BOOLEAN_P)); -STATIC_DCL boolean FDECL(toss_up, (struct obj *, BOOLEAN_P)); -STATIC_DCL void FDECL(sho_obj_return_to_u, (struct obj * obj)); -STATIC_DCL boolean FDECL(mhurtle_step, (genericptr_t, int, int)); +static void FDECL(breakmsg, (struct obj *, BOOLEAN_P)); +static boolean FDECL(toss_up, (struct obj *, BOOLEAN_P)); +static void FDECL(sho_obj_return_to_u, (struct obj * obj)); +static boolean FDECL(mhurtle_step, (genericptr_t, int, int)); static NEARDATA const char toss_objs[] = { ALLOW_COUNT, COIN_CLASS, ALL_CLASSES, WEAPON_CLASS, 0 }; @@ -29,7 +29,7 @@ static NEARDATA const char bullets[] = { ALLOW_COUNT, COIN_CLASS, ALL_CLASSES, /* g.thrownobj (decl.c) tracks an object until it lands */ /* Throw the selected object, asking for direction */ -STATIC_OVL int +static int throw_obj(obj, shotlimit) struct obj *obj; int shotlimit; @@ -232,7 +232,7 @@ int shotlimit; } /* common to dothrow() and dofire() */ -STATIC_OVL boolean +static boolean ok_to_throw(shotlimit_p) int *shotlimit_p; /* (see dothrow()) */ { @@ -767,7 +767,7 @@ int x, y; return TRUE; } -STATIC_OVL boolean +static boolean mhurtle_step(arg, x, y) genericptr_t arg; int x, y; @@ -888,7 +888,7 @@ int dx, dy, range; return; } -STATIC_OVL void +static void check_shop_obj(obj, x, y, broken) struct obj *obj; xchar x, y; @@ -927,7 +927,7 @@ boolean broken; * * Returns FALSE if the object is gone. */ -STATIC_OVL boolean +static boolean toss_up(obj, hitsroof) struct obj *obj; boolean hitsroof; @@ -1069,7 +1069,7 @@ struct obj *obj; } /* the currently thrown object is returning to you (not for boomerangs) */ -STATIC_OVL void +static void sho_obj_return_to_u(obj) struct obj *obj; { @@ -1475,7 +1475,7 @@ boolean mon_notices; } /* thrown object misses target monster */ -STATIC_OVL void +static void tmiss(obj, mon, maybe_wakeup) struct obj *obj; struct monst *mon; @@ -1786,7 +1786,7 @@ register struct obj *obj; /* g.thrownobj or g.kickedobj or uwep */ return 0; } -STATIC_OVL int +static int gem_accept(mon, obj) register struct monst *mon; register struct obj *obj; @@ -2061,7 +2061,7 @@ struct obj *obj; } } -STATIC_OVL void +static void breakmsg(obj, in_view) struct obj *obj; boolean in_view; @@ -2103,7 +2103,7 @@ boolean in_view; } } -STATIC_OVL int +static int throw_gold(obj) struct obj *obj; { diff --git a/src/dungeon.c b/src/dungeon.c index cf292a8a0..42b507740 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -36,47 +36,47 @@ struct lchoice { }; static void FDECL(Fread, (genericptr_t, int, int, dlb *)); -STATIC_DCL xchar FDECL(dname_to_dnum, (const char *)); -STATIC_DCL int FDECL(find_branch, (const char *, struct proto_dungeon *)); -STATIC_DCL xchar FDECL(parent_dnum, (const char *, struct proto_dungeon *)); -STATIC_DCL int FDECL(level_range, (XCHAR_P, int, int, int, +static xchar FDECL(dname_to_dnum, (const char *)); +static int FDECL(find_branch, (const char *, struct proto_dungeon *)); +static xchar FDECL(parent_dnum, (const char *, struct proto_dungeon *)); +static int FDECL(level_range, (XCHAR_P, int, int, int, struct proto_dungeon *, int *)); -STATIC_DCL xchar FDECL(parent_dlevel, (const char *, struct proto_dungeon *)); -STATIC_DCL int FDECL(correct_branch_type, (struct tmpbranch *)); -STATIC_DCL branch *FDECL(add_branch, (int, int, struct proto_dungeon *)); -STATIC_DCL void FDECL(add_level, (s_level *)); -STATIC_DCL void FDECL(init_level, (int, int, struct proto_dungeon *)); -STATIC_DCL int FDECL(possible_places, (int, boolean *, +static xchar FDECL(parent_dlevel, (const char *, struct proto_dungeon *)); +static int FDECL(correct_branch_type, (struct tmpbranch *)); +static branch *FDECL(add_branch, (int, int, struct proto_dungeon *)); +static void FDECL(add_level, (s_level *)); +static void FDECL(init_level, (int, int, struct proto_dungeon *)); +static int FDECL(possible_places, (int, boolean *, struct proto_dungeon *)); -STATIC_DCL xchar FDECL(pick_level, (boolean *, int)); -STATIC_DCL boolean FDECL(place_level, (int, struct proto_dungeon *)); -STATIC_DCL boolean FDECL(unplaced_floater, (struct dungeon *)); -STATIC_DCL boolean FDECL(unreachable_level, (d_level *, BOOLEAN_P)); -STATIC_DCL void FDECL(tport_menu, (winid, char *, struct lchoice *, d_level *, +static xchar FDECL(pick_level, (boolean *, int)); +static boolean FDECL(place_level, (int, struct proto_dungeon *)); +static boolean FDECL(unplaced_floater, (struct dungeon *)); +static boolean FDECL(unreachable_level, (d_level *, BOOLEAN_P)); +static void FDECL(tport_menu, (winid, char *, struct lchoice *, d_level *, BOOLEAN_P)); -STATIC_DCL const char *FDECL(br_string, (int)); -STATIC_DCL char FDECL(chr_u_on_lvl, (d_level *)); -STATIC_DCL void FDECL(print_branch, (winid, int, int, int, BOOLEAN_P, +static const char *FDECL(br_string, (int)); +static char FDECL(chr_u_on_lvl, (d_level *)); +static void FDECL(print_branch, (winid, int, int, int, BOOLEAN_P, struct lchoice *)); /* SAVE2018 */ -STATIC_DCL mapseen *FDECL(load_mapseen, (NHFILE *)); -STATIC_DCL void FDECL(save_mapseen, (NHFILE *, mapseen *)); -STATIC_DCL mapseen *FDECL(find_mapseen, (d_level *)); -STATIC_DCL mapseen *FDECL(find_mapseen_by_str, (const char *)); -STATIC_DCL void FDECL(print_mapseen, (winid, mapseen *, int, int, BOOLEAN_P)); -STATIC_DCL boolean FDECL(interest_mapseen, (mapseen *)); -STATIC_DCL void FDECL(traverse_mapseenchn, (BOOLEAN_P, winid, +static mapseen *FDECL(load_mapseen, (NHFILE *)); +static void FDECL(save_mapseen, (NHFILE *, mapseen *)); +static mapseen *FDECL(find_mapseen, (d_level *)); +static mapseen *FDECL(find_mapseen_by_str, (const char *)); +static void FDECL(print_mapseen, (winid, mapseen *, int, int, BOOLEAN_P)); +static boolean FDECL(interest_mapseen, (mapseen *)); +static void FDECL(traverse_mapseenchn, (BOOLEAN_P, winid, int, int, int *)); -STATIC_DCL const char *FDECL(seen_string, (XCHAR_P, const char *)); -STATIC_DCL const char *FDECL(br_string2, (branch *)); -STATIC_DCL const char *FDECL(shop_string, (int)); -STATIC_DCL char *FDECL(tunesuffix, (mapseen *, char *)); +static const char *FDECL(seen_string, (XCHAR_P, const char *)); +static const char *FDECL(br_string2, (branch *)); +static const char *FDECL(shop_string, (int)); +static char *FDECL(tunesuffix, (mapseen *, char *)); #ifdef DEBUG #define DD g.dungeons[i] -STATIC_DCL void NDECL(dumpit); +static void NDECL(dumpit); -STATIC_OVL void +static void dumpit() { int i; @@ -310,7 +310,7 @@ dlb *stream; } } -STATIC_OVL xchar +static xchar dname_to_dnum(s) const char *s; { @@ -337,7 +337,7 @@ const char *s; } /* Find the branch that links the named dungeon. */ -STATIC_OVL int +static int find_branch(s, pd) const char *s; /* dungeon name */ struct proto_dungeon *pd; @@ -370,7 +370,7 @@ struct proto_dungeon *pd; * Find the "parent" by searching the prototype branch list for the branch * listing, then figuring out to which dungeon it belongs. */ -STATIC_OVL xchar +static xchar parent_dnum(s, pd) const char *s; /* dungeon name */ struct proto_dungeon *pd; @@ -402,7 +402,7 @@ struct proto_dungeon *pd; * a negative random component means from the (adjusted) base to the * end of the dungeon. */ -STATIC_OVL int +static int level_range(dgn, base, randc, chain, pd, adjusted_base) xchar dgn; int base, randc, chain; @@ -437,7 +437,7 @@ int *adjusted_base; return 1; } -STATIC_OVL xchar +static xchar parent_dlevel(s, pd) const char *s; struct proto_dungeon *pd; @@ -464,7 +464,7 @@ struct proto_dungeon *pd; } /* Convert from the temporary branch type to the dungeon branch type. */ -STATIC_OVL int +static int correct_branch_type(tbr) struct tmpbranch *tbr; { @@ -538,7 +538,7 @@ boolean extract_first; } /* Add a dungeon branch to the branch list. */ -STATIC_OVL branch * +static branch * add_branch(dgn, child_entry_level, pd) int dgn; int child_entry_level; @@ -570,7 +570,7 @@ struct proto_dungeon *pd; * level that has a dungeon number less than the dungeon number of the * last entry. */ -STATIC_OVL void +static void add_level(new_lev) s_level *new_lev; { @@ -592,7 +592,7 @@ s_level *new_lev; } } -STATIC_OVL void +static void init_level(dgn, proto_index, pd) int dgn, proto_index; struct proto_dungeon *pd; @@ -626,7 +626,7 @@ struct proto_dungeon *pd; new_level->next = (s_level *) 0; } -STATIC_OVL int +static int possible_places(idx, map, pd) int idx; /* prototype index */ boolean *map; /* array MAXLEVEL+1 in length */ @@ -658,7 +658,7 @@ struct proto_dungeon *pd; } /* Pick the nth TRUE entry in the given boolean array. */ -STATIC_OVL xchar +static xchar pick_level(map, nth) boolean *map; /* an array MAXLEVEL+1 in size */ int nth; @@ -690,7 +690,7 @@ int d; * all possible places have been tried. If all possible places have * been exhausted, return false. */ -STATIC_OVL boolean +static boolean place_level(proto_index, pd) int proto_index; struct proto_dungeon *pd; @@ -1780,7 +1780,7 @@ const char *nam; return lev; } -STATIC_OVL boolean +static boolean unplaced_floater(dptr) struct dungeon *dptr; { @@ -1796,7 +1796,7 @@ struct dungeon *dptr; return FALSE; } -STATIC_OVL boolean +static boolean unreachable_level(lvl_p, unplaced) d_level *lvl_p; boolean unplaced; @@ -1847,7 +1847,7 @@ boolean unreachable; } /* Convert a branch type to a string usable by print_dungeon(). */ -STATIC_OVL const char * +static const char * br_string(type) int type; { @@ -1864,7 +1864,7 @@ int type; return " (unknown)"; } -STATIC_OVL char +static char chr_u_on_lvl(dlev) d_level *dlev; { @@ -1872,7 +1872,7 @@ d_level *dlev; } /* Print all child branches between the lower and upper bounds. */ -STATIC_OVL void +static void print_branch(win, dnum, lower_bound, upper_bound, bymenu, lchoices_p) winid win; int dnum; @@ -2157,7 +2157,7 @@ donamelevel() } /* find the particular mapseen object in the chain; may return null */ -STATIC_OVL mapseen * +static mapseen * find_mapseen(lev) d_level *lev; { @@ -2170,7 +2170,7 @@ d_level *lev; return mptr; } -STATIC_OVL mapseen * +static mapseen * find_mapseen_by_str(s) const char *s; { @@ -2247,7 +2247,7 @@ int ledger_num; } } -STATIC_OVL void +static void save_mapseen(nhfp, mptr) NHFILE *nhfp; mapseen *mptr; @@ -2295,7 +2295,7 @@ mapseen *mptr; savecemetery(nhfp, &mptr->final_resting_place); } -STATIC_OVL mapseen * +static mapseen * load_mapseen(nhfp) NHFILE *nhfp; { @@ -2469,7 +2469,7 @@ d_level *lev; /* || (feat).water || (feat).ice || (feat).lava */ /* returns true if this level has something interesting to print out */ -STATIC_OVL boolean +static boolean interest_mapseen(mptr) mapseen *mptr; { @@ -2868,7 +2868,7 @@ int reason; /* how hero died; used when disclosing end-of-game level */ } /* display endgame levels or non-endgame levels, not both */ -STATIC_OVL void +static void traverse_mapseenchn(viewendgame, win, why, reason, lastdun_p) boolean viewendgame; winid win; @@ -2890,7 +2890,7 @@ int why, reason, *lastdun_p; } } -STATIC_OVL const char * +static const char * seen_string(x, obj) xchar x; const char *obj; @@ -2912,7 +2912,7 @@ const char *obj; } /* better br_string */ -STATIC_OVL const char * +static const char * br_string2(br) branch *br; { @@ -2967,7 +2967,7 @@ int indx; return outbuf; } -STATIC_OVL const char * +static const char * shop_string(rtype) int rtype; { @@ -3019,7 +3019,7 @@ int rtype; /* if player knows about the mastermind tune, append it to Castle annotation; if drawbridge has been destroyed, flags.castletune will be zero */ -STATIC_OVL char * +static char * tunesuffix(mptr, outbuf) mapseen *mptr; char *outbuf; @@ -3060,7 +3060,7 @@ char *outbuf; Sprintf(eos(buf), "%s%s", COMMA, (nam)); \ } while (0) -STATIC_OVL void +static void print_mapseen(win, mptr, final, how, printdun) winid win; mapseen *mptr; diff --git a/src/eat.c b/src/eat.c index cafbf8f0a..23ee9f721 100644 --- a/src/eat.c +++ b/src/eat.c @@ -5,39 +5,39 @@ #include "hack.h" -STATIC_PTR int NDECL(eatmdone); -STATIC_PTR int NDECL(eatfood); -STATIC_PTR struct obj *FDECL(costly_tin, (int)); -STATIC_PTR int NDECL(opentin); -STATIC_PTR int NDECL(unfaint); +static int NDECL(eatmdone); +static int NDECL(eatfood); +static struct obj *FDECL(costly_tin, (int)); +static int NDECL(opentin); +static int NDECL(unfaint); -STATIC_DCL const char *FDECL(food_xname, (struct obj *, BOOLEAN_P)); -STATIC_DCL void FDECL(choke, (struct obj *)); -STATIC_DCL void NDECL(recalc_wt); -STATIC_DCL unsigned FDECL(obj_nutrition, (struct obj *)); -STATIC_DCL struct obj *FDECL(touchfood, (struct obj *)); -STATIC_DCL void NDECL(do_reset_eat); -STATIC_DCL void FDECL(done_eating, (BOOLEAN_P)); -STATIC_DCL void FDECL(cprefx, (int)); -STATIC_DCL int FDECL(intrinsic_possible, (int, struct permonst *)); -STATIC_DCL void FDECL(givit, (int, struct permonst *)); -STATIC_DCL void FDECL(cpostfx, (int)); -STATIC_DCL void FDECL(consume_tin, (const char *)); -STATIC_DCL void FDECL(start_tin, (struct obj *)); -STATIC_DCL int FDECL(eatcorpse, (struct obj *)); -STATIC_DCL void FDECL(start_eating, (struct obj *, BOOLEAN_P)); -STATIC_DCL void FDECL(fprefx, (struct obj *)); -STATIC_DCL void FDECL(fpostfx, (struct obj *)); -STATIC_DCL int NDECL(bite); -STATIC_DCL int FDECL(edibility_prompts, (struct obj *)); -STATIC_DCL int FDECL(rottenfood, (struct obj *)); -STATIC_DCL void NDECL(eatspecial); -STATIC_DCL int FDECL(bounded_increase, (int, int, int)); -STATIC_DCL void FDECL(accessory_has_effect, (struct obj *)); -STATIC_DCL void FDECL(eataccessory, (struct obj *)); -STATIC_DCL const char *FDECL(foodword, (struct obj *)); -STATIC_DCL int FDECL(tin_variety, (struct obj *, BOOLEAN_P)); -STATIC_DCL boolean FDECL(maybe_cannibal, (int, BOOLEAN_P)); +static const char *FDECL(food_xname, (struct obj *, BOOLEAN_P)); +static void FDECL(choke, (struct obj *)); +static void NDECL(recalc_wt); +static unsigned FDECL(obj_nutrition, (struct obj *)); +static struct obj *FDECL(touchfood, (struct obj *)); +static void NDECL(do_reset_eat); +static void FDECL(done_eating, (BOOLEAN_P)); +static void FDECL(cprefx, (int)); +static int FDECL(intrinsic_possible, (int, struct permonst *)); +static void FDECL(givit, (int, struct permonst *)); +static void FDECL(cpostfx, (int)); +static void FDECL(consume_tin, (const char *)); +static void FDECL(start_tin, (struct obj *)); +static int FDECL(eatcorpse, (struct obj *)); +static void FDECL(start_eating, (struct obj *, BOOLEAN_P)); +static void FDECL(fprefx, (struct obj *)); +static void FDECL(fpostfx, (struct obj *)); +static int NDECL(bite); +static int FDECL(edibility_prompts, (struct obj *)); +static int FDECL(rottenfood, (struct obj *)); +static void NDECL(eatspecial); +static int FDECL(bounded_increase, (int, int, int)); +static void FDECL(accessory_has_effect, (struct obj *)); +static void FDECL(eataccessory, (struct obj *)); +static const char *FDECL(foodword, (struct obj *)); +static int FDECL(tin_variety, (struct obj *, BOOLEAN_P)); +static boolean FDECL(maybe_cannibal, (int, BOOLEAN_P)); /* also used to see if you're allowed to eat cats and dogs */ #define CANNIBAL_ALLOWED() (Role_if(PM_CAVEMAN) || Race_if(PM_ORC)) @@ -55,12 +55,12 @@ STATIC_DCL boolean FDECL(maybe_cannibal, (int, BOOLEAN_P)); #define nonrotting_food(otyp) \ ((otyp) == LEMBAS_WAFER || (otyp) == CRAM_RATION) -STATIC_OVL NEARDATA const char comestibles[] = { FOOD_CLASS, 0 }; -STATIC_OVL NEARDATA const char offerfodder[] = { FOOD_CLASS, AMULET_CLASS, +static NEARDATA const char comestibles[] = { FOOD_CLASS, 0 }; +static NEARDATA const char offerfodder[] = { FOOD_CLASS, AMULET_CLASS, 0 }; /* Gold must come first for getobj(). */ -STATIC_OVL NEARDATA const char allobj[] = { +static NEARDATA const char allobj[] = { COIN_CLASS, WEAPON_CLASS, ARMOR_CLASS, POTION_CLASS, SCROLL_CLASS, WAND_CLASS, RING_CLASS, AMULET_CLASS, FOOD_CLASS, TOOL_CLASS, GEM_CLASS, ROCK_CLASS, @@ -145,7 +145,7 @@ static const struct { #define TTSZ SIZE(tintxts) /* called after mimicing is over */ -STATIC_PTR int +static int eatmdone(VOID_ARGS) { /* release `eatmbuf' */ @@ -198,7 +198,7 @@ eatmupdate() } /* ``[the(] singular(food, xname) [)]'' */ -STATIC_OVL const char * +static const char * food_xname(food, the_pfx) struct obj *food; boolean the_pfx; @@ -228,7 +228,7 @@ boolean the_pfx; * * To a full belly all food is bad. (It.) */ -STATIC_OVL void +static void choke(food) struct obj *food; { @@ -276,7 +276,7 @@ struct obj *food; } /* modify object wt. depending on time spent consuming it */ -STATIC_OVL void +static void recalc_wt() { struct obj *piece = g.context.victual.piece; @@ -306,7 +306,7 @@ reset_eat() } /* base nutrition of a food-class object */ -STATIC_OVL unsigned +static unsigned obj_nutrition(otmp) struct obj *otmp; { @@ -331,7 +331,7 @@ struct obj *otmp; return nut; } -STATIC_OVL struct obj * +static struct obj * touchfood(otmp) struct obj *otmp; { @@ -397,7 +397,7 @@ struct obj *old_obj, *new_obj; } } -STATIC_OVL void +static void do_reset_eat() { debugpline0("do_reset_eat..."); @@ -420,7 +420,7 @@ do_reset_eat() } /* called each move during eating process */ -STATIC_PTR int +static int eatfood(VOID_ARGS) { if (!g.context.victual.piece @@ -443,7 +443,7 @@ eatfood(VOID_ARGS) } } -STATIC_OVL void +static void done_eating(message) boolean message; { @@ -632,7 +632,7 @@ int *dmg_p; /* for dishing out extra damage in lieu of Int loss */ } /* eating a corpse or egg of one's own species is usually naughty */ -STATIC_OVL boolean +static boolean maybe_cannibal(pm, allowmsg) int pm; boolean allowmsg; @@ -667,7 +667,7 @@ boolean allowmsg; return FALSE; } -STATIC_OVL void +static void cprefx(pm) register int pm; { @@ -758,7 +758,7 @@ fix_petrification() */ /* intrinsic_possible() returns TRUE iff a monster can give an intrinsic. */ -STATIC_OVL int +static int intrinsic_possible(type, ptr) int type; register struct permonst *ptr; @@ -822,7 +822,7 @@ register struct permonst *ptr; /* givit() tries to give you an intrinsic based on the monster's level * and what type of intrinsic it is trying to give you. */ -STATIC_OVL void +static void givit(type, ptr) int type; register struct permonst *ptr; @@ -935,7 +935,7 @@ register struct permonst *ptr; } /* called after completely consuming a corpse */ -STATIC_OVL void +static void cpostfx(pm) int pm; { @@ -1162,7 +1162,7 @@ violated_vegetarian() /* common code to check and possibly charge for 1 g.context.tin.tin, * will split() g.context.tin.tin if necessary */ -STATIC_PTR struct obj * +static struct obj * costly_tin(alter_type) int alter_type; /* COST_xxx */ { @@ -1268,7 +1268,7 @@ int forcetype; obj->spe = -(r + 1); /* offset by 1 to allow index 0 */ } -STATIC_OVL int +static int tin_variety(obj, disp) struct obj *obj; boolean disp; /* we're just displaying so leave things alone */ @@ -1293,7 +1293,7 @@ boolean disp; /* we're just displaying so leave things alone */ return r; } -STATIC_OVL void +static void consume_tin(mesg) const char *mesg; { @@ -1428,7 +1428,7 @@ const char *mesg; } /* called during each move whilst opening a tin */ -STATIC_PTR int +static int opentin(VOID_ARGS) { /* perhaps it was stolen (although that should cause interruption) */ @@ -1447,7 +1447,7 @@ opentin(VOID_ARGS) } /* called when starting to open a tin */ -STATIC_OVL void +static void start_tin(otmp) struct obj *otmp; { @@ -1538,7 +1538,7 @@ Hear_again(VOID_ARGS) } /* called on the "first bite" of rotten food */ -STATIC_OVL int +static int rottenfood(obj) struct obj *obj; { @@ -1580,7 +1580,7 @@ struct obj *obj; } /* called when a corpse is selected as food */ -STATIC_OVL int +static int eatcorpse(otmp) struct obj *otmp; { @@ -1719,7 +1719,7 @@ struct obj *otmp; } /* called as you start to eat */ -STATIC_OVL void +static void start_eating(otmp, already_partly_eaten) struct obj *otmp; boolean already_partly_eaten; @@ -1782,7 +1782,7 @@ boolean already_partly_eaten; * Messages should use present tense since multi-turn food won't be * finishing at the time they're issued. */ -STATIC_OVL void +static void fprefx(otmp) struct obj *otmp; { @@ -1890,7 +1890,7 @@ struct obj *otmp; } /* increment a combat intrinsic with limits on its growth */ -STATIC_OVL int +static int bounded_increase(old, inc, typ) int old, inc, typ; { @@ -1928,7 +1928,7 @@ int old, inc, typ; return old + inc; } -STATIC_OVL void +static void accessory_has_effect(otmp) struct obj *otmp; { @@ -1936,7 +1936,7 @@ struct obj *otmp; (otmp->oclass == RING_CLASS) ? "ring" : "amulet"); } -STATIC_OVL void +static void eataccessory(otmp) struct obj *otmp; { @@ -2081,7 +2081,7 @@ struct obj *otmp; } /* called after eating non-food */ -STATIC_OVL void +static void eatspecial() { struct obj *otmp = g.context.victual.piece; @@ -2166,7 +2166,7 @@ static const char *foodwords[] = { "plastic", "glass", "rich food", "stone" }; -STATIC_OVL const char * +static const char * foodword(otmp) struct obj *otmp; { @@ -2179,7 +2179,7 @@ struct obj *otmp; } /* called after consuming (non-corpse) food */ -STATIC_OVL void +static void fpostfx(otmp) struct obj *otmp; { @@ -2267,9 +2267,9 @@ struct obj *otmp; /* intended for eating a spellbook while polymorphed, but not used; "leather" applied to appearance, not composition, and has been changed to "leathery" to reflect that */ -STATIC_DCL boolean FDECL(leather_cover, (struct obj *)); +static boolean FDECL(leather_cover, (struct obj *)); -STATIC_OVL boolean +static boolean leather_cover(otmp) struct obj *otmp; { @@ -2288,7 +2288,7 @@ struct obj *otmp; * return 1 if the food was dangerous and you chose to stop. * return 2 if the food was dangerous and you chose to eat it anyway. */ -STATIC_OVL int +static int edibility_prompts(otmp) struct obj *otmp; { @@ -2754,7 +2754,7 @@ struct obj *obj; /* Take a single bite from a piece of food, checking for choking and * modifying usedtime. Returns 1 if they choked and survived, 0 otherwise. */ -STATIC_OVL int +static int bite() { if (g.context.victual.canchoke && u.uhunger >= 2000) { @@ -2895,8 +2895,7 @@ int num; newuhs(FALSE); } -STATIC_PTR -int +static int unfaint(VOID_ARGS) { (void) Hear_again(); diff --git a/src/end.c b/src/end.c index 7cfbe16ab..fa758fe43 100644 --- a/src/end.c +++ b/src/end.c @@ -22,29 +22,29 @@ #define nowrap_add(a, b) (a = ((a + b) < 0 ? LONG_MAX : (a + b))) #ifndef NO_SIGNAL -STATIC_PTR void FDECL(done_intr, (int)); +static void FDECL(done_intr, (int)); #if defined(UNIX) || defined(VMS) || defined(__EMX__) static void FDECL(done_hangup, (int)); #endif #endif -STATIC_DCL void FDECL(disclose, (int, BOOLEAN_P)); -STATIC_DCL void FDECL(get_valuables, (struct obj *)); -STATIC_DCL void FDECL(sort_valuables, (struct valuable_data *, int)); -STATIC_DCL void NDECL(done_object_cleanup); -STATIC_DCL void FDECL(artifact_score, (struct obj *, BOOLEAN_P, winid)); -STATIC_DCL void FDECL(really_done, (int)) NORETURN; -STATIC_DCL void FDECL(savelife, (int)); -STATIC_PTR int FDECL(CFDECLSPEC vanqsort_cmp, (const genericptr, +static void FDECL(disclose, (int, BOOLEAN_P)); +static void FDECL(get_valuables, (struct obj *)); +static void FDECL(sort_valuables, (struct valuable_data *, int)); +static void NDECL(done_object_cleanup); +static void FDECL(artifact_score, (struct obj *, BOOLEAN_P, winid)); +static void FDECL(really_done, (int)) NORETURN; +static void FDECL(savelife, (int)); +static int FDECL(CFDECLSPEC vanqsort_cmp, (const genericptr, const genericptr)); -STATIC_DCL int NDECL(set_vanq_order); -STATIC_DCL void FDECL(list_vanquished, (CHAR_P, BOOLEAN_P)); -STATIC_DCL void FDECL(list_genocided, (CHAR_P, BOOLEAN_P)); -STATIC_DCL boolean FDECL(should_query_disclose_option, (int, char *)); +static int NDECL(set_vanq_order); +static void FDECL(list_vanquished, (CHAR_P, BOOLEAN_P)); +static void FDECL(list_genocided, (CHAR_P, BOOLEAN_P)); +static boolean FDECL(should_query_disclose_option, (int, char *)); #ifdef DUMPLOG -STATIC_DCL void NDECL(dump_plines); +static void NDECL(dump_plines); #endif -STATIC_DCL void FDECL(dump_everything, (int, time_t)); -STATIC_DCL int NDECL(num_extinct); +static void FDECL(dump_everything, (int, time_t)); +static int NDECL(num_extinct); #if defined(__BEOS__) || defined(MICRO) || defined(OS2) || defined(WIN32) extern void FDECL(nethack_exit, (int)); @@ -366,7 +366,7 @@ done2() #ifndef NO_SIGNAL /*ARGSUSED*/ -STATIC_PTR void +static void done_intr(sig_unused) /* called as signal() handler, so sent at least 1 arg */ int sig_unused UNUSED; { @@ -526,7 +526,7 @@ static const struct { /* clear away while-helpless when the cause of death caused that helplessness (ie, "petrified by while getting stoned") */ -STATIC_DCL void +static void fixup_death(how) int how; { @@ -627,7 +627,7 @@ VA_DECL(const char *, str) really_done(PANICKED); } -STATIC_OVL boolean +static boolean should_query_disclose_option(category, defquery) int category; char *defquery; @@ -671,7 +671,7 @@ char *defquery; } #ifdef DUMPLOG -STATIC_OVL void +static void dump_plines() { int i, j; @@ -694,7 +694,7 @@ dump_plines() #endif /*ARGSUSED*/ -STATIC_OVL void +static void dump_everything(how, when) int how; time_t when; /* date+time at end of game */ @@ -764,7 +764,7 @@ time_t when; /* date+time at end of game */ #endif } -STATIC_OVL void +static void disclose(how, taken) int how; boolean taken; @@ -838,7 +838,7 @@ boolean taken; } /* try to get the player back in a viable state after being killed */ -STATIC_OVL void +static void savelife(how) int how; { @@ -886,7 +886,7 @@ int how; * Get valuables from the given list. Revised code: the list always remains * intact. */ -STATIC_OVL void +static void get_valuables(list) struct obj *list; /* inventory or container contents */ { @@ -921,7 +921,7 @@ struct obj *list; /* inventory or container contents */ * Sort collected valuables, most frequent to least. We could just * as easily use qsort, but we don't care about efficiency here. */ -STATIC_OVL void +static void sort_valuables(list, size) struct valuable_data list[]; int size; /* max value is less than 20 */ @@ -950,11 +950,11 @@ int size; /* max value is less than 20 */ * odds_and_ends() was used for 3.6.0 and 3.6.1. * Schroedinger's Cat is handled differently starting with 3.6.2. */ -STATIC_DCL boolean FDECL(odds_and_ends, (struct obj *, int)); +static boolean FDECL(odds_and_ends, (struct obj *, int)); #define CAT_CHECK 2 -STATIC_OVL boolean +static boolean odds_and_ends(list, what) struct obj *list; int what; @@ -977,7 +977,7 @@ int what; #endif /* deal with some objects which may be in an abnormal state at end of game */ -STATIC_OVL void +static void done_object_cleanup() { int ox, oy; @@ -1033,7 +1033,7 @@ done_object_cleanup() } /* called twice; first to calculate total, then to list relevant items */ -STATIC_OVL void +static void artifact_score(list, counting, endwin) struct obj *list; boolean counting; /* true => add up points; false => display them */ @@ -1178,7 +1178,7 @@ int how; } /* separated from done() in order to specify the __noreturn__ attribute */ -STATIC_OVL void +static void really_done(how) int how; { @@ -1720,7 +1720,7 @@ static const char *vanqorders[NUM_VANQ_ORDER_MODES] = { "by count, low to high, by internal index within tied count", }; -STATIC_PTR int CFDECLSPEC +static int CFDECLSPEC vanqsort_cmp(vptr1, vptr2) const genericptr vptr1; const genericptr vptr2; @@ -1801,7 +1801,7 @@ const genericptr vptr2; } /* returns -1 if cancelled via ESC */ -STATIC_OVL int +static int set_vanq_order() { winid tmpwin; @@ -1846,7 +1846,7 @@ dovanquished() #define UniqCritterIndx(mndx) ((mons[mndx].geno & G_UNIQ) \ && mndx != PM_HIGH_PRIEST) -STATIC_OVL void +static void list_vanquished(defquery, ask) char defquery; boolean ask; @@ -1994,7 +1994,7 @@ num_genocides() return n; } -STATIC_OVL int +static int num_extinct() { int i, n = 0; @@ -2008,7 +2008,7 @@ num_extinct() return n; } -STATIC_OVL void +static void list_genocided(defquery, ask) char defquery; boolean ask; diff --git a/src/engrave.c b/src/engrave.c index 682619816..4e5413526 100644 --- a/src/engrave.c +++ b/src/engrave.c @@ -8,8 +8,8 @@ #include "sfproto.h" -STATIC_VAR NEARDATA struct engr *head_engr; -STATIC_DCL const char *NDECL(blengr); +static NEARDATA struct engr *head_engr; +static const char *NDECL(blengr); char * random_engraving(outbuf) @@ -1343,7 +1343,7 @@ static const char blind_writing[][21] = { 0x69, 0x76, 0x6b, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, }; -STATIC_OVL const char * +static const char * blengr(VOID_ARGS) { return blind_writing[rn2(SIZE(blind_writing))]; diff --git a/src/exper.c b/src/exper.c index 1ed80805b..ab5a84348 100644 --- a/src/exper.c +++ b/src/exper.c @@ -8,7 +8,7 @@ #include #endif -STATIC_DCL int FDECL(enermod, (int)); +static int FDECL(enermod, (int)); long newuexp(lev) @@ -23,7 +23,7 @@ int lev; return (10000000L * ((long) (lev - 19))); } -STATIC_OVL int +static int enermod(en) int en; { diff --git a/src/extralev.c b/src/extralev.c index 7ea88e787..b3a19504d 100644 --- a/src/extralev.c +++ b/src/extralev.c @@ -13,11 +13,11 @@ #define LEFT 4 #define RIGHT 8 -STATIC_DCL void FDECL(roguejoin, (int, int, int, int, int)); -STATIC_DCL void FDECL(roguecorr, (int, int, int)); -STATIC_DCL void FDECL(miniwalk, (int, int)); +static void FDECL(roguejoin, (int, int, int, int, int)); +static void FDECL(roguecorr, (int, int, int)); +static void FDECL(miniwalk, (int, int)); -STATIC_OVL +static void roguejoin(x1, y1, x2, y2, horiz) int x1, y1, x2, y2; @@ -43,7 +43,7 @@ int horiz; } } -STATIC_OVL +static void roguecorr(x, y, dir) int x, y, dir; @@ -139,7 +139,7 @@ int x, y, dir; } /* Modified walkfrom() from mkmaze.c */ -STATIC_OVL +static void miniwalk(x, y) int x, y; diff --git a/src/files.c b/src/files.c index 65a69e09a..0aed6a08a 100644 --- a/src/files.c +++ b/src/files.c @@ -84,8 +84,8 @@ static char fqn_filename_buffer[FQN_NUMBUF][FQN_MAX_FILENAME]; #include #endif -STATIC_DCL FILE *NDECL(fopen_wizkit_file); -STATIC_DCL void FDECL(wizkit_addinv, (struct obj *)); +static FILE *NDECL(fopen_wizkit_file); +static void FDECL(wizkit_addinv, (struct obj *)); #ifdef AMIGA extern char PATH[]; /* see sys/amiga/amidos.c */ @@ -127,47 +127,47 @@ extern char *sounddir; #endif #ifdef SELECTSAVED -STATIC_PTR int FDECL(CFDECLSPEC strcmp_wrap, (const void *, const void *)); +static int FDECL(CFDECLSPEC strcmp_wrap, (const void *, const void *)); #endif -STATIC_DCL char *FDECL(set_bonesfile_name, (char *, d_level *)); -STATIC_DCL char *NDECL(set_bonestemp_name); +static char *FDECL(set_bonesfile_name, (char *, d_level *)); +static char *NDECL(set_bonestemp_name); #ifdef COMPRESS -STATIC_DCL void FDECL(redirect, (const char *, const char *, FILE *, +static void FDECL(redirect, (const char *, const char *, FILE *, BOOLEAN_P)); #endif #if defined(COMPRESS) || defined(ZLIB_COMP) -STATIC_DCL void FDECL(docompress_file, (const char *, BOOLEAN_P)); +static void FDECL(docompress_file, (const char *, BOOLEAN_P)); #endif #if defined(ZLIB_COMP) -STATIC_DCL boolean FDECL(make_compressed_name, (const char *, char *)); +static boolean FDECL(make_compressed_name, (const char *, char *)); #endif #ifndef USE_FCNTL -STATIC_DCL char *FDECL(make_lockname, (const char *, char *)); +static char *FDECL(make_lockname, (const char *, char *)); #endif -STATIC_DCL void FDECL(set_configfile_name, (const char *)); -STATIC_DCL FILE *FDECL(fopen_config_file, (const char *, int)); -STATIC_DCL int FDECL(get_uchars, (char *, uchar *, BOOLEAN_P, +static void FDECL(set_configfile_name, (const char *)); +static FILE *FDECL(fopen_config_file, (const char *, int)); +static int FDECL(get_uchars, (char *, uchar *, BOOLEAN_P, int, const char *)); boolean FDECL(proc_wizkit_line, (char *)); boolean FDECL(parse_config_line, (char *)); -STATIC_DCL boolean FDECL(parse_conf_file, (FILE *, boolean (*proc)(char *))); -STATIC_DCL FILE *NDECL(fopen_sym_file); +static boolean FDECL(parse_conf_file, (FILE *, boolean (*proc)(char *))); +static FILE *NDECL(fopen_sym_file); boolean FDECL(proc_symset_line, (char *)); -STATIC_DCL void FDECL(set_symhandling, (char *, int)); +static void FDECL(set_symhandling, (char *, int)); #ifdef NOCWD_ASSUMPTIONS -STATIC_DCL void FDECL(adjust_prefix, (char *, int)); +static void FDECL(adjust_prefix, (char *, int)); #endif -STATIC_DCL boolean FDECL(config_error_nextline, (const char *)); -STATIC_DCL void NDECL(free_config_sections); -STATIC_DCL char *FDECL(choose_random_part, (char *, CHAR_P)); -STATIC_DCL boolean FDECL(is_config_section, (const char *)); -STATIC_DCL boolean FDECL(handle_config_section, (char *)); -STATIC_DCL void FDECL(parseformat, (int *, char *)); +static boolean FDECL(config_error_nextline, (const char *)); +static void NDECL(free_config_sections); +static char *FDECL(choose_random_part, (char *, CHAR_P)); +static boolean FDECL(is_config_section, (const char *)); +static boolean FDECL(handle_config_section, (char *)); +static void FDECL(parseformat, (int *, char *)); #ifdef SELF_RECOVER -STATIC_DCL boolean FDECL(copy_bytes, (int, int)); +static boolean FDECL(copy_bytes, (int, int)); #endif -STATIC_DCL NHFILE *FDECL(viable_nhfile, (NHFILE *)); +static NHFILE *FDECL(viable_nhfile, (NHFILE *)); /* * fname_encode() @@ -697,7 +697,7 @@ clearlocks() #if defined(SELECTSAVED) /* qsort comparison routine */ -STATIC_OVL int CFDECLSPEC +static int CFDECLSPEC strcmp_wrap(p, q) const void *p; const void *q; @@ -732,7 +732,7 @@ int fd; /* set up "file" to be file name for retrieving bones, and return a * bonesid to be read/written in the bones file. */ -STATIC_OVL char * +static char * set_bonesfile_name(file, lev) char *file; d_level *lev; @@ -795,7 +795,7 @@ d_level *lev; * (we are not reading or writing level files while writing bones files, so * the same array may be used instead of copying.) */ -STATIC_OVL char * +static char * set_bonestemp_name() { char *tf; @@ -1478,7 +1478,7 @@ char **saved; #ifdef COMPRESS -STATIC_OVL void +static void redirect(filename, mode, stream, uncomp) const char *filename, *mode; FILE *stream; @@ -1498,7 +1498,7 @@ boolean uncomp; * * cf. child() in unixunix.c. */ -STATIC_OVL void +static void docompress_file(filename, uncomp) const char *filename; boolean uncomp; @@ -1683,7 +1683,7 @@ const char *filename UNUSED_if_not_COMPRESS; } #ifdef ZLIB_COMP /* RLC 09 Mar 1999: Support internal ZLIB */ -STATIC_OVL boolean +static boolean make_compressed_name(filename, cfn) const char *filename; char *cfn; @@ -1716,7 +1716,7 @@ char *cfn; #endif /* SHORT_FILENAMES */ } -STATIC_OVL void +static void docompress_file(filename, uncomp) const char *filename; boolean uncomp; @@ -1856,7 +1856,7 @@ struct flock sflock; /* for unlocking, same as above */ #define HUP if (!g.program_state.done_hup) #ifndef USE_FCNTL -STATIC_OVL char * +static char * make_lockname(filename, lockname) const char *filename; char *lockname; @@ -2136,7 +2136,7 @@ const char *backward_compat_configfile = "nethack.cnf"; /* remember the name of the file we're accessing; if may be used in option reject messages */ -STATIC_OVL void +static void set_configfile_name(fname) const char *fname; { @@ -2148,7 +2148,7 @@ const char *fname; #define fopenp fopen #endif -STATIC_OVL FILE * +static FILE * fopen_config_file(filename, src) const char *filename; int src; @@ -2291,7 +2291,7 @@ int src; * NOTE: zeros are inserted unless modlist is TRUE, in which case the list * location is unchanged. Callers must handle zeros if modlist is FALSE. */ -STATIC_OVL int +static int get_uchars(bufp, list, modlist, size, name) char *bufp; /* current pointer */ uchar *list; /* return list */ @@ -2352,7 +2352,7 @@ const char *name; /* name of option for error message */ } #ifdef NOCWD_ASSUMPTIONS -STATIC_OVL void +static void adjust_prefix(bufp, prefixid) char *bufp; int prefixid; @@ -2373,7 +2373,7 @@ int prefixid; #endif /* Choose at random one of the sep separated parts from str. Mangles str. */ -STATIC_OVL char * +static char * choose_random_part(str,sep) char *str; char sep; @@ -2413,7 +2413,7 @@ char sep; return (char *) 0; } -STATIC_OVL void +static void free_config_sections() { if (g.config_section_chosen) { @@ -2426,7 +2426,7 @@ free_config_sections() } } -STATIC_OVL boolean +static boolean is_config_section(str) const char *str; { @@ -2435,7 +2435,7 @@ const char *str; return (a && *str == '[' && *(a+1) == '\0' && (int)(a - str) > 0); } -STATIC_OVL boolean +static boolean handle_config_section(buf) char *buf; { @@ -2998,7 +2998,7 @@ boolean secure; config_error_data = tmp; } -STATIC_OVL boolean +static boolean config_error_nextline(line) const char *line; { @@ -3099,7 +3099,7 @@ int src; return rv; } -STATIC_OVL FILE * +static FILE * fopen_wizkit_file() { FILE *fp; @@ -3171,7 +3171,7 @@ fopen_wizkit_file() } /* add to hero's inventory if there's room, otherwise put item on floor */ -STATIC_DCL void +static void wizkit_addinv(obj) struct obj *obj; { @@ -3242,7 +3242,7 @@ read_wizkit() * * Continued lines are merged together with one space in between. */ -STATIC_OVL boolean +static boolean parse_conf_file(fp, proc) FILE *fp; boolean FDECL((*proc), (char *)); @@ -3377,7 +3377,7 @@ boolean FDECL((*proc), (char *)); extern const char *known_handling[]; /* drawing.c */ extern const char *known_restrictions[]; /* drawing.c */ -STATIC_OVL +static FILE * fopen_sym_file() { @@ -3616,7 +3616,7 @@ int which_set; return 1; } -STATIC_OVL void +static void set_symhandling(handling, which_set) char *handling; int which_set; diff --git a/src/fountain.c b/src/fountain.c index 68fe47e5e..d01966119 100644 --- a/src/fountain.c +++ b/src/fountain.c @@ -6,11 +6,11 @@ #include "hack.h" -STATIC_DCL void NDECL(dowatersnakes); -STATIC_DCL void NDECL(dowaterdemon); -STATIC_DCL void NDECL(dowaternymph); -STATIC_PTR void FDECL(gush, (int, int, genericptr_t)); -STATIC_DCL void NDECL(dofindgem); +static void NDECL(dowatersnakes); +static void NDECL(dowaterdemon); +static void NDECL(dowaternymph); +static void FDECL(gush, (int, int, genericptr_t)); +static void NDECL(dofindgem); /* used when trying to dip in or drink from fountain or sink or pool while levitating above it, or when trying to move downwards in that state */ @@ -30,7 +30,7 @@ const char *what; } /* Fountain of snakes! */ -STATIC_OVL void +static void dowatersnakes() { register int num = rn1(5, 2); @@ -52,7 +52,7 @@ dowatersnakes() } /* Water demon */ -STATIC_OVL void +static void dowaterdemon() { struct monst *mtmp; @@ -80,7 +80,7 @@ dowaterdemon() } /* Water Nymph */ -STATIC_OVL void +static void dowaternymph() { register struct monst *mtmp; @@ -117,7 +117,7 @@ int drinking; } } -STATIC_PTR void +static void gush(x, y, poolcnt) int x, y; genericptr_t poolcnt; @@ -149,7 +149,7 @@ genericptr_t poolcnt; } /* Find a gem in the sparkling waters. */ -STATIC_OVL void +static void dofindgem() { if (!Blind) diff --git a/src/hack.c b/src/hack.c index 8bd90c8d1..1c1e29391 100644 --- a/src/hack.c +++ b/src/hack.c @@ -7,17 +7,17 @@ /* #define DEBUG */ /* uncomment for debugging */ -STATIC_DCL void NDECL(maybe_wail); -STATIC_DCL int NDECL(moverock); -STATIC_DCL int FDECL(still_chewing, (XCHAR_P, XCHAR_P)); -STATIC_DCL void NDECL(dosinkfall); -STATIC_DCL boolean FDECL(findtravelpath, (int)); -STATIC_DCL boolean FDECL(trapmove, (int, int, struct trap *)); -STATIC_DCL struct monst *FDECL(monstinroom, (struct permonst *, int)); -STATIC_DCL boolean FDECL(doorless_door, (int, int)); -STATIC_DCL void FDECL(move_update, (BOOLEAN_P)); -STATIC_DCL void FDECL(maybe_smudge_engr, (int, int, int, int)); -STATIC_DCL void NDECL(domove_core); +static void NDECL(maybe_wail); +static int NDECL(moverock); +static int FDECL(still_chewing, (XCHAR_P, XCHAR_P)); +static void NDECL(dosinkfall); +static boolean FDECL(findtravelpath, (int)); +static boolean FDECL(trapmove, (int, int, struct trap *)); +static struct monst *FDECL(monstinroom, (struct permonst *, int)); +static boolean FDECL(doorless_door, (int, int)); +static void FDECL(move_update, (BOOLEAN_P)); +static void FDECL(maybe_smudge_engr, (int, int, int, int)); +static void NDECL(domove_core); #define IS_SHOP(x) (g.rooms[x].rtype >= SHOPBASE) @@ -99,7 +99,7 @@ const char *msg; return revived; } -STATIC_OVL int +static int moverock() { register xchar rx, ry, sx, sy; @@ -366,7 +366,7 @@ moverock() * Chew on a wall, door, or boulder. [What about statues?] * Returns TRUE if still eating, FALSE when done. */ -STATIC_OVL int +static int still_chewing(x, y) xchar x, y; { @@ -531,7 +531,7 @@ register xchar ox, oy; static NEARDATA const char fell_on_sink[] = "fell onto a sink"; -STATIC_OVL void +static void dosinkfall() { register struct obj *obj; @@ -908,7 +908,7 @@ int mode; * inaccessible locations as valid intermediate path points. * Returns TRUE if a path was found. */ -STATIC_OVL boolean +static boolean findtravelpath(mode) int mode; { @@ -1173,7 +1173,7 @@ int x,y; /* try to escape being stuck in a trapped state by walking out of it; return true iff moving should continue to intended destination (all failures and most successful escapes leave hero at original spot) */ -STATIC_OVL boolean +static boolean trapmove(x, y, desttrap) int x, y; /* targetted destination, */ struct trap *desttrap; /* nonnull if another trap at */ @@ -1341,7 +1341,7 @@ domove() g.domove_attempting = 0L; } -STATIC_OVL void +static void domove_core() { register struct monst *mtmp; @@ -1939,7 +1939,7 @@ domove_core() } } -STATIC_OVL void +static void maybe_smudge_engr(x1,y1,x2,y2) int x1, y1, x2, y2; { @@ -2267,7 +2267,7 @@ boolean pick; } /* returns first matching monster */ -STATIC_OVL struct monst * +static struct monst * monstinroom(mdat, roomno) struct permonst *mdat; int roomno; @@ -2378,7 +2378,7 @@ register int x, y; return !has_subrooms; } -STATIC_OVL void +static void move_update(newlev) register boolean newlev; { @@ -2810,7 +2810,7 @@ lookaround() } /* check for a doorway which lacks its door (NODOOR or BROKEN) */ -STATIC_OVL boolean +static boolean doorless_door(x, y) int x, y; { @@ -2925,7 +2925,7 @@ const char *msg_override; } } -STATIC_OVL void +static void maybe_wail() { static short powers[] = { TELEPORT, SEE_INVIS, POISON_RES, COLD_RES, diff --git a/src/hacklib.c b/src/hacklib.c index d8d05c638..ef3e0df0f 100644 --- a/src/hacklib.c +++ b/src/hacklib.c @@ -849,7 +849,7 @@ boolean caseblind; && !defined(_DCC) && !defined(__GNUC__) extern struct tm *FDECL(localtime, (time_t *)); #endif -STATIC_DCL struct tm *NDECL(getlt); +static struct tm *NDECL(getlt); /* Sets the seed for the random number generator */ #ifdef USE_ISAAC64 @@ -930,7 +930,7 @@ getnow() return datetime; } -STATIC_OVL struct tm * +static struct tm * getlt() { time_t date = getnow(); diff --git a/src/invent.c b/src/invent.c index c9d5019f0..4bf1ce934 100644 --- a/src/invent.c +++ b/src/invent.c @@ -13,31 +13,31 @@ #define CONTAINED_SYM '>' /* designator for inside a container */ #define HANDS_SYM '-' -STATIC_DCL void FDECL(loot_classify, (Loot *, struct obj *)); -STATIC_DCL char *FDECL(loot_xname, (struct obj *)); -STATIC_DCL int FDECL(CFDECLSPEC sortloot_cmp, (const genericptr, +static void FDECL(loot_classify, (Loot *, struct obj *)); +static char *FDECL(loot_xname, (struct obj *)); +static int FDECL(CFDECLSPEC sortloot_cmp, (const genericptr, const genericptr)); -STATIC_DCL void NDECL(reorder_invent); -STATIC_DCL void FDECL(noarmor, (BOOLEAN_P)); -STATIC_DCL void FDECL(invdisp_nothing, (const char *, const char *)); -STATIC_DCL boolean FDECL(worn_wield_only, (struct obj *)); -STATIC_DCL boolean FDECL(only_here, (struct obj *)); -STATIC_DCL void FDECL(compactify, (char *)); -STATIC_DCL boolean FDECL(taking_off, (const char *)); -STATIC_DCL boolean FDECL(putting_on, (const char *)); -STATIC_PTR int FDECL(ckvalidcat, (struct obj *)); -STATIC_PTR int FDECL(ckunpaid, (struct obj *)); -STATIC_PTR char *FDECL(safeq_xprname, (struct obj *)); -STATIC_PTR char *FDECL(safeq_shortxprname, (struct obj *)); -STATIC_DCL char FDECL(display_pickinv, (const char *, const char *, +static void NDECL(reorder_invent); +static void FDECL(noarmor, (BOOLEAN_P)); +static void FDECL(invdisp_nothing, (const char *, const char *)); +static boolean FDECL(worn_wield_only, (struct obj *)); +static boolean FDECL(only_here, (struct obj *)); +static void FDECL(compactify, (char *)); +static boolean FDECL(taking_off, (const char *)); +static boolean FDECL(putting_on, (const char *)); +static int FDECL(ckvalidcat, (struct obj *)); +static int FDECL(ckunpaid, (struct obj *)); +static char *FDECL(safeq_xprname, (struct obj *)); +static char *FDECL(safeq_shortxprname, (struct obj *)); +static char FDECL(display_pickinv, (const char *, const char *, const char *, BOOLEAN_P, long *)); -STATIC_DCL char FDECL(display_used_invlets, (CHAR_P)); -STATIC_DCL boolean FDECL(this_type_only, (struct obj *)); -STATIC_DCL void NDECL(dounpaid); -STATIC_DCL struct obj *FDECL(find_unpaid, (struct obj *, struct obj **)); -STATIC_DCL void FDECL(menu_identify, (int)); -STATIC_DCL boolean FDECL(tool_in_use, (struct obj *)); -STATIC_DCL char FDECL(obj_to_let, (struct obj *)); +static char FDECL(display_used_invlets, (CHAR_P)); +static boolean FDECL(this_type_only, (struct obj *)); +static void NDECL(dounpaid); +static struct obj *FDECL(find_unpaid, (struct obj *, struct obj **)); +static void FDECL(menu_identify, (int)); +static boolean FDECL(tool_in_use, (struct obj *)); +static char FDECL(obj_to_let, (struct obj *)); /* wizards can wish for venom, which will become an invisible inventory * item without this. putting it in inv_order would mean venom would @@ -51,7 +51,7 @@ STATIC_DCL char FDECL(obj_to_let, (struct obj *)); static const char venom_inv[] = { VENOM_CLASS, 0 }; /* (constant) */ /* sortloot() classification; called at most once [per sort] for each object */ -STATIC_OVL void +static void loot_classify(sort_item, obj) Loot *sort_item; struct obj *obj; @@ -209,7 +209,7 @@ struct obj *obj; } /* sortloot() formatting routine; for alphabetizing, not shown to user */ -STATIC_OVL char * +static char * loot_xname(obj) struct obj *obj; { @@ -293,7 +293,7 @@ struct obj *obj; } /* qsort comparison routine for sortloot() */ -STATIC_OVL int CFDECLSPEC +static int CFDECLSPEC sortloot_cmp(vptr1, vptr2) const genericptr vptr1; const genericptr vptr2; @@ -620,7 +620,7 @@ register struct obj *otmp; #define inv_rank(o) ((o)->invlet ^ 040) /* sort the inventory; used by addinv() and doorganize() */ -STATIC_OVL void +static void reorder_invent() { struct obj *otmp, *prev, *next; @@ -1344,7 +1344,7 @@ register int x, y; } /* compact a string of inventory letters by dashing runs of letters */ -STATIC_OVL void +static void compactify(buf) register char *buf; { @@ -1391,7 +1391,7 @@ struct obj *obj; } /* match the prompt for either 'T' or 'R' command */ -STATIC_OVL boolean +static boolean taking_off(action) const char *action; { @@ -1399,7 +1399,7 @@ const char *action; } /* match the prompt for either 'W' or 'P' command */ -STATIC_OVL boolean +static boolean putting_on(action) const char *action; { @@ -1856,7 +1856,7 @@ struct obj *otmp; pline(silly_thing_to, word); } -STATIC_PTR int +static int ckvalidcat(otmp) struct obj *otmp; { @@ -1864,7 +1864,7 @@ struct obj *otmp; return (int) allow_category(otmp); } -STATIC_PTR int +static int ckunpaid(otmp) struct obj *otmp; { @@ -1888,13 +1888,13 @@ struct obj *otmp; } /* extra xprname() input that askchain() can't pass through safe_qbuf() */ -STATIC_VAR struct xprnctx { +static struct xprnctx { char let; boolean dot; } safeq_xprn_ctx; /* safe_qbuf() -> short_oname() callback */ -STATIC_PTR char * +static char * safeq_xprname(obj) struct obj *obj; { @@ -1903,7 +1903,7 @@ struct obj *obj; } /* alternate safe_qbuf() -> short_oname() callback */ -STATIC_PTR char * +static char * safeq_shortxprname(obj) struct obj *obj; { @@ -2281,7 +2281,7 @@ struct obj *otmp; } /* menu of unidentified objects; select and identify up to id_limit of them */ -STATIC_OVL void +static void menu_identify(id_limit) int id_limit; { @@ -2394,7 +2394,7 @@ learn_unseen_invent() } /* should of course only be called for things in invent */ -STATIC_OVL char +static char obj_to_let(obj) struct obj *obj; { @@ -2484,7 +2484,7 @@ ddoinv() * next unpaid object is returned. This routine recursively follows * containers. */ -STATIC_OVL struct obj * +static struct obj * find_unpaid(list, last_found) struct obj *list, **last_found; { @@ -2522,7 +2522,7 @@ free_pickinv_cache() * inventory and return a count as well as a letter. If out_cnt is not null, * any count returned from the menu selection is placed here. */ -STATIC_OVL char +static char display_pickinv(lets, xtra_choice, query, want_reply, out_cnt) register const char *lets; const char *xtra_choice; /* "fingers", pick hands rather than an object */ @@ -2774,7 +2774,7 @@ boolean want_reply; * Show what is current using inventory letters. * */ -STATIC_OVL char +static char display_used_invlets(avoidlet) char avoidlet; { @@ -2959,7 +2959,7 @@ boolean nested, /* include contents of any nested containers */ return count; } -STATIC_OVL void +static void dounpaid() { winid win; @@ -3061,7 +3061,7 @@ dounpaid() } -STATIC_OVL boolean +static boolean this_type_only(obj) struct obj *obj; { @@ -3701,7 +3701,7 @@ doprwep() } /* caller is responsible for checking !wearing_armor() */ -STATIC_OVL void +static void noarmor(report_uskin) boolean report_uskin; { @@ -3790,7 +3790,7 @@ dopramulet() return 0; } -STATIC_OVL boolean +static boolean tool_in_use(obj) struct obj *obj; { @@ -3873,13 +3873,13 @@ long numused; * Conversion from a class to a string for printing. * This must match the object class order. */ -STATIC_VAR NEARDATA const char *names[] = { +static NEARDATA const char *names[] = { 0, "Illegal objects", "Weapons", "Armor", "Rings", "Amulets", "Tools", "Comestibles", "Potions", "Scrolls", "Spellbooks", "Wands", "Coins", "Gems/Stones", "Boulders/Statues", "Iron balls", "Chains", "Venoms" }; -STATIC_VAR NEARDATA const char oth_symbols[] = { CONTAINED_SYM, '\0' }; -STATIC_VAR NEARDATA const char *oth_names[] = { "Bagged/Boxed items" }; +static NEARDATA const char oth_symbols[] = { CONTAINED_SYM, '\0' }; +static NEARDATA const char *oth_names[] = { "Bagged/Boxed items" }; char * let_to_name(let, unpaid, showsym) @@ -4239,7 +4239,7 @@ doorganize() /* inventory organizer by Del Lamb */ } /* common to display_minventory and display_cinventory */ -STATIC_OVL void +static void invdisp_nothing(hdr, txt) const char *hdr, *txt; { @@ -4262,7 +4262,7 @@ const char *hdr, *txt; } /* query_objlist callback: return things that are worn or wielded */ -STATIC_OVL boolean +static boolean worn_wield_only(obj) struct obj *obj; { @@ -4375,7 +4375,7 @@ register struct obj *obj; } -STATIC_OVL boolean +static boolean only_here(obj) struct obj *obj; { diff --git a/src/light.c b/src/light.c index f4c8dcd60..328a69f1c 100644 --- a/src/light.c +++ b/src/light.c @@ -45,8 +45,8 @@ #define LSF_NEEDS_FIXUP 0x2 /* need oid fixup */ /* SAVE2018 */ -STATIC_DCL void FDECL(write_ls, (NHFILE *, light_source *)); -STATIC_DCL int FDECL(maybe_write_ls, (NHFILE *, int, BOOLEAN_P)); +static void FDECL(write_ls, (NHFILE *, light_source *)); +static int FDECL(maybe_write_ls, (NHFILE *, int, BOOLEAN_P)); /* imported from vision.c, for small circles */ extern char circle_data[]; @@ -453,7 +453,7 @@ boolean ghostly; * sources that would be written. If write_it is true, actually write * the light source out. */ -STATIC_OVL int +static int maybe_write_ls(nhfp, range, write_it) NHFILE *nhfp; int range; @@ -520,14 +520,14 @@ light_sources_sanity_check() /* SAVE2018 */ #if 0 -STATIC_OVL void +static void write_ls(fd, ls) int fd; light_source *ls; #endif /* 0 */ /* Write a light source structure to disk. */ -STATIC_OVL void +static void write_ls(nhfp, ls) NHFILE *nhfp; light_source *ls; diff --git a/src/lock.c b/src/lock.c index 6dbc39287..1ebb9cdac 100644 --- a/src/lock.c +++ b/src/lock.c @@ -6,12 +6,12 @@ #include "hack.h" /* occupation callbacks */ -STATIC_PTR int NDECL(picklock); -STATIC_PTR int NDECL(forcelock); +static int NDECL(picklock); +static int NDECL(forcelock); -STATIC_DCL const char *NDECL(lock_action); -STATIC_DCL boolean FDECL(obstructed, (int, int, BOOLEAN_P)); -STATIC_DCL void FDECL(chest_shatter_msg, (struct obj *)); +static const char *NDECL(lock_action); +static boolean FDECL(obstructed, (int, int, BOOLEAN_P)); +static void FDECL(chest_shatter_msg, (struct obj *)); boolean picking_lock(x, y) @@ -35,7 +35,7 @@ int x, y; } /* produce an occupation string appropriate for the current activity */ -STATIC_OVL const char * +static const char * lock_action() { /* "unlocking"+2 == "locking" */ @@ -65,7 +65,7 @@ lock_action() } /* try to open/close a lock */ -STATIC_PTR int +static int picklock(VOID_ARGS) { if (g.xlock.box) { @@ -211,7 +211,7 @@ boolean destroyit; } /* try to force a locked chest */ -STATIC_PTR int +static int forcelock(VOID_ARGS) { if ((g.xlock.box->ox != u.ux) || (g.xlock.box->oy != u.uy)) @@ -729,7 +729,7 @@ int x, y; return 1; } -STATIC_OVL boolean +static boolean obstructed(x, y, quietly) register int x, y; boolean quietly; @@ -1061,7 +1061,7 @@ int x, y; return res; } -STATIC_OVL void +static void chest_shatter_msg(otmp) struct obj *otmp; { diff --git a/src/mail.c b/src/mail.c index 292ca3409..141823b55 100644 --- a/src/mail.c +++ b/src/mail.c @@ -36,10 +36,10 @@ * random intervals. */ -STATIC_DCL boolean FDECL(md_start, (coord *)); -STATIC_DCL boolean FDECL(md_stop, (coord *, coord *)); -STATIC_DCL boolean FDECL(md_rush, (struct monst *, int, int)); -STATIC_DCL void FDECL(newmail, (struct mail_info *)); +static boolean FDECL(md_start, (coord *)); +static boolean FDECL(md_stop, (coord *, coord *)); +static boolean FDECL(md_rush, (struct monst *, int, int)); +static void FDECL(newmail, (struct mail_info *)); #if !defined(UNIX) && !defined(VMS) int mustgetmail = -1; @@ -138,7 +138,7 @@ getmailstatus() * Pick coordinates for a starting position for the mail daemon. Called * from newmail() and newphone(). */ -STATIC_OVL boolean +static boolean md_start(startp) coord *startp; { @@ -238,7 +238,7 @@ coord *startp; * enexto(). Use enexto() as a last resort because enexto() chooses * its point randomly, which is not what we want. */ -STATIC_OVL boolean +static boolean md_stop(stopp, startp) coord *stopp; /* stopping position (we fill it in) */ coord *startp; /* starting position (read only) */ @@ -279,7 +279,7 @@ static NEARDATA const char *mail_text[] = { "Gangway!", "Look out!", * FALSE if the md gets stuck in a position where there is a monster. Return * TRUE otherwise. */ -STATIC_OVL boolean +static boolean md_rush(md, tx, ty) struct monst *md; register int tx, ty; /* destination of mail daemon */ @@ -382,7 +382,7 @@ register int tx, ty; /* destination of mail daemon */ /* Deliver a scroll of mail. */ /*ARGSUSED*/ -STATIC_OVL void +static void newmail(info) struct mail_info *info; { diff --git a/src/makemon.c b/src/makemon.c index 726b671d3..f38864433 100644 --- a/src/makemon.c +++ b/src/makemon.c @@ -14,15 +14,15 @@ (mptr->mlet == S_HUMAN && Role_if(role_pm) \ && (mptr->msound == MS_LEADER || mptr->msound == MS_NEMESIS)) -STATIC_DCL boolean FDECL(uncommon, (int)); -STATIC_DCL int FDECL(align_shift, (struct permonst *)); -STATIC_DCL boolean FDECL(mk_gen_ok, (int, int, int)); -STATIC_DCL boolean FDECL(wrong_elem_type, (struct permonst *)); -STATIC_DCL void FDECL(m_initgrp, (struct monst *, int, int, int, int)); -STATIC_DCL void FDECL(m_initthrow, (struct monst *, int, int)); -STATIC_DCL void FDECL(m_initweap, (struct monst *)); -STATIC_DCL void FDECL(m_initinv, (struct monst *)); -STATIC_DCL boolean FDECL(makemon_rnd_goodpos, (struct monst *, +static boolean FDECL(uncommon, (int)); +static int FDECL(align_shift, (struct permonst *)); +static boolean FDECL(mk_gen_ok, (int, int, int)); +static boolean FDECL(wrong_elem_type, (struct permonst *)); +static void FDECL(m_initgrp, (struct monst *, int, int, int, int)); +static void FDECL(m_initthrow, (struct monst *, int, int)); +static void FDECL(m_initweap, (struct monst *)); +static void FDECL(m_initinv, (struct monst *)); +static boolean FDECL(makemon_rnd_goodpos, (struct monst *, unsigned, coord *)); #define m_initsgrp(mtmp, x, y, mmf) m_initgrp(mtmp, x, y, 3, mmf) @@ -51,7 +51,7 @@ struct permonst *ptr; /* * Return true if the given monster cannot exist on this elemental level. */ -STATIC_OVL boolean +static boolean wrong_elem_type(ptr) struct permonst *ptr; { @@ -75,7 +75,7 @@ struct permonst *ptr; } /* make a group just like mtmp */ -STATIC_OVL void +static void m_initgrp(mtmp, x, y, n, mmflags) struct monst *mtmp; int x, y, n, mmflags; @@ -143,7 +143,7 @@ int x, y, n, mmflags; } } -STATIC_OVL +static void m_initthrow(mtmp, otyp, oquan) struct monst *mtmp; @@ -159,7 +159,7 @@ int otyp, oquan; (void) mpickobj(mtmp, otmp); } -STATIC_OVL void +static void m_initweap(mtmp) register struct monst *mtmp; { @@ -575,7 +575,7 @@ long amount; add_to_minv(mtmp, gold); } -STATIC_OVL void +static void m_initinv(mtmp) register struct monst *mtmp; { @@ -1033,7 +1033,7 @@ newmextra() return mextra; } -STATIC_OVL boolean +static boolean makemon_rnd_goodpos(mon, gpflags, cc) struct monst *mon; unsigned gpflags; @@ -1465,7 +1465,7 @@ boolean neverask; return known; } -STATIC_OVL boolean +static boolean uncommon(mndx) int mndx; { @@ -1484,7 +1484,7 @@ int mndx; * comparing the dungeon alignment and monster alignment. * return an integer in the range of 0-5. */ -STATIC_OVL int +static int align_shift(ptr) register struct permonst *ptr; { @@ -1614,7 +1614,7 @@ int mndx; /* particular species that can no longer be created */ } /* decide whether it's ok to generate a candidate monster by mkclass() */ -STATIC_OVL boolean +static boolean mk_gen_ok(mndx, mvflagsmask, genomask) int mndx, mvflagsmask, genomask; { diff --git a/src/mcastu.c b/src/mcastu.c index 9978742cd..5766f061c 100644 --- a/src/mcastu.c +++ b/src/mcastu.c @@ -35,20 +35,20 @@ enum mcast_cleric_spells { CLC_GEYSER }; -STATIC_DCL void FDECL(cursetxt, (struct monst *, BOOLEAN_P)); -STATIC_DCL int FDECL(choose_magic_spell, (int)); -STATIC_DCL int FDECL(choose_clerical_spell, (int)); -STATIC_DCL int FDECL(m_cure_self, (struct monst *, 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, (unsigned int, int)); -STATIC_DCL boolean +static void FDECL(cursetxt, (struct monst *, BOOLEAN_P)); +static int FDECL(choose_magic_spell, (int)); +static int FDECL(choose_clerical_spell, (int)); +static int FDECL(m_cure_self, (struct monst *, int)); +static void FDECL(cast_wizard_spell, (struct monst *, int, int)); +static void FDECL(cast_cleric_spell, (struct monst *, int, int)); +static boolean FDECL(is_undirected_spell, (unsigned int, int)); +static boolean FDECL(spell_would_be_useless, (struct monst *, unsigned int, int)); extern const char *const flash_types[]; /* from zap.c */ /* feedback when frustrated monster couldn't cast a spell */ -STATIC_OVL +static void cursetxt(mtmp, undirected) struct monst *mtmp; @@ -78,7 +78,7 @@ boolean undirected; /* convert a level based random selection into a specific mage spell; inappropriate choices will be screened out by spell_would_be_useless() */ -STATIC_OVL int +static int choose_magic_spell(spellval) int spellval; { @@ -133,7 +133,7 @@ int spellval; } /* convert a level based random selection into a specific cleric spell */ -STATIC_OVL int +static int choose_clerical_spell(spellnum) int spellnum; { @@ -337,7 +337,7 @@ boolean foundyou; return (ret); } -STATIC_OVL int +static int m_cure_self(mtmp, dmg) struct monst *mtmp; int dmg; @@ -362,7 +362,7 @@ int dmg; If you modify either of these, be sure to change is_undirected_spell() and spell_would_be_useless(). */ -STATIC_OVL +static void cast_wizard_spell(mtmp, dmg, spellnum) struct monst *mtmp; @@ -519,7 +519,7 @@ int spellnum; mdamageu(mtmp, dmg); } -STATIC_OVL +static void cast_cleric_spell(mtmp, dmg, spellnum) struct monst *mtmp; @@ -731,7 +731,7 @@ int spellnum; mdamageu(mtmp, dmg); } -STATIC_DCL +static boolean is_undirected_spell(adtyp, spellnum) unsigned int adtyp; @@ -762,7 +762,7 @@ int spellnum; } /* Some spells are useless under some circumstances. */ -STATIC_DCL +static boolean spell_would_be_useless(mtmp, adtyp, spellnum) struct monst *mtmp; diff --git a/src/mhitm.c b/src/mhitm.c index 4ec135520..7420cc1ab 100644 --- a/src/mhitm.c +++ b/src/mhitm.c @@ -9,26 +9,26 @@ static const char brief_feeling[] = "have a %s feeling for a moment, then it passes."; -STATIC_DCL int FDECL(hitmm, (struct monst *, struct monst *, +static int FDECL(hitmm, (struct monst *, struct monst *, struct attack *)); -STATIC_DCL int FDECL(gazemm, (struct monst *, struct monst *, +static int FDECL(gazemm, (struct monst *, struct monst *, struct attack *)); -STATIC_DCL int FDECL(gulpmm, (struct monst *, struct monst *, +static int FDECL(gulpmm, (struct monst *, struct monst *, struct attack *)); -STATIC_DCL int FDECL(explmm, (struct monst *, struct monst *, +static int FDECL(explmm, (struct monst *, struct monst *, struct attack *)); -STATIC_DCL int FDECL(mdamagem, (struct monst *, struct monst *, +static int FDECL(mdamagem, (struct monst *, struct monst *, struct attack *)); -STATIC_DCL void FDECL(mswingsm, (struct monst *, struct monst *, +static void FDECL(mswingsm, (struct monst *, struct monst *, struct obj *)); -STATIC_DCL void FDECL(noises, (struct monst *, struct attack *)); -STATIC_DCL void FDECL(missmm, (struct monst *, struct monst *, +static void FDECL(noises, (struct monst *, struct attack *)); +static void FDECL(missmm, (struct monst *, struct monst *, struct attack *)); -STATIC_DCL int FDECL(passivemm, (struct monst *, struct monst *, +static int FDECL(passivemm, (struct monst *, struct monst *, BOOLEAN_P, int)); -STATIC_OVL void +static void noises(magr, mattk) register struct monst *magr; register struct attack *mattk; @@ -44,7 +44,7 @@ register struct attack *mattk; } } -STATIC_OVL +static void missmm(magr, mdef, mattk) register struct monst *magr, *mdef; @@ -496,7 +496,7 @@ register struct monst *magr, *mdef; } /* Returns the result of mdamagem(). */ -STATIC_OVL int +static int hitmm(magr, mdef, mattk) register struct monst *magr, *mdef; struct attack *mattk; @@ -556,7 +556,7 @@ struct attack *mattk; } /* Returns the same values as mdamagem(). */ -STATIC_OVL int +static int gazemm(magr, mdef, mattk) register struct monst *magr, *mdef; struct attack *mattk; @@ -642,7 +642,7 @@ struct monst *magr, *mdef; } /* Returns the same values as mattackm(). */ -STATIC_OVL int +static int gulpmm(magr, mdef, mattk) register struct monst *magr, *mdef; register struct attack *mattk; @@ -730,7 +730,7 @@ register struct attack *mattk; return status; } -STATIC_OVL int +static int explmm(magr, mdef, mattk) struct monst *magr, *mdef; struct attack *mattk; @@ -1471,7 +1471,7 @@ struct obj *obj; (void) erode_obj(obj, (char *) 0, dmgtyp, EF_GREASE | EF_VERBOSE); } -STATIC_OVL void +static void mswingsm(magr, mdef, otemp) struct monst *magr, *mdef; struct obj *otemp; @@ -1488,7 +1488,7 @@ struct obj *otemp; * Passive responses by defenders. Does not replicate responses already * handled above. Returns same values as mattackm. */ -STATIC_OVL int +static int passivemm(magr, mdef, mhit, mdead) register struct monst *magr, *mdef; boolean mhit; diff --git a/src/mhitu.c b/src/mhitu.c index c4527a26c..b063ba367 100644 --- a/src/mhitu.c +++ b/src/mhitu.c @@ -6,23 +6,23 @@ #include "hack.h" #include "artifact.h" -STATIC_VAR NEARDATA struct obj *mon_currwep = (struct obj *) 0; +static NEARDATA struct obj *mon_currwep = (struct obj *) 0; -STATIC_DCL boolean FDECL(u_slip_free, (struct monst *, struct attack *)); -STATIC_DCL int FDECL(passiveum, (struct permonst *, struct monst *, +static boolean FDECL(u_slip_free, (struct monst *, struct attack *)); +static int FDECL(passiveum, (struct permonst *, struct monst *, struct attack *)); -STATIC_DCL void FDECL(mayberem, (struct monst *, const char *, +static void FDECL(mayberem, (struct monst *, const char *, struct obj *, const char *)); -STATIC_DCL boolean FDECL(diseasemu, (struct permonst *)); -STATIC_DCL int FDECL(hitmu, (struct monst *, struct attack *)); -STATIC_DCL int FDECL(gulpmu, (struct monst *, struct attack *)); -STATIC_DCL int FDECL(explmu, (struct monst *, struct attack *, BOOLEAN_P)); -STATIC_DCL void FDECL(missmu, (struct monst *, BOOLEAN_P, struct attack *)); -STATIC_DCL void FDECL(mswings, (struct monst *, struct obj *)); -STATIC_DCL void FDECL(wildmiss, (struct monst *, struct attack *)); -STATIC_DCL void FDECL(hitmsg, (struct monst *, struct attack *)); +static boolean FDECL(diseasemu, (struct permonst *)); +static int FDECL(hitmu, (struct monst *, struct attack *)); +static int FDECL(gulpmu, (struct monst *, struct attack *)); +static int FDECL(explmu, (struct monst *, struct attack *, BOOLEAN_P)); +static void FDECL(missmu, (struct monst *, BOOLEAN_P, struct attack *)); +static void FDECL(mswings, (struct monst *, struct obj *)); +static void FDECL(wildmiss, (struct monst *, struct attack *)); +static void FDECL(hitmsg, (struct monst *, struct attack *)); -STATIC_OVL void +static void hitmsg(mtmp, mattk) struct monst *mtmp; struct attack *mattk; @@ -73,7 +73,7 @@ struct attack *mattk; } /* monster missed you */ -STATIC_OVL void +static void missmu(mtmp, nearmiss, mattk) struct monst *mtmp; boolean nearmiss; @@ -92,7 +92,7 @@ struct attack *mattk; } /* monster swings obj */ -STATIC_OVL void +static void mswings(mtmp, otemp) struct monst *mtmp; struct obj *otemp; @@ -135,7 +135,7 @@ u_slow_down() } /* monster attacked your displaced image */ -STATIC_OVL void +static void wildmiss(mtmp, mattk) struct monst *mtmp; struct attack *mattk; @@ -809,7 +809,7 @@ register struct monst *mtmp; return 0; } -STATIC_OVL boolean +static boolean diseasemu(mdat) struct permonst *mdat; { @@ -824,7 +824,7 @@ struct permonst *mdat; } /* check whether slippery clothing protects from hug or wrap attack */ -STATIC_OVL boolean +static boolean u_slip_free(mtmp, mattk) struct monst *mtmp; struct attack *mattk; @@ -913,7 +913,7 @@ struct monst *mon; * 3 if the monster lives but teleported/paralyzed, so it can't keep * attacking you */ -STATIC_OVL int +static int hitmu(mtmp, mattk) register struct monst *mtmp; register struct attack *mattk; @@ -1772,7 +1772,7 @@ gulp_blnd_check() } /* monster swallows you, or damage if u.uswallow */ -STATIC_OVL int +static int gulpmu(mtmp, mattk) struct monst *mtmp; struct attack *mattk; @@ -2023,7 +2023,7 @@ struct attack *mattk; } /* monster explodes in your face */ -STATIC_OVL int +static int explmu(mtmp, mattk, ufound) struct monst *mtmp; struct attack *mattk; @@ -2713,7 +2713,7 @@ struct monst *mon; return 1; } -STATIC_OVL void +static void mayberem(mon, seducer, obj, str) struct monst *mon; const char *seducer; /* only used for alternate message */ @@ -2766,7 +2766,7 @@ const char *str; * to know whether hero reverted in order to decide whether passive * damage applies. */ -STATIC_OVL int +static int passiveum(olduasmon, mtmp, mattk) struct permonst *olduasmon; struct monst *mtmp; diff --git a/src/mklev.c b/src/mklev.c index 9bf6882df..57ee19a63 100644 --- a/src/mklev.c +++ b/src/mklev.c @@ -9,31 +9,31 @@ /* croom->lx etc are schar (width <= int), so % arith ensures that */ /* conversion of result to int is reasonable */ -STATIC_DCL void FDECL(mkfount, (int, struct mkroom *)); -STATIC_DCL void FDECL(mksink, (struct mkroom *)); -STATIC_DCL void FDECL(mkaltar, (struct mkroom *)); -STATIC_DCL void FDECL(mkgrave, (struct mkroom *)); -STATIC_DCL void NDECL(makevtele); -STATIC_DCL void NDECL(clear_level_structures); -STATIC_DCL void NDECL(makelevel); -STATIC_DCL boolean FDECL(bydoor, (XCHAR_P, XCHAR_P)); -STATIC_DCL struct mkroom *FDECL(find_branch_room, (coord *)); -STATIC_DCL struct mkroom *FDECL(pos_to_room, (XCHAR_P, XCHAR_P)); -STATIC_DCL boolean FDECL(place_niche, (struct mkroom *, int *, int *, int *)); -STATIC_DCL void FDECL(makeniche, (int)); -STATIC_DCL void NDECL(make_niches); -STATIC_PTR int FDECL(CFDECLSPEC do_comp, (const genericptr, +static void FDECL(mkfount, (int, struct mkroom *)); +static void FDECL(mksink, (struct mkroom *)); +static void FDECL(mkaltar, (struct mkroom *)); +static void FDECL(mkgrave, (struct mkroom *)); +static void NDECL(makevtele); +static void NDECL(clear_level_structures); +static void NDECL(makelevel); +static boolean FDECL(bydoor, (XCHAR_P, XCHAR_P)); +static struct mkroom *FDECL(find_branch_room, (coord *)); +static struct mkroom *FDECL(pos_to_room, (XCHAR_P, XCHAR_P)); +static boolean FDECL(place_niche, (struct mkroom *, int *, int *, int *)); +static void FDECL(makeniche, (int)); +static void NDECL(make_niches); +static int FDECL(CFDECLSPEC do_comp, (const genericptr, const genericptr)); -STATIC_DCL void FDECL(dosdoor, (XCHAR_P, XCHAR_P, struct mkroom *, int)); -STATIC_DCL void FDECL(join, (int, int, BOOLEAN_P)); -STATIC_DCL void FDECL(do_room_or_subroom, (struct mkroom *, int, int, +static void FDECL(dosdoor, (XCHAR_P, XCHAR_P, struct mkroom *, int)); +static void FDECL(join, (int, int, BOOLEAN_P)); +static void FDECL(do_room_or_subroom, (struct mkroom *, int, int, int, int, BOOLEAN_P, SCHAR_P, BOOLEAN_P, BOOLEAN_P)); -STATIC_DCL void NDECL(makerooms); -STATIC_DCL void FDECL(finddpos, (coord *, XCHAR_P, XCHAR_P, +static void NDECL(makerooms); +static void FDECL(finddpos, (coord *, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P)); -STATIC_DCL void FDECL(mkinvpos, (XCHAR_P, XCHAR_P, int)); -STATIC_DCL void FDECL(mk_knox_portal, (XCHAR_P, XCHAR_P)); +static void FDECL(mkinvpos, (XCHAR_P, XCHAR_P, int)); +static void FDECL(mk_knox_portal, (XCHAR_P, XCHAR_P)); #define create_vault() create_room(-1, -1, 2, 2, -1, -1, VAULT, TRUE) #define init_vault() g.vault_x = -1 @@ -41,7 +41,7 @@ STATIC_DCL void FDECL(mk_knox_portal, (XCHAR_P, XCHAR_P)); /* Args must be (const genericptr) so that qsort will always be happy. */ -STATIC_PTR int CFDECLSPEC +static int CFDECLSPEC do_comp(vx, vy) const genericptr vx; const genericptr vy; @@ -63,7 +63,7 @@ const genericptr vy; #endif /* LINT */ } -STATIC_OVL void +static void finddpos(cc, xl, yl, xh, yh) coord *cc; xchar xl, yl, xh, yh; @@ -105,7 +105,7 @@ sort_rooms() #undef CAST_nroom } -STATIC_OVL void +static void do_room_or_subroom(croom, lowx, lowy, hix, hiy, lit, rtype, special, is_room) register struct mkroom *croom; int lowx, lowy; @@ -217,7 +217,7 @@ boolean special; g.nsubroom++; } -STATIC_OVL void +static void makerooms() { boolean tried_vault = FALSE; @@ -238,7 +238,7 @@ makerooms() return; } -STATIC_OVL void +static void join(a, b, nxcor) register int a, b; boolean nxcor; @@ -378,7 +378,7 @@ register struct mkroom *aroom; g.doors[aroom->fdoor].y = y; } -STATIC_OVL void +static void dosdoor(x, y, aroom, type) register xchar x, y; struct mkroom *aroom; @@ -445,7 +445,7 @@ int type; add_door(x, y, aroom); } -STATIC_OVL boolean +static boolean place_niche(aroom, dy, xx, yy) register struct mkroom *aroom; int *dy, *xx, *yy; @@ -478,7 +478,7 @@ static NEARDATA const char *trap_engravings[TRAPNUM] = { (char *) 0, (char *) 0, (char *) 0, (char *) 0, (char *) 0, }; -STATIC_OVL void +static void makeniche(trap_type) int trap_type; { @@ -543,7 +543,7 @@ int trap_type; } } -STATIC_OVL void +static void make_niches() { int ct = rnd((g.nroom >> 1) + 1), dep = depth(&u.uz); @@ -562,7 +562,7 @@ make_niches() } } -STATIC_OVL void +static void makevtele() { makeniche(TELEP_TRAP); @@ -573,7 +573,7 @@ makevtele() * special) but it's easier to put it all in one place than make sure * each type initializes what it needs to separately. */ -STATIC_OVL void +static void clear_level_structures() { static struct rm zerorm = { cmap_to_glyph(S_stone), @@ -644,7 +644,7 @@ clear_level_structures() clear_regions(); } -STATIC_OVL void +static void makelevel() { register struct mkroom *croom, *troom; @@ -1096,7 +1096,7 @@ struct mkroom *croom; } /* Find an unused room for a branch location. */ -STATIC_OVL struct mkroom * +static struct mkroom * find_branch_room(mp) coord *mp; { @@ -1127,7 +1127,7 @@ coord *mp; } /* Find the room for (x,y). Return null if not in a room. */ -STATIC_OVL struct mkroom * +static struct mkroom * pos_to_room(x, y) xchar x, y; { @@ -1201,7 +1201,7 @@ xchar x, y; /* location */ g.made_branch = TRUE; } -STATIC_OVL boolean +static boolean bydoor(x, y) register xchar x, y; { @@ -1562,7 +1562,7 @@ struct mkroom *croom; levl[x][y].ladder = up ? LA_UP : LA_DOWN; } -STATIC_OVL void +static void mkfount(mazeflag, croom) int mazeflag; struct mkroom *croom; @@ -1588,7 +1588,7 @@ struct mkroom *croom; g.level.flags.nfountains++; } -STATIC_OVL void +static void mksink(croom) struct mkroom *croom; { @@ -1608,7 +1608,7 @@ struct mkroom *croom; g.level.flags.nsinks++; } -STATIC_OVL void +static void mkaltar(croom) struct mkroom *croom; { @@ -1759,7 +1759,7 @@ mkinvokearea() /* Change level topology. Boulders in the vicinity are eliminated. * Temporarily overrides vision in the name of a nice effect. */ -STATIC_OVL void +static void mkinvpos(x, y, dist) xchar x, y; int dist; @@ -1856,7 +1856,7 @@ int dist; * * Ludios will remain isolated until the branch is corrected by this function. */ -STATIC_OVL void +static void mk_knox_portal(x, y) xchar x, y; { diff --git a/src/mkmap.c b/src/mkmap.c index 59eec1949..868e93f36 100644 --- a/src/mkmap.c +++ b/src/mkmap.c @@ -8,20 +8,20 @@ #define HEIGHT (ROWNO - 1) #define WIDTH (COLNO - 2) -STATIC_DCL void FDECL(init_map, (SCHAR_P)); -STATIC_DCL void FDECL(init_fill, (SCHAR_P, SCHAR_P)); -STATIC_DCL schar FDECL(get_map, (int, int, SCHAR_P)); -STATIC_DCL void FDECL(pass_one, (SCHAR_P, SCHAR_P)); -STATIC_DCL void FDECL(pass_two, (SCHAR_P, SCHAR_P)); -STATIC_DCL void FDECL(pass_three, (SCHAR_P, SCHAR_P)); -STATIC_DCL void NDECL(wallify_map); -STATIC_DCL void FDECL(join_map, (SCHAR_P, SCHAR_P)); -STATIC_DCL void FDECL(finish_map, +static void FDECL(init_map, (SCHAR_P)); +static void FDECL(init_fill, (SCHAR_P, SCHAR_P)); +static schar FDECL(get_map, (int, int, SCHAR_P)); +static void FDECL(pass_one, (SCHAR_P, SCHAR_P)); +static void FDECL(pass_two, (SCHAR_P, SCHAR_P)); +static void FDECL(pass_three, (SCHAR_P, SCHAR_P)); +static void NDECL(wallify_map); +static void FDECL(join_map, (SCHAR_P, SCHAR_P)); +static void FDECL(finish_map, (SCHAR_P, SCHAR_P, BOOLEAN_P, BOOLEAN_P, BOOLEAN_P)); -STATIC_DCL void FDECL(remove_room, (unsigned)); +static void FDECL(remove_room, (unsigned)); void FDECL(mkmap, (lev_init *)); -STATIC_OVL void +static void init_map(bg_typ) schar bg_typ; { @@ -32,7 +32,7 @@ schar bg_typ; levl[i][j].typ = bg_typ; } -STATIC_OVL void +static void init_fill(bg_typ, fg_typ) schar bg_typ, fg_typ; { @@ -51,7 +51,7 @@ schar bg_typ, fg_typ; } } -STATIC_OVL schar +static schar get_map(col, row, bg_typ) int col, row; schar bg_typ; @@ -64,7 +64,7 @@ schar bg_typ; static const int dirs[16] = { -1, -1 /**/, -1, 0 /**/, -1, 1 /**/, 0, -1 /**/, 0, 1 /**/, 1, -1 /**/, 1, 0 /**/, 1, 1 }; -STATIC_OVL void +static void pass_one(bg_typ, fg_typ) schar bg_typ, fg_typ; { @@ -98,7 +98,7 @@ schar bg_typ, fg_typ; #define new_loc(i, j) *(g.new_locations + ((j) * (WIDTH + 1)) + (i)) -STATIC_OVL void +static void pass_two(bg_typ, fg_typ) schar bg_typ, fg_typ; { @@ -122,7 +122,7 @@ schar bg_typ, fg_typ; levl[i][j].typ = new_loc(i, j); } -STATIC_OVL void +static void pass_three(bg_typ, fg_typ) schar bg_typ, fg_typ; { @@ -246,7 +246,7 @@ boolean anyroom; * If we have drawn a map without walls, this allows us to * auto-magically wallify it. Taken from lev_main.c. */ -STATIC_OVL void +static void wallify_map() { int x, y, xx, yy; @@ -265,7 +265,7 @@ wallify_map() } } -STATIC_OVL void +static void join_map(bg_typ, fg_typ) schar bg_typ, fg_typ; { @@ -338,7 +338,7 @@ joinm: } } -STATIC_OVL void +static void finish_map(fg_typ, bg_typ, lit, walled, icedpools) schar fg_typ, bg_typ; boolean lit, walled, icedpools; @@ -411,7 +411,7 @@ int lx, ly, hx, hy; * level structure contents corresponding to roomno have already been reset. * Currently handles only the removal of rooms that have no subrooms. */ -STATIC_OVL void +static void remove_room(roomno) unsigned roomno; { diff --git a/src/mkmaze.c b/src/mkmaze.c index 2761bb062..29b043113 100644 --- a/src/mkmaze.c +++ b/src/mkmaze.c @@ -9,22 +9,22 @@ #include "sfproto.h" -STATIC_DCL int FDECL(iswall, (int, int)); -STATIC_DCL int FDECL(iswall_or_stone, (int, int)); -STATIC_DCL boolean FDECL(is_solid, (int, int)); -STATIC_DCL int FDECL(extend_spine, (int[3][3], int, int, int)); -STATIC_DCL boolean FDECL(okay, (int, int, int)); -STATIC_DCL void FDECL(maze0xy, (coord *)); -STATIC_DCL boolean FDECL(put_lregion_here, (XCHAR_P, XCHAR_P, XCHAR_P, +static int FDECL(iswall, (int, int)); +static int FDECL(iswall_or_stone, (int, int)); +static boolean FDECL(is_solid, (int, int)); +static int FDECL(extend_spine, (int[3][3], int, int, int)); +static boolean FDECL(okay, (int, int, int)); +static void FDECL(maze0xy, (coord *)); +static boolean FDECL(put_lregion_here, (XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P, BOOLEAN_P, d_level *)); -STATIC_DCL void NDECL(baalz_fixup); -STATIC_DCL void NDECL(setup_waterlevel); -STATIC_DCL void NDECL(unsetup_waterlevel); -STATIC_DCL void FDECL(check_ransacked, (char *)); -STATIC_DCL void FDECL(migr_booty_item, (int, const char *)); -STATIC_DCL void FDECL(migrate_orc, (struct monst *, unsigned long)); -STATIC_DCL void NDECL(stolen_booty); +static void NDECL(baalz_fixup); +static void NDECL(setup_waterlevel); +static void NDECL(unsetup_waterlevel); +static void FDECL(check_ransacked, (char *)); +static void FDECL(migr_booty_item, (int, const char *)); +static void FDECL(migrate_orc, (struct monst *, unsigned long)); +static void NDECL(stolen_booty); /* adjust a coordinate one step in the specified direction */ #define mz_move(X, Y, dir) \ @@ -38,7 +38,7 @@ STATIC_DCL void NDECL(stolen_booty); } \ } while (0) -STATIC_OVL int +static int iswall(x, y) int x, y; { @@ -51,7 +51,7 @@ int x, y; || type == SDOOR || type == IRONBARS); } -STATIC_OVL int +static int iswall_or_stone(x, y) int x, y; { @@ -63,7 +63,7 @@ int x, y; } /* return TRUE if out of bounds, wall or rock */ -STATIC_OVL boolean +static boolean is_solid(x, y) int x, y; { @@ -88,7 +88,7 @@ int x, y; * W x W This would extend a spine from x down. * . W W */ -STATIC_OVL int +static int extend_spine(locale, wall_there, dx, dy) int locale[3][3]; int wall_there, dx, dy; @@ -224,7 +224,7 @@ int x1, y1, x2, y2; fix_wall_spines(x1, y1, x2, y2); } -STATIC_OVL boolean +static boolean okay(x, y, dir) int x, y; int dir; @@ -238,7 +238,7 @@ int dir; } /* find random starting point for maze generation */ -STATIC_OVL void +static void maze0xy(cc) coord *cc; { @@ -314,7 +314,7 @@ d_level *lev; impossible("Couldn't place lregion type %d!", rtype); } -STATIC_OVL boolean +static boolean put_lregion_here(x, y, nlx, nly, nhx, nhy, rtype, oneshot, lev) xchar x, y; xchar nlx, nly, nhx, nhy; @@ -371,7 +371,7 @@ d_level *lev; /* fix up Baalzebub's lair, which depicts a level-sized beetle; its legs are walls within solid rock--regular wallification classifies them as superfluous and gets rid of them */ -STATIC_OVL void +static void baalz_fixup() { struct monst *mtmp; @@ -615,7 +615,7 @@ fixup_special() g.num_lregions = 0; } -STATIC_OVL void +static void check_ransacked(s) char *s; { @@ -626,7 +626,7 @@ char *s; #define ORC_LEADER 1 static const char *orcfruit[] = { "paddle cactus", "dwarven root" }; -STATIC_OVL void +static void migrate_orc(mtmp, mflags) struct monst *mtmp; unsigned long mflags; @@ -691,7 +691,7 @@ struct monst *mtmp; add_to_minv(mtmp, otmp); } } -STATIC_OVL void +static void migr_booty_item(otyp, gang) int otyp; const char *gang; @@ -712,7 +712,7 @@ const char *gang; } } -STATIC_OVL void +static void stolen_booty(VOID_ARGS) { char *gang, gang_name[BUFSZ]; @@ -1377,9 +1377,9 @@ fumaroles() #define gbxmax (g.xmax - 1) #define gbymax (g.ymax - 1) -STATIC_DCL void NDECL(set_wportal); -STATIC_DCL void FDECL(mk_bubble, (int, int, int)); -STATIC_DCL void FDECL(mv_bubble, (struct bubble *, int, int, BOOLEAN_P)); +static void NDECL(set_wportal); +static void FDECL(mk_bubble, (int, int, int)); +static void FDECL(mv_bubble, (struct bubble *, int, int, BOOLEAN_P)); void movebubbles() @@ -1680,7 +1680,7 @@ xchar x, y; return hliquid("water"); } -STATIC_OVL void +static void set_wportal() { /* there better be only one magic portal on water level... */ @@ -1690,7 +1690,7 @@ set_wportal() impossible("set_wportal(): no portal!"); } -STATIC_OVL void +static void setup_waterlevel() { int x, y, xskip, yskip, typ, glyph; @@ -1737,7 +1737,7 @@ setup_waterlevel() mk_bubble(x, y, rn2(7)); } -STATIC_OVL void +static void unsetup_waterlevel() { struct bubble *b, *bb; @@ -1750,7 +1750,7 @@ unsetup_waterlevel() g.bbubbles = g.ebubbles = (struct bubble *) 0; } -STATIC_OVL void +static void mk_bubble(x, y, n) int x, y, n; { @@ -1814,7 +1814,7 @@ int x, y, n; * in the immediate neighborhood of one, he/she may get sucked inside. * This property also makes leaving a bubble slightly difficult. */ -STATIC_OVL void +static void mv_bubble(b, dx, dy, ini) struct bubble *b; int dx, dy; diff --git a/src/mkobj.c b/src/mkobj.c index c6168568e..f8ef49c75 100644 --- a/src/mkobj.c +++ b/src/mkobj.c @@ -5,21 +5,21 @@ #include "hack.h" -STATIC_DCL void FDECL(mkbox_cnts, (struct obj *)); -STATIC_DCL unsigned FDECL(nextoid, (struct obj *, struct obj *)); -STATIC_DCL void FDECL(maybe_adjust_light, (struct obj *, int)); -STATIC_DCL void FDECL(obj_timer_checks, (struct obj *, +static void FDECL(mkbox_cnts, (struct obj *)); +static unsigned FDECL(nextoid, (struct obj *, struct obj *)); +static void FDECL(maybe_adjust_light, (struct obj *, int)); +static void FDECL(obj_timer_checks, (struct obj *, XCHAR_P, XCHAR_P, int)); -STATIC_DCL void FDECL(container_weight, (struct obj *)); -STATIC_DCL struct obj *FDECL(save_mtraits, (struct obj *, struct monst *)); -STATIC_DCL void FDECL(objlist_sanity, (struct obj *, int, const char *)); -STATIC_DCL void FDECL(mon_obj_sanity, (struct monst *, const char *)); -STATIC_DCL const char *FDECL(where_name, (struct obj *)); -STATIC_DCL void FDECL(insane_object, (struct obj *, const char *, +static void FDECL(container_weight, (struct obj *)); +static struct obj *FDECL(save_mtraits, (struct obj *, struct monst *)); +static void FDECL(objlist_sanity, (struct obj *, int, const char *)); +static void FDECL(mon_obj_sanity, (struct monst *, const char *)); +static const char *FDECL(where_name, (struct obj *)); +static void FDECL(insane_object, (struct obj *, const char *, const char *, struct monst *)); -STATIC_DCL void FDECL(check_contained, (struct obj *, const char *)); -STATIC_DCL void FDECL(check_glob, (struct obj *, const char *)); -STATIC_DCL void FDECL(sanity_check_worn, (struct obj *)); +static void FDECL(check_contained, (struct obj *, const char *)); +static void FDECL(check_glob, (struct obj *, const char *)); +static void FDECL(sanity_check_worn, (struct obj *)); struct icp { int iprob; /* probability of an item type */ @@ -272,7 +272,7 @@ boolean artif; return mksobj(i, TRUE, artif); } -STATIC_OVL void +static void mkbox_cnts(box) struct obj *box; { @@ -468,7 +468,7 @@ long num; /* when splitting a stack that has o_id-based shop prices, pick an o_id value for the new stack that will maintain the same price */ -STATIC_OVL unsigned +static unsigned nextoid(oldobj, newobj) struct obj *oldobj, *newobj; { @@ -1222,7 +1222,7 @@ struct obj *body; (void) start_timer(when, TIMER_OBJECT, action, obj_to_any(body)); } -STATIC_OVL void +static void maybe_adjust_light(obj, old_range) struct obj *obj; int old_range; @@ -1836,7 +1836,7 @@ struct obj *otmp; return retval; } -STATIC_OVL void +static void obj_timer_checks(otmp, x, y, force) struct obj *otmp; xchar x, y; @@ -2131,7 +2131,7 @@ struct obj *obj; } /* Recalculate the weight of this container and all of _its_ containers. */ -STATIC_OVL void +static void container_weight(container) struct obj *container; { @@ -2331,7 +2331,7 @@ obj_sanity_check() } /* sanity check for objects on specified list (fobj, &c) */ -STATIC_OVL void +static void objlist_sanity(objlist, wheretype, mesg) struct obj *objlist; int wheretype; @@ -2383,7 +2383,7 @@ const char *mesg; } /* sanity check for objects carried by all monsters in specified list */ -STATIC_OVL void +static void mon_obj_sanity(monlist, mesg) struct monst *monlist; const char *mesg; @@ -2419,7 +2419,7 @@ static const char *obj_state_names[NOBJ_STATES] = { "free", "floor", "minvent", "migrating", "buried", "onbill" }; -STATIC_OVL const char * +static const char * where_name(obj) struct obj *obj; { @@ -2436,7 +2436,7 @@ struct obj *obj; return obj_state_names[where]; } -STATIC_OVL void +static void insane_object(obj, fmt, mesg, mon) struct obj *obj; const char *fmt, *mesg; @@ -2464,7 +2464,7 @@ struct monst *mon; } /* obj sanity check: check objects inside container */ -STATIC_OVL void +static void check_contained(container, mesg) struct obj *container; const char *mesg; @@ -2512,7 +2512,7 @@ const char *mesg; } /* called when 'obj->globby' is set so we don't recheck it here */ -STATIC_OVL void +static void check_glob(obj, mesg) struct obj *obj; const char *mesg; @@ -2535,7 +2535,7 @@ const char *mesg; } /* check an object in hero's or monster's inventory which has worn mask set */ -STATIC_OVL void +static void sanity_check_worn(obj) struct obj *obj; { diff --git a/src/mkroom.c b/src/mkroom.c index 4ed3d1348..05eb9550b 100644 --- a/src/mkroom.c +++ b/src/mkroom.c @@ -19,24 +19,24 @@ #include "sfproto.h" -STATIC_DCL boolean FDECL(isbig, (struct mkroom *)); -STATIC_DCL struct mkroom *FDECL(pick_room, (BOOLEAN_P)); -STATIC_DCL void NDECL(mkshop), FDECL(mkzoo, (int)), NDECL(mkswamp); -STATIC_DCL void NDECL(mktemple); -STATIC_DCL coord *FDECL(shrine_pos, (int)); -STATIC_DCL struct permonst *NDECL(morguemon); -STATIC_DCL struct permonst *NDECL(squadmon); +static boolean FDECL(isbig, (struct mkroom *)); +static struct mkroom *FDECL(pick_room, (BOOLEAN_P)); +static void NDECL(mkshop), FDECL(mkzoo, (int)), NDECL(mkswamp); +static void NDECL(mktemple); +static coord *FDECL(shrine_pos, (int)); +static struct permonst *NDECL(morguemon); +static struct permonst *NDECL(squadmon); /* SAVE2018 */ -/* STATIC_DCL void FDECL(save_room, (int,struct mkroom *)); */ -/* STATIC_DCL void FDECL(rest_room, (int,struct mkroom *)); */ -STATIC_DCL void FDECL(save_room, (NHFILE *, struct mkroom *)); -STATIC_DCL void FDECL(rest_room, (NHFILE *, struct mkroom *)); +/* static void FDECL(save_room, (int,struct mkroom *)); */ +/* static void FDECL(rest_room, (int,struct mkroom *)); */ +static void FDECL(save_room, (NHFILE *, struct mkroom *)); +static void FDECL(rest_room, (NHFILE *, struct mkroom *)); #define sq(x) ((x) * (x)) extern const struct shclass shtypes[]; /* defined in shknam.c */ -STATIC_OVL boolean +static boolean isbig(sroom) register struct mkroom *sroom; { @@ -90,7 +90,7 @@ int roomtype; } } -STATIC_OVL void +static void mkshop() { register struct mkroom *sroom; @@ -208,7 +208,7 @@ gottype: } /* pick an unused room, preferably with only one door */ -STATIC_OVL struct mkroom * +static struct mkroom * pick_room(strict) register boolean strict; { @@ -233,7 +233,7 @@ register boolean strict; return (struct mkroom *) 0; } -STATIC_OVL void +static void mkzoo(type) int type; { @@ -461,7 +461,7 @@ int mm_flags; g.level.flags.graveyard = TRUE; /* reduced chance for undead corpse */ } -STATIC_OVL struct permonst * +static struct permonst * morguemon() { register int i = rn2(100), hd = rn2(level_difficulty()); @@ -513,7 +513,7 @@ antholemon() : &mons[mtyp]); } -STATIC_OVL void +static void mkswamp() /* Michiel Huisjes & Fred de Wilde */ { register struct mkroom *sroom; @@ -551,7 +551,7 @@ mkswamp() /* Michiel Huisjes & Fred de Wilde */ } } -STATIC_OVL coord * +static coord * shrine_pos(roomno) int roomno; { @@ -573,7 +573,7 @@ int roomno; return &buf; } -STATIC_OVL void +static void mktemple() { register struct mkroom *sroom; @@ -773,7 +773,7 @@ static const struct { { PM_CAPTAIN, 1 } }; /* return soldier types. */ -STATIC_OVL struct permonst * +static struct permonst * squadmon() { int sel_prob, i, cpro, mndx; @@ -800,7 +800,7 @@ gotone: * save_room : A recursive function that saves a room and its subrooms * (if any). */ -STATIC_OVL void +static void save_room(nhfp, r) NHFILE *nhfp; struct mkroom *r; @@ -839,7 +839,7 @@ NHFILE *nhfp; save_room(nhfp, &g.rooms[i]); } -STATIC_OVL void +static void rest_room(nhfp, r) NHFILE *nhfp; struct mkroom *r; diff --git a/src/mon.c b/src/mon.c index c65972a86..b04fb07c0 100644 --- a/src/mon.c +++ b/src/mon.c @@ -12,23 +12,23 @@ #include "mfndpos.h" #include -STATIC_DCL void FDECL(sanity_check_single_mon, (struct monst *, BOOLEAN_P, +static void FDECL(sanity_check_single_mon, (struct monst *, BOOLEAN_P, const char *)); -STATIC_DCL boolean FDECL(restrap, (struct monst *)); -STATIC_DCL long FDECL(mm_aggression, (struct monst *, struct monst *)); -STATIC_DCL long FDECL(mm_displacement, (struct monst *, struct monst *)); -STATIC_DCL int NDECL(pick_animal); -STATIC_DCL void FDECL(kill_eggs, (struct obj *)); -STATIC_DCL int FDECL(pickvampshape, (struct monst *)); -STATIC_DCL boolean FDECL(isspecmon, (struct monst *)); -STATIC_DCL boolean FDECL(validspecmon, (struct monst *, int)); -STATIC_DCL struct permonst *FDECL(accept_newcham_form, (struct monst *, int)); -STATIC_DCL struct obj *FDECL(make_corpse, (struct monst *, unsigned)); -STATIC_DCL void FDECL(m_detach, (struct monst *, struct permonst *)); -STATIC_DCL void FDECL(lifesaved_monster, (struct monst *)); -STATIC_DCL void FDECL(migrate_mon, (struct monst *, XCHAR_P, XCHAR_P)); -STATIC_DCL boolean FDECL(ok_to_obliterate, (struct monst *)); -STATIC_DCL void FDECL(deal_with_overcrowding, (struct monst *)); +static boolean FDECL(restrap, (struct monst *)); +static long FDECL(mm_aggression, (struct monst *, struct monst *)); +static long FDECL(mm_displacement, (struct monst *, struct monst *)); +static int NDECL(pick_animal); +static void FDECL(kill_eggs, (struct obj *)); +static int FDECL(pickvampshape, (struct monst *)); +static boolean FDECL(isspecmon, (struct monst *)); +static boolean FDECL(validspecmon, (struct monst *, int)); +static struct permonst *FDECL(accept_newcham_form, (struct monst *, int)); +static struct obj *FDECL(make_corpse, (struct monst *, unsigned)); +static void FDECL(m_detach, (struct monst *, struct permonst *)); +static void FDECL(lifesaved_monster, (struct monst *)); +static void FDECL(migrate_mon, (struct monst *, XCHAR_P, XCHAR_P)); +static boolean FDECL(ok_to_obliterate, (struct monst *)); +static void FDECL(deal_with_overcrowding, (struct monst *)); /* note: duplicated in dog.c */ #define LEVEL_SPECIFIC_NOCORPSE(mdat) \ @@ -43,7 +43,7 @@ const char *warnings[] = { #endif /* 0 */ -STATIC_OVL void +static void sanity_check_single_mon(mtmp, chk_geno, msg) struct monst *mtmp; boolean chk_geno; @@ -291,7 +291,7 @@ int mndx; * G_NOCORPSE set in order to prevent wishing for one, finding tins of one, * etc.... */ -STATIC_OVL struct obj * +static struct obj * make_corpse(mtmp, corpseflags) register struct monst *mtmp; unsigned corpseflags; @@ -1550,7 +1550,7 @@ nexttry: /* eels prefer the water, but if there is no water nearby, in the absence of Conflict. There is no provision for targetting other monsters; just hand to hand fighting when they happen to be next to each other. */ -STATIC_OVL long +static long mm_aggression(magr, mdef) struct monst *magr, /* monster that is currently deciding where to move */ *mdef; /* another monster which is next to it */ @@ -1567,7 +1567,7 @@ struct monst *magr, /* monster that is currently deciding where to move */ } /* Monster displacing another monster out of the way */ -STATIC_OVL long +static long mm_displacement(magr, mdef) struct monst *magr, /* monster that is currently deciding where to move */ *mdef; /* another monster which is next to it */ @@ -1816,7 +1816,7 @@ struct monst *mon; } /* remove effects of mtmp from other data structures */ -STATIC_OVL void +static void m_detach(mtmp, mptr) struct monst *mtmp; struct permonst *mptr; /* reflects mtmp->data _prior_ to mtmp's death */ @@ -1872,7 +1872,7 @@ struct monst *mon; return (struct obj *) 0; } -STATIC_OVL void +static void lifesaved_monster(mtmp) struct monst *mtmp; { @@ -2601,7 +2601,7 @@ struct monst *mtmp; migrate_mon(mtmp, target_lev, xyloc); } -STATIC_OVL void +static void migrate_mon(mtmp, target_lev, xyloc) struct monst *mtmp; xchar target_lev, xyloc; @@ -2612,7 +2612,7 @@ xchar target_lev, xyloc; mtmp->mstate |= MON_MIGRATING; } -STATIC_OVL boolean +static boolean ok_to_obliterate(mtmp) struct monst *mtmp; { @@ -2733,7 +2733,7 @@ struct monst *mtmp; return; } -STATIC_OVL void +static void deal_with_overcrowding(mtmp) struct monst *mtmp; { @@ -3150,7 +3150,7 @@ struct monst *mon; } /* unwatched hiders may hide again; if so, returns True */ -STATIC_OVL boolean +static boolean restrap(mtmp) register struct monst *mtmp; { @@ -3260,7 +3260,7 @@ boolean construct; } } -STATIC_OVL int +static int pick_animal() { int res; @@ -3339,7 +3339,7 @@ int shiftflags; } } -STATIC_OVL int +static int pickvampshape(mon) struct monst *mon; { @@ -3369,7 +3369,7 @@ struct monst *mon; } /* nonshapechangers who warrant special polymorph handling */ -STATIC_OVL boolean +static boolean isspecmon(mon) struct monst *mon; { @@ -3380,7 +3380,7 @@ struct monst *mon; /* restrict certain special monsters (shopkeepers, aligned priests, vault guards) to forms that allow them to behave sensibly (catching gold, speaking?) so that they don't need too much extra code */ -STATIC_OVL boolean +static boolean validspecmon(mon, mndx) struct monst *mon; int mndx; @@ -3603,7 +3603,7 @@ struct monst *mon; } /* this used to be inline within newcham() but monpolycontrol needs it too */ -STATIC_OVL struct permonst * +static struct permonst * accept_newcham_form(mon, mndx) struct monst *mon; int mndx; @@ -3946,7 +3946,7 @@ boolean egg; } /* kill off any eggs of genocided monsters */ -STATIC_OVL void +static void kill_eggs(obj_list) struct obj *obj_list; { diff --git a/src/monmove.c b/src/monmove.c index ef749a96f..0e805492c 100644 --- a/src/monmove.c +++ b/src/monmove.c @@ -7,13 +7,13 @@ #include "mfndpos.h" #include "artifact.h" -STATIC_DCL void FDECL(watch_on_duty, (struct monst *)); -STATIC_DCL int FDECL(disturb, (struct monst *)); -STATIC_DCL void FDECL(release_hero, (struct monst *)); -STATIC_DCL void FDECL(distfleeck, (struct monst *, int *, int *, int *)); -STATIC_DCL int FDECL(m_arrival, (struct monst *)); -STATIC_DCL boolean FDECL(stuff_prevents_passage, (struct monst *)); -STATIC_DCL int FDECL(vamp_shift, (struct monst *, struct permonst *, +static void FDECL(watch_on_duty, (struct monst *)); +static int FDECL(disturb, (struct monst *)); +static void FDECL(release_hero, (struct monst *)); +static void FDECL(distfleeck, (struct monst *, int *, int *, int *)); +static int FDECL(m_arrival, (struct monst *)); +static boolean FDECL(stuff_prevents_passage, (struct monst *)); +static int FDECL(vamp_shift, (struct monst *, struct permonst *, BOOLEAN_P)); /* True if mtmp died */ @@ -76,7 +76,7 @@ const char *shout; } } -STATIC_OVL void +static void watch_on_duty(mtmp) register struct monst *mtmp; { @@ -203,7 +203,7 @@ boolean digest_meal; * Possibly awaken the given monster. Return a 1 if the monster has been * jolted awake. */ -STATIC_OVL int +static int disturb(mtmp) register struct monst *mtmp; { @@ -238,7 +238,7 @@ register struct monst *mtmp; } /* ungrab/expel held/swallowed hero */ -STATIC_OVL void +static void release_hero(mon) struct monst *mon; { @@ -351,7 +351,7 @@ boolean fleemsg; memset(mtmp->mtrack, 0, sizeof(mtmp->mtrack)); } -STATIC_OVL void +static void distfleeck(mtmp, inrange, nearby, scared) register struct monst *mtmp; int *inrange, *nearby, *scared; @@ -392,7 +392,7 @@ int *inrange, *nearby, *scared; /* 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 */ -STATIC_OVL int +static int m_arrival(mon) struct monst *mon; { @@ -1680,7 +1680,7 @@ xchar x, y; * Inventory prevents passage under door. * Used by can_ooze() and can_fog(). */ -STATIC_OVL boolean +static boolean stuff_prevents_passage(mtmp) struct monst *mtmp; { @@ -1738,7 +1738,7 @@ struct monst *mtmp; return FALSE; } -STATIC_OVL int +static int vamp_shift(mon, ptr, domsg) struct monst *mon; struct permonst *ptr; diff --git a/src/mplayer.c b/src/mplayer.c index 5955b2915..13a44ed35 100644 --- a/src/mplayer.c +++ b/src/mplayer.c @@ -4,9 +4,9 @@ #include "hack.h" -STATIC_DCL const char *NDECL(dev_name); -STATIC_DCL void FDECL(get_mplname, (struct monst *, char *)); -STATIC_DCL void FDECL(mk_mplayer_armor, (struct monst *, SHORT_P)); +static const char *NDECL(dev_name); +static void FDECL(get_mplname, (struct monst *, char *)); +static void FDECL(mk_mplayer_armor, (struct monst *, SHORT_P)); /* These are the names of those who * contributed to the development of NetHack 3.2/3.3/3.4/3.6. @@ -40,7 +40,7 @@ static const char *developers[] = { }; /* return a randomly chosen developer name */ -STATIC_OVL const char * +static const char * dev_name() { register int i, m = 0, n = SIZE(developers); @@ -67,7 +67,7 @@ dev_name() return (developers[i]); } -STATIC_OVL void +static void get_mplname(mtmp, nam) register struct monst *mtmp; char *nam; @@ -92,7 +92,7 @@ char *nam; (boolean) mtmp->female)); } -STATIC_OVL void +static void mk_mplayer_armor(mon, typ) struct monst *mon; short typ; diff --git a/src/mthrowu.c b/src/mthrowu.c index aa01fc7a7..c2538ab5c 100644 --- a/src/mthrowu.c +++ b/src/mthrowu.c @@ -5,10 +5,10 @@ #include "hack.h" -STATIC_DCL int FDECL(monmulti, (struct monst *, struct obj *, struct obj *)); -STATIC_DCL void FDECL(monshoot, (struct monst *, struct obj *, struct obj *)); -STATIC_DCL int FDECL(drop_throw, (struct obj *, BOOLEAN_P, int, int)); -STATIC_DCL boolean FDECL(m_lined_up, (struct monst *, struct monst *)); +static int FDECL(monmulti, (struct monst *, struct obj *, struct obj *)); +static void FDECL(monshoot, (struct monst *, struct obj *, struct obj *)); +static int FDECL(drop_throw, (struct obj *, BOOLEAN_P, int, int)); +static boolean FDECL(m_lined_up, (struct monst *, struct monst *)); #define URETREATING(x, y) \ (distmin(u.ux, u.uy, x, y) > distmin(u.ux0, u.uy0, x, y)) @@ -20,7 +20,7 @@ STATIC_DCL boolean FDECL(m_lined_up, (struct monst *, struct monst *)); /* * Keep consistent with breath weapons in zap.c, and AD_* in monattk.h. */ -STATIC_OVL NEARDATA const char *breathwep[] = { +static NEARDATA const char *breathwep[] = { "fragments", "fire", "frost", "sleep gas", "a disintegration blast", "lightning", "poison gas", "acid", "strange breath #8", "strange breath #9" @@ -102,7 +102,7 @@ const char *name; /* if null, then format `*objp' */ * dothrow.c (for consistency). --KAA * Returns 0 if object still exists (not destroyed). */ -STATIC_OVL int +static int drop_throw(obj, ohit, x, y) register struct obj *obj; boolean ohit; @@ -146,7 +146,7 @@ int x, y; /* calculate multishot volley count for mtmp throwing otmp (if not ammo) or shooting otmp with mwep (if otmp is ammo and mwep appropriate launcher) */ -STATIC_OVL int +static int monmulti(mtmp, otmp, mwep) struct monst *mtmp; struct obj *otmp, *mwep; @@ -231,7 +231,7 @@ struct obj *otmp, *mwep; } /* mtmp throws otmp, or shoots otmp with mwep, at hero or at monster mtarg */ -STATIC_OVL void +static void monshoot(mtmp, otmp, mwep) struct monst *mtmp; struct obj *otmp, *mwep; @@ -1048,7 +1048,7 @@ int boulderhandling; /* 0=block, 1=ignore, 2=conditionally block */ return FALSE; } -STATIC_OVL boolean +static boolean m_lined_up(mtarg, mtmp) struct monst *mtarg, *mtmp; { diff --git a/src/muse.c b/src/muse.c index d1ee5472a..dfef522c9 100644 --- a/src/muse.c +++ b/src/muse.c @@ -14,33 +14,33 @@ * are confused don't know not to read scrolls, etc.... */ -STATIC_DCL struct permonst *FDECL(muse_newcham_mon, (struct monst *)); -STATIC_DCL int FDECL(precheck, (struct monst *, struct obj *)); -STATIC_DCL void FDECL(mzapwand, (struct monst *, struct obj *, BOOLEAN_P)); -STATIC_DCL void FDECL(mplayhorn, (struct monst *, struct obj *, BOOLEAN_P)); -STATIC_DCL void FDECL(mreadmsg, (struct monst *, struct obj *)); -STATIC_DCL void FDECL(mquaffmsg, (struct monst *, struct obj *)); -STATIC_DCL boolean FDECL(m_use_healing, (struct monst *)); -STATIC_PTR int FDECL(mbhitm, (struct monst *, struct obj *)); -STATIC_DCL void FDECL(mbhit, (struct monst *, int, +static struct permonst *FDECL(muse_newcham_mon, (struct monst *)); +static int FDECL(precheck, (struct monst *, struct obj *)); +static void FDECL(mzapwand, (struct monst *, struct obj *, BOOLEAN_P)); +static void FDECL(mplayhorn, (struct monst *, struct obj *, BOOLEAN_P)); +static void FDECL(mreadmsg, (struct monst *, struct obj *)); +static void FDECL(mquaffmsg, (struct monst *, struct obj *)); +static boolean FDECL(m_use_healing, (struct monst *)); +static int FDECL(mbhitm, (struct monst *, struct obj *)); +static void FDECL(mbhit, (struct monst *, int, int FDECL((*), (MONST_P, OBJ_P)), int FDECL((*), (OBJ_P, OBJ_P)), struct obj *)); -STATIC_DCL void FDECL(you_aggravate, (struct monst *)); -STATIC_DCL void FDECL(mon_consume_unstone, (struct monst *, struct obj *, +static void FDECL(you_aggravate, (struct monst *)); +static void FDECL(mon_consume_unstone, (struct monst *, struct obj *, BOOLEAN_P, BOOLEAN_P)); -STATIC_DCL boolean FDECL(cures_stoning, (struct monst *, struct obj *, +static boolean FDECL(cures_stoning, (struct monst *, struct obj *, BOOLEAN_P)); -STATIC_DCL boolean FDECL(mcould_eat_tin, (struct monst *)); -STATIC_DCL boolean FDECL(muse_unslime, (struct monst *, struct obj *, +static boolean FDECL(mcould_eat_tin, (struct monst *)); +static boolean FDECL(muse_unslime, (struct monst *, struct obj *, struct trap *, BOOLEAN_P)); -STATIC_DCL int FDECL(cures_sliming, (struct monst *, struct obj *)); -STATIC_DCL boolean FDECL(green_mon, (struct monst *)); +static int FDECL(cures_sliming, (struct monst *, struct obj *)); +static boolean FDECL(green_mon, (struct monst *)); /* Any preliminary checks which may result in the monster being unable to use * the item. Returns 0 if nothing happened, 2 if the monster can't do * anything (i.e. it teleported) and 1 if it's dead. */ -STATIC_OVL int +static int precheck(mon, obj) struct monst *mon; struct obj *obj; @@ -147,7 +147,7 @@ struct obj *obj; /* when a monster zaps a wand give a message, deduct a charge, and if it isn't directly seen, remove hero's memory of the number of charges */ -STATIC_OVL void +static void mzapwand(mtmp, otmp, self) struct monst *mtmp; struct obj *otmp; @@ -171,7 +171,7 @@ boolean self; } /* similar to mzapwand() but for magical horns (only instrument mons play) */ -STATIC_OVL void +static void mplayhorn(mtmp, otmp, self) struct monst *mtmp; struct obj *otmp; @@ -196,7 +196,7 @@ boolean self; otmp->spe -= 1; /* use a charge */ } -STATIC_OVL void +static void mreadmsg(mtmp, otmp) struct monst *mtmp; struct obj *otmp; @@ -237,7 +237,7 @@ struct obj *otmp; vismon ? mon_nam(mtmp) : mhe(mtmp)); } -STATIC_OVL void +static void mquaffmsg(mtmp, otmp) struct monst *mtmp; struct obj *otmp; @@ -280,7 +280,7 @@ struct obj *otmp; * that if you polymorph into one you teleport at will. */ -STATIC_OVL boolean +static boolean m_use_healing(mtmp) struct monst *mtmp; { @@ -1209,7 +1209,7 @@ struct monst *mtmp; #undef nomore } -STATIC_PTR +static int mbhitm(mtmp, otmp) register struct monst *mtmp; @@ -1291,7 +1291,7 @@ register struct obj *otmp; * zapping you, so we need a special function for it. (Unless someone wants * to merge the two functions...) */ -STATIC_OVL void +static void mbhit(mon, range, fhitm, fhito, obj) struct monst *mon; /* monster shooting the wand */ register int range; /* direction and range */ @@ -1964,7 +1964,7 @@ struct monst *mtmp; return 0; } -STATIC_OVL void +static void you_aggravate(mtmp) struct monst *mtmp; { @@ -2215,7 +2215,7 @@ boolean by_you; return FALSE; } -STATIC_OVL void +static void mon_consume_unstone(mon, obj, by_you, stoning) struct monst *mon; struct obj *obj; @@ -2295,7 +2295,7 @@ boolean stoning; /* True: stop petrification, False: cure stun && confusion */ } /* decide whether obj can cure petrification; also used when picking up */ -STATIC_OVL boolean +static boolean cures_stoning(mon, obj, tinok) struct monst *mon; struct obj *obj; @@ -2312,7 +2312,7 @@ boolean tinok; || slimeproof(mon->data)))); } -STATIC_OVL boolean +static boolean mcould_eat_tin(mon) struct monst *mon; { @@ -2418,7 +2418,7 @@ boolean by_you; } /* mon uses an item--selected by caller--to burn away incipient slime */ -STATIC_OVL boolean +static boolean muse_unslime(mon, obj, trap, by_you) struct monst *mon; struct obj *obj; @@ -2527,7 +2527,7 @@ boolean by_you; /* true: if mon kills itself, hero gets credit/blame */ } /* decide whether obj can be used to cure green slime */ -STATIC_OVL int +static int cures_sliming(mon, obj) struct monst *mon; struct obj *obj; @@ -2544,7 +2544,7 @@ struct obj *obj; /* TRUE if monster appears to be green; for active TEXTCOLOR, we go by the display color, otherwise we just pick things that seem plausibly green (which doesn't necessarily match the TEXTCOLOR categorization) */ -STATIC_OVL boolean +static boolean green_mon(mon) struct monst *mon; { diff --git a/src/music.c b/src/music.c index dff1cd270..f1bf9c724 100644 --- a/src/music.c +++ b/src/music.c @@ -28,19 +28,19 @@ #include "hack.h" -STATIC_DCL void FDECL(awaken_monsters, (int)); -STATIC_DCL void FDECL(put_monsters_to_sleep, (int)); -STATIC_DCL void FDECL(charm_snakes, (int)); -STATIC_DCL void FDECL(calm_nymphs, (int)); -STATIC_DCL void FDECL(charm_monsters, (int)); -STATIC_DCL void FDECL(do_earthquake, (int)); -STATIC_DCL int FDECL(do_improvisation, (struct obj *)); +static void FDECL(awaken_monsters, (int)); +static void FDECL(put_monsters_to_sleep, (int)); +static void FDECL(charm_snakes, (int)); +static void FDECL(calm_nymphs, (int)); +static void FDECL(charm_monsters, (int)); +static void FDECL(do_earthquake, (int)); +static int FDECL(do_improvisation, (struct obj *)); /* * Wake every monster in range... */ -STATIC_OVL void +static void awaken_monsters(distance) int distance; { @@ -71,7 +71,7 @@ int distance; * Make monsters fall asleep. Note that they may resist the spell. */ -STATIC_OVL void +static void put_monsters_to_sleep(distance) int distance; { @@ -92,7 +92,7 @@ int distance; * Charm snakes in range. Note that the snakes are NOT tamed. */ -STATIC_OVL void +static void charm_snakes(distance) int distance; { @@ -127,7 +127,7 @@ int distance; * Calm nymphs in range. */ -STATIC_OVL void +static void calm_nymphs(distance) int distance; { @@ -193,7 +193,7 @@ struct monst *bugler; /* monster that played instrument */ /* Charm monsters in range. Note that they may resist the spell. * If swallowed, range is reduced to 0. */ -STATIC_OVL void +static void charm_monsters(distance) int distance; { @@ -219,7 +219,7 @@ int distance; /* Generate earthquake :-) of desired force. * That is: create random chasms (pits). */ -STATIC_OVL void +static void do_earthquake(force) int force; { @@ -447,7 +447,7 @@ const char *beats[] = { /* * The player is trying to extract something from his/her instrument. */ -STATIC_OVL int +static int do_improvisation(instr) struct obj *instr; { diff --git a/src/o_init.c b/src/o_init.c index df6714eb4..35b268c17 100644 --- a/src/o_init.c +++ b/src/o_init.c @@ -8,14 +8,14 @@ #include "sfproto.h" -STATIC_DCL void FDECL(setgemprobs, (d_level *)); -STATIC_DCL void FDECL(shuffle, (int, int, BOOLEAN_P)); -STATIC_DCL void NDECL(shuffle_all); -STATIC_DCL boolean FDECL(interesting_to_discover, (int)); -STATIC_DCL char *FDECL(oclass_to_name, (CHAR_P, char *)); +static void FDECL(setgemprobs, (d_level *)); +static void FDECL(shuffle, (int, int, BOOLEAN_P)); +static void NDECL(shuffle_all); +static boolean FDECL(interesting_to_discover, (int)); +static char *FDECL(oclass_to_name, (CHAR_P, char *)); #ifdef USE_TILES -STATIC_DCL void NDECL(shuffle_tiles); +static void NDECL(shuffle_tiles); extern short glyph2tile[]; /* from tile.c */ /* Shuffle tile assignments to match descriptions, so a red potion isn't @@ -27,7 +27,7 @@ extern short glyph2tile[]; /* from tile.c */ * is restored. So might as well do that the first time instead of writing * another routine. */ -STATIC_OVL void +static void shuffle_tiles() { int i; @@ -41,7 +41,7 @@ shuffle_tiles() } #endif /* USE_TILES */ -STATIC_OVL void +static void setgemprobs(dlev) d_level *dlev; { @@ -68,7 +68,7 @@ d_level *dlev; } /* shuffle descriptions on objects o_low to o_high */ -STATIC_OVL void +static void shuffle(o_low, o_high, domaterial) int o_low, o_high; boolean domaterial; @@ -238,7 +238,7 @@ int *lo_p, *hi_p; /* output: range that item belongs among */ } /* randomize object descriptions */ -STATIC_OVL void +static void shuffle_all() { /* entire classes; obj_shuffle_range() handles their exceptions */ @@ -441,7 +441,7 @@ register int oindx; } } -STATIC_OVL boolean +static boolean interesting_to_discover(i) register int i; { @@ -517,7 +517,7 @@ dodiscovered() /* free after Robert Viduya */ } /* lower case let_to_name() output, which differs from def_oc_syms[].name */ -STATIC_OVL char * +static char * oclass_to_name(oclass, buf) char oclass; char *buf; diff --git a/src/objnam.c b/src/objnam.c index d9afce858..aef37c6fa 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -10,21 +10,21 @@ #define SCHAR_LIM 127 #define NUMOBUF 12 -STATIC_DCL char *FDECL(strprepend, (char *, const char *)); -STATIC_DCL short FDECL(rnd_otyp_by_wpnskill, (SCHAR_P)); -STATIC_DCL short FDECL(rnd_otyp_by_namedesc, (const char *, CHAR_P, int)); -STATIC_DCL boolean FDECL(wishymatch, (const char *, const char *, BOOLEAN_P)); -STATIC_DCL char *NDECL(nextobuf); -STATIC_DCL void FDECL(releaseobuf, (char *)); -STATIC_DCL char *FDECL(minimal_xname, (struct obj *)); -STATIC_DCL void FDECL(add_erosion_words, (struct obj *, char *)); -STATIC_DCL char *FDECL(doname_base, (struct obj *obj, unsigned)); -STATIC_DCL boolean FDECL(singplur_lookup, (char *, char *, BOOLEAN_P, +static char *FDECL(strprepend, (char *, const char *)); +static short FDECL(rnd_otyp_by_wpnskill, (SCHAR_P)); +static short FDECL(rnd_otyp_by_namedesc, (const char *, CHAR_P, int)); +static boolean FDECL(wishymatch, (const char *, const char *, BOOLEAN_P)); +static char *NDECL(nextobuf); +static void FDECL(releaseobuf, (char *)); +static char *FDECL(minimal_xname, (struct obj *)); +static void FDECL(add_erosion_words, (struct obj *, char *)); +static char *FDECL(doname_base, (struct obj *obj, unsigned)); +static boolean FDECL(singplur_lookup, (char *, char *, BOOLEAN_P, const char *const *)); -STATIC_DCL char *FDECL(singplur_compound, (char *)); -STATIC_DCL char *FDECL(xname_flags, (struct obj *, unsigned)); -STATIC_DCL boolean FDECL(badman, (const char *, BOOLEAN_P)); -STATIC_DCL char *FDECL(globwt, (struct obj *, char *, boolean *)); +static char *FDECL(singplur_compound, (char *)); +static char *FDECL(xname_flags, (struct obj *, unsigned)); +static boolean FDECL(badman, (const char *, BOOLEAN_P)); +static char *FDECL(globwt, (struct obj *, char *, boolean *)); struct Jitem { int item; @@ -44,7 +44,7 @@ struct Jitem { && typ != SAPPHIRE && typ != BLACK_OPAL && typ != EMERALD \ && typ != OPAL))) -STATIC_OVL struct Jitem Japanese_items[] = { { SHORT_SWORD, "wakizashi" }, +static struct Jitem Japanese_items[] = { { SHORT_SWORD, "wakizashi" }, { BROADSWORD, "ninja-to" }, { FLAIL, "nunchaku" }, { GLAIVE, "naginata" }, @@ -58,9 +58,9 @@ STATIC_OVL struct Jitem Japanese_items[] = { { SHORT_SWORD, "wakizashi" }, { POT_BOOZE, "sake" }, { 0, "" } }; -STATIC_DCL const char *FDECL(Japanese_item_name, (int i)); +static const char *FDECL(Japanese_item_name, (int i)); -STATIC_OVL char * +static char * strprepend(s, pref) register char *s; register const char *pref; @@ -80,7 +80,7 @@ register const char *pref; static char NEARDATA obufs[NUMOBUF][BUFSZ]; static int obufidx = 0; -STATIC_OVL char * +static char * nextobuf() { obufidx = (obufidx + 1) % NUMOBUF; @@ -88,7 +88,7 @@ nextobuf() } /* put the most recently allocated buffer back if possible */ -STATIC_OVL void +static void releaseobuf(bufp) char *bufp; { @@ -411,7 +411,7 @@ struct obj *obj; return xname_flags(obj, CXN_NORMAL); } -STATIC_OVL char * +static char * xname_flags(obj, cxn_flags) register struct obj *obj; unsigned cxn_flags; /* bitmask of CXN_xxx values */ @@ -740,7 +740,7 @@ unsigned cxn_flags; /* bitmask of CXN_xxx values */ brown potion -- if oc_name_known not set potion of object detection -- if discovered */ -STATIC_OVL char * +static char * minimal_xname(obj) struct obj *obj; { @@ -841,7 +841,7 @@ struct permonst *ptr; return uniq; } -STATIC_OVL void +static void add_erosion_words(obj, prefix) struct obj *obj; char *prefix; @@ -919,7 +919,7 @@ struct obj *obj; #define DONAME_WITH_PRICE 1 #define DONAME_VAGUE_QUAN 2 -STATIC_OVL char * +static char * doname_base(obj, doname_flags) struct obj *obj; unsigned doname_flags; @@ -2168,7 +2168,7 @@ static const char *const as_is[] = { }; /* singularize/pluralize decisions common to both makesingular & makeplural */ -STATIC_OVL boolean +static boolean singplur_lookup(basestr, endstring, to_plural, alt_as_is) char *basestr, *endstring; /* base string, pointer to eos(string) */ boolean to_plural; /* true => makeplural, false => makesingular */ @@ -2239,7 +2239,7 @@ const char *const *alt_as_is; /* another set like as_is[] */ } /* searches for common compounds, ex. lump of royal jelly */ -STATIC_OVL char * +static char * singplur_compound(str) char *str; { @@ -2570,7 +2570,7 @@ const char *oldstr; return bp; } -STATIC_OVL boolean +static boolean badman(basestr, to_plural) const char *basestr; boolean to_plural; /* true => makeplural, false => makesingular */ @@ -2619,7 +2619,7 @@ boolean to_plural; /* true => makeplural, false => makesingular */ } /* compare user string against object name string using fuzzy matching */ -STATIC_OVL boolean +static boolean wishymatch(u_str, o_str, retry_inverted) const char *u_str; /* from user, so might be variant spelling */ const char *o_str; /* from objects[], so is in canonical form */ @@ -2718,7 +2718,7 @@ struct o_range { }; /* wishable subranges of objects */ -STATIC_OVL NEARDATA const struct o_range o_ranges[] = { +static NEARDATA const struct o_range o_ranges[] = { { "bag", TOOL_CLASS, SACK, BAG_OF_TRICKS }, { "lamp", TOOL_CLASS, OIL_LAMP, MAGIC_LAMP }, { "candle", TOOL_CLASS, TALLOW_CANDLE, WAX_CANDLE }, @@ -2791,7 +2791,7 @@ static const struct alt_spellings { { (const char *) 0, 0 }, }; -STATIC_OVL short +static short rnd_otyp_by_wpnskill(skill) schar skill; { @@ -2815,7 +2815,7 @@ schar skill; return otyp; } -STATIC_OVL short +static short rnd_otyp_by_namedesc(name, oclass, xtra_prob) const char *name; char oclass; @@ -4083,7 +4083,7 @@ int first, last; return 0; } -STATIC_OVL const char * +static const char * Japanese_item_name(i) int i; { @@ -4253,7 +4253,7 @@ const char *lastR; return qbuf; } -STATIC_OVL char * +static char * globwt(otmp, buf, weightformatted_p) struct obj *otmp; char *buf; diff --git a/src/options.c b/src/options.c index ae7a4338d..08e7c2617 100644 --- a/src/options.c +++ b/src/options.c @@ -527,48 +527,48 @@ static const menu_cmd_t default_menu_cmd_info[] = { { "menu_search", MENU_SEARCH, "Search and toggle matching items" }, }; -STATIC_DCL void FDECL(nmcpy, (char *, const char *, int)); -STATIC_DCL void FDECL(escapes, (const char *, char *)); -STATIC_DCL void FDECL(rejectoption, (const char *)); -STATIC_DCL char *FDECL(string_for_opt, (char *, BOOLEAN_P)); -STATIC_DCL char *FDECL(string_for_env_opt, (const char *, char *, BOOLEAN_P)); -STATIC_DCL void FDECL(bad_negation, (const char *, BOOLEAN_P)); -STATIC_DCL int FDECL(change_inv_order, (char *)); -STATIC_DCL boolean FDECL(warning_opts, (char *, const char *)); -STATIC_DCL int FDECL(feature_alert_opts, (char *, const char *)); -STATIC_DCL boolean FDECL(duplicate_opt_detection, (const char *, int)); -STATIC_DCL void FDECL(complain_about_duplicate, (const char *, int)); +static void FDECL(nmcpy, (char *, const char *, int)); +static void FDECL(escapes, (const char *, char *)); +static void FDECL(rejectoption, (const char *)); +static char *FDECL(string_for_opt, (char *, BOOLEAN_P)); +static char *FDECL(string_for_env_opt, (const char *, char *, BOOLEAN_P)); +static void FDECL(bad_negation, (const char *, BOOLEAN_P)); +static int FDECL(change_inv_order, (char *)); +static boolean FDECL(warning_opts, (char *, const char *)); +static int FDECL(feature_alert_opts, (char *, const char *)); +static boolean FDECL(duplicate_opt_detection, (const char *, int)); +static void FDECL(complain_about_duplicate, (const char *, int)); -STATIC_DCL const char *FDECL(attr2attrname, (int)); -STATIC_DCL const char * FDECL(msgtype2name, (int)); -STATIC_DCL int NDECL(query_msgtype); -STATIC_DCL boolean FDECL(msgtype_add, (int, char *)); -STATIC_DCL void FDECL(free_one_msgtype, (int)); -STATIC_DCL int NDECL(msgtype_count); -STATIC_DCL boolean FDECL(test_regex_pattern, (const char *, const char *)); -STATIC_DCL boolean FDECL(add_menu_coloring_parsed, (char *, int, int)); -STATIC_DCL void FDECL(free_one_menu_coloring, (int)); -STATIC_DCL int NDECL(count_menucolors); -STATIC_DCL boolean FDECL(parse_role_opts, (BOOLEAN_P, const char *, +static const char *FDECL(attr2attrname, (int)); +static const char * FDECL(msgtype2name, (int)); +static int NDECL(query_msgtype); +static boolean FDECL(msgtype_add, (int, char *)); +static void FDECL(free_one_msgtype, (int)); +static int NDECL(msgtype_count); +static boolean FDECL(test_regex_pattern, (const char *, const char *)); +static boolean FDECL(add_menu_coloring_parsed, (char *, int, int)); +static void FDECL(free_one_menu_coloring, (int)); +static int NDECL(count_menucolors); +static boolean FDECL(parse_role_opts, (BOOLEAN_P, const char *, char *, char **)); -STATIC_DCL void FDECL(doset_add_menu, (winid, const char *, int)); -STATIC_DCL void FDECL(opts_add_others, (winid, const char *, int, +static void FDECL(doset_add_menu, (winid, const char *, int)); +static void FDECL(opts_add_others, (winid, const char *, int, char *, int)); -STATIC_DCL int FDECL(handle_add_list_remove, (const char *, int)); -STATIC_DCL boolean FDECL(special_handling, (const char *, +static int FDECL(handle_add_list_remove, (const char *, int)); +static boolean FDECL(special_handling, (const char *, BOOLEAN_P, BOOLEAN_P)); -STATIC_DCL const char *FDECL(get_compopt_value, (const char *, char *)); -STATIC_DCL void FDECL(remove_autopickup_exception, +static const char *FDECL(get_compopt_value, (const char *, char *)); +static void FDECL(remove_autopickup_exception, (struct autopickup_exception *)); -STATIC_DCL int FDECL(count_ape_maps, (int *, int *)); +static int FDECL(count_ape_maps, (int *, int *)); -STATIC_DCL boolean FDECL(is_wc_option, (const char *)); -STATIC_DCL boolean FDECL(wc_supported, (const char *)); -STATIC_DCL boolean FDECL(is_wc2_option, (const char *)); -STATIC_DCL boolean FDECL(wc2_supported, (const char *)); -STATIC_DCL void FDECL(wc_set_font_name, (int, char *)); -STATIC_DCL int FDECL(wc_set_window_colors, (char *)); +static boolean FDECL(is_wc_option, (const char *)); +static boolean FDECL(wc_supported, (const char *)); +static boolean FDECL(is_wc2_option, (const char *)); +static boolean FDECL(wc2_supported, (const char *)); +static void FDECL(wc_set_font_name, (int, char *)); +static int FDECL(wc_set_window_colors, (char *)); void reglyph_darkroom() @@ -885,7 +885,7 @@ initoptions_finish() /* copy up to maxlen-1 characters; 'dest' must be able to hold maxlen; treat comma as alternate end of 'src' */ -STATIC_OVL void +static void nmcpy(dest, src, maxlen) char *dest; const char *src; @@ -923,7 +923,7 @@ int maxlen; * an appropriate digit will also fall through to \ and yield 'X' * or 'O', plus stop if the non-digit is end-of-string. */ -STATIC_OVL void +static void escapes(cp, tp) const char *cp; char *tp; @@ -996,7 +996,7 @@ char *tp; *tp = '\0'; } -STATIC_OVL void +static void rejectoption(optname) const char *optname; { @@ -1027,7 +1027,7 @@ OPTIONS=gender */ -STATIC_OVL char * +static char * string_for_opt(opts, val_optional) char *opts; boolean val_optional; @@ -1047,7 +1047,7 @@ boolean val_optional; return colon; } -STATIC_OVL char * +static char * string_for_env_opt(optname, opts, val_optional) const char *optname; char *opts; @@ -1060,7 +1060,7 @@ boolean val_optional; return string_for_opt(opts, val_optional); } -STATIC_OVL void +static void bad_negation(optname, with_parameter) const char *optname; boolean with_parameter; @@ -1078,7 +1078,7 @@ boolean with_parameter; * This routine returns 1 unless there is a duplicate or bad char in * the string. */ -STATIC_OVL int +static int change_inv_order(op) char *op; { @@ -1126,7 +1126,7 @@ char *op; return retval; } -STATIC_OVL boolean +static boolean warning_opts(opts, optype) register char *opts; const char *optype; @@ -1159,7 +1159,7 @@ register uchar *graph_chars; g.warnsyms[i] = graph_chars[i]; } -STATIC_OVL int +static int feature_alert_opts(op, optn) char *op; const char *optn; @@ -1223,7 +1223,7 @@ int on_or_off; } } -STATIC_OVL boolean +static boolean duplicate_opt_detection(opts, iscompound) const char *opts; int iscompound; /* 0 == boolean option, 1 == compound */ @@ -1257,7 +1257,7 @@ int iscompound; /* 0 == boolean option, 1 == compound */ return FALSE; } -STATIC_OVL void +static void complain_about_duplicate(opts, iscompound) const char *opts; int iscompound; /* 0 == boolean option, 1 == compound */ @@ -1275,7 +1275,7 @@ int iscompound; /* 0 == boolean option, 1 == compound */ } /* paranoia[] - used by parseoptions() and special_handling() */ -STATIC_VAR const struct paranoia_opts { +static const struct paranoia_opts { int flagmask; /* which paranoid option */ const char *argname; /* primary name */ int argMinLen; /* minimum number of letters to match */ @@ -1399,7 +1399,7 @@ char *str; return c; } -STATIC_OVL const char * +static const char * attr2attrname(attr) int attr; { @@ -1565,7 +1565,7 @@ static const struct { { "norep", MSGTYP_NOREP, "Do not repeat the message" } }; -STATIC_OVL const char * +static const char * msgtype2name(typ) int typ; { @@ -1577,7 +1577,7 @@ int typ; return (char *) 0; } -STATIC_OVL int +static int query_msgtype() { winid tmpwin; @@ -1605,7 +1605,7 @@ query_msgtype() return -1; } -STATIC_OVL boolean +static boolean msgtype_add(typ, pattern) int typ; char *pattern; @@ -1642,7 +1642,7 @@ msgtype_free() g.plinemsg_types = (struct plinemsg_type *) 0; } -STATIC_OVL void +static void free_one_msgtype(idx) int idx; /* 0 .. */ { @@ -1705,7 +1705,7 @@ int hide_mask; } } -STATIC_OVL int +static int msgtype_count(VOID_ARGS) { int c = 0; @@ -1744,7 +1744,7 @@ char *str; return FALSE; } -STATIC_OVL boolean +static boolean test_regex_pattern(str, errmsg) const char *str; const char *errmsg; @@ -1771,7 +1771,7 @@ const char *errmsg; return retval; } -STATIC_OVL boolean +static boolean add_menu_coloring_parsed(str, c, a) char *str; int c, a; @@ -1875,7 +1875,7 @@ free_menu_coloring() } } -STATIC_OVL void +static void free_one_menu_coloring(idx) int idx; /* 0 .. */ { @@ -1901,7 +1901,7 @@ int idx; /* 0 .. */ } } -STATIC_OVL int +static int count_menucolors(VOID_ARGS) { struct menucoloring *tmp; @@ -1912,7 +1912,7 @@ count_menucolors(VOID_ARGS) return count; } -STATIC_OVL boolean +static boolean parse_role_opts(negated, fullname, opts, opp) boolean negated; const char *fullname; @@ -4282,7 +4282,7 @@ static char fmtstr_doset_tab[] = "%s\t[%s]"; static char n_currently_set[] = "(%d currently set)"; /* doset('O' command) menu entries for compound options */ -STATIC_OVL void +static void doset_add_menu(win, option, indexoffset) winid win; /* window to add to */ const char *option; /* option name */ @@ -4322,7 +4322,7 @@ int indexoffset; /* value to add to index in compopt[], or zero add_menu(win, NO_GLYPH, &any, 0, 0, ATR_NONE, buf, MENU_UNSELECTED); } -STATIC_OVL void +static void opts_add_others(win, name, id, bufx, nset) winid win; const char *name; @@ -4582,7 +4582,7 @@ doset() /* changing options via menu by Per Liboriussen */ } /* common to msg-types, menu-colors, autopickup-exceptions */ -STATIC_OVL int +static int handle_add_list_remove(optname, numtotal) const char *optname; int numtotal; @@ -4629,7 +4629,7 @@ int numtotal; return opt_idx; } -STATIC_OVL boolean +static boolean special_handling(optname, setinitial, setfromfile) const char *optname; boolean setinitial, setfromfile; @@ -5416,7 +5416,7 @@ boolean setinitial, setfromfile; /* This is ugly. We have all the option names in the compopt[] array, but we need to look at each option individually to get the value. */ -STATIC_OVL const char * +static const char * get_compopt_value(optname, buf) const char *optname; char *buf; @@ -5862,7 +5862,7 @@ const char *mapping; return 1; } -STATIC_OVL void +static void remove_autopickup_exception(whichape) struct autopickup_exception *whichape; { @@ -5887,7 +5887,7 @@ struct autopickup_exception *whichape; } } -STATIC_OVL int +static int count_ape_maps(leave, grab) int *leave, *grab; { @@ -6535,7 +6535,7 @@ int status; } } -STATIC_OVL boolean +static boolean is_wc_option(optnam) const char *optnam; { @@ -6549,7 +6549,7 @@ const char *optnam; return FALSE; } -STATIC_OVL boolean +static boolean wc_supported(optnam) const char *optnam; { @@ -6593,7 +6593,7 @@ int status; } } -STATIC_OVL boolean +static boolean is_wc2_option(optnam) const char *optnam; { @@ -6607,7 +6607,7 @@ const char *optnam; return FALSE; } -STATIC_OVL boolean +static boolean wc2_supported(optnam) const char *optnam; { @@ -6621,7 +6621,7 @@ const char *optnam; return FALSE; } -STATIC_OVL void +static void wc_set_font_name(opttype, fontname) int opttype; char *fontname; @@ -6657,7 +6657,7 @@ char *fontname; return; } -STATIC_OVL int +static int wc_set_window_colors(op) char *op; { diff --git a/src/pager.c b/src/pager.c index c98dff5bb..8dac57eb4 100644 --- a/src/pager.c +++ b/src/pager.c @@ -9,35 +9,35 @@ #include "hack.h" #include "dlb.h" -STATIC_DCL boolean FDECL(is_swallow_sym, (int)); -STATIC_DCL int FDECL(append_str, (char *, const char *)); -STATIC_DCL void FDECL(look_at_object, (char *, int, int, int)); -STATIC_DCL void FDECL(look_at_monster, (char *, char *, +static boolean FDECL(is_swallow_sym, (int)); +static int FDECL(append_str, (char *, const char *)); +static void FDECL(look_at_object, (char *, int, int, int)); +static void FDECL(look_at_monster, (char *, char *, struct monst *, int, int)); -STATIC_DCL struct permonst *FDECL(lookat, (int, int, char *, char *)); -STATIC_DCL void FDECL(checkfile, (char *, struct permonst *, +static struct permonst *FDECL(lookat, (int, int, char *, char *)); +static void FDECL(checkfile, (char *, struct permonst *, BOOLEAN_P, BOOLEAN_P, char *)); -STATIC_DCL void FDECL(look_all, (BOOLEAN_P,BOOLEAN_P)); -STATIC_DCL void FDECL(do_supplemental_info, (char *, struct permonst *, +static void FDECL(look_all, (BOOLEAN_P,BOOLEAN_P)); +static void FDECL(do_supplemental_info, (char *, struct permonst *, BOOLEAN_P)); -STATIC_DCL void NDECL(whatdoes_help); -STATIC_DCL void NDECL(docontact); -STATIC_DCL void NDECL(dispfile_help); -STATIC_DCL void NDECL(dispfile_shelp); -STATIC_DCL void NDECL(dispfile_optionfile); -STATIC_DCL void NDECL(dispfile_license); -STATIC_DCL void NDECL(dispfile_debughelp); -STATIC_DCL void NDECL(hmenu_doextversion); -STATIC_DCL void NDECL(hmenu_dohistory); -STATIC_DCL void NDECL(hmenu_dowhatis); -STATIC_DCL void NDECL(hmenu_dowhatdoes); -STATIC_DCL void NDECL(hmenu_doextlist); +static void NDECL(whatdoes_help); +static void NDECL(docontact); +static void NDECL(dispfile_help); +static void NDECL(dispfile_shelp); +static void NDECL(dispfile_optionfile); +static void NDECL(dispfile_license); +static void NDECL(dispfile_debughelp); +static void NDECL(hmenu_doextversion); +static void NDECL(hmenu_dohistory); +static void NDECL(hmenu_dowhatis); +static void NDECL(hmenu_dowhatdoes); +static void NDECL(hmenu_doextlist); #ifdef PORT_HELP extern void NDECL(port_help); #endif /* Returns "true" for characters that could represent a monster's stomach. */ -STATIC_OVL boolean +static boolean is_swallow_sym(c) int c; { @@ -54,7 +54,7 @@ int c; * a substring of buf. Return 1 if the string was appended, 0 otherwise. * It is expected that buf is of size BUFSZ. */ -STATIC_OVL int +static int append_str(buf, new_str) char *buf; const char *new_str; @@ -224,7 +224,7 @@ struct obj **obj_p; return fakeobj; /* when True, caller needs to dealloc *obj_p */ } -STATIC_OVL void +static void look_at_object(buf, x, y, glyph) char *buf; /* output buffer */ int x, y, glyph; @@ -259,7 +259,7 @@ int x, y, glyph; return; } -STATIC_OVL void +static void look_at_monster(buf, monbuf, mtmp, x, y) char *buf, *monbuf; /* buf: output, monbuf: optional output */ struct monst *mtmp; @@ -384,7 +384,7 @@ int x, y; * Return the name of the glyph found at (x,y). * If not hallucinating and the glyph is a monster, also monster data. */ -STATIC_OVL struct permonst * +static struct permonst * lookat(x, y, buf, monbuf) int x, y; char *buf, *monbuf; @@ -529,7 +529,7 @@ char *buf, *monbuf; * lcase() for data.base lookup so that we can have a clean key. * Therefore, we create a copy of inp _just_ for data.base lookup. */ -STATIC_OVL void +static void checkfile(inp, pm, user_typed_name, without_asking, supplemental_name) char *inp; struct permonst *pm; @@ -1299,7 +1299,7 @@ coord *click_cc; return 0; } -STATIC_OVL void +static void look_all(nearby, do_mons) boolean nearby; /* True => within BOLTLIM, False => entire map */ boolean do_mons; /* True => monsters, False => objects */ @@ -1409,7 +1409,7 @@ static const char *suptext2[] = { (char *) 0, }; -STATIC_OVL void +static void do_supplemental_info(name, pm, without_asking) char *name; struct permonst *pm; @@ -1570,7 +1570,7 @@ doidtrap() rest_on_space, #if SHELL, #if SUSPEND) are booleans. */ -STATIC_DCL void +static void whatdoes_help() { dlb *fp; @@ -1604,10 +1604,10 @@ struct wd_stack_frame { Bitfield(else_seen, 1); }; -STATIC_DCL boolean FDECL(whatdoes_cond, (char *, struct wd_stack_frame *, +static boolean FDECL(whatdoes_cond, (char *, struct wd_stack_frame *, int *, int)); -STATIC_OVL boolean +static boolean whatdoes_cond(buf, stack, depth, lnum) char *buf; struct wd_stack_frame *stack; @@ -1855,7 +1855,7 @@ dowhatdoes() return 0; } -STATIC_OVL void +static void docontact(VOID_ARGS) { winid cwin = create_nhwindow(NHW_TEXT); @@ -1885,61 +1885,61 @@ docontact(VOID_ARGS) destroy_nhwindow(cwin); } -STATIC_OVL void +static void dispfile_help(VOID_ARGS) { display_file(HELP, TRUE); } -STATIC_OVL void +static void dispfile_shelp(VOID_ARGS) { display_file(SHELP, TRUE); } -STATIC_OVL void +static void dispfile_optionfile(VOID_ARGS) { display_file(OPTIONFILE, TRUE); } -STATIC_OVL void +static void dispfile_license(VOID_ARGS) { display_file(LICENSE, TRUE); } -STATIC_OVL void +static void dispfile_debughelp(VOID_ARGS) { display_file(DEBUGHELP, TRUE); } -STATIC_OVL void +static void hmenu_doextversion(VOID_ARGS) { (void) doextversion(); } -STATIC_OVL void +static void hmenu_dohistory(VOID_ARGS) { (void) dohistory(); } -STATIC_OVL void +static void hmenu_dowhatis(VOID_ARGS) { (void) dowhatis(); } -STATIC_OVL void +static void hmenu_dowhatdoes(VOID_ARGS) { (void) dowhatdoes(); } -STATIC_OVL void +static void hmenu_doextlist(VOID_ARGS) { (void) doextlist(); diff --git a/src/pickup.c b/src/pickup.c index 8ae5ca59c..fde27156e 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -11,40 +11,40 @@ #define CONTAINED_SYM '>' /* from invent.c */ -STATIC_DCL void FDECL(simple_look, (struct obj *, BOOLEAN_P)); -STATIC_DCL boolean FDECL(query_classes, (char *, boolean *, boolean *, +static void FDECL(simple_look, (struct obj *, BOOLEAN_P)); +static boolean FDECL(query_classes, (char *, boolean *, boolean *, const char *, struct obj *, BOOLEAN_P, int *)); -STATIC_DCL boolean FDECL(fatal_corpse_mistake, (struct obj *, BOOLEAN_P)); -STATIC_DCL void FDECL(check_here, (BOOLEAN_P)); -STATIC_DCL boolean FDECL(n_or_more, (struct obj *)); -STATIC_DCL boolean FDECL(all_but_uchain, (struct obj *)); +static boolean FDECL(fatal_corpse_mistake, (struct obj *, BOOLEAN_P)); +static void FDECL(check_here, (BOOLEAN_P)); +static boolean FDECL(n_or_more, (struct obj *)); +static boolean FDECL(all_but_uchain, (struct obj *)); #if 0 /* not used */ -STATIC_DCL boolean FDECL(allow_cat_no_uchain, (struct obj *)); +static boolean FDECL(allow_cat_no_uchain, (struct obj *)); #endif -STATIC_DCL int FDECL(autopick, (struct obj *, int, menu_item **)); -STATIC_DCL int FDECL(count_categories, (struct obj *, int)); -STATIC_DCL int FDECL(delta_cwt, (struct obj *, struct obj *)); -STATIC_DCL long FDECL(carry_count, (struct obj *, struct obj *, long, +static int FDECL(autopick, (struct obj *, int, menu_item **)); +static int FDECL(count_categories, (struct obj *, int)); +static int FDECL(delta_cwt, (struct obj *, struct obj *)); +static long FDECL(carry_count, (struct obj *, struct obj *, long, BOOLEAN_P, int *, int *)); -STATIC_DCL int FDECL(lift_object, (struct obj *, struct obj *, long *, +static int FDECL(lift_object, (struct obj *, struct obj *, long *, BOOLEAN_P)); -STATIC_DCL boolean FDECL(mbag_explodes, (struct obj *, int)); -STATIC_DCL long FDECL(boh_loss, (struct obj *container, int)); -STATIC_PTR int FDECL(in_container, (struct obj *)); -STATIC_PTR int FDECL(out_container, (struct obj *)); -STATIC_DCL void FDECL(removed_from_icebox, (struct obj *)); -STATIC_DCL long FDECL(mbag_item_gone, (int, struct obj *)); -STATIC_DCL void FDECL(explain_container_prompt, (BOOLEAN_P)); -STATIC_DCL int FDECL(traditional_loot, (BOOLEAN_P)); -STATIC_DCL int FDECL(menu_loot, (int, BOOLEAN_P)); -STATIC_DCL char FDECL(in_or_out_menu, (const char *, struct obj *, BOOLEAN_P, +static boolean FDECL(mbag_explodes, (struct obj *, int)); +static long FDECL(boh_loss, (struct obj *container, int)); +static int FDECL(in_container, (struct obj *)); +static int FDECL(out_container, (struct obj *)); +static void FDECL(removed_from_icebox, (struct obj *)); +static long FDECL(mbag_item_gone, (int, struct obj *)); +static void FDECL(explain_container_prompt, (BOOLEAN_P)); +static int FDECL(traditional_loot, (BOOLEAN_P)); +static int FDECL(menu_loot, (int, BOOLEAN_P)); +static char FDECL(in_or_out_menu, (const char *, struct obj *, BOOLEAN_P, BOOLEAN_P, BOOLEAN_P, BOOLEAN_P)); -STATIC_DCL boolean FDECL(able_to_loot, (int, int, BOOLEAN_P)); -STATIC_DCL boolean NDECL(reverse_loot); -STATIC_DCL boolean FDECL(mon_beside, (int, int)); -STATIC_DCL int FDECL(do_loot_cont, (struct obj **, int, int)); -STATIC_DCL void FDECL(tipcontainer, (struct obj *)); +static boolean FDECL(able_to_loot, (int, int, BOOLEAN_P)); +static boolean NDECL(reverse_loot); +static boolean FDECL(mon_beside, (int, int)); +static int FDECL(do_loot_cont, (struct obj **, int, int)); +static void FDECL(tipcontainer, (struct obj *)); /* define for query_objlist() and autopickup() */ #define FOLLOW(curr, flags) \ @@ -64,7 +64,7 @@ static const char /* BUG: this lets you look at cockatrice corpses while blind without touching them */ /* much simpler version of the look-here code; used by query_classes() */ -STATIC_OVL void +static void simple_look(otmp, here) struct obj *otmp; /* list of objects */ boolean here; /* flag for type of obj list linkage */ @@ -126,7 +126,7 @@ int *itemcount; * "?/a" or "a?/" or "/a?",&c picks all '?' even though no '/' * (ie, treated as if it had just been "?a"). */ -STATIC_OVL boolean +static boolean query_classes(oclasses, one_at_a_time, everything, action, objs, here, menu_on_demand) char oclasses[]; @@ -249,7 +249,7 @@ int *menu_on_demand; } /* check whether hero is bare-handedly touching a cockatrice corpse */ -STATIC_OVL boolean +static boolean fatal_corpse_mistake(obj, remotely) struct obj *obj; boolean remotely; @@ -286,7 +286,7 @@ boolean remotely; } /* look at the objects at our location, unless there are too many of them */ -STATIC_OVL void +static void check_here(picked_some) boolean picked_some; { @@ -311,7 +311,7 @@ boolean picked_some; } /* query_objlist callback: return TRUE if obj's count is >= reference value */ -STATIC_OVL boolean +static boolean n_or_more(obj) struct obj *obj; { @@ -360,7 +360,7 @@ int c; } /* query_objlist callback: return TRUE if not uchain */ -STATIC_OVL boolean +static boolean all_but_uchain(obj) struct obj *obj; { @@ -440,7 +440,7 @@ struct obj *obj; #if 0 /* not used */ /* query_objlist callback: return TRUE if valid category (class), no uchain */ -STATIC_OVL boolean +static boolean allow_cat_no_uchain(obj) struct obj *obj; { @@ -762,7 +762,7 @@ boolean calc_costly; * picked is zero, the pickup list is left alone. The caller of this * function must free the pickup list. */ -STATIC_OVL int +static int autopick(olist, follow, pick_list) struct obj *olist; /* the object list */ int follow; /* how to follow the object list */ @@ -1179,7 +1179,7 @@ int how; /* type of query */ return n; } -STATIC_OVL int +static int count_categories(olist, qflags) struct obj *olist; int qflags; @@ -1213,7 +1213,7 @@ int qflags; * object is removed from it. Use before and after weight amounts rather * than trying to match the calculation used by weight() in mkobj.c. */ -STATIC_OVL int +static int delta_cwt(container, obj) struct obj *container, *obj; { @@ -1240,7 +1240,7 @@ struct obj *container, *obj; } /* could we carry `obj'? if not, could we carry some of it/them? */ -STATIC_OVL long +static long carry_count(obj, container, count, telekinesis, wt_before, wt_after) struct obj *obj, *container; /* object to pick up, bag it's coming out of */ long count; @@ -1375,7 +1375,7 @@ int *wt_before, *wt_after; } /* determine whether character is able and player is willing to carry `obj' */ -STATIC_OVL +static int lift_object(obj, container, cnt_p, telekinesis) struct obj *obj, *container; /* object to pick up, bag it's coming out of */ @@ -1651,7 +1651,7 @@ boolean countem; return container_count; } -STATIC_OVL boolean +static boolean able_to_loot(x, y, looting) int x, y; boolean looting; /* loot vs tip */ @@ -1681,7 +1681,7 @@ boolean looting; /* loot vs tip */ return TRUE; } -STATIC_OVL boolean +static boolean mon_beside(x, y) int x, y; { @@ -1697,7 +1697,7 @@ int x, y; return FALSE; } -STATIC_OVL int +static int do_loot_cont(cobjp, cindex, ccount) struct obj **cobjp; int cindex, ccount; /* index of this container (1..N), number of them (N) */ @@ -1916,7 +1916,7 @@ doloot() } /* called when attempting to #loot while confused */ -STATIC_OVL boolean +static boolean reverse_loot() { struct obj *goldob = 0, *coffers, *otmp, boxdummy; @@ -2057,7 +2057,7 @@ boolean *prev_loot; * Decide whether an object being placed into a magic bag will cause * it to explode. If the object is a bag itself, check recursively. */ -STATIC_OVL boolean +static boolean mbag_explodes(obj, depthin) struct obj *obj; int depthin; @@ -2081,7 +2081,7 @@ int depthin; return FALSE; } -STATIC_OVL long +static long boh_loss(container, held) struct obj *container; int held; @@ -2104,7 +2104,7 @@ int held; } /* Returns: -1 to stop, 1 item was inserted, 0 item was not inserted. */ -STATIC_PTR int +static int in_container(obj) register struct obj *obj; { @@ -2270,7 +2270,7 @@ struct obj *obj; } /* Returns: -1 to stop, 1 item was removed, 0 item was not removed. */ -STATIC_PTR int +static int out_container(obj) register struct obj *obj; { @@ -2330,7 +2330,7 @@ register struct obj *obj; } /* taking a corpse out of an ice box needs a couple of adjustments */ -STATIC_OVL void +static void removed_from_icebox(obj) struct obj *obj; { @@ -2342,7 +2342,7 @@ struct obj *obj; } /* an object inside a cursed bag of holding is being destroyed */ -STATIC_OVL long +static long mbag_item_gone(held, item) int held; struct obj *item; @@ -2439,7 +2439,7 @@ int FDECL((*fn), (OBJ_P)); && !g.current_container); } -STATIC_OVL void +static void explain_container_prompt(more_containers) boolean more_containers; { @@ -2732,7 +2732,7 @@ boolean more_containers; /* True iff #loot multiple and this isn't last one */ } /* loot current_container (take things out or put things in), by prompting */ -STATIC_OVL int +static int traditional_loot(put_in) boolean put_in; { @@ -2767,7 +2767,7 @@ boolean put_in; } /* loot current_container (take things out or put things in), using a menu */ -STATIC_OVL int +static int menu_loot(retry, put_in) int retry; boolean put_in; @@ -2859,7 +2859,7 @@ boolean put_in; return n_looted; } -STATIC_OVL char +static char in_or_out_menu(prompt, obj, outokay, inokay, alreadyused, more_containers) const char *prompt; struct obj *obj; @@ -3090,7 +3090,7 @@ dotip() return 0; } -STATIC_OVL void +static void tipcontainer(box) struct obj *box; /* or bag */ { diff --git a/src/polyself.c b/src/polyself.c index 9753e77ae..8517307d8 100644 --- a/src/polyself.c +++ b/src/polyself.c @@ -21,15 +21,15 @@ #include "hack.h" -STATIC_DCL void FDECL(check_strangling, (BOOLEAN_P)); -STATIC_DCL void FDECL(polyman, (const char *, const char *)); -STATIC_DCL void NDECL(break_armor); -STATIC_DCL void FDECL(drop_weapon, (int)); -STATIC_DCL int FDECL(armor_to_dragon, (int)); -STATIC_DCL void NDECL(newman); -STATIC_DCL void NDECL(polysense); +static void FDECL(check_strangling, (BOOLEAN_P)); +static void FDECL(polyman, (const char *, const char *)); +static void NDECL(break_armor); +static void FDECL(drop_weapon, (int)); +static int FDECL(armor_to_dragon, (int)); +static void NDECL(newman); +static void NDECL(polysense); -STATIC_VAR const char no_longer_petrify_resistant[] = +static const char no_longer_petrify_resistant[] = "No longer petrify-resistant, you"; /* update the g.youmonst.data structure pointer and intrinsics */ @@ -135,7 +135,7 @@ float_vs_flight() } /* for changing into form that's immune to strangulation */ -STATIC_OVL void +static void check_strangling(on) boolean on; { @@ -164,7 +164,7 @@ boolean on; } /* make a (new) human out of the player */ -STATIC_OVL void +static void polyman(fmt, arg) const char *fmt, *arg; { @@ -270,7 +270,7 @@ change_sex() } } -STATIC_OVL void +static void newman() { int i, oldlvl, newlvl, hpmax, enmax; @@ -876,7 +876,7 @@ int mntmp; return 1; } -STATIC_OVL void +static void break_armor() { register struct obj *otmp; @@ -989,7 +989,7 @@ break_armor() } } -STATIC_OVL void +static void drop_weapon(alone) int alone; { @@ -1799,7 +1799,7 @@ int damtype, dam; } } -STATIC_OVL int +static int armor_to_dragon(atyp) int atyp; { diff --git a/src/potion.c b/src/potion.c index f41f322c5..c2a6c88df 100644 --- a/src/potion.c +++ b/src/potion.c @@ -7,15 +7,15 @@ static NEARDATA const char beverages[] = { POTION_CLASS, 0 }; -STATIC_DCL long FDECL(itimeout, (long)); -STATIC_DCL long FDECL(itimeout_incr, (long, int)); -STATIC_DCL void NDECL(ghost_from_bottle); -STATIC_DCL boolean +static long FDECL(itimeout, (long)); +static long FDECL(itimeout_incr, (long, int)); +static void NDECL(ghost_from_bottle); +static boolean FDECL(H2Opotion_dip, (struct obj *, struct obj *, BOOLEAN_P, const char *)); -STATIC_DCL short FDECL(mixtype, (struct obj *, struct obj *)); +static short FDECL(mixtype, (struct obj *, struct obj *)); /* force `val' to be within valid range for intrinsic timeout value */ -STATIC_OVL long +static long itimeout(val) long val; { @@ -28,7 +28,7 @@ long val; } /* increment `old' by `incr' and force result to be valid intrinsic timeout */ -STATIC_OVL long +static long itimeout_incr(old, incr) long old; int incr; @@ -447,7 +447,7 @@ self_invis_message() : "can't see yourself"); } -STATIC_OVL void +static void ghost_from_bottle() { struct monst *mtmp = makemon(&mons[PM_GHOST], u.ux, u.uy, NO_MM_FLAGS); @@ -1207,7 +1207,7 @@ bottlename() } /* handle item dipped into water potion or steed saddle splashed by same */ -STATIC_OVL boolean +static boolean H2Opotion_dip(potion, targobj, useeit, objphrase) struct obj *potion, *targobj; boolean useeit; @@ -1762,7 +1762,7 @@ register struct obj *obj; } /* returns the potion type when o1 is dipped in o2 */ -STATIC_OVL short +static short mixtype(o1, o2) register struct obj *o1, *o2; { diff --git a/src/pray.c b/src/pray.c index e7a9082a0..a22cecb29 100644 --- a/src/pray.c +++ b/src/pray.c @@ -4,22 +4,22 @@ #include "hack.h" -STATIC_PTR int NDECL(prayer_done); -STATIC_DCL struct obj *NDECL(worst_cursed_item); -STATIC_DCL int NDECL(in_trouble); -STATIC_DCL void FDECL(fix_worst_trouble, (int)); -STATIC_DCL void FDECL(angrygods, (ALIGNTYP_P)); -STATIC_DCL void FDECL(at_your_feet, (const char *)); -STATIC_DCL void NDECL(gcrownu); -STATIC_DCL void FDECL(pleased, (ALIGNTYP_P)); -STATIC_DCL void FDECL(godvoice, (ALIGNTYP_P, const char *)); -STATIC_DCL void FDECL(god_zaps_you, (ALIGNTYP_P)); -STATIC_DCL void FDECL(fry_by_god, (ALIGNTYP_P, BOOLEAN_P)); -STATIC_DCL void FDECL(gods_angry, (ALIGNTYP_P)); -STATIC_DCL void FDECL(gods_upset, (ALIGNTYP_P)); -STATIC_DCL void FDECL(consume_offering, (struct obj *)); -STATIC_DCL boolean FDECL(water_prayer, (BOOLEAN_P)); -STATIC_DCL boolean FDECL(blocked_boulder, (int, int)); +static int NDECL(prayer_done); +static struct obj *NDECL(worst_cursed_item); +static int NDECL(in_trouble); +static void FDECL(fix_worst_trouble, (int)); +static void FDECL(angrygods, (ALIGNTYP_P)); +static void FDECL(at_your_feet, (const char *)); +static void NDECL(gcrownu); +static void FDECL(pleased, (ALIGNTYP_P)); +static void FDECL(godvoice, (ALIGNTYP_P, const char *)); +static void FDECL(god_zaps_you, (ALIGNTYP_P)); +static void FDECL(fry_by_god, (ALIGNTYP_P, BOOLEAN_P)); +static void FDECL(gods_angry, (ALIGNTYP_P)); +static void FDECL(gods_upset, (ALIGNTYP_P)); +static void FDECL(consume_offering, (struct obj *)); +static boolean FDECL(water_prayer, (BOOLEAN_P)); +static boolean FDECL(blocked_boulder, (int, int)); /* simplify a few tests */ #define Cursed_obj(obj, typ) ((obj) && (obj)->otyp == (typ) && (obj)->cursed) @@ -174,7 +174,7 @@ stuck_in_wall() * 3.4.2: make an exception if polymorphed into a form which lacks * hands; that's a case where the ramifications override this doubt. */ -STATIC_OVL int +static int in_trouble() { struct obj *otmp; @@ -264,7 +264,7 @@ in_trouble() } /* select an item for TROUBLE_CURSED_ITEMS */ -STATIC_OVL struct obj * +static struct obj * worst_cursed_item() { register struct obj *otmp; @@ -325,7 +325,7 @@ worst_cursed_item() return otmp; } -STATIC_OVL void +static void fix_worst_trouble(trouble) int trouble; { @@ -567,7 +567,7 @@ int trouble; * bathroom walls, but who is foiled by bathrobes." --Bertrand Russell, 1943 * Divine wrath, dungeon walls, and armor follow the same principle. */ -STATIC_OVL void +static void god_zaps_you(resp_god) aligntyp resp_god; { @@ -643,7 +643,7 @@ aligntyp resp_god; } } -STATIC_OVL void +static void fry_by_god(resp_god, via_disintegration) aligntyp resp_god; boolean via_disintegration; @@ -655,7 +655,7 @@ boolean via_disintegration; done(DIED); } -STATIC_OVL void +static void angrygods(resp_god) aligntyp resp_god; { @@ -748,7 +748,7 @@ const char *str; } } -STATIC_OVL void +static void gcrownu() { struct obj *obj; @@ -904,7 +904,7 @@ gcrownu() return; } -STATIC_OVL void +static void pleased(g_align) aligntyp g_align; { @@ -1215,7 +1215,7 @@ aligntyp g_align; /* either blesses or curses water on the altar, * returns true if it found any water here. */ -STATIC_OVL boolean +static boolean water_prayer(bless_water) boolean bless_water; { @@ -1244,7 +1244,7 @@ boolean bless_water; return (boolean) (changed > 0L); } -STATIC_OVL void +static void godvoice(g_align, words) aligntyp g_align; const char *words; @@ -1260,7 +1260,7 @@ const char *words; godvoices[rn2(SIZE(godvoices))], quot, words, quot); } -STATIC_OVL void +static void gods_angry(g_align) aligntyp g_align; { @@ -1268,7 +1268,7 @@ aligntyp g_align; } /* The g_align god is upset with you. */ -STATIC_OVL void +static void gods_upset(g_align) aligntyp g_align; { @@ -1279,7 +1279,7 @@ aligntyp g_align; angrygods(g_align); } -STATIC_OVL void +static void consume_offering(otmp) register struct obj *otmp; { @@ -1865,7 +1865,7 @@ dopray() return 1; } -STATIC_PTR int +static int prayer_done() /* M. Stephenson (1.0.3b) */ { aligntyp alignment = g.p_aligntyp; @@ -2240,7 +2240,7 @@ register int x, y; } /* assumes isok() at one space away, but not necessarily at two */ -STATIC_OVL boolean +static boolean blocked_boulder(dx, dy) int dx, dy; { diff --git a/src/priest.c b/src/priest.c index 2c0c67913..08853e982 100644 --- a/src/priest.c +++ b/src/priest.c @@ -9,8 +9,8 @@ #define ALGN_SINNED (-4) /* worse than strayed (-1..-3) */ #define ALGN_PIOUS 14 /* better than fervent (9..13) */ -STATIC_DCL boolean FDECL(histemple_at, (struct monst *, XCHAR_P, XCHAR_P)); -STATIC_DCL boolean FDECL(has_shrine, (struct monst *)); +static boolean FDECL(histemple_at, (struct monst *, XCHAR_P, XCHAR_P)); +static boolean FDECL(has_shrine, (struct monst *)); void newepri(mtmp) @@ -149,7 +149,7 @@ register char *array; return '\0'; } -STATIC_OVL boolean +static boolean histemple_at(priest, x, y) register struct monst *priest; register xchar x, y; @@ -349,7 +349,7 @@ struct monst *priest; return (boolean) (u.ualign.type == mon_aligntyp(priest)); } -STATIC_OVL boolean +static boolean has_shrine(pri) struct monst *pri; { diff --git a/src/quest.c b/src/quest.c index 46a30e667..42f2db639 100644 --- a/src/quest.c +++ b/src/quest.c @@ -12,18 +12,18 @@ #define Not_firsttime (on_level(&u.uz0, &u.uz)) #define Qstat(x) (g.quest_status.x) -STATIC_DCL void NDECL(on_start); -STATIC_DCL void NDECL(on_locate); -STATIC_DCL void NDECL(on_goal); -STATIC_DCL boolean NDECL(not_capable); -STATIC_DCL int FDECL(is_pure, (BOOLEAN_P)); -STATIC_DCL void FDECL(expulsion, (BOOLEAN_P)); -STATIC_DCL void NDECL(chat_with_leader); -STATIC_DCL void NDECL(chat_with_nemesis); -STATIC_DCL void NDECL(chat_with_guardian); -STATIC_DCL void FDECL(prisoner_speaks, (struct monst *)); +static void NDECL(on_start); +static void NDECL(on_locate); +static void NDECL(on_goal); +static boolean NDECL(not_capable); +static int FDECL(is_pure, (BOOLEAN_P)); +static void FDECL(expulsion, (BOOLEAN_P)); +static void NDECL(chat_with_leader); +static void NDECL(chat_with_nemesis); +static void NDECL(chat_with_guardian); +static void FDECL(prisoner_speaks, (struct monst *)); -STATIC_OVL void +static void on_start() { if (!Qstat(first_start)) { @@ -37,7 +37,7 @@ on_start() } } -STATIC_OVL void +static void on_locate() { /* the locate messages are phrased in a manner such that they only @@ -59,7 +59,7 @@ on_locate() } } -STATIC_OVL void +static void on_goal() { if (Qstat(killed_nemesis)) { @@ -136,13 +136,13 @@ ok_to_quest() && is_pure(FALSE) > 0); } -STATIC_OVL boolean +static boolean not_capable() { return (boolean) (u.ulevel < MIN_QUEST_LEVEL); } -STATIC_OVL int +static int is_pure(talk) boolean talk; { @@ -176,7 +176,7 @@ boolean talk; * This assumes that the hero is currently _in_ the quest dungeon and that * there is a single branch to and from it. */ -STATIC_OVL void +static void expulsion(seal) boolean seal; { @@ -243,7 +243,7 @@ struct obj *obj; /* quest artifact; possibly null if carrying Amulet */ } } -STATIC_OVL void +static void chat_with_leader() { /* Rule 0: Cheater checks. */ @@ -336,7 +336,7 @@ struct monst *mtmp; chat_with_leader(); } -STATIC_OVL void +static void chat_with_nemesis() { /* The nemesis will do most of the talking, but... */ @@ -367,7 +367,7 @@ nemesis_speaks() qt_pager(rn1(10, QT_DISCOURAGE)); } -STATIC_OVL void +static void chat_with_guardian() { /* These guys/gals really don't have much to say... */ @@ -377,7 +377,7 @@ chat_with_guardian() qt_pager(rn1(5, QT_GUARDTALK)); } -STATIC_OVL void +static void prisoner_speaks(mtmp) struct monst *mtmp; { diff --git a/src/questpgr.c b/src/questpgr.c index e2cdc8314..f0cf6283f 100644 --- a/src/questpgr.c +++ b/src/questpgr.c @@ -17,19 +17,19 @@ static void NDECL(dump_qtlist); static void FDECL(Fread, (genericptr_t, int, int, dlb *)); -STATIC_DCL struct qtmsg *FDECL(construct_qtlist, (long)); -STATIC_DCL const char *NDECL(intermed); -STATIC_DCL struct obj *FDECL(find_qarti, (struct obj *)); -STATIC_DCL const char *NDECL(neminame); -STATIC_DCL const char *NDECL(guardname); -STATIC_DCL const char *NDECL(homebase); -STATIC_DCL void FDECL(qtext_pronoun, (CHAR_P, CHAR_P)); -STATIC_DCL struct qtmsg *FDECL(msg_in, (struct qtmsg *, int)); -STATIC_DCL void FDECL(convert_arg, (CHAR_P)); -STATIC_DCL void FDECL(convert_line, (char *,char *)); -STATIC_DCL void FDECL(deliver_by_pline, (struct qtmsg *)); -STATIC_DCL void FDECL(deliver_by_window, (struct qtmsg *, int)); -STATIC_DCL boolean FDECL(skip_pager, (BOOLEAN_P)); +static struct qtmsg *FDECL(construct_qtlist, (long)); +static const char *NDECL(intermed); +static struct obj *FDECL(find_qarti, (struct obj *)); +static const char *NDECL(neminame); +static const char *NDECL(guardname); +static const char *NDECL(homebase); +static void FDECL(qtext_pronoun, (CHAR_P, CHAR_P)); +static struct qtmsg *FDECL(msg_in, (struct qtmsg *, int)); +static void FDECL(convert_arg, (CHAR_P)); +static void FDECL(convert_line, (char *,char *)); +static void FDECL(deliver_by_pline, (struct qtmsg *)); +static void FDECL(deliver_by_window, (struct qtmsg *, int)); +static boolean FDECL(skip_pager, (BOOLEAN_P)); /* dump the character msg list to check appearance; build with DEBUG enabled and use DEBUGFILES=questpgr.c @@ -65,7 +65,7 @@ dlb *stream; } } -STATIC_OVL struct qtmsg * +static struct qtmsg * construct_qtlist(hdr_offset) long hdr_offset; { @@ -175,7 +175,7 @@ ldrname() } /* return your intermediate target string */ -STATIC_OVL const char * +static const char * intermed() { return g.urole.intermed; @@ -188,7 +188,7 @@ struct obj *otmp; return (boolean) (otmp->oartifact == g.urole.questarti); } -STATIC_OVL struct obj * +static struct obj * find_qarti(ochain) struct obj *ochain; { @@ -241,7 +241,7 @@ unsigned whichchains; } /* return your role nemesis' name */ -STATIC_OVL const char * +static const char * neminame() { int i = g.urole.neminum; @@ -251,7 +251,7 @@ neminame() return g.nambuf; } -STATIC_OVL const char * +static const char * guardname() /* return your role leader's guard monster name */ { int i = g.urole.guardnum; @@ -259,7 +259,7 @@ guardname() /* return your role leader's guard monster name */ return mons[i].mname; } -STATIC_OVL const char * +static const char * homebase() /* return your role leader's location */ { return g.urole.homebase; @@ -267,7 +267,7 @@ homebase() /* return your role leader's location */ /* replace deity, leader, nemesis, or artifact name with pronoun; overwrites cvt_buf[] */ -STATIC_OVL void +static void qtext_pronoun(who, which) char who, /* 'd' => deity, 'l' => leader, 'n' => nemesis, 'o' => artifact */ which; /* 'h'|'H'|'i'|'I'|'j'|'J' */ @@ -304,7 +304,7 @@ char who, /* 'd' => deity, 'l' => leader, 'n' => nemesis, 'o' => artifact */ return; } -STATIC_OVL struct qtmsg * +static struct qtmsg * msg_in(qtm_list, msgnum) struct qtmsg *qtm_list; int msgnum; @@ -318,7 +318,7 @@ int msgnum; return (struct qtmsg *) 0; } -STATIC_OVL void +static void convert_arg(c) char c; { @@ -410,7 +410,7 @@ char c; Strcpy(g.cvt_buf, str); } -STATIC_OVL void +static void convert_line(in_line, out_line) char *in_line, *out_line; { @@ -504,7 +504,7 @@ char *in_line, *out_line; return; } -STATIC_OVL void +static void deliver_by_pline(qt_msg) struct qtmsg *qt_msg; { @@ -519,7 +519,7 @@ struct qtmsg *qt_msg; } } -STATIC_OVL void +static void deliver_by_window(qt_msg, how) struct qtmsg *qt_msg; int how; @@ -569,7 +569,7 @@ int how; putmsghistory(out_line, FALSE); } -STATIC_OVL boolean +static boolean skip_pager(common) boolean common; { diff --git a/src/read.c b/src/read.c index 9c3f88eb8..84a3278a3 100644 --- a/src/read.c +++ b/src/read.c @@ -16,26 +16,26 @@ static NEARDATA const char readable[] = { ALL_CLASSES, SCROLL_CLASS, SPBOOK_CLASS, 0 }; static const char all_count[] = { ALLOW_COUNT, ALL_CLASSES, 0 }; -STATIC_DCL boolean FDECL(learnscrolltyp, (SHORT_P)); -STATIC_DCL char *FDECL(erode_obj_text, (struct obj *, char *)); -STATIC_DCL char *FDECL(apron_text, (struct obj *, char *buf)); -STATIC_DCL void FDECL(stripspe, (struct obj *)); -STATIC_DCL void FDECL(p_glow1, (struct obj *)); -STATIC_DCL void FDECL(p_glow2, (struct obj *, const char *)); -STATIC_DCL void FDECL(forget_single_object, (int)); +static boolean FDECL(learnscrolltyp, (SHORT_P)); +static char *FDECL(erode_obj_text, (struct obj *, char *)); +static char *FDECL(apron_text, (struct obj *, char *buf)); +static void FDECL(stripspe, (struct obj *)); +static void FDECL(p_glow1, (struct obj *)); +static void FDECL(p_glow2, (struct obj *, const char *)); +static void FDECL(forget_single_object, (int)); #if 0 /* not used */ -STATIC_DCL void FDECL(forget_objclass, (int)); +static void FDECL(forget_objclass, (int)); #endif -STATIC_DCL void FDECL(randomize, (int *, int)); -STATIC_DCL void FDECL(forget, (int)); -STATIC_DCL int FDECL(maybe_tame, (struct monst *, struct obj *)); -STATIC_DCL boolean FDECL(get_valid_stinking_cloud_pos, (int, int)); -STATIC_DCL boolean FDECL(is_valid_stinking_cloud_pos, (int, int, BOOLEAN_P)); -STATIC_PTR void FDECL(display_stinking_cloud_positions, (int)); -STATIC_PTR void FDECL(set_lit, (int, int, genericptr)); -STATIC_DCL void NDECL(do_class_genocide); +static void FDECL(randomize, (int *, int)); +static void FDECL(forget, (int)); +static int FDECL(maybe_tame, (struct monst *, struct obj *)); +static boolean FDECL(get_valid_stinking_cloud_pos, (int, int)); +static boolean FDECL(is_valid_stinking_cloud_pos, (int, int, BOOLEAN_P)); +static void FDECL(display_stinking_cloud_positions, (int)); +static void FDECL(set_lit, (int, int, genericptr)); +static void NDECL(do_class_genocide); -STATIC_OVL boolean +static boolean learnscrolltyp(scrolltyp) short scrolltyp; { @@ -58,7 +58,7 @@ struct obj *sobj; (void) learnscrolltyp(sobj->otyp); } -STATIC_OVL char * +static char * erode_obj_text(otmp, buf) struct obj *otmp; char *buf; @@ -160,7 +160,7 @@ char *buf; return erode_obj_text(tshirt, buf); } -STATIC_OVL char * +static char * apron_text(apron, buf) struct obj *apron; char *buf; @@ -406,7 +406,7 @@ doread() return 1; } -STATIC_OVL void +static void stripspe(obj) register struct obj *obj; { @@ -422,14 +422,14 @@ register struct obj *obj; } } -STATIC_OVL void +static void p_glow1(otmp) register struct obj *otmp; { pline("%s briefly.", Yobjnam2(otmp, Blind ? "vibrate" : "glow")); } -STATIC_OVL void +static void p_glow2(otmp, color) register struct obj *otmp; register const char *color; @@ -712,7 +712,7 @@ int curse_bless; } /* Forget known information about this object type. */ -STATIC_OVL void +static void forget_single_object(obj_id) int obj_id; { @@ -729,7 +729,7 @@ int obj_id; #if 0 /* here if anyone wants it.... */ /* Forget everything known about a particular object class. */ -STATIC_OVL void +static void forget_objclass(oclass) int oclass; { @@ -742,7 +742,7 @@ int oclass; #endif /* randomize the given list of numbers 0 <= i < count */ -STATIC_OVL void +static void randomize(indices, count) int *indices; int count; @@ -890,7 +890,7 @@ int percent; * howmuch & ALL_MAP = forget whole map * howmuch & ALL_SPELLS = forget all spells */ -STATIC_OVL void +static void forget(howmuch) int howmuch; { @@ -924,7 +924,7 @@ int howmuch; } /* monster is hit by scroll of taming's effect */ -STATIC_OVL int +static int maybe_tame(mtmp, sobj) struct monst *mtmp; struct obj *sobj; @@ -947,7 +947,7 @@ struct obj *sobj; return 0; } -STATIC_OVL boolean +static boolean get_valid_stinking_cloud_pos(x,y) int x,y; { @@ -956,7 +956,7 @@ int x,y; || distu(x, y) >= 32)); } -STATIC_OVL boolean +static boolean is_valid_stinking_cloud_pos(x, y, showmsg) int x, y; boolean showmsg; @@ -969,7 +969,7 @@ boolean showmsg; return TRUE; } -STATIC_PTR void +static void display_stinking_cloud_positions(state) int state; { @@ -1897,12 +1897,12 @@ struct litmon { struct monst *mon; struct litmon *nxt; }; -STATIC_VAR struct litmon *gremlins = 0; +static struct litmon *gremlins = 0; /* * Low-level lit-field update routine. */ -STATIC_PTR void +static void set_lit(x, y, val) int x, y; genericptr_t val; @@ -2029,7 +2029,7 @@ struct obj *obj; } } -STATIC_OVL void +static void do_class_genocide() { int i, j, immunecnt, gonecnt, goodcnt, class, feel_dead = 0; diff --git a/src/rect.c b/src/rect.c index e8f2b5a3b..9f462fcc6 100644 --- a/src/rect.c +++ b/src/rect.c @@ -6,7 +6,7 @@ int FDECL(get_rect_ind, (NhRect *)); -STATIC_DCL boolean FDECL(intersect, (NhRect *, NhRect *, NhRect *)); +static boolean FDECL(intersect, (NhRect *, NhRect *, NhRect *)); /* * In this file, we will handle the various rectangle functions we @@ -97,7 +97,7 @@ rnd_rect() * otherwise returns FALSE */ -STATIC_OVL boolean +static boolean intersect(r1, r2, r3) NhRect *r1, *r2, *r3; { diff --git a/src/region.c b/src/region.c index 057d58bf6..d918b27d9 100644 --- a/src/region.c +++ b/src/region.c @@ -41,7 +41,7 @@ boolean FDECL(enter_force_field, (genericptr,genericptr)); NhRegion *FDECL(create_force_field, (XCHAR_P,XCHAR_P,int,long)); #endif -STATIC_DCL void FDECL(reset_region_mids, (NhRegion *)); +static void FDECL(reset_region_mids, (NhRegion *)); static const callback_proc callbacks[] = { #define INSIDE_GAS_CLOUD 0 @@ -925,7 +925,7 @@ long *count, *size; } /* update monster IDs for region being loaded from bones; `ghostly' implied */ -STATIC_OVL void +static void reset_region_mids(reg) NhRegion *reg; { diff --git a/src/restore.c b/src/restore.c index 0a9f823fe..ba9ef8f93 100644 --- a/src/restore.c +++ b/src/restore.c @@ -20,27 +20,27 @@ extern void FDECL(substitute_tiles, (d_level *)); /* from tile.c */ #endif #ifdef ZEROCOMP -STATIC_DCL void NDECL(zerocomp_minit); -STATIC_DCL void FDECL(zerocomp_mread, (int, genericptr_t, unsigned int)); -STATIC_DCL int NDECL(zerocomp_mgetc); +static void NDECL(zerocomp_minit); +static void FDECL(zerocomp_mread, (int, genericptr_t, unsigned int)); +static int NDECL(zerocomp_mgetc); #endif -STATIC_DCL void NDECL(find_lev_obj); -STATIC_DCL void FDECL(restlevchn, (NHFILE *)); -STATIC_DCL void FDECL(restdamage, (NHFILE *, BOOLEAN_P)); -STATIC_DCL void FDECL(restobj, (NHFILE *, struct obj *)); -STATIC_DCL struct obj *FDECL(restobjchn, (NHFILE *, BOOLEAN_P, BOOLEAN_P)); -STATIC_OVL void FDECL(restmon, (NHFILE *, struct monst *)); -STATIC_DCL struct monst *FDECL(restmonchn, (NHFILE *, BOOLEAN_P)); -STATIC_DCL struct fruit *FDECL(loadfruitchn, (NHFILE *)); -STATIC_DCL void FDECL(freefruitchn, (struct fruit *)); -STATIC_DCL void FDECL(ghostfruit, (struct obj *)); -STATIC_DCL boolean FDECL(restgamestate, (NHFILE *, unsigned int *, unsigned int *)); -STATIC_DCL void FDECL(restlevelstate, (unsigned int, unsigned int)); -STATIC_DCL int FDECL(restlevelfile, (NHFILE *, XCHAR_P)); -STATIC_OVL void FDECL(restore_msghistory, (NHFILE *)); -STATIC_DCL void FDECL(reset_oattached_mids, (BOOLEAN_P)); -STATIC_DCL void FDECL(rest_levl, (NHFILE *, BOOLEAN_P)); +static void NDECL(find_lev_obj); +static void FDECL(restlevchn, (NHFILE *)); +static void FDECL(restdamage, (NHFILE *, BOOLEAN_P)); +static void FDECL(restobj, (NHFILE *, struct obj *)); +static struct obj *FDECL(restobjchn, (NHFILE *, BOOLEAN_P, BOOLEAN_P)); +static void FDECL(restmon, (NHFILE *, struct monst *)); +static struct monst *FDECL(restmonchn, (NHFILE *, BOOLEAN_P)); +static struct fruit *FDECL(loadfruitchn, (NHFILE *)); +static void FDECL(freefruitchn, (struct fruit *)); +static void FDECL(ghostfruit, (struct obj *)); +static boolean FDECL(restgamestate, (NHFILE *, unsigned int *, unsigned int *)); +static void FDECL(restlevelstate, (unsigned int, unsigned int)); +static int FDECL(restlevelfile, (NHFILE *, XCHAR_P)); +static void FDECL(restore_msghistory, (NHFILE *)); +static void FDECL(reset_oattached_mids, (BOOLEAN_P)); +static void FDECL(rest_levl, (NHFILE *, BOOLEAN_P)); /* * Save a mapping of IDs from ghost levels to the current level. This @@ -55,8 +55,8 @@ struct bucket { } map[N_PER_BUCKET]; }; -STATIC_DCL void NDECL(clear_id_mapping); -STATIC_DCL void FDECL(add_id_mapping, (unsigned, unsigned)); +static void NDECL(clear_id_mapping); +static void FDECL(add_id_mapping, (unsigned, unsigned)); #ifdef AMII_GRAPHICS void FDECL(amii_setpens, (int)); /* use colors from save file */ @@ -68,7 +68,7 @@ extern int amii_numcolors; #define Is_IceBox(o) ((o)->otyp == ICE_BOX ? TRUE : FALSE) /* Recalculate g.level.objects[x][y], since this info was not saved. */ -STATIC_OVL void +static void find_lev_obj() { register struct obj *fobjtmp = (struct obj *) 0; @@ -118,7 +118,7 @@ boolean quietly; } } -STATIC_OVL void +static void restlevchn(nhfp) NHFILE *nhfp; { @@ -151,7 +151,7 @@ NHFILE *nhfp; /* SAVE2018 */ -STATIC_OVL void +static void restdamage(nhfp, ghostly) NHFILE *nhfp; boolean ghostly; @@ -207,7 +207,7 @@ boolean ghostly; /* SAVE2018 */ /* restore one object */ -STATIC_OVL void +static void restobj(nhfp, otmp) NHFILE *nhfp; struct obj *otmp; @@ -299,7 +299,7 @@ struct obj *otmp; /* SAVE2018 */ -STATIC_OVL struct obj * +static struct obj * restobjchn(nhfp, ghostly, frozen) NHFILE *nhfp; boolean ghostly, frozen; @@ -392,7 +392,7 @@ boolean ghostly, frozen; /* SAVE2018 */ /* restore one monster */ -STATIC_OVL void +static void restmon(nhfp, mtmp) NHFILE *nhfp; struct monst *mtmp; @@ -494,7 +494,7 @@ struct monst *mtmp; /* SAVE2018 */ -STATIC_OVL struct monst * +static struct monst * restmonchn(nhfp, ghostly) NHFILE *nhfp; boolean ghostly; @@ -573,7 +573,7 @@ boolean ghostly; /* SAVE2018 */ -STATIC_OVL struct fruit * +static struct fruit * loadfruitchn(nhfp) NHFILE *nhfp; { @@ -597,7 +597,7 @@ NHFILE *nhfp; return flist; } -STATIC_OVL void +static void freefruitchn(flist) register struct fruit *flist; { @@ -610,7 +610,7 @@ register struct fruit *flist; } } -STATIC_OVL void +static void ghostfruit(otmp) register struct obj *otmp; { @@ -632,7 +632,7 @@ register struct obj *otmp; #define SYSOPT_CHECK_SAVE_UID TRUE #endif -STATIC_OVL +static boolean restgamestate(nhfp, stuckid, steedid) NHFILE *nhfp; @@ -889,7 +889,7 @@ unsigned int *stuckid, *steedid; /* update game state pointers to those valid for the current level (so we * don't dereference a wild u.ustuck when saving the game state, for instance) */ -STATIC_OVL void +static void restlevelstate(stuckid, steedid) unsigned int stuckid, steedid; { @@ -915,7 +915,7 @@ unsigned int stuckid, steedid; } /*ARGSUSED*/ -STATIC_OVL int +static int restlevelfile(nhfp, ltmp) NHFILE *nhfp; /* used in MFLOPPY only */ xchar ltmp; @@ -1167,7 +1167,7 @@ struct cemetery **cemeteryaddr; /* SAVE2018 */ /*ARGSUSED*/ -STATIC_OVL void +static void rest_levl(nhfp, rlecomp) NHFILE *nhfp; boolean rlecomp; @@ -1488,7 +1488,7 @@ char *plbuf; /* SAVE2018 */ -STATIC_OVL void +static void restore_msghistory(nhfp) NHFILE *nhfp; { @@ -1520,7 +1520,7 @@ NHFILE *nhfp; } /* Clear all structures for object and monster ID mapping. */ -STATIC_OVL void +static void clear_id_mapping() { struct bucket *curr; @@ -1533,7 +1533,7 @@ clear_id_mapping() } /* Add a mapping to the ID map. */ -STATIC_OVL void +static void add_id_mapping(gid, nid) unsigned gid, nid; { @@ -1585,7 +1585,7 @@ unsigned gid, *nidp; return FALSE; } -STATIC_OVL void +static void reset_oattached_mids(ghostly) boolean ghostly; { diff --git a/src/rip.c b/src/rip.c index 70b272e1c..6b5fdb097 100644 --- a/src/rip.c +++ b/src/rip.c @@ -16,7 +16,7 @@ #endif #ifdef TEXT_TOMBSTONE -STATIC_DCL void FDECL(center, (int, char *)); +static void FDECL(center, (int, char *)); #ifndef NH320_DEDICATION /* A normal tombstone for end of game display. */ @@ -69,7 +69,7 @@ static const char *rip_txt[] = { #define DEATH_LINE 8 /* *char[] line # for death description */ #define YEAR_LINE 12 /* *char[] line # for year */ -STATIC_OVL void +static void center(line, text) int line; char *text; diff --git a/src/role.c b/src/role.c index 08a181b6f..487999ac7 100644 --- a/src/role.c +++ b/src/role.c @@ -712,10 +712,10 @@ const struct Align aligns[] = { { "evil", "unaligned", "Una", 0, A_NONE } }; -STATIC_DCL int NDECL(randrole_filtered); -STATIC_DCL char *FDECL(promptsep, (char *, int)); -STATIC_DCL int FDECL(role_gendercount, (int)); -STATIC_DCL int FDECL(race_alignmentcount, (int)); +static int NDECL(randrole_filtered); +static char *FDECL(promptsep, (char *, int)); +static int FDECL(role_gendercount, (int)); +static int FDECL(race_alignmentcount, (int)); /* used by str2XXX() */ static char NEARDATA randomstr[] = "random"; @@ -740,7 +740,7 @@ boolean for_display; return res; } -STATIC_OVL int +static int randrole_filtered() { int i, n = 0, set[SIZE(roles)]; @@ -1354,7 +1354,7 @@ clearrolefilter() g.rfilter.mask = 0; } -STATIC_OVL char * +static char * promptsep(buf, num_post_attribs) char *buf; int num_post_attribs; @@ -1371,7 +1371,7 @@ int num_post_attribs; return buf; } -STATIC_OVL int +static int role_gendercount(rolenum) int rolenum; { @@ -1388,7 +1388,7 @@ int rolenum; return gendcount; } -STATIC_OVL int +static int race_alignmentcount(racenum) int racenum; { diff --git a/src/rumors.c b/src/rumors.c index c6f61fd06..b5be74ff4 100644 --- a/src/rumors.c +++ b/src/rumors.c @@ -43,11 +43,11 @@ * and placed there by 'makedefs'. */ -STATIC_DCL void FDECL(init_rumors, (dlb *)); -STATIC_DCL void FDECL(init_oracles, (dlb *)); -STATIC_DCL void FDECL(couldnt_open_file, (const char *)); +static void FDECL(init_rumors, (dlb *)); +static void FDECL(init_oracles, (dlb *)); +static void FDECL(couldnt_open_file, (const char *)); -STATIC_OVL void +static void init_rumors(fp) dlb *fp; { @@ -362,7 +362,7 @@ int mechanism; pline1(line); } -STATIC_OVL void +static void init_oracles(fp) dlb *fp; { @@ -567,7 +567,7 @@ struct monst *oracl; return 1; } -STATIC_OVL void +static void couldnt_open_file(filename) const char *filename; { diff --git a/src/save.c b/src/save.c index 058935bd6..fbe133c9b 100644 --- a/src/save.c +++ b/src/save.c @@ -33,32 +33,32 @@ extern int NDECL(nhdatatypes_size); int dotcnt, dotrow; /* also used in restore */ #endif -STATIC_DCL void FDECL(savelevchn, (NHFILE *)); -STATIC_DCL void FDECL(savedamage, (NHFILE *)); -/* STATIC_DCL void FDECL(saveobj, (NHFILE *,struct obj *)); */ -/* STATIC_DCL void FDECL(savemon, (NHFILE *,struct monst *)); */ -/* STATIC_DCL void FDECL(savelevl, (NHFILE *, BOOLEAN_P)); */ -STATIC_DCL void FDECL(saveobj, (NHFILE *,struct obj *)); -STATIC_DCL void FDECL(savemon, (NHFILE *,struct monst *)); -STATIC_DCL void FDECL(savelevl, (NHFILE *,BOOLEAN_P)); -STATIC_DCL void FDECL(saveobjchn, (NHFILE *,struct obj *)); -STATIC_DCL void FDECL(savemonchn, (NHFILE *,struct monst *)); -STATIC_DCL void FDECL(savetrapchn, (NHFILE *,struct trap *)); -STATIC_DCL void FDECL(savegamestate, (NHFILE *)); -STATIC_OVL void FDECL(save_msghistory, (NHFILE *)); +static void FDECL(savelevchn, (NHFILE *)); +static void FDECL(savedamage, (NHFILE *)); +/* static void FDECL(saveobj, (NHFILE *,struct obj *)); */ +/* static void FDECL(savemon, (NHFILE *,struct monst *)); */ +/* static void FDECL(savelevl, (NHFILE *, BOOLEAN_P)); */ +static void FDECL(saveobj, (NHFILE *,struct obj *)); +static void FDECL(savemon, (NHFILE *,struct monst *)); +static void FDECL(savelevl, (NHFILE *,BOOLEAN_P)); +static void FDECL(saveobjchn, (NHFILE *,struct obj *)); +static void FDECL(savemonchn, (NHFILE *,struct monst *)); +static void FDECL(savetrapchn, (NHFILE *,struct trap *)); +static void FDECL(savegamestate, (NHFILE *)); +static void FDECL(save_msghistory, (NHFILE *)); #ifdef MFLOPPY -STATIC_DCL void FDECL(savelev0, (NHFILE *, XCHAR_P, int)); -STATIC_DCL boolean NDECL(swapout_oldest); -STATIC_DCL void FDECL(copyfile, (char *, char *)); +static void FDECL(savelev0, (NHFILE *, XCHAR_P, int)); +static boolean NDECL(swapout_oldest); +static void FDECL(copyfile, (char *, char *)); #endif /* MFLOPPY */ #ifdef ZEROCOMP -STATIC_DCL void FDECL(zerocomp_bufon, (int)); -STATIC_DCL void FDECL(zerocomp_bufoff, (int)); -STATIC_DCL void FDECL(zerocomp_bflush, (int)); -STATIC_DCL void FDECL(zerocomp_bwrite, (int, genericptr_t, unsigned int)); -STATIC_DCL void FDECL(zerocomp_bputc, (int)); +static void FDECL(zerocomp_bufon, (int)); +static void FDECL(zerocomp_bufoff, (int)); +static void FDECL(zerocomp_bflush, (int)); +static void FDECL(zerocomp_bwrite, (int, genericptr_t, unsigned int)); +static void FDECL(zerocomp_bputc, (int)); #endif #if defined(UNIX) || defined(VMS) || defined(__EMX__) || defined(WIN32) @@ -282,7 +282,7 @@ dosave0() return 1; } -STATIC_OVL void +static void savegamestate(nhfp) NHFILE *nhfp; { @@ -539,7 +539,7 @@ xchar lev; return TRUE; } -STATIC_OVL void +static void savelev0(nhfp, lev) #else void @@ -682,7 +682,7 @@ xchar lev; } } -STATIC_OVL void +static void savelevl(nhfp, rlecomp) NHFILE *nhfp; boolean rlecomp; @@ -790,7 +790,7 @@ struct cemetery **cemeteryaddr; *cemeteryaddr = 0; } -STATIC_OVL void +static void savedamage(nhfp) NHFILE *nhfp; { @@ -822,7 +822,7 @@ NHFILE *nhfp; g.level.damagelist = 0; } -STATIC_OVL void +static void saveobj(nhfp, otmp) NHFILE *nhfp; struct obj *otmp; @@ -898,7 +898,7 @@ struct obj *otmp; } } -STATIC_OVL void +static void saveobjchn(nhfp, otmp) NHFILE *nhfp; register struct obj *otmp; @@ -949,7 +949,7 @@ register struct obj *otmp; } } -STATIC_OVL void +static void savemon(nhfp, mtmp) NHFILE *nhfp; struct monst *mtmp; @@ -1043,7 +1043,7 @@ struct monst *mtmp; } } -STATIC_OVL void +static void savemonchn(nhfp, mtmp) NHFILE *nhfp; register struct monst *mtmp; @@ -1080,7 +1080,7 @@ register struct monst *mtmp; } /* save traps; g.ftrap is the only trap chain so the 2nd arg is superfluous */ -STATIC_OVL void +static void savetrapchn(nhfp, trap) NHFILE *nhfp; register struct trap *trap; @@ -1145,7 +1145,7 @@ NHFILE *nhfp; -STATIC_OVL void +static void savelevchn(nhfp) NHFILE *nhfp; { @@ -1195,7 +1195,7 @@ NHFILE *nhfp; return; } -STATIC_OVL void +static void save_msghistory(nhfp) NHFILE *nhfp; { @@ -1404,7 +1404,7 @@ int lev; return TRUE; } -STATIC_OVL boolean +static boolean swapout_oldest() { char to[PATHLEN], from[PATHLEN]; @@ -1435,7 +1435,7 @@ swapout_oldest() return TRUE; } -STATIC_OVL void +static void copyfile(from, to) char *from, *to; { diff --git a/src/sfstruct.c b/src/sfstruct.c index 94bbe4919..c2a07a5c0 100644 --- a/src/sfstruct.c +++ b/src/sfstruct.c @@ -41,7 +41,7 @@ void FDECL(mread, (int, genericptr_t, unsigned int)); void NDECL(minit); void FDECL(bclose, (int)); #endif /* TRACE_BUFFERING */ -STATIC_DCL int FDECL(getidx, (int, int)); +static int FDECL(getidx, (int, int)); #if defined(UNIX) || defined(WIN32) #define USE_BUFFERING @@ -97,7 +97,7 @@ static FILE *bw_FILE[MAXFD] = {0,0,0,0,0}; * happen. */ -STATIC_OVL int +static int getidx(fd, flg) int fd, flg; { diff --git a/src/shk.c b/src/shk.c index ab1672faa..c36d8d0d0 100644 --- a/src/shk.c +++ b/src/shk.c @@ -11,9 +11,9 @@ #define PAY_SKIP (-1) #define PAY_BROKE (-2) -STATIC_DCL void FDECL(makekops, (coord *)); -STATIC_DCL void FDECL(call_kops, (struct monst *, BOOLEAN_P)); -STATIC_DCL void FDECL(kops_gone, (BOOLEAN_P)); +static void FDECL(makekops, (coord *)); +static void FDECL(call_kops, (struct monst *, BOOLEAN_P)); +static void FDECL(kops_gone, (BOOLEAN_P)); #define NOTANGRY(mon) ((mon)->mpeaceful) #define ANGRY(mon) (!NOTANGRY(mon)) @@ -25,56 +25,56 @@ STATIC_DCL void FDECL(kops_gone, (BOOLEAN_P)); extern const struct shclass shtypes[]; /* defined in shknam.c */ -STATIC_VAR const char and_its_contents[] = " and its contents"; -STATIC_VAR const char the_contents_of[] = "the contents of "; +static const char and_its_contents[] = " and its contents"; +static const char the_contents_of[] = "the contents of "; -STATIC_DCL void FDECL(append_honorific, (char *)); -STATIC_DCL long FDECL(addupbill, (struct monst *)); -STATIC_DCL void FDECL(pacify_shk, (struct monst *)); -STATIC_DCL struct bill_x *FDECL(onbill, (struct obj *, struct monst *, +static void FDECL(append_honorific, (char *)); +static long FDECL(addupbill, (struct monst *)); +static void FDECL(pacify_shk, (struct monst *)); +static struct bill_x *FDECL(onbill, (struct obj *, struct monst *, BOOLEAN_P)); -STATIC_DCL struct monst *FDECL(next_shkp, (struct monst *, BOOLEAN_P)); -STATIC_DCL long FDECL(shop_debt, (struct eshk *)); -STATIC_DCL char *FDECL(shk_owns, (char *, struct obj *)); -STATIC_DCL char *FDECL(mon_owns, (char *, struct obj *)); -STATIC_DCL void FDECL(clear_unpaid_obj, (struct monst *, struct obj *)); -STATIC_DCL void FDECL(clear_unpaid, (struct monst *, struct obj *)); -STATIC_DCL long FDECL(check_credit, (long, struct monst *)); -STATIC_DCL void FDECL(pay, (long, struct monst *)); -STATIC_DCL long FDECL(get_cost, (struct obj *, struct monst *)); -STATIC_DCL long FDECL(set_cost, (struct obj *, struct monst *)); -STATIC_DCL const char *FDECL(shk_embellish, (struct obj *, long)); -STATIC_DCL long FDECL(cost_per_charge, (struct monst *, struct obj *, +static struct monst *FDECL(next_shkp, (struct monst *, BOOLEAN_P)); +static long FDECL(shop_debt, (struct eshk *)); +static char *FDECL(shk_owns, (char *, struct obj *)); +static char *FDECL(mon_owns, (char *, struct obj *)); +static void FDECL(clear_unpaid_obj, (struct monst *, struct obj *)); +static void FDECL(clear_unpaid, (struct monst *, struct obj *)); +static long FDECL(check_credit, (long, struct monst *)); +static void FDECL(pay, (long, struct monst *)); +static long FDECL(get_cost, (struct obj *, struct monst *)); +static long FDECL(set_cost, (struct obj *, struct monst *)); +static const char *FDECL(shk_embellish, (struct obj *, long)); +static long FDECL(cost_per_charge, (struct monst *, struct obj *, BOOLEAN_P)); -STATIC_DCL long FDECL(cheapest_item, (struct monst *)); -STATIC_DCL int FDECL(dopayobj, (struct monst *, struct bill_x *, +static long FDECL(cheapest_item, (struct monst *)); +static int FDECL(dopayobj, (struct monst *, struct bill_x *, struct obj **, int, BOOLEAN_P)); -STATIC_DCL long FDECL(stolen_container, (struct obj *, struct monst *, +static long FDECL(stolen_container, (struct obj *, struct monst *, long, BOOLEAN_P)); -STATIC_DCL long FDECL(getprice, (struct obj *, BOOLEAN_P)); -STATIC_DCL void FDECL(shk_names_obj, (struct monst *, struct obj *, +static long FDECL(getprice, (struct obj *, BOOLEAN_P)); +static void FDECL(shk_names_obj, (struct monst *, struct obj *, const char *, long, const char *)); -STATIC_DCL struct obj *FDECL(bp_to_obj, (struct bill_x *)); -STATIC_DCL boolean FDECL(inherits, (struct monst *, int, int, BOOLEAN_P)); -STATIC_DCL void FDECL(set_repo_loc, (struct monst *)); -STATIC_DCL boolean NDECL(angry_shk_exists); -STATIC_DCL void FDECL(rile_shk, (struct monst *)); -STATIC_DCL void FDECL(rouse_shk, (struct monst *, BOOLEAN_P)); -STATIC_DCL void FDECL(remove_damage, (struct monst *, BOOLEAN_P)); -STATIC_DCL void FDECL(sub_one_frombill, (struct obj *, struct monst *)); -STATIC_DCL void FDECL(add_one_tobill, (struct obj *, BOOLEAN_P, +static struct obj *FDECL(bp_to_obj, (struct bill_x *)); +static boolean FDECL(inherits, (struct monst *, int, int, BOOLEAN_P)); +static void FDECL(set_repo_loc, (struct monst *)); +static boolean NDECL(angry_shk_exists); +static void FDECL(rile_shk, (struct monst *)); +static void FDECL(rouse_shk, (struct monst *, BOOLEAN_P)); +static void FDECL(remove_damage, (struct monst *, BOOLEAN_P)); +static void FDECL(sub_one_frombill, (struct obj *, struct monst *)); +static void FDECL(add_one_tobill, (struct obj *, BOOLEAN_P, struct monst *)); -STATIC_DCL void FDECL(dropped_container, (struct obj *, struct monst *, +static void FDECL(dropped_container, (struct obj *, struct monst *, BOOLEAN_P)); -STATIC_DCL void FDECL(add_to_billobjs, (struct obj *)); -STATIC_DCL void FDECL(bill_box_content, (struct obj *, BOOLEAN_P, BOOLEAN_P, +static void FDECL(add_to_billobjs, (struct obj *)); +static void FDECL(bill_box_content, (struct obj *, BOOLEAN_P, BOOLEAN_P, struct monst *)); -STATIC_DCL boolean FDECL(rob_shop, (struct monst *)); -STATIC_DCL void FDECL(deserted_shop, (char *)); -STATIC_DCL boolean FDECL(special_stock, (struct obj *, struct monst *, +static boolean FDECL(rob_shop, (struct monst *)); +static void FDECL(deserted_shop, (char *)); +static boolean FDECL(special_stock, (struct obj *, struct monst *, BOOLEAN_P)); -STATIC_DCL const char *FDECL(cad, (BOOLEAN_P)); -STATIC_DCL long FDECL(get_pricing_units, (struct obj *obj)); +static const char *FDECL(cad, (BOOLEAN_P)); +static long FDECL(get_pricing_units, (struct obj *obj)); /* invariants: obj->unpaid iff onbill(obj) [unless bp->useup] @@ -157,7 +157,7 @@ long amount; } } -STATIC_OVL struct monst * +static struct monst * next_shkp(shkp, withbill) register struct monst *shkp; register boolean withbill; @@ -262,7 +262,7 @@ boolean ghostly; } /* Clear the unpaid bit on a single object and its contents. */ -STATIC_OVL void +static void clear_unpaid_obj(shkp, otmp) struct monst *shkp; struct obj *otmp; @@ -274,7 +274,7 @@ struct obj *otmp; } /* Clear the unpaid bit on all of the objects in the list. */ -STATIC_OVL void +static void clear_unpaid(shkp, list) struct monst *shkp; struct obj *list; @@ -317,7 +317,7 @@ register struct monst *shkp; } } -STATIC_OVL long +static long addupbill(shkp) register struct monst *shkp; { @@ -332,7 +332,7 @@ register struct monst *shkp; return total; } -STATIC_OVL void +static void call_kops(shkp, nearshop) register struct monst *shkp; register boolean nearshop; @@ -470,7 +470,7 @@ xchar x, y; /* shop merchandise has been taken; pay for it with any credit available; return false if the debt is fully covered by credit, true otherwise */ -STATIC_OVL boolean +static boolean rob_shop(shkp) struct monst *shkp; { @@ -503,7 +503,7 @@ struct monst *shkp; } /* give a message when entering an untended shop (caller has verified that) */ -STATIC_OVL void +static void deserted_shop(enterstring) /*const*/ char *enterstring; { @@ -748,7 +748,7 @@ struct obj *obj1, *obj2; * turning the `$' command into a way to discover that the current * level is bones data which has a shk on the warpath. */ -STATIC_OVL long +static long shop_debt(eshkp) struct eshk *eshkp; { @@ -850,7 +850,7 @@ struct mkroom *sroom; return !mtmp ? FALSE : (boolean) inhishop(mtmp); } -STATIC_OVL struct bill_x * +static struct bill_x * onbill(obj, shkp, silent) struct obj *obj; struct monst *shkp; @@ -988,7 +988,7 @@ register struct obj *obj, *merge; dealloc_obj(obj); } -STATIC_OVL long +static long check_credit(tmp, shkp) long tmp; register struct monst *shkp; @@ -1009,7 +1009,7 @@ register struct monst *shkp; return tmp; } -STATIC_OVL void +static void pay(tmp, shkp) long tmp; register struct monst *shkp; @@ -1047,7 +1047,7 @@ register boolean killkops; after_shk_move(shkp); } -STATIC_OVL boolean +static boolean angry_shk_exists() { register struct monst *shkp; @@ -1060,7 +1060,7 @@ angry_shk_exists() } /* remove previously applied surcharge from all billed items */ -STATIC_OVL void +static void pacify_shk(shkp) register struct monst *shkp; { @@ -1079,7 +1079,7 @@ register struct monst *shkp; } /* add aggravation surcharge to all billed items */ -STATIC_OVL void +static void rile_shk(shkp) register struct monst *shkp; { @@ -1098,7 +1098,7 @@ register struct monst *shkp; } /* wakeup and/or unparalyze shopkeeper */ -STATIC_OVL void +static void rouse_shk(shkp, verbosely) struct monst *shkp; boolean verbosely; @@ -1207,12 +1207,12 @@ xchar oy UNUSED; hot_pursuit(shkp); } -STATIC_VAR const char +static const char no_money[] = "Moreover, you%s have no money.", not_enough_money[] = "Besides, you don't have enough to interest %s."; /* delivers the cheapest item on the list */ -STATIC_OVL long +static long cheapest_item(shkp) register struct monst *shkp; { @@ -1575,7 +1575,7 @@ dopay() * -1 if skip this object * -2 if no money/credit left */ -STATIC_OVL int +static int dopayobj(shkp, bp, obj_p, which, itemize) register struct monst *shkp; register struct bill_x *bp; @@ -1773,7 +1773,7 @@ boolean silently; /* maybe avoid messages */ return taken; } -STATIC_OVL boolean +static boolean inherits(shkp, numsk, croaked, silently) struct monst *shkp; int numsk; @@ -1879,7 +1879,7 @@ boolean silently; return taken; } -STATIC_OVL void +static void set_repo_loc(shkp) struct monst *shkp; { @@ -1933,7 +1933,7 @@ finish_paybill() } /* find obj on one of the lists */ -STATIC_OVL struct obj * +static struct obj * bp_to_obj(bp) register struct bill_x *bp; { @@ -2021,7 +2021,7 @@ int *nochrg; /* alternate return value: 1: no charge, 0: shop owned, */ return cost; } -STATIC_OVL long +static long get_pricing_units(obj) struct obj *obj; { @@ -2055,7 +2055,7 @@ unsigned oid; } /* calculate the value that the shk will charge for [one of] an object */ -STATIC_OVL long +static long get_cost(obj, shkp) register struct obj *obj; register struct monst *shkp; /* if angry, impose a surcharge */ @@ -2234,7 +2234,7 @@ struct obj *obj; return value; } -STATIC_OVL void +static void dropped_container(obj, shkp, sale) register struct obj *obj; register struct monst *shkp; @@ -2274,7 +2274,7 @@ register struct obj *obj; } } -STATIC_OVL boolean +static boolean special_stock(obj, shkp, quietly) struct obj *obj; struct monst *shkp; @@ -2314,7 +2314,7 @@ boolean quietly; } /* calculate how much the shk will pay when buying [all of] an object */ -STATIC_OVL long +static long set_cost(obj, shkp) register struct obj *obj; register struct monst *shkp; @@ -2462,7 +2462,7 @@ boolean include_contents; return amt; } -STATIC_OVL void +static void add_one_tobill(obj, dummy, shkp) struct obj *obj; boolean dummy; @@ -2504,7 +2504,7 @@ struct monst *shkp; obj->unpaid = 1; } -STATIC_OVL void +static void add_to_billobjs(obj) struct obj *obj; { @@ -2519,7 +2519,7 @@ struct obj *obj; } /* recursive billing of objects within containers. */ -STATIC_OVL void +static void bill_box_content(obj, ininv, dummy, shkp) register struct obj *obj; register boolean ininv, dummy; @@ -2542,7 +2542,7 @@ register struct monst *shkp; } /* shopkeeper tells you what you bought or sold, sometimes partly IDing it */ -STATIC_OVL void +static void shk_names_obj(shkp, obj, fmt, amt, arg) struct monst *shkp; struct obj *obj; @@ -2719,7 +2719,7 @@ boolean ininv, dummy, silent; } } -STATIC_OVL void +static void append_honorific(buf) char *buf; { @@ -2779,7 +2779,7 @@ register struct obj *obj, *otmp; } } -STATIC_OVL void +static void sub_one_frombill(obj, shkp) register struct obj *obj; register struct monst *shkp; @@ -2842,7 +2842,7 @@ register struct monst *shkp; } } -STATIC_OVL long +static long stolen_container(obj, shkp, price, ininv) struct obj *obj; struct monst *shkp; @@ -3359,7 +3359,7 @@ int mode; /* 0: deliver count 1: paged */ return 0; } -STATIC_OVL long +static long getprice(obj, shk_buying) register struct obj *obj; boolean shk_buying; @@ -3482,7 +3482,7 @@ long cost; * assumption (they might all be dead too), but we have no reasonable way of * telling that. */ -STATIC_OVL +static void remove_damage(shkp, croaked) struct monst *shkp; @@ -4021,7 +4021,7 @@ register int fall; } } -STATIC_OVL void +static void makekops(mm) coord *mm; { @@ -4324,7 +4324,7 @@ register struct obj *first_obj; destroy_nhwindow(tmpwin); } -STATIC_OVL const char * +static const char * shk_embellish(itm, cost) register struct obj *itm; long cost; @@ -4453,7 +4453,7 @@ struct monst *shkp; } } -STATIC_OVL void +static void kops_gone(silent) boolean silent; { @@ -4473,7 +4473,7 @@ boolean silent; plur(cnt), (cnt == 1) ? "es" : ""); } -STATIC_OVL long +static long cost_per_charge(shkp, otmp, altusage) struct monst *shkp; struct obj *otmp; @@ -4716,7 +4716,7 @@ struct obj *obj; return buf; } -STATIC_OVL char * +static char * shk_owns(buf, obj) char *buf; struct obj *obj; @@ -4733,7 +4733,7 @@ struct obj *obj; return (char *) 0; } -STATIC_OVL char * +static char * mon_owns(buf, obj) char *buf; struct obj *obj; @@ -4743,7 +4743,7 @@ struct obj *obj; return (char *) 0; } -STATIC_OVL const char * +static const char * cad(altusage) boolean altusage; /* used as a verbalized exclamation: \"Cad! ...\" */ { diff --git a/src/shknam.c b/src/shknam.c index 5bec59922..dd815c93f 100644 --- a/src/shknam.c +++ b/src/shknam.c @@ -7,14 +7,14 @@ #include "hack.h" -STATIC_DCL boolean FDECL(stock_room_goodpos, (struct mkroom *, int, int, int, int)); -STATIC_DCL boolean FDECL(veggy_item, (struct obj * obj, int)); -STATIC_DCL int NDECL(shkveg); -STATIC_DCL void FDECL(mkveggy_at, (int, int)); -STATIC_DCL void FDECL(mkshobj_at, (const struct shclass *, int, int, +static boolean FDECL(stock_room_goodpos, (struct mkroom *, int, int, int, int)); +static boolean FDECL(veggy_item, (struct obj * obj, int)); +static int NDECL(shkveg); +static void FDECL(mkveggy_at, (int, int)); +static void FDECL(mkshobj_at, (const struct shclass *, int, int, BOOLEAN_P)); -STATIC_DCL void FDECL(nameshk, (struct monst *, const char *const *)); -STATIC_DCL int FDECL(shkinit, (const struct shclass *, struct mkroom *)); +static void FDECL(nameshk, (struct monst *, const char *const *)); +static int FDECL(shkinit, (const struct shclass *, struct mkroom *)); #define VEGETARIAN_CLASS (MAXOCLASSES + 1) @@ -369,7 +369,7 @@ init_shop_selection() /* decide whether an object or object type is considered vegetarian; for types, items which might go either way are assumed to be veggy */ -STATIC_OVL boolean +static boolean veggy_item(obj, otyp) struct obj *obj; int otyp; /* used iff obj is null */ @@ -400,7 +400,7 @@ int otyp; /* used iff obj is null */ return FALSE; } -STATIC_OVL int +static int shkveg() { int i, j, maxprob, prob; @@ -435,7 +435,7 @@ shkveg() } /* make a random item for health food store */ -STATIC_OVL void +static void mkveggy_at(sx, sy) int sx, sy; { @@ -447,7 +447,7 @@ int sx, sy; } /* make an object of the appropriate type for a shop square */ -STATIC_OVL void +static void mkshobj_at(shp, sx, sy, mkspecl) const struct shclass *shp; int sx, sy; @@ -487,7 +487,7 @@ boolean mkspecl; } /* extract a shopkeeper name for the given shop type */ -STATIC_OVL void +static void nameshk(shk, nlp) struct monst *shk; const char *const *nlp; @@ -585,7 +585,7 @@ struct monst *mtmp; } /* create a new shopkeeper in the given room */ -STATIC_OVL int +static int shkinit(shp, sroom) const struct shclass *shp; struct mkroom *sroom; @@ -679,7 +679,7 @@ struct mkroom *sroom; return sh; } -STATIC_OVL boolean +static boolean stock_room_goodpos(sroom, rmno, sh, sx, sy) struct mkroom *sroom; int rmno, sh, sx,sy; diff --git a/src/sounds.c b/src/sounds.c index 83c1e121a..614cba6ca 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -4,13 +4,13 @@ #include "hack.h" -STATIC_DCL boolean FDECL(mon_is_gecko, (struct monst *)); -STATIC_DCL int FDECL(domonnoise, (struct monst *)); -STATIC_DCL int NDECL(dochat); -STATIC_DCL int FDECL(mon_in_room, (struct monst *, int)); +static boolean FDECL(mon_is_gecko, (struct monst *)); +static int FDECL(domonnoise, (struct monst *)); +static int NDECL(dochat); +static int FDECL(mon_in_room, (struct monst *, int)); /* this easily could be a macro, but it might overtax dumb compilers */ -STATIC_OVL int +static int mon_in_room(mon, rmtyp) struct monst *mon; int rmtyp; @@ -468,7 +468,7 @@ register struct monst *mtmp; } /* return True if mon is a gecko or seems to look like one (hallucination) */ -STATIC_OVL boolean +static boolean mon_is_gecko(mon) struct monst *mon; { @@ -487,7 +487,7 @@ struct monst *mon; return (boolean) (glyph_to_mon(glyph) == PM_GECKO); } -STATIC_OVL int +static int domonnoise(mtmp) register struct monst *mtmp; { @@ -967,7 +967,7 @@ dotalk() return result; } -STATIC_OVL int +static int dochat() { struct monst *mtmp; diff --git a/src/sp_lev.c b/src/sp_lev.c index b47b891d5..1f77d70a2 100644 --- a/src/sp_lev.c +++ b/src/sp_lev.c @@ -22,150 +22,150 @@ typedef void FDECL((*select_iter_func), (int, int, genericptr)); extern void FDECL(mkmap, (lev_init *)); -STATIC_DCL void NDECL(solidify_map); -STATIC_DCL void FDECL(splev_stack_init, (struct splevstack *)); -STATIC_DCL void FDECL(splev_stack_done, (struct splevstack *)); -STATIC_DCL void FDECL(splev_stack_push, (struct splevstack *, +static void NDECL(solidify_map); +static void FDECL(splev_stack_init, (struct splevstack *)); +static void FDECL(splev_stack_done, (struct splevstack *)); +static void FDECL(splev_stack_push, (struct splevstack *, struct opvar *)); -STATIC_DCL struct opvar *FDECL(splev_stack_pop, (struct splevstack *)); -STATIC_DCL struct splevstack *FDECL(splev_stack_reverse, +static struct opvar *FDECL(splev_stack_pop, (struct splevstack *)); +static struct splevstack *FDECL(splev_stack_reverse, (struct splevstack *)); -STATIC_DCL struct opvar *FDECL(opvar_new_str, (char *)); -STATIC_DCL struct opvar *FDECL(opvar_new_int, (long)); -STATIC_DCL struct opvar *FDECL(opvar_new_coord, (int, int)); +static struct opvar *FDECL(opvar_new_str, (char *)); +static struct opvar *FDECL(opvar_new_int, (long)); +static struct opvar *FDECL(opvar_new_coord, (int, int)); #if 0 -STATIC_DCL struct opvar * FDECL(opvar_new_region, (int,int, int,int)); +static struct opvar * FDECL(opvar_new_region, (int,int, int,int)); #endif /*0*/ -STATIC_DCL struct opvar *FDECL(opvar_clone, (struct opvar *)); -STATIC_DCL struct opvar *FDECL(opvar_var_conversion, (struct sp_coder *, +static struct opvar *FDECL(opvar_clone, (struct opvar *)); +static struct opvar *FDECL(opvar_var_conversion, (struct sp_coder *, struct opvar *)); -STATIC_DCL struct splev_var *FDECL(opvar_var_defined, (struct sp_coder *, +static struct splev_var *FDECL(opvar_var_defined, (struct sp_coder *, char *)); -STATIC_DCL struct opvar *FDECL(splev_stack_getdat, (struct sp_coder *, +static struct opvar *FDECL(splev_stack_getdat, (struct sp_coder *, XCHAR_P)); -STATIC_DCL struct opvar *FDECL(splev_stack_getdat_any, (struct sp_coder *)); -STATIC_DCL void FDECL(variable_list_del, (struct splev_var *)); -STATIC_DCL void FDECL(lvlfill_maze_grid, (int, int, int, int, SCHAR_P)); -STATIC_DCL void FDECL(lvlfill_solid, (SCHAR_P, SCHAR_P)); -STATIC_DCL void FDECL(set_wall_property, (XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P, +static struct opvar *FDECL(splev_stack_getdat_any, (struct sp_coder *)); +static void FDECL(variable_list_del, (struct splev_var *)); +static void FDECL(lvlfill_maze_grid, (int, int, int, int, SCHAR_P)); +static void FDECL(lvlfill_solid, (SCHAR_P, SCHAR_P)); +static void FDECL(set_wall_property, (XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P, int)); -STATIC_DCL void NDECL(shuffle_alignments); -STATIC_DCL void NDECL(count_features); -STATIC_DCL void NDECL(remove_boundary_syms); -STATIC_DCL void FDECL(set_door_orientation, (int, int)); -STATIC_DCL void FDECL(maybe_add_door, (int, int, struct mkroom *)); -STATIC_DCL void NDECL(link_doors_rooms); -STATIC_DCL void NDECL(fill_rooms); -STATIC_DCL int NDECL(rnddoor); -STATIC_DCL int NDECL(rndtrap); -STATIC_DCL void FDECL(get_location, (schar *, schar *, int, struct mkroom *)); -STATIC_DCL boolean FDECL(is_ok_location, (SCHAR_P, SCHAR_P, int)); -STATIC_DCL unpacked_coord FDECL(get_unpacked_coord, (long, int)); -STATIC_DCL void FDECL(get_location_coord, (schar *, schar *, int, +static void NDECL(shuffle_alignments); +static void NDECL(count_features); +static void NDECL(remove_boundary_syms); +static void FDECL(set_door_orientation, (int, int)); +static void FDECL(maybe_add_door, (int, int, struct mkroom *)); +static void NDECL(link_doors_rooms); +static void NDECL(fill_rooms); +static int NDECL(rnddoor); +static int NDECL(rndtrap); +static void FDECL(get_location, (schar *, schar *, int, struct mkroom *)); +static boolean FDECL(is_ok_location, (SCHAR_P, SCHAR_P, int)); +static unpacked_coord FDECL(get_unpacked_coord, (long, int)); +static void FDECL(get_location_coord, (schar *, schar *, int, struct mkroom *, long)); -STATIC_DCL void FDECL(get_room_loc, (schar *, schar *, struct mkroom *)); -STATIC_DCL void FDECL(get_free_room_loc, (schar *, schar *, +static void FDECL(get_room_loc, (schar *, schar *, struct mkroom *)); +static void FDECL(get_free_room_loc, (schar *, schar *, struct mkroom *, packed_coord)); -STATIC_DCL boolean FDECL(create_subroom, (struct mkroom *, XCHAR_P, XCHAR_P, +static boolean FDECL(create_subroom, (struct mkroom *, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P)); -STATIC_DCL void FDECL(create_door, (room_door *, struct mkroom *)); -STATIC_DCL void FDECL(create_trap, (spltrap *, struct mkroom *)); -STATIC_DCL int FDECL(noncoalignment, (ALIGNTYP_P)); -STATIC_DCL boolean FDECL(m_bad_boulder_spot, (int, int)); -STATIC_DCL int FDECL(pm_to_humidity, (struct permonst *)); -STATIC_DCL void FDECL(create_monster, (monster *, struct mkroom *)); -STATIC_DCL void FDECL(create_object, (object *, struct mkroom *)); -STATIC_DCL void FDECL(create_altar, (altar *, struct mkroom *)); -STATIC_DCL void FDECL(replace_terrain, (replaceterrain *, struct mkroom *)); -STATIC_DCL boolean FDECL(search_door, (struct mkroom *, +static void FDECL(create_door, (room_door *, struct mkroom *)); +static void FDECL(create_trap, (spltrap *, struct mkroom *)); +static int FDECL(noncoalignment, (ALIGNTYP_P)); +static boolean FDECL(m_bad_boulder_spot, (int, int)); +static int FDECL(pm_to_humidity, (struct permonst *)); +static void FDECL(create_monster, (monster *, struct mkroom *)); +static void FDECL(create_object, (object *, struct mkroom *)); +static void FDECL(create_altar, (altar *, struct mkroom *)); +static void FDECL(replace_terrain, (replaceterrain *, struct mkroom *)); +static boolean FDECL(search_door, (struct mkroom *, xchar *, xchar *, XCHAR_P, int)); -STATIC_DCL void NDECL(fix_stair_rooms); -STATIC_DCL void FDECL(create_corridor, (corridor *)); -STATIC_DCL struct mkroom *FDECL(build_room, (room *, struct mkroom *)); -STATIC_DCL void FDECL(light_region, (region *)); -STATIC_DCL void FDECL(wallify_map, (int, int, int, int)); -STATIC_DCL void FDECL(maze1xy, (coord *, int)); -STATIC_DCL void NDECL(fill_empty_maze); -STATIC_DCL boolean FDECL(sp_level_loader, (dlb *, sp_lev *)); -STATIC_DCL boolean FDECL(sp_level_free, (sp_lev *)); -STATIC_DCL void FDECL(splev_initlev, (lev_init *)); -STATIC_DCL struct sp_frame *FDECL(frame_new, (long)); -STATIC_DCL void FDECL(frame_del, (struct sp_frame *)); -STATIC_DCL void FDECL(spo_frame_push, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_frame_pop, (struct sp_coder *)); -STATIC_DCL long FDECL(sp_code_jmpaddr, (long, long)); -STATIC_DCL void FDECL(spo_call, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_return, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_end_moninvent, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_pop_container, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_message, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_monster, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_object, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_level_flags, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_initlevel, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_engraving, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_mineralize, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_room, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_endroom, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_stair, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_ladder, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_grave, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_altar, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_trap, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_gold, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_corridor, (struct sp_coder *)); -STATIC_DCL void FDECL(selection_setpoint, (int, int, struct opvar *, XCHAR_P)); -STATIC_DCL struct opvar *FDECL(selection_not, (struct opvar *)); -STATIC_DCL struct opvar *FDECL(selection_logical_oper, (struct opvar *, +static void NDECL(fix_stair_rooms); +static void FDECL(create_corridor, (corridor *)); +static struct mkroom *FDECL(build_room, (room *, struct mkroom *)); +static void FDECL(light_region, (region *)); +static void FDECL(wallify_map, (int, int, int, int)); +static void FDECL(maze1xy, (coord *, int)); +static void NDECL(fill_empty_maze); +static boolean FDECL(sp_level_loader, (dlb *, sp_lev *)); +static boolean FDECL(sp_level_free, (sp_lev *)); +static void FDECL(splev_initlev, (lev_init *)); +static struct sp_frame *FDECL(frame_new, (long)); +static void FDECL(frame_del, (struct sp_frame *)); +static void FDECL(spo_frame_push, (struct sp_coder *)); +static void FDECL(spo_frame_pop, (struct sp_coder *)); +static long FDECL(sp_code_jmpaddr, (long, long)); +static void FDECL(spo_call, (struct sp_coder *)); +static void FDECL(spo_return, (struct sp_coder *)); +static void FDECL(spo_end_moninvent, (struct sp_coder *)); +static void FDECL(spo_pop_container, (struct sp_coder *)); +static void FDECL(spo_message, (struct sp_coder *)); +static void FDECL(spo_monster, (struct sp_coder *)); +static void FDECL(spo_object, (struct sp_coder *)); +static void FDECL(spo_level_flags, (struct sp_coder *)); +static void FDECL(spo_initlevel, (struct sp_coder *)); +static void FDECL(spo_engraving, (struct sp_coder *)); +static void FDECL(spo_mineralize, (struct sp_coder *)); +static void FDECL(spo_room, (struct sp_coder *)); +static void FDECL(spo_endroom, (struct sp_coder *)); +static void FDECL(spo_stair, (struct sp_coder *)); +static void FDECL(spo_ladder, (struct sp_coder *)); +static void FDECL(spo_grave, (struct sp_coder *)); +static void FDECL(spo_altar, (struct sp_coder *)); +static void FDECL(spo_trap, (struct sp_coder *)); +static void FDECL(spo_gold, (struct sp_coder *)); +static void FDECL(spo_corridor, (struct sp_coder *)); +static void FDECL(selection_setpoint, (int, int, struct opvar *, XCHAR_P)); +static struct opvar *FDECL(selection_not, (struct opvar *)); +static struct opvar *FDECL(selection_logical_oper, (struct opvar *, struct opvar *, CHAR_P)); -STATIC_DCL struct opvar *FDECL(selection_filter_mapchar, (struct opvar *, +static struct opvar *FDECL(selection_filter_mapchar, (struct opvar *, struct opvar *)); -STATIC_DCL void FDECL(selection_filter_percent, (struct opvar *, int)); -STATIC_DCL int FDECL(selection_rndcoord, (struct opvar *, schar *, schar *, +static void FDECL(selection_filter_percent, (struct opvar *, int)); +static int FDECL(selection_rndcoord, (struct opvar *, schar *, schar *, BOOLEAN_P)); -STATIC_DCL void FDECL(selection_do_grow, (struct opvar *, int)); -STATIC_DCL int FDECL(floodfillchk_match_under, (int, int)); -STATIC_DCL int FDECL(floodfillchk_match_accessible, (int, int)); -STATIC_DCL boolean FDECL(sel_flood_havepoint, (int, int, +static void FDECL(selection_do_grow, (struct opvar *, int)); +static int FDECL(floodfillchk_match_under, (int, int)); +static int FDECL(floodfillchk_match_accessible, (int, int)); +static boolean FDECL(sel_flood_havepoint, (int, int, xchar *, xchar *, int)); -STATIC_DCL void FDECL(selection_do_ellipse, (struct opvar *, int, int, +static void FDECL(selection_do_ellipse, (struct opvar *, int, int, int, int, int)); -STATIC_DCL long FDECL(line_dist_coord, (long, long, long, long, long, long)); -STATIC_DCL void FDECL(selection_do_gradient, (struct opvar *, long, long, long, +static long FDECL(line_dist_coord, (long, long, long, long, long, long)); +static void FDECL(selection_do_gradient, (struct opvar *, long, long, long, long, long, long, long, long)); -STATIC_DCL void FDECL(selection_do_line, (SCHAR_P, SCHAR_P, SCHAR_P, SCHAR_P, +static void FDECL(selection_do_line, (SCHAR_P, SCHAR_P, SCHAR_P, SCHAR_P, struct opvar *)); -STATIC_DCL void FDECL(selection_do_randline, (SCHAR_P, SCHAR_P, SCHAR_P, +static void FDECL(selection_do_randline, (SCHAR_P, SCHAR_P, SCHAR_P, SCHAR_P, SCHAR_P, SCHAR_P, struct opvar *)); -STATIC_DCL void FDECL(selection_iterate, (struct opvar *, select_iter_func, +static void FDECL(selection_iterate, (struct opvar *, select_iter_func, genericptr_t)); -STATIC_DCL void FDECL(sel_set_ter, (int, int, genericptr_t)); -STATIC_DCL void FDECL(sel_set_feature, (int, int, genericptr_t)); -STATIC_DCL void FDECL(sel_set_door, (int, int, genericptr_t)); -STATIC_DCL void FDECL(spo_door, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_feature, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_terrain, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_replace_terrain, (struct sp_coder *)); -STATIC_DCL boolean FDECL(generate_way_out_method, (int, int, struct opvar *)); -STATIC_DCL void NDECL(ensure_way_out); -STATIC_DCL void FDECL(spo_levregion, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_region, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_drawbridge, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_mazewalk, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_wall_property, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_room_door, (struct sp_coder *)); -STATIC_DCL void FDECL(sel_set_wallify, (int, int, genericptr_t)); -STATIC_DCL void FDECL(spo_wallify, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_map, (struct sp_coder *)); -STATIC_DCL void FDECL(spo_jmp, (struct sp_coder *, sp_lev *)); -STATIC_DCL void FDECL(spo_conditional_jump, (struct sp_coder *, sp_lev *)); -STATIC_DCL void FDECL(spo_var_init, (struct sp_coder *)); +static void FDECL(sel_set_ter, (int, int, genericptr_t)); +static void FDECL(sel_set_feature, (int, int, genericptr_t)); +static void FDECL(sel_set_door, (int, int, genericptr_t)); +static void FDECL(spo_door, (struct sp_coder *)); +static void FDECL(spo_feature, (struct sp_coder *)); +static void FDECL(spo_terrain, (struct sp_coder *)); +static void FDECL(spo_replace_terrain, (struct sp_coder *)); +static boolean FDECL(generate_way_out_method, (int, int, struct opvar *)); +static void NDECL(ensure_way_out); +static void FDECL(spo_levregion, (struct sp_coder *)); +static void FDECL(spo_region, (struct sp_coder *)); +static void FDECL(spo_drawbridge, (struct sp_coder *)); +static void FDECL(spo_mazewalk, (struct sp_coder *)); +static void FDECL(spo_wall_property, (struct sp_coder *)); +static void FDECL(spo_room_door, (struct sp_coder *)); +static void FDECL(sel_set_wallify, (int, int, genericptr_t)); +static void FDECL(spo_wallify, (struct sp_coder *)); +static void FDECL(spo_map, (struct sp_coder *)); +static void FDECL(spo_jmp, (struct sp_coder *, sp_lev *)); +static void FDECL(spo_conditional_jump, (struct sp_coder *, sp_lev *)); +static void FDECL(spo_var_init, (struct sp_coder *)); #if 0 -STATIC_DCL long FDECL(opvar_array_length, (struct sp_coder *)); +static long FDECL(opvar_array_length, (struct sp_coder *)); #endif /*0*/ -STATIC_DCL void FDECL(spo_shuffle_array, (struct sp_coder *)); -STATIC_DCL boolean FDECL(sp_level_coder, (sp_lev *)); +static void FDECL(spo_shuffle_array, (struct sp_coder *)); +static boolean FDECL(sp_level_coder, (sp_lev *)); #define LEFT 1 #define H_LEFT 2 @@ -610,7 +610,7 @@ schar lit; /* * Make walls of the area (x1, y1, x2, y2) non diggable/non passwall-able */ -STATIC_OVL void +static void set_wall_property(x1, y1, x2, y2, prop) xchar x1, y1, x2, y2; int prop; @@ -633,7 +633,7 @@ int prop; } } -STATIC_OVL void +static void shuffle_alignments() { int i; @@ -654,7 +654,7 @@ shuffle_alignments() /* * Count the different features (sinks, fountains) in the level. */ -STATIC_OVL void +static void count_features() { xchar x, y; @@ -696,7 +696,7 @@ remove_boundary_syms() } /* used by sel_set_door() and link_doors_rooms() */ -STATIC_OVL void +static void set_door_orientation(x, y) int x, y; { @@ -743,7 +743,7 @@ int x, y; levl[x][y].horizontal = ((wleft || wright) && !(wup && wdown)) ? 1 : 0; } -STATIC_OVL void +static void maybe_add_door(x, y, droom) int x, y; struct mkroom *droom; @@ -752,7 +752,7 @@ struct mkroom *droom; add_door(x, y, droom); } -STATIC_OVL void +static void link_doors_rooms() { int x, y; @@ -792,7 +792,7 @@ fill_rooms() /* * Choose randomly the state (nodoor, open, closed or locked) for a door */ -STATIC_OVL int +static int rnddoor() { int i = 1 << rn2(5); @@ -804,7 +804,7 @@ rnddoor() /* * Select a random trap */ -STATIC_OVL int +static int rndtrap() { int rtrap; @@ -843,7 +843,7 @@ rndtrap() * The "humidity" flag is used to insure that engravings aren't * created underwater, or eels on dry land. */ -STATIC_OVL void +static void get_location(x, y, humidity, croom) schar *x, *y; int humidity; @@ -913,7 +913,7 @@ found_it: } } -STATIC_OVL boolean +static boolean is_ok_location(x, y, humidity) register schar x, y; register int humidity; @@ -967,7 +967,7 @@ int defhumidity; return c; } -STATIC_OVL void +static void get_location_coord(x, y, humidity, croom, crd) schar *x, *y; int humidity; @@ -990,7 +990,7 @@ long crd; * negative values for x or y means RANDOM! */ -STATIC_OVL void +static void get_room_loc(x, y, croom) schar *x, *y; struct mkroom *croom; @@ -1017,7 +1017,7 @@ struct mkroom *croom; * Get a relative position inside a room. * negative values for x or y means RANDOM! */ -STATIC_OVL void +static void get_free_room_loc(x, y, croom, pos) schar *x, *y; struct mkroom *croom; @@ -1274,7 +1274,7 @@ xchar rtype, rlit; * Create a subroom in room proom at pos x,y with width w & height h. * x & y are relative to the parent room. */ -STATIC_OVL boolean +static boolean create_subroom(proom, x, y, w, h, rtype, rlit) struct mkroom *proom; xchar x, y; @@ -1321,7 +1321,7 @@ xchar rtype, rlit; * Create a new door in a room. * It's placed on a wall (north, south, east or west). */ -STATIC_OVL void +static void create_door(dd, broom) room_door *dd; struct mkroom *broom; @@ -1475,7 +1475,7 @@ xchar walls; /* any of W_NORTH | W_SOUTH | W_EAST | W_WEST (or W_ANY) */ /* * Create a trap in a room. */ -STATIC_OVL void +static void create_trap(t, croom) spltrap *t; struct mkroom *croom; @@ -1504,7 +1504,7 @@ struct mkroom *croom; /* * Create a monster in a room. */ -STATIC_OVL int +static int noncoalignment(alignment) aligntyp alignment; { @@ -1517,7 +1517,7 @@ aligntyp alignment; } /* attempt to screen out locations where a mimic-as-boulder shouldn't occur */ -STATIC_OVL boolean +static boolean m_bad_boulder_spot(x, y) int x, y; { @@ -1538,7 +1538,7 @@ int x, y; return FALSE; } -STATIC_OVL int +static int pm_to_humidity(pm) struct permonst *pm; { @@ -1556,7 +1556,7 @@ struct permonst *pm; return loc; } -STATIC_OVL void +static void create_monster(m, croom) monster *m; struct mkroom *croom; @@ -1815,7 +1815,7 @@ struct mkroom *croom; /* * Create an object in a room. */ -STATIC_OVL void +static void create_object(o, croom) object *o; struct mkroom *croom; @@ -2065,7 +2065,7 @@ struct mkroom *croom; /* * Create an altar in a room. */ -STATIC_OVL void +static void create_altar(a, croom) altar *a; struct mkroom *croom; @@ -2151,7 +2151,7 @@ struct mkroom *croom; /* * Search for a door in a room on a specified wall. */ -STATIC_OVL boolean +static boolean search_door(croom, x, y, wall, cnt) struct mkroom *croom; xchar *x, *y; @@ -2323,7 +2323,7 @@ schar ftyp, btyp; * and g.dnstairs_room after the rooms have been sorted. On normal levels, * stairs don't get created until _after_ sorting takes place. */ -STATIC_OVL void +static void fix_stair_rooms() { int i; @@ -2366,7 +2366,7 @@ fix_stair_rooms() * Basically we search for door coordinates or for endpoints coordinates * (from a distance). */ -STATIC_OVL void +static void create_corridor(c) corridor *c; { @@ -2520,7 +2520,7 @@ struct mkroom *mkr; /* * set lighting in a region that will not become a room. */ -STATIC_OVL void +static void light_region(tmpregion) region *tmpregion; { @@ -2548,7 +2548,7 @@ region *tmpregion; } } -STATIC_OVL void +static void wallify_map(x1, y1, x2, y2) int x1, y1, x2, y2; { @@ -2584,7 +2584,7 @@ int x1, y1, x2, y2; * We want a place not 'touched' by the loader. That is, a place in * the maze outside every part of the special level. */ -STATIC_OVL void +static void maze1xy(m, humidity) coord *m; int humidity; @@ -2612,7 +2612,7 @@ int humidity; * Makes the number of traps, monsters, etc. proportional * to the size of the maze. */ -STATIC_OVL void +static void fill_empty_maze() { int mapcountmax, mapcount, mapfact; @@ -2666,7 +2666,7 @@ fill_empty_maze() /* * special level loader */ -STATIC_OVL boolean +static boolean sp_level_loader(fd, lvl) dlb *fd; sp_lev *lvl; @@ -2738,7 +2738,7 @@ sp_lev *lvl; } /* Frees the memory allocated for special level creation structs */ -STATIC_OVL boolean +static boolean sp_level_free(lvl) sp_lev *lvl; { @@ -3785,7 +3785,7 @@ int percent; selection_setpoint(x, y, ov, 0); } -STATIC_OVL int +static int selection_rndcoord(ov, x, y, removeit) struct opvar *ov; schar *x, *y; @@ -3861,8 +3861,8 @@ int dir; selection_setpoint(x, y, ov, 1); } -STATIC_VAR int FDECL((*selection_flood_check_func), (int, int)); -STATIC_VAR schar floodfillchk_match_under_typ; +static int FDECL((*selection_flood_check_func), (int, int)); +static schar floodfillchk_match_under_typ; void set_selection_floodfillchk(f) @@ -3871,14 +3871,14 @@ int FDECL((*f), (int, int)); selection_flood_check_func = f; } -STATIC_OVL int +static int floodfillchk_match_under(x,y) int x,y; { return (floodfillchk_match_under_typ == levl[x][y].typ); } -STATIC_OVL int +static int floodfillchk_match_accessible(x, y) int x, y; { @@ -3888,7 +3888,7 @@ int x, y; } /* check whethere is already in xs[],ys[] */ -STATIC_OVL boolean +static boolean sel_flood_havepoint(x, y, xs, ys, n) int x, y; xchar xs[], ys[]; @@ -4385,7 +4385,7 @@ struct sp_coder *coder; opvar_free(chance); } -STATIC_OVL boolean +static boolean generate_way_out_method(nx,ny, ov) int nx,ny; struct opvar *ov; @@ -4459,7 +4459,7 @@ struct opvar *ov; return res; } -STATIC_OVL void +static void ensure_way_out() { static const char nhFunc[] = "ensure_way_out"; @@ -5219,7 +5219,7 @@ struct sp_coder *coder; } #if 0 -STATIC_OVL long +static long opvar_array_length(coder) struct sp_coder *coder; { @@ -5288,7 +5288,7 @@ struct sp_coder *coder; /* Special level coder, creates the special level from the sp_lev codes. * Does not free the allocated memory. */ -STATIC_OVL boolean +static boolean sp_level_coder(lvl) sp_lev *lvl; { diff --git a/src/spell.c b/src/spell.c index 3d0ec4765..0cee8580b 100644 --- a/src/spell.c +++ b/src/spell.c @@ -25,25 +25,25 @@ #define spellet(spell) \ ((char) ((spell < 26) ? ('a' + spell) : ('A' + spell - 26))) -STATIC_DCL int FDECL(spell_let_to_idx, (CHAR_P)); -STATIC_DCL boolean FDECL(cursed_book, (struct obj * bp)); -STATIC_DCL boolean FDECL(confused_book, (struct obj *)); -STATIC_DCL void FDECL(deadbook, (struct obj *)); -STATIC_PTR int NDECL(learn); -STATIC_DCL boolean NDECL(rejectcasting); -STATIC_DCL boolean FDECL(getspell, (int *)); -STATIC_PTR int FDECL(CFDECLSPEC spell_cmp, (const genericptr, +static int FDECL(spell_let_to_idx, (CHAR_P)); +static boolean FDECL(cursed_book, (struct obj * bp)); +static boolean FDECL(confused_book, (struct obj *)); +static void FDECL(deadbook, (struct obj *)); +static int NDECL(learn); +static boolean NDECL(rejectcasting); +static boolean FDECL(getspell, (int *)); +static int FDECL(CFDECLSPEC spell_cmp, (const genericptr, const genericptr)); -STATIC_DCL void NDECL(sortspells); -STATIC_DCL boolean NDECL(spellsortmenu); -STATIC_DCL boolean FDECL(dospellmenu, (const char *, int, int *)); -STATIC_DCL int FDECL(percent_success, (int)); -STATIC_DCL char *FDECL(spellretention, (int, char *)); -STATIC_DCL int NDECL(throwspell); -STATIC_DCL void NDECL(cast_protection); -STATIC_DCL void FDECL(spell_backfire, (int)); -STATIC_DCL const char *FDECL(spelltypemnemonic, (int)); -STATIC_DCL boolean FDECL(spell_aim_step, (genericptr_t, int, int)); +static void NDECL(sortspells); +static boolean NDECL(spellsortmenu); +static boolean FDECL(dospellmenu, (const char *, int, int *)); +static int FDECL(percent_success, (int)); +static char *FDECL(spellretention, (int, char *)); +static int NDECL(throwspell); +static void NDECL(cast_protection); +static void FDECL(spell_backfire, (int)); +static const char *FDECL(spelltypemnemonic, (int)); +static boolean FDECL(spell_aim_step, (genericptr_t, int, int)); /* The roles[] table lists the role-specific values for tuning * percent_success(). @@ -101,7 +101,7 @@ STATIC_DCL boolean FDECL(spell_aim_step, (genericptr_t, int, int)); static const char explodes[] = "radiates explosive energy"; /* convert a letter into a number in the range 0..51, or -1 if not a letter */ -STATIC_OVL int +static int spell_let_to_idx(ilet) char ilet; { @@ -117,7 +117,7 @@ char ilet; } /* TRUE: book should be destroyed by caller */ -STATIC_OVL boolean +static boolean cursed_book(bp) struct obj *bp; { @@ -177,7 +177,7 @@ struct obj *bp; } /* study while confused: returns TRUE if the book is destroyed */ -STATIC_OVL boolean +static boolean confused_book(spellbook) struct obj *spellbook; { @@ -202,7 +202,7 @@ struct obj *spellbook; } /* special effects for The Book of the Dead */ -STATIC_OVL void +static void deadbook(book2) struct obj *book2; { @@ -336,7 +336,7 @@ struct obj *book; stop_occupation(); } -STATIC_PTR int +static int learn(VOID_ARGS) { int i; @@ -637,7 +637,7 @@ age_spells() /* return True if spellcasting is inhibited; only covers a small subset of reasons why casting won't work */ -STATIC_OVL boolean +static boolean rejectcasting() { /* rejections which take place before selecting a particular spell */ @@ -665,7 +665,7 @@ rejectcasting() * Return TRUE if a spell was picked, with the spell index in the return * parameter. Otherwise return FALSE. */ -STATIC_OVL boolean +static boolean getspell(spell_no) int *spell_no; { @@ -727,7 +727,7 @@ docast() return 0; } -STATIC_OVL const char * +static const char * spelltypemnemonic(skill) int skill; { @@ -759,7 +759,7 @@ int booktype; return objects[booktype].oc_skill; } -STATIC_OVL void +static void cast_protection() { int l = u.ulevel, loglev = 0, @@ -840,7 +840,7 @@ cast_protection() } /* attempting to cast a forgotten spell will cause disorientation */ -STATIC_OVL void +static void spell_backfire(spell) int spell; { @@ -1213,7 +1213,7 @@ boolean atme; } /*ARGSUSED*/ -STATIC_OVL boolean +static boolean spell_aim_step(arg, x, y) genericptr_t arg UNUSED; int x, y; @@ -1227,7 +1227,7 @@ int x, y; } /* Choose location where spell takes effect. */ -STATIC_OVL int +static int throwspell() { coord cc, uc; @@ -1439,7 +1439,7 @@ static const char *spl_sortchoices[NUM_SPELL_SORTBY] = { }; /* qsort callback routine */ -STATIC_PTR int CFDECLSPEC +static int CFDECLSPEC spell_cmp(vptr1, vptr2) const genericptr vptr1; const genericptr vptr2; @@ -1498,7 +1498,7 @@ const genericptr vptr2; /* sort the index used for display order of the "view known spells" list (sortmode == SORTBY_xxx), or sort the spellbook itself to make the current display order stick (sortmode == SORTRETAINORDER) */ -STATIC_OVL void +static void sortspells() { int i; @@ -1546,7 +1546,7 @@ sortspells() } /* called if the [sort spells] entry in the view spells menu gets chosen */ -STATIC_OVL boolean +static boolean spellsortmenu() { winid tmpwin; @@ -1625,7 +1625,7 @@ dovspell() return 0; } -STATIC_OVL boolean +static boolean dospellmenu(prompt, splaction, spell_no) const char *prompt; int splaction; /* SPELLMENU_CAST, SPELLMENU_VIEW, or g.spl_book[] index */ @@ -1707,7 +1707,7 @@ int *spell_no; return FALSE; } -STATIC_OVL int +static int percent_success(spell) int spell; { @@ -1822,7 +1822,7 @@ int spell; return chance; } -STATIC_OVL char * +static char * spellretention(idx, outbuf) int idx; char *outbuf; diff --git a/src/steal.c b/src/steal.c index 19fac8f48..7988b0316 100644 --- a/src/steal.c +++ b/src/steal.c @@ -5,11 +5,11 @@ #include "hack.h" -STATIC_PTR int NDECL(stealarm); +static int NDECL(stealarm); -STATIC_DCL const char *FDECL(equipname, (struct obj *)); +static const char *FDECL(equipname, (struct obj *)); -STATIC_OVL const char * +static const char * equipname(otmp) register struct obj *otmp; { @@ -143,7 +143,7 @@ register struct monst *mtmp; unsigned int stealoid; /* object to be stolen */ unsigned int stealmid; /* monster doing the stealing */ -STATIC_PTR int +static int stealarm(VOID_ARGS) { register struct monst *mtmp; diff --git a/src/steed.c b/src/steed.c index eca69c407..942bab8ec 100644 --- a/src/steed.c +++ b/src/steed.c @@ -9,8 +9,8 @@ static NEARDATA const char steeds[] = { S_QUADRUPED, S_UNICORN, S_ANGEL, S_CENTAUR, S_DRAGON, S_JABBERWOCK, '\0' }; -STATIC_DCL boolean FDECL(landing_spot, (coord *, int, int)); -STATIC_DCL void FDECL(maybewakesteed, (struct monst *)); +static boolean FDECL(landing_spot, (coord *, int, int)); +static void FDECL(maybewakesteed, (struct monst *)); /* caller has decided that hero can't reach something while mounted */ void @@ -430,7 +430,7 @@ kick_steed() * room's walls, which is not what we want. * Adapted from mail daemon code. */ -STATIC_OVL boolean +static boolean landing_spot(spot, reason, forceit) coord *spot; /* landing position (we fill it in) */ int reason; @@ -689,7 +689,7 @@ int reason; /* Player was thrown off etc. */ /* 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) */ -STATIC_OVL void +static void maybewakesteed(steed) struct monst *steed; { diff --git a/src/teleport.c b/src/teleport.c index 037be54fb..88d33325c 100644 --- a/src/teleport.c +++ b/src/teleport.c @@ -5,11 +5,11 @@ #include "hack.h" -STATIC_DCL boolean FDECL(tele_jump_ok, (int, int, int, int)); -STATIC_DCL boolean FDECL(teleok, (int, int, BOOLEAN_P)); -STATIC_DCL void NDECL(vault_tele); -STATIC_DCL boolean FDECL(rloc_pos_ok, (int, int, struct monst *)); -STATIC_DCL void FDECL(mvault_tele, (struct monst *)); +static boolean FDECL(tele_jump_ok, (int, int, int, int)); +static boolean FDECL(teleok, (int, int, BOOLEAN_P)); +static void NDECL(vault_tele); +static boolean FDECL(rloc_pos_ok, (int, int, struct monst *)); +static void FDECL(mvault_tele, (struct monst *)); /* * Is (x,y) a good position of mtmp? If mtmp is NULL, then is (x,y) good @@ -220,7 +220,7 @@ unsigned entflags; * need to be augmented to allow deliberate passage in wizard mode, but * only for explicitly chosen destinations.) */ -STATIC_OVL boolean +static boolean tele_jump_ok(x1, y1, x2, y2) int x1, y1, x2, y2; { @@ -255,7 +255,7 @@ int x1, y1, x2, y2; return TRUE; } -STATIC_OVL boolean +static boolean teleok(x, y, trapok) register int x, y; boolean trapok; @@ -417,7 +417,7 @@ boolean allow_drag; return FALSE; } -STATIC_OVL void +static void vault_tele() { register struct mkroom *croom = search_special(VAULT); @@ -1098,7 +1098,7 @@ unsigned trflags; } /* check whether monster can arrive at location via Tport (or fall) */ -STATIC_OVL boolean +static boolean rloc_pos_ok(x, y, mtmp) register int x, y; /* coordinates of candidate location */ struct monst *mtmp; @@ -1262,7 +1262,7 @@ boolean suppress_impossible; return TRUE; } -STATIC_OVL void +static void mvault_tele(mtmp) struct monst *mtmp; { diff --git a/src/timeout.c b/src/timeout.c index 5bf7084d3..b39937ee8 100644 --- a/src/timeout.c +++ b/src/timeout.c @@ -8,16 +8,16 @@ #include "sfproto.h" -STATIC_DCL void NDECL(stoned_dialogue); -STATIC_DCL void NDECL(vomiting_dialogue); -STATIC_DCL void NDECL(choke_dialogue); -STATIC_DCL void NDECL(levitation_dialogue); -STATIC_DCL void NDECL(slime_dialogue); -STATIC_DCL void FDECL(slimed_to_death, (struct kinfo *)); -STATIC_DCL void NDECL(slip_or_trip); -STATIC_DCL void FDECL(see_lamp_flicker, (struct obj *, const char *)); -STATIC_DCL void FDECL(lantern_message, (struct obj *)); -STATIC_DCL void FDECL(cleanup_burn, (ANY_P *, long)); +static void NDECL(stoned_dialogue); +static void NDECL(vomiting_dialogue); +static void NDECL(choke_dialogue); +static void NDECL(levitation_dialogue); +static void NDECL(slime_dialogue); +static void FDECL(slimed_to_death, (struct kinfo *)); +static void NDECL(slip_or_trip); +static void FDECL(see_lamp_flicker, (struct obj *, const char *)); +static void FDECL(lantern_message, (struct obj *)); +static void FDECL(cleanup_burn, (ANY_P *, long)); /* used by wizard mode #timeout and #wizintrinsic; order by 'interest' for timeout countdown, where most won't occur in normal play */ @@ -107,7 +107,7 @@ static NEARDATA const char *const stoned_texts[] = { "You are a statue." /* 1 */ }; -STATIC_OVL void +static void stoned_dialogue() { register long i = (Stoned & TIMEOUT); @@ -167,7 +167,7 @@ static NEARDATA const char *const vomiting_texts[] = { "are about to vomit." /* 2 */ }; -STATIC_OVL void +static void vomiting_dialogue() { const char *txt = 0; @@ -248,7 +248,7 @@ static NEARDATA const char *const choke_texts2[] = { "You suffocate." }; -STATIC_OVL void +static void choke_dialogue() { register long i = (Strangled & TIMEOUT); @@ -273,7 +273,7 @@ static NEARDATA const char *const levi_texts[] = { "You wobble unsteadily %s the %s." }; -STATIC_OVL void +static void levitation_dialogue() { /* -1 because the last message comes via float_down() */ @@ -308,7 +308,7 @@ static NEARDATA const char *const slime_texts[] = { "You have become %s." /* 1 */ }; -STATIC_OVL void +static void slime_dialogue() { register long i = (Slimed & TIMEOUT) / 2L; @@ -368,7 +368,7 @@ burn_away_slime() } /* countdown timer for turning into green slime has run out; kill our hero */ -STATIC_OVL void +static void slimed_to_death(kptr) struct kinfo *kptr; { @@ -446,7 +446,7 @@ static NEARDATA const char *const phaze_texts[] = { "You are feeling rather flabby.", }; -STATIC_OVL void +static void phaze_dialogue() { long i = ((HPasses_walls & TIMEOUT) / 2L); @@ -974,7 +974,7 @@ struct obj *figurine; } /* give a fumble message */ -STATIC_OVL void +static void slip_or_trip() { struct obj *otmp = vobj_at(u.ux, u.uy), *otmp2; @@ -1065,7 +1065,7 @@ slip_or_trip() } /* Print a lamp flicker message with tailer. */ -STATIC_OVL void +static void see_lamp_flicker(obj, tailer) struct obj *obj; const char *tailer; @@ -1082,7 +1082,7 @@ const char *tailer; } /* Print a dimming message for brass lanterns. */ -STATIC_OVL void +static void lantern_message(obj) struct obj *obj; { @@ -1662,15 +1662,15 @@ do_storms() * Check whether object has a timer of type timer_type. */ -STATIC_DCL const char *FDECL(kind_name, (SHORT_P)); -STATIC_DCL void FDECL(print_queue, (winid, timer_element *)); -STATIC_DCL void FDECL(insert_timer, (timer_element *)); -STATIC_DCL timer_element *FDECL(remove_timer, +static const char *FDECL(kind_name, (SHORT_P)); +static void FDECL(print_queue, (winid, timer_element *)); +static void FDECL(insert_timer, (timer_element *)); +static timer_element *FDECL(remove_timer, (timer_element **, SHORT_P, ANY_P *)); -STATIC_DCL void FDECL(write_timer, (NHFILE *, timer_element *)); -STATIC_DCL boolean FDECL(mon_is_local, (struct monst *)); -STATIC_DCL boolean FDECL(timer_is_local, (timer_element *)); -STATIC_DCL int FDECL(maybe_write_timer, (NHFILE *, int, BOOLEAN_P)); +static void FDECL(write_timer, (NHFILE *, timer_element *)); +static boolean FDECL(mon_is_local, (struct monst *)); +static boolean FDECL(timer_is_local, (timer_element *)); +static int FDECL(maybe_write_timer, (NHFILE *, int, BOOLEAN_P)); /* If defined, then include names when printing out the timer queue */ #define VERBOSE_TIMER @@ -1703,7 +1703,7 @@ static const ttable timeout_funcs[NUM_TIME_FUNCS] = { }; #undef TTAB -STATIC_OVL const char * +static const char * kind_name(kind) short kind; { @@ -1720,7 +1720,7 @@ short kind; return "unknown"; } -STATIC_OVL void +static void print_queue(win, base) winid win; timer_element *base; @@ -2072,7 +2072,7 @@ short func_index; } /* Insert timer into the global queue */ -STATIC_OVL void +static void insert_timer(gnu) timer_element *gnu; { @@ -2089,7 +2089,7 @@ timer_element *gnu; g.timer_base = gnu; } -STATIC_OVL timer_element * +static timer_element * remove_timer(base, func_index, arg) timer_element **base; short func_index; @@ -2111,7 +2111,7 @@ anything *arg; return curr; } -STATIC_OVL void +static void write_timer(nhfp, timer) NHFILE *nhfp; timer_element *timer; @@ -2205,7 +2205,7 @@ struct obj *obj; * Return TRUE if the given monster will stay on the level when the * level is saved. */ -STATIC_OVL boolean +static boolean mon_is_local(mon) struct monst *mon; { @@ -2225,7 +2225,7 @@ struct monst *mon; * Return TRUE if the timer is attached to something that will stay on the * level when the level is saved. */ -STATIC_OVL boolean +static boolean timer_is_local(timer) timer_element *timer; { @@ -2247,7 +2247,7 @@ timer_element *timer; * Part of the save routine. Count up the number of timers that would * be written. If write_it is true, actually write the timer. */ -STATIC_OVL int +static int maybe_write_timer(nhfp, range, write_it) NHFILE *nhfp; int range; diff --git a/src/topten.c b/src/topten.c index 43b449423..22347595d 100644 --- a/src/topten.c +++ b/src/topten.c @@ -57,26 +57,26 @@ struct toptenentry { room for separating space or trailing newline plus string terminator */ #define SCANBUFSZ (4 * (ROLESZ + 1) + (NAMSZ + 1) + (DTHSZ + 1) + 1) -STATIC_DCL void FDECL(topten_print, (const char *)); -STATIC_DCL void FDECL(topten_print_bold, (const char *)); -STATIC_DCL void NDECL(outheader); -STATIC_DCL void FDECL(outentry, (int, struct toptenentry *, BOOLEAN_P)); -STATIC_DCL void FDECL(discardexcess, (FILE *)); -STATIC_DCL void FDECL(readentry, (FILE *, struct toptenentry *)); -STATIC_DCL void FDECL(writeentry, (FILE *, struct toptenentry *)); +static void FDECL(topten_print, (const char *)); +static void FDECL(topten_print_bold, (const char *)); +static void NDECL(outheader); +static void FDECL(outentry, (int, struct toptenentry *, BOOLEAN_P)); +static void FDECL(discardexcess, (FILE *)); +static void FDECL(readentry, (FILE *, struct toptenentry *)); +static void FDECL(writeentry, (FILE *, struct toptenentry *)); #ifdef XLOGFILE -STATIC_DCL void FDECL(writexlentry, (FILE *, struct toptenentry *, int)); -STATIC_DCL long NDECL(encodexlogflags); -STATIC_DCL long NDECL(encodeconduct); -STATIC_DCL long NDECL(encodeachieve); +static void FDECL(writexlentry, (FILE *, struct toptenentry *, int)); +static long NDECL(encodexlogflags); +static long NDECL(encodeconduct); +static long NDECL(encodeachieve); #endif -STATIC_DCL void FDECL(free_ttlist, (struct toptenentry *)); -STATIC_DCL int FDECL(classmon, (char *, BOOLEAN_P)); -STATIC_DCL int FDECL(score_wanted, (BOOLEAN_P, int, struct toptenentry *, int, +static void FDECL(free_ttlist, (struct toptenentry *)); +static int FDECL(classmon, (char *, BOOLEAN_P)); +static int FDECL(score_wanted, (BOOLEAN_P, int, struct toptenentry *, int, const char **, int)); #ifdef NO_SCAN_BRACK -STATIC_DCL void FDECL(nsb_mung_line, (char *)); -STATIC_DCL void FDECL(nsb_unmung_line, (char *)); +static void FDECL(nsb_mung_line, (char *)); +static void FDECL(nsb_unmung_line, (char *)); #endif /* "killed by",&c ["an"] 'g.killer.name' */ @@ -152,7 +152,7 @@ boolean incl_helpless; } } -STATIC_OVL void +static void topten_print(x) const char *x; { @@ -162,7 +162,7 @@ const char *x; putstr(g.toptenwin, ATR_NONE, x); } -STATIC_OVL void +static void topten_print_bold(x) const char *x; { @@ -198,7 +198,7 @@ d_level *lev; } /* throw away characters until current record has been entirely consumed */ -STATIC_OVL void +static void discardexcess(rfile) FILE *rfile; { @@ -209,7 +209,7 @@ FILE *rfile; } while (c != '\n' && c != EOF); } -STATIC_OVL void +static void readentry(rfile, tt) FILE *rfile; struct toptenentry *tt; @@ -292,7 +292,7 @@ struct toptenentry *tt; } } -STATIC_OVL void +static void writeentry(rfile, tt) FILE *rfile; struct toptenentry *tt; @@ -331,7 +331,7 @@ struct toptenentry *tt; #ifdef XLOGFILE /* as tab is never used in eg. g.plname or death, no need to mangle those. */ -STATIC_OVL void +static void writexlentry(rfile, tt, how) FILE *rfile; struct toptenentry *tt; @@ -375,7 +375,7 @@ int how; #undef XLOG_SEP } -STATIC_OVL long +static long encodexlogflags() { long e = 0L; @@ -390,7 +390,7 @@ encodexlogflags() return e; } -STATIC_OVL long +static long encodeconduct() { long e = 0L; @@ -423,7 +423,7 @@ encodeconduct() return e; } -STATIC_OVL long +static long encodeachieve() { long r = 0L; @@ -462,7 +462,7 @@ encodeachieve() #endif /* XLOGFILE */ -STATIC_OVL void +static void free_ttlist(tt) struct toptenentry *tt; { @@ -774,7 +774,7 @@ destroywin: } } -STATIC_OVL void +static void outheader() { char linebuf[BUFSZ]; @@ -789,7 +789,7 @@ outheader() } /* so>0: standout line; so=0: ordinary line */ -STATIC_OVL void +static void outentry(rank, t1, so) struct toptenentry *t1; int rank; @@ -952,7 +952,7 @@ boolean so; topten_print(linebuf); } -STATIC_OVL int +static int score_wanted(current_ver, rank, t1, playerct, players, uid) boolean current_ver; int rank; @@ -1144,7 +1144,7 @@ char **argv; #endif } -STATIC_OVL int +static int classmon(plch, fem) char *plch; boolean fem; @@ -1236,7 +1236,7 @@ struct obj *otmp; /* Lattice scanf isn't up to reading the scorefile. What */ /* follows deals with that; I admit it's ugly. (KL) */ /* Now generally available (KL) */ -STATIC_OVL void +static void nsb_mung_line(p) char *p; { @@ -1244,7 +1244,7 @@ char *p; *p = '|'; } -STATIC_OVL void +static void nsb_unmung_line(p) char *p; { diff --git a/src/track.c b/src/track.c index 67b46467c..8ac35c51a 100644 --- a/src/track.c +++ b/src/track.c @@ -8,8 +8,8 @@ #define UTSZ 50 -STATIC_VAR NEARDATA int utcnt, utpnt; -STATIC_VAR NEARDATA coord utrack[UTSZ]; +static NEARDATA int utcnt, utpnt; +static NEARDATA coord utrack[UTSZ]; void initrack() diff --git a/src/trap.c b/src/trap.c index 6ad7667cb..ec75cf7a9 100644 --- a/src/trap.c +++ b/src/trap.c @@ -7,43 +7,43 @@ extern const char *const destroy_strings[][3]; /* from zap.c */ -STATIC_DCL boolean FDECL(keep_saddle_with_steedcorpse, (unsigned, struct obj *, +static boolean FDECL(keep_saddle_with_steedcorpse, (unsigned, struct obj *, struct obj *)); -STATIC_DCL struct obj *FDECL(t_missile, (int, struct trap *)); -STATIC_DCL char *FDECL(trapnote, (struct trap *, BOOLEAN_P)); -STATIC_DCL int FDECL(steedintrap, (struct trap *, struct obj *)); -STATIC_DCL void FDECL(launch_drop_spot, (struct obj *, XCHAR_P, XCHAR_P)); -STATIC_DCL int FDECL(mkroll_launch, (struct trap *, XCHAR_P, XCHAR_P, +static struct obj *FDECL(t_missile, (int, struct trap *)); +static char *FDECL(trapnote, (struct trap *, BOOLEAN_P)); +static int FDECL(steedintrap, (struct trap *, struct obj *)); +static void FDECL(launch_drop_spot, (struct obj *, XCHAR_P, XCHAR_P)); +static int FDECL(mkroll_launch, (struct trap *, XCHAR_P, XCHAR_P, SHORT_P, long)); -STATIC_DCL boolean FDECL(isclearpath, (coord *, int, SCHAR_P, SCHAR_P)); -STATIC_DCL void FDECL(dofiretrap, (struct obj *)); -STATIC_DCL void NDECL(domagictrap); -STATIC_DCL boolean FDECL(emergency_disrobe, (boolean *)); -STATIC_DCL int FDECL(untrap_prob, (struct trap *)); -STATIC_DCL void FDECL(move_into_trap, (struct trap *)); -STATIC_DCL int FDECL(try_disarm, (struct trap *, BOOLEAN_P)); -STATIC_DCL void FDECL(reward_untrap, (struct trap *, struct monst *)); -STATIC_DCL int FDECL(disarm_holdingtrap, (struct trap *)); -STATIC_DCL int FDECL(disarm_landmine, (struct trap *)); -STATIC_DCL int FDECL(disarm_squeaky_board, (struct trap *)); -STATIC_DCL int FDECL(disarm_shooting_trap, (struct trap *, int)); -STATIC_DCL void FDECL(clear_conjoined_pits, (struct trap *)); -STATIC_DCL boolean FDECL(adj_nonconjoined_pit, (struct trap *)); -STATIC_DCL int FDECL(try_lift, (struct monst *, struct trap *, int, +static boolean FDECL(isclearpath, (coord *, int, SCHAR_P, SCHAR_P)); +static void FDECL(dofiretrap, (struct obj *)); +static void NDECL(domagictrap); +static boolean FDECL(emergency_disrobe, (boolean *)); +static int FDECL(untrap_prob, (struct trap *)); +static void FDECL(move_into_trap, (struct trap *)); +static int FDECL(try_disarm, (struct trap *, BOOLEAN_P)); +static void FDECL(reward_untrap, (struct trap *, struct monst *)); +static int FDECL(disarm_holdingtrap, (struct trap *)); +static int FDECL(disarm_landmine, (struct trap *)); +static int FDECL(disarm_squeaky_board, (struct trap *)); +static int FDECL(disarm_shooting_trap, (struct trap *, int)); +static void FDECL(clear_conjoined_pits, (struct trap *)); +static boolean FDECL(adj_nonconjoined_pit, (struct trap *)); +static int FDECL(try_lift, (struct monst *, struct trap *, int, BOOLEAN_P)); -STATIC_DCL int FDECL(help_monster_out, (struct monst *, struct trap *)); +static int FDECL(help_monster_out, (struct monst *, struct trap *)); #if 0 -STATIC_DCL void FDECL(join_adjacent_pits, (struct trap *)); +static void FDECL(join_adjacent_pits, (struct trap *)); #endif -STATIC_DCL boolean FDECL(thitm, (int, struct monst *, struct obj *, int, +static boolean FDECL(thitm, (int, struct monst *, struct obj *, int, BOOLEAN_P)); -STATIC_DCL void NDECL(maybe_finish_sokoban); +static void NDECL(maybe_finish_sokoban); -STATIC_VAR const char *const a_your[2] = { "a", "your" }; -STATIC_VAR const char *const A_Your[2] = { "A", "Your" }; -STATIC_VAR const char tower_of_flame[] = "tower of flame"; -STATIC_VAR const char *const A_gush_of_water_hits = "A gush of water hits"; -STATIC_VAR const char *const blindgas[6] = { "humid", "odorless", +static const char *const a_your[2] = { "a", "your" }; +static const char *const A_Your[2] = { "A", "Your" }; +static const char tower_of_flame[] = "tower of flame"; +static const char *const A_gush_of_water_hits = "A gush of water hits"; +static const char *const blindgas[6] = { "humid", "odorless", "pungent", "chilling", "acrid", "biting" }; @@ -762,7 +762,7 @@ boolean shatter; return mtmp; } -STATIC_OVL boolean +static boolean keep_saddle_with_steedcorpse(steed_mid, objchn, saddle) unsigned steed_mid; struct obj *objchn, *saddle; @@ -838,7 +838,7 @@ struct trap *trap; } /* make a single arrow/dart/rock for a trap to shoot or drop */ -STATIC_OVL struct obj * +static struct obj * t_missile(otyp, trap) int otyp; struct trap *trap; @@ -1549,7 +1549,7 @@ unsigned trflags; } } -STATIC_OVL char * +static char * trapnote(trap, noprefix) struct trap *trap; boolean noprefix; @@ -1569,7 +1569,7 @@ boolean noprefix; return tnbuf; } -STATIC_OVL int +static int steedintrap(trap, otmp) struct trap *trap; struct obj *otmp; @@ -1681,7 +1681,7 @@ struct trap *trap; } } -STATIC_OVL void +static void launch_drop_spot(obj, x, y) struct obj *obj; xchar x, y; @@ -2008,7 +2008,7 @@ struct trap *trap; newsym(trap->tx, trap->ty); } -STATIC_OVL int +static int mkroll_launch(ttmp, x, y, otyp, ocount) struct trap *ttmp; xchar x, y; @@ -2078,7 +2078,7 @@ long ocount; return 1; } -STATIC_OVL boolean +static boolean isclearpath(cc, distance, dx, dy) coord *cc; int distance; @@ -3090,7 +3090,7 @@ climb_pit() } } -STATIC_OVL void +static void dofiretrap(box) struct obj *box; /* null for floor trap */ { @@ -3160,7 +3160,7 @@ struct obj *box; /* null for floor trap */ melt_ice(u.ux, u.uy, (char *) 0); } -STATIC_OVL void +static void domagictrap() { register int fate = rnd(20); @@ -3654,7 +3654,7 @@ boolean here; * Returns TRUE if disrobing made player unencumbered enough to * crawl out of the current predicament. */ -STATIC_OVL boolean +static boolean emergency_disrobe(lostsome) boolean *lostsome; { @@ -3902,7 +3902,7 @@ dountrap() } /* Probability of disabling a trap. Helge Hafting */ -STATIC_OVL int +static int untrap_prob(ttmp) struct trap *ttmp; { @@ -3964,7 +3964,7 @@ boolean bury_it; } /* while attempting to disarm an adjacent trap, we've fallen into it */ -STATIC_OVL void +static void move_into_trap(ttmp) struct trap *ttmp; { @@ -4006,7 +4006,7 @@ struct trap *ttmp; * 1: tries and fails * 2: succeeds */ -STATIC_OVL int +static int try_disarm(ttmp, force_failure) struct trap *ttmp; boolean force_failure; @@ -4091,7 +4091,7 @@ boolean force_failure; return 2; } -STATIC_OVL void +static void reward_untrap(ttmp, mtmp) struct trap *ttmp; struct monst *mtmp; @@ -4113,7 +4113,7 @@ struct monst *mtmp; } } -STATIC_OVL int +static int disarm_holdingtrap(ttmp) /* Helge Hafting */ struct trap *ttmp; { @@ -4146,7 +4146,7 @@ struct trap *ttmp; return 1; } -STATIC_OVL int +static int disarm_landmine(ttmp) /* Helge Hafting */ struct trap *ttmp; { @@ -4164,7 +4164,7 @@ static NEARDATA const char oil[] = { ALL_CLASSES, TOOL_CLASS, POTION_CLASS, 0 }; /* it may not make much sense to use grease on floor boards, but so what? */ -STATIC_OVL int +static int disarm_squeaky_board(ttmp) struct trap *ttmp; { @@ -4199,7 +4199,7 @@ struct trap *ttmp; } /* removes traps that shoot arrows, darts, etc. */ -STATIC_OVL int +static int disarm_shooting_trap(ttmp, otyp) struct trap *ttmp; int otyp; @@ -4215,7 +4215,7 @@ int otyp; /* Is the weight too heavy? * Formula as in near_capacity() & check_capacity() */ -STATIC_OVL int +static int try_lift(mtmp, ttmp, wt, stuff) struct monst *mtmp; struct trap *ttmp; @@ -4240,7 +4240,7 @@ boolean stuff; } /* Help trapped monster (out of a (spiked) pit) */ -STATIC_OVL int +static int help_monster_out(mtmp, ttmp) struct monst *mtmp; struct trap *ttmp; @@ -5003,7 +5003,7 @@ boolean u_entering_trap2; return FALSE; } -STATIC_OVL void +static void clear_conjoined_pits(trap) struct trap *trap; { @@ -5027,7 +5027,7 @@ struct trap *trap; } } -STATIC_OVL boolean +static boolean adj_nonconjoined_pit(adjtrap) struct trap *adjtrap; { @@ -5050,7 +5050,7 @@ struct trap *adjtrap; * Mark all neighboring pits as conjoined pits. * (currently not called from anywhere) */ -STATIC_OVL void +static void join_adjacent_pits(trap) struct trap *trap; { @@ -5134,7 +5134,7 @@ int bodypart; /* Monster is hit by trap. */ /* Note: doesn't work if both obj and d_override are null */ -STATIC_OVL boolean +static boolean thitm(tlev, mon, obj, d_override, nocorpse) int tlev; struct monst *mon; @@ -5390,7 +5390,7 @@ sokoban_guilt() } /* called when a trap has been deleted or had its ttyp replaced */ -STATIC_OVL void +static void maybe_finish_sokoban() { struct trap *t; diff --git a/src/u_init.c b/src/u_init.c index 4f0e80b1c..5ecbf7562 100644 --- a/src/u_init.c +++ b/src/u_init.c @@ -13,10 +13,10 @@ struct trobj { Bitfield(trbless, 2); }; -STATIC_DCL void FDECL(ini_inv, (struct trobj *)); -STATIC_DCL void FDECL(knows_object, (int)); -STATIC_DCL void FDECL(knows_class, (CHAR_P)); -STATIC_DCL boolean FDECL(restricted_spell_discipline, (int)); +static void FDECL(ini_inv, (struct trobj *)); +static void FDECL(knows_object, (int)); +static void FDECL(knows_class, (CHAR_P)); +static boolean FDECL(restricted_spell_discipline, (int)); #define UNDEF_TYP 0 #define UNDEF_SPE '\177' @@ -557,7 +557,7 @@ static const struct def_skill Skill_W[] = { { P_NONE, 0 } }; -STATIC_OVL void +static void knows_object(obj) register int obj; { @@ -568,7 +568,7 @@ register int obj; /* Know ordinary (non-magical) objects of a certain class, * like all gems except the loadstone and luckstone. */ -STATIC_OVL void +static void knows_class(sym) register char sym; { @@ -907,7 +907,7 @@ u_init() } /* skills aren't initialized, so we use the role-specific skill lists */ -STATIC_OVL boolean +static boolean restricted_spell_discipline(otyp) int otyp; { @@ -967,7 +967,7 @@ int otyp; return TRUE; } -STATIC_OVL void +static void ini_inv(trop) register struct trobj *trop; { diff --git a/src/uhitm.c b/src/uhitm.c index 0cf89951b..6c536b61f 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -5,24 +5,24 @@ #include "hack.h" -STATIC_DCL boolean FDECL(known_hitum, (struct monst *, struct obj *, int *, +static boolean FDECL(known_hitum, (struct monst *, struct obj *, int *, int, int, struct attack *, int)); -STATIC_DCL boolean FDECL(theft_petrifies, (struct obj *)); -STATIC_DCL void FDECL(steal_it, (struct monst *, struct attack *)); -STATIC_DCL boolean FDECL(hitum_cleave, (struct monst *, struct attack *)); -STATIC_DCL boolean FDECL(hitum, (struct monst *, struct attack *)); -STATIC_DCL boolean FDECL(hmon_hitmon, (struct monst *, struct obj *, int, +static boolean FDECL(theft_petrifies, (struct obj *)); +static void FDECL(steal_it, (struct monst *, struct attack *)); +static boolean FDECL(hitum_cleave, (struct monst *, struct attack *)); +static boolean FDECL(hitum, (struct monst *, struct attack *)); +static boolean FDECL(hmon_hitmon, (struct monst *, struct obj *, int, int)); -STATIC_DCL int FDECL(joust, (struct monst *, struct obj *)); -STATIC_DCL void NDECL(demonpet); -STATIC_DCL boolean FDECL(m_slips_free, (struct monst *, struct attack *)); -STATIC_DCL int FDECL(explum, (struct monst *, struct attack *)); -STATIC_DCL void FDECL(start_engulf, (struct monst *)); -STATIC_DCL void NDECL(end_engulf); -STATIC_DCL int FDECL(gulpum, (struct monst *, struct attack *)); -STATIC_DCL boolean FDECL(hmonas, (struct monst *)); -STATIC_DCL void FDECL(nohandglow, (struct monst *)); -STATIC_DCL boolean FDECL(shade_aware, (struct obj *)); +static int FDECL(joust, (struct monst *, struct obj *)); +static void NDECL(demonpet); +static boolean FDECL(m_slips_free, (struct monst *, struct attack *)); +static int FDECL(explum, (struct monst *, struct attack *)); +static void FDECL(start_engulf, (struct monst *)); +static void NDECL(end_engulf); +static int FDECL(gulpum, (struct monst *, struct attack *)); +static boolean FDECL(hmonas, (struct monst *)); +static void FDECL(nohandglow, (struct monst *)); +static boolean FDECL(shade_aware, (struct obj *)); #define PROJECTILE(obj) ((obj) && is_ammo(obj)) @@ -453,7 +453,7 @@ register struct monst *mtmp; } /* really hit target monster; returns TRUE if it still lives */ -STATIC_OVL boolean +static boolean known_hitum(mon, weapon, mhit, rollneeded, armorpenalty, uattk, dieroll) register struct monst *mon; struct obj *weapon; @@ -513,7 +513,7 @@ int dieroll; /* hit the monster next to you and the monsters to the left and right of it; return False if the primary target is killed, True otherwise */ -STATIC_OVL boolean +static boolean hitum_cleave(target, uattk) struct monst *target; /* non-Null; forcefight at nothing doesn't cleave... */ struct attack *uattk; /* ... but we don't enforce that here; Null works ok */ @@ -594,7 +594,7 @@ struct attack *uattk; /* ... but we don't enforce that here; Null works ok */ } /* hit target monster; returns TRUE if it still lives */ -STATIC_OVL boolean +static boolean hitum(mon, uattk) struct monst *mon; struct attack *uattk; @@ -660,7 +660,7 @@ int dieroll; } /* guts of hmon() */ -STATIC_OVL boolean +static boolean hmon_hitmon(mon, obj, thrown, dieroll) struct monst *mon; struct obj *obj; @@ -1339,7 +1339,7 @@ int dieroll; return destroyed ? FALSE : TRUE; } -STATIC_OVL boolean +static boolean shade_aware(obj) struct obj *obj; { @@ -1364,7 +1364,7 @@ struct obj *obj; /* check whether slippery clothing protects from hug or wrap attack */ /* [currently assumes that you are the attacker] */ -STATIC_OVL boolean +static boolean m_slips_free(mdef, mattk) struct monst *mdef; struct attack *mattk; @@ -1408,7 +1408,7 @@ struct attack *mattk; /* used when hitting a monster with a lance while mounted; 1: joust hit; 0: ordinary hit; -1: joust but break lance */ -STATIC_OVL int +static int joust(mon, obj) struct monst *mon; /* target */ struct obj *obj; /* weapon */ @@ -1446,7 +1446,7 @@ struct obj *obj; /* weapon */ * Complex." * Pulling it out makes it work. */ -STATIC_OVL void +static void demonpet() { int i; @@ -1461,7 +1461,7 @@ demonpet() exercise(A_WIS, TRUE); } -STATIC_OVL boolean +static boolean theft_petrifies(otmp) struct obj *otmp; { @@ -1488,7 +1488,7 @@ struct obj *otmp; * If the target is wearing body armor, take all of its possessions; * otherwise, take one object. [Is this really the behavior we want?] */ -STATIC_OVL void +static void steal_it(mdef, mattk) struct monst *mdef; struct attack *mattk; @@ -1998,7 +1998,7 @@ int specialdmg; /* blessed and/or silver bonus against various things */ return 1; } -STATIC_OVL int +static int explum(mdef, mattk) register struct monst *mdef; register struct attack *mattk; @@ -2051,7 +2051,7 @@ register struct attack *mattk; return 1; } -STATIC_OVL void +static void start_engulf(mdef) struct monst *mdef; { @@ -2065,7 +2065,7 @@ struct monst *mdef; delay_output(); } -STATIC_OVL void +static void end_engulf() { if (!Invisible) { @@ -2074,7 +2074,7 @@ end_engulf() } } -STATIC_OVL int +static int gulpum(mdef, mattk) register struct monst *mdef; register struct attack *mattk; @@ -2312,7 +2312,7 @@ boolean wouldhavehit; } /* attack monster as a monster; returns True if mon survives */ -STATIC_OVL boolean +static boolean hmonas(mon) register struct monst *mon; { @@ -3045,7 +3045,7 @@ struct monst *mtmp; map_invisible(mtmp->mx, mtmp->my); } -STATIC_OVL void +static void nohandglow(mon) struct monst *mon; { diff --git a/src/vault.c b/src/vault.c index 6362b9c34..485a322fb 100644 --- a/src/vault.c +++ b/src/vault.c @@ -5,16 +5,16 @@ #include "hack.h" -STATIC_DCL boolean FDECL(clear_fcorr, (struct monst *, BOOLEAN_P)); -STATIC_DCL void FDECL(blackout, (int, int)); -STATIC_DCL void FDECL(restfakecorr, (struct monst *)); -STATIC_DCL void FDECL(parkguard, (struct monst *)); -STATIC_DCL boolean FDECL(in_fcorridor, (struct monst *, int, int)); -STATIC_DCL boolean FDECL(find_guard_dest, (struct monst *, xchar *, xchar *)); -STATIC_DCL void FDECL(move_gold, (struct obj *, int)); -STATIC_DCL void FDECL(wallify_vault, (struct monst *)); -STATIC_DCL void FDECL(gd_mv_monaway, (struct monst *, int, int)); -STATIC_OVL void FDECL(gd_pick_corridor_gold, (struct monst *, int, int)); +static boolean FDECL(clear_fcorr, (struct monst *, BOOLEAN_P)); +static void FDECL(blackout, (int, int)); +static void FDECL(restfakecorr, (struct monst *)); +static void FDECL(parkguard, (struct monst *)); +static boolean FDECL(in_fcorridor, (struct monst *, int, int)); +static boolean FDECL(find_guard_dest, (struct monst *, xchar *, xchar *)); +static void FDECL(move_gold, (struct obj *, int)); +static void FDECL(wallify_vault, (struct monst *)); +static void FDECL(gd_mv_monaway, (struct monst *, int, int)); +static void FDECL(gd_pick_corridor_gold, (struct monst *, int, int)); void newegd(mtmp) @@ -42,7 +42,7 @@ struct monst *mtmp; /* try to remove the temporary corridor (from vault to rest of map) being maintained by guard 'grd'; if guard is still in it, removal will fail, to be tried again later */ -STATIC_OVL boolean +static boolean clear_fcorr(grd, forceshow) struct monst *grd; boolean forceshow; @@ -117,7 +117,7 @@ boolean forceshow; spots to unlit; if player used scroll/wand/spell of light while inside the corridor, we don't want the light to reappear if/when a new tunnel goes through the same area */ -STATIC_OVL void +static void blackout(x, y) int x, y; { @@ -139,7 +139,7 @@ int x, y; } } -STATIC_OVL void +static void restfakecorr(grd) struct monst *grd; { @@ -151,7 +151,7 @@ struct monst *grd; } /* move guard--dead to alive--to <0,0> until temporary corridor is removed */ -STATIC_OVL void +static void parkguard(grd) struct monst *grd; { @@ -189,7 +189,7 @@ struct monst *grd; return dispose; } -STATIC_OVL boolean +static boolean in_fcorridor(grd, x, y) struct monst *grd; int x, y; @@ -263,7 +263,7 @@ struct monst *grd; } } -STATIC_OVL boolean +static boolean find_guard_dest(guard, rx, ry) struct monst *guard; xchar *rx, *ry; @@ -550,7 +550,7 @@ invault() } } -STATIC_OVL void +static void move_gold(gold, vroom) struct obj *gold; int vroom; @@ -566,7 +566,7 @@ int vroom; newsym(nx, ny); } -STATIC_OVL void +static void wallify_vault(grd) struct monst *grd; { @@ -634,7 +634,7 @@ struct monst *grd; } } -STATIC_OVL void +static void gd_mv_monaway(grd, nx, ny) register struct monst *grd; int nx, ny; @@ -649,7 +649,7 @@ int nx, ny; /* have guard pick gold off the floor, possibly moving to the gold's position before message and back to his current spot after */ -STATIC_OVL void +static void gd_pick_corridor_gold(grd, goldx, goldy) struct monst *grd; int goldx, goldy; /* ox, gold->oy> */ diff --git a/src/version.c b/src/version.c index bd50cfb06..3eedd3ac9 100644 --- a/src/version.c +++ b/src/version.c @@ -26,7 +26,7 @@ const char *NetHack_git_sha = NETHACK_GIT_SHA; const char *NetHack_git_branch = NETHACK_GIT_BRANCH; #endif -STATIC_DCL void FDECL(insert_rtoption, (char *)); +static void FDECL(insert_rtoption, (char *)); /* fill buffer with short version (so caller can avoid including date.h) */ char * @@ -227,7 +227,7 @@ static struct rt_opt { * it depends which of several object files got linked into the * game image, so we insert those options here. */ -STATIC_OVL void +static void insert_rtoption(buf) char *buf; { diff --git a/src/vision.c b/src/vision.c index a62a978a2..fb3c589be 100644 --- a/src/vision.c +++ b/src/vision.c @@ -83,14 +83,14 @@ static char left_ptrs[ROWNO][COLNO]; /* LOS algorithm helpers */ static char right_ptrs[ROWNO][COLNO]; /* Forward declarations. */ -STATIC_DCL void FDECL(fill_point, (int, int)); -STATIC_DCL void FDECL(dig_point, (int, int)); -STATIC_DCL void NDECL(view_init); -STATIC_DCL void FDECL(view_from, (int, int, char **, char *, char *, int, +static void FDECL(fill_point, (int, int)); +static void FDECL(dig_point, (int, int)); +static void NDECL(view_init); +static void FDECL(view_from, (int, int, char **, char *, char *, int, void (*)(int, int, genericptr_t), genericptr_t)); -STATIC_DCL void FDECL(get_unused_cs, (char ***, char **, char **)); -STATIC_DCL void FDECL(rogue_vision, (char **, char *, char *)); +static void FDECL(get_unused_cs, (char ***, char **, char **)); +static void FDECL(rogue_vision, (char **, char *, char *)); /* Macro definitions that I can't find anywhere. */ #define sign(z) ((z) < 0 ? -1 : ((z) ? 1 : 0)) @@ -241,7 +241,7 @@ vision_reset() * Called from vision_recalc() and at least one light routine. Get pointers * to the unused vision work area. */ -STATIC_OVL void +static void get_unused_cs(rows, rmin, rmax) char ***rows; char **rmin, **rmax; @@ -283,7 +283,7 @@ char **rmin, **rmax; * We set the in_sight bit here as well to escape a bug that shows up * due to the one-sided lit wall hack. */ -STATIC_OVL void +static void rogue_vision(next, rmin, rmax) char **next; /* could_see array pointers */ char *rmin, *rmax; @@ -342,7 +342,7 @@ char *rmin, *rmax; #ifdef EXTEND_SPINE -STATIC_DCL int FDECL(new_angle, (struct rm *, unsigned char *, int, int)); +static int FDECL(new_angle, (struct rm *, unsigned char *, int, int)); /* * new_angle() * @@ -385,7 +385,7 @@ STATIC_DCL int FDECL(new_angle, (struct rm *, unsigned char *, int, int)); * many exceptions. I may have to bite the bullet and do more * checks. - Dean 2/11/93 */ -STATIC_OVL int +static int new_angle(lev, sv, row, col) struct rm *lev; unsigned char *sv; @@ -912,7 +912,7 @@ int x, y; * This means that a right-edge (a blocked spot that has an open * spot on its right) will point to itself. */ -STATIC_OVL void +static void dig_point(row, col) int row, col; { @@ -997,7 +997,7 @@ int row, col; } } -STATIC_OVL void +static void fill_point(row, col) int row, col; { @@ -1342,10 +1342,10 @@ static genericptr_t varg; #else /* !MACRO_CPATH -- quadrants are really functions */ -STATIC_DCL int FDECL(_q1_path, (int, int, int, int)); -STATIC_DCL int FDECL(_q2_path, (int, int, int, int)); -STATIC_DCL int FDECL(_q3_path, (int, int, int, int)); -STATIC_DCL int FDECL(_q4_path, (int, int, int, int)); +static int FDECL(_q1_path, (int, int, int, int)); +static int FDECL(_q2_path, (int, int, int, int)); +static int FDECL(_q3_path, (int, int, int, int)); +static int FDECL(_q4_path, (int, int, int, int)); #define q1_path(sy, sx, y, x, dummy) result = _q1_path(sy, sx, y, x) #define q2_path(sy, sx, y, x, dummy) result = _q2_path(sy, sx, y, x) @@ -1355,7 +1355,7 @@ STATIC_DCL int FDECL(_q4_path, (int, int, int, int)); /* * Quadrant I (step < 0). */ -STATIC_OVL int +static int _q1_path(srow, scol, y2, x2) int scol, srow, y2, x2; { @@ -1403,7 +1403,7 @@ int scol, srow, y2, x2; /* * Quadrant IV (step > 0). */ -STATIC_OVL int +static int _q4_path(srow, scol, y2, x2) int scol, srow, y2, x2; { @@ -1451,7 +1451,7 @@ int scol, srow, y2, x2; /* * Quadrant II (step < 0). */ -STATIC_OVL int +static int _q2_path(srow, scol, y2, x2) int scol, srow, y2, x2; { @@ -1499,7 +1499,7 @@ int scol, srow, y2, x2; /* * Quadrant III (step > 0). */ -STATIC_OVL int +static int _q3_path(srow, scol, y2, x2) int scol, srow, y2, x2; { @@ -1601,18 +1601,18 @@ cleardone: static close2d *close_dy[CLOSE_MAX_BC_DY]; static far2d *far_dy[FAR_MAX_BC_DY]; -STATIC_DCL void FDECL(right_side, (int, int, int, int, int, +static void FDECL(right_side, (int, int, int, int, int, int, int, const char *)); -STATIC_DCL void FDECL(left_side, (int, int, int, int, int, int, int, +static void FDECL(left_side, (int, int, int, int, int, int, int, const char *)); -STATIC_DCL int FDECL(close_shadow, (int, int, int, int)); -STATIC_DCL int FDECL(far_shadow, (int, int, int, int)); +static int FDECL(close_shadow, (int, int, int, int)); +static int FDECL(far_shadow, (int, int, int, int)); /* * Initialize algorithm D's table pointers. If we don't have these, * then we do 3D table lookups. Verrrry slow. */ -STATIC_OVL void +static void view_init() { int i; @@ -1631,7 +1631,7 @@ view_init() */ #define OFF_TABLE 0xff -STATIC_OVL int +static int close_shadow(side, this_row, block_row, block_col) int side, this_row, block_row, block_col; { @@ -1664,7 +1664,7 @@ int side, this_row, block_row, block_col; return block_col - offset; } -STATIC_OVL int +static int far_shadow(side, this_row, block_row, block_col) int side, this_row, block_row, block_col; { @@ -1710,7 +1710,7 @@ int side, this_row, block_row, block_col; * * Figure out what could be seen on the right side of the source. */ -STATIC_OVL void +static void right_side(row, cb_row, cb_col, fb_row, fb_col, left, right_mark, limits) int row; /* current row */ int cb_row, cb_col; /* close block row and col */ @@ -1988,7 +1988,7 @@ char *limits; /* points at range limit for current row, or NULL */ * This routine is the mirror image of right_side(). Please see right_side() * for blow by blow comments. */ -STATIC_OVL void +static void left_side(row, cb_row, cb_col, fb_row, fb_col, left_mark, right, limits) int row; /* the current row */ int cb_row, cb_col; /* close block row and col */ @@ -2190,7 +2190,7 @@ const char *limits; * seen from the source location. Initialize and fill the left most * and right most boundaries of what could be seen. */ -STATIC_OVL void +static void view_from(srow, scol, loc_cs_rows, left_most, right_most, range, func, arg) int srow, scol; /* source row and column */ char **loc_cs_rows; /* could_see array (row pointers) */ @@ -2286,11 +2286,11 @@ genericptr_t arg; /* * Defines local to Algorithm C. */ -STATIC_DCL void FDECL(right_side, (int, int, int, const char *)); -STATIC_DCL void FDECL(left_side, (int, int, int, const char *)); +static void FDECL(right_side, (int, int, int, const char *)); +static void FDECL(left_side, (int, int, int, const char *)); /* Initialize algorithm C (nothing). */ -STATIC_OVL void +static void view_init() { } @@ -2299,7 +2299,7 @@ view_init() * Mark positions as visible on one quadrant of the right side. The * quadrant is determined by the value of the global variable step. */ -STATIC_OVL void +static void right_side(row, left, right_mark, limits) int row; /* current row */ int left; /* first (left side) visible spot on prev row */ @@ -2491,7 +2491,7 @@ const char *limits; /* points at range limit for current row, or NULL */ * This routine is the mirror image of right_side(). See right_side() for * extensive comments. */ -STATIC_OVL void +static void left_side(row, left_mark, right, limits) int row, left_mark, right; const char *limits; @@ -2627,7 +2627,7 @@ const char *limits; * (srow,scol). NOTE this is (y,x)! Mark the visible locations in the * array provided. */ -STATIC_OVL void +static void view_from(srow, scol, loc_cs_rows, left_most, right_most, range, func, arg) int srow, scol; /* starting row and column */ char **loc_cs_rows; /* pointers to the rows of the could_see array */ diff --git a/src/weapon.c b/src/weapon.c index 8a3b22fa5..d15ee550f 100644 --- a/src/weapon.c +++ b/src/weapon.c @@ -10,11 +10,11 @@ */ #include "hack.h" -STATIC_DCL void FDECL(give_may_advance_msg, (int)); -STATIC_DCL boolean FDECL(could_advance, (int)); -STATIC_DCL boolean FDECL(peaked_skill, (int)); -STATIC_DCL int FDECL(slots_required, (int)); -STATIC_DCL void FDECL(skill_advance, (int)); +static void FDECL(give_may_advance_msg, (int)); +static boolean FDECL(could_advance, (int)); +static boolean FDECL(peaked_skill, (int)); +static int FDECL(slots_required, (int)); +static void FDECL(skill_advance, (int)); /* Categories whose names don't come from OBJ_NAME(objects[type]) */ @@ -33,7 +33,7 @@ STATIC_DCL void FDECL(skill_advance, (int)); #define PN_ESCAPE_SPELL (-13) #define PN_MATTER_SPELL (-14) -STATIC_VAR NEARDATA const short skill_names_indices[P_NUM_SKILLS] = { +static NEARDATA const short skill_names_indices[P_NUM_SKILLS] = { 0, DAGGER, KNIFE, AXE, PICK_AXE, SHORT_SWORD, BROADSWORD, LONG_SWORD, TWO_HANDED_SWORD, SCIMITAR, PN_SABER, CLUB, MACE, MORNING_STAR, FLAIL, PN_HAMMER, QUARTERSTAFF, PN_POLEARMS, SPEAR, TRIDENT, LANCE, BOW, SLING, @@ -44,14 +44,14 @@ STATIC_VAR NEARDATA const short skill_names_indices[P_NUM_SKILLS] = { }; /* note: entry [0] isn't used */ -STATIC_VAR NEARDATA const char *const odd_skill_names[] = { +static NEARDATA const char *const odd_skill_names[] = { "no skill", "bare hands", /* use barehands_or_martial[] instead */ "two weapon combat", "riding", "polearms", "saber", "hammer", "whip", "attack spells", "healing spells", "divination spells", "enchantment spells", "clerical spells", "escape spells", "matter spells", }; /* indexed vis `is_martial() */ -STATIC_VAR NEARDATA const char *const barehands_or_martial[] = { +static NEARDATA const char *const barehands_or_martial[] = { "bare handed combat", "martial arts" }; @@ -65,7 +65,7 @@ STATIC_VAR NEARDATA const char *const barehands_or_martial[] = { static NEARDATA const char kebabable[] = { S_XORN, S_DRAGON, S_JABBERWOCK, S_NAGA, S_GIANT, '\0' }; -STATIC_OVL void +static void give_may_advance_msg(skill) int skill; { @@ -461,12 +461,12 @@ long silverhit; } } -STATIC_DCL struct obj *FDECL(oselect, (struct monst *, int)); +static struct obj *FDECL(oselect, (struct monst *, int)); #define Oselect(x) \ if ((otmp = oselect(mtmp, x)) != 0) \ return otmp; -STATIC_OVL struct obj * +static struct obj * oselect(mtmp, x) struct monst *mtmp; int x; @@ -1050,7 +1050,7 @@ int skill; } /* return the # of slots required to advance the skill */ -STATIC_OVL int +static int slots_required(skill) int skill; { @@ -1094,7 +1094,7 @@ boolean speedy; } /* return true if this skill could be advanced if more slots were available */ -STATIC_OVL boolean +static boolean could_advance(skill) int skill; { @@ -1109,7 +1109,7 @@ int skill; /* return true if this skill has reached its maximum and there's been enough practice to become eligible for the next step if that had been possible */ -STATIC_OVL boolean +static boolean peaked_skill(skill) int skill; { @@ -1121,7 +1121,7 @@ int skill; >= practice_needed_to_advance(P_SKILL(skill)))); } -STATIC_OVL void +static void skill_advance(skill) int skill; { diff --git a/src/wield.c b/src/wield.c index 784f71f14..1264987d1 100644 --- a/src/wield.c +++ b/src/wield.c @@ -52,8 +52,8 @@ * No item may be in more than one of these slots. */ -STATIC_DCL boolean FDECL(cant_wield_corpse, (struct obj *)); -STATIC_DCL int FDECL(ready_weapon, (struct obj *)); +static boolean FDECL(cant_wield_corpse, (struct obj *)); +static int FDECL(ready_weapon, (struct obj *)); /* used by will_weld() */ /* probably should be renamed */ @@ -114,7 +114,7 @@ register struct obj *obj; g.unweapon = TRUE; /* for "bare hands" message */ } -STATIC_OVL boolean +static boolean cant_wield_corpse(obj) struct obj *obj; { @@ -133,7 +133,7 @@ struct obj *obj; return TRUE; } -STATIC_OVL int +static int ready_weapon(wep) struct obj *wep; { diff --git a/src/windows.c b/src/windows.c index 92c235579..9d0ed7ceb 100644 --- a/src/windows.c +++ b/src/windows.c @@ -58,20 +58,20 @@ extern void FDECL(trace_procs_init, (int)); extern void *FDECL(trace_procs_chain, (int, int, void *, void *, void *)); #endif -STATIC_DCL void FDECL(def_raw_print, (const char *s)); -STATIC_DCL void NDECL(def_wait_synch); +static void FDECL(def_raw_print, (const char *s)); +static void NDECL(def_wait_synch); #ifdef DUMPLOG -STATIC_DCL winid FDECL(dump_create_nhwindow, (int)); -STATIC_DCL void FDECL(dump_clear_nhwindow, (winid)); -STATIC_DCL void FDECL(dump_display_nhwindow, (winid, BOOLEAN_P)); -STATIC_DCL void FDECL(dump_destroy_nhwindow, (winid)); -STATIC_DCL void FDECL(dump_start_menu, (winid)); -STATIC_DCL void FDECL(dump_add_menu, (winid, int, const ANY_P *, CHAR_P, +static winid FDECL(dump_create_nhwindow, (int)); +static void FDECL(dump_clear_nhwindow, (winid)); +static void FDECL(dump_display_nhwindow, (winid, BOOLEAN_P)); +static void FDECL(dump_destroy_nhwindow, (winid)); +static void FDECL(dump_start_menu, (winid)); +static void FDECL(dump_add_menu, (winid, int, const ANY_P *, CHAR_P, CHAR_P, int, const char *, BOOLEAN_P)); -STATIC_DCL void FDECL(dump_end_menu, (winid, const char *)); -STATIC_DCL int FDECL(dump_select_menu, (winid, int, MENU_ITEM_P **)); -STATIC_DCL void FDECL(dump_putstr, (winid, int, const char *)); +static void FDECL(dump_end_menu, (winid, const char *)); +static int FDECL(dump_select_menu, (winid, int, MENU_ITEM_P **)); +static void FDECL(dump_putstr, (winid, int, const char *)); #endif /* DUMPLOG */ #ifdef HANGUPHANDLING @@ -197,7 +197,7 @@ genl_can_suspend_yes(VOID_ARGS) return TRUE; } -STATIC_OVL +static void def_raw_print(s) const char *s; @@ -205,7 +205,7 @@ const char *s; puts(s); } -STATIC_OVL +static void def_wait_synch(VOID_ARGS) { @@ -1097,15 +1097,15 @@ unsigned long *colormasks UNUSED; putmixed(WIN_STATUS, 0, newbot2); /* putmixed() due to GOLD glyph */ } -STATIC_VAR struct window_procs dumplog_windowprocs_backup; -STATIC_VAR FILE *dumplog_file; +static struct window_procs dumplog_windowprocs_backup; +static FILE *dumplog_file; #ifdef DUMPLOG -STATIC_VAR time_t dumplog_now; +static time_t dumplog_now; -STATIC_DCL char *FDECL(dump_fmtstr, (const char *, char *)); +static char *FDECL(dump_fmtstr, (const char *, char *)); -STATIC_OVL char * +static char * dump_fmtstr(fmt, buf) const char *fmt; char *buf; @@ -1236,7 +1236,7 @@ int no_forward; } /*ARGSUSED*/ -STATIC_OVL void +static void dump_putstr(win, attr, str) winid win UNUSED; int attr UNUSED; @@ -1246,7 +1246,7 @@ const char *str; fprintf(dumplog_file, "%s\n", str); } -STATIC_OVL winid +static winid dump_create_nhwindow(dummy) int dummy; { @@ -1254,7 +1254,7 @@ int dummy; } /*ARGUSED*/ -STATIC_OVL void +static void dump_clear_nhwindow(win) winid win UNUSED; { @@ -1262,7 +1262,7 @@ winid win UNUSED; } /*ARGSUSED*/ -STATIC_OVL void +static void dump_display_nhwindow(win, p) winid win UNUSED; boolean p UNUSED; @@ -1271,7 +1271,7 @@ boolean p UNUSED; } /*ARGUSED*/ -STATIC_OVL void +static void dump_destroy_nhwindow(win) winid win UNUSED; { @@ -1279,7 +1279,7 @@ winid win UNUSED; } /*ARGUSED*/ -STATIC_OVL void +static void dump_start_menu(win) winid win UNUSED; { @@ -1287,7 +1287,7 @@ winid win UNUSED; } /*ARGSUSED*/ -STATIC_OVL void +static void dump_add_menu(win, glyph, identifier, ch, gch, attr, str, preselected) winid win UNUSED; int glyph; @@ -1307,7 +1307,7 @@ boolean preselected UNUSED; } /*ARGSUSED*/ -STATIC_OVL void +static void dump_end_menu(win, str) winid win UNUSED; const char *str; @@ -1320,7 +1320,7 @@ const char *str; } } -STATIC_OVL int +static int dump_select_menu(win, how, item) winid win UNUSED; int how UNUSED; diff --git a/src/wizard.c b/src/wizard.c index c03c3ed56..dbc61241e 100644 --- a/src/wizard.c +++ b/src/wizard.c @@ -11,13 +11,13 @@ #include "hack.h" #include "qtext.h" -STATIC_DCL short FDECL(which_arti, (int)); -STATIC_DCL boolean FDECL(mon_has_arti, (struct monst *, SHORT_P)); -STATIC_DCL struct monst *FDECL(other_mon_has_arti, (struct monst *, SHORT_P)); -STATIC_DCL struct obj *FDECL(on_ground, (SHORT_P)); -STATIC_DCL boolean FDECL(you_have, (int)); -STATIC_DCL unsigned long FDECL(target_on, (int, struct monst *)); -STATIC_DCL unsigned long FDECL(strategy, (struct monst *)); +static short FDECL(which_arti, (int)); +static boolean FDECL(mon_has_arti, (struct monst *, SHORT_P)); +static struct monst *FDECL(other_mon_has_arti, (struct monst *, SHORT_P)); +static struct obj *FDECL(on_ground, (SHORT_P)); +static boolean FDECL(you_have, (int)); +static unsigned long FDECL(target_on, (int, struct monst *)); +static unsigned long FDECL(strategy, (struct monst *)); /* adding more neutral creatures will tend to reduce the number of monsters summoned by nasty(); adding more lawful creatures will reduce the number @@ -140,7 +140,7 @@ register struct monst *mtmp; #define M_Wants(mask) (mtmp->data->mflags3 & (mask)) -STATIC_OVL short +static short which_arti(mask) register int mask; { @@ -164,7 +164,7 @@ register int mask; * since bell, book, candle, and amulet are all objects, not really * artifacts right now. [MRS] */ -STATIC_OVL boolean +static boolean mon_has_arti(mtmp, otyp) register struct monst *mtmp; register short otyp; @@ -181,7 +181,7 @@ register short otyp; return 0; } -STATIC_OVL struct monst * +static struct monst * other_mon_has_arti(mtmp, otyp) register struct monst *mtmp; register short otyp; @@ -197,7 +197,7 @@ register short otyp; return (struct monst *) 0; } -STATIC_OVL struct obj * +static struct obj * on_ground(otyp) register short otyp; { @@ -212,7 +212,7 @@ register short otyp; return (struct obj *) 0; } -STATIC_OVL boolean +static boolean you_have(mask) register int mask; { @@ -233,7 +233,7 @@ register int mask; return 0; } -STATIC_OVL unsigned long +static unsigned long target_on(mask, mtmp) register int mask; register struct monst *mtmp; @@ -261,7 +261,7 @@ register struct monst *mtmp; return (unsigned long) STRAT_NONE; } -STATIC_OVL unsigned long +static unsigned long strategy(mtmp) register struct monst *mtmp; { diff --git a/src/worm.c b/src/worm.c index 819999bed..53e7e1cf5 100644 --- a/src/worm.c +++ b/src/worm.c @@ -17,10 +17,10 @@ struct wseg { xchar wx, wy; /* the segment's position */ }; -STATIC_DCL void FDECL(toss_wsegs, (struct wseg *, BOOLEAN_P)); -STATIC_DCL void FDECL(shrink_worm, (int)); -STATIC_DCL void FDECL(random_dir, (XCHAR_P, XCHAR_P, xchar *, xchar *)); -STATIC_DCL struct wseg *FDECL(create_worm_tail, (int)); +static void FDECL(toss_wsegs, (struct wseg *, BOOLEAN_P)); +static void FDECL(shrink_worm, (int)); +static void FDECL(random_dir, (XCHAR_P, XCHAR_P, xchar *, xchar *)); +static struct wseg *FDECL(create_worm_tail, (int)); /* Description of long worm implementation. * @@ -139,7 +139,7 @@ int wseg_count; * Get rid of all worm segments on and following the given pointer curr. * The display may or may not need to be updated as we free the segments. */ -STATIC_OVL +static void toss_wsegs(curr, display_update) register struct wseg *curr; @@ -172,7 +172,7 @@ register boolean display_update; * * Remove the tail segment of the worm (the starting segment of the list). */ -STATIC_OVL +static void shrink_worm(wnum) int wnum; /* worm number */ @@ -728,7 +728,7 @@ xchar x, y; * This function, and the loop it serves, could be eliminated by coding * enexto() with a search radius. */ -STATIC_OVL +static void random_dir(x, y, nx, ny) xchar x, y; @@ -781,7 +781,7 @@ struct monst *mtmp; /* create_worm_tail() * will create a worm tail chain of (num_segs + 1) and return pointer to it. */ -STATIC_OVL +static struct wseg * create_worm_tail(num_segs) int num_segs; diff --git a/src/worn.c b/src/worn.c index 970c28687..b2ed54714 100644 --- a/src/worn.c +++ b/src/worn.c @@ -5,10 +5,10 @@ #include "hack.h" -STATIC_DCL void FDECL(m_lose_armor, (struct monst *, struct obj *)); -STATIC_DCL void FDECL(m_dowear_type, +static void FDECL(m_lose_armor, (struct monst *, struct obj *)); +static void FDECL(m_dowear_type, (struct monst *, long, BOOLEAN_P, BOOLEAN_P)); -STATIC_DCL int FDECL(extra_pref, (struct monst *, struct obj *)); +static int FDECL(extra_pref, (struct monst *, struct obj *)); const struct worn { long w_mask; @@ -505,7 +505,7 @@ boolean creation; m_dowear_type(mon, W_ARM, creation, RACE_EXCEPTION); } -STATIC_OVL void +static void m_dowear_type(mon, flag, creation, racialexception) struct monst *mon; long flag; @@ -685,7 +685,7 @@ long flag; } /* remove an item of armor and then drop it */ -STATIC_OVL void +static void m_lose_armor(mon, obj) struct monst *mon; struct obj *obj; @@ -987,7 +987,7 @@ boolean polyspot; } /* bias a monster's preferences towards armor that has special benefits. */ -STATIC_OVL int +static int extra_pref(mon, obj) struct monst *mon; struct obj *obj; diff --git a/src/write.c b/src/write.c index 2e2023eb8..be48b67b5 100644 --- a/src/write.c +++ b/src/write.c @@ -3,14 +3,14 @@ #include "hack.h" -STATIC_DCL int FDECL(cost, (struct obj *)); -STATIC_DCL boolean FDECL(label_known, (int, struct obj *)); -STATIC_DCL char *FDECL(new_book_description, (int, char *)); +static int FDECL(cost, (struct obj *)); +static boolean FDECL(label_known, (int, struct obj *)); +static char *FDECL(new_book_description, (int, char *)); /* * returns basecost of a scroll or a spellbook */ -STATIC_OVL int +static int cost(otmp) register struct obj *otmp; { @@ -61,7 +61,7 @@ register struct obj *otmp; unfortunately, we can't track things that haven't been added to the discoveries list and aren't present in current inventory, so some scrolls with ought to yield True will end up False */ -STATIC_OVL boolean +static boolean label_known(scrolltype, objlist) int scrolltype; struct obj *objlist; @@ -359,7 +359,7 @@ found: looks funny, so we want to insert "into " prior to such descriptions; even that's rather iffy, indicating that such descriptions probably ought to be eliminated (especially "cloth"!) */ -STATIC_OVL char * +static char * new_book_description(booktype, outbuf) int booktype; char *outbuf; diff --git a/src/zap.c b/src/zap.c index af386bde2..49fb7543b 100644 --- a/src/zap.c +++ b/src/zap.c @@ -12,20 +12,20 @@ */ #define MAGIC_COOKIE 1000 -STATIC_DCL void FDECL(polyuse, (struct obj *, int, int)); -STATIC_DCL void FDECL(create_polymon, (struct obj *, int)); -STATIC_DCL int FDECL(stone_to_flesh_obj, (struct obj *)); -STATIC_DCL boolean FDECL(zap_updown, (struct obj *)); -STATIC_DCL void FDECL(zhitu, (int, int, const char *, XCHAR_P, XCHAR_P)); -STATIC_DCL void FDECL(revive_egg, (struct obj *)); -STATIC_DCL boolean FDECL(zap_steed, (struct obj *)); -STATIC_DCL void FDECL(skiprange, (int, int *, int *)); -STATIC_DCL int FDECL(zap_hit, (int, int)); -STATIC_OVL void FDECL(disintegrate_mon, (struct monst *, int, const char *)); -STATIC_DCL void FDECL(backfire, (struct obj *)); -STATIC_DCL int FDECL(spell_hit_bonus, (int)); -STATIC_DCL void FDECL(destroy_one_item, (struct obj *, int, int)); -STATIC_DCL void FDECL(wishcmdassist, (int)); +static void FDECL(polyuse, (struct obj *, int, int)); +static void FDECL(create_polymon, (struct obj *, int)); +static int FDECL(stone_to_flesh_obj, (struct obj *)); +static boolean FDECL(zap_updown, (struct obj *)); +static void FDECL(zhitu, (int, int, const char *, XCHAR_P, XCHAR_P)); +static void FDECL(revive_egg, (struct obj *)); +static boolean FDECL(zap_steed, (struct obj *)); +static void FDECL(skiprange, (int, int *, int *)); +static int FDECL(zap_hit, (int, int)); +static void FDECL(disintegrate_mon, (struct monst *, int, const char *)); +static void FDECL(backfire, (struct obj *)); +static int FDECL(spell_hit_bonus, (int)); +static void FDECL(destroy_one_item, (struct obj *, int, int)); +static void FDECL(wishcmdassist, (int)); #define ZT_MAGIC_MISSILE (AD_MAGM - 1) #define ZT_FIRE (AD_FIRE - 1) @@ -46,7 +46,7 @@ STATIC_DCL void FDECL(wishcmdassist, (int)); #define M_IN_WATER(ptr) \ ((ptr)->mlet == S_EEL || amphibious(ptr) || is_swimmer(ptr)) -STATIC_VAR const char are_blinded_by_the_flash[] = +static const char are_blinded_by_the_flash[] = "are blinded by the flash!"; const char *const flash_types[] = /* also used in buzzmu(mcastu.c) */ @@ -935,7 +935,7 @@ boolean by_hero; return mtmp; } -STATIC_OVL void +static void revive_egg(obj) struct obj *obj; { @@ -1216,7 +1216,7 @@ struct obj *obj; * there's a random factor here to keep from always using the stuff * at the top of the pile. */ -STATIC_OVL void +static void polyuse(objhdr, mat, minwt) struct obj *objhdr; int mat, minwt; @@ -1259,7 +1259,7 @@ int mat, minwt; * Polymorph some of the stuff in this pile into a monster, preferably * a golem of the kind okind. */ -STATIC_OVL void +static void create_polymon(obj, okind) struct obj *obj; int okind; @@ -1680,7 +1680,7 @@ int id; } /* stone-to-flesh spell hits and maybe transforms or animates obj */ -STATIC_OVL int +static int stone_to_flesh_obj(obj) struct obj *obj; { @@ -2190,7 +2190,7 @@ register struct obj *obj; } } -STATIC_OVL void +static void backfire(otmp) struct obj *otmp; { @@ -2654,7 +2654,7 @@ long duration; * Return TRUE if the steed was hit by the wand. * Return FALSE if the steed was not hit by the wand. */ -STATIC_OVL boolean +static boolean zap_steed(obj) struct obj *obj; /* wand or spell */ { @@ -2798,7 +2798,7 @@ boolean youattack, allow_cancel_kill, self_cancel; } /* you've zapped an immediate type wand up or down */ -STATIC_OVL boolean +static boolean zap_updown(obj) struct obj *obj; /* wand or spell */ { @@ -3097,7 +3097,7 @@ int dmg; /* base amount to be adjusted by bonus or penalty */ * Generate the to hit bonus for a spell. Based on the hero's skill in * spell class and dexterity. */ -STATIC_OVL int +static int spell_hit_bonus(skill) int skill; { @@ -3172,7 +3172,7 @@ register struct monst *mtmp; : "it"); } -STATIC_OVL void +static void skiprange(range, skipstart, skipend) int range, *skipstart, *skipend; { @@ -3745,7 +3745,7 @@ struct obj **ootmp; /* to return worn armor for caller to disintegrate */ return tmp; } -STATIC_OVL void +static void zhitu(type, nd, fltxt, sx, sy) int type, nd; const char *fltxt; @@ -3944,7 +3944,7 @@ boolean u_caused; } /* will zap/spell/breath attack score a hit against armor class `ac'? */ -STATIC_OVL int +static int zap_hit(ac, type) int ac; int type; /* either hero cast spell type or 0 */ @@ -3962,7 +3962,7 @@ int type; /* either hero cast spell type or 0 */ return (3 - chance < ac + spell_bonus); } -STATIC_OVL void +static void disintegrate_mon(mon, type, fltxt) struct monst *mon; int type; /* hero vs other */ @@ -4787,7 +4787,7 @@ const char *const destroy_strings[][3] = { /* guts of destroy_item(), which ought to be called maybe_destroy_items(); caller must decide whether obj is eligible */ -STATIC_OVL void +static void destroy_one_item(obj, osym, dmgtyp) struct obj *obj; int osym, dmgtyp; @@ -5204,7 +5204,7 @@ int damage, tell; #define MAXWISHTRY 5 -STATIC_OVL void +static void wishcmdassist(triesleft) int triesleft; {