X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fcurses.priv.h;h=973eb998e3fd8119840df419306f7eeadcf68d64;hp=31fabb1738ca7ead9ad0a97b208435dcd3538d5b;hb=aabbbcb7892fd946828a4170378b13b9d12435c6;hpb=a1aff38c9421e79f92cd4e8ab0587fdf3806cc28;ds=inline diff --git a/ncurses/curses.priv.h b/ncurses/curses.priv.h index 31fabb17..973eb998 100644 --- a/ncurses/curses.priv.h +++ b/ncurses/curses.priv.h @@ -34,7 +34,7 @@ /* - * $Id: curses.priv.h,v 1.334 2007/06/09 17:21:53 tom Exp $ + * $Id: curses.priv.h,v 1.340 2007/09/08 21:44:40 tom Exp $ * * curses.priv.h * @@ -300,6 +300,25 @@ color_t; #define SET_COLS(value) COLS = value #endif +#ifdef USE_PTHREADS +#if USE_REENTRANT +#include +#define _nc_lock_global(name) pthread_mutex_lock(&_nc_globals.mutex_##name) +#define _nc_unlock_global(name) pthread_mutex_unlock(&_nc_globals.mutex_##name) +#else +#error POSIX threads requires --enable-reentrant option +#endif +#else +#define _nc_lock_global(name) /* nothing */ +#define _nc_unlock_global(name) /* nothing */ +#endif + +#define _nc_lock_screen(name) /* nothing */ +#define _nc_unlock_screen(name) /* nothing */ + +#define _nc_lock_window(name) /* nothing */ +#define _nc_unlock_window(name) /* nothing */ + /* * Definitions for color pairs */ @@ -536,6 +555,12 @@ typedef struct { #endif /* USE_TERMLIB */ #endif /* TRACE */ + +#ifdef USE_PTHREADS + pthread_mutex_t mutex_set_SP; + pthread_mutex_t mutex_use_screen; + pthread_mutex_t mutex_windowlist; +#endif } NCURSES_GLOBALS; extern NCURSES_EXPORT_VAR(NCURSES_GLOBALS) _nc_globals; @@ -556,6 +581,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; @@ -1260,6 +1287,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); @@ -1393,6 +1435,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);