X-Git-Url: https://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=ncurses%2Fcurses.priv.h;h=a978f2986eeeaccc7c18a76f9942387cb72b507e;hb=d4ede7c5fa6a269d338fea32cd93bf39083dda8c;hp=f6d4c47b840062b51c0d4dc75439d6bb0b96ef44;hpb=18865150079f74b17047633094e3994516af8a41;p=ncurses.git diff --git a/ncurses/curses.priv.h b/ncurses/curses.priv.h index f6d4c47b..a978f298 100644 --- a/ncurses/curses.priv.h +++ b/ncurses/curses.priv.h @@ -35,7 +35,7 @@ /* - * $Id: curses.priv.h,v 1.417 2009/05/23 23:01:44 tom Exp $ + * $Id: curses.priv.h,v 1.421 2009/06/06 18:12:52 tom Exp $ * * curses.priv.h * @@ -340,6 +340,7 @@ color_t; #endif #else /* !(NCURSES_EXT_COLORS && USE_WIDEC_SUPPORT) */ + #define if_EXT_COLORS(stmt) /* nothing */ #define SetPair(value,p) RemAttr(value, A_COLOR), \ SetAttr(value, AttrOf(value) | (A_COLOR & COLOR_PAIR(p))) @@ -374,17 +375,31 @@ extern NCURSES_EXPORT(void) _nc_set_no_padding(SCREEN *); #define SET_SCREEN_PAIR(s,p) SetPair(SCREEN_ATTRS(s), p) #if USE_REENTRANT -NCURSES_EXPORT(int *) _nc_ptr_Lines (void); -NCURSES_EXPORT(int *) _nc_ptr_Cols (void); + +NCURSES_EXPORT(int *) _nc_ptr_Lines (SCREEN *); +NCURSES_EXPORT(int *) _nc_ptr_Cols (SCREEN *); +NCURSES_EXPORT(int *) _nc_ptr_Tabsize (SCREEN *); +NCURSES_EXPORT(int *) _nc_ptr_Escdelay (SCREEN *); + #define ptrLines(sp) (sp ? &(sp->_LINES) : &(_nc_prescreen._LINES)) #define ptrCols(sp) (sp ? &(sp->_COLS) : &(_nc_prescreen._COLS)) -#define SET_LINES(value) *_nc_ptr_Lines() = value -#define SET_COLS(value) *_nc_ptr_Cols() = value +#define ptrTabsize(sp) (sp ? &(sp->_TABSIZE) : &(_nc_prescreen._TABSIZE)) +#define ptrEscdelay(sp) (sp ? &(sp->_ESCDELAY) : &(_nc_prescreen._ESCDELAY)) + +#define SET_LINES(value) *_nc_ptr_Lines(SP_PARM) = value +#define SET_COLS(value) *_nc_ptr_Cols(SP_PARM) = value +#define SET_TABSIZE(value) *_nc_ptr_Tabsize(SP_PARM) = value +#define SET_ESCDELAY(value) *_nc_ptr_Escdelay(SP_PARM) = value + #else + #define ptrLines(sp) &LINES #define ptrCols(sp) &COLS #define SET_LINES(value) LINES = value #define SET_COLS(value) COLS = value +#define SET_TABSIZE(value) TABSIZE = value +#define SET_ESCDELAY(value) ESCDELAY = value + #endif #define TR_MUTEX(data) _tracef("%s@%d: me:%08lX COUNT:%2u/%2d/%6d/%2d/%s%9u: " #data, \ @@ -760,6 +775,8 @@ typedef struct { chtype *real_acs_map; int _LINES; int _COLS; + int _TABSIZE; + int _ESCDELAY; TERMINAL *_cur_term; #ifdef TRACE long _outchars; @@ -916,6 +933,7 @@ struct screen { */ bool _nc_sp_idlok; bool _nc_sp_idcok; + #define _nc_idlok SP->_nc_sp_idlok #define _nc_idcok SP->_nc_sp_idcok @@ -971,7 +989,7 @@ struct screen { * This supports automatic resizing */ #if USE_SIZECHANGE - int (*_resize)(int,int); + int (*_resize)(NCURSES_SP_DCLx int y, int x); #endif /* @@ -1622,7 +1640,7 @@ extern NCURSES_EXPORT(bool) _nc_reset_colors(void); extern NCURSES_EXPORT(int) _nc_wgetch(WINDOW *, unsigned long *, int EVENTLIST_2nd(_nc_eventlist *)); /* lib_insch.c */ -extern NCURSES_EXPORT(int) _nc_insert_ch(WINDOW *, chtype); +extern NCURSES_EXPORT(int) _nc_insert_ch(SCREEN *, WINDOW *, chtype); /* lib_mvcur.c */ #define INFINITY 1000000 /* cost: too high to use */ @@ -1651,6 +1669,9 @@ extern NCURSES_EXPORT(int) _nc_locale_breaks_acs(TERMINAL *); extern NCURSES_EXPORT(int) _nc_setupterm(NCURSES_CONST char *, int, int *, bool); extern NCURSES_EXPORT(void) _nc_get_screensize(SCREEN *, int *, int *); +/* lib_set_term.c */ +extern NCURSES_EXPORT(int) _nc_ripoffline(int, int(*)(WINDOW*, int)); + /* lib_tstp.c */ #if USE_SIGWINCH extern NCURSES_EXPORT(int) _nc_handle_sigwinch(SCREEN *); @@ -1785,8 +1806,9 @@ extern NCURSES_EXPORT_VAR(int *) _nc_oldnums; * On systems with a broken linker, define 'SP' as a function to force the * linker to pull in the data-only module with 'SP'. */ +#define _nc_alloc_screen_sp() typeCalloc(SCREEN, 1) + #if BROKEN_LINKER -#define SP _nc_screen() extern NCURSES_EXPORT(SCREEN *) _nc_screen (void); extern NCURSES_EXPORT(int) _nc_alloc_screen (void); extern NCURSES_EXPORT(void) _nc_set_screen (SCREEN *); @@ -1795,7 +1817,7 @@ extern NCURSES_EXPORT(void) _nc_set_screen (SCREEN *); /* current screen is private data; avoid possible linking conflicts too */ extern NCURSES_EXPORT_VAR(SCREEN *) SP; #define CURRENT_SCREEN SP -#define _nc_alloc_screen() ((SP = typeCalloc(SCREEN, 1)) != 0) +#define _nc_alloc_screen() ((SP = _nc_alloc_screen_sp()) != 0) #define _nc_set_screen(sp) SP = sp #endif @@ -1832,8 +1854,6 @@ extern NCURSES_EXPORT(int) _nc_format_slks (SCREEN *, int); #define MAX_SKEY(fmt) (SLK_STDFMT(fmt)? MAX_SKEY_OLD : MAX_SKEY_PC) #define MAX_SKEY_LEN(fmt) (SLK_STDFMT(fmt)? MAX_SKEY_LEN_OLD : MAX_SKEY_LEN_PC) -extern NCURSES_EXPORT(int) _nc_ripoffline (int line, int (*init)(WINDOW *,int)); - /* * Common error messages */ @@ -1995,9 +2015,6 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_set_tabsize)(SCREEN*, int); * We put the safe versions of various calls here as they are not published * part of the API up to now */ -extern NCURSES_EXPORT(SCREEN*) _nc_SP(void); - -extern NCURSES_EXPORT(TERMINAL*) NCURSES_SP_NAME(_nc_set_curterm)(SCREEN*,TERMINAL*); extern NCURSES_EXPORT(TERMINAL*) NCURSES_SP_NAME(cur_term)(SCREEN *sp); extern NCURSES_EXPORT(WINDOW *) NCURSES_SP_NAME(_nc_makenew) (SCREEN*, int, int, int, int, int); extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(_nc_reset_colors)(SCREEN*);