static int count_menucolors(void);
static boolean parse_role_opts(int, boolean, const char *,
char *, char **);
+static int get_option_index(const char *);
static unsigned int longest_option_name(int, int);
static void doset_add_menu(winid, const char *, int, int);
static int handle_add_list_remove(const char *, int);
return longest_name_len;
}
+static int
+get_option_index(const char *optname)
+{
+ int i;
+
+ for (i = 0; allopt[i].name != 0; i++)
+ if (!strcmp(optname, allopt[i].name))
+ return i;
+
+ return -1;
+}
+
/* #options - the user friendly version */
int
doset_simple(void)
const char *value = "unknown";
int reslt = optn_err;
char buf2[BUFSZ];
+ int k = i;
+
+ if (allopt[i].optfn == optfn_symset && Is_rogue_level(&u.uz)) {
+ k = get_option_index("roguesymset");
+ if (k == -1)
+ k = i;
+ name = allopt[k].name;
+ }
buf2[0] = '\0';
- if (allopt[i].optfn)
- reslt = (*allopt[i].optfn)(allopt[i].idx, get_val,
+ if (allopt[k].optfn)
+ reslt = (*allopt[k].optfn)(allopt[k].idx, get_val,
FALSE, buf2, empty_optstr);
if (reslt == optn_ok && buf2[0])
value = (const char *) buf2;