avoid the_your[] duplication

get rid of a duplication of the_your[] strings (do.c, trap.c) by
moving it to c_common_strings.
This commit is contained in:
nethack.allison
2003-09-15 02:04:00 +00:00
parent e2d75840b0
commit 5eff6601e9
4 changed files with 4 additions and 4 deletions
+3 -1
View File
@@ -289,7 +289,8 @@ E struct c_common_strings {
*const c_silly_thing_to, *const c_shudder_for_moment, *const c_silly_thing_to, *const c_shudder_for_moment,
*const c_something, *const c_Something, *const c_something, *const c_Something,
*const c_You_can_move_again, *const c_You_can_move_again,
*const c_Never_mind, *c_vision_clears; *const c_Never_mind, *c_vision_clears,
*const c_the_your[2];
} c_common_strings; } c_common_strings;
#define nothing_happens c_common_strings.c_nothing_happens #define nothing_happens c_common_strings.c_nothing_happens
#define thats_enough_tries c_common_strings.c_thats_enough_tries #define thats_enough_tries c_common_strings.c_thats_enough_tries
@@ -300,6 +301,7 @@ E struct c_common_strings {
#define You_can_move_again c_common_strings.c_You_can_move_again #define You_can_move_again c_common_strings.c_You_can_move_again
#define Never_mind c_common_strings.c_Never_mind #define Never_mind c_common_strings.c_Never_mind
#define vision_clears c_common_strings.c_vision_clears #define vision_clears c_common_strings.c_vision_clears
#define the_your c_common_strings.c_the_your
/* material strings */ /* material strings */
E const char *materialnm[]; E const char *materialnm[];
+1 -1
View File
@@ -239,7 +239,7 @@ struct c_common_strings c_common_strings = {
"Nothing happens.", "That's enough tries!", "Nothing happens.", "That's enough tries!",
"That is a silly thing to %s.", "shudder for a moment.", "That is a silly thing to %s.", "shudder for a moment.",
"something", "Something", "You can move again.", "Never mind.", "something", "Something", "You can move again.", "Never mind.",
"vision quickly clears." "vision quickly clears.", {"the", "your"}
}; };
/* NOTE: the order of these words exactly corresponds to the /* NOTE: the order of these words exactly corresponds to the
-1
View File
@@ -195,7 +195,6 @@ const char *verb;
(!u.utrap || (u.utrap && u.utraptype != TT_PIT)) && (!u.utrap || (u.utrap && u.utraptype != TT_PIT)) &&
(t = t_at(x,y)) != 0 && t->tseen && (t = t_at(x,y)) != 0 && t->tseen &&
(t->ttyp==PIT || t->ttyp==SPIKED_PIT)) { (t->ttyp==PIT || t->ttyp==SPIKED_PIT)) {
static const char * const the_your[2] = { "the", "your" };
/* you escaped a pit and are standing on the precipice */ /* you escaped a pit and are standing on the precipice */
if (Blind && flags.soundok) if (Blind && flags.soundok)
You_hear("%s %s downwards.", You_hear("%s %s downwards.",
-1
View File
@@ -32,7 +32,6 @@ STATIC_OVL boolean FDECL(keep_saddle_with_steedcorpse,
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 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 tower_of_flame[] = "tower of flame";
STATIC_VAR const char * const 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] =