Merge branch 'master' into NetHack-3.7
This commit is contained in:
+3
-1
@@ -1,4 +1,4 @@
|
|||||||
$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.71 $ $NHDT-Date: 1561457861 2019/06/25 10:17:41 $
|
$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.72 $ $NHDT-Date: 1561681080 2019/06/28 00:18:00 $
|
||||||
|
|
||||||
This fixes36.3 file is here to capture information about updates in the 3.6.x
|
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,
|
lineage following the release of 3.6.2 in May 2019. Please note, however,
|
||||||
@@ -156,6 +156,8 @@ curses: when map window was clipped, the 'scrollbars' shown to indicate which
|
|||||||
"*--------------" for horizontal (and comparable '*' with multiple '|'
|
"*--------------" for horizontal (and comparable '*' with multiple '|'
|
||||||
underneath for vertical) when it meant to show "---******------" if
|
underneath for vertical) when it meant to show "---******------" if
|
||||||
the 2nd and 3rd fifths (for example) were currently within view
|
the 2nd and 3rd fifths (for example) were currently within view
|
||||||
|
curses: support users's setting for erase char and kill char when getting a
|
||||||
|
line of input with 'popup_dialog' Off (already supported for popup On)
|
||||||
curses+'perm_invent': entries were wrapping without any control; usually not
|
curses+'perm_invent': entries were wrapping without any control; usually not
|
||||||
noticeable because next entry overwrote, but visible for final entry
|
noticeable because next entry overwrote, but visible for final entry
|
||||||
when whole inventory fit within the available height; looked ok with
|
when whole inventory fit within the available height; looked ok with
|
||||||
|
|||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 options.c $NHDT-Date: 1561427671 2019/06/25 01:54:31 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.366 $ */
|
/* NetHack 3.6 options.c $NHDT-Date: 1561682566 2019/06/28 00:42:46 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.367 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Michael Allison, 2008. */
|
/*-Copyright (c) Michael Allison, 2008. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -678,7 +678,7 @@ initoptions()
|
|||||||
void
|
void
|
||||||
initoptions_init()
|
initoptions_init()
|
||||||
{
|
{
|
||||||
#if defined(UNIX) || defined(VMS)
|
#if (defined(UNIX) || defined(VMS)) && defined(TTY_GRAPHICS)
|
||||||
char *opts;
|
char *opts;
|
||||||
#endif
|
#endif
|
||||||
int i;
|
int i;
|
||||||
|
|||||||
@@ -9,6 +9,15 @@
|
|||||||
#include "color.h"
|
#include "color.h"
|
||||||
#include "wincurs.h"
|
#include "wincurs.h"
|
||||||
|
|
||||||
|
/* define this if not linking with <foo>tty.o|.obj for some reason */
|
||||||
|
#ifdef CURSES_DEFINE_ERASE_CHAR
|
||||||
|
char erase_char, kill_char;
|
||||||
|
#else
|
||||||
|
/* defined in sys/<foo>/<foo>tty.o|.obj which gets linked into
|
||||||
|
tty-only, tty+curses, and curses-only binaries */
|
||||||
|
extern char erase_char, kill_char;
|
||||||
|
#endif
|
||||||
|
|
||||||
extern long curs_mesg_suppress_turn; /* from cursmesg.c */
|
extern long curs_mesg_suppress_turn; /* from cursmesg.c */
|
||||||
|
|
||||||
/* Public functions for curses NetHack interface */
|
/* Public functions for curses NetHack interface */
|
||||||
@@ -183,6 +192,10 @@ curses_init_nhwindows(int *argcp UNUSED,
|
|||||||
if ((term_rows < 15) || (term_cols < 40)) {
|
if ((term_rows < 15) || (term_cols < 40)) {
|
||||||
panic("Terminal too small. Must be minumum 40 width and 15 height");
|
panic("Terminal too small. Must be minumum 40 width and 15 height");
|
||||||
}
|
}
|
||||||
|
/* during line input, deletes the most recently typed character */
|
||||||
|
erase_char = erasechar(); /* <delete>/<rubout> or possibly <backspace> */
|
||||||
|
/* during line input, deletes all typed characters */
|
||||||
|
kill_char = killchar(); /* ^U (back in prehistoric times, '@') */
|
||||||
|
|
||||||
curses_create_main_windows();
|
curses_create_main_windows();
|
||||||
curses_init_mesg_history();
|
curses_init_mesg_history();
|
||||||
|
|||||||
+10
-6
@@ -9,6 +9,10 @@
|
|||||||
#include "cursmesg.h"
|
#include "cursmesg.h"
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
|
/* defined in sys/<foo>/<foo>tty.c or cursmain.c as last resort;
|
||||||
|
set up by curses_init_nhwindows() */
|
||||||
|
extern char erase_char, kill_char;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Note: references to "More>>" mean ">>", the curses rendition of "--More--".
|
* Note: references to "More>>" mean ">>", the curses rendition of "--More--".
|
||||||
*/
|
*/
|
||||||
@@ -591,19 +595,19 @@ curses_message_win_getline(const char *prompt, char *answer, int buffer)
|
|||||||
#else
|
#else
|
||||||
ch = getch();
|
ch = getch();
|
||||||
#endif
|
#endif
|
||||||
#if 0 /* [erase_char (delete one character) and kill_char (delete all
|
curs_set(0);
|
||||||
* characters) are from tty and not currently set up for curses] */
|
|
||||||
if (ch == erase_char) {
|
if (erase_char && ch == erase_char) {
|
||||||
ch = '\177'; /* match switch-case below */
|
ch = '\177'; /* match switch-case below */
|
||||||
|
|
||||||
/* honor kill_char if it's ^U or similar, but not if it's '@' */
|
/* honor kill_char if it's ^U or similar, but not if it's '@' */
|
||||||
} else if (ch == kill_char && (ch < ' ' || ch >= '\177')) { /*ASCII*/
|
} else if (kill_char && ch == kill_char
|
||||||
|
&& (ch < ' ' || ch >= '\177')) { /*ASCII*/
|
||||||
if (len == 0) /* nothing to kill; just start over */
|
if (len == 0) /* nothing to kill; just start over */
|
||||||
continue;
|
continue;
|
||||||
ch = '\033'; /* get rid of all current input, then start over */
|
ch = '\033'; /* get rid of all current input, then start over */
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
curs_set(0);
|
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
case ERR: /* should not happen */
|
case ERR: /* should not happen */
|
||||||
*answer = '\0';
|
*answer = '\0';
|
||||||
|
|||||||
Reference in New Issue
Block a user