Back to index

tetex-bin  3.0
Classes | Defines | Enumerations | Functions | Variables
curses.priv.h File Reference
#include <ncurses_dll.h>
#include <ncurses_cfg.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <assert.h>
#include <stdio.h>
#include <errno.h>
#include <nc_panel.h>
#include <signal.h>
#include <curses.h>
#include <term.h>
#include <nc_alloc.h>

Go to the source code of this file.

Classes

struct  tries
struct  color_t
struct  ldat
struct  slk_ent
struct  SLK
struct  HASHMAP
struct  ripoff_t
struct  screen
struct  string_desc

Defines

#define MODULE_ID(id)   /*nothing*/
#define PATH_MAX   255 /* the Posix minimum path-size */
#define USE_FUNC_POLL   0
#define USE_GPM_SUPPORT   0
#define USE_QNX_MOUSE   0
#define USE_EMX_MOUSE   0
#define DEFAULT_MAXCLICK   166
#define EV_MAX   8 /* size of mouse circular event queue */
#define HAVE_SIZECHANGE   0
#define USE_SIZECHANGE   0
#define USE_SIGWINCH   0
#define use_terminfo_vars()   _nc_env_access()
#define USE_SCROLL_HINTS   1
#define if_USE_SCROLL_HINTS(stmt)   stmt
#define C_SHIFT   8 /* we need more bits than there are colors */
#define C_MASK   ((1 << C_SHIFT) - 1)
#define PAIR_OF(fg, bg)   ((((fg) & C_MASK) << C_SHIFT) | ((bg) & C_MASK))
#define L_BRACE   '{'
#define R_BRACE   '}'
#define S_QUOTE   '\''
#define D_QUOTE   '"'
#define VT_ACSC   "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~"
#define MAXCOLUMNS   135
#define MAXLINES   66
#define FIFO_SIZE   MAXCOLUMNS+2 /* for nocbreak mode input */
#define ACS_LEN   128
#define WINDOWLIST   struct _win_list
#define _nc_bkgd   _bkgd
#define wgetbkgrnd(win, wch)   *wch = win->_bkgd
#define wbkgrnd   wbkgd
#define _nc_idlok   SP->_nc_sp_idlok
#define _nc_idcok   SP->_nc_sp_idcok
#define _nc_windows   SP->_nc_sp_windows
#define WINDOW_EXT(win, field)   (((WINDOWLIST *)(win))->field)
#define UCHAR_MAX   255
#define is7bits(c)   ((unsigned)(c) < 128)
#define is8bits(c)   ((unsigned)(c) <= UCHAR_MAX)
#define min(a, b)   ((a) > (b) ? (b) : (a))
#define max(a, b)   ((a) < (b) ? (b) : (a))
#define STDIN_FILENO   0
#define STDOUT_FILENO   1
#define STDERR_FILENO   2
#define EXIT_SUCCESS   0
#define EXIT_FAILURE   1
#define R_OK   4 /* Test for read permission. */
#define W_OK   2 /* Test for write permission. */
#define X_OK   1 /* Test for execute permission. */
#define F_OK   0 /* Test for existence. */
#define O_BINARY   0
#define TRACE_OUTCHARS(n)   /* nothing */
#define UChar(c)   ((unsigned char)(c))
#define ChCharOf(c)   ((c) & (chtype)A_CHARTEXT)
#define ChAttrOf(c)   ((c) & (chtype)A_ATTRIBUTES)
#define MB_LEN_MAX   8 /* should be >= MB_CUR_MAX, but that may be a function */
#define CharOf(c)   ChCharOf(c)
#define AttrOf(c)   ChAttrOf(c)
#define AddAttr(c, a)   c |= a
#define RemAttr(c, a)   c &= ~(a & A_ATTRIBUTES)
#define SetAttr(c, a)   c = (c & ~A_ATTRIBUTES) | a
#define NewChar(ch)   (ch)
#define NewChar2(c, a)   (c | a)
#define CharEq(a, b)   (a == b)
#define SetChar(ch, c, a)   ch = c | a
#define CHREF(wch)   wch
#define CHDEREF(wch)   wch
#define ARG_CH_T   NCURSES_CH_T
#define CARG_CH_T   NCURSES_CH_T
#define PUTC_DATA   int data = 0
#define PUTC(a, b)   do { data = CharOf(ch); putc(data,b); } while (0)
#define BLANK   (' '|A_NORMAL)
#define ISBLANK(ch)   (CharOf(ch) == ' ')
#define isnac(ch)   (0)
#define if_WIDEC(code)   /* nothing */
#define L(ch)   ch
#define AttrOfD(ch)   AttrOf(CHDEREF(ch))
#define CharOfD(ch)   CharOf(CHDEREF(ch))
#define SetChar2(wch, ch)   SetChar(wch,ChCharOf(ch),ChAttrOf(ch))
#define BLANK_ATTR   A_NORMAL
#define BLANK_TEXT   L(' ')
#define CHANGED   -1
#define CHANGED_CELL(line, col)
#define CHANGED_RANGE(line, start, end)
#define CHANGED_TO_EOL(line, start, end)
#define SIZEOF(v)   (sizeof(v)/sizeof(v[0]))
#define FreeIfNeeded(p)   if ((p) != 0) free(p)
#define FreeAndNull(p)   free(p); p = 0
#define T_CALLED(fmt)   "called {" fmt
#define T_CREATE(fmt)   "create :" fmt
#define T_RETURN(fmt)   "return }" fmt
#define START_TRACE()   /* nothing */
#define T(a)
#define TR(n, a)
#define TPUTS_TRACE(s)
#define returnAttr(code)   return code
#define returnBits(code)   return code
#define returnBool(code)   return code
#define returnChar(code)   return code
#define returnCode(code)   return code
#define returnPtr(code)   return code
#define returnSP(code)   return code
#define returnVoid   return
#define returnWin(code)   return code
#define empty_module(name)
#define ALL_BUT_COLOR   ((chtype)~(A_COLOR))
#define IGNORE_COLOR_OFF   FALSE
#define NONBLANK_ATTR   (A_NORMAL|A_BOLD|A_DIM|A_BLINK)
#define XMC_CHANGES(c)   ((c) & SP->_xmc_suppress)
#define toggle_attr_on(S, at)
#define toggle_attr_off(S, at)
#define DelCharCost(count)
#define InsCharCost(count)
#define UpdateAttrs(a)
#define EVENTLIST_0th(param)   void
#define EVENTLIST_1st(param)   /* nothing */
#define EVENTLIST_2nd(param)   /* nothing */
#define getcwd(buf, len)   getwd(buf)
#define INFINITY   1000000 /* cost: too high to use */
#define INFINITY   1000000 /* cost: too high to use */
#define BAUDBYTE   9 /* 9 = 7 bits + 1 parity + 1 stop */
#define strstr   _nc_strstr
#define _nc_resize_margins(wp)   /* nothing */
#define wgetch_events(win, evl)   wgetch(win)
#define wgetnstr_events(win, str, maxlen, evl)   wgetnstr(win, str, maxlen)
#define USE_SETBUF_0   0
#define NC_BUFFERED(flag)   _nc_set_buffer(SP->_ofp, flag)
#define NC_OUTPUT   ((SP != 0) ? SP->_ofp : stdout)
#define _nc_alloc_screen()   ((SP = typeCalloc(SCREEN, 1)) != 0)
#define _nc_set_screen(sp)   SP = sp
#define screen_lines   SP->_lines
#define screen_columns   SP->_columns
#define MAX_SKEY_OLD   8 /* count of soft keys */
#define MAX_SKEY_LEN_OLD   8 /* max length of soft key text */
#define MAX_SKEY_PC   12 /* This is what most PC's have */
#define MAX_SKEY_LEN_PC   5
#define SLK_STDFMT(fmt)   (fmt < 3)
#define SLK_LINES(fmt)   (SLK_STDFMT(fmt) ? 1 : ((fmt) - 2))
#define MAX_SKEY(fmt)   (SLK_STDFMT(fmt)? MAX_SKEY_OLD : MAX_SKEY_PC)
#define MAX_SKEY_LEN(fmt)   (SLK_STDFMT(fmt)? MAX_SKEY_LEN_OLD : MAX_SKEY_LEN_PC)
#define MSG_NO_MEMORY   "Out of memory"
#define MSG_NO_INPUTS   "Premature EOF"

Enumerations

enum  MouseType { M_XTERM = -1, M_NONE = 0 }

Functions

 NCURSES_EXPORT (int) _nc_env_access(void)
 NCURSES_EXPORT_VAR (SCREEN *) _nc_screen_chain
 NCURSES_EXPORT (const char *) _nc_visbuf2(int
 NCURSES_EXPORT (void) _nc_expanded(void)
 NCURSES_EXPORT (bool) _nc_reset_colors(void)
unsigned long int EVENTLIST_2nd (_nc_eventlist *))
 NCURSES_EXPORT (char *) _nc_get_locale(void)
 NCURSES_EXPORT (string_desc *) _nc_str_init(string_desc *
const char * NCURSES_EXPORT (NCURSES_CH_T) _nc_render(WINDOW *
 NCURSES_EXPORT (WINDOW *) _nc_makenew(int
int vsscanf (const char *str, const char *format, va_list __arg)
 NCURSES_EXPORT_VAR (int *) _nc_oldnums
 NCURSES_EXPORT_VAR (int) _nc_slk_format

Variables

const char int
 chtype
char size_t
const char va_list
const char unsigned short
const char NCURSES_CH_T
short const
 bool
int top
int int bot
int(* init )(WINDOW *, int))

Class Documentation

struct tries

Definition at line 205 of file curses.priv.h.

Collaboration diagram for tries:
Class Members
unsigned char ch
struct tries * child
struct tries * sibling
unsigned short value
struct color_t

Definition at line 234 of file curses.priv.h.

Class Members
short b
short blue
short g
short green
int init
short r
short red
struct ldat

Definition at line 262 of file curses.priv.h.

Class Members
NCURSES_SIZE_T firstchar
NCURSES_SIZE_T lastchar
NCURSES_SIZE_T oldindex
NCURSES_CH_T * text
struct slk_ent

Definition at line 285 of file curses.priv.h.

Class Members
char dirty
char * ent_text
int ent_x
char * form_text
char visible
struct SLK

Definition at line 294 of file curses.priv.h.

Collaboration diagram for SLK:
Class Members
chtype attr
char dirty
slk_ent * ent
char hidden
short labcnt
short maxlab
short maxlen
WINDOW * win
struct HASHMAP

Definition at line 305 of file curses.priv.h.

Class Members
unsigned long hashval
int newcount
int newindex
int oldcount
int oldindex
struct string_desc

Definition at line 974 of file curses.priv.h.

Class Members
nls_uint32 length
nls_uint32 offset
char * s_head
size_t s_init
size_t s_size
char * s_tail

Define Documentation

#define _nc_alloc_screen ( )    ((SP = typeCalloc(SCREEN, 1)) != 0)

Definition at line 1088 of file curses.priv.h.

#define _nc_bkgd   _bkgd

Definition at line 254 of file curses.priv.h.

#define _nc_idcok   SP->_nc_sp_idcok

Definition at line 438 of file curses.priv.h.

#define _nc_idlok   SP->_nc_sp_idlok

Definition at line 437 of file curses.priv.h.

#define _nc_resize_margins (   wp)    /* nothing */

Definition at line 1050 of file curses.priv.h.

#define _nc_set_screen (   sp)    SP = sp

Definition at line 1089 of file curses.priv.h.

#define _nc_windows   SP->_nc_sp_windows

Definition at line 479 of file curses.priv.h.

#define ACS_LEN   128

Definition at line 246 of file curses.priv.h.

#define AddAttr (   c,
  a 
)    c |= a

Definition at line 655 of file curses.priv.h.

#define ALL_BUT_COLOR   ((chtype)~(A_COLOR))

Definition at line 803 of file curses.priv.h.

#define ARG_CH_T   NCURSES_CH_T

Definition at line 664 of file curses.priv.h.

#define AttrOf (   c)    ChAttrOf(c)

Definition at line 654 of file curses.priv.h.

#define AttrOfD (   ch)    AttrOf(CHDEREF(ch))

Definition at line 678 of file curses.priv.h.

#define BAUDBYTE   9 /* 9 = 7 bits + 1 parity + 1 stop */

Definition at line 962 of file curses.priv.h.

#define BLANK   (' '|A_NORMAL)

Definition at line 669 of file curses.priv.h.

#define BLANK_ATTR   A_NORMAL

Definition at line 682 of file curses.priv.h.

#define BLANK_TEXT   L(' ')

Definition at line 683 of file curses.priv.h.

#define C_MASK   ((1 << C_SHIFT) - 1)

Definition at line 216 of file curses.priv.h.

#define C_SHIFT   8 /* we need more bits than there are colors */

Definition at line 215 of file curses.priv.h.

#define CARG_CH_T   NCURSES_CH_T

Definition at line 665 of file curses.priv.h.

#define CHANGED   -1

Definition at line 685 of file curses.priv.h.

#define CHANGED_CELL (   line,
  col 
)
Value:
if (line->firstchar == _NOCHANGE) \
              line->firstchar = line->lastchar = col; \
       else if ((col) < line->firstchar) \
              line->firstchar = col; \
       else if ((col) > line->lastchar) \
              line->lastchar = col

Definition at line 687 of file curses.priv.h.

#define CHANGED_RANGE (   line,
  start,
  end 
)
Value:
if (line->firstchar == _NOCHANGE \
        || line->firstchar > (start)) \
              line->firstchar = start; \
       if (line->lastchar == _NOCHANGE \
        || line->lastchar < (end)) \
              line->lastchar = end

Definition at line 695 of file curses.priv.h.

#define CHANGED_TO_EOL (   line,
  start,
  end 
)
Value:
if (line->firstchar == _NOCHANGE \
        || line->firstchar > (start)) \
              line->firstchar = start; \
       line->lastchar = end

Definition at line 703 of file curses.priv.h.

#define CharEq (   a,
  b 
)    (a == b)

Definition at line 660 of file curses.priv.h.

#define CharOf (   c)    ChCharOf(c)

Definition at line 653 of file curses.priv.h.

#define CharOfD (   ch)    CharOf(CHDEREF(ch))

Definition at line 679 of file curses.priv.h.

#define ChAttrOf (   c)    ((c) & (chtype)A_ATTRIBUTES)

Definition at line 590 of file curses.priv.h.

#define ChCharOf (   c)    ((c) & (chtype)A_CHARTEXT)

Definition at line 589 of file curses.priv.h.

#define CHDEREF (   wch)    wch

Definition at line 663 of file curses.priv.h.

#define CHREF (   wch)    wch

Definition at line 662 of file curses.priv.h.

#define D_QUOTE   '"'

Definition at line 226 of file curses.priv.h.

#define DEFAULT_MAXCLICK   166

Definition at line 138 of file curses.priv.h.

#define DelCharCost (   count)
Value:
((parm_dch != 0) \
              ? SP->_dch_cost \
              : ((delete_character != 0) \
                     ? (SP->_dch1_cost * count) \
                     : INFINITY))

Definition at line 830 of file curses.priv.h.

#define empty_module (   name)
Value:
extern NCURSES_EXPORT(void) name (void); \
       NCURSES_EXPORT(void) name (void) { }

Definition at line 799 of file curses.priv.h.

#define EV_MAX   8 /* size of mouse circular event queue */

Definition at line 139 of file curses.priv.h.

#define EVENTLIST_0th (   param)    void

Definition at line 872 of file curses.priv.h.

#define EVENTLIST_1st (   param)    /* nothing */

Definition at line 873 of file curses.priv.h.

#define EVENTLIST_2nd (   param)    /* nothing */

Definition at line 874 of file curses.priv.h.

#define EXIT_FAILURE   1

Definition at line 558 of file curses.priv.h.

#define EXIT_SUCCESS   0

Definition at line 554 of file curses.priv.h.

#define F_OK   0 /* Test for existence. */

Definition at line 571 of file curses.priv.h.

#define FIFO_SIZE   MAXCOLUMNS+2 /* for nocbreak mode input */

Definition at line 244 of file curses.priv.h.

#define FreeAndNull (   p)    free(p); p = 0

Definition at line 716 of file curses.priv.h.

#define FreeIfNeeded (   p)    if ((p) != 0) free(p)

Definition at line 711 of file curses.priv.h.

#define getcwd (   buf,
  len 
)    getwd(buf)

Definition at line 906 of file curses.priv.h.

#define HAVE_SIZECHANGE   0

Definition at line 147 of file curses.priv.h.

#define if_USE_SCROLL_HINTS (   stmt)    stmt

Definition at line 192 of file curses.priv.h.

#define if_WIDEC (   code)    /* nothing */

Definition at line 673 of file curses.priv.h.

#define IGNORE_COLOR_OFF   FALSE

Definition at line 804 of file curses.priv.h.

#define INFINITY   1000000 /* cost: too high to use */

Definition at line 961 of file curses.priv.h.

#define INFINITY   1000000 /* cost: too high to use */

Definition at line 961 of file curses.priv.h.

#define InsCharCost (   count)
Value:
((parm_ich != 0) \
              ? SP->_ich_cost \
              : ((enter_insert_mode && exit_insert_mode) \
                ? SP->_smir_cost + SP->_rmir_cost + (SP->_ip_cost * count) \
                : ((insert_character != 0) \
                  ? ((SP->_ich1_cost + SP->_ip_cost) * count) \
                  : INFINITY)))

Definition at line 837 of file curses.priv.h.

#define is7bits (   c)    ((unsigned)(c) < 128)

Definition at line 527 of file curses.priv.h.

#define is8bits (   c)    ((unsigned)(c) <= UCHAR_MAX)

Definition at line 530 of file curses.priv.h.

#define ISBLANK (   ch)    (CharOf(ch) == ' ')

Definition at line 670 of file curses.priv.h.

#define isnac (   ch)    (0)

Definition at line 672 of file curses.priv.h.

#define L (   ch)    ch

Definition at line 675 of file curses.priv.h.

#define L_BRACE   '{'

Definition at line 223 of file curses.priv.h.

#define max (   a,
  b 
)    ((a) < (b) ? (b) : (a))

Definition at line 537 of file curses.priv.h.

#define MAX_SKEY (   fmt)    (SLK_STDFMT(fmt)? MAX_SKEY_OLD : MAX_SKEY_PC)

Definition at line 1116 of file curses.priv.h.

Definition at line 1117 of file curses.priv.h.

#define MAX_SKEY_LEN_OLD   8 /* max length of soft key text */

Definition at line 1107 of file curses.priv.h.

#define MAX_SKEY_LEN_PC   5

Definition at line 1109 of file curses.priv.h.

#define MAX_SKEY_OLD   8 /* count of soft keys */

Definition at line 1106 of file curses.priv.h.

#define MAX_SKEY_PC   12 /* This is what most PC's have */

Definition at line 1108 of file curses.priv.h.

#define MAXCOLUMNS   135

Definition at line 242 of file curses.priv.h.

#define MAXLINES   66

Definition at line 243 of file curses.priv.h.

#define MB_LEN_MAX   8 /* should be >= MB_CUR_MAX, but that may be a function */

Definition at line 593 of file curses.priv.h.

#define min (   a,
  b 
)    ((a) > (b) ? (b) : (a))

Definition at line 533 of file curses.priv.h.

#define MODULE_ID (   id)    /*nothing*/

Definition at line 60 of file curses.priv.h.

#define MSG_NO_INPUTS   "Premature EOF"

Definition at line 1125 of file curses.priv.h.

#define MSG_NO_MEMORY   "Out of memory"

Definition at line 1124 of file curses.priv.h.

#define NC_BUFFERED (   flag)    _nc_set_buffer(SP->_ofp, flag)

Definition at line 1072 of file curses.priv.h.

#define NC_OUTPUT   ((SP != 0) ? SP->_ofp : stdout)

Definition at line 1074 of file curses.priv.h.

#define NewChar (   ch)    (ch)

Definition at line 658 of file curses.priv.h.

#define NewChar2 (   c,
  a 
)    (c | a)

Definition at line 659 of file curses.priv.h.

#define NONBLANK_ATTR   (A_NORMAL|A_BOLD|A_DIM|A_BLINK)

Definition at line 805 of file curses.priv.h.

#define O_BINARY   0

Definition at line 579 of file curses.priv.h.

#define PAIR_OF (   fg,
  bg 
)    ((((fg) & C_MASK) << C_SHIFT) | ((bg) & C_MASK))

Definition at line 218 of file curses.priv.h.

#define PATH_MAX   255 /* the Posix minimum path-size */

Definition at line 92 of file curses.priv.h.

#define PUTC (   a,
  b 
)    do { data = CharOf(ch); putc(data,b); } while (0)

Definition at line 667 of file curses.priv.h.

#define PUTC_DATA   int data = 0

Definition at line 666 of file curses.priv.h.

#define R_BRACE   '}'

Definition at line 224 of file curses.priv.h.

#define R_OK   4 /* Test for read permission. */

Definition at line 562 of file curses.priv.h.

#define RemAttr (   c,
  a 
)    c &= ~(a & A_ATTRIBUTES)

Definition at line 656 of file curses.priv.h.

#define returnAttr (   code)    return code

Definition at line 784 of file curses.priv.h.

#define returnBits (   code)    return code

Definition at line 785 of file curses.priv.h.

#define returnBool (   code)    return code

Definition at line 786 of file curses.priv.h.

#define returnChar (   code)    return code

Definition at line 787 of file curses.priv.h.

#define returnCode (   code)    return code

Definition at line 788 of file curses.priv.h.

#define returnPtr (   code)    return code

Definition at line 789 of file curses.priv.h.

#define returnSP (   code)    return code

Definition at line 790 of file curses.priv.h.

#define returnVoid   return

Definition at line 791 of file curses.priv.h.

#define returnWin (   code)    return code

Definition at line 792 of file curses.priv.h.

#define S_QUOTE   '\''

Definition at line 225 of file curses.priv.h.

#define screen_columns   SP->_columns

Definition at line 1098 of file curses.priv.h.

#define screen_lines   SP->_lines

Definition at line 1097 of file curses.priv.h.

#define SetAttr (   c,
  a 
)    c = (c & ~A_ATTRIBUTES) | a

Definition at line 657 of file curses.priv.h.

#define SetChar (   ch,
  c,
  a 
)    ch = c | a

Definition at line 661 of file curses.priv.h.

#define SetChar2 (   wch,
  ch 
)    SetChar(wch,ChCharOf(ch),ChAttrOf(ch))

Definition at line 680 of file curses.priv.h.

#define SIZEOF (   v)    (sizeof(v)/sizeof(v[0]))

Definition at line 709 of file curses.priv.h.

#define SLK_LINES (   fmt)    (SLK_STDFMT(fmt) ? 1 : ((fmt) - 2))

Definition at line 1114 of file curses.priv.h.

#define SLK_STDFMT (   fmt)    (fmt < 3)

Definition at line 1112 of file curses.priv.h.

#define START_TRACE ( )    /* nothing */

Definition at line 778 of file curses.priv.h.

#define STDERR_FILENO   2

Definition at line 550 of file curses.priv.h.

#define STDIN_FILENO   0

Definition at line 542 of file curses.priv.h.

#define STDOUT_FILENO   1

Definition at line 546 of file curses.priv.h.

#define strstr   _nc_strstr

Definition at line 999 of file curses.priv.h.

#define T (   a)

Definition at line 780 of file curses.priv.h.

#define T_CALLED (   fmt)    "called {" fmt

Definition at line 725 of file curses.priv.h.

#define T_CREATE (   fmt)    "create :" fmt

Definition at line 726 of file curses.priv.h.

#define T_RETURN (   fmt)    "return }" fmt

Definition at line 727 of file curses.priv.h.

#define toggle_attr_off (   S,
  at 
)
Value:
{\
   if (IGNORE_COLOR_OFF == TRUE) {\
      if (PAIR_NUMBER(at) == 0xff) /* turn off color */\
        (S) &= ~(at);\
      else /* leave color alone */\
        (S) &= ~((at)&ALL_BUT_COLOR);\
   } else {\
      if (PAIR_NUMBER(at) > 0x00) /* turn off color */\
        (S) &= ~(at|A_COLOR);\
      else /* leave color alone */\
        (S) &= ~(at);\
   }\
   TR(TRACE_ATTRS, ("new attribute is %s", _traceattr((S))));}

Definition at line 816 of file curses.priv.h.

#define toggle_attr_on (   S,
  at 
)
Value:
{\
   if (PAIR_NUMBER(at) > 0)\
      (S) = ((S) & ALL_BUT_COLOR) | (at);\
   else\
      (S) |= (at);\
   TR(TRACE_ATTRS, ("new attribute is %s", _traceattr((S))));}

Definition at line 808 of file curses.priv.h.

#define TPUTS_TRACE (   s)

Definition at line 782 of file curses.priv.h.

#define TR (   n,
  a 
)

Definition at line 781 of file curses.priv.h.

#define TRACE_OUTCHARS (   n)    /* nothing */

Definition at line 585 of file curses.priv.h.

#define UChar (   c)    ((unsigned char)(c))

Definition at line 588 of file curses.priv.h.

#define UCHAR_MAX   255

Definition at line 523 of file curses.priv.h.

#define UpdateAttrs (   a)
Value:
if (SP->_current_attr != (a)) \
                            vidattr((a));

Definition at line 860 of file curses.priv.h.

#define USE_EMX_MOUSE   0

Definition at line 135 of file curses.priv.h.

#define USE_FUNC_POLL   0

Definition at line 111 of file curses.priv.h.

#define USE_GPM_SUPPORT   0

Definition at line 121 of file curses.priv.h.

#define USE_QNX_MOUSE   0

Definition at line 128 of file curses.priv.h.

#define USE_SCROLL_HINTS   1

Definition at line 185 of file curses.priv.h.

#define USE_SETBUF_0   0

Definition at line 1070 of file curses.priv.h.

#define USE_SIGWINCH   0

Definition at line 155 of file curses.priv.h.

#define USE_SIZECHANGE   0

Definition at line 153 of file curses.priv.h.

#define use_terminfo_vars ( )    _nc_env_access()

Definition at line 165 of file curses.priv.h.

#define VT_ACSC   "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~"

Definition at line 228 of file curses.priv.h.

#define W_OK   2 /* Test for write permission. */

Definition at line 565 of file curses.priv.h.

#define wbkgrnd   wbkgd

Definition at line 256 of file curses.priv.h.

#define wgetbkgrnd (   win,
  wch 
)    *wch = win->_bkgd

Definition at line 255 of file curses.priv.h.

#define wgetch_events (   win,
  evl 
)    wgetch(win)

Definition at line 1056 of file curses.priv.h.

#define wgetnstr_events (   win,
  str,
  maxlen,
  evl 
)    wgetnstr(win, str, maxlen)

Definition at line 1057 of file curses.priv.h.

#define WINDOW_EXT (   win,
  field 
)    (((WINDOWLIST *)(win))->field)

Definition at line 519 of file curses.priv.h.

#define WINDOWLIST   struct _win_list

Definition at line 248 of file curses.priv.h.

#define X_OK   1 /* Test for execute permission. */

Definition at line 568 of file curses.priv.h.

#define XMC_CHANGES (   c)    ((c) & SP->_xmc_suppress)

Definition at line 806 of file curses.priv.h.


Enumeration Type Documentation

enum MouseType
Enumerator:
M_XTERM 
M_NONE 

Definition at line 270 of file curses.priv.h.

             {
       M_XTERM       = -1          /* use xterm's mouse tracking? */
       ,M_NONE = 0          /* no mouse device */
#if USE_GPM_SUPPORT
       ,M_GPM               /* use GPM */
#endif
#if USE_SYSMOUSE
       ,M_SYSMOUSE          /* FreeBSD sysmouse on console */
#endif
} MouseType;

Function Documentation

short FILE int * EVENTLIST_2nd ( _nc_eventlist *  )

Here is the caller graph for this function:

NCURSES_EXPORT ( int  ) [read]
NCURSES_EXPORT ( const char *  )
NCURSES_EXPORT ( char *  )
NCURSES_EXPORT_VAR ( SCREEN *  )

Definition at line 52 of file lib_color.c.

                    {r,g,b, 0,0,0, 0}

#define TYPE_CALLOC(type,elts) typeCalloc(type, (unsigned)(elts))

/*
 * Given a RGB range of 0..1000, we'll normally set the individual values
 * to about 2/3 of the maximum, leaving full-range for bold/bright colors.
 */
#define RGB_ON  680
#define RGB_OFF 0
/* *INDENT-OFF* */
static const color_t cga_palette[] =
{
    /*  R               G               B */
    DATA(RGB_OFF,    RGB_OFF,      RGB_OFF),     /* COLOR_BLACK */
    DATA(RGB_ON,     RGB_OFF,      RGB_OFF),     /* COLOR_RED */
    DATA(RGB_OFF,    RGB_ON,              RGB_OFF),     /* COLOR_GREEN */
    DATA(RGB_ON,     RGB_ON,              RGB_OFF),     /* COLOR_YELLOW */
    DATA(RGB_OFF,    RGB_OFF,      RGB_ON),      /* COLOR_BLUE */
    DATA(RGB_ON,     RGB_OFF,      RGB_ON),      /* COLOR_MAGENTA */
    DATA(RGB_OFF,    RGB_ON,              RGB_ON),      /* COLOR_CYAN */
    DATA(RGB_ON,     RGB_ON,              RGB_ON),      /* COLOR_WHITE */
};
int vsscanf ( const char *  str,
const char *  format,
va_list  __arg 
)

Definition at line 164 of file vsscanf.c.

{
#if HAVE_VFSCANF || HAVE__DOSCAN
    /*
     * This code should work on anything descended from AT&T SVr1.
     */
    FILE strbuf;

    strbuf._flag = _IOREAD;
    strbuf._ptr = strbuf._base = (unsigned char *) str;
    strbuf._cnt = strlen(str);
    strbuf._file = _NFILE;

#if HAVE_VFSCANF
    return (vfscanf(&strbuf, format, ap));
#else
    return (_doscan(&strbuf, format, ap));
#endif
#else
    static int can_convert = -1;

    int assigned = 0;
    int consumed = 0;

    T((T_CALLED("vsscanf(%s,%s,...)"),
       _nc_visbuf2(1, str),
       _nc_visbuf2(2, format)));

    /*
     * This relies on having a working "%n" format conversion.  Check if it
     * works.  Only very old C libraries do not support it.
     *
     * FIXME: move this check into the configure script.
     */
    if (can_convert < 0) {
       int check1;
       int check2;
       if (sscanf("123", "%d%n", &check1, &check2) > 0
           && check1 == 123
           && check2 == 3) {
           can_convert = 1;
       } else {
           can_convert = 0;
       }
    }

    if (can_convert) {
       size_t len_fmt = strlen(format) + 32;
       char *my_fmt = malloc(len_fmt);
       ChunkType chunk, ctest;
       OtherType other, otest;
       ScanState state;
       unsigned n;
       int eaten;
       void *pointer;

       if (my_fmt != 0) {
           /*
            * Split the original format into chunks, adding a "%n" to the end
            * of each (except of course if it used %n), and use that
            * information to decide where to start scanning the next chunk.
            *
            * FIXME:  does %n count bytes or characters?  If the latter, this
            * will require further work for multibyte strings.
            */
           while (*format != '\0') {
              /* find a chunk */
              state = sUnknown;
              chunk = cUnknown;
              other = oUnknown;
              pointer = 0;
              for (n = 0; format[n] != 0 && state != sFinal; ++n) {
                  my_fmt[n] = format[n];
                  switch (state) {
                  case sUnknown:
                     if (format[n] == '%')
                         state = sPercent;
                     break;
                  case sPercent:
                     if (format[n] == '%') {
                         state = sUnknown;
                     } else if (format[n] == L_SQUARE) {
                         state = sLeft;
                     } else {
                         state = sNormal;
                         --n;
                     }
                     break;
                  case sLeft:
                     state = sRange;
                     if (format[n] == '^') {
                         ++n;
                         my_fmt[n] = format[n];
                     }
                     break;
                  case sRange:
                     if (format[n] == R_SQUARE) {
                         state = sFinal;
                         chunk = cRange;
                     }
                     break;
                  case sNormal:
                     if (format[n] == '*') {
                         state = sUnknown;
                     } else {
                         if ((ctest = final_ch(format[n], other)) != cUnknown) {
                            state = sFinal;
                            chunk = ctest;
                         } else if ((otest = other_ch(format[n])) != oUnknown) {
                            other = otest;
                         } else if (isalpha(UChar(format[n]))) {
                            state = sFinal;
                            chunk = cError;
                         }
                     }
                     break;
                  case sFinal:
                     break;
                  }
              }
              my_fmt[n] = '\0';
              format += n;

              if (chunk == cUnknown
                  || chunk == cError) {
                  if (assigned == 0)
                     assigned = EOF;
                  break;
              }

              /* add %n, if the format was not that */
              if (chunk != cAssigned) {
                  strcat(my_fmt, "%n");
              }

              switch (chunk) {
              case cAssigned:
                  strcat(my_fmt, "%n");
                  pointer = &eaten;
                  break;
              case cInt:
                  pointer = va_arg(ap, int *);
                  break;
              case cShort:
                  pointer = va_arg(ap, short *);
                  break;
              case cFloat:
                  pointer = va_arg(ap, float *);
                  break;
              case cDouble:
                  pointer = va_arg(ap, double *);
                  break;
              case cLong:
                  pointer = va_arg(ap, long *);
                  break;
              case cPointer:
                  pointer = va_arg(ap, void *);
                  break;
              case cChar:
              case cRange:
              case cString:
                  pointer = va_arg(ap, char *);
                  break;
              case cError:
              case cUnknown:
                  break;
              }
              /* do the conversion */
              T(("...converting chunk #%d type %d(%s,%s)",
                 assigned + 1, chunk,
                 _nc_visbuf2(1, str + consumed),
                 _nc_visbuf2(2, my_fmt)));
              if (sscanf(str + consumed, my_fmt, pointer, &eaten) > 0)
                  consumed += eaten;
              else
                  break;
              ++assigned;
           }
           free(my_fmt);
       }
    }
    returnCode(assigned);
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Definition at line 1028 of file curses.priv.h.

Definition at line 1035 of file curses.priv.h.

Definition at line 942 of file curses.priv.h.

Definition at line 1025 of file curses.priv.h.

int(* init)(WINDOW *, int))

Definition at line 1119 of file curses.priv.h.

int

Definition at line 797 of file curses.priv.h.

Definition at line 1013 of file curses.priv.h.

unsigned short

Definition at line 1007 of file curses.priv.h.

Definition at line 982 of file curses.priv.h.

Definition at line 1035 of file curses.priv.h.

const char va_list

Definition at line 1004 of file curses.priv.h.