2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License, Version 1.0 only
2N/A * (the "License"). You may not use this file except in compliance
2N/A * with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A/*
2N/A * Copyright 1996-2003 Sun Microsystems, Inc. All rights reserved.
2N/A * Use is subject to license terms.
2N/A */
2N/A
2N/A#ifndef _CURSES_H
2N/A#define _CURSES_H
2N/A
2N/A#pragma ident "%Z%%M% %I% %E% SMI"
2N/A
2N/A/*
2N/A * curses.h
2N/A *
2N/A * XCurses Library
2N/A *
2N/A * Copyright 1990, 1995 by Mortice Kern Systems Inc. All rights reserved.
2N/A *
2N/A */
2N/A
2N/A#include <sys/isa_defs.h>
2N/A#include <stdio.h>
2N/A#include <term.h>
2N/A#include <wchar.h>
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/A#define _XOPEN_CURSES
2N/A
2N/A#ifndef EOF
2N/A#define EOF (-1)
2N/A#endif
2N/A
2N/A#ifndef WEOF
2N/A#define WEOF ((wint_t)(-1))
2N/A#endif
2N/A
2N/A#define ERR EOF
2N/A#define OK 0
2N/A
2N/A#if !(defined(__cplusplus) && defined(_BOOL))
2N/A#ifndef _BOOL_DEFINED
2N/Atypedef short bool;
2N/A#define _BOOL_DEFINED
2N/A#endif
2N/A#endif
2N/A
2N/A#define TRUE 1
2N/A#define FALSE 0
2N/A
2N/Atypedef unsigned short attr_t;
2N/A
2N/A/*
2N/A * These attributes and masks can be applied to an attr_t.
2N/A * These are ordered according to the <no_color_video> mask,
2N/A * which has been extended to include additional attributes.
2N/A */
2N/A#define WA_NORMAL 0x0
2N/A#define WA_STANDOUT 0x0001
2N/A#define WA_UNDERLINE 0x0002
2N/A#define WA_REVERSE 0x0004
2N/A#define WA_BLINK 0x0008
2N/A#define WA_DIM 0x0010
2N/A#define WA_BOLD 0x0020
2N/A#define WA_INVIS 0x0040
2N/A#define WA_PROTECT 0x0080
2N/A#define WA_ALTCHARSET 0x0100
2N/A#define WA_HORIZONTAL 0x0200
2N/A#define WA_LEFT 0x0400
2N/A#define WA_LOW 0x0800
2N/A#define WA_RIGHT 0x1000
2N/A#define WA_TOP 0x2000
2N/A#define WA_VERTICAL 0x4000
2N/A
2N/A#define WA_SGR_MASK 0x01ff /* Historical attribute set. */
2N/A#define WA_SGR1_MASK 0x7e00 /* Extended attribute set. */
2N/A
2N/A/*
2N/A * Internal attribute used to support <ceol_standout_glitch>.
2N/A */
2N/A#define WA_COOKIE 0x8000
2N/A
2N/A/*
2N/A * Color names.
2N/A */
2N/A#define COLOR_BLACK 0
2N/A#define COLOR_RED 1
2N/A#define COLOR_GREEN 2
2N/A#define COLOR_YELLOW 3
2N/A#define COLOR_BLUE 4
2N/A#define COLOR_MAGENTA 5
2N/A#define COLOR_CYAN 6
2N/A#define COLOR_WHITE 7
2N/A
2N/A/*
2N/A * A cchar_t details the attributes, color, and a string of wide characters
2N/A * composing a complex character (p12). The wide character string consists
2N/A * of a spacing character (wcwidth() > 0) and zero or more non-spacing
2N/A * characters. Xcurses (p17) states that the minimum number of non-spacing
2N/A * characters associated with a spacing character must be at least 5, if a
2N/A * limit is imposed.
2N/A */
2N/A#define _M_CCHAR_MAX 6
2N/A
2N/A/*
2N/A * Opaque data type.
2N/A */
2N/Atypedef struct {
2N/A short _f; /* True if start of character. */
2N/A short _n; /* Number of elements in wc[]. */
2N/A short _co; /* Color pair number. */
2N/A attr_t _at; /* Attribute flags. */
2N/A wchar_t _wc[_M_CCHAR_MAX]; /* Complex spacing character. */
2N/A} cchar_t;
2N/A
2N/A/*
2N/A * Opaque data type.
2N/A */
2N/Atypedef struct window_t {
2N/A cchar_t _bg; /* Background. */
2N/A cchar_t _fg; /* Foreground, ignore character. */
2N/A short _cury, _curx; /* Curent cursor position in window. */
2N/A short _begy, _begx; /* Upper-left origin on screen. */
2N/A short _maxy, _maxx; /* Window dimensions. */
2N/A short _top, _bottom; /* Window's software scroll region. */
2N/A short _refy, _refx; /* Pad origin of last refresh. */
2N/A short _sminy, _sminx; /* T-L screen corner of last refresh. */
2N/A short _smaxy, _smaxx; /* B-R screen corner of last refresh. */
2N/A short _vmin, _vtime; /* wtimeout() control. */
2N/A short *_first, *_last; /* Dirty region for each screen line. */
2N/A unsigned short _flags; /* Internal flags for the window. */
2N/A unsigned short _scroll; /* Internal for scroll optimization. */
2N/A cchar_t **_line;
2N/A cchar_t *_base; /* Block of M*N screen cells. */
2N/A struct window_t *_parent; /* Parent of sub-window. */
2N/A} WINDOW;
2N/A
2N/A/*
2N/A * Opaque data type.
2N/A */
2N/Atypedef struct {
2N/A int _kfd; /* typeahead() file descriptor. */
2N/A FILE *_if, *_of; /* I/O file pointers. */
2N/A TERMINAL *_term; /* Associated terminfo entry. */
2N/A WINDOW *_newscr; /* New screen image built by wnoutrefresh(). */
2N/A WINDOW *_curscr; /* Current screen image after doupdate(). */
2N/A mbstate_t _state; /* Current multibyte state of _of. */
2N/A#if defined(_LP64)
2N/A unsigned int *_hash; /* Hash values for curscr's screen lines. */
2N/A#else
2N/A unsigned long *_hash; /* Hash values for curscr's screen lines. */
2N/A#endif /* defined(_LP64) */
2N/A unsigned short _flags; /* Assorted flags. */
2N/A void *_decode; /* Function key decode tree. */
2N/A void *_in; /* Wide I/O object. */
2N/A struct {
2N/A int _size; /* Allocated size of the input stack. */
2N/A int _count; /* Number of entries on the input stack. */
2N/A int *_stack; /* Buffer used for the input stack. */
2N/A } _unget;
2N/A struct {
2N/A WINDOW *_w; /* Exists on if emulating soft label keys. */
2N/A char *_labels[8]; /* Soft label key strings. */
2N/A short _justify[8]; /* Justification for label. */
2N/A char *_saved[8]; /* exact representation of label */
2N/A } _slk;
2N/A} SCREEN;
2N/A
2N/A
2N/A/*
2N/A * Backwards compatiblity with historical Curses applications.
2N/A */
2N/A#ifndef _CHTYPE
2N/A#define _CHTYPE
2N/A#if defined(_LP64)
2N/Atypedef unsigned int chtype;
2N/A#else
2N/Atypedef unsigned long chtype;
2N/A#endif
2N/A#endif
2N/A
2N/A/*
2N/A * These attributes and masks can be applied to a chtype.
2N/A * They are order according to the <no_color_video> mask.
2N/A */
2N/A#if defined(_LP64)
2N/A#define A_NORMAL 0x00000000U
2N/A#define A_ATTRIBUTES 0xffff0000U /* Color/Attribute mask */
2N/A#define A_CHARTEXT 0x0000ffffU /* 16-bit character mask */
2N/A#define A_STANDOUT 0x00010000U
2N/A#define A_UNDERLINE 0x00020000U
2N/A#define A_REVERSE 0x00040000U
2N/A#define A_BLINK 0x00080000U
2N/A#define A_DIM 0x00100000U
2N/A#define A_BOLD 0x00200000U
2N/A#define A_INVIS 0x00400000U
2N/A#define A_PROTECT 0x00800000U
2N/A#define A_ALTCHARSET 0x01000000U
2N/A#define A_COLOR 0xfe000000U /* Color mask */
2N/A#else /* defined(_LP64) */
2N/A#define A_NORMAL 0x00000000UL
2N/A#define A_ATTRIBUTES 0xffff0000UL /* Color/Attribute mask */
2N/A#define A_CHARTEXT 0x0000ffffUL /* 16-bit character mask */
2N/A#define A_STANDOUT 0x00010000UL
2N/A#define A_UNDERLINE 0x00020000UL
2N/A#define A_REVERSE 0x00040000UL
2N/A#define A_BLINK 0x00080000UL
2N/A#define A_DIM 0x00100000UL
2N/A#define A_BOLD 0x00200000UL
2N/A#define A_INVIS 0x00400000UL
2N/A#define A_PROTECT 0x00800000UL
2N/A#define A_ALTCHARSET 0x01000000UL
2N/A#define A_COLOR 0xfe000000UL /* Color mask */
2N/A#endif /* defined(_LP64) */
2N/A
2N/A/*
2N/A * Color atttribute support for chtype.
2N/A */
2N/A#define __COLOR_SHIFT 26
2N/A
2N/A/*
2N/A * Characters constants used with a chtype.
2N/A * Mapping defined in Xcurses Section 6.2.12 (p260).
2N/A */
2N/A#define ACS_VLINE (A_ALTCHARSET | 'x')
2N/A#define ACS_HLINE (A_ALTCHARSET | 'q')
2N/A#define ACS_ULCORNER (A_ALTCHARSET | 'l')
2N/A#define ACS_URCORNER (A_ALTCHARSET | 'k')
2N/A#define ACS_LLCORNER (A_ALTCHARSET | 'm')
2N/A#define ACS_LRCORNER (A_ALTCHARSET | 'j')
2N/A#define ACS_RTEE (A_ALTCHARSET | 'u')
2N/A#define ACS_LTEE (A_ALTCHARSET | 't')
2N/A#define ACS_BTEE (A_ALTCHARSET | 'v')
2N/A#define ACS_TTEE (A_ALTCHARSET | 'w')
2N/A#define ACS_PLUS (A_ALTCHARSET | 'n')
2N/A#define ACS_S1 (A_ALTCHARSET | 'o')
2N/A#define ACS_S9 (A_ALTCHARSET | 's')
2N/A#define ACS_DIAMOND (A_ALTCHARSET | '`')
2N/A#define ACS_CKBOARD (A_ALTCHARSET | 'a')
2N/A#define ACS_DEGREE (A_ALTCHARSET | 'f')
2N/A#define ACS_PLMINUS (A_ALTCHARSET | 'g')
2N/A#define ACS_BULLET (A_ALTCHARSET | '~')
2N/A#define ACS_LARROW (A_ALTCHARSET | ',')
2N/A#define ACS_RARROW (A_ALTCHARSET | '+')
2N/A#define ACS_DARROW (A_ALTCHARSET | '.')
2N/A#define ACS_UARROW (A_ALTCHARSET | '-')
2N/A#define ACS_BOARD (A_ALTCHARSET | 'h')
2N/A#define ACS_LANTERN (A_ALTCHARSET | 'i')
2N/A#define ACS_BLOCK (A_ALTCHARSET | '0')
2N/A
2N/A/*
2N/A * Wide characters constants for a cchar_t.
2N/A */
2N/Aextern const cchar_t __WACS_VLINE;
2N/Aextern const cchar_t __WACS_HLINE;
2N/Aextern const cchar_t __WACS_ULCORNER;
2N/Aextern const cchar_t __WACS_URCORNER;
2N/Aextern const cchar_t __WACS_LLCORNER;
2N/Aextern const cchar_t __WACS_LRCORNER;
2N/Aextern const cchar_t __WACS_RTEE;
2N/Aextern const cchar_t __WACS_LTEE;
2N/Aextern const cchar_t __WACS_BTEE;
2N/Aextern const cchar_t __WACS_TTEE;
2N/Aextern const cchar_t __WACS_PLUS;
2N/Aextern const cchar_t __WACS_S1;
2N/Aextern const cchar_t __WACS_S9;
2N/Aextern const cchar_t __WACS_DIAMOND;
2N/Aextern const cchar_t __WACS_CKBOARD;
2N/Aextern const cchar_t __WACS_DEGREE;
2N/Aextern const cchar_t __WACS_PLMINUS;
2N/Aextern const cchar_t __WACS_BULLET;
2N/Aextern const cchar_t __WACS_LARROW;
2N/Aextern const cchar_t __WACS_RARROW;
2N/Aextern const cchar_t __WACS_DARROW;
2N/Aextern const cchar_t __WACS_UARROW;
2N/Aextern const cchar_t __WACS_BOARD;
2N/Aextern const cchar_t __WACS_LANTERN;
2N/Aextern const cchar_t __WACS_BLOCK;
2N/A
2N/A#define WACS_VLINE &__WACS_VLINE
2N/A#define WACS_HLINE &__WACS_HLINE
2N/A#define WACS_ULCORNER &__WACS_ULCORNER
2N/A#define WACS_URCORNER &__WACS_URCORNER
2N/A#define WACS_LLCORNER &__WACS_LLCORNER
2N/A#define WACS_LRCORNER &__WACS_LRCORNER
2N/A#define WACS_RTEE &__WACS_RTEE
2N/A#define WACS_LTEE &__WACS_LTEE
2N/A#define WACS_BTEE &__WACS_BTEE
2N/A#define WACS_TTEE &__WACS_TTEE
2N/A#define WACS_PLUS &__WACS_PLUS
2N/A#define WACS_S1 &__WACS_S1
2N/A#define WACS_S9 &__WACS_S9
2N/A#define WACS_DIAMOND &__WACS_DIAMOND
2N/A#define WACS_CKBOARD &__WACS_CKBOARD
2N/A#define WACS_DEGREE &__WACS_DEGREE
2N/A#define WACS_PLMINUS &__WACS_PLMINUS
2N/A#define WACS_BULLET &__WACS_BULLET
2N/A#define WACS_LARROW &__WACS_LARROW
2N/A#define WACS_RARROW &__WACS_RARROW
2N/A#define WACS_DARROW &__WACS_DARROW
2N/A#define WACS_UARROW &__WACS_UARROW
2N/A#define WACS_BOARD &__WACS_BOARD
2N/A#define WACS_LANTERN &__WACS_LANTERN
2N/A#define WACS_BLOCK &__WACS_BLOCK
2N/A
2N/A
2N/A/*
2N/A * Internal macros.
2N/A */
2N/A#define __m_getpary(w) ((w)->_parent == (WINDOW *) 0 ? -1 \
2N/A : (w)->_begy - (w)->_parent->_begy)
2N/A#define __m_getparx(w) ((w)->_parent == (WINDOW *) 0 ? -1 \
2N/A : (w)->_begx - (w)->_parent->_begx)
2N/A
2N/A/*
2N/A * Global Window Macros
2N/A */
2N/A#define getyx(w, y, x) (y = (w)->_cury, x = (w)->_curx)
2N/A#define getbegyx(w, y, x) (y = (w)->_begy, x = (w)->_begx)
2N/A#define getmaxyx(w, y, x) (y = (w)->_maxy, x = (w)->_maxx)
2N/A#define getparyx(w, y, x) (y = __m_getpary(w), x = __m_getparx(w))
2N/A
2N/A/*
2N/A * Global variables
2N/A */
2N/Aextern int LINES, COLS;
2N/Aextern WINDOW *curscr, *stdscr;
2N/Aextern int COLORS, COLOR_PAIRS;
2N/A
2N/Aextern int addch(chtype);
2N/Aextern int addchnstr(const chtype *, int);
2N/Aextern int addchstr(const chtype *);
2N/Aextern int addnstr(const char *, int);
2N/Aextern int addnwstr(const wchar_t *, int);
2N/Aextern int addstr(const char *);
2N/Aextern int add_wch(const cchar_t *);
2N/Aextern int add_wchnstr(const cchar_t *, int);
2N/Aextern int add_wchstr(const cchar_t *);
2N/Aextern int addwstr(const wchar_t *);
2N/Aextern int attroff(int);
2N/Aextern int attron(int);
2N/Aextern int attrset(int);
2N/Aextern int attr_get(attr_t *, short *, void *);
2N/Aextern int attr_off(attr_t, void *);
2N/Aextern int attr_on(attr_t, void *);
2N/Aextern int attr_set(attr_t, short, void *);
2N/Aextern int baudrate(void);
2N/Aextern int beep(void);
2N/Aextern int bkgd(chtype);
2N/Aextern void bkgdset(chtype);
2N/Aextern int bkgrnd(const cchar_t *);
2N/Aextern void bkgrndset(const cchar_t *);
2N/Aextern int border(
2N/A chtype, chtype, chtype, chtype,
2N/A chtype, chtype, chtype, chtype);
2N/Aextern int border_set(
2N/A const cchar_t *, const cchar_t *,
2N/A const cchar_t *, const cchar_t *,
2N/A const cchar_t *, const cchar_t *,
2N/A const cchar_t *, const cchar_t *);
2N/Aextern int box(WINDOW *, chtype, chtype);
2N/Aextern int box_set(WINDOW *, const cchar_t *, const cchar_t *);
2N/Aextern bool can_change_color(void);
2N/Aextern int cbreak(void);
2N/Aextern int chgat(int, attr_t, short, const void *);
2N/Aextern int clearok(WINDOW *, bool);
2N/Aextern int clear(void);
2N/Aextern int clrtobot(void);
2N/Aextern int clrtoeol(void);
2N/Aextern int color_content(short, short *, short *, short *);
2N/Aextern int COLOR_PAIR(int);
2N/Aextern int color_set(short, void *);
2N/Aextern int copywin(const WINDOW *, WINDOW *,
2N/A int, int, int, int, int, int, int);
2N/Aextern int curs_set(int);
2N/Aextern int def_prog_mode(void);
2N/Aextern int def_shell_mode(void);
2N/Aextern int delay_output(int);
2N/Aextern int delch(void);
2N/Aextern int deleteln(void);
2N/Aextern void delscreen(SCREEN *);
2N/Aextern int delwin(WINDOW *);
2N/Aextern WINDOW *derwin(WINDOW *, int, int, int, int);
2N/Aextern int doupdate(void);
2N/Aextern WINDOW *dupwin(WINDOW *);
2N/Aextern int echo(void);
2N/Aextern int echochar(const chtype);
2N/Aextern int echo_wchar(const cchar_t *);
2N/Aextern int endwin(void);
2N/Aextern char erasechar(void);
2N/Aextern int erase(void);
2N/Aextern int erasewchar(wchar_t *);
2N/Aextern void filter(void);
2N/Aextern int flash(void);
2N/Aextern int flushinp(void);
2N/Aextern chtype getbkgd(WINDOW *);
2N/Aextern int getbkgrnd(cchar_t *);
2N/Aextern int getcchar(const cchar_t *, wchar_t *, attr_t *, short *, void *);
2N/Aextern int getch(void);
2N/Aextern int getnstr(char *, int);
2N/Aextern int getn_wstr(wint_t *, int);
2N/Aextern int getstr(char *);
2N/Aextern int get_wch(wint_t *);
2N/Aextern WINDOW *getwin(FILE *);
2N/Aextern int get_wstr(wint_t *);
2N/Aextern int halfdelay(int);
2N/Aextern bool has_colors(void);
2N/Aextern bool has_ic(void);
2N/Aextern bool has_il(void);
2N/Aextern int hline(chtype, int);
2N/Aextern int hline_set(const cchar_t *, int);
2N/Aextern void idcok(WINDOW *, bool);
2N/Aextern int idlok(WINDOW *, bool);
2N/Aextern void immedok(WINDOW *, bool);
2N/Aextern chtype inch(void);
2N/Aextern int inchnstr(chtype *, int);
2N/Aextern int inchstr(chtype *);
2N/Aextern WINDOW *initscr(void);
2N/Aextern int init_color(short, short, short, short);
2N/Aextern int init_pair(short, short, short);
2N/Aextern int innstr(char *, int);
2N/Aextern int innwstr(wchar_t *, int);
2N/Aextern int insch(chtype);
2N/Aextern int insdelln(int);
2N/Aextern int insertln(void);
2N/Aextern int insnstr(const char *, int);
2N/Aextern int ins_nwstr(const wchar_t *, int);
2N/Aextern int insstr(const char *);
2N/Aextern int instr(char *);
2N/Aextern int ins_wch(const cchar_t *);
2N/Aextern int ins_wstr(const wchar_t *);
2N/Aextern int intrflush(WINDOW *, bool);
2N/Aextern int in_wch(cchar_t *);
2N/Aextern int in_wchnstr(cchar_t *, int);
2N/Aextern int in_wchstr(cchar_t *);
2N/Aextern int inwstr(wchar_t *);
2N/Aextern bool isendwin(void);
2N/Aextern bool is_linetouched(WINDOW *, int);
2N/Aextern bool is_wintouched(WINDOW *);
2N/Aextern char *keyname(int);
2N/Aextern char *key_name(wchar_t);
2N/Aextern int keypad(WINDOW *, bool);
2N/Aextern char killchar(void);
2N/Aextern int killwchar(wchar_t *);
2N/Aextern int leaveok(WINDOW *, bool);
2N/Aextern char *longname(void);
2N/Aextern int meta(WINDOW *, bool);
2N/Aextern int move(int, int);
2N/Aextern int mvaddch(int, int, chtype);
2N/Aextern int mvaddchnstr(int, int, const chtype *, int);
2N/Aextern int mvaddchstr(int, int, const chtype *);
2N/Aextern int mvaddnstr(int, int, const char *, int);
2N/Aextern int mvaddnwstr(int, int, const wchar_t *, int);
2N/Aextern int mvaddstr(int, int, const char *);
2N/Aextern int mvadd_wch(int, int, const cchar_t *);
2N/Aextern int mvadd_wchnstr(int, int, const cchar_t *, int);
2N/Aextern int mvadd_wchstr(int, int, const cchar_t *);
2N/Aextern int mvaddwstr(int, int, const wchar_t *);
2N/Aextern int mvchgat(int, int, int, attr_t, short, const void *);
2N/Aextern int mvcur(int, int, int, int);
2N/Aextern int mvdelch(int, int);
2N/Aextern int mvderwin(WINDOW *, int, int);
2N/Aextern int mvgetch(int, int);
2N/Aextern int mvgetnstr(int, int, char *, int);
2N/Aextern int mvgetn_wstr(int, int, wint_t *, int);
2N/Aextern int mvgetstr(int, int, char *);
2N/Aextern int mvget_wch(int, int, wint_t *);
2N/Aextern int mvget_wstr(int, int, wint_t *);
2N/Aextern int mvhline(int, int, chtype, int);
2N/Aextern int mvhline_set(int, int, const cchar_t *, int);
2N/Aextern chtype mvinch(int, int);
2N/Aextern int mvinchnstr(int, int, chtype *, int);
2N/Aextern int mvinchstr(int, int, chtype *);
2N/Aextern int mvinnstr(int, int, char *, int);
2N/Aextern int mvinnwstr(int, int, wchar_t *, int);
2N/Aextern int mvinsch(int, int, chtype);
2N/Aextern int mvinsnstr(int, int, const char *, int);
2N/Aextern int mvins_nwstr(int, int, const wchar_t *, int);
2N/Aextern int mvinsstr(int, int, const char *);
2N/Aextern int mvinstr(int, int, char *);
2N/Aextern int mvins_wch(int, int, const cchar_t *);
2N/Aextern int mvins_wstr(int, int, const wchar_t *);
2N/Aextern int mvin_wch(int, int, cchar_t *);
2N/Aextern int mvin_wchnstr(int, int, cchar_t *, int);
2N/Aextern int mvin_wchstr(int, int, cchar_t *);
2N/Aextern int mvinwstr(int, int, wchar_t *);
2N/Aextern int mvprintw(int, int, char *, ...);
2N/Aextern int mvscanw(int, int, char *, ...);
2N/Aextern int mvvline(int, int, chtype, int);
2N/Aextern int mvvline_set(int, int, const cchar_t *, int);
2N/Aextern int mvwaddch(WINDOW *, int, int, chtype);
2N/Aextern int mvwaddchnstr(WINDOW *, int, int, const chtype *, int);
2N/Aextern int mvwaddchstr(WINDOW *, int, int, const chtype *);
2N/Aextern int mvwaddnstr(WINDOW *, int, int, const char *, int);
2N/Aextern int mvwaddnwstr(WINDOW *, int, int, const wchar_t *, int);
2N/Aextern int mvwaddstr(WINDOW *, int, int, const char *);
2N/Aextern int mvwadd_wch(WINDOW *, int, int, const cchar_t *);
2N/Aextern int mvwadd_wchnstr(WINDOW *, int, int, const cchar_t *, int);
2N/Aextern int mvwadd_wchstr(WINDOW *, int, int, const cchar_t *);
2N/Aextern int mvwaddwstr(WINDOW *, int, int, const wchar_t *);
2N/Aextern int mvwchgat(WINDOW *, int, int, int, attr_t, short, const void *);
2N/Aextern int mvwdelch(WINDOW *, int, int);
2N/Aextern int mvwgetch(WINDOW *, int, int);
2N/Aextern int mvwgetnstr(WINDOW *, int, int, char *, int);
2N/Aextern int mvwgetn_wstr(WINDOW *, int, int, wint_t *, int);
2N/Aextern int mvwgetstr(WINDOW *, int, int, char *);
2N/Aextern int mvwget_wch(WINDOW *, int, int, wint_t *);
2N/Aextern int mvwget_wstr(WINDOW *, int, int, wint_t *);
2N/Aextern int mvwhline(WINDOW *, int, int, chtype, int);
2N/Aextern int mvwhline_set(WINDOW *, int, int, const cchar_t *, int);
2N/Aextern int mvwin(WINDOW *, int, int);
2N/Aextern chtype mvwinch(WINDOW *, int, int);
2N/Aextern int mvwinchnstr(WINDOW *, int, int, chtype *, int);
2N/Aextern int mvwinchstr(WINDOW *, int, int, chtype *);
2N/Aextern int mvwinnstr(WINDOW *, int, int, char *, int);
2N/Aextern int mvwinnwstr(WINDOW *, int, int, wchar_t *, int);
2N/Aextern int mvwinsch(WINDOW *, int, int, chtype);
2N/Aextern int mvwinsnstr(WINDOW *, int, int, const char *, int);
2N/Aextern int mvwins_nwstr(WINDOW *, int, int, const wchar_t *, int);
2N/Aextern int mvwinsstr(WINDOW *, int, int, const char *);
2N/Aextern int mvwinstr(WINDOW *, int, int, char *);
2N/Aextern int mvwins_wch(WINDOW *, int, int, const cchar_t *);
2N/Aextern int mvwins_wstr(WINDOW *, int, int, const wchar_t *);
2N/Aextern int mvwin_wch(WINDOW *, int, int, cchar_t *);
2N/Aextern int mvwin_wchnstr(WINDOW *, int, int, cchar_t *, int);
2N/Aextern int mvwin_wchstr(WINDOW *, int, int, cchar_t *);
2N/Aextern int mvwinwstr(WINDOW *, int, int, wchar_t *);
2N/Aextern int mvwprintw(WINDOW *, int, int, char *, ...);
2N/Aextern int mvwscanw(WINDOW *, int, int, char *, ...);
2N/Aextern int mvwvline(WINDOW *, int, int, chtype, int);
2N/Aextern int mvwvline_set(WINDOW *, int, int, const cchar_t *, int);
2N/Aextern int napms(int);
2N/Aextern WINDOW *newpad(int, int);
2N/Aextern SCREEN *newterm(char *, FILE *, FILE *);
2N/Aextern WINDOW *newwin(int, int, int, int);
2N/Aextern int nl(void);
2N/Aextern int nocbreak(void);
2N/Aextern int nodelay(WINDOW *, bool);
2N/Aextern int noecho(void);
2N/Aextern int nonl(void);
2N/Aextern void noqiflush(void);
2N/Aextern int noraw(void);
2N/Aextern int notimeout(WINDOW *, bool);
2N/Aextern int overlay(const WINDOW *, WINDOW *);
2N/Aextern int overwrite(const WINDOW *, WINDOW *);
2N/Aextern int pair_content(short, short *, short *);
2N/Aextern int PAIR_NUMBER(int);
2N/Aextern int pechochar(WINDOW *, chtype);
2N/Aextern int pecho_wchar(WINDOW *, const cchar_t *);
2N/Aextern int pnoutrefresh(WINDOW *, int, int, int, int, int, int);
2N/Aextern int prefresh(WINDOW *, int, int, int, int, int, int);
2N/Aextern int printw(char *, ...);
2N/Aextern int putwin(WINDOW *, FILE *);
2N/Aextern void qiflush(void);
2N/Aextern int raw(void);
2N/Aextern int redrawwin(WINDOW *);
2N/Aextern int refresh(void);
2N/Aextern int reset_prog_mode(void);
2N/Aextern int reset_shell_mode(void);
2N/Aextern int resetty(void);
2N/Aextern int ripoffline(int, int (*)(WINDOW *, int));
2N/Aextern int savetty(void);
2N/Aextern int scanw(char *, ...);
2N/Aextern int scr_dump(const char *);
2N/Aextern int scr_init(const char *);
2N/Aextern int scrl(int);
2N/Aextern int scroll(WINDOW *);
2N/Aextern int scrollok(WINDOW *, bool);
2N/Aextern int scr_restore(const char *);
2N/Aextern int scr_set(const char *);
2N/Aextern int setcchar(cchar_t *, const wchar_t *, const attr_t,
2N/A short, const void *);
2N/Aextern int setscrreg(int, int);
2N/Aextern SCREEN *set_term(SCREEN *);
2N/Aextern int slk_attr_off(const attr_t, void *);
2N/Aextern int slk_attroff(const chtype);
2N/Aextern int slk_attr_on(const attr_t, void *);
2N/Aextern int slk_attron(const chtype);
2N/Aextern int slk_attr_set(const attr_t, short, void *);
2N/Aextern int slk_attrset(const chtype);
2N/Aextern int slk_clear(void);
2N/Aextern int slk_color(short);
2N/Aextern int slk_init(int);
2N/Aextern char *slk_label(int);
2N/Aextern int slk_noutrefresh(void);
2N/Aextern int slk_refresh(void);
2N/Aextern int slk_restore(void);
2N/Aextern int slk_set(int, const char *, int);
2N/Aextern int slk_touch(void);
2N/Aextern int slk_wset(int, const wchar_t *, int);
2N/Aextern int standend(void);
2N/Aextern int standout(void);
2N/Aextern int start_color(void);
2N/Aextern WINDOW *subpad(WINDOW *, int, int, int, int);
2N/Aextern WINDOW *subwin(WINDOW *, int, int, int, int);
2N/Aextern int syncok(WINDOW *, bool);
2N/Aextern chtype termattrs(void);
2N/Aextern attr_t term_attrs(void);
2N/Aextern char *termname(void);
2N/Aextern void timeout(int);
2N/Aextern int touchline(WINDOW *, int, int);
2N/Aextern int touchwin(WINDOW *);
2N/Aextern int typeahead(int);
2N/Aextern int ungetch(int);
2N/Aextern int unget_wch(const wchar_t);
2N/Aextern int untouchwin(WINDOW *);
2N/Aextern void use_env(bool);
2N/Aextern int vid_attr(attr_t, short, void *);
2N/Aextern int vidattr(chtype);
2N/Aextern int vid_puts(attr_t, short, void *, int (*)(int));
2N/Aextern int vidputs(chtype, int (*)(int));
2N/Aextern int vline(chtype, int);
2N/Aextern int vline_set(const cchar_t *, int);
2N/Aextern int vwprintw(WINDOW *, char *, __va_list);
2N/Aextern int vw_printw(WINDOW *, char *, __va_list);
2N/Aextern int vwscanw(WINDOW *, char *, __va_list);
2N/Aextern int vw_scanw(WINDOW *, char *, __va_list);
2N/Aextern int waddch(WINDOW *, const chtype);
2N/Aextern int waddchnstr(WINDOW *, const chtype *, int);
2N/Aextern int waddchstr(WINDOW *, const chtype *);
2N/Aextern int waddnstr(WINDOW *, const char *, int);
2N/Aextern int waddnwstr(WINDOW *, const wchar_t *, int);
2N/Aextern int waddstr(WINDOW *, const char *);
2N/Aextern int wadd_wch(WINDOW *, const cchar_t *);
2N/Aextern int wadd_wchnstr(WINDOW *, const cchar_t *, int);
2N/Aextern int wadd_wchstr(WINDOW *, const cchar_t *);
2N/Aextern int waddwstr(WINDOW *, const wchar_t *);
2N/Aextern int wattroff(WINDOW *, int);
2N/Aextern int wattron(WINDOW *, int);
2N/Aextern int wattrset(WINDOW *, int);
2N/Aextern int wattr_get(WINDOW *, attr_t *, short *, void *);
2N/Aextern int wattr_off(WINDOW *, attr_t, void *);
2N/Aextern int wattr_on(WINDOW *, attr_t, void *);
2N/Aextern int wattr_set(WINDOW *, attr_t, short, void *);
2N/Aextern int wbkgd(WINDOW *, chtype);
2N/Aextern void wbkgdset(WINDOW *, chtype);
2N/Aextern int wbkgrnd(WINDOW *, const cchar_t *);
2N/Aextern void wbkgrndset(WINDOW *, const cchar_t *);
2N/Aextern int wborder(WINDOW *,
2N/A chtype, chtype, chtype, chtype,
2N/A chtype, chtype, chtype, chtype);
2N/Aextern int wborder_set(WINDOW *,
2N/A const cchar_t *, const cchar_t *,
2N/A const cchar_t *, const cchar_t *,
2N/A const cchar_t *, const cchar_t *,
2N/A const cchar_t *, const cchar_t *);
2N/Aextern int wchgat(WINDOW *, int, attr_t, short, const void *);
2N/Aextern int wclear(WINDOW *);
2N/Aextern int wclrtobot(WINDOW *);
2N/Aextern int wclrtoeol(WINDOW *);
2N/Aextern void wcursyncup(WINDOW *);
2N/Aextern int wcolor_set(WINDOW *, short, void *);
2N/Aextern int wdelch(WINDOW *);
2N/Aextern int wdeleteln(WINDOW *);
2N/Aextern int wechochar(WINDOW *, const chtype);
2N/Aextern int wecho_wchar(WINDOW *, const cchar_t *);
2N/Aextern int werase(WINDOW *);
2N/Aextern int wgetbkgrnd(WINDOW *, cchar_t *);
2N/Aextern int wgetch(WINDOW *);
2N/Aextern int wgetnstr(WINDOW *, char *, int);
2N/Aextern int wgetn_wstr(WINDOW *, wint_t *, int);
2N/Aextern int wgetstr(WINDOW *, char *);
2N/Aextern int wget_wch(WINDOW *, wint_t *);
2N/Aextern int wget_wstr(WINDOW *, wint_t *);
2N/Aextern int whline(WINDOW *, chtype, int);
2N/Aextern int whline_set(WINDOW *, const cchar_t *, int);
2N/Aextern chtype winch(WINDOW *);
2N/Aextern int winchnstr(WINDOW *, chtype *, int);
2N/Aextern int winchstr(WINDOW *, chtype *);
2N/Aextern int winnstr(WINDOW *, char *, int);
2N/Aextern int winnwstr(WINDOW *, wchar_t *, int);
2N/Aextern int winsch(WINDOW *, chtype);
2N/Aextern int winsdelln(WINDOW *, int);
2N/Aextern int winsertln(WINDOW *);
2N/Aextern int winsnstr(WINDOW *, const char *, int);
2N/Aextern int wins_nwstr(WINDOW *, const wchar_t *, int);
2N/Aextern int winsstr(WINDOW *, const char *);
2N/Aextern int winstr(WINDOW *, char *);
2N/Aextern int wins_wch(WINDOW *, const cchar_t *);
2N/Aextern int wins_wstr(WINDOW *, const wchar_t *);
2N/Aextern int win_wch(WINDOW *, cchar_t *);
2N/Aextern int win_wchnstr(WINDOW *, cchar_t *, int);
2N/Aextern int win_wchstr(WINDOW *, cchar_t *);
2N/Aextern int winwstr(WINDOW *, wchar_t *);
2N/Aextern int wmove(WINDOW *, int, int);
2N/Aextern int wnoutrefresh(WINDOW *);
2N/Aextern int wprintw(WINDOW *, char *, ...);
2N/Aextern int wredrawln(WINDOW *, int, int);
2N/Aextern int wrefresh(WINDOW *);
2N/Aextern int wscanw(WINDOW *, char *, ...);
2N/Aextern int wscrl(WINDOW *, int);
2N/Aextern int wsetscrreg(WINDOW *, int, int);
2N/Aextern int wstandend(WINDOW *);
2N/Aextern int wstandout(WINDOW *);
2N/Aextern void wsyncup(WINDOW *);
2N/Aextern void wsyncdown(WINDOW *);
2N/Aextern void wtimeout(WINDOW *, int);
2N/Aextern int wtouchln(WINDOW *, int, int, int);
2N/Aextern wchar_t *wunctrl(cchar_t *);
2N/Aextern int wvline(WINDOW *, chtype, int);
2N/Aextern int wvline_set(WINDOW *, const cchar_t *, int);
2N/A
2N/A#if !defined(__lint)
2N/A/*
2N/A * These macros can improve speed and size of an application.
2N/A */
2N/Aextern WINDOW *__w1;
2N/Aextern chtype __cht1;
2N/Aextern chtype __cht2;
2N/Aextern cchar_t *__pcht1;
2N/Aextern cchar_t *__pcht2;
2N/A
2N/A#define addch(ch) waddch(stdscr, ch)
2N/A#define mvaddch(y, x, ch) (move(y, x) ? ((ch), ERR) : addch(ch))
2N/A#define mvwaddch(w, y, x, ch) \
2N/A (wmove(__w1 = (w), y, x) ? ((ch), ERR) : waddch(__w1, ch))
2N/A
2N/A#define add_wch(cp) wadd_wch(stdscr, cp)
2N/A#define mvadd_wch(y, x, cp) (move(y, x) ? ((cp), ERR) : add_wch(cp))
2N/A#define mvwadd_wch(w, y, x, cp) \
2N/A (wmove(__w1 = (w), y, x) ? ((cp), ERR) : wadd_wch(__w1, cp))
2N/A
2N/A#define addchnstr(chs, n) waddchnstr(stdscr, chs, n)
2N/A#define addchstr(chs) waddchstr(stdscr, chs)
2N/A#define mvaddchnstr(y, x, chs, n) \
2N/A (move(y, x) ? ((chs), (n), ERR) : addchnstr(chs, n))
2N/A
2N/A#define mvaddchstr(y, x, chs) \
2N/A (move(y, x) ? ((chs), ERR) : addchstr(chs))
2N/A
2N/A#define mvwaddchnstr(w, y, x, chs, n) \
2N/A (wmove(__w1 = (w), y, x) ? ((chs), (n), ERR) :\
2N/A waddchnstr(__w1, chs, n))
2N/A
2N/A#define mvwaddchstr(w, y, x, chs) \
2N/A (wmove(__w1 = (w), y, x) ? ((chs), ERR) : waddchstr(__w1, chs))
2N/A
2N/A#define waddchstr(w, chs) waddchnstr(w, chs, -1)
2N/A
2N/A#define add_wchnstr(cp, n) wadd_wchnstr(stdscr, cp, n)
2N/A#define add_wchstr(cp) wadd_wchstr(stdscr, cp)
2N/A#define mvadd_wchnstr(y, x, cp, n) \
2N/A (move(y, x) ? ((cp), (n), ERR) : add_wchnstr(cp, n))
2N/A
2N/A#define mvadd_wchstr(y, x, cp) \
2N/A (move(y, x) ? ((cp), ERR) : add_wchstr(cp))
2N/A
2N/A#define mvwadd_wchnstr(w, y, x, cp, n) \
2N/A (wmove(__w1 = (w), y, x) ? ((cp), (n), ERR) :\
2N/A wadd_wchnstr(__w1, cp, n))
2N/A
2N/A#define mvwadd_wchstr(w, y, x, cp) \
2N/A (wmove(__w1 = (w), y, x) ? ((cp), ERR) :\
2N/A wadd_wchstr(__w1, cp))
2N/A
2N/A#define wadd_wchstr(w, cp) wadd_wchnstr(w, cp, -1)
2N/A#define addnstr(s, n) waddnstr(stdscr, s, n)
2N/A#define addstr(s) waddstr(stdscr, s)
2N/A#define mvaddnstr(y, x, s, n) \
2N/A (move(y, x) ? (s, n, ERR) : addnstr(s, n))
2N/A
2N/A#define mvaddstr(y, x, s) \
2N/A (move(y, x) ? (s, ERR) : addstr(s))
2N/A
2N/A#define mvwaddnstr(w, y, x, s, n) \
2N/A (wmove(__w1 = (w), y, x) ? (s, n, ERR) : waddnstr(__w1, s, n))
2N/A
2N/A#define mvwaddstr(w, y, x, s) \
2N/A (wmove(__w1 = (w), y, x) ? (s, ERR) : waddstr(__w1, s))
2N/A
2N/A#define waddstr(w, wcs) waddnstr(w, wcs, -1)
2N/A#define addnwstr(wcs, n) waddnwstr(stdscr, wcs, n)
2N/A#define addwstr(wcs) waddwstr(stdscr, wcs)
2N/A#define mvaddnwstr(y, x, wcs, n) \
2N/A (move(y, x) ? (wcs, n, ERR) : addnwstr(wcs, n))
2N/A
2N/A#define mvaddwstr(y, x, wcs) \
2N/A (move(y, x) ? (wcs, ERR) : addwstr(wcs))
2N/A
2N/A#define mvwaddnwstr(w, y, x, wcs, n) \
2N/A (wmove(__w1 = (w), y, x) ? (wcs, n, ERR) :\
2N/A waddnwstr(__w1, wcs, n))
2N/A
2N/A#define mvwaddwstr(w, y, x, wcs) \
2N/A (wmove(__w1 = (w), y, x) ? (wcs, ERR) : waddwstr(__w1, wcs))
2N/A
2N/A#define waddwstr(w, wcs) waddnwstr(w, wcs, -1)
2N/A#define attr_get(a, c, o) wattr_get(stdscr, a, c, o)
2N/A#define attr_off(a, o) wattr_off(stdscr, a, o)
2N/A#define attr_on(a, o) wattr_on(stdscr, a, o)
2N/A#define attr_set(a, c, o) wattr_set(stdscr, a, c, o)
2N/A
2N/A#define COLOR_PAIR(n) ((chtype)(n) << __COLOR_SHIFT)
2N/A#define PAIR_NUMBER(a) (((chtype)(a) & A_COLOR) >> __COLOR_SHIFT)
2N/A
2N/A#define bkgd(ch) wbkgd(stdscr, ch)
2N/A#define bkgdset(ch) wbkgdset(stdscr, ch)
2N/A
2N/A#define bkgrnd(b) wbkgrnd(stdscr, b)
2N/A#define bkgrndset(b) wbkgrndset(stdscr, b)
2N/A#define getbkgrnd(b) wgetbkgrnd(stdscr, b)
2N/A#define wgetbkgrnd(w, b) (*(b) = (w)->_bg, OK)
2N/A
2N/A#define border(ls, rs, ts, bs, tl, tr, bl, br) \
2N/A wborder(stdscr, ls, rs, ts, bs, tl, tr, bl, br)
2N/A
2N/A#define border_set(ls, rs, ts, bs, tl, tr, bl, br) \
2N/A wborder_set(stdscr, ls, rs, ts, bs, tl, tr, bl, br)
2N/A
2N/A#define box(w, v, h) \
2N/A wborder(w, __cht1 = (v), __cht1, __cht2 = (h), __cht2, 0, 0, 0, 0)
2N/A
2N/A#define box_set(w, v, h) \
2N/A wborder_set(w, __pcht1 = (v), __pcht1, __pcht2 = (h), __pcht2,\
2N/A 0, 0, 0, 0)
2N/A
2N/A#define can_change_color() \
2N/A (2 < max_colors && can_change && initialize_color != NULL)
2N/A
2N/A#define has_colors() (0 < max_colors)
2N/A
2N/A#define chgat(n, a, co, p) wchgat(stdscr, n, a, co, p)
2N/A#define mvchgat(y, x, n, a, co, p) \
2N/A (move(y, x) ? (n, a, co, p, ERR) : chgat(n, a, co, p))
2N/A
2N/A#define mvwchgat(w, y, x, n, a, co, p) \
2N/A (wmove(__w1 = (w), y, x) ? (n, a, co, p, ERR) :\
2N/A wchgat(__w1, n, a, co, p))
2N/A
2N/A#define clear() wclear(stdscr)
2N/A#define clrtobot() wclrtobot(stdscr)
2N/A#define clrtoeol() wclrtoeol(stdscr)
2N/A#define erase() werase(stdscr)
2N/A#define wclear(w) \
2N/A (clearok(__w1 = (w), 1) ? ERR : werase(__w1))
2N/A
2N/A#define werase(w) \
2N/A (wmove(__w1 = (w), 0, 0) ? ERR : wclrtobot(__w1))
2N/A
2N/A#define delch() wdelch(stdscr)
2N/A#define mvdelch(y, x) (move(y, x) ? ERR : delch())
2N/A#define mvwdelch(w, y, x) \
2N/A (wmove(__w1 = (w), y, x) ? ERR : wdelch(__w1))
2N/A
2N/A#define deleteln() wdeleteln(stdscr)
2N/A#define insdelln(n) winsdelln(stdscr, n)
2N/A#define insertln() winsertln(stdscr)
2N/A#define wdeleteln(w) winsdelln(w, -1)
2N/A#define winsertln(w) winsdelln(w, 1)
2N/A#define refresh() wrefresh(stdscr)
2N/A#define echochar(ch) wechochar(stdscr, ch)
2N/A#define echo_wchar(cp) wecho_wchar(stdscr, cp)
2N/A#define wechochar(w, ch) \
2N/A (waddch(__w1 = (w), ch) ? (wrefresh(__w1), ERR) :\
2N/A wrefresh(__w1))
2N/A
2N/A#define wecho_wchar(w, cp) \
2N/A (wadd_wch(__w1 = (w), cp) ? (wrefresh(__w1), ERR) :\
2N/A wrefresh(__w1))
2N/A
2N/A#define getch() wgetch(stdscr)
2N/A#define mvgetch(y, x) (move(y, x) ? ERR : getch())
2N/A#define mvwgetch(w, y, x) \
2N/A (wmove(__w1 = (w), y, x) ? ERR : wgetch(__w1))
2N/A
2N/A#define get_wch(wcp) wget_wch(stdscr, wcp)
2N/A#define mvget_wch(y, x, wcp) \
2N/A (move(y, x) ? (wcp, ERR) : get_wch(wcp))
2N/A
2N/A#define mvwget_wch(w, y, x, wcp) \
2N/A (wmove(__w1 = (w), y, x) ? (wcp, ERR) : wget_wch(__w1, wcp))
2N/A
2N/A#define getnstr(s, n) wgetnstr(stdscr, s, n)
2N/A#define getstr(s) wgetstr(stdscr, s)
2N/A#define mvgetnstr(y, x, s, n) \
2N/A (move(y, x) ? (s, n, ERR) : getnstr(s, n))
2N/A
2N/A#define mvgetstr(y, x, s) \
2N/A (move(y, x) ? (s, ERR) : getstr(s))
2N/A
2N/A#define mvwgetnstr(w, y, x, s, n) \
2N/A (wmove(__w1 = (w), y, x) ? (s, n, ERR) : wgetnstr(__w1, s, n))
2N/A
2N/A#define mvwgetstr(w, y, x, s) \
2N/A (wmove(__w1 = (w), y, x) ? (s, ERR) : wgetstr(__w1, s))
2N/A
2N/A#define wgetstr(w, s) wgetnstr(w, s, -1)
2N/A#define getn_wstr(wcs, n) wgetn_wstr(stdscr, wcs, n)
2N/A#define get_wstr(wcs) wget_wstr(stdscr, wcs)
2N/A#define mvgetn_wstr(y, x, wcs, n) \
2N/A (move(y, x) ? (wcs, n, ERR) : getn_wstr(wcs, n))
2N/A
2N/A#define mvget_wstr(y, x, wcs) \
2N/A (move(y, x) ? (wcs, ERR) : get_wstr(wcs))
2N/A
2N/A#define mvwgetn_wstr(w, y, x, wcs, n) \
2N/A (wmove(__w1 = (w), y, x) ? (wcs, n, ERR) :\
2N/A wgetn_wstr(__w1, wcs, n))
2N/A
2N/A#define mvwget_wstr(w, y, x, wcs) \
2N/A (wmove(__w1 = (w), y, x) ? (wcs, ERR) : wget_wstr(__w1, wcs))
2N/A
2N/A#define wget_wstr(w, wcs) wgetn_wstr(w, wcs, -1)
2N/A
2N/A#define has_ic() \
2N/A (((insert_character != NULL || parm_ich != NULL) && \
2N/A (delete_character != NULL || parm_dch != NULL)) || \
2N/A (enter_insert_mode != NULL && exit_insert_mode))
2N/A
2N/A#define has_il() \
2N/A (((insert_line != NULL || parm_insert_line != NULL) && \
2N/A (delete_line != NULL || parm_delete_line != NULL)) || \
2N/A change_scroll_region != NULL)
2N/A
2N/A#define hline(ch, n) whline(stdscr, ch, n)
2N/A#define vline(ch, n) wvline(stdscr, ch, n)
2N/A#define mvhline(y, x, ch, n) \
2N/A (move(y, x) ? (ch, n, ERR) : hline(ch, n))
2N/A
2N/A#define mvvline(y, x, ch, n) \
2N/A (move(y, x) ? (ch, n, ERR) : vline(ch, n))
2N/A
2N/A#define mvwhline(w, y, x, ch, n) \
2N/A (wmove(__w1 = (w), y, x) ? (ch, n, ERR) : whline(__w1, ch, n))
2N/A
2N/A#define mvwvline(w, y, x, ch, n) \
2N/A (wmove(__w1 = (w), y, x) ? (ch, n, ERR) : wvline(__w1, ch, n))
2N/A
2N/A#define hline_set(cp, n) whline_set(stdscr, cp, n)
2N/A#define vline_set(cp, n) wvline_set(stdscr, cp, n)
2N/A#define mvhline_set(y, x, cp, n) \
2N/A (move(y, x) ? (cp, n, ERR) : hline_set(cp, n))
2N/A
2N/A#define mvvline_set(y, x, cp, n) \
2N/A (move(y, x) ? (cp, n, ERR) : vline_set(cp, n))
2N/A
2N/A#define mvwhline_set(w, y, x, cp, n) \
2N/A (wmove(__w1 = (w), y, x) ? (cp, n, ERR) : whline_set(__w1, cp, n))
2N/A
2N/A#define mvwvline_set(w, y, x, cp, n) \
2N/A (wmove(__w1 = (w), y, x) ? (cp, n, ERR) : wvline_set(__w1, cp, n))
2N/A
2N/A#define inch() winch(stdscr)
2N/A#define mvinch(y, x) (move(y, x) ? ERR : inch())
2N/A#define mvwinch(w, y, x) \
2N/A (wmove(__w1 = (w), y, x) ? ERR : winch(__w1))
2N/A
2N/A#define in_wch(cp) win_wch(stdscr, cp)
2N/A#define mvin_wch(y, x, cp) \
2N/A (move(y, x) ? (cp, ERR) : in_wch(cp))
2N/A
2N/A#define mvwin_wch(w, y, x, cp) \
2N/A (wmove(__w1 = (w), y, x) ? (cp, ERR) : win_wch(__w1, cp))
2N/A
2N/A#define inchnstr(chs, n) winchnstr(stdscr, chs, n)
2N/A#define inchstr(chs) winchstr(stdscr, chs)
2N/A#define mvinchnstr(y, x, chs, n) \
2N/A (move(y, x) ? (chs, n, ERR) : inchnstr(chs, n))
2N/A
2N/A#define mvinchstr(y, x, chs) \
2N/A (move(y, x) ? (chs, ERR) : inchstr(chs))
2N/A
2N/A#define mvwinchnstr(w, y, x, chs, n) \
2N/A (wmove(__w1 = (w), y, x) ? (chs, n, ERR) : winchnstr(__w1, chs, n))
2N/A
2N/A#define mvwinchstr(w, y, x, chs) \
2N/A (wmove(__w1 = (w), y, x) ? (chs, ERR) : winchstr(__w1, chs))
2N/A
2N/A#define winchstr(w, chs) winchnstr(w, chs, -1)
2N/A#define in_wchnstr(cp, n) win_wchnstr(stdscr, cp, n)
2N/A#define in_wchstr(cp) win_wchstr(stdscr, cp)
2N/A#define mvin_wchnstr(y, x, cp, n) \
2N/A (move(y, x) ? (cp, n, ERR) : in_wchnstr(cp, n))
2N/A
2N/A#define mvin_wchstr(y, x, cp) \
2N/A (move(y, x) ? (cp, ERR) : in_wchstr(cp))
2N/A
2N/A#define mvwin_wchnstr(w, y, x, cp, n) \
2N/A (wmove(__w1 = (w), y, x) ? (cp, n, ERR) :\
2N/A win_wchnstr(__w1, cp, n))
2N/A
2N/A#define mvwin_wchstr(w, y, x, cp) \
2N/A (wmove(__w1 = (w), y, x) ? (cp, ERR) : win_wchstr(__w1, cp))
2N/A
2N/A#define win_wchstr(w, cp) win_wchnstr(w, cp, -1)
2N/A#define innstr(s, n) winnstr(stdscr, s, n)
2N/A#define instr(s) winstr(stdscr, s)
2N/A#define mvinnstr(y, x, s, n) \
2N/A (move(y, x) ? (s, n, ERR) : innstr(s, n))
2N/A
2N/A#define mvinstr(y, x, s) \
2N/A (move(y, x) ? (s, ERR) : instr(s))
2N/A
2N/A#define mvwinnstr(w, y, x, s, n) \
2N/A (wmove(__w1 = (w), y, x) ? (s, n, ERR) : winnstr(__w1, s, n))
2N/A
2N/A#define mvwinstr(w, y, x, s) \
2N/A (wmove(__w1 = (w), y, x) ? (s, ERR) : winstr(__w1, s))
2N/A
2N/A#define winstr(w, s) (winnstr(w, s, -1), OK)
2N/A#define innwstr(wcs, n) winnwstr(stdscr, wcs, n)
2N/A#define inwstr(wcs) winwstr(stdscr, wcs)
2N/A#define mvinnwstr(y, x, wcs, n) \
2N/A (move(y, x) ? (wcs, n, ERR) : innwstr(wcs, n))
2N/A
2N/A#define mvinwstr(y, x, wcs) \
2N/A (move(y, x) ? (wcs, ERR) : inwstr(wcs))
2N/A
2N/A#define mvwinnwstr(w, y, x, wcs, n) \
2N/A (wmove(__w1 = (w), y, x) ? (wcs, n, ERR) :\
2N/A winnwstr(__w1, wcs, n))
2N/A
2N/A#define mvwinwstr(w, y, x, wcs) \
2N/A (wmove(__w1 = (w), y, x) ? (wcs, ERR) : winwstr(__w1, wcs))
2N/A
2N/A#define winwstr(w, wcs) (winnwstr(w, wcs, -1), OK)
2N/A#define insch(ch) winsch(stdscr, ch)
2N/A#define mvinsch(y, x, ch) (move(y, x) ? (ch, ERR) : insch(ch))
2N/A#define mvwinsch(w, y, x, ch) \
2N/A (wmove(__w1 = (w), y, x) ? (ch, ERR) : winsch(__w1, ch))
2N/A
2N/A#define ins_wch(cp) wins_wch(stdscr, cp)
2N/A#define mvins_wch(y, x, cp) (move(y, x) ? (cp, ERR) : ins_wch(cp))
2N/A#define mvwins_wch(w, y, x, cp) \
2N/A (wmove(__w1 = (w), y, x) ? (cp, ERR) : wins_wch(__w1, cp))
2N/A
2N/A#define insnstr(s, n) winsnstr(stdscr, s, n)
2N/A#define insstr(s) winsstr(stdscr, s)
2N/A#define mvinsnstr(y, x, s, n) (move(y, x) ? (s, n, ERR) : insnstr(s, n))
2N/A#define mvinsstr(y, x, s) (move(y, x) ? (s, ERR) : insstr(s))
2N/A#define mvwinsnstr(w, y, x, s, n) \
2N/A (wmove(__w1 = (w), y, x) ? (s, n, ERR) : winsnstr(__w1, s, n))
2N/A
2N/A#define mvwinsstr(w, y, x, s) \
2N/A (wmove(__w1 = (w), y, x) ? (s, ERR) : winsstr(__w1, s))
2N/A
2N/A#define winsstr(w, s) winsnstr(w, s, -1)
2N/A#define ins_nwstr(wcs, n) wins_nwstr(stdscr, wcs, n)
2N/A#define ins_wstr(wcs) wins_wstr(stdscr, wcs)
2N/A#define mvins_nwstr(y, x, wcs, n) \
2N/A (move(y, x) ? (wcs, n, ERR) : ins_nwstr(wcs, n))
2N/A
2N/A#define mvins_wstr(y, x, wcs) (move(y, x) ? (wcs, ERR) : ins_wstr(wcs))
2N/A#define mvwins_nwstr(w, y, x, wcs, n) \
2N/A (wmove(__w1 = (w), y, x) ? (wcs, n, ERR) : wins_nwstr(__w1, wcs, n))
2N/A
2N/A#define mvwins_wstr(w, y, x, wcs) \
2N/A (wmove(__w1 = (w), y, x) ? (wcs, ERR) : wins_wstr(__w1, wcs))
2N/A
2N/A#define wins_wstr(w, wcs) wins_nwstr(w, wcs, -1)
2N/A#define is_linetouched(w, y) (0 <= (w)->_last[y])
2N/A#define move(y, x) wmove(stdscr, y, x)
2N/A#define subpad(par, ny, nx, by, bx) subwin(par, ny, nx, by, bx)
2N/A#define nodelay(w, bf) (wtimeout(w, (bf) ? 0: -1), OK)
2N/A#define timeout(n) wtimeout(stdscr, n)
2N/A#define qiflush() ((void) intrflush(NULL, 1))
2N/A#define noqiflush() ((void) intrflush(NULL, 0))
2N/A#define redrawwin(w) wredrawln(__w1 = (w), 0, (__w1)->_maxy)
2N/A#define scrl(n) wscrl(stdscr, n)
2N/A#define setscrreg(t, b) wsetscrreg(stdscr, t, b)
2N/A#define standend() wstandend(stdscr)
2N/A#define standout() wstandout(stdscr)
2N/A#define touchline(w, y, n) wtouchln(w, y, n, 1)
2N/A#define touchwin(w) wtouchln(__w1 = (w), 0, __w1->_maxy, 1)
2N/A#define untouchwin(w) wtouchln(__w1 = (w), 0, __w1->_maxy, 0)
2N/A#define termname() (cur_term->_term)
2N/A
2N/A#endif /* !defined(__lint) */
2N/A
2N/A/*
2N/A * Special Keys
2N/A *
2N/A * Keypad layout
2N/A * A1 up A3
2N/A * left B2 right
2N/A * C1 down C3
2N/A *
2N/A * Chossing negative values for KEY_ constants means that they can
2N/A * be safely returned in either an int or long type.
2N/A */
2N/A#define __KEY_BASE (-2)
2N/A#define __KEY_MAX __KEY_BASE
2N/A
2N/A#define KEY_CODE_YES (__KEY_BASE-1) /* Special indicator. */
2N/A#define KEY_BREAK (__KEY_BASE-2) /* Break key (unreliable) */
2N/A#define KEY_DOWN (__KEY_BASE-3) /* The four arrow keys ... */
2N/A#define KEY_UP (__KEY_BASE-4)
2N/A#define KEY_LEFT (__KEY_BASE-5)
2N/A#define KEY_RIGHT (__KEY_BASE-6)
2N/A#define KEY_HOME (__KEY_BASE-7) /* Move to upper-left corner. */
2N/A#define KEY_BACKSPACE (__KEY_BASE-8) /* Backspace */
2N/A#define KEY_F0 (__KEY_BASE-9) /* Function keys. Space for */
2N/A#define KEY_F(n) (KEY_F0-(n)) /* 64 keys is reserved. */
2N/A#define KEY_DL (__KEY_BASE-73) /* Delete line */
2N/A#define KEY_IL (__KEY_BASE-74) /* Insert line */
2N/A#define KEY_DC (__KEY_BASE-75) /* Delete character */
2N/A#define KEY_IC (__KEY_BASE-76) /* Ins char / enter ins mode */
2N/A#define KEY_EIC (__KEY_BASE-77) /* Exit insert char mode */
2N/A#define KEY_CLEAR (__KEY_BASE-78) /* Clear screen */
2N/A#define KEY_EOS (__KEY_BASE-79) /* Clear to end of screen */
2N/A#define KEY_EOL (__KEY_BASE-80) /* Clear to end of line */
2N/A#define KEY_SF (__KEY_BASE-81) /* Scroll 1 line forward */
2N/A#define KEY_SR (__KEY_BASE-82) /* Scroll 1 line backwards */
2N/A#define KEY_NPAGE (__KEY_BASE-83) /* Next page */
2N/A#define KEY_PPAGE (__KEY_BASE-84) /* Previous page */
2N/A#define KEY_STAB (__KEY_BASE-85) /* Set tab */
2N/A#define KEY_CTAB (__KEY_BASE-86) /* Clear tab */
2N/A#define KEY_CATAB (__KEY_BASE-87) /* Clear all tabs */
2N/A#define KEY_ENTER (__KEY_BASE-88) /* Enter or send */
2N/A#define KEY_SRESET (__KEY_BASE-89) /* Soft (partial) reset */
2N/A#define KEY_RESET (__KEY_BASE-90) /* Hard reset */
2N/A#define KEY_PRINT (__KEY_BASE-91) /* Print or copy */
2N/A#define KEY_LL (__KEY_BASE-92) /* Move to lower left corner. */
2N/A#define KEY_A1 (__KEY_BASE-93) /* Upper left of keypad */
2N/A#define KEY_A3 (__KEY_BASE-94) /* Upper rght of keypad */
2N/A#define KEY_B2 (__KEY_BASE-95) /* Center of keypad */
2N/A#define KEY_C1 (__KEY_BASE-96) /* Lower left of keypad */
2N/A#define KEY_C3 (__KEY_BASE-97) /* Lower right of keypad */
2N/A#define KEY_BTAB (__KEY_BASE-98) /* Back Tab */
2N/A#define KEY_BEG (__KEY_BASE-99) /* Beginning */
2N/A#define KEY_CANCEL (__KEY_BASE-100)
2N/A#define KEY_CLOSE (__KEY_BASE-101)
2N/A#define KEY_COMMAND (__KEY_BASE-102)
2N/A#define KEY_COPY (__KEY_BASE-103)
2N/A#define KEY_CREATE (__KEY_BASE-104)
2N/A#define KEY_END (__KEY_BASE-105)
2N/A#define KEY_EXIT (__KEY_BASE-106)
2N/A#define KEY_FIND (__KEY_BASE-107)
2N/A#define KEY_HELP (__KEY_BASE-108)
2N/A#define KEY_MARK (__KEY_BASE-109)
2N/A#define KEY_MESSAGE (__KEY_BASE-110)
2N/A#define KEY_MOUSE (__KEY_BASE-111) /* Mouse event occured */
2N/A#define KEY_MOVE (__KEY_BASE-112)
2N/A#define KEY_NEXT (__KEY_BASE-113) /* Next object */
2N/A#define KEY_OPEN (__KEY_BASE-114)
2N/A#define KEY_OPTIONS (__KEY_BASE-115)
2N/A#define KEY_PREVIOUS (__KEY_BASE-116) /* Previous object */
2N/A#define KEY_REDO (__KEY_BASE-117)
2N/A#define KEY_REFERENCE (__KEY_BASE-118)
2N/A#define KEY_REFRESH (__KEY_BASE-119)
2N/A#define KEY_REPLACE (__KEY_BASE-120)
2N/A#define KEY_RESTART (__KEY_BASE-121)
2N/A#define KEY_RESUME (__KEY_BASE-122)
2N/A#define KEY_SAVE (__KEY_BASE-123)
2N/A#define KEY_SBEG (__KEY_BASE-124) /* Shifted keys */
2N/A#define KEY_SCANCEL (__KEY_BASE-125)
2N/A#define KEY_SCOMMAND (__KEY_BASE-126)
2N/A#define KEY_SCOPY (__KEY_BASE-127)
2N/A#define KEY_SCREATE (__KEY_BASE-128)
2N/A#define KEY_SDC (__KEY_BASE-129)
2N/A#define KEY_SDL (__KEY_BASE-130)
2N/A#define KEY_SELECT (__KEY_BASE-131) /* Select */
2N/A#define KEY_SEND (__KEY_BASE-132) /* Shifted end key */
2N/A#define KEY_SEOL (__KEY_BASE-133)
2N/A#define KEY_SEXIT (__KEY_BASE-134)
2N/A#define KEY_SFIND (__KEY_BASE-135)
2N/A#define KEY_SHELP (__KEY_BASE-136)
2N/A#define KEY_SHOME (__KEY_BASE-137)
2N/A#define KEY_SIC (__KEY_BASE-138)
2N/A#define KEY_SLEFT (__KEY_BASE-139)
2N/A#define KEY_SMESSAGE (__KEY_BASE-140)
2N/A#define KEY_SMOVE (__KEY_BASE-141)
2N/A#define KEY_SNEXT (__KEY_BASE-142)
2N/A#define KEY_SOPTIONS (__KEY_BASE-143)
2N/A#define KEY_SPREVIOUS (__KEY_BASE-144)
2N/A#define KEY_SPRINT (__KEY_BASE-145)
2N/A#define KEY_SREDO (__KEY_BASE-146)
2N/A#define KEY_SREPLACE (__KEY_BASE-147)
2N/A#define KEY_SRIGHT (__KEY_BASE-148)
2N/A#define KEY_SRSUME (__KEY_BASE-149)
2N/A#define KEY_SSAVE (__KEY_BASE-150)
2N/A#define KEY_SSUSPEND (__KEY_BASE-151)
2N/A#define KEY_SUNDO (__KEY_BASE-152)
2N/A#define KEY_SUSPEND (__KEY_BASE-153)
2N/A#define KEY_UNDO (__KEY_BASE-154)
2N/A
2N/A#define __KEY_MIN (__KEY_BASE-155)
2N/A
2N/A#ifdef __cplusplus
2N/A}
2N/A#endif
2N/A
2N/A#endif /* _CURSES_H */