From 5eff6601e9d81751577cc0bd51ceae040b5d6856 Mon Sep 17 00:00:00 2001 From: "nethack.allison" Date: Mon, 15 Sep 2003 02:04:00 +0000 Subject: [PATCH] avoid the_your[] duplication get rid of a duplication of the_your[] strings (do.c, trap.c) by moving it to c_common_strings. --- include/decl.h | 4 +++- src/decl.c | 2 +- src/do.c | 1 - src/trap.c | 1 - 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/decl.h b/include/decl.h index 4541b6649..48b54c68d 100644 --- a/include/decl.h +++ b/include/decl.h @@ -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[]; diff --git a/src/decl.c b/src/decl.c index 349ad5064..4dd460e7c 100644 --- a/src/decl.c +++ b/src/decl.c @@ -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 diff --git a/src/do.c b/src/do.c index 8dbe4c6bf..939356cf4 100644 --- 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.", diff --git a/src/trap.c b/src/trap.c index 662f7e7d5..5b93573c9 100644 --- a/src/trap.c +++ b/src/trap.c @@ -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] = -- 2.40.0