]> granicus.if.org Git - nethack/commitdiff
avoid the_your[] duplication
authornethack.allison <nethack.allison>
Mon, 15 Sep 2003 02:04:00 +0000 (02:04 +0000)
committernethack.allison <nethack.allison>
Mon, 15 Sep 2003 02:04:00 +0000 (02:04 +0000)
get rid of a duplication of the_your[] strings (do.c, trap.c) by
moving it to c_common_strings.

include/decl.h
src/decl.c
src/do.c
src/trap.c

index 4541b66493d2dbfbd623e4fe1d2da522979c3af3..48b54c68d9d523aecba58ef632151111540a6239 100644 (file)
@@ -289,7 +289,8 @@ E struct c_common_strings {
                *const c_silly_thing_to, *const c_shudder_for_moment,
                *const c_something, *const c_Something,
                *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;
 #define nothing_happens    c_common_strings.c_nothing_happens
 #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 Never_mind        c_common_strings.c_Never_mind
 #define vision_clears     c_common_strings.c_vision_clears
+#define the_your          c_common_strings.c_the_your
 
 /* material strings */
 E const char *materialnm[];
index 349ad5064641ef634cf8bf1784ebb8dcbd656a5e..4dd460e7c682e222ff026b087dd2e1a6bb6ae562 100644 (file)
@@ -239,7 +239,7 @@ struct c_common_strings c_common_strings = {
        "Nothing happens.",             "That's enough tries!",
        "That is a silly thing to %s.", "shudder for a moment.",
        "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
index 8dbe4c6bf1f01145923a0988af8f527288436fde..939356cf44429f8c4ef13f5f154db602ebc58da6 100644 (file)
--- a/src/do.c
+++ b/src/do.c
@@ -195,7 +195,6 @@ const char *verb;
                (!u.utrap || (u.utrap && u.utraptype != TT_PIT)) &&
                (t = t_at(x,y)) != 0 && t->tseen &&
                        (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 */
                if (Blind && flags.soundok)
                        You_hear("%s %s downwards.",
index 662f7e7d59f9678f48bd8101645d276ae4d30366..5b93573c91d0b988a536d5a9852c65522dc7adf1 100644 (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 the_your[2] = { "the", "your" };
 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 blindgas[6] =