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