#endif
/* xxxexplain[] is in drawing.c */
-E const char *monexplain[], *invisexplain, *objexplain[], *oclass_names[];
+E const char * const monexplain[], invisexplain[], * const objexplain[], * const oclass_names[];
/* Some systems want to use full pathnames for some subsets of file names,
* rather than assuming that they're all in the current directory. This
E int NDECL(uwep_skill_type);
E int FDECL(weapon_hit_bonus, (struct obj *));
E int FDECL(weapon_dam_bonus, (struct obj *));
-E void FDECL(skill_init, (struct def_skill *));
+E void FDECL(skill_init, (const struct def_skill *));
/* ### were.c ### */
int iprob; /* probability of an item type */
int itype; /* item type: if >=0 a class, if < 0 a specific item */
} iprobs[5];
- const char **shknms; /* list of shopkeeper names for this type */
+ const char * const *shknms; /* list of shopkeeper names for this type */
};
extern NEARDATA struct mkroom rooms[(MAXNROFROOMS+1)*2];
void FDECL( amii_speaker, ( struct obj *, char *, int ) );
#endif
-static char no_elbow_room[] = "don't have enough elbow-room to maneuver.";
+static const char no_elbow_room[] = "don't have enough elbow-room to maneuver.";
#ifdef TOURIST
STATIC_OVL int
return FALSE;
}
-static char hollow_str[] = "a hollow sound. This must be a secret %s!";
+static const char hollow_str[] = "a hollow sound. This must be a secret %s!";
/* Strictly speaking it makes no sense for usage of a stethoscope to
not take any time; however, unless it did, the stethoscope would be
return res;
}
-static char whistle_str[] = "produce a %s whistling sound.";
+static const char whistle_str[] = "produce a %s whistling sound.";
STATIC_OVL void
use_whistle(obj)
#define WEAK 3 /* from eat.c */
-static char look_str[] = "look %s.";
+static const char look_str[] = "look %s.";
STATIC_OVL int
use_mirror(obj)
const char *streak_color;
char stonebuf[QBUFSZ];
static const char scritch[] = "\"scritch, scritch\"";
- static char allowall[3] = { COIN_CLASS, ALL_CLASSES, 0 };
+ static const char allowall[3] = { COIN_CLASS, ALL_CLASSES, 0 };
#ifndef GOLDOBJ
struct obj goldobj;
#endif
static const char
- *not_enough_room = "There's not enough room here to use that.",
- *where_to_hit = "Where do you want to hit?",
- *cant_see_spot = "won't hit anything if you can't see that spot.";
+ not_enough_room[] = "There's not enough room here to use that.",
+ where_to_hit[] = "Where do you want to hit?",
+ cant_see_spot[] = "won't hit anything if you can't see that spot.";
/* Distance attacks by pole-weapons */
STATIC_OVL int
}
if (youdefend || mdef->mhp > 0) { /* ??? -dkh- */
- static const char *mb_verb[4] =
+ static const char * const mb_verb[4] =
{"probe", "stun", "scare", "purge"};
if (youattack || youdefend || vis) {
}
} else if (otmp->oartifact == ART_VORPAL_BLADE &&
(dieroll == 1 || mdef->data == &mons[PM_JABBERWOCK])) {
- static const char *behead_msg[2] = {
+ static const char * const behead_msg[2] = {
"%s beheads %s!",
"%s decapitates %s!"
};
/* part of the output on gain or loss of attribute */
static
-const char *plusattr[] = {
+const char * const plusattr[] = {
"strong", "smart", "wise", "agile", "tough", "charismatic"
},
- *minusattr[] = {
+ * const minusattr[] = {
"weak", "stupid", "foolish", "clumsy", "fragile", "repulsive"
};
#ifdef OVL0
extern const char *hu_stat[]; /* defined in eat.c */
-const char *enc_stat[] = {
+const char * const enc_stat[] = {
"",
"Burdened",
"Stressed",
/* -enlightenment and conduct- */
static winid en_win;
static const char
- *You_ = "You ",
- *are = "are ", *were = "were ",
- *have = "have ", *had = "had ",
- *can = "can ", *could = "could ";
+ You_[] = "You ",
+ are[] = "are ", were[] = "were ",
+ have[] = "have ", had[] = "had ",
+ can[] = "can ", could[] = "could ";
static const char
- *have_been = "have been ",
- *have_never = "have never ", *never = "never ";
+ have_been[] = "have been ",
+ have_never[] = "have never ", never[] = "never ";
#define enl_msg(prefix,present,past,suffix) \
enlght_line(prefix, final ? past : present, suffix)
#ifdef ELBERETH
if (u.uevent.uhand_of_elbereth) {
- static const char *hofe_titles[3] = {
+ static const char * const hofe_titles[3] = {
"the Hand of Elbereth",
"the Envoy of Balance",
"the Glory of Arioch"
menu_item *selected;
anything any;
char buf[BUFSZ], buf2[BUFSZ];
- static char fmtstr[] = "%-15s: %-12s";
- static char deity_fmtstr[] = "%-17s%s";
+ static const char fmtstr[] = "%-15s: %-12s";
+ static const char deity_fmtstr[] = "%-17s%s";
any.a_void = 0;
buf[0] = buf2[0] = '\0';
}
-static const char *template = "%-18s %4ld %6ld";
-static const char *count_str = " count bytes";
-static const char *separator = "------------------ ----- ------";
+static const char template[] = "%-18s %4ld %6ld";
+static const char count_str[] = " count bytes";
+static const char separator[] = "------------------ ----- ------";
STATIC_OVL void
count_obj(chain, total_count, total_size, top, recurse)
else return "near you";
}
-static struct {
+static const struct {
const char *what;
d_level *where;
} level_detects[] = {
digging.level.dlevel = -1;
return(0);
} else { /* not enough effort has been spent yet */
- static const char *d_target[6] = {
+ static const char *const d_target[6] = {
"", "rock", "statue", "boulder", "door", "tree"
};
int dig_target = dig_typ(uwep, dpx, dpy);
You("swing your %s through thin air.",
aobjnam(obj, (char *)0));
} else {
- static const char *d_action[6] = {
+ static const char * const d_action[6] = {
"swinging",
"digging",
"chipping the statue",
t_warn(lev)
struct rm *lev;
{
- static const char *warn_str = "wall_angle: %s: case %d: seenv = 0x%x";
+ static const char warn_str[] = "wall_angle: %s: case %d: seenv = 0x%x";
const char *wname;
if (lev->typ == TUWALL) wname = "tuwall";
}
if (familiar) {
- static const char *fam_msgs[4] = {
+ static const char * const fam_msgs[4] = {
"You have a sense of deja vu.",
"You feel like you've been here before.",
"This place %s familiar...",
0 /* no message */
};
- static const char *halu_fam_msgs[4] = {
+ static const char * const halu_fam_msgs[4] = {
"Whoa! Everything %s different.",
"You are surrounded by twisty little passages, all alike.",
"Gee, this %s like uncle Conan's place...",
int cx, cy, i, c;
int sidx, tx, ty;
boolean msg_given = TRUE; /* clear message window by default */
- static const char *pick_chars = ".,;:";
+ static const char pick_chars[] = ".,;:";
const char *cp;
const char *sdp;
if(iflags.num_pad) sdp = ndir; else sdp = sdir; /* DICE workaround */
#endif /*OVLB*/
#ifdef OVL0
-static const char *ghostnames[] = {
+static const char * const ghostnames[] = {
/* these names should have length < PL_NSIZ */
/* Capitalize the names for aesthetics -dgk */
"Adri", "Andries", "Andreas", "Bert", "David", "Dirk", "Emile",
return outbuf;
}
-static const char *bogusmons[] = {
+static const char * const bogusmons[] = {
"jumbo shrimp", "giant pigmy", "gnu", "killer penguin",
"giant cockroach", "giant slug", "maggot", "pterodactyl",
"tyrannosaurus rex", "basilisk", "beholder", "nightmare",
#ifdef OVL2
-static NEARDATA const char *hcolors[] = {
+static NEARDATA const char * const hcolors[] = {
"ultraviolet", "infrared", "bluish-orange",
"reddish-green", "dark white", "light black", "sky blue-pink",
"salty", "sweet", "sour", "bitter",
/* Aliases for road-runner nemesis
* See also http://www.geocities.com/EnchantedForest/1141/latin.html
*/
-static const char *coynames[] = {
+static const char * const coynames[] = {
"Carnivorous Vulgaris","Road-Runnerus Digestus",
"Eatibus Anythingus" ,"Famishus-Famishus",
"Eatibus Almost Anythingus","Eatius Birdius",
static NEARDATA const char see_yourself[] = "see yourself";
static NEARDATA const char unknown_type[] = "Unknown type of %s (%d)";
-static NEARDATA const char *c_armor = "armor",
- *c_suit = "suit",
+static NEARDATA const char c_armor[] = "armor",
+ c_suit[] = "suit",
#ifdef TOURIST
- *c_shirt = "shirt",
+ c_shirt[] = "shirt",
#endif
- *c_cloak = "cloak",
- *c_gloves = "gloves",
- *c_boots = "boots",
- *c_helmet = "helmet",
- *c_shield = "shield",
- *c_weapon = "weapon",
- *c_sword = "sword",
- *c_axe = "axe",
- *c_that_ = "that";
+ c_cloak[] = "cloak",
+ c_gloves[] = "gloves",
+ c_boots[] = "boots",
+ c_helmet[] = "helmet",
+ c_shield[] = "shield",
+ c_weapon[] = "weapon",
+ c_sword[] = "sword",
+ c_axe[] = "axe",
+ c_that_[] = "that";
static NEARDATA const long takeoff_order[] = { WORN_BLINDF, W_WEP,
WORN_SHIELD, WORN_GLOVES, LEFT_RING, RIGHT_RING, WORN_CLOAK,
VENOM_SYM
};
-const char *invisexplain = "remembered, unseen, creature";
+const char invisexplain[] = "remembered, unseen, creature";
/* Object descriptions. Used in do_look(). */
-const char *objexplain[] = { /* these match def_oc_syms, above */
+const char * const objexplain[] = { /* these match def_oc_syms, above */
/* 0*/ 0,
"strange object",
"weapon",
};
/* Object class names. Used in object_detect(). */
-const char *oclass_names[] = {
+const char * const oclass_names[] = {
/* 0*/ 0,
"illegal objects",
"weapons",
* for blessed genocide, so no text should wholly contain any later
* text. They should also always contain obvious names (eg. cat/feline).
*/
-const char *monexplain[MAXMCLASSES] = {
+const char * const monexplain[MAXMCLASSES] = {
0,
"ant or other insect", "blob", "cockatrice",
"dog or other canine", "eye or sphere", "cat or other feline",
#else
STATIC_DCL void FDECL(mkshobj_at, (const struct shclass *,int,int));
-STATIC_DCL void FDECL(nameshk, (struct monst *,const char **));
+STATIC_DCL void FDECL(nameshk, (struct monst *,const char * const *));
STATIC_DCL int FDECL(shkinit, (const struct shclass *,struct mkroom *));
-static const char *shkliquors[] = {
+static const char * const shkliquors[] = {
/* Ukraine */
"Njezjin", "Tsjernigof", "Gomel", "Ossipewsk", "Gorlowka",
/* N. Russia */
0
};
-static const char *shkbooks[] = {
+static const char * const shkbooks[] = {
/* Eire */
"Skibbereen", "Kanturk", "Rath Luirc", "Ennistymon", "Lahinch",
"Kinnegad", "Lugnaquillia", "Enniscorthy", "Gweebarra",
0
};
-static const char *shkarmors[] = {
+static const char * const shkarmors[] = {
/* Turquie */
"Demirci", "Kalecik", "Boyabai", "Yildizeli", "Gaziantep",
"Siirt", "Akhalataki", "Tirebolu", "Aksaray", "Ermenak",
0
};
-static const char *shkwands[] = {
+static const char * const shkwands[] = {
/* Wales */
"Yr Wyddgrug", "Trallwng", "Mallwyd", "Pontarfynach",
"Rhaeader", "Llandrindod", "Llanfair-ym-muallt",
0
};
-static const char *shkrings[] = {
+static const char * const shkrings[] = {
/* Hollandse familienamen */
"Feyfer", "Flugi", "Gheel", "Havic", "Haynin", "Hoboken",
"Imbyze", "Juyn", "Kinsky", "Massis", "Matray", "Moy",
0
};
-static const char *shkfoods[] = {
+static const char * const shkfoods[] = {
/* Indonesia */
"Djasinga", "Tjibarusa", "Tjiwidej", "Pengalengan",
"Bandjar", "Parbalingga", "Bojolali", "Sarangan",
0
};
-static const char *shkweapons[] = {
+static const char * const shkweapons[] = {
/* Perigord */
"Voulgezac", "Rouffiac", "Lerignac", "Touverac", "Guizengeard",
"Melac", "Neuvicq", "Vanzac", "Picq", "Urignac", "Corignac",
0
};
-static const char *shktools[] = {
+static const char * const shktools[] = {
/* Spmi */
"Ymla", "Eed-morra", "Cubask", "Nieb", "Bnowr Falr", "Telloc Cyaj",
"Sperc", "Noskcirdneh", "Yawolloh", "Hyeghu", "Niskal", "Trahnil",
0
};
-static const char *shklight[] = {
+static const char * const shklight[] = {
/* Romania */
"Zarnesti", "Slanic", "Nehoiasu", "Ludus", "Sighisoara", "Nisipitu",
"Razboieni", "Bicaz", "Dorohoi", "Vaslui", "Fetesti", "Tirgu Neamt",
0
};
-static const char *shkgeneral[] = {
+static const char * const shkgeneral[] = {
/* Suriname */
"Hebiwerie", "Possogroenoe", "Asidonhopo", "Manlobbi",
"Adjama", "Pakka Pakka", "Kabalebo", "Wonotobo",
STATIC_OVL void
nameshk(shk, nlp)
struct monst *shk;
-const char *nlp[];
+const char * const nlp[];
{
int i, trycnt, names_avail;
const char *shname = 0;
int
dosit()
{
- static const char *sit_message = "sit on the %s.";
+ static const char sit_message[] = "sit on the %s.";
register struct trap *trap;
register int typ = levl[u.ux][u.uy].typ;
int nobj = 0;
int cnt, onum;
struct obj *otmp;
- static const char *mal_aura = "feel a malignant aura surround %s.";
+ static const char mal_aura[] = "feel a malignant aura surround %s.";
if (uwep && (uwep->oartifact == ART_MAGICBANE) && rn2(20)) {
You(mal_aura, "the magic-absorbing blade");
hallu = Hallucination ? 1 : 0;
if (level.flags.nfountains && !rn2(400)) {
- static const char *fountain_msg[4] = {
+ static const char * const fountain_msg[4] = {
"bubbling water.",
"water falling on coins.",
"the splashing of a naiad.",
}
#ifdef SINK
if (level.flags.nsinks && !rn2(300)) {
- static const char *sink_msg[3] = {
+ static const char * const sink_msg[3] = {
"a slow drip.",
"a gurgling noise.",
"dishes being washed!",
}
#endif
if (level.flags.has_court && !rn2(200)) {
- static const char *throne_msg[4] = {
+ static const char * const throne_msg[4] = {
"the tones of courtly conversation.",
"a sceptre pounded in judgment.",
"Someone shouts \"Off with %s head!\"",
}
}
if (level.flags.has_swamp && !rn2(200)) {
- static const char *swamp_msg[3] = {
+ static const char * const swamp_msg[3] = {
"hear mosquitoes!",
"smell marsh gas!", /* so it's a smell...*/
"hear Donald Duck!",
}
}
if (level.flags.has_barracks && !rn2(200)) {
- static const char *barracks_msg[4] = {
+ static const char * const barracks_msg[4] = {
"blades being honed.",
"loud snoring.",
"dice being thrown.",
}
}
if (level.flags.has_zoo && !rn2(200)) {
- static const char *zoo_msg[3] = {
+ static const char * const zoo_msg[3] = {
"a sound reminiscent of an elephant stepping on a peanut.",
"a sound reminiscent of a seal barking.",
"Doctor Doolittle!",
}
if (tended_shop(sroom) &&
!index(u.ushops, ROOM_INDEX(sroom) + ROOMOFFSET)) {
- static const char *shop_msg[3] = {
+ static const char * const shop_msg[3] = {
"someone cursing shoplifters.",
"the chime of a cash register.",
"Neiman and Marcus arguing!",
break;
/* and don't produce silly effects when she's clearly visible */
if (mtmp && (hallu || !canseemon(mtmp))) {
- static const char *ora_msg[5] = {
+ static const char * const ora_msg[5] = {
"a strange wind.", /* Jupiter at Dodona */
"convulsive ravings.", /* Apollo at Delphi */
"snoring snakes.", /* AEsculapius at Epidaurus */
#endif /* OVL0 */
#ifdef OVLB
-static const char *h_sounds[] = {
+static const char * const h_sounds[] = {
"beep", "boing", "sing", "belche", "creak", "cough", "rattle",
"ululate", "pop", "jingle", "sniffle", "tinkle", "eep"
};
verbl_msg = "I only drink... potions.";
} else {
int vampindex;
- static const char *vampmsg[] = {
+ static const char * const vampmsg[] = {
/* These first two (0 and 1) are specially handled below */
"I vant to suck your %s!",
"I vill come after %s without regret!",
break;
case MS_LAUGH:
{
- static const char *laugh_msg[4] = {
+ static const char * const laugh_msg[4] = {
"giggles.", "chuckles.", "snickers.", "laughs.",
};
pline_msg = laugh_msg[rn2(4)];
verbalize("Just the facts, %s.",
flags.female ? "Ma'am" : "Sir");
else {
- static const char *arrest_msg[3] = {
+ static const char * const arrest_msg[3] = {
"Anything you say can be used against you.",
"You're under arrest!",
"Stop in the name of the Law!",
break;
case MS_SOLDIER:
{
- static const char *soldier_foe_msg[3] = {
+ static const char * const soldier_foe_msg[3] = {
"Resistance is useless!",
"You're dog meat!",
"Surrender!",
- }, *soldier_pax_msg[3] = {
+ }, * const soldier_pax_msg[3] = {
"What lousy pay we're getting here!",
"The food's not fit for Orcs!",
"My feet hurt, I've been on them all day!",
ostuck = (otmp->cursed && otmp->owornmask);
if (ostuck || !can_carry(mtmp, otmp)) {
- static const char *how[] = { "steal","snatch","grab","take" };
+ static const char * const how[] = { "steal","snatch","grab","take" };
cant_take:
pline("%s tries to %s your %s but gives up.",
Monnam(mtmp), how[rn2(SIZE(how))],
#ifdef OVLB
/* He is being petrified - dialogue by inmet!tower */
-static NEARDATA const char *stoned_texts[] = {
+static NEARDATA const char * const stoned_texts[] = {
"You are slowing down.", /* 5 */
"Your limbs are stiffening.", /* 4 */
"Your limbs have turned to stone.", /* 3 */
}
/* He is getting sicker and sicker prior to vomiting */
-static NEARDATA const char *vomiting_texts[] = {
+static NEARDATA const char * const vomiting_texts[] = {
"are feeling mildly nauseous.", /* 14 */
"feel slightly confused.", /* 11 */
"can't seem to think straight.", /* 8 */
exercise(A_CON, FALSE);
}
-static NEARDATA const char *choke_texts[] = {
+static NEARDATA const char * const choke_texts[] = {
"You find it hard to breathe.",
"You're gasping for air.",
"You can no longer breathe.",
"You suffocate."
};
-static NEARDATA const char *choke_texts2[] = {
+static NEARDATA const char * const choke_texts2[] = {
"Your %s is becoming constricted.",
"Your blood is having trouble reaching your brain.",
"The pressure on your %s increases.",
exercise(A_STR, FALSE);
}
-static NEARDATA const char *slime_texts[] = {
+static NEARDATA const char * const slime_texts[] = {
"You are turning a little %s.", /* 5 */
"Your limbs are getting oozy.", /* 4 */
"Your skin begins to peel away.", /* 3 */
} ttable;
/* table of timeout functions */
-static ttable timeout_funcs[NUM_TIME_FUNCS] = {
+static const ttable timeout_funcs[NUM_TIME_FUNCS] = {
TTAB(rot_organic, (timeout_proc)0, "rot_organic"),
TTAB(rot_corpse, (timeout_proc)0, "rot_corpse"),
TTAB(revive_mon, (timeout_proc)0, "revive_mon"),
#endif
/* must fit with end.c; used in rip.c */
-NEARDATA const char *killed_by_prefix[] = {
+NEARDATA const char * const killed_by_prefix[] = {
"killed by ", "choked on ", "poisoned by ", "", "drowned in ",
"burned by ", "dissolved in ", "crushed to death by ", "petrified by ",
"turned to slime by ", "killed by ", "", "", "", "", ""
struct toptenentry *tt;
{
#ifdef NO_SCAN_BRACK /* Version_ Pts DgnLevs_ Hp___ Died__Born id */
- static const char *fmt = "%d %d %d %ld %d %d %d %d %d %d %ld %ld %d%*c";
- static const char *fmt32 = "%c%c %s %s%*c";
- static const char *fmt33 = "%s %s %s %s %s %s%*c";
+ static const char fmt[] = "%d %d %d %ld %d %d %d %d %d %d %ld %ld %d%*c";
+ static const char fmt32[] = "%c%c %s %s%*c";
+ static const char fmt33[] = "%s %s %s %s %s %s%*c";
#else
- static const char *fmt = "%d.%d.%d %ld %d %d %d %d %d %d %ld %ld %d ";
- static const char *fmt32 = "%c%c %[^,],%[^\n]%*c";
- static const char *fmt33 = "%s %s %s %s %[^,],%[^\n]%*c";
+ static const char fmt[] = "%d.%d.%d %ld %d %d %d %d %d %d %ld %ld %d ";
+ static const char fmt32[] = "%c%c %[^,],%[^\n]%*c";
+ static const char fmt33[] = "%s %s %s %s %[^,],%[^\n]%*c";
#endif
#ifdef UPDATE_RECORD_IN_PLACE
#else
-STATIC_VAR const char *a_your[2] = { "a", "your" };
-STATIC_VAR const char *A_Your[2] = { "A", "Your" };
-STATIC_VAR const char *the_your[2] = { "the", "your" };
+STATIC_VAR const char * const a_your[2] = { "a", "your" };
+STATIC_VAR const char * const A_Your[2] = { "A", "Your" };
+STATIC_VAR const char * const the_your[2] = { "the", "your" };
STATIC_VAR const char tower_of_flame[] = "tower of flame";
-STATIC_VAR const char *A_gush_of_water_hits = "A gush of water hits";
+STATIC_VAR const char * const A_gush_of_water_hits = "A gush of water hits";
STATIC_VAR const char * const blindgas[6] =
{"humid", "odorless", "pungent", "chilling", "acrid", "biting"};
boolean print;
struct monst *victim;
{
- static NEARDATA const char *action[] = { "smoulder", "rust", "rot", "corrode" };
- static NEARDATA const char *msg[] = { "burnt", "rusted", "rotten", "corroded" };
+ static NEARDATA const char * const action[] = { "smoulder", "rust", "rot", "corrode" };
+ static NEARDATA const char * const msg[] = { "burnt", "rusted", "rotten", "corroded" };
boolean vulnerable = FALSE;
boolean grprot = FALSE;
boolean is_primary = TRUE;
!strncmp(nomovemsg,"You are consci", 14))));
}
-static char lava_killer[] = "molten lava";
+static const char lava_killer[] = "molten lava";
boolean
lava_effects()
{ NON_PM, STRANGE_OBJECT, STRANGE_OBJECT }
};
-static struct def_skill Skill_A[] = {
+static const struct def_skill Skill_A[] = {
{ P_DAGGER, P_BASIC }, { P_KNIFE, P_BASIC },
{ P_PICK_AXE, P_EXPERT }, { P_SHORT_SWORD, P_BASIC },
{ P_SCIMITAR, P_SKILLED }, { P_SABER, P_EXPERT },
{ P_NONE, 0 }
};
-static struct def_skill Skill_B[] = {
+static const struct def_skill Skill_B[] = {
{ P_DAGGER, P_BASIC }, { P_AXE, P_EXPERT },
{ P_PICK_AXE, P_EXPERT }, { P_SHORT_SWORD, P_BASIC },
{ P_BROAD_SWORD, P_SKILLED }, { P_LONG_SWORD, P_SKILLED },
{ P_NONE, 0 }
};
-static struct def_skill Skill_C[] = {
+static const struct def_skill Skill_C[] = {
{ P_DAGGER, P_BASIC }, { P_KNIFE, P_SKILLED },
{ P_AXE, P_SKILLED }, { P_PICK_AXE, P_BASIC },
{ P_CLUB, P_EXPERT }, { P_MACE, P_EXPERT },
{ P_NONE, 0 }
};
-static struct def_skill Skill_H[] = {
+static const struct def_skill Skill_H[] = {
{ P_DAGGER, P_SKILLED }, { P_KNIFE, P_EXPERT },
{ P_SHORT_SWORD, P_SKILLED }, { P_SCIMITAR, P_BASIC },
{ P_SABER, P_BASIC }, { P_CLUB, P_SKILLED },
{ P_NONE, 0 }
};
-static struct def_skill Skill_K[] = {
+static const struct def_skill Skill_K[] = {
{ P_DAGGER, P_BASIC }, { P_KNIFE, P_BASIC },
{ P_AXE, P_SKILLED }, { P_PICK_AXE, P_BASIC },
{ P_SHORT_SWORD, P_SKILLED }, { P_BROAD_SWORD, P_SKILLED },
{ P_NONE, 0 }
};
-static struct def_skill Skill_Mon[] = {
+static const struct def_skill Skill_Mon[] = {
{ P_QUARTERSTAFF, P_BASIC }, { P_SPEAR, P_BASIC },
{ P_JAVELIN, P_BASIC }, { P_CROSSBOW, P_BASIC },
{ P_SHURIKEN, P_BASIC },
{ P_NONE, 0 }
};
-static struct def_skill Skill_P[] = {
+static const struct def_skill Skill_P[] = {
{ P_CLUB, P_EXPERT }, { P_MACE, P_EXPERT },
{ P_MORNING_STAR, P_EXPERT }, { P_FLAIL, P_EXPERT },
{ P_HAMMER, P_EXPERT }, { P_QUARTERSTAFF, P_EXPERT },
{ P_NONE, 0 }
};
-static struct def_skill Skill_R[] = {
+static const struct def_skill Skill_R[] = {
{ P_DAGGER, P_EXPERT }, { P_KNIFE, P_EXPERT },
{ P_SHORT_SWORD, P_EXPERT }, { P_BROAD_SWORD, P_SKILLED },
{ P_LONG_SWORD, P_SKILLED }, { P_TWO_HANDED_SWORD, P_BASIC },
{ P_NONE, 0 }
};
-static struct def_skill Skill_Ran[] = {
+static const struct def_skill Skill_Ran[] = {
{ P_DAGGER, P_EXPERT }, { P_KNIFE, P_SKILLED },
{ P_AXE, P_SKILLED }, { P_PICK_AXE, P_BASIC },
{ P_SHORT_SWORD, P_BASIC }, { P_MORNING_STAR, P_BASIC },
{ P_NONE, 0 }
};
-static struct def_skill Skill_S[] = {
+static const struct def_skill Skill_S[] = {
{ P_DAGGER, P_BASIC }, { P_KNIFE, P_SKILLED },
{ P_SHORT_SWORD, P_EXPERT }, { P_BROAD_SWORD, P_SKILLED },
{ P_LONG_SWORD, P_EXPERT }, { P_TWO_HANDED_SWORD, P_EXPERT },
};
#ifdef TOURIST
-static struct def_skill Skill_T[] = {
+static const struct def_skill Skill_T[] = {
{ P_DAGGER, P_EXPERT }, { P_KNIFE, P_SKILLED },
{ P_AXE, P_BASIC }, { P_PICK_AXE, P_BASIC },
{ P_SHORT_SWORD, P_EXPERT }, { P_BROAD_SWORD, P_BASIC },
};
#endif /* TOURIST */
-static struct def_skill Skill_V[] = {
+static const struct def_skill Skill_V[] = {
{ P_DAGGER, P_EXPERT }, { P_AXE, P_EXPERT },
{ P_PICK_AXE, P_SKILLED }, { P_SHORT_SWORD, P_SKILLED },
{ P_BROAD_SWORD, P_SKILLED }, { P_LONG_SWORD, P_EXPERT },
{ P_NONE, 0 }
};
-static struct def_skill Skill_W[] = {
+static const struct def_skill Skill_W[] = {
{ P_DAGGER, P_EXPERT }, { P_KNIFE, P_SKILLED },
{ P_AXE, P_SKILLED }, { P_SHORT_SWORD, P_BASIC },
{ P_CLUB, P_SKILLED }, { P_MACE, P_BASIC },
restricted_spell_discipline(otyp)
int otyp;
{
- struct def_skill *skills;
+ const struct def_skill *skills;
int this_skill = spell_skilltype(otyp);
switch (Role_switch) {
store_version(fd)
int fd;
{
- static struct version_info version_data = {
+ const static struct version_info version_data = {
VERSION_NUMBER, VERSION_FEATURES,
VERSION_SANITY1, VERSION_SANITY2
};
};
/* note: entry [0] isn't used */
-STATIC_VAR NEARDATA const char *odd_skill_names[] = {
+STATIC_VAR NEARDATA const char * const odd_skill_names[] = {
"no skill",
"bare hands", /* use barehands_or_martial[] instead */
"two weapon combat",
"matter spells",
};
/* indexed vis `is_martial() */
-STATIC_VAR NEARDATA const char *barehands_or_martial[] = {
+STATIC_VAR NEARDATA const char * const barehands_or_martial[] = {
"bare handed combat", "martial arts"
};
}
/* Weapons in order of preference */
-static NEARDATA short hwep[] = {
+static const NEARDATA short hwep[] = {
CORPSE, /* cockatrice corpse */
TSURUGI, RUNESWORD, DWARVISH_MATTOCK, TWO_HANDED_SWORD, BATTLE_AXE,
KATANA, UNICORN_HORN, CRYSKNIFE, TRIDENT, LONG_SWORD,
P_NAME(skill));
}
-static struct skill_range {
+const static struct skill_range {
short first, last;
const char *name;
} skill_ranges[] = {
*/
void
skill_init(class_skill)
-struct def_skill *class_skill;
+const struct def_skill *class_skill;
{
struct obj *obj;
int skmax, skill;
}
}
-const char *random_insult[] = {
+const char * const random_insult[] = {
"antic",
"blackguard",
"caitiff",
"wretch",
};
-const char *random_malediction[] = {
+const char * const random_malediction[] = {
"Hell shall soon claim thy remains,",
"I chortle at thee, thou pathetic",
"Prepare to die, thou",
#else
STATIC_VAR const char are_blinded_by_the_flash[] = "are blinded by the flash!";
-const char *flash_types[] = { /* also used in buzzmu(mcastu.c) */
+const char * const flash_types[] = { /* also used in buzzmu(mcastu.c) */
"magic missile", /* Wands must be 0-9 */
"bolt of fire",
"bolt of cold",
return TRUE;
}
-const char *destroy_strings[] = {
+const char * const destroy_strings[] = {
"freezes and shatters", "freeze and shatter", "shattered potion",
"boils and explodes", "boil and explode", "boiling potion",
"catches fire and burns", "catch fire and burn", "burning scroll",