mirror of
https://github.com/VARCem/PDCurses.git
synced 2026-09-25 08:15:27 +00:00
and this
This commit is contained in:
3
curses.h
3
curses.h
@@ -28,7 +28,7 @@ Defined by this header:
|
||||
**man-end****************************************************************/
|
||||
|
||||
#define PDCURSES 1 /* PDCurses-only routines */
|
||||
#define PDC_BUILD 3807
|
||||
#define PDC_BUILD 3808
|
||||
#define PDC_VER_MAJOR 3
|
||||
#define PDC_VER_MINOR 8
|
||||
#define PDC_VERDOT "3.8"
|
||||
@@ -357,6 +357,7 @@ typedef struct
|
||||
#endif
|
||||
short line_color; /* color of line attributes - default -1 */
|
||||
attr_t termattrs; /* attribute capabilities */
|
||||
WINDOW *lastscr; /* the last screen image */
|
||||
bool color_started; /* TRUE after start_color() */
|
||||
bool dirty; /* redraw on napms() after init_color() */
|
||||
} SCREEN;
|
||||
|
||||
@@ -42,7 +42,6 @@ typedef struct /* structure for ripped off lines */
|
||||
#define _DWCHAR 0x17 /* Delete Word char (^W) */
|
||||
#define _DLCHAR 0x15 /* Delete Line char (^U) */
|
||||
|
||||
extern WINDOW *pdc_lastscr;
|
||||
extern FILE *pdc_dbfp; /* tracing file pointer (NULL = off) */
|
||||
extern unsigned long pdc_key_modifiers;
|
||||
extern MOUSE_STATUS pdc_mouse_status;
|
||||
|
||||
@@ -106,7 +106,6 @@ const char *_curses_notice = "PDCurses " PDC_VERDOT " - " __DATE__;
|
||||
SCREEN *SP = (SCREEN*)NULL; /* curses variables */
|
||||
WINDOW *curscr = (WINDOW *)NULL; /* the current screen image */
|
||||
WINDOW *stdscr = (WINDOW *)NULL; /* the default screen window */
|
||||
WINDOW *pdc_lastscr = (WINDOW *)NULL; /* the last screen image */
|
||||
|
||||
int LINES = 0; /* current terminal height */
|
||||
int COLS = 0; /* current terminal width */
|
||||
@@ -149,6 +148,7 @@ WINDOW *Xinitscr(int argc, char *argv[])
|
||||
SP->linesrippedoffontop = 0;
|
||||
SP->delaytenths = 0;
|
||||
SP->line_color = -1;
|
||||
SP->lastscr = (WINDOW *)NULL;
|
||||
SP->color_started = FALSE;
|
||||
SP->dirty = FALSE;
|
||||
|
||||
@@ -171,15 +171,15 @@ WINDOW *Xinitscr(int argc, char *argv[])
|
||||
exit(2);
|
||||
}
|
||||
|
||||
pdc_lastscr = newwin(LINES, COLS, 0, 0);
|
||||
if (!pdc_lastscr)
|
||||
SP->lastscr = newwin(LINES, COLS, 0, 0);
|
||||
if (!SP->lastscr)
|
||||
{
|
||||
fprintf(stderr, "initscr(): Unable to create pdc_lastscr.\n");
|
||||
fprintf(stderr, "initscr(): Unable to create SP->lastscr.\n");
|
||||
exit(2);
|
||||
}
|
||||
|
||||
wattrset(pdc_lastscr, (chtype)(-1));
|
||||
werase(pdc_lastscr);
|
||||
wattrset(SP->lastscr, (chtype)(-1));
|
||||
werase(SP->lastscr);
|
||||
|
||||
PDC_slk_initialize();
|
||||
LINES -= SP->slklines;
|
||||
@@ -294,10 +294,10 @@ void delscreen(SCREEN *sp)
|
||||
|
||||
delwin(stdscr);
|
||||
delwin(curscr);
|
||||
delwin(pdc_lastscr);
|
||||
delwin(SP->lastscr);
|
||||
stdscr = (WINDOW *)NULL;
|
||||
curscr = (WINDOW *)NULL;
|
||||
pdc_lastscr = (WINDOW *)NULL;
|
||||
SP->lastscr = (WINDOW *)NULL;
|
||||
|
||||
SP->alive = FALSE;
|
||||
|
||||
@@ -319,10 +319,10 @@ int resize_term(int nlines, int ncols)
|
||||
|
||||
if (wresize(curscr, SP->lines, SP->cols) == ERR ||
|
||||
wresize(stdscr, LINES, COLS) == ERR ||
|
||||
wresize(pdc_lastscr, SP->lines, SP->cols) == ERR)
|
||||
wresize(SP->lastscr, SP->lines, SP->cols) == ERR)
|
||||
return ERR;
|
||||
|
||||
werase(pdc_lastscr);
|
||||
werase(SP->lastscr);
|
||||
curscr->_clear = TRUE;
|
||||
|
||||
if (SP->slk_winptr)
|
||||
|
||||
@@ -132,7 +132,7 @@ int doupdate(void)
|
||||
|
||||
PDC_LOG(("doupdate() - called\n"));
|
||||
|
||||
if (!curscr)
|
||||
if (!SP || !curscr)
|
||||
return ERR;
|
||||
|
||||
if (isendwin()) /* coming back after endwin() called */
|
||||
@@ -155,7 +155,7 @@ int doupdate(void)
|
||||
int first, last;
|
||||
|
||||
chtype *src = curscr->_y[y];
|
||||
chtype *dest = pdc_lastscr->_y[y];
|
||||
chtype *dest = SP->lastscr->_y[y];
|
||||
|
||||
if (clearall)
|
||||
{
|
||||
@@ -187,7 +187,7 @@ int doupdate(void)
|
||||
)
|
||||
len++;
|
||||
|
||||
/* update the screen, and pdc_lastscr */
|
||||
/* update the screen, and SP->lastscr */
|
||||
|
||||
if (len)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user