Curses: enable debug fuzzer
This commit is contained in:
@@ -297,7 +297,7 @@ curses_character_input_dialog(
|
|||||||
#ifdef PDCURSES
|
#ifdef PDCURSES
|
||||||
answer = wgetch(message_window);
|
answer = wgetch(message_window);
|
||||||
#else
|
#else
|
||||||
answer = getch();
|
answer = curses_read_char();
|
||||||
#endif
|
#endif
|
||||||
if (answer == ERR) {
|
if (answer == ERR) {
|
||||||
answer = def;
|
answer = def;
|
||||||
@@ -1487,7 +1487,7 @@ menu_get_selections(WINDOW *win, nhmenu *menu, int how)
|
|||||||
menu_display_page(menu, win, curpage, selectors, groupaccels);
|
menu_display_page(menu, win, curpage, selectors, groupaccels);
|
||||||
|
|
||||||
while (!dismiss) {
|
while (!dismiss) {
|
||||||
curletter = getch();
|
curletter = curses_read_char();
|
||||||
|
|
||||||
if (curletter == ERR) {
|
if (curletter == ERR) {
|
||||||
num_selected = -1;
|
num_selected = -1;
|
||||||
|
|||||||
@@ -1024,7 +1024,7 @@ void
|
|||||||
curses_delay_output(void)
|
curses_delay_output(void)
|
||||||
{
|
{
|
||||||
#ifdef TIMED_DELAY
|
#ifdef TIMED_DELAY
|
||||||
if (flags.nap) {
|
if (flags.nap && !iflags.debug_fuzzer) {
|
||||||
/* refreshing the whole display is a waste of time,
|
/* refreshing the whole display is a waste of time,
|
||||||
* but that's why we're here */
|
* but that's why we're here */
|
||||||
refresh();
|
refresh();
|
||||||
|
|||||||
@@ -226,7 +226,10 @@ curses_block(boolean noscroll) /* noscroll - blocking because of msgtype
|
|||||||
|
|
||||||
oldcrsr = curs_set(1);
|
oldcrsr = curs_set(1);
|
||||||
do {
|
do {
|
||||||
ret = wgetch(win);
|
if (iflags.debug_fuzzer)
|
||||||
|
ret = '\n';
|
||||||
|
else
|
||||||
|
ret = curses_read_char();
|
||||||
if (ret == ERR || ret == '\0')
|
if (ret == ERR || ret == '\0')
|
||||||
ret = '\n';
|
ret = '\n';
|
||||||
/* msgtype=stop should require space/enter rather than any key,
|
/* msgtype=stop should require space/enter rather than any key,
|
||||||
@@ -629,7 +632,7 @@ curses_message_win_getline(const char *prompt, char *answer, int buffer)
|
|||||||
#ifdef PDCURSES
|
#ifdef PDCURSES
|
||||||
ch = wgetch(win);
|
ch = wgetch(win);
|
||||||
#else
|
#else
|
||||||
ch = getch();
|
ch = curses_read_char();
|
||||||
#endif
|
#endif
|
||||||
curs_set(0);
|
curs_set(0);
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,10 @@ curses_read_char(void)
|
|||||||
/* cancel message suppression; all messages have had a chance to be read */
|
/* cancel message suppression; all messages have had a chance to be read */
|
||||||
curses_got_input();
|
curses_got_input();
|
||||||
|
|
||||||
ch = getch();
|
if (iflags.debug_fuzzer)
|
||||||
|
ch = randomkey();
|
||||||
|
else
|
||||||
|
ch = getch();
|
||||||
#if defined(ALT_0) || defined(ALT_9) || defined(ALT_A) || defined(ALT_Z)
|
#if defined(ALT_0) || defined(ALT_9) || defined(ALT_A) || defined(ALT_Z)
|
||||||
tmpch = ch;
|
tmpch = ch;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user