some variables not referenced in another translation unit made static

Also adds some cross-refence comments for some variables that are
referenced in another translation unit.
This commit is contained in:
nhmall
2024-03-15 16:00:14 -04:00
parent 243f6410d2
commit 79648c6ce2
31 changed files with 94 additions and 71 deletions

View File

@@ -1109,6 +1109,7 @@ timet_delta(time_t etim, time_t stim) /* end and start times */
#if !defined(NODUMPENUMS) || defined(ENHANCED_SYMBOLS)
/* monsdump[] and objdump[] are also used in utf8map.c */
#define DUMP_ENUMS
struct enum_dump monsdump[] = {
#include "monsters.h"
@@ -1124,46 +1125,46 @@ struct enum_dump objdump[] = {
};
#define DUMP_ENUMS_PCHAR
struct enum_dump defsym_cmap_dump[] = {
static struct enum_dump defsym_cmap_dump[] = {
#include "defsym.h"
{ MAXPCHARS, "MAXPCHARS" },
};
#undef DUMP_ENUMS_PCHAR
#define DUMP_ENUMS_MONSYMS
struct enum_dump defsym_mon_syms_dump[] = {
static struct enum_dump defsym_mon_syms_dump[] = {
#include "defsym.h"
{ MAXMCLASSES, "MAXMCLASSES" },
};
#undef DUMP_ENUMS_MONSYMS
#define DUMP_ENUMS_MONSYMS_DEFCHAR
struct enum_dump defsym_mon_defchars_dump[] = {
static struct enum_dump defsym_mon_defchars_dump[] = {
#include "defsym.h"
};
#undef DUMP_ENUMS_MONSYMS_DEFCHAR
#define DUMP_ENUMS_OBJCLASS_DEFCHARS
struct enum_dump objclass_defchars_dump[] = {
static struct enum_dump objclass_defchars_dump[] = {
#include "defsym.h"
};
#undef DUMP_ENUMS_OBJCLASS_DEFCHARS
#define DUMP_ENUMS_OBJCLASS_CLASSES
struct enum_dump objclass_classes_dump[] = {
static struct enum_dump objclass_classes_dump[] = {
#include "defsym.h"
{ MAXOCLASSES, "MAXOCLASSES" },
};
#undef DUMP_ENUMS_OBJCLASS_CLASSES
#define DUMP_ENUMS_OBJCLASS_SYMS
struct enum_dump objclass_syms_dump[] = {
static struct enum_dump objclass_syms_dump[] = {
#include "defsym.h"
};
#undef DUMP_ENUMS_OBJCLASS_SYMS
#define DUMP_ARTI_ENUM
struct enum_dump arti_enum_dump[] = {
static struct enum_dump arti_enum_dump[] = {
#include "artilist.h"
{ AFTER_LAST_ARTIFACT, "AFTER_LAST_ARTIFACT" }
};

View File

@@ -14,7 +14,9 @@ static const char
*const minusattr[] = { "weak", "stupid",
"foolish", "clumsy",
"fragile", "repulsive" };
/* also used by enlightenment for non-abbreviated status info */
/* also used by enlightenment in insight.c for non-abbreviated status info */
extern const char *const attrname[6];
const char
*const attrname[] = { "strength", "intelligence", "wisdom",
"dexterity", "constitution", "charisma" };

View File

@@ -10,6 +10,7 @@
extern const char *const hu_stat[]; /* defined in eat.c */
/* also used in insight.c */
const char *const enc_stat[] = {
"", "Burdened", "Stressed",
"Strained", "Overtaxed", "Overloaded"
@@ -591,7 +592,7 @@ static struct istat_s initblstats[MAXBLSTATS] = {
#ifdef STATUS_HILITES
const struct condmap condition_aliases[] = {
static const struct condmap condition_aliases[] = {
{ "strangled", BL_MASK_STRNGL },
{ "all", BL_MASK_BAREH | BL_MASK_BLIND | BL_MASK_BUSY
| BL_MASK_CONF | BL_MASK_DEAF | BL_MASK_ELF_IRON

View File

@@ -144,8 +144,10 @@ static char *doc_extcmd_flagstr(winid, const struct ext_func_tab *);
static const char *readchar_queue = "";
/* for rejecting attempts to use wizard mode commands */
/* for rejecting attempts to use wizard mode commands
* Also used in wizcmds.c */
const char unavailcmd[] = "Unavailable command '%s'.";
/* for rejecting #if !SHELL, !SUSPEND */
static const char cmdnotavail[] = "'%s' command not available.";
@@ -1038,7 +1040,8 @@ makemap_prepost(boolean pre, boolean wiztower)
}
/* temporary? hack, since level type codes aren't the same as screen
symbols and only the latter have easily accessible descriptions */
symbols and only the latter have easily accessible descriptions.
Also used by wizcmds.c */
const char *levltyp[MAX_TYPE + 2] = {
"stone", "vertical wall", "horizontal wall", "top-left corner wall",
"top-right corner wall", "bottom-left corner wall",
@@ -2029,7 +2032,7 @@ static const struct {
{ 0, (const char *) 0, FALSE }
};
int extcmdlist_length = SIZE(extcmdlist) - 1;
static int extcmdlist_length = SIZE(extcmdlist) - 1;
/* get entry i in the extended commands list. for windowport use. */
struct ext_func_tab *

View File

@@ -51,7 +51,7 @@ const struct c_common_strings c_common_strings =
{ "mon", "you" }
};
const struct savefile_info default_sfinfo = {
static const struct savefile_info default_sfinfo = {
#ifdef NHSTDC
0x00000000UL
#else
@@ -143,7 +143,7 @@ const char *ARGV0;
#define IVMAGIC 0xdeadbeef
const struct Role urole_init_data = {
static const struct Role urole_init_data = {
{ "Undefined", 0 },
{ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
{ 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } },
@@ -168,7 +168,7 @@ const struct Role urole_init_data = {
-3
};
const struct Race urace_init_data = {
static const struct Race urace_init_data = {
"something",
"undefined",
"something",
@@ -191,7 +191,7 @@ const struct Race urace_init_data = {
struct display_hints disp = { 0 };
const struct instance_globals_a g_init_a = {
static const struct instance_globals_a g_init_a = {
/* artifact.c */
/* decl.c */
UNDEFINED_PTR, /* afternmv */
@@ -221,7 +221,7 @@ const struct instance_globals_a g_init_a = {
IVMAGIC /* a_magic to validate that structure layout has been preserved */
};
const struct instance_globals_b g_init_b = {
static const struct instance_globals_b g_init_b = {
/* botl.c */
{ { { NULL, NULL, 0L, FALSE, FALSE, 0, 0U, { 0 }, { 0 }, NULL, 0, 0, 0
#ifdef STATUS_HILITES
@@ -258,7 +258,7 @@ const struct instance_globals_b g_init_b = {
IVMAGIC /* b_magic to validate that structure layout has been preserved */
};
const struct instance_globals_c g_init_c = {
static const struct instance_globals_c g_init_c = {
UNDEFINED_VALUES, /* command_queue */
/* botl.c */
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -310,7 +310,7 @@ const struct instance_globals_c g_init_c = {
IVMAGIC /* c_magic to validate that structure layout has been preserved */
};
const struct instance_globals_d g_init_d = {
static const struct instance_globals_d g_init_d = {
/* decl.c */
0, /* doorindex */
0L, /* done_money */
@@ -349,7 +349,7 @@ const struct instance_globals_d g_init_d = {
IVMAGIC /* d_magic to validate that structure layout has been preserved */
};
const struct instance_globals_e g_init_e = {
static const struct instance_globals_e g_init_e = {
/* cmd.c */
WIN_ERR, /* en_win */
FALSE, /* en_via_menu */
@@ -365,7 +365,7 @@ const struct instance_globals_e g_init_e = {
IVMAGIC /* e_magic to validate that structure layout has been preserved */
};
const struct instance_globals_f g_init_f = {
static const struct instance_globals_f g_init_f = {
/* decl.c */
UNDEFINED_PTR, /* ftrap */
{ NULL }, /* fqn_prefix */
@@ -384,7 +384,7 @@ const struct instance_globals_f g_init_f = {
IVMAGIC /* f_magic to validate that structure layout has been preserved */
};
const struct instance_globals_g g_init_g = {
static const struct instance_globals_g g_init_g = {
/* display.c */
{ { { 0 } } }, /* gbuf */
UNDEFINED_VALUES, /* gbuf_start */
@@ -416,7 +416,7 @@ const struct instance_globals_g g_init_g = {
IVMAGIC /* g_magic to validate that structure layout has been preserved */
};
const struct instance_globals_h g_init_h = {
static const struct instance_globals_h g_init_h = {
/* decl.c */
NULL, /* hname */
0, /* hackpid */
@@ -436,7 +436,7 @@ const struct instance_globals_h g_init_h = {
IVMAGIC /* h_magic to validate that structure layout has been preserved */
};
const struct instance_globals_i g_init_i = {
static const struct instance_globals_i g_init_i = {
/* decl.c */
0, /* in_doagain */
{ 0, 0 } , /* inv_pos */
@@ -460,14 +460,14 @@ const struct instance_globals_i g_init_i = {
IVMAGIC /* i_magic to validate that structure layout has been preserved */
};
const struct instance_globals_j g_init_j = {
static const struct instance_globals_j g_init_j = {
/* apply.c */
0, /* jumping_is_magic */
TRUE, /* havestate*/
IVMAGIC /* j_magic to validate that structure layout has been preserved */
};
const struct instance_globals_k g_init_k = {
static const struct instance_globals_k g_init_k = {
/* decl.c */
UNDEFINED_PTR, /* kickedobj */
DUMMY, /* killer */
@@ -477,7 +477,7 @@ const struct instance_globals_k g_init_k = {
IVMAGIC /* k_magic to validate that structure layout has been preserved */
};
const struct instance_globals_l g_init_l = {
static const struct instance_globals_l g_init_l = {
/* cmd.c */
UNDEFINED_VALUE, /* last_command_count */
/* decl.c */
@@ -533,7 +533,7 @@ const struct instance_globals_l g_init_l = {
IVMAGIC /* l_magic to validate that structure layout has been preserved */
};
const struct instance_globals_m g_init_m = {
static const struct instance_globals_m g_init_m = {
/* apply.c */
0, /* mkot_trap_warn_count */
/* botl.c */
@@ -586,7 +586,7 @@ const struct instance_globals_m g_init_m = {
IVMAGIC /* m_magic to validate that structure layout has been preserved */
};
const struct instance_globals_n g_init_n = {
static const struct instance_globals_n g_init_n = {
/* botl.c */
0, /* now_or_before_idx */
/* decl.c */
@@ -626,7 +626,7 @@ const struct instance_globals_n g_init_n = {
IVMAGIC /* n_magic to validate that structure layout has been preserved */
};
const struct instance_globals_o g_init_o = {
static const struct instance_globals_o g_init_o = {
/* dbridge.c */
{ { 0 } }, /* occupants */
/* decl.c */
@@ -666,7 +666,7 @@ const struct instance_globals_o g_init_o = {
IVMAGIC /* o_magic to validate that structure layout has been preserved */
};
const struct instance_globals_p g_init_p = {
static const struct instance_globals_p g_init_p = {
/* apply.c */
-1, /* polearm_range_min */
-1, /* polearm_range_max */
@@ -706,14 +706,14 @@ const struct instance_globals_p g_init_p = {
IVMAGIC /* p_magic to validate that structure layout has been preserved */
};
const struct instance_globals_q g_init_q = {
static const struct instance_globals_q g_init_q = {
/* quest.c */
DUMMY, /* quest_status */
TRUE, /* havestate*/
IVMAGIC /* q_magic to validate that structure layout has been preserved */
};
const struct instance_globals_r g_init_r = {
static const struct instance_globals_r g_init_r = {
/* decl.c */
{ DUMMY }, /* rooms */
/* symbols.c */
@@ -736,7 +736,7 @@ const struct instance_globals_r g_init_r = {
IVMAGIC /* r_magic to validate that structure layout has been preserved */
};
const struct instance_globals_s g_init_s = {
static const struct instance_globals_s g_init_s = {
/* artifact.c */
0, /* spec_dbon_applies */
/* decl.c */
@@ -796,7 +796,7 @@ const struct instance_globals_s g_init_s = {
IVMAGIC /* s_magic to validate that structure layout has been preserved */
};
const struct instance_globals_t g_init_t = {
static const struct instance_globals_t g_init_t = {
/* apply.c */
UNDEFINED_VALUES, /* trapinfo */
/* decl.c */
@@ -833,7 +833,7 @@ const struct instance_globals_t g_init_t = {
IVMAGIC /* t_magic to validate that structure layout has been preserved */
};
const struct instance_globals_u g_init_u = {
static const struct instance_globals_u g_init_u = {
/* botl.c */
FALSE, /* update_all */
/* decl.c */
@@ -848,7 +848,7 @@ const struct instance_globals_u g_init_u = {
IVMAGIC /* u_magic to validate that structure layout has been preserved */
};
const struct instance_globals_v g_init_v = {
static const struct instance_globals_v g_init_v = {
/* botl.c */
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* valset */
@@ -874,7 +874,7 @@ const struct instance_globals_v g_init_v = {
IVMAGIC /* v_magic to validate that structure layout has been preserved */
};
const struct instance_globals_w g_init_w = {
static const struct instance_globals_w g_init_w = {
/* decl.c */
0, /* warn_obj_cnt */
0L, /* wailmsg */
@@ -892,7 +892,7 @@ const struct instance_globals_w g_init_w = {
IVMAGIC /* w_magic to validate that structure layout has been preserved */
};
const struct instance_globals_x g_init_x = {
static const struct instance_globals_x g_init_x = {
/* decl.c */
(COLNO - 1) & ~1, /* x_maze_max */
/* lock.c */
@@ -909,7 +909,7 @@ const struct instance_globals_x g_init_x = {
IVMAGIC /* x_magic to validate that structure layout has been preserved */
};
const struct instance_globals_y g_init_y = {
static const struct instance_globals_y g_init_y = {
/* decl.c */
(ROWNO - 1) & ~1, /* y_maze_max */
DUMMY, /* youmonst */
@@ -926,7 +926,7 @@ const struct instance_globals_y g_init_y = {
IVMAGIC /* y_magic to validate that structure layout has been preserved */
};
const struct instance_globals_z g_init_z = {
static const struct instance_globals_z g_init_z = {
/* mon.c */
FALSE, /* zombify */
/* muse.c */

View File

@@ -393,7 +393,7 @@ lib_dlb_ftell(dlb *dp)
return dp->mark;
}
const dlb_procs_t lib_dlb_procs = { lib_dlb_init, lib_dlb_cleanup,
static const dlb_procs_t lib_dlb_procs = { lib_dlb_init, lib_dlb_cleanup,
lib_dlb_fopen, lib_dlb_fclose,
lib_dlb_fread, lib_dlb_fseek,
lib_dlb_fgets, lib_dlb_fgetc,
@@ -402,7 +402,7 @@ const dlb_procs_t lib_dlb_procs = { lib_dlb_init, lib_dlb_cleanup,
#endif /* DLBLIB */
#ifdef DLBRSRC
const dlb_procs_t rsrc_dlb_procs = { rsrc_dlb_init, rsrc_dlb_cleanup,
static const dlb_procs_t rsrc_dlb_procs = { rsrc_dlb_init, rsrc_dlb_cleanup,
rsrc_dlb_fopen, rsrc_dlb_fclose,
rsrc_dlb_fread, rsrc_dlb_fseek,
rsrc_dlb_fgets, rsrc_dlb_fgetc,

View File

@@ -1318,7 +1318,8 @@ obj_pmname(struct obj *obj)
/* used by bogusmon(next) and also by init_CapMons(rumors.c);
bogon_is_pname(below) checks a hard-coded subset of these rather than
use this list */
use this list.
Also used in rumors.c */
const char bogon_codes[] = "-_+|="; /* see dat/bonusmon.txt */
/* fake monsters used to be in a hard-coded array, now in a data file */

View File

@@ -9,6 +9,11 @@
#include "wintype.h"
#include "sym.h"
extern const struct symparse loadsyms[];
extern const struct class_sym def_oc_syms[MAXOCLASSES];
extern const struct class_sym def_monsyms[MAXMCLASSES];
extern const uchar def_r_oc_syms[MAXOCLASSES];
/* Relevant header information in rm.h, objclass.h, sym.h, defsym.h. */
/* Default object class symbols. See objclass.h.

View File

@@ -64,7 +64,8 @@ static int tin_ok(struct obj *);
#define nonrotting_food(otyp) \
((otyp) == LEMBAS_WAFER || (otyp) == CRAM_RATION)
/* see hunger states in hack.h - texts used on bottom line */
/* see hunger states in hack.h - texts used on bottom line
Also used in botl.c and insight.c */
const char *const hu_stat[] = {
"Satiated", " ", "Hungry ", "Weak ",
"Fainting", "Fainted ", "Starved "

View File

@@ -492,7 +492,7 @@ fopen_datafile(const char *filename, const char *mode, int prefix)
/* ---------- EXTERNAL FILE SUPPORT ----------- */
/* determine byte order */
const int bei = 1;
static const int bei = 1;
#define IS_BIGENDIAN() ( (*(char*)&bei) == 0 )
void
@@ -1824,7 +1824,7 @@ docompress_file(const char *filename, boolean uncomp)
static int lockfd = -1; /* for lock_file() to pass to unlock_file() */
#endif
#ifdef USE_FCNTL
struct flock sflock; /* for unlocking, same as above */
static struct flock sflock; /* for unlocking, same as above */
#endif
#if defined(HANGUPHANDLING)
@@ -2082,7 +2082,7 @@ unlock_file(const char *filename)
/* ---------- BEGIN CONFIG FILE HANDLING ----------- */
const char *default_configfile =
static const char *default_configfile =
#ifdef UNIX
".nethackrc";
#else
@@ -2097,7 +2097,7 @@ const char *default_configfile =
#endif
#endif
/* used for messaging */
/* used for messaging. Also used in options.c */
char configfile[BUFSZ];
#ifdef MSDOS

View File

@@ -2547,7 +2547,8 @@ show_gamelog(int final)
* Vanquished monsters.
*/
/* the two uppercase choices are implemented but suppressed from menu */
/* the two uppercase choices are implemented but suppressed from menu.
also used in options.c */
const char *const vanqorders[NUM_VANQ_ORDER_MODES][3] = {
{ "t", "traditional: by monster level",
"traditional: by monster level, by internal monster index" },

View File

@@ -95,7 +95,7 @@ static char *opttext[MAXOPT] = { 0 };
((void) ((idxopttext < MAXOPT) \
? (opttext[idxopttext++] = dupstr(line)) \
: 0))
char optbuf[COLBUFSZ];
static char optbuf[COLBUFSZ];
static struct version_info version;
static const char opt_indent[] = " ";

View File

@@ -10,6 +10,9 @@
#include "color.h"
extern const struct attack c_sa_yes[NATTK];
extern const struct attack c_sa_no[NATTK];
#define NO_ATTK { 0, 0, 0, 0 }
/* monster type with single name */
@@ -32,7 +35,7 @@
#define ATTK(at, ad, n, d) { at, ad, n, d }
#define A(a1, a2, a3, a4, a5, a6) { a1, a2, a3, a4, a5, a6 }
struct permonst mons_init[NUMMONS + 1] = {
static struct permonst mons_init[NUMMONS + 1] = {
#include "monsters.h"
/*
* Array terminator, added to the end of the entries in monsters.h.

View File

@@ -26,7 +26,7 @@ static NEARDATA const char *breathwep[] = {
};
/* hallucinatory ray types */
const char *const hallublasts[] = {
static const char *const hallublasts[] = {
"asteroids", "beads", "bubbles", "butterflies", "champagne", "chaos",
"coins", "cotton candy", "crumbs", "dark matter", "darkness", "dust specks",
"emoticons", "emotions", "entropy", "flowers", "foam", "fog", "gamma rays",

View File

@@ -472,7 +472,7 @@ generic_lvl_desc(void)
return "dungeon";
}
const char *beats[] = {
static const char *beats[] = {
"stepper", "one drop", "slow two", "triple stroke roll",
"double shuffle", "half-time shuffle", "second line", "train"
};

View File

@@ -329,7 +329,7 @@ nhl_add_table_entry_region(lua_State *L, const char *name, coordxy x1,
/* converting from special level "map character" to levl location type
and back. order here is important. */
const struct {
static const struct {
char ch;
schar typ;
} char2typ[] = {

View File

@@ -562,8 +562,8 @@ sortloot_descr(int otyp, char *outbuf)
#define DISCO_ALPHABYCLASS 2 /* alphabetized within each class */
#define DISCO_ALPHABETIZED 3 /* alphabetized across all classes */
/* also used in options.c (optfn_sortdiscoveries) */
const char disco_order_let[] = "osca";
const char *const disco_orders_descr[] = {
static const char disco_order_let[] = "osca";
static const char *const disco_orders_descr[] = {
"by order of discovery within each class",
"sortloot order (by class with some sub-class groupings)",
"alphabetical within each class",

View File

@@ -10,13 +10,13 @@
#include "color.h"
#include "objclass.h"
NEARDATA struct objdescr obj_descr_init[NUM_OBJECTS + 1] = {
static struct objdescr obj_descr_init[NUM_OBJECTS + 1] = {
#define OBJECTS_DESCR_INIT
#include "objects.h"
#undef OBJECTS_DESCR_INIT
};
NEARDATA struct objclass obj_init[NUM_OBJECTS + 1] = {
static struct objclass obj_init[NUM_OBJECTS + 1] = {
#define OBJECTS_INIT
#include "objects.h"
#undef OBJECTS_INIT

View File

@@ -111,7 +111,7 @@ static struct allopt_t allopt[SIZE(allopt_init)];
/* use rest of file */
extern char configfile[]; /* for messages */
extern char configfile[]; /* for messages; files.c */
extern const struct symparse loadsyms[];
#if defined(TOS)
extern boolean colors_changed; /* in tos.c */

View File

@@ -1562,7 +1562,7 @@ add_quoted_engraving(coordxy x, coordxy y, char *buf)
return TRUE;
}
/* also used by getpos hack in do_name.c */
/* also used by getpos hack in getpos.c */
const char what_is_an_unknown_object[] = "an unknown object";
int

View File

@@ -1455,9 +1455,9 @@ strange_feeling(struct obj *obj, const char *txt)
useup(obj);
}
const char *bottlenames[] = { "bottle", "phial", "flagon", "carafe",
static const char *bottlenames[] = { "bottle", "phial", "flagon", "carafe",
"flask", "jar", "vial" };
const char *hbottlenames[] = {
static const char *hbottlenames[] = {
"jug", "pitcher", "barrel", "tin", "bag", "box", "glass", "beaker",
"tumbler", "vase", "flowerpot", "pan", "thingy", "mug", "teacup",
"teapot", "keg", "bucket", "thermos", "amphora", "wineskin", "parcel",

View File

@@ -4923,7 +4923,7 @@ shk_embellish(struct obj *itm, long cost)
DISABLE_WARNING_FORMAT_NONLITERAL
/* First 4 supplied by Ronen and Tamar, remainder by development team */
const char *Izchak_speaks[] = {
static const char *Izchak_speaks[] = {
"%s says: 'These shopping malls give me a headache.'",
"%s says: 'Slow down. Think clearly.'",
"%s says: 'You need to take things one at a time.'",

View File

@@ -201,6 +201,7 @@ static const char *const shkhealthfoods[] = {
* *_CLASS enum value) or a specific object enum value.
* In the latter case, prepend it with a unary minus so the code can know
* (by testing the sign) whether to use mkobj() or mksobj().
* shtypes[] is externally referenced from mkroom.c, mon.c and shk.c.
*/
const struct shclass shtypes[] = {
{ "general store",

View File

@@ -1714,7 +1714,7 @@ extern struct sound_procs macsound_procs;
extern struct sound_procs qtsound_procs;
#endif
struct sound_procs nosound_procs = {
static struct sound_procs nosound_procs = {
SOUNDID(nosound),
0L,
(void (*)(void)) 0, /* init_nhsound */

View File

@@ -373,6 +373,7 @@ symset_is_compatible(
* particular types of symset "handling", define a
* H_XXX macro in include/sym.h and add the name
* to this array at the matching offset.
* Externally referenced from files.c, options.c, utf8map.c.
*/
const char *const known_handling[] = {
"UNKNOWN", /* H_UNK */

View File

@@ -52,7 +52,8 @@ struct toptenentry {
char plalign[ROLESZ + 1];
char name[NAMSZ + 1];
char death[DTHSZ + 1];
} *tt_head;
};
static struct toptenentry *tt_head;
/* size big enough to read in all the string fields at once; includes
room for separating space or trailing newline plus string terminator */
#define SCANBUFSZ (4 * (ROLESZ + 1) + (NAMSZ + 1) + (DTHSZ + 1) + 1)

View File

@@ -28,7 +28,7 @@ struct find_struct {
enum reserved_activities restype;
genericptr_t reserved;
};
const struct find_struct zero_find = { 0 };
static const struct find_struct zero_find = { 0 };
struct glyphid_cache_t {
int glyphnum;
char *id;
@@ -36,7 +36,7 @@ struct glyphid_cache_t {
static struct glyphid_cache_t *glyphid_cache;
static unsigned glyphid_cache_lsize;
static size_t glyphid_cache_size;
struct find_struct glyphcache_find, to_custom_symbol_find;
static struct find_struct glyphcache_find, to_custom_symbol_find;
static void init_glyph_cache(void);
static void add_glyph_to_cache(int glyphnum, const char *id);
static int find_glyph_in_cache(const char *id);

View File

@@ -22,7 +22,8 @@
* ....X +4
* @...X +4
*
*/
* Externally referenced from light.c
*/
const coordxy circle_data[] = {
/* 0*/ 0,
/* 1*/ 1, 1,

View File

@@ -10,7 +10,7 @@ static void clear_bypass(struct obj *) NO_NNARGS;
static void m_dowear_type(struct monst *, long, boolean, boolean) NONNULLARG1;
static int extra_pref(struct monst *, struct obj *) NONNULLARG1;
const struct worn {
static const struct worn {
long w_mask;
struct obj **w_obj;
const char *w_what; /* for failing sanity check's feedback */

View File

@@ -5589,6 +5589,7 @@ item_what(int dmgtyp)
* [6] shocked wand
* (books, rings, and wands don't stack so don't need plural form;
* crumbling ring doesn't do damage so doesn't need killer reason)
* externally referenced from trap.c.
*/
const char *const destroy_strings[][3] = {
/* also used in trap.c */