#define A(nam, typ, s1, s2, mt, atk, dfn, cry, inv, al, cl, rac, \
cost, clr, bn) nam
-static const char *artifact_names[] = {
+static const char *const artifact_names[] = {
#elif defined(ARTI_ENUM)
#define A(nam, typ, s1, s2, mt, atk, dfn, cry, inv, al, cl, rac, \
objects_misc_enum,
NUM_ENUM_DUMPS
};
- static const char *titles[NUM_ENUM_DUMPS] =
+ static const char *const titles[NUM_ENUM_DUMPS] =
{ "monnums", "objects_nums" , "misc_object_nums" };
struct enum_dump {
int val;
{ MAXSPELL, "MAXSPELL" },
};
struct enum_dump *ed[NUM_ENUM_DUMPS] = { monsdump, objdump, omdump };
- static const char *pfx[NUM_ENUM_DUMPS] = { "PM_", "", "" };
+ static const char *const pfx[NUM_ENUM_DUMPS] = { "PM_", "", "" };
int szd[NUM_ENUM_DUMPS] = { SIZE(monsdump), SIZE(objdump), SIZE(omdump) };
for (i = 0; i < NUM_ENUM_DUMPS; ++ i) {
} else if (obj->otyp == SPE_NOVEL) {
pline("This looks like it might be interesting to read.");
} else {
- static const char *fadeness[] = {
+ static const char *const fadeness[] = {
"fresh",
"slightly faded",
"very faded",
}
/* glow verb; [0] holds the value used when blind */
-static const char *glow_verbs[] = {
+static const char *const glow_verbs[] = {
"quiver", "flicker", "glimmer", "gleam"
};
}
if (x != u.ux || y != u.uy) {
- static const char *pullmsg = "The ball pulls you out of the %s!";
+ static const char *const pullmsg = "The ball pulls you out of the %s!";
struct trap *t;
long side;
void
cond_menu(void)
{
- static const char *menutitle[2] = { "alphabetically", "by ranking"};
+ static const char *const menutitle[2] = { "alphabetically", "by ranking"};
int i, res, idx = 0;
int sequence[CONDITION_COUNT];
winid tmpwin;
enum statusfields fld = BL_FLUSH;
struct hilite_s hilite;
char tmpbuf[BUFSZ];
- static const char *aligntxt[] = { "chaotic", "neutral", "lawful" };
+ static const char *const aligntxt[] = { "chaotic", "neutral", "lawful" };
/* hu_stat[] from eat.c has trailing spaces which foul up comparisons */
- static const char *hutxt[] = { "Satiated", "", "Hungry", "Weak",
+ static const char *const hutxt[] = { "Satiated", "", "Hungry", "Weak",
"Fainting", "Fainted", "Starved" };
/* Examples:
hilite.rel = TXT_VALUE;
Strcpy(hilite.textmatch, enc_stat[rv]);
} else if (fld == BL_ALIGN) {
- static const char *aligntxt[] = {
+ static const char *const aligntxt[] = {
"chaotic", "neutral", "lawful"
};
int rv = query_arrayvalue(qry_buf,
hilite.rel = TXT_VALUE;
Strcpy(hilite.textmatch, aligntxt[rv]);
} else if (fld == BL_HUNGER) {
- static const char *hutxt[] = { "Satiated", (char *) 0, "Hungry",
+ static const char *const hutxt[] = { "Satiated", (char *) 0, "Hungry",
"Weak", "Fainting", "Fainted",
"Starved" };
int rv = query_arrayvalue(qry_buf,
int n, pass;
int menumode = 0, menushown[2], onelist = 0;
boolean redisplay = TRUE, search = FALSE;
- static const char *headings[] = { "Extended commands",
+ static const char *const headings[] = { "Extended commands",
"Debugging Extended Commands" };
searchbuf[0] = '\0';
} else {
/* "marching" is deliberately ambiguous; it might mean drills
after entering military service or mean engaging in protests */
- static const char *draft_reaction[] = {
+ static const char *const draft_reaction[] = {
"enlisting", "marching", "protesting", "fleeing",
};
int dridx;
static void error4(int, int, int, int, int, int);
static int bad_count[MAX_TYPE]; /* count of positions flagged as bad */
-static const char *type_names[MAX_TYPE] = {
+static const char *const type_names[MAX_TYPE] = {
"STONE", "VWALL", "HWALL", "TLCORNER", "TRCORNER", "BLCORNER", "BRCORNER",
"CROSSWALL", "TUWALL", "TDWALL", "TLWALL", "TRWALL", "DBWALL", "TREE",
"SDOOR", "SCORR", "POOL", "MOAT", "WATER", "DRAWBRIDGE_UP", "LAVAPOOL",
/* explicit direction; 'one step' is implicit */
Sprintf(buf, "%s", directionname(dst));
} else {
- static const char *dirnames[4][2] = {
+ static const char *const dirnames[4][2] = {
{ "n", "north" },
{ "s", "south" },
{ "w", "west" },
char *
rndorcname(char *s)
{
- static const char *v[] = { "a", "ai", "og", "u" };
- static const char *snd[] = { "gor", "gris", "un", "bane", "ruk",
+ static const char *const v[] = { "a", "ai", "og", "u" };
+ static const char *const snd[] = { "gor", "gris", "un", "bane", "ruk",
"oth","ul", "z", "thos","akh","hai" };
int i, iend = rn1(2, 3), vstart = rn2(2);
/* NOTE: the order of these words exactly corresponds to the
order of oc_material values #define'd in objclass.h. */
-static const char *foodwords[] = {
+static const char *const foodwords[] = {
"meal", "liquid", "wax", "food", "meat", "paper",
"cloth", "leather", "wood", "bone", "scale", "metal",
"metal", "metal", "silver", "gold", "platinum", "mithril",
lock_action(void)
{
/* "unlocking"+2 == "locking" */
- static const char *actions[] = {
+ static const char *const actions[] = {
"unlocking the door", /* [0] */
"unlocking the chest", /* [1] */
"unlocking the box", /* [2] */
void
readmail(struct obj *otmp UNUSED)
{
- static const char *junk[] = {
+ static const char *const junk[] = {
"Report bugs to <%s>.", /*** must be first entry ***/
"Please disregard previous letter.",
"Welcome to NetHack.",
VERSION_MAJOR, VERSION_MINOR, PATCHLEVEL);
}
-static const char *build_opts[] = {
+static const char *const build_opts[] = {
#ifdef AMIGA_WBENCH
"Amiga WorkBench support",
#endif
#if defined(MAKEDEFS_C) || defined(FOR_RUNTIME)
{
- static const char *lua_info[] = {
+ static const char *const lua_info[] = {
"", "NetHack 3.7.* uses the 'Lua' interpreter to process some data:", "",
" :LUACOPYRIGHT:", "",
/* 1 2 3 4 5 6 7
}
#define ORC_LEADER 1
-static const char *orcfruit[] = { "paddle cactus", "dwarven root" };
+static const char *const orcfruit[] = { "paddle cactus", "dwarven root" };
static void
migrate_orc(struct monst* mtmp, unsigned long mflags)
return mtmp->data;
}
-static const char *levitate[4] = { "float", "Float", "wobble", "Wobble" };
-static const char *flys[4] = { "fly", "Fly", "flutter", "Flutter" };
-static const char *flyl[4] = { "fly", "Fly", "stagger", "Stagger" };
-static const char *slither[4] = { "slither", "Slither", "falter", "Falter" };
-static const char *ooze[4] = { "ooze", "Ooze", "tremble", "Tremble" };
-static const char *immobile[4] = { "wiggle", "Wiggle", "pulsate", "Pulsate" };
-static const char *crawl[4] = { "crawl", "Crawl", "falter", "Falter" };
+static const char *const levitate[4] = { "float", "Float", "wobble", "Wobble" };
+static const char *const flys[4] = { "fly", "Fly", "flutter", "Flutter" };
+static const char *const flyl[4] = { "fly", "Fly", "stagger", "Stagger" };
+static const char *const slither[4] = { "slither", "Slither", "falter", "Falter" };
+static const char *const ooze[4] = { "ooze", "Ooze", "tremble", "Tremble" };
+static const char *const immobile[4] = { "wiggle", "Wiggle", "pulsate", "Pulsate" };
+static const char *const crawl[4] = { "crawl", "Crawl", "falter", "Falter" };
const char *
locomotion(const struct permonst* ptr, const char* def)
* Keep in alphabetical order within teams.
* Same first name is entered once within each team.
*/
-static const char *developers[] = {
+static const char *const developers[] = {
/* devteam */
"Alex", "Dave", "Dean", "Derek", "Eric", "Izchak",
"Janet", "Jessie", "Ken", "Kevin", "Michael", "Mike",
if (obj->oclass == POTION_CLASS) {
coord cc;
- static const char *empty = "The potion turns out to be empty.";
+ static const char *const empty = "The potion turns out to be empty.";
struct monst *mtmp;
if (objdescr_is(obj, "milky")) {
static int nhl_set_package_path(lua_State *, const char *);
static int traceback_handler(lua_State *);
-static const char *nhcore_call_names[NUM_NHCORE_CALLS] = {
+static const char *const nhcore_call_names[NUM_NHCORE_CALLS] = {
"start_new_game",
"restore_old_game",
"moveloop_turn",
return outbuf;
}
-static const char *wrp[] = {
+static const char *const wrp[] = {
"wand", "ring", "potion", "scroll", "gem",
"amulet", "spellbook", "spell book",
/* for non-specific wishes */
{
/* these are some *ch words/suffixes that make a k-sound. They pluralize by
adding 's' rather than 'es' */
- static const char *ch_k[] = {
+ static const char *const ch_k[] = {
"monarch", "poch", "tech", "mech", "stomach", "psych",
"amphibrach", "anarch", "atriarch", "azedarach", "broch",
"gastrotrich", "isopach", "loch", "oligarch", "peritrich",
boolean to_plural) /* True: makeplural, False: makesingular */
{
/* these are all the prefixes for *man that don't have a *men plural */
- static const char *no_men[] = {
+ static const char *const no_men[] = {
"albu", "antihu", "anti", "ata", "auto", "bildungsro", "cai", "cay",
"ceru", "corner", "decu", "des", "dura", "fir", "hanu", "het",
"infrahu", "inhu", "nonhu", "otto", "out", "prehu", "protohu",
"hu", "un", "le", "re", "so", "to", "at", "a",
};
/* these are all the prefixes for *men that don't have a *man singular */
- static const char *no_man[] = {
+ static const char *const no_man[] = {
"abdo", "acu", "agno", "ceru", "cogno", "cycla", "fleh", "grava",
"hegu", "preno", "sonar", "speci", "dai", "exa", "fla", "sta", "teg",
"tegu", "vela", "da", "hy", "lu", "no", "nu", "ra", "ru", "se", "vi",
#define MOUSEFIX1 ", O/S adjusted"
#define MOUSEFIX2 ", O/S unchanged"
#endif
- static const char *mousemodes[][2] = {
+ static const char *const mousemodes[][2] = {
{ "0=off", "" },
{ "1=on", MOUSEFIX1 },
{ "2=on", MOUSEFIX2 },
return optn_ok;
}
if (req == get_val) {
- static const char *numpadmodes[] = {
+ static const char *const numpadmodes[] = {
"0=off", "1=on", "2=on, MSDOS compatible",
"3=on, phone-style layout",
"4=on, phone layout, MSDOS compatible",
char buf[BUFSZ];
/* order of disclose_names[] must correspond to
disclosure_options in decl.c */
- static const char *disclosure_names[] = {
+ static const char *const disclosure_names[] = {
"inventory", "attributes", "vanquished",
"genocides", "conduct", "overview",
};
winid tmpwin;
anything any;
int i;
- static const char *npchoices[] = {
+ static const char *const npchoices[] = {
" 0 (off)", " 1 (on)", " 2 (on, MSDOS compatible)",
" 3 (on, phone-style digit layout)",
" 4 (on, phone-style layout, MSDOS compatible)",
static boolean
msgtype_add(int typ, char *pattern)
{
- static const char *re_error = "MSGTYPE regex error";
+ static const char *const re_error = "MSGTYPE regex error";
struct plinemsg_type *tmp = (struct plinemsg_type *) alloc(sizeof *tmp);
tmp->msgtype = typ;
(char *) 0
};
-static const char *opt_epilog[] = {
+static const char *const opt_epilog[] = {
"",
"Some of the options can only be set before the game is started;",
"those items will not be selectable in the 'O' command's menu.",
int j;
char buf[BUFSZ];
char *wn, *tfg, *tbg, *newop;
- static const char *wnames[] = { "menu", "message", "status", "text" };
- static const char *shortnames[] = { "mnu", "msg", "sts", "txt" };
+ static const char *const wnames[] = { "menu", "message", "status", "text" };
+ static const char *const shortnames[] = { "mnu", "msg", "sts", "txt" };
static char **fgp[] = { &iflags.wc_foregrnd_menu,
&iflags.wc_foregrnd_message,
&iflags.wc_foregrnd_status,
* responsible for the theft of the Amulet from Marduk, the Creator.
* Moloch is unaligned.
*/
-static const char *Moloch = "Moloch";
+static const char *const Moloch = "Moloch";
-static const char *godvoices[] = {
+static const char *const godvoices[] = {
"booms out", "thunders", "rings out", "booms",
};
return gnam;
}
-static const char *hallu_gods[] = {
+static const char *const hallu_gods[] = {
"the Flying Spaghetti Monster", /* Church of the FSM */
"Eris", /* Discordianism */
"the Martians", /* every science fiction ever */
/* priests don't chat unless peaceful and in their own temple */
if (!inhistemple(priest) || !priest->mpeaceful
|| !priest->mcanmove || priest->msleeping) {
- static const char *cranky_msg[3] = {
+ static const char *const cranky_msg[3] = {
"Thou wouldst have words, eh? I'll give thee a word or two!",
"Talk? Here is what I have to say!",
"Pilgrim, I would speak no longer with thee."
char *
tshirt_text(struct obj* tshirt, char* buf)
{
- static const char *shirt_msgs[] = {
+ static const char *const shirt_msgs[] = {
/* Scott Bigham */
"I explored the Dungeons of Doom and all I got was this lousy T-shirt!",
"Is that Mjollnir in your pocket or are you just happy to see me?",
char *
hawaiian_motif(struct obj *shirt, char *buf)
{
- static const char *hawaiian_motifs[] = {
+ static const char *const hawaiian_motifs[] = {
/* birds */
"flamingo",
"parrot",
static char *
hawaiian_design(struct obj *shirt, char *buf)
{
- static const char *hawaiian_bgs[] = {
+ static const char *const hawaiian_bgs[] = {
/* solid colors */
"purple",
"yellow",
char *
apron_text(struct obj* apron, char* buf)
{
- static const char *apron_msgs[] = {
+ static const char *const apron_msgs[] = {
"Kiss the cook",
"I'm making SCIENCE!",
"Don't mess with the chef",
return erode_obj_text(apron, buf);
}
-static const char *candy_wrappers[] = {
+static const char *const candy_wrappers[] = {
"", /* (none -- should never happen) */
"Apollo", /* Lost */
"Moon Crunchy", /* South Park */
docall(scroll);
return ECMD_TIME;
} else if (otyp == CREDIT_CARD) {
- static const char *card_msgs[] = {
+ static const char *const card_msgs[] = {
"Leprechaun Gold Tru$t - Shamrock Card",
"Magic Memory Vault Charge Card",
"Larn National Bank", /* Larn */
#ifndef NH320_DEDICATION
/* A normal tombstone for end of game display. */
-static const char *rip_txt[] = {
+static const char *const rip_txt[] = {
" ----------",
" / \\",
" / REST \\",
#define STONE_LINE_CENT 28 /* char[] element of center of stone face */
#else /* NH320_DEDICATION */
/* NetHack 3.2.x displayed a dual tombstone as a tribute to Izchak. */
-static const char *rip_txt[] = {
+static const char *const rip_txt[] = {
" ---------- ----------",
" / \\ / \\",
" / REST \\ / This \\",
obj->quan <= bp->bquan
*/
-static const char *angrytexts[] = { "quite upset", "ticked off", "furious" };
+static const char *const angrytexts[] = { "quite upset", "ticked off", "furious" };
/*
* Transfer money from inventory to monster when paying
NUM_SPELL_SORTBY
};
-static const char *spl_sortchoices[NUM_SPELL_SORTBY] = {
+static const char *const spl_sortchoices[NUM_SPELL_SORTBY] = {
"by casting letter",
"alphabetically",
"by level, low to high",
const char *
trapname(int ttyp, boolean override)
{
- static const char *halu_trapnames[] = {
+ static const char *const halu_trapnames[] = {
/* riffs on actual nethack traps */
"bottomless pit", "polymorphism trap", "devil teleporter",
"falling boulder trap", "anti-anti-magic field", "weeping gas trap",