This commit is contained in:
jl777
2019-02-17 01:15:30 -11:00
parent bc1fc144ae
commit da992ca886
2 changed files with 5 additions and 4 deletions

View File

@@ -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);

View File

@@ -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