/*
- * $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
*
#define SET_COLS(value) COLS = value
#endif
+#ifdef USE_PTHREADS
+#if USE_REENTRANT
+#include <pthread.h>
+#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
*/
#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;
TTY *saved_tty; /* savetty/resetty information */
#if BROKEN_LINKER || USE_REENTRANT
chtype *real_acs_map;
+ int _LINES;
+ int _COLS;
#endif
} NCURSES_PRESCREEN;
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);
#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);