]> granicus.if.org Git - nethack/commitdiff
if prototype is declared static make function static to match
authornhmall <nhmall@nethack.org>
Sat, 13 Jul 2019 04:17:23 +0000 (00:17 -0400)
committernhmall <nhmall@nethack.org>
Sat, 13 Jul 2019 04:17:23 +0000 (00:17 -0400)
Today, a compiler was encountered that considered it an error
to have the prototype declared static and the function body
not

18 files changed:
src/allmain.c
src/apply.c
src/botl.c
src/cmd.c
src/display.c
src/hack.c
src/isaac64.c
src/makemon.c
src/mkmaze.c
src/mon.c
src/objnam.c
src/options.c
src/pager.c
src/pickup.c
src/questpgr.c
src/shk.c
util/makedefs.c
win/tty/wintty.c

index 1ce8cad08096190699ac956e7599e5f020fcd601..082447b3be5ba9a63565ce6fed9f05aacf2cdec0 100644 (file)
@@ -876,7 +876,7 @@ enum earlyarg e_arg;
  *                    optimization so that display output
  *                    can be debugged without buffering.
  */
-void
+STATIC_OVL void
 debug_fields(opts)
 const char *opts;
 {
index 879c6a3cb27a33e0bd3d3df907992461a5e051b1..5bc67850a11058c3998095297c476406ab2a1f7e 100644 (file)
@@ -1611,7 +1611,7 @@ int x,y;
             && is_valid_jump_pos(x, y, jumping_is_magic, FALSE));
 }
 
-void
+STATIC_OVL void
 display_jump_positions(state)
 int state;
 {
@@ -2870,7 +2870,7 @@ static const char
     cant_reach[] = "can't reach that spot from here.";
 
 /* find pos of monster in range, if only one monster */
-boolean
+STATIC_OVL boolean
 find_poleable_mon(pos, min_range, max_range)
 coord *pos;
 int min_range, max_range;
@@ -2926,7 +2926,7 @@ int x, y;
             && distu(x, y) <= polearm_range_max);
 }
 
-void
+STATIC_OVL void
 display_polearm_positions(state)
 int state;
 {
index 06f0a01b5a1dccc4172744ee51f3772fad509f3a..4a856a2118b69769fd465fcdb5537b9de2ee0094 100644 (file)
@@ -561,7 +561,7 @@ static long bl_hilite_moves = 0L;
 static unsigned long cond_hilites[BL_ATTCLR_MAX];
 static int now_or_before_idx = 0; /* 0..1 for array[2][] first index */
 
-void
+STATIC_OVL void
 bot_via_windowport()
 {
     char buf[BUFSZ];
@@ -2812,7 +2812,7 @@ status_hilite_linestr_gather()
 }
 
 
-char *
+STATIC_OVL char *
 status_hilite2str(hl)
 struct hilite_s *hl;
 {
index d577d8e912bb2cd11cf28f53a16f626043d23c7d..8fd6d5f684a43ca8d6c8bbc3970636214f1eded9 100644 (file)
--- a/src/cmd.c
+++ b/src/cmd.c
@@ -2576,7 +2576,7 @@ int final;
 }
 
 /* attributes: intrinsics and the like, other non-obvious capabilities */
-void
+STATIC_OVL void
 attributes_enlightenment(unused_mode, final)
 int unused_mode UNUSED;
 int final;
index 8f7207ad950ef8754d59405af833f4e182ed4f1d..70a008a0af59f08b733c6a328f632bd1c7f1ae59 100644 (file)
@@ -897,7 +897,7 @@ xchar x, y;
     }
 }
 
-int
+STATIC_OVL int
 tether_glyph(x, y)
 int x, y;
 {
index 74a13af98551d76550f8cddd8c1376040d72a602..95e5ea06c399cb240b90a6b69a4bba0574cbfc4a 100644 (file)
@@ -1343,7 +1343,7 @@ domove()
         domove_attempting = 0L;
 }
 
-void
+STATIC_OVL void
 domove_core()
 {
     register struct monst *mtmp;
@@ -1940,7 +1940,7 @@ domove_core()
     }
 }
 
-void
+STATIC_OVL void
 maybe_smudge_engr(x1,y1,x2,y2)
 int x1, y1, x2, y2;
 {
index 9ccb0db558fa392cee9bb5c974e1f7bcd66c38de..4d19335a310b12cc44b2f134efe4ff7b26f47f15 100644 (file)
@@ -19,7 +19,9 @@
 #define ISAAC64_MASK ((uint64_t)0xFFFFFFFFFFFFFFFFULL)
 
 #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
+#if !defined(HAS_INLINE)
 #define HAS_INLINE
+#endif
 #else
 # if (defined(__GNUC__) && __GNUC__ >= 2 && !defined(inline))
 # define inline __inline__
index 0f731c3539a4741097f9b9bc7b24af825fd40470..2350e77a0ccf6bbe39409633e00480bd67d434b2 100644 (file)
@@ -1033,7 +1033,7 @@ newmextra()
     return mextra;
 }
 
-boolean
+STATIC_OVL boolean
 makemon_rnd_goodpos(mon, gpflags, cc)
 struct monst *mon;
 unsigned gpflags;
index 2a11ba4eda18107002ff3adf1636080dce5d455b..a9d0c14611da9d4edfb2783bc387757091093542 100644 (file)
@@ -619,7 +619,7 @@ fixup_special()
     num_lregions = 0;
 }
 
-void
+STATIC_OVL void
 check_ransacked(s)
 char *s;
 {
@@ -630,7 +630,7 @@ char *s;
 #define ORC_LEADER 1
 static const char *orcfruit[] = { "paddle cactus", "dwarven root" };
 
-void
+STATIC_OVL void
 migrate_orc(mtmp, mflags)
 struct monst *mtmp;
 unsigned long mflags;
@@ -695,7 +695,7 @@ struct monst *mtmp;
             add_to_minv(mtmp, otmp);
     }
 }
-void
+STATIC_OVL void
 migr_booty_item(otyp, gang)
 int otyp;
 const char *gang;
@@ -716,7 +716,7 @@ const char *gang;
     }
 }
 
-void
+STATIC_OVL void
 stolen_booty(VOID_ARGS)
 {
     char *gang, gang_name[BUFSZ];
index 2a8a7f350d8b0383903c7fb7bf5f66223dff826a..862125289764f1e69dd6971f3eed1d4964e806ef 100644 (file)
--- a/src/mon.c
+++ b/src/mon.c
@@ -45,7 +45,7 @@ const char *warnings[] = {
 #endif /* 0 */
 
 
-void
+STATIC_OVL void
 sanity_check_single_mon(mtmp, chk_geno, msg)
 struct monst *mtmp;
 boolean chk_geno;
@@ -2735,7 +2735,7 @@ struct monst *mtmp;
     return;
 }
 
-void
+STATIC_OVL void
 deal_with_overcrowding(mtmp)
 struct monst *mtmp;
 {
index bb876dfd8ff792ebcecbad0543a384eba3af27c3..59b6397cdde5a2126a8a4cfe3788e230e1ad1981 100644 (file)
@@ -417,7 +417,7 @@ struct obj *obj;
     return xname_flags(obj, CXN_NORMAL);
 }
 
-char *
+STATIC_OVL char *
 xname_flags(obj, cxn_flags)
 register struct obj *obj;
 unsigned cxn_flags; /* bitmask of CXN_xxx values */
@@ -2576,7 +2576,7 @@ const char *oldstr;
     return bp;
 }
 
-boolean
+STATIC_OVL boolean
 badman(basestr, to_plural)
 const char *basestr;
 boolean to_plural;            /* true => makeplural, false => makesingular */
index 3155275eca5b92501794b0277888e98a2eb039d2..2f601df3319f9c3f167dcd6a70e12088bd55bae4 100644 (file)
@@ -1602,7 +1602,7 @@ int typ;
     return (char *) 0;
 }
 
-int
+STATIC_OVL int
 query_msgtype()
 {
     winid tmpwin;
@@ -1796,7 +1796,7 @@ const char *errmsg;
     return retval;
 }
 
-boolean
+STATIC_OVL boolean
 add_menu_coloring_parsed(str, c, a)
 char *str;
 int c, a;
index 02c61f966d542233c5d5e4d3fbc61c28e2cfeeb8..96abfef262c5370a6c9689be4b23087153164ba1 100644 (file)
@@ -1409,7 +1409,7 @@ static const char *suptext2[] = {
     (char *) 0,
 };
 
-void
+STATIC_OVL void
 do_supplemental_info(name, pm, without_asking)
 char *name;
 struct permonst *pm;
@@ -1885,61 +1885,61 @@ docontact(VOID_ARGS)
     destroy_nhwindow(cwin);
 }
 
-void
+STATIC_OVL void
 dispfile_help(VOID_ARGS)
 {
     display_file(HELP, TRUE);
 }
 
-void
+STATIC_OVL void
 dispfile_shelp(VOID_ARGS)
 {
     display_file(SHELP, TRUE);
 }
 
-void
+STATIC_OVL void
 dispfile_optionfile(VOID_ARGS)
 {
     display_file(OPTIONFILE, TRUE);
 }
 
-void
+STATIC_OVL void
 dispfile_license(VOID_ARGS)
 {
     display_file(LICENSE, TRUE);
 }
 
-void
+STATIC_OVL void
 dispfile_debughelp(VOID_ARGS)
 {
     display_file(DEBUGHELP, TRUE);
 }
 
-void
+STATIC_OVL void
 hmenu_doextversion(VOID_ARGS)
 {
     (void) doextversion();
 }
 
-void
+STATIC_OVL void
 hmenu_dohistory(VOID_ARGS)
 {
     (void) dohistory();
 }
 
-void
+STATIC_OVL void
 hmenu_dowhatis(VOID_ARGS)
 {
     (void) dowhatis();
 }
 
-void
+STATIC_OVL void
 hmenu_dowhatdoes(VOID_ARGS)
 {
     (void) dowhatdoes();
 }
 
-void
+STATIC_OVL void
 hmenu_doextlist(VOID_ARGS)
 {
     (void) doextlist();
index fe25f8a0f2452fe07faceb81a6b5c8ace60c874e..e47d989da9bd73037a74bd427e4d3e071d97026d 100644 (file)
@@ -1710,7 +1710,7 @@ int x, y;
     return FALSE;
 }
 
-int
+STATIC_OVL int
 do_loot_cont(cobjp, cindex, ccount)
 struct obj **cobjp;
 int cindex, ccount; /* index of this container (1..N), number of them (N) */
index 7d58fd89af1401ac21b149d375cdcaf16a9d8147..5c04c6cdf763451d22b659044373a722e8b4b40e 100644 (file)
@@ -578,7 +578,7 @@ int how;
         putmsghistory(out_line, FALSE);
 }
 
-boolean
+STATIC_OVL boolean
 skip_pager(common)
 boolean common;
 {
index 26e7b66a50c01db99575dc9bbc392c4032d8993f..fa29b1f31e9f9d03779b2ef8d10bb3af5ebcbf11 100644 (file)
--- a/src/shk.c
+++ b/src/shk.c
@@ -2725,7 +2725,7 @@ boolean ininv, dummy, silent;
     }
 }
 
-void
+STATIC_OVL void
 append_honorific(buf)
 char *buf;
 {
index 42108cc79e7672e23614cf9a6088db2092189cbe..073cbf95d5742889db8a45ab969c310fb0ffe9d1 100644 (file)
@@ -951,7 +951,7 @@ unsigned long old_rumor_offset;
     return rumor_offset;
 }
 
-void
+STATIC_OVL void
 do_rnd_access_file(fname)
 const char *fname;
 {
@@ -1416,7 +1416,7 @@ do_date()
     return;
 }
 
-boolean
+STATIC_OVL boolean
 get_gitinfo(githash, gitbranch)
 char *githash, *gitbranch;
 {
index 0422129fd85a85570115254c50d2dcaaaa98ff07..63861d62bc85a152e0c93a5f0380cfb1ef14c122 100644 (file)
@@ -4132,7 +4132,7 @@ boolean force_update;
  * must be updated because they need to change.
  * This is now done at an individual field case-by-case level.
  */
-boolean
+STATIC_OVL boolean
 check_fields(forcefields, sz)
 boolean forcefields;
 int sz[3];