From ceee6aff31a1aad49e1d48eff4f15f0be5bd7a08 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 6 Mar 2025 07:20:16 -0500 Subject: [PATCH] pointer decl style consistency; use any_types enum --- include/botl.h | 4 ++-- src/decl.c | 2 +- src/mon.c | 2 +- src/mplayer.c | 2 +- src/music.c | 2 +- src/o_init.c | 2 +- src/read.c | 2 +- src/timeout.c | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/botl.h b/include/botl.h index 3ffd6be1a..87c82d25c 100644 --- a/include/botl.h +++ b/include/botl.h @@ -249,7 +249,7 @@ enum hlattribs { struct hilite_s { enum statusfields fld; boolean set; - unsigned anytype; + enum any_types anytype; anything value; int behavior; char textmatch[MAXVALWIDTH]; @@ -271,7 +271,7 @@ struct istat_s { boolean chg; /* need to recalc time? */ boolean percent_matters; short percent_value; - unsigned anytype; + enum any_types anytype; anything a, rawval; char *val; int valwidth; diff --git a/src/decl.c b/src/decl.c index e6c6f315e..617d62e86 100644 --- a/src/decl.c +++ b/src/decl.c @@ -230,7 +230,7 @@ static const struct instance_globals_a g_init_a = { static const struct instance_globals_b g_init_b = { /* botl.c */ - { { { NULL, NULL, 0L, FALSE, FALSE, 0, 0U, { 0 }, { 0 }, NULL, 0, 0, 0 + { { { NULL, NULL, 0L, FALSE, FALSE, 0, ANY_INVALID, { 0 }, { 0 }, NULL, 0, 0, 0 #ifdef STATUS_HILITES , UNDEFINED_PTR, UNDEFINED_PTR #endif diff --git a/src/mon.c b/src/mon.c index 33f2bedfa..b1ad1b3b2 100644 --- a/src/mon.c +++ b/src/mon.c @@ -1486,7 +1486,7 @@ meatmetal(struct monst *mtmp) /* monster eats a pile of objects */ int -meatobj(struct monst* mtmp) /* for gelatinous cubes */ +meatobj(struct monst *mtmp) /* for gelatinous cubes */ { struct obj *otmp, *otmp2; struct permonst *ptr, *original_ptr = mtmp->data; diff --git a/src/mplayer.c b/src/mplayer.c index 70b94b0f5..041a997ec 100644 --- a/src/mplayer.c +++ b/src/mplayer.c @@ -69,7 +69,7 @@ dev_name(void) } staticfn void -get_mplname(struct monst* mtmp, char *nam) +get_mplname(struct monst *mtmp, char *nam) { boolean fmlkind = is_female(mtmp->data); const char *devnam; diff --git a/src/music.c b/src/music.c index 374b848ab..ca8c64f31 100644 --- a/src/music.c +++ b/src/music.c @@ -159,7 +159,7 @@ calm_nymphs(int distance) /* Awake soldiers anywhere the level (and any nearby monster). */ void -awaken_soldiers(struct monst* bugler /* monster that played instrument */) +awaken_soldiers(struct monst *bugler /* monster that played instrument */) { struct monst *mtmp; int distance, distm; diff --git a/src/o_init.c b/src/o_init.c index aeff43030..1538c298d 100644 --- a/src/o_init.c +++ b/src/o_init.c @@ -347,7 +347,7 @@ shuffle_all(void) /* Return TRUE if the provided string matches the unidentified description of * the provided object. */ boolean -objdescr_is(struct obj* obj, const char * descr) +objdescr_is(struct obj *obj, const char *descr) { const char *objdescr; diff --git a/src/read.c b/src/read.c index 4344f319a..f4cc95ac6 100644 --- a/src/read.c +++ b/src/read.c @@ -2323,7 +2323,7 @@ drop_boulder_on_monster(coordxy x, coordxy y, boolean confused, boolean byu) /* overcharging any wand or zapping/engraving cursed wand */ void -wand_explode(struct obj* obj, int chg /* recharging */) +wand_explode(struct obj *obj, int chg /* recharging */) { const char *expl = !chg ? "suddenly" : "vibrates violently and"; int dmg, n, k; diff --git a/src/timeout.c b/src/timeout.c index 443a84cc7..58c575fd1 100644 --- a/src/timeout.c +++ b/src/timeout.c @@ -2726,7 +2726,7 @@ DISABLE_WARNING_FORMAT_NONLITERAL /* to support '#stats' wizard-mode command */ void -timer_stats(const char* hdrfmt, char *hdrbuf, long *count, long *size) +timer_stats(const char *hdrfmt, char *hdrbuf, long *count, long *size) { timer_element *te;