/*
- * $Id: curses.priv.h,v 1.330 2007/04/21 23:52:28 tom Exp $
+ * $Id: curses.priv.h,v 1.337 2007/08/12 13:14:12 tom Exp $
*
* curses.priv.h
*
/*
* Common/troublesome character definitions
*/
+#define StringOf(ch) {ch, 0}
+
#define L_BRACE '{'
#define R_BRACE '}'
#define S_QUOTE '\''
typedef struct {
int line; /* lines to take, < 0 => from bottom*/
int (*hook)(WINDOW *, int); /* callback for user */
- WINDOW *w; /* maybe we need this for cleanup */
} ripoff_t;
#if USE_GPM_SUPPORT
extern NCURSES_EXPORT_VAR(NCURSES_GLOBALS) _nc_globals;
+#define N_RIPS 5
+
/*
* Global data which is swept up into a SCREEN when one is created.
* It may be modified before the next SCREEN is created.
bool use_env;
bool filter_mode;
attr_t previous_attr;
- ripoff_t rippedoff[5];
+ ripoff_t rippedoff[N_RIPS];
ripoff_t *rsp;
TPARM_STATE tparm_state;
+ TTY *saved_tty; /* savetty/resetty information */
#if BROKEN_LINKER || USE_REENTRANT
chtype *real_acs_map;
+ int _LINES;
+ int _COLS;
#endif
} NCURSES_PRESCREEN;
NCURSES_SIZE_T _lines_avail; /* lines available for stdscr */
NCURSES_SIZE_T _topstolen; /* lines stolen from top */
- ripoff_t _rippedoff[5]; /* list of lines stolen */
- int _rip_count; /* ...and total lines stolen */
WINDOW *_curscr; /* current screen */
WINDOW *_newscr; /* virtual screen to be updated to */
#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)))
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);