From: nhmall Date: Wed, 8 Feb 2023 05:06:56 +0000 (-0500) Subject: follow-up - Change the terminology in mO menu X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6cc35abba314f7b882f65b5592eca5daadf7b7cf;p=nethack follow-up - Change the terminology in mO menu --- diff --git a/include/optlist.h b/include/optlist.h index a19bfe280..4ba345936 100644 --- a/include/optlist.h +++ b/include/optlist.h @@ -21,7 +21,7 @@ enum OptSection { OptS_General, OptS_Behavior, OptS_Map, OptS_Status, OptS_Advanced }; enum menu_terminology_preference { - Term_False, Term_Off, Term_Disabled, num_terms + Term_False, Term_Off, Term_Disabled, Term_Excluded, num_terms }; struct allopt_t { @@ -667,7 +667,7 @@ static int optfn_##a(int, int, boolean, char *, char *); Off, Yes, No, No, NoAlias, &iflags.voices, Term_Off) #else NHOPTB(voices, Advanced, 0, opt_in, set_gameview, - Off, Yes, No, No, NoAlias, &iflags.voices, Term_Disabled) + Off, Yes, No, No, NoAlias, &iflags.voices, Term_Excluded) #endif #ifdef TTY_TILES_ESCCODES NHOPTB(vt_tiledata, Advanced, 0, opt_in, set_in_config, diff --git a/src/options.c b/src/options.c index 471a0443c..9da46b251 100644 --- a/src/options.c +++ b/src/options.c @@ -8572,13 +8572,13 @@ term_for_boolean(int idx, boolean *b) int i, f_t = (*b) ? 1: 0; const char *boolean_term; static const char *const booleanterms[2][num_terms] = { - { "false", "off", "disabled", }, - { "true", "on", "enabled", }, + { "false", "off", "disabled", "excluded from build" }, + { "true", "on", "enabled", "included"}, }; boolean_term = booleanterms[f_t][0]; i = (int) allopt[idx].termpref; - if (i > Term_False && i < num_terms) + if (i > Term_False && i < num_terms && i < SIZE(booleanterms[0])) boolean_term = booleanterms[f_t][i]; return boolean_term; }