doclassdisco() - missing start_menu() call
Apparently tty doesn't mind if you use add_menu() without preceding it with start_menu(), because doclassdisco() (the new with 3.6.0 '`' command) works for me with all four settings of menustyle.
This commit is contained in:
+11
-11
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 o_init.c $NHDT-Date: 1446892449 2015/11/07 10:34:09 $ $NHDT-Branch: master $:$NHDT-Revision: 1.20 $ */
|
/* NetHack 3.6 o_init.c $NHDT-Date: 1449588093 2015/12/08 15:21:33 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.21 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -436,11 +436,8 @@ dodiscovered() /* free after Robert Viduya */
|
|||||||
|
|
||||||
/* several classes are omitted from packorder; one is of interest here */
|
/* several classes are omitted from packorder; one is of interest here */
|
||||||
Strcpy(classes, flags.inv_order);
|
Strcpy(classes, flags.inv_order);
|
||||||
if (!index(classes, VENOM_CLASS)) {
|
if (!index(classes, VENOM_CLASS))
|
||||||
s = eos(classes);
|
(void) strkitten(classes, VENOM_CLASS); /* append char to string */
|
||||||
*s++ = VENOM_CLASS;
|
|
||||||
*s = '\0';
|
|
||||||
}
|
|
||||||
|
|
||||||
for (s = classes; *s; s++) {
|
for (s = classes; *s; s++) {
|
||||||
oclass = *s;
|
oclass = *s;
|
||||||
@@ -497,14 +494,17 @@ doclassdisco()
|
|||||||
discosyms[2 + MAXOCLASSES + 1], buf[BUFSZ];
|
discosyms[2 + MAXOCLASSES + 1], buf[BUFSZ];
|
||||||
int i, ct, dis, xtras;
|
int i, ct, dis, xtras;
|
||||||
boolean traditional;
|
boolean traditional;
|
||||||
winid tmpwin;
|
winid tmpwin = WIN_ERR;
|
||||||
anything any;
|
anything any;
|
||||||
menu_item *pick_list = 0;
|
menu_item *pick_list = 0;
|
||||||
|
|
||||||
discosyms[0] = '\0';
|
discosyms[0] = '\0';
|
||||||
traditional = (flags.menu_style == MENU_TRADITIONAL
|
traditional = (flags.menu_style == MENU_TRADITIONAL
|
||||||
|| flags.menu_style == MENU_COMBINATION);
|
|| flags.menu_style == MENU_COMBINATION);
|
||||||
tmpwin = !traditional ? create_nhwindow(NHW_MENU) : WIN_ERR;
|
if (!traditional) {
|
||||||
|
tmpwin = create_nhwindow(NHW_MENU);
|
||||||
|
start_menu(tmpwin);
|
||||||
|
}
|
||||||
any = zeroany;
|
any = zeroany;
|
||||||
menulet = 'a';
|
menulet = 'a';
|
||||||
|
|
||||||
@@ -534,7 +534,7 @@ doclassdisco()
|
|||||||
classes are omitted from packorder and one is of interest here */
|
classes are omitted from packorder and one is of interest here */
|
||||||
Strcpy(allclasses, flags.inv_order);
|
Strcpy(allclasses, flags.inv_order);
|
||||||
if (!index(allclasses, VENOM_CLASS))
|
if (!index(allclasses, VENOM_CLASS))
|
||||||
Sprintf(eos(allclasses), "%c", VENOM_CLASS);
|
(void) strkitten(allclasses, VENOM_CLASS); /* append char to string */
|
||||||
/* construct discosyms[] */
|
/* construct discosyms[] */
|
||||||
for (s = allclasses; *s; ++s) {
|
for (s = allclasses; *s; ++s) {
|
||||||
oclass = *s;
|
oclass = *s;
|
||||||
@@ -572,8 +572,8 @@ doclassdisco()
|
|||||||
c = def_oc_syms[(int) *s].sym;
|
c = def_oc_syms[(int) *s].sym;
|
||||||
if (!index(discosyms, c)) {
|
if (!index(discosyms, c)) {
|
||||||
if (!xtras++)
|
if (!xtras++)
|
||||||
Sprintf(eos(discosyms), "%c", '\033');
|
(void) strkitten(discosyms, '\033');
|
||||||
Sprintf(eos(discosyms), "%c", c);
|
(void) strkitten(discosyms, c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* get the class (via its symbol character) */
|
/* get the class (via its symbol character) */
|
||||||
|
|||||||
Reference in New Issue
Block a user