-typedef struct {
- const char *name;
- char *value;
-} ITERATOR_VARS;
-
-/*
- * Global data which is not specific to a screen.
- */
-typedef struct {
- SIG_ATOMIC_T have_sigtstp;
- SIG_ATOMIC_T have_sigwinch;
- SIG_ATOMIC_T cleanup_nested;
-
- bool init_signals;
- bool init_screen;
-
- char *comp_sourcename;
- char *comp_termtype;
-
- bool have_tic_directory;
- bool keep_tic_directory;
- const char *tic_directory;
-
- char *dbi_list;
- int dbi_size;
-
- char *first_name;
- char **keyname_table;
- int init_keyname;
-
- int slk_format;
-
- int getstr_limit; /* getstr_limit based on POSIX LINE_MAX */
-
- char *safeprint_buf;
- size_t safeprint_used;
-
- TGETENT_CACHE tgetent_cache[TGETENT_MAX];
- int tgetent_index;
- long tgetent_sequence;
-
- char *dbd_blob; /* string-heap for dbd_list[] */
- char **dbd_list; /* distinct places to look for data */
- int dbd_size; /* length of dbd_list[] */
- time_t dbd_time; /* cache last updated */
- ITERATOR_VARS dbd_vars[dbdLAST];
-
-#ifdef USE_TERM_DRIVER
- int (*term_driver)(struct DriverTCB*, const char*, int*);
-#endif
-
-#ifndef USE_SP_WINDOWLIST
- WINDOWLIST *_nc_windowlist;
-#define WindowList(sp) _nc_globals._nc_windowlist
-#endif
-
-#if USE_HOME_TERMINFO
- char *home_terminfo;
-#endif
-
-#if !USE_SAFE_SPRINTF
- int safeprint_cols;
- int safeprint_rows;
-#endif
-
-#ifdef USE_PTHREADS
- pthread_mutex_t mutex_curses;
- pthread_mutex_t mutex_prescreen;
- pthread_mutex_t mutex_screen;
- pthread_mutex_t mutex_update;
- pthread_mutex_t mutex_tst_tracef;
- pthread_mutex_t mutex_tracef;
- int nested_tracef;
- int use_pthreads;
-#define _nc_use_pthreads _nc_globals.use_pthreads
-#if USE_PTHREADS_EINTR
- pthread_t read_thread; /* The reading thread */
-#endif
-#endif
-#if USE_WIDEC_SUPPORT
- char key_name[MB_LEN_MAX + 1];
-#endif
-
-#ifdef TRACE
- bool trace_opened;
- char trace_fname[PATH_MAX];
- int trace_level;
- FILE *trace_fp;
- int trace_fd;
-
- char *tracearg_buf;
- size_t tracearg_used;
-
- TRACEBUF *tracebuf_ptr;
- size_t tracebuf_used;
-
- char tracechr_buf[40];
-
- char *tracedmp_buf;
- size_t tracedmp_used;
-
- unsigned char *tracetry_buf;
- size_t tracetry_used;
-
- char traceatr_color_buf[2][80];
- int traceatr_color_sel;
- int traceatr_color_last;
-#if !defined(USE_PTHREADS) && USE_REENTRANT
- int nested_tracef;
-#endif
-#endif /* TRACE */
-
-#if NO_LEAKS
- bool leak_checking;
-#endif
-} NCURSES_GLOBALS;
-