X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fcurses.priv.h;h=6252973b27f43d756d0be0ac1da69bef3450a72f;hp=931b0fa51a0ee023ab0f400eba6378df35fd931a;hb=f7b8e526e024ce141e61633e966255400de67772;hpb=2c829dd4faf4c7933e06804793e84079300e34e9 diff --git a/ncurses/curses.priv.h b/ncurses/curses.priv.h index 931b0fa5..6252973b 100644 --- a/ncurses/curses.priv.h +++ b/ncurses/curses.priv.h @@ -34,7 +34,7 @@ /* - * $Id: curses.priv.h,v 1.332 2007/05/26 18:47:51 tom Exp $ + * $Id: curses.priv.h,v 1.338 2007/09/01 21:35:50 tom Exp $ * * curses.priv.h * @@ -214,6 +214,8 @@ typedef TRIES { /* * Common/troublesome character definitions */ +#define StringOf(ch) {ch, 0} + #define L_BRACE '{' #define R_BRACE '}' #define S_QUOTE '\'' @@ -298,6 +300,19 @@ color_t; #define SET_COLS(value) COLS = value #endif +#ifdef USE_PTHREADS +#if USE_REENTRANT +#include +#define _nc_lock_mutex(name) pthread_mutex_lock(&_nc_globals.mutex_##name) +#define _nc_unlock_mutex(name) pthread_mutex_unlock(&_nc_globals.mutex_##name) +#else +#error POSIX threads requires --enable-reentrant option +#endif +#else +#define _nc_lock_mutex(name) /* nothing */ +#define _nc_unlock_mutex(name) /* nothing */ +#endif + /* * Definitions for color pairs */ @@ -534,6 +549,10 @@ typedef struct { #endif /* USE_TERMLIB */ #endif /* TRACE */ + +#ifdef USE_PTHREADS + pthread_mutex_t mutex_set_SP; +#endif } NCURSES_GLOBALS; extern NCURSES_EXPORT_VAR(NCURSES_GLOBALS) _nc_globals; @@ -554,6 +573,8 @@ typedef struct { TTY *saved_tty; /* savetty/resetty information */ #if BROKEN_LINKER || USE_REENTRANT chtype *real_acs_map; + int _LINES; + int _COLS; #endif } NCURSES_PRESCREEN; @@ -893,9 +914,9 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch; #define NulChar 0,0,0,0 /* FIXME: see CCHARW_MAX */ #define CharOf(c) ((c).chars[0]) #define AttrOf(c) ((c).attr) -#define AddAttr(c,a) AttrOf(c) |= ((a) & A_ATTRIBUTES) +#define AddAttr(c,a) AttrOf(c) |= ((a) & A_ATTRIBUTES) #define RemAttr(c,a) AttrOf(c) &= ~((a) & A_ATTRIBUTES) -#define SetAttr(c,a) AttrOf(c) = ((a) & A_ATTRIBUTES) +#define SetAttr(c,a) AttrOf(c) = ((a) & A_ATTRIBUTES) | WidecExt(c) #define NewChar2(c,a) { a, { c, NulChar } NulColor } #define NewChar(ch) NewChar2(ChCharOf(ch), ChAttrOf(ch)) #define CharEq(a,b) (!memcmp(&(a), &(b), sizeof(a))) @@ -1258,6 +1279,21 @@ extern NCURSES_EXPORT(int) _nc_to_char(wint_t); extern NCURSES_EXPORT(wint_t) _nc_to_widechar(int); #endif +/* comp_captab.c */ +typedef struct { + short nte_name; /* offset of name to hash on */ + int nte_type; /* BOOLEAN, NUMBER or STRING */ + short nte_index; /* index of associated variable in its array */ + short nte_link; /* index in table of next hash, or -1 */ +} name_table_data; + +typedef struct +{ + short from; + short to; + short source; +} alias_table_data; + /* doupdate.c */ #if USE_XMC_SUPPORT extern NCURSES_EXPORT(void) _nc_do_xmc_glitch (attr_t); @@ -1391,6 +1427,7 @@ extern NCURSES_EXPORT(void) _nc_trace_tries (TRIES *); #if NO_LEAKS extern NCURSES_EXPORT(void) _nc_alloc_entry_leaks(void); extern NCURSES_EXPORT(void) _nc_captoinfo_leaks(void); +extern NCURSES_EXPORT(void) _nc_comp_captab_leaks(void); extern NCURSES_EXPORT(void) _nc_comp_scan_leaks(void); extern NCURSES_EXPORT(void) _nc_keyname_leaks(void); extern NCURSES_EXPORT(void) _nc_tgetent_leaks(void);