From da992ca886ca526d58536b91501581d89284e848 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 17 Feb 2019 01:15:30 -1100 Subject: [PATCH] Fixes --- src/cc/rogue/cursesd.c | 3 ++- src/cc/rogue/cursesd.h | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/cc/rogue/cursesd.c b/src/cc/rogue/cursesd.c index 76760c3f9..8462532b9 100644 --- a/src/cc/rogue/cursesd.c +++ b/src/cc/rogue/cursesd.c @@ -23,6 +23,7 @@ WINDOW *newwin(int32_t nlines,int32_t ncols,int32_t begin_y,int32_t begin_x) WINDOW *scr = 0; if ( nlines == LINES && ncols == COLS && begin_y == 0 && begin_x == 0 ) scr = (WINDOW *)calloc(1,sizeof(*stdscr)); + curscr = scr; return(scr); } @@ -400,7 +401,7 @@ char killchar(void) return(3); } -int32_t mvgetnstr(int32_t y, int32_t x, char *str, int32_t n) // stub +int32_t wgetnstr(WINDOW *win, char *str, int32_t n) // stub { fprintf(stderr,"unexpected and unsupported call to mvgetnstr\n"); return(0); diff --git a/src/cc/rogue/cursesd.h b/src/cc/rogue/cursesd.h index 0cbb2cc01..57cb51237 100644 --- a/src/cc/rogue/cursesd.h +++ b/src/cc/rogue/cursesd.h @@ -41,7 +41,7 @@ struct cursesd_info uint8_t screen[LINES][COLS]; int32_t x,y; }; -extern WINDOW *stdscr; +extern WINDOW *stdscr,*curscr; typedef struct cursesd_info WINDOW; typedef char chtype; @@ -111,7 +111,7 @@ int32_t mvaddnstr(int32_t y, int32_t x, const char *str, int32_t n); int32_t mvwaddstr(WINDOW *win, int32_t y, int32_t x, const char *str); int32_t mvwaddnstr(WINDOW *win, int32_t y, int32_t x, const char *str, int32_t n); -int32_t mvgetnstr(int32_t y, int32_t x, char *str, int32_t n); // stub +int32_t wgetnstr(WINDOW *win, char *str, int32_t n); // stub int32_t printw(char *fmt,...); int32_t wprintw(WINDOW *win,char *fmt,...); int32_t mvprintw(int32_t y,int32_t x,char *fmt,...); @@ -122,7 +122,7 @@ int32_t mvwprintw(WINDOW *win,int32_t y,int32_t x,char *fmt,...); #define unctrl(a) "^x" #define getmaxx(a) COLS #define getmaxy(a) LINES -#define getxy(win,y,x) y = win->y, x = win->x +#define getyx(win,y,x) y = win->y, x = win->x // functions with only visible effects #define wrefresh(win) 0