/****************************************************************************
- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
/*
- * $Id: curses.priv.h,v 1.314 2006/12/10 00:55:14 tom Exp $
+ * $Id: curses.priv.h,v 1.325 2007/03/10 23:43:50 tom Exp $
*
* curses.priv.h
*
* delays and expansion in raw mode.
*/
-struct tries {
- struct tries *child; /* ptr to child. NULL if none */
- struct tries *sibling; /* ptr to sibling. NULL if none */
+#define TRIES struct tries
+typedef TRIES {
+ TRIES *child; /* ptr to child. NULL if none */
+ TRIES *sibling; /* ptr to sibling. NULL if none */
unsigned char ch; /* character at this node */
unsigned short value; /* code of string so far. 0 if none. */
-};
+#undef TRIES
+} TRIES;
/*
* Common/troublesome character definitions
#define wbkgrnd wbkgd
#endif
+#undef NCURSES_OPAQUE
+#define NCURSES_INTERNALS 1
+#define NCURSES_OPAQUE 0
+
#include <curses.h> /* we'll use -Ipath directive to get the right one! */
#include <term.h>
#include <term_entry.h>
#define GET_SCREEN_PAIR(s) GetPair(SCREEN_ATTRS(s))
#define SET_SCREEN_PAIR(s,p) SetPair(SCREEN_ATTRS(s), p)
+#if USE_REENTRANT
+#define SET_LINES(value) SP->_LINES = value
+#define SET_COLS(value) SP->_COLS = value
+#else
+#define SET_LINES(value) LINES = value
+#define SET_COLS(value) COLS = value
+#endif
+
/*
* Definitions for color pairs
*/
bool _buffered; /* setvbuf uses _setbuf data */
int _checkfd; /* filedesc for typeahead check */
TERMINAL *_term; /* terminal type information */
- short _lines; /* screen lines */
- short _columns; /* screen columns */
+ TTY _saved_tty; /* savetty/resetty information */
+ NCURSES_SIZE_T _lines; /* screen lines */
+ NCURSES_SIZE_T _columns; /* screen columns */
- short _lines_avail; /* lines available for stdscr */
- short _topstolen; /* lines stolen from top */
+ 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 *_newscr; /* virtual screen to be updated to */
WINDOW *_stdscr; /* screen's full-window context */
- struct tries *_keytry; /* "Try" for use with keypad mode */
- struct tries *_key_ok; /* Disabled keys via keyok(,FALSE) */
+ TRIES *_keytry; /* "Try" for use with keypad mode */
+ TRIES *_key_ok; /* Disabled keys via keyok(,FALSE) */
bool _tried; /* keypad mode was initialized */
bool _keypad_on; /* keypad mode is currently on */
unsigned long *oldhash, *newhash;
HASHMAP *hashtab;
int hashtab_len;
+ int *_oldnum_list;
+ int _oldnum_size;
bool _cleanup; /* cleanup after int/quit signal */
int (*_outch)(int); /* output handler if not putc */
int _legacy_coding; /* see use_legacy_coding() */
+#if USE_REENTRANT
+ char _ttytype[NAMESIZE];
+ int _ESCDELAY;
+ int _TABSIZE;
+ int _LINES;
+ int _COLS;
+#endif
/*
* ncurses/ncursesw are the same up to this point.
*/
extern NCURSES_EXPORT(int) _nc_unicode_locale(void);
extern NCURSES_EXPORT(int) _nc_locale_breaks_acs(void);
extern NCURSES_EXPORT(int) _nc_setupterm(NCURSES_CONST char *, int, int *, bool);
+extern NCURSES_EXPORT(void) _nc_get_screensize(int *, int *);
/* lib_tstp.c */
#if USE_SIGWINCH
extern NCURSES_EXPORT(char *) _nc_printf_string (const char *, va_list);
/* tries.c */
-extern NCURSES_EXPORT(void) _nc_add_to_try (struct tries **, const char *, unsigned);
-extern NCURSES_EXPORT(char *) _nc_expand_try (struct tries *, unsigned, int *, size_t);
-extern NCURSES_EXPORT(int) _nc_remove_key (struct tries **, unsigned);
-extern NCURSES_EXPORT(int) _nc_remove_string (struct tries **, const char *);
+extern NCURSES_EXPORT(int) _nc_add_to_try (TRIES **, const char *, unsigned);
+extern NCURSES_EXPORT(char *) _nc_expand_try (TRIES *, unsigned, int *, size_t);
+extern NCURSES_EXPORT(int) _nc_remove_key (TRIES **, unsigned);
+extern NCURSES_EXPORT(int) _nc_remove_string (TRIES **, const char *);
/* elsewhere ... */
extern NCURSES_EXPORT(ENTRY *) _nc_delink_entry(ENTRY *, TERMTYPE *);
extern NCURSES_EXPORT(void) _nc_set_buffer (FILE *, bool);
extern NCURSES_EXPORT(void) _nc_signal_handler (bool);
extern NCURSES_EXPORT(void) _nc_synchook (WINDOW *);
-extern NCURSES_EXPORT(void) _nc_trace_tries (struct tries *);
+extern NCURSES_EXPORT(void) _nc_trace_tries (TRIES *);
#if NO_LEAKS
extern NCURSES_EXPORT(void) _nc_alloc_entry_leaks(void);