From db50762b5cd84439904e55d0f1d8515b84b24653 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 17 Feb 2019 01:59:19 -1100 Subject: [PATCH] md_readchar --- src/cc/rogue/cursesd.c | 7 +++++++ src/cc/rogue/cursesd.h | 4 ++++ src/cc/rogue/mdport.c | 4 +++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/cc/rogue/cursesd.c b/src/cc/rogue/cursesd.c index c89a713ae..c7a28fc62 100644 --- a/src/cc/rogue/cursesd.c +++ b/src/cc/rogue/cursesd.c @@ -17,6 +17,7 @@ static int32_t endwinflag; WINDOW *stdscr; +int32_t ESCDELAY; WINDOW *newwin(int32_t nlines,int32_t ncols,int32_t begin_y,int32_t begin_x) { @@ -413,3 +414,9 @@ int32_t getch(void) return(0); } +int32_t md_readchar(void) +{ + fprintf(stderr,"unexpected and unsupported call to md_readchar\n"); + return(0); +} + diff --git a/src/cc/rogue/cursesd.h b/src/cc/rogue/cursesd.h index 53d928ad0..4fa09e9d9 100644 --- a/src/cc/rogue/cursesd.h +++ b/src/cc/rogue/cursesd.h @@ -36,6 +36,8 @@ #include #include +#define ERR (-1) + struct cursesd_info { uint8_t screen[LINES][COLS]; @@ -43,9 +45,11 @@ struct cursesd_info }; typedef struct cursesd_info WINDOW; extern WINDOW *stdscr,*curscr; +extern int32_t ESCDELAY; typedef char chtype; int32_t getch(void); // stub +int32_t md_readchar(void); // stub WINDOW *initscr(void); int32_t endwin(void); diff --git a/src/cc/rogue/mdport.c b/src/cc/rogue/mdport.c index 899f5d9db..841dffbb8 100644 --- a/src/cc/rogue/mdport.c +++ b/src/cc/rogue/mdport.c @@ -1081,6 +1081,7 @@ md_setsuspchar(int c) #define M_KEYPAD 2 #define M_TRAIL 3 +#ifndef BUILD_ROGUE int md_readchar() { @@ -1320,7 +1321,8 @@ md_readchar() return(ch & 0x7F); } - +#endif + #if defined(LOADAV) && defined(HAVE_NLIST_H) && defined(HAVE_NLIST) /* * loadav: