From 336908ad3c8262a32a91bee9e9b82a19bc9ccf43 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 18 May 2019 16:44:57 -0400 Subject: [PATCH 1/3] grammar bit --- src/shk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shk.c b/src/shk.c index 470253570..26e7b66a5 100644 --- a/src/shk.c +++ b/src/shk.c @@ -4945,7 +4945,7 @@ struct obj *obj_absorber, *obj_absorbed; amount = bp->price; bill_dummy_object(obj_absorbed); verbalize( - "You owe me %ld %s for my %s that %s with your%s", + "You owe me %ld %s for my %s that you %s with your%s", amount, currency(amount), obj_typename(obj_absorbed->otyp), ANGRY(shkp) ? "had the audacity to mix" : "just mixed", From 8aac36c0730e287cc69b1e7005f6441a43ab01c2 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 18 May 2019 22:56:27 -0400 Subject: [PATCH 2/3] don't merge globs with differing BUC status --- doc/fixes36.3 | 4 ++-- src/invent.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index d85086092..28a908a06 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.5 $ $NHDT-Date: 1558171542 2019/05/18 09:25:42 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.7 $ $NHDT-Date: 1558234580 2019/05/19 02:56:20 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -15,11 +15,11 @@ when examining the map with '/' or ';', picking a symbol which is used for more than 4 things yielded a sentence lacking its terminating period billing and payment issue as a result of glob coalescing glob pricing did not consider weight properly +glob shop interaction improved to handle more of the expected scenarios Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository ------------------------------------------------------------------ -glob shop interaction improved to handle more of the expected scenarios Platform- and/or Interface-Specific Fixes or Features diff --git a/src/invent.c b/src/invent.c index 51c505375..94e0053ca 100644 --- a/src/invent.c +++ b/src/invent.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 invent.c $NHDT-Date: 1555196229 2019/04/13 22:57:09 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.253 $ */ +/* NetHack 3.6 invent.c $NHDT-Date: 1558234540 2019/05/19 02:55:40 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.258 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -3581,7 +3581,8 @@ register struct obj *otmp, *obj; if (obj->oclass == COIN_CLASS) return TRUE; - if (obj->bypass != otmp->bypass) + if (obj->bypass != otmp->bypass + || obj->cursed != otmp->cursed || obj->blessed != otmp->blessed) return FALSE; if (obj->globby) @@ -3591,7 +3592,6 @@ register struct obj *otmp, *obj; */ if (obj->unpaid != otmp->unpaid || obj->spe != otmp->spe - || obj->cursed != otmp->cursed || obj->blessed != otmp->blessed || obj->no_charge != otmp->no_charge || obj->obroken != otmp->obroken || obj->otrapped != otmp->otrapped || obj->lamplit != otmp->lamplit) return FALSE; From d1ce0aac89f4345d7f06336a594261c4c950df86 Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 18 May 2019 23:52:04 -0700 Subject: [PATCH 3/3] fixes github issue #190 - EDIT_GETLIN for curses Fixes #190 Add EDIT_GETLIN support for curses. It remains disabled by default. --- doc/fixes36.3 | 4 +++- include/config.h | 14 ++++++++++---- win/curses/cursmesg.c | 20 +++++++++++++++----- 3 files changed, 28 insertions(+), 10 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 28a908a06..8d5c22376 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.7 $ $NHDT-Date: 1558234580 2019/05/19 02:56:20 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.8 $ $NHDT-Date: 1558248715 2019/05/19 06:51:55 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -33,6 +33,8 @@ curses: when all available lines in the message window are in use, leaving part of longer underlying line's text visible curses: if message window is only one line, cancelling some prompts with ESC left the prompts visible on the message line instead of erasing them +curses: support EDIT_GETLIN (but like with tty, it's disabled by default) to + pre-load an earlier response as the default answer for some prompts Windows: some startup error messages were not being delivered successfully diff --git a/include/config.h b/include/config.h index 3177512e1..1fa760d90 100644 --- a/include/config.h +++ b/include/config.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 config.h $NHDT-Date: 1447728911 2015/11/17 02:55:11 $ $NHDT-Branch: master $:$NHDT-Revision: 1.91 $ */ +/* NetHack 3.6 config.h $NHDT-Date: 1558248715 2019/05/19 06:51:55 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.122 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2016. */ /* NetHack may be freely redistributed. See license for details. */ @@ -526,9 +526,15 @@ typedef unsigned char uchar; * probably not useful for normal play */ /* #define EXTRA_SANITY_CHECKS */ -/* EDIT_GETLIN makes the string input in TTY, Qt4, and X11 - so some prompts will remember the previously input text - (within the same session) */ +/* EDIT_GETLIN makes the string input in TTY, curses, Qt4, and X11 + for some prompts be pre-loaded with previously input text (from + a previous instance of the same prompt) as the default response. + In some cases, the previous instance can only be within the same + session; in others, such as #annotate, the previous input can be + from any session because the response is saved and restored with + the map. The 'edit' capability is just or + to strip off characters at the end, or to discard the + whole thing, then type a new end for the text. */ /* #define EDIT_GETLIN */ /* #define DUMPLOG */ /* End-of-game dump logs */ diff --git a/win/curses/cursmesg.c b/win/curses/cursmesg.c index a32b6824b..4daf1784b 100644 --- a/win/curses/cursmesg.c +++ b/win/curses/cursmesg.c @@ -448,15 +448,14 @@ curses_message_win_getline(const char *prompt, char *answer, int buffer) int ch; WINDOW *win = curses_get_nhwin(MESSAGE_WIN); int border_space = 0; - int len = 0; /* of answer string */ + int len; /* of answer string */ boolean border = curses_window_has_border(MESSAGE_WIN); - *answer = '\0'; orig_cursor = curs_set(0); curses_get_window_size(MESSAGE_WIN, &height, &width); if (border) { - height -= 2, width -= 2; + /* height -= 2, width -= 2; -- sizes already account for border */ border_space = 1; if (mx < 1) mx = 1; @@ -470,10 +469,21 @@ curses_message_win_getline(const char *prompt, char *answer, int buffer) maxlines = buffer / width * 2; Strcpy(tmpbuf, prompt); Strcat(tmpbuf, " "); + p_answer = tmpbuf + strlen(tmpbuf); +#ifdef EDIT_GETLIN + len = (int) strlen(answer); + if (len >= buffer) { + len = buffer - 1; + answer[len] = '\0'; + } + Strcpy(p_answer, answer); +#else + len = 0; + *answer = '\0'; +#endif nlines = curses_num_lines(tmpbuf, width); maxlines += nlines * 2; linestarts = (char **) alloc((unsigned) (maxlines * sizeof (char *))); - p_answer = tmpbuf + strlen(tmpbuf); linestarts[0] = tmpbuf; if (mx > border_space) { /* newline */ @@ -531,7 +541,7 @@ curses_message_win_getline(const char *prompt, char *answer, int buffer) wmove(win, my, mx); curs_set(1); wrefresh(win); - curses_got_input(); /* despite its name, before rathre than after... */ + curses_got_input(); /* despite its name, before rather than after... */ #ifdef PDCURSES ch = wgetch(win); #else