home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1999 March B
/
SCO_CASTOR4RRT.iso
/
uccs
/
root.11
/
usr
/
include
/
stdcurses.h
Wrap
C/C++ Source or Header
|
1998-08-19
|
56KB
|
1,737 lines
#ifdef IDENT
#ident "@(#)icurses:screen/term/curses.ed 1.53.1.2"
#endif /* IDENT */
/*
* Copyright (c) 1998 The Santa Cruz Operation, Inc.. All Rights Reserved.
*
* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF THE
* SANTA CRUZ OPERATION INC.
*
* The copyright notice above does not evidence any actual or intended
* publication of such source code.
*/
/* copyright "%c%" */
/*
* Copyright (c) 1982, 1986, 1988
* The Regents of the University of California
* All Rights Reserved.
* Portions of this document are derived from
* software developed by the University of
* California, Berkeley, and its contributors.
*/
#ident "$Header: copyright.h 1.2 91/06/26 $"
/*
* curses.h - this file is automatically made from caps and
* curses.ed. Don't make changes directly to curses.h!
*/
#ifndef _CURSES_H
#define _CURSES_H /* define prevents multiple includes */
#if !(defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE_EXTENDED >= 1))
#define CURSES_H /* for backward compatibility */
#endif
#ifdef __cplusplus
extern "C" {
#endif
#include <stddef.h> /* get definition of wchar_t */
#include <stdio.h> /* get definition of FILE */
#ifndef _ATTR_T
#define _ATTR_T
typedef unsigned long attr_t;
#endif
#ifndef _CCHAR_T
#define _CCHAR_T
#define _ZLC_MOD_MAX 5
typedef struct {
attr_t _a;
wchar_t _c;
wchar_t _z[_ZLC_MOD_MAX];
} cchar_t;
#endif
#define _CSMAX 4
#ifndef _BOOL
typedef char bool;
#endif
#define _VR3_COMPAT_CODE
/*
* chtype is the type used to store a character together with attributes.
* It can be set to "char" to save space, or "long" to get more attributes.
*/
#ifndef _CHTYPE_T
#define _CHTYPE_T
#ifdef CHTYPE
typedef CHTYPE chtype;
#else
typedef unsigned long chtype;
#endif /* CHTYPE */
#endif /* _CHTYPE_T */
#ifndef _WINT_T
# define _WINT_T
typedef long wint_t;
#endif /* _WINT_T */
#ifndef WEOF
# define WEOF (-1)
#endif
/*
Define for the 'old' definition of chtype is required
when we are running in compatibility mode
*/
#ifdef _VR3_COMPAT_CODE
typedef unsigned short _ochtype;
#endif
/* TRUE and FALSE get defined so many times, */
/* let's not get in the way of other definitions. */
#if !defined(TRUE) || ((TRUE) != 1)
#define TRUE (1)
#endif
#if !defined(FALSE) || ((FALSE) != 0)
#define FALSE (0)
#endif
#if !defined(ERR) || ((ERR) != -1)
#define ERR (-1)
#endif
#if !defined(OK) || ((OK) != 0)
#define OK (0)
#endif
/* short-hand notations */
typedef struct _win_st WINDOW;
typedef struct _screen SCREEN;
#if !(defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE_EXTENDED >= 1))
typedef struct _Mouse MOUSE_STATUS;
#endif
struct _win_st
{
short _cury, _curx; /* current coordinates */
short _maxy, _maxx; /* max coordinates */
short _begy, _begx; /* (0,0) screen coordinates */
char _flags;
short _yoffset; /* actual begy is _begy+_yoffset */
bool _clear, /* clearok() info */
_leave, /* leaveok() info */
_immed, /* window in immediate mode */
_sync; /* auto syncup of parent */
WINDOW *_padwin; /* "pad" area for current window */
short *_firstch; /* first change in line */
short *_lastch; /* last change in line */
short _tmarg, _bmarg; /* scrolling region bounds */
/* MUST stay at this offset in WINDOW */
unsigned _scroll : 1; /* scrollok() info */
unsigned _use_idl : 1;
unsigned _use_keypad : 1;
unsigned _notimeout : 1;
unsigned _use_idc : 1;
attr_t _attrs; /* current window attributes */
cchar_t _bkgd; /* background, normally blank */
int _delay; /* delay period on wgetch
* 0: for nodelay
* <0: for infinite delay
* >0: delay time in units of millisec
*/
short _ndescs; /* number of descendants */
short _parx, _pary; /* coords relative to parent (0,0) */
WINDOW *_parent; /* the parent if this is a subwin */
cchar_t **_y; /* lines of data */
unsigned char _waitc[_CSMAX+1];/*array to store partial m-width char*/
char _index;
#define _WAITC_FREE 0
#define _WAITC_IN 1
#define _WAITC_ADD 2
#define _WAITC_INS 3
char _inuse;
};
/* _lastch is initially set to this, _firstch is set to win->_maxx */
#define _NOCHANGE -1
#define _INFINITY 16000 /* no line can be longer than this */
/* values for win->_flags */
#define _ISPAD 001
#define _WINCHANGED 002
#define _WINMOVED 004
#define _WINSDEL 010
#define _CANT_BE_IMMED 020
#define _WIN_ADD_ONE 040
#define _WIN_INS_ONE 100
struct _Mouse {
int _x, _y;
short _button[3];
int _changes;
};
/*
* Various tricks to shut up lint about things that are perfectly fine.
*/
#if defined(_XOPEN_SOURCE) || defined(lint) && !defined(CURSES) /* if not internal to curses source */
struct _screen {
int _nobody_;
};
#endif /* lint */
/* common external variables */
extern int LINES, COLS, COLORS, COLOR_PAIRS;
extern WINDOW *stdscr, *curscr;
#if !(defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE_EXTENDED >= 1))
extern MOUSE_STATUS Mouse_status;
#endif /* (defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE_EXTENDED >= 1)) */
extern cchar_t *_wacs_map;
#ifdef _VR3_COMPAT_CODE
extern _ochtype _acs_map[];
extern chtype _acs32map[];
/* definitions for Vr3 source compatibility */
#if !(defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE_EXTENDED >= 1))
#define initscr _initscr32
#define newterm _newterm32
#define waddch _w32addch
#define wechochar _w32echochar
#define pechochar _p32echochar
#define winsch _w32insch
#define vidputs _vid32puts
#define vidattr _vid32attr
#define wattroff _w32attroff
#define wattron _w32attron
#define wattrset _w32attrset
#define box _box32
#endif /* (defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE_EXTENDED >= 1)) */
#define _acs_map _acs32map
#else /* _VR3_COMPAT_CODE */
extern chtype _acs_map[];
#endif /* _VR3_COMPAT_CODE */
#ifdef __STDC__
SCREEN *newterm(char *, FILE *, FILE *);
WINDOW *derwin(WINDOW *, int, int, int, int);
WINDOW *dupwin(WINDOW *);
WINDOW *getwin(FILE *);
WINDOW *initscr(void);
WINDOW *newpad(int, int);
WINDOW *newwin(int, int, int, int);
WINDOW *subpad(WINDOW *, int, int, int, int);
WINDOW *subwin(WINDOW *, int, int, int, int);
attr_t term_attrs(void);
bool can_change_color(void);
bool has_colors(void);
bool has_ic(void);
bool has_il(void);
bool is_linetouched(WINDOW *, int);
bool is_wintouched(WINDOW *);
bool isendwin(void);
char *key_name(wchar_t);
char *keyname(int);
char *longname(void);
char *slk_label(int);
#if defined(_XOPEN_SOURCE)
char *tparm(char *, long, long, long, long, long, long, long, long, long);
#else
char *tparm(char *, ...);
#endif
char *termname(void);
char *tigetstr(char *);
char erasechar(void);
char killchar(void);
chtype termattrs(void);
chtype winch(WINDOW *);
int _getsyx(int *, int *);
int _meta(bool);
int _overlay (WINDOW *, WINDOW *, int);
int _ring(int);
int _setecho(int);
int _setnonl(int);
int add_wch(const cchar_t *);
int add_wchnstr(const cchar_t *, int);
int add_wchstr(const cchar_t *);
int baudrate(void);
int bkgrnd(const cchar_t *);
int border_set(const cchar_t *, const cchar_t *, const cchar_t *, const cchar_t *, const cchar_t *, const cchar_t *, const cchar_t *, const cchar_t *);
int box(WINDOW *, chtype, chtype);
int box_set(WINDOW *, const cchar_t *, const cchar_t *);
int cbreak(void);
int clearok(WINDOW *, bool);
int color_content(short, short *, short *, short *);
int copywin(const WINDOW *, WINDOW *, int, int, int, int, int, int, int);
int curs_set(int);
int def_prog_mode(void);
int def_shell_mode(void);
int delay_output(int);
int delwin(WINDOW *);
int doupdate(void);
int echo_wchar(const cchar_t *);
int endwin(void);
int erasewchar(wchar_t *);
int flushinp(void);
int getbkgrnd(cchar_t *);
int getcchar(const cchar_t *, wchar_t *, attr_t *, short *, void *);
int getn_wstr(wint_t *, int);
int get_wch(wint_t *);
int get_wstr(wint_t *);
int halfdelay(int);
int hline_set(const cchar_t *, int);
int idlok(WINDOW *, bool);
int init_color(short, short, short, short);
int init_pair(short, short, short);
int intrflush(WINDOW *, bool);
int keypad(WINDOW *, bool);
int killwchar(wchar_t *);
int leaveok(WINDOW *, bool);
int mvadd_wch(int, int, const cchar_t *);
int mvadd_wchnstr(int, int, const cchar_t *, int);
int mvadd_wchstr(int, int, const cchar_t *);
int mvcur(int, int, int, int);
int mvderwin(WINDOW *, int, int);
int mvgetn_wstr(int, int, wint_t *, int);
int mvget_wch(int, int, wint_t *);
int mvget_wstr(int, int, wint_t *);
int mvhline_set(int, int, const cchar_t *, int);
int mvprintw(int, int, char *, ...);
int mvscanw(int, int, char *, ...);
int mvvline_set(int, int, const cchar_t *, int);
int mvwadd_wch(WINDOW *, int, int, const cchar_t *);
int mvwadd_wchnstr(WINDOW *, int, int, const cchar_t *, int);
int mvwadd_wchstr(WINDOW *, int, int, const cchar_t *);
int mvwgetn_wstr(WINDOW *, int, int, wint_t *, int);
int mvwget_wch(WINDOW *, int, int, wint_t *);
int mvwget_wstr(WINDOW *, int, int, wint_t *);
int mvwhline_set(WINDOW *, int, int, const cchar_t *, int);
int mvwin(WINDOW *, int, int);
int mvwprintw(WINDOW *, int, int, char *, ...);
int mvwscanw(WINDOW *, int, int, char *, ...);
int mvwvline_set(WINDOW *, int, int, const cchar_t *, int);
int napms(int);
int nocbreak(void);
int nodelay(WINDOW *, bool);
int noraw(void);
int notimeout(WINDOW *, bool);
int overlay(const WINDOW *, WINDOW *);
int overwrite(const WINDOW *, WINDOW *);
int pair_content(short, short *, short *);
int pechochar(WINDOW *, chtype);
int pecho_wchar(WINDOW *, const cchar_t*);
int pnoutrefresh(WINDOW *, int, int, int, int, int, int);
int prefresh(WINDOW *, int, int, int, int, int, int);
int printw(char *, ...);
int putp(const char *);
int putwin(WINDOW *, FILE *);
int raw(void);
int redrawwin(WINDOW *);
int reset_prog_mode(void);
int reset_shell_mode(void);
int resetty(void);
int ripoffline(int, int (*)(WINDOW *, int));
int savetty(void);
int scanw(char *, ...);
int scr_dump(const char *);
int scr_init(const char *);
int scr_restore(const char *);
int scr_set(const char *);
int scrollok(WINDOW *, bool);
int setupterm(char *, int, int *);
int setcchar(cchar_t*, const wchar_t*, const attr_t, short, const void*);
int slk_attroff(const chtype);
int slk_attron(const chtype);
int slk_attrset(const chtype);
int slk_attr_off(const attr_t, void *);
int slk_attr_on(const attr_t, void *);
int slk_attr_set(const attr_t, short, void *);
int slk_clear(void);
int slk_color(short);
int slk_noutrefresh(void);
int slk_refresh(void);
int slk_restore(void);
int slk_set(int, const char *, int);
int slk_touch(void);
int slk_wset(int, const wchar_t *, int);
int start_color(void);
int syncok(WINDOW *, bool);
int tigetflag(char *);
int tigetnum(char *);
int touchwin(WINDOW *);
int typeahead(int);
int unget_wch(const wchar_t);
int ungetch(int);
int untouchwin(WINDOW *);
int vid_attr(attr_t, short, void *);
int vid_puts(attr_t, short, void *, int (*)(int));
int vidattr(chtype);
int vidputs(chtype, int (*)(int));
int vline_set(const cchar_t *, int);
/* in the following 2 functions 'void *' is really va_list */
/* however, we cannot include <stdarg.h> in curses.h, */
/* because some applications may be using <varargs.h> that */
/* conflicts with <stdarg.h> */
int vw_printw(WINDOW *, char *, void *);
int vw_scanw(WINDOW *, char *, void *);
int vwprintw(WINDOW *, char *, void *);
int vwscanw(WINDOW *, char *, void *);
int wadd_wch(WINDOW *, const cchar_t *);
int wadd_wchnstr(WINDOW *, const cchar_t *, int);
int wadd_wchstr(WINDOW *, const cchar_t *);
int waddch(WINDOW *, const chtype);
int waddchnstr(WINDOW *, const chtype *, int);
int waddnstr(WINDOW *, const char *, int);
int waddnwstr(WINDOW *, const wchar_t *, int);
int wattr_get(WINDOW *, attr_t *, short *, void *);
int wattr_off(WINDOW *, attr_t, void *);
int wattr_on(WINDOW *, attr_t, void *);
int wattr_set(WINDOW *, attr_t, short, void *);
int wattroff(WINDOW *, int);
int wattron(WINDOW *, int);
int wattrset(WINDOW *, int);
int wbkgd(WINDOW *, chtype);
int wbkgrnd(WINDOW *, const cchar_t *);
int wborder(WINDOW *, chtype, chtype, chtype, chtype, chtype, chtype, chtype, chtype);
int wborder_set(WINDOW *, const cchar_t *, const cchar_t *, const cchar_t *, const cchar_t *, const cchar_t *, const cchar_t *, const cchar_t *, const cchar_t *);
int wchgat(WINDOW *, int, attr_t, short, const void *);
int wclrtobot(WINDOW *);
int wclrtoeol(WINDOW *);
int wcolor_set(WINDOW *, short, void *);
int wdelch(WINDOW *);
int wecho_wchar(WINDOW *, const cchar_t *);
int wechochar(WINDOW *, const chtype);
int wget_wch(WINDOW *, wint_t *);
int wget_wstr(WINDOW *, wint_t *);
int wgetbkgrnd(WINDOW *, cchar_t *);
int wgetch(WINDOW *);
int wgetn_wstr(WINDOW *, wint_t *, int);
int wgetnstr(WINDOW *, char *, int);
int wgetstr(WINDOW *, char *);
int whline(WINDOW *, chtype, int);
int whline_set(WINDOW *, const cchar_t *, int);
int win_wch(WINDOW *, cchar_t *);
int win_wchnstr(WINDOW *, cchar_t *, int);
int winchnstr(WINDOW *, chtype *, int);
int winnstr(WINDOW *, char *, int);
int winnwstr(WINDOW *, wchar_t *, int);
int wins_nwstr(WINDOW *, const wchar_t *, int);
int wins_wch(WINDOW *, const cchar_t *);
int winsch(WINDOW *, chtype);
int winsdelln(WINDOW *, int);
int winsnstr(WINDOW *, const char *, int);
int winstr(WINDOW *, char *);
int winwstr(WINDOW *, wchar_t *);
int wmove(WINDOW *, int, int);
int wnoutrefresh(WINDOW *);
int wprintw(WINDOW *, char *, ...);
int wredrawln(WINDOW *, int, int);
int wrefresh(WINDOW *);
int wscanw(WINDOW *, char *, ...);
int wscrl(WINDOW *, int);
int wsetscrreg(WINDOW *, int, int);
int wstandend(WINDOW *);
int wstandout(WINDOW *);
int wtouchln(WINDOW *, int, int, int);
int wvline(WINDOW *, chtype, int);
int wvline_set(WINDOW *, const cchar_t *, int);
void _setqiflush(bool);
void bkgrndset(const cchar_t *);
void delscreen(SCREEN *);
void filter(void);
void idcok(WINDOW *, bool);
void immedok(WINDOW *, bool);
void use_env(bool);
void wbkgdset(WINDOW *, chtype);
void wbkgrndset(WINDOW *, const cchar_t *);
void wcursyncup(WINDOW *);
void wsyncup(WINDOW *), wsyncdown(WINDOW *);
void wtimeout(WINDOW *, int);
wchar_t *wunctrl(cchar_t *);
#if !(defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE_EXTENDED >=1))
SCREEN *newscreen(char *, int, int, int, FILE *, FILE *);
SCREEN *setcurscreen(SCREEN *);
char *unctrl(int);
chtype wgetbkgd(WINDOW *);
chtype winwch(WINDOW *);
int draino(int);
int map_button(unsigned long);
int mouse_off(long int);
int mouse_on(long int);
int mouse_set(long int);
int newkey(char *, int, int);
int pechowchar(WINDOW *, chtype);
int request_mouse_pos(void);
int setsyx(int, int);
int slk_start(int, int *);
int traceoff(void);
int traceon(void);
int ungetwch(wchar_t);
int waddwch(WINDOW *, chtype);
int waddwchnstr(WINDOW *, const chtype *, int);
int wechowchar(WINDOW *, chtype);
int wgetnwstr(WINDOW *, wchar_t *, int);
int wgetwch(WINDOW *);
int wgetwstr(WINDOW *, wchar_t *);
int winsnwstr(WINDOW *, wchar_t *, int);
int winswch(WINDOW *, chtype);
int winwchnstr(WINDOW *, chtype *, int);
unsigned long getbmap(void);
unsigned long getmouse(void);
void curserr(void);
void vidupdate(chtype, chtype, int (*)(int));
void wmouse_position (WINDOW *, int *, int *);
#endif /* !(defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE_EXTENDED >=1)) */
#else /* __STDC__ */
extern SCREEN *newterm();
extern WINDOW *derwin();
extern WINDOW *dupwin();
extern WINDOW *getwin();
extern WINDOW *initscr();
extern WINDOW *newpad();
extern WINDOW *newwin();
extern WINDOW *subpad();
extern WINDOW *subwin();
extern attr_t term_attrs();
extern bool can_change_color();
extern bool has_colors();
extern bool has_ic();
extern bool has_il();
extern bool is_linetouched();
extern bool is_wintouched();
extern bool isendwin();
extern char *key_name();
extern char *keyname();
extern char *longname();
extern char *slk_label();
extern char *tparm();
extern char *termname();
extern char *tigetstr();
extern char erasechar();
extern char killchar();
extern chtype termattrs();
extern chtype winch();
extern int _getsyx();
extern int _meta();
extern int _overlay ();
extern int _ring();
extern int _setecho();
extern int _setnonl();
extern int add_wch();
extern int add_wchnstr();
extern int add_wchstr();
extern int baudrate();
extern int bkgrnd();
extern int border_set();
extern int box();
extern int box_set();
extern int cbreak();
extern int clearok();
extern int color_content();
extern int copywin();
extern int curs_set();
extern int def_prog_mode();
extern int def_shell_mode();
extern int delay_output();
extern int delwin();
extern int doupdate();
extern int echo_wchar();
extern int endwin();
extern int erasewchar();
extern int flushinp();
extern int getbkgrnd();
extern int getcchar();
extern int getn_wstr();
extern int get_wch();
extern int get_wstr();
extern int halfdelay();
extern int hline_set();
extern int idlok();
extern int init_color();
extern int init_pair();
extern int intrflush();
extern int keypad();
extern int killwchar();
extern int leaveok();
extern int mvadd_wch();
extern int mvadd_wchnstr();
extern int mvadd_wchstr();
extern int mvcur();
extern int mvderwin();
extern int mvgetn_wstr();
extern int mvget_wch();
extern int mvget_wstr();
extern int mvhline_set();
extern int mvprintw();
extern int mvscanw();
extern int mvvline_set();
extern int mvwadd_wch();
extern int mvwadd_wchnstr();
extern int mvwadd_wchstr();
extern int mvwgetn_wstr();
extern int mvwget_wch();
extern int mvwget_wstr();
extern int mvwhline_set();
extern int mvwin();
extern int mvwprintw();
extern int mvwscanw();
extern int mvwvline_set();
extern int napms();
extern int nocbreak();
extern int nodelay();
extern int noraw();
extern int notimeout();
extern int overlay();
extern int overwrite();
extern int pair_content();
extern int pechochar();
extern int pecho_wchar();
extern int pnoutrefresh();
extern int prefresh();
extern int printw();
extern int putp();
extern int putwin();
extern int raw();
extern int redrawwin();
extern int reset_prog_mode();
extern int reset_shell_mode();
extern int resetty();
extern int ripoffline();
extern int savetty();
extern int scanw();
extern int scr_dump();
extern int scr_init();
extern int scr_restore();
extern int scr_set();
extern int scrollok();
extern int setupterm();
extern int setcchar();
extern int slk_attroff();
extern int slk_attron();
extern int slk_attrset();
extern int slk_clear();
extern int slk_attr_off();
extern int slk_attr_on();
extern int slk_attr_set();
extern int slk_color();
extern int slk_noutrefresh();
extern int slk_refresh();
extern int slk_restore();
extern int slk_set();
extern int slk_touch();
extern int slk_wset();
extern int start_color();
extern int syncok();
extern int tigetflag();
extern int tigetnum();
extern int touchwin();
extern int typeahead();
extern int unget_wch();
extern int ungetch();
extern int untouchwin();
extern int vid_attr();
extern int vid_puts();
extern int vidattr();
extern int vidputs();
extern int vline_set();
extern int vw_printw();
extern int vw_scanw();
extern int vwprintw();
extern int vwscanw();
extern int wadd_wch();
extern int wadd_wchnstr();
extern int wadd_wchstr();
extern int waddch();
extern int waddchnstr();
extern int waddnstr();
extern int waddnwstr();
extern int wattr_get();
extern int wattr_off();
extern int wattr_on();
extern int wattr_set();
extern int wattroff();
extern int wattron();
extern int wattrset();
extern int wbkgd();
extern int wbkgrnd();
extern int wborder();
extern int wborder_set();
extern int wchgat();
extern int wclrtobot();
extern int wclrtoeol();
extern int wcolor_set();
extern int wdelch();
extern int wecho_wchar();
extern int wechochar();
extern int wget_wch();
extern int wget_wstr();
extern int wgetbkgrnd();
extern int wgetch();
extern int wgetn_wstr();
extern int wgetnstr();
extern int wgetstr();
extern int whline();
extern int whline_set();
extern int win_wch();
extern int win_wchnstr();
extern int winchnstr();
extern int winnstr();
extern int winnwstr();
extern int wins_nwstr();
extern int wins_wch();
extern int winsch();
extern int winsdelln();
extern int winsnstr();
extern int winstr();
extern int winwstr();
extern int wmove();
extern int wnoutrefresh();
extern int wprintw();
extern int wredrawln();
extern int wrefresh();
extern int wscanw();
extern int wscrl();
extern int wsetscrreg();
extern int wstandend();
extern int wstandout();
extern int wtouchln();
extern int wvline();
extern int wvline_set();
extern void _setqiflush();
extern void bkgrndset();
extern void delscreen();
extern void filter();
extern void idcok();
extern void immedok();
extern void use_env();
extern void wbkgdset();
extern void wbkgrndset();
extern void wcursyncup();
extern void wsyncup();
extern void wtimeout();
extern wchar_t *wunctrl();
extern SCREEN *newscreen();
extern SCREEN *setcurscreen();
extern chtype wgetbkgd();
extern char *unctrl();
extern chtype winwch();
extern int draino();
extern int map_button();
extern int mouse_off();
extern int mouse_on();
extern int mouse_set();
extern int newkey();
extern int pechowchar();
extern int request_mouse_pos();
extern int setsyx();
extern int slk_start();
extern int traceoff();
extern int traceon();
extern int ungetwch();
extern int waddwch();
extern int waddwchnstr();
extern int wechowchar();
extern int wgetnwstr();
extern int wgetwch();
extern int wgetwstr();
extern int winswch();
extern int winsnwstr();
extern int winwchnstr();
extern unsigned long getbmap();
extern unsigned long getmouse();
extern void curserr();
extern void vidupdate();
extern void wmouse_position ();
#endif /* __STDC__ */
/*
* Functions to get at the window structure.
*/
#define getsyx(y,x) _getsyx(&(y),&(x))
#define getyx(w,y,x) ((y) = getcury(w), (x) = getcurx(w))
#define getbegyx(w,y,x) ((y) = getbegy(w), (x) = getbegx(w))
#define getmaxyx(w,y,x) ((y) = getmaxy(w), (x) = getmaxx(w))
#define getparyx(w,y,x) ((y) = getpary(w), (x) = getparx(w))
#ifdef __STDC__
#if !(defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE_EXTENDED >=1))
int getcury(WINDOW *);
int getcurx(WINDOW *);
int getbegy(WINDOW *);
int getbegx(WINDOW *);
int getmaxy(WINDOW *);
int getmaxx(WINDOW *);
int getpary(WINDOW *);
int getparx(WINDOW *);
chtype getattrs(WINDOW *);
#endif /* !(defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE_EXTENDED >=1)) */
chtype getbkgd(WINDOW *);
#else /* __STDC__ */
extern int getcury();
extern int getcurx();
extern int getbegy();
extern int getbegx(),
extern int getmaxy();
extern int getmaxx();
extern int getpary();
extern int getparx();
extern chtype getattrs();
extern chtype getbkgd();
#endif /* __STDC__ */
#if defined(NOMACROS) || defined(lint) || defined(_XOPEN_SOURCE)
#ifdef __STDC__
SCREEN *set_term(SCREEN *);
chtype inch(void);
chtype mvinch(int, int);
chtype mvwinch(WINDOW *, int, int);
int COLOR_PAIR(int);
int PAIR_NUMBER(int);
int addch(const chtype);
int addchnstr(const chtype *, int);
int addchstr(const chtype *);
int addnstr(const char *, int);
int addnwstr(const wchar_t *, int);
int addstr(const char *);
int addwstr(const wchar_t *);
int attr_get(attr_t *, short *, void *);
int attr_off(attr_t, void *);
int attr_on(attr_t, void *);
int attr_set(attr_t, short, void *);
int attroff(int);
int attron(int);
int attrset(int);
int beep(void);
int bkgd(chtype);
int border(chtype, chtype, chtype, chtype, chtype, chtype, chtype, chtype);
int chgat(int, attr_t, short, const void *);
int clear(void);
int clrtobot(void);
int clrtoeol(void);
int color_set(short,void *);
int delch(void);
int deleteln(void);
int echo(void);
int echochar(const chtype);
int erase(void);
int flash(void);
int getch(void);
int getstr(char *);
int getnstr(char *, int);
int hline(chtype, int);
int in_wch(cchar_t *);
int in_wchnstr(cchar_t *, int);
int in_wchstr(cchar_t *);
int inchnstr(chtype *, int);
int inchstr(chtype *);
int innstr(char *, int);
int innwstr(wchar_t *, int);
int ins_nwstr(const wchar_t *, int);
int ins_wch(const cchar_t *);
int ins_wstr(const wchar_t *);
int insch(chtype);
int insdelln(int);
int insertln(void);
int insnstr(const char *, int);
int insstr(const char *);
int instr(char *);
int inwstr(wchar_t *);
int meta(WINDOW *, bool);
int move(int, int);
int mvaddch(int, int, const chtype);
int mvaddchnstr(int, int, const chtype *, int);
int mvaddchstr(int, int, const chtype *);
int mvaddnstr(int, int, const char *, int);
int mvaddnwstr(int, int, const wchar_t *, int);
int mvaddstr(int, int, const char *);
int mvaddwstr(int, int, const wchar_t *);
int mvchgat(int, int, int, attr_t, short, const void *);
int mvdelch(int, int);
int mvgetch(int, int);
int mvgetnstr(int, int, char *, int);
int mvgetstr(int, int, char *);
int mvhline(int, int, chtype, int);
int mvin_wch(int, int, cchar_t *);
int mvin_wchnstr(int, int, cchar_t *, int);
int mvin_wchstr(int, int, cchar_t *);
int mvinchnstr(int, int, chtype *, int);
int mvinchstr(int, int, chtype *);
int mvinnstr(int, int, char *, int);
int mvinnwstr(int, int, wchar_t *, int);
int mvins_nwstr(int, int, const wchar_t *, int);
int mvins_wch(int, int, const cchar_t *);
int mvins_wstr(int, int, const wchar_t *);
int mvinsch(int, int, chtype);
int mvinsnstr(int, int, const char *, int);
int mvinsstr(int, int, const char *);
int mvinstr(int, int, char *);
int mvinwstr(int, int, wchar_t *);
int mvvline(int, int, chtype, int);
int mvwaddch(WINDOW *, int, int, const chtype);
int mvwaddchnstr(WINDOW *, int, int, const chtype *, int);
int mvwaddchstr(WINDOW *, int, int, const chtype *);
int mvwaddnstr(WINDOW *, int, int, const char *, int);
int mvwaddnwstr(WINDOW *, int, int, const wchar_t *, int);
int mvwaddstr(WINDOW *, int, int, const char *);
int mvwaddwstr(WINDOW *, int, int, const wchar_t *);
int mvwchgat(WINDOW *, int, int, int, attr_t, short, const void *);
int mvwdelch(WINDOW *, int, int);
int mvwgetch(WINDOW *, int, int);
int mvwgetnstr(WINDOW *, int, int, char *, int);
int mvwgetstr(WINDOW *, int, int, char *);
int mvwhline(WINDOW *, int, int, chtype, int);
int mvwin_wch(WINDOW *, int, int, cchar_t *);
int mvwin_wchnstr(WINDOW *, int, int, cchar_t *, int);
int mvwin_wchstr(WINDOW *, int, int, cchar_t *);
int mvwinchnstr(WINDOW *, int, int, chtype *, int);
int mvwinchstr(WINDOW *, int, int, chtype *);
int mvwinnstr(WINDOW *, int, int, char *, int);
int mvwinnwstr(WINDOW *, int, int, wchar_t *, int);
int mvwins_nwstr(WINDOW *, int, int, const wchar_t *, int);
int mvwins_wch(WINDOW *, int, int, const cchar_t *);
int mvwins_wstr(WINDOW *, int, int, const wchar_t *);
int mvwinsch(WINDOW *, int, int, chtype);
int mvwinsnstr(WINDOW *, int, int, const char *, int);
int mvwinsstr(WINDOW *, int, int, const char *);
int mvwinstr(WINDOW *, int, int, char *);
int mvwinwstr(WINDOW *, int, int, wchar_t *);
int mvwvline(WINDOW *, int, int, chtype, int);
int nl(void);
int noecho(void);
int nonl(void);
int refresh(void);
int scrl(int);
int scroll(WINDOW *);
int setscrreg(int, int);
int slk_init(int);
int standend(void);
int standout(void);
int touchline(WINDOW *, int, int);
int vline(chtype, int);
int waddchstr(WINDOW *, const chtype *);
int waddstr(WINDOW *, const char *);
int waddwstr(WINDOW *, const wchar_t *);
int wclear(WINDOW *);
int wdeleteln(WINDOW *);
int werase(WINDOW *);
int win_wchstr(WINDOW *, cchar_t *);
int winchstr(WINDOW *, chtype *);
int wins_wstr(WINDOW *, const wchar_t *);
int winsertln(WINDOW *);
int winsstr(WINDOW *, const char *);
int wstandend(WINDOW *);
int wstandout(WINDOW *);
void bkgdset(chtype);
void noqiflush(void);
void qiflush(void);
void timeout(int);
#if !(defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE_EXTENDED >=1))
chtype inwch(void);
chtype mvinwch(int, int);
chtype mvwinwch(WINDOW *, int, int);
int addwch(chtype);
int addwchnstr(chtype *, int);
int addwchstr(chtype *);
int crmode(void);
int echowchar(chtype);
int fixterm(void);
int garbagedlines(WINDOW *, int, int);
int garbagedwin(WINDOW *);
int getnwstr(wchar_t *, int);
int gettmode(void);
int getwch(void);
int getwstr(wchar_t *);
int insnwstr(wchar_t *, int);
int inswch(chtype);
int inswstr(wchar_t *);
int inwchnstr(chtype *, int);
int inwchstr(chtype *);
int mvaddwch(int, int, chtype);
int mvaddwchnstr(int, int, chtype *, int);
int mvaddwchstr(int, int, chtype *);
int mvgetnwstr(int, int, wchar_t *, int);
int mvgetwch(int, int);
int mvgetwstr(int, int, wchar_t *);
int mvinsnwstr(int, int, wchar_t *, int);
int mvinswch(int, int, chtype);
int mvinswstr(int, int, wchar_t *);
int mvinwchnstr(int, int, chtype *, int);
int mvinwchstr(int, int, chtype *);
int mvwaddwch(WINDOW *, int, int, chtype);
int mvwaddwchnstr(WINDOW *, int, int, chtype *, int);
int mvwaddwchstr(WINDOW *, int, int, chtype *);
int mvwgetnwstr(WINDOW *, int, int, wchar_t *, int);
int mvwgetwch(WINDOW *, int, int);
int mvwgetwstr(WINDOW *, int, int, wchar_t *);
int mvwinsnwstr(WINDOW *, int, int, wchar_t *, int);
int mvwinswch(WINDOW *, int, int, chtype);
int mvwinswstr(WINDOW *, int, int, wchar_t *);
int mvwinwchnstr(WINDOW *, int, int, chtype *, int);
int mvwinwchstr(WINDOW *, int, int, chtype *);
int nocrmode(void);
int resetterm(void);
int saveterm(void);
int setterm(char *);
int waddwchstr(WINDOW *, chtype *);
int winswstr(WINDOW *, wchar_t *);
int winwchstr(WINDOW *, chtype *);
#endif /* !(defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE_EXTENDED >=1)) */
#else /* __STDC__ */
extern SCREEN *set_term();
extern chtype inch();
extern chtype mvinch();
extern chtype mvwinch();
extern int COLOR_PAIR();
extern int PAIR_NUMBER();
extern int addch();
extern int addchnstr();
extern int addchstr();
extern int addnstr();
extern int addnwstr();
extern int addstr();
extern int addwstr();
extern int attr_get();
extern int attr_off();
extern int attr_on();
extern int attr_set();
extern int attroff();
extern int attron();
extern int attrset();
extern int beep();
extern int bkgd();
extern int border();
extern int chgat();
extern int clear();
extern int clrtobot();
extern int clrtoeol();
extern int color_set();
extern int delch();
extern int deleteln();
extern int echo();
extern int echochar();
extern int erase();
extern int flash();
extern int getch();
extern int getstr();
extern int getnstr();
extern int hline();
extern int in_wch();
extern int in_wchnstr();
extern int in_wchstr();
extern int inchnstr();
extern int inchstr();
extern int innstr();
extern int innwstr();
extern int ins_nwstr();
extern int ins_wch();
extern int ins_wstr();
extern int insch();
extern int insdelln();
extern int insertln();
extern int insnstr();
extern int insstr();
extern int instr();
extern int inwstr();
extern int meta();
extern int move();
extern int mvaddch();
extern int mvaddchnstr();
extern int mvaddchstr();
extern int mvaddnstr();
extern int mvaddnwstr();
extern int mvaddstr();
extern int mvaddwstr();
extern int mvchgat();
extern int mvdelch();
extern int mvgetch();
extern int mvgetnstr();
extern int mvgetstr();
extern int mvhline();
extern int mvin_wch();
extern int mvin_wchnstr();
extern int mvin_wchstr();
extern int mvinchnstr();
extern int mvinchstr();
extern int mvinnstr();
extern int mvinnwstr();
extern int mvins_nwstr();
extern int mvins_wch();
extern int mvins_wstr();
extern int mvinsch();
extern int mvinsnstr();
extern int mvinsstr();
extern int mvinstr();
extern int mvinwstr();
extern int mvvline();
extern int mvwaddch();
extern int mvwaddchnstr();
extern int mvwaddchstr();
extern int mvwaddnstr();
extern int mvwaddnwstr();
extern int mvwaddstr();
extern int mvwaddwstr();
extern int mvwchgat();
extern int mvwdelch();
extern int mvwgetch();
extern int mvwgetnstr();
extern int mvwgetstr();
extern int mvwhline();
extern int mvwin_wch();
extern int mvwin_wchnstr();
extern int mvwin_wchstr();
extern int mvwinchnstr();
extern int mvwinchstr();
extern int mvwinnstr();
extern int mvwinnwstr();
extern int mvwins_nwstr();
extern int mvwins_wch();
extern int mvwins_wstr();
extern int mvwinsch();
extern int mvwinsnstr();
extern int mvwinsstr();
extern int mvwinstr();
extern int mvwinwstr();
extern int mvwvline();
extern int nl();
extern int noecho();
extern int nonl();
extern int refresh();
extern int scrl();
extern int scroll();
extern int setscrreg();
extern int slk_init();
extern int standend();
extern int standout();
extern int touchline();
extern int vline();
extern int waddchstr();
extern int waddstr();
extern int waddwstr();
extern int wclear();
extern int wdeleteln();
extern int werase();
extern int win_wchstr();
extern int winchstr();
extern int wins_wstr();
extern int winsertln();
extern int winsstr();
extern int wstandend();
extern int wstandout();
extern void bkgdset();
extern void noqiflush();
extern void qiflush();
extern void timeout();
extern chtype inwch();
extern chtype mvinwch();
extern chtype mvwinwch();
extern int addwch();
extern int addwchnstr();
extern int addwchstr();
extern int crmode();
extern int echowchar();
extern int fixterm();
extern int garbagedlines();
extern int garbagedwin();
extern int getnwstr();
extern int gettmode();
extern int getwch();
extern int getwstr();
extern int insnwstr();
extern int inswch();
extern int inswstr();
extern int inwchnstr();
extern int inwchstr();
extern int nocrmode();
extern int mvaddwch();
extern int mvaddwchnstr();
extern int mvaddwchstr();
extern int mvgetnwstr();
extern int mvgetwch();
extern int mvgetwstr();
extern int mvinsnwstr();
extern int mvinswch();
extern int mvinswstr();
extern int mvinwchnstr();
extern int mvinwchstr();
extern int mvwaddwch();
extern int mvwaddwchnstr();
extern int mvwaddwchstr();
extern int mvwgetnwstr();
extern int mvwgetwch();
extern int mvwgetwstr();
extern int mvwinsnwstr();
extern int mvwinswstr();
extern int mvwinswch();
extern int mvwinwchnstr();
extern int mvwinwchstr();
extern int resetterm();
extern int saveterm();
extern int setterm();
extern int waddwchstr();
extern int winwchstr();
extern int winswstr();
#endif /* __STDC__ */
#else /* NOMACROS || lint || _XOPEN_SOURCE */
/*
* The defines from here down to the #endif for NOMACROS
* define macros, which may be more efficient than their
* function versions. The functions may be accessed by defining
* NOMACROS in C code. This is useful for debugging purposes.
*/
#include <unctrl.h>
#define COLOR_PAIR(n) ((n) << 25)
#define PAIR_NUMBER(n) (((n) & A_COLOR) >> 25)
#define waddchstr(w,s) waddchnstr((w),(s),-1)
#define waddstr(w,s) waddnstr((w),(s),-1)
#define waddwstr(w,ws) waddnwstr(w,ws,-1)
#define wclear(w) (clearok((w),TRUE), werase(w))
#define wdeleteln(w) winsdelln((w),-1)
#define werase(w) (wmove((w),0,0), wclrtobot(w))
#define win_wchstr(w,s) win_wchnstr(w,s,-1)
#define winchstr(w,s) winchnstr((w),(s),-1)
#define wins_wstr(w,ws) wins_nwstr(w,ws,-1)
#define winsertln(w) winsdelln((w),1)
#define winsstr(w,s) winsnstr((w),(s),-1)
#define wstandend(w) wattrset((w),A_NORMAL)
#define wstandout(w) wattron((w),A_STANDOUT)
/* pseudo functions for stdscr */
#define addch(ch) waddch(stdscr, ch)
#define addchnstr(s,n) waddchnstr(stdscr,s,n)
#define addchstr(s) waddchstr(stdscr,s)
#define addnstr(s,n) waddnstr(stdscr,s,n)
#define addnwstr(ws,n) waddnwstr(stdscr,ws,n)
#define addstr(s) waddstr(stdscr, s)
#define addwstr(ws) waddwstr(stdscr,ws)
#define attr_get(a,b,c) wattr_get(stdscr,(a),(b),(c))
#define attr_off(at,v) wattr_off(stdscr,at,v)
#define attr_on(at,v) wattr_on(stdscr,at,v)
#define attr_set(at,c,v) wattr_set(stdscr,at,c,v)
#define attroff(at) wattroff(stdscr,at)
#define attron(at) wattron(stdscr,at)
#define attrset(at) wattrset(stdscr,at)
#define bkgd(c) wbkgd(stdscr,c)
#define bkgdset(c) wbkgdset(stdscr,c)
#define border(a,b,c,d,e,f,g,h) wborder(stdscr,a,b,c,d,e,f,g,h)
#define chgat(n,a,c,r) wchgat(stdscr,n,a,c,r);
#define clear() wclear(stdscr)
#define clrtobot() wclrtobot(stdscr)
#define clrtoeol() wclrtoeol(stdscr)
#define color_set(c,v) wcolor_set(stdscr,c,v)
#define delch() wdelch(stdscr)
#define deleteln() wdeleteln(stdscr)
#define echochar(ch) wechochar(stdscr,ch)
#define erase() werase(stdscr)
#define getch() wgetch(stdscr)
#define getstr(s) wgetstr(stdscr,s)
#define getnstr(ws,n) wgetnstr(stdscr,ws,n)
#define hline(c,num) whline(stdscr,c,num)
#define inch() winch(stdscr)
#define inchnstr(s,n) winchnstr(stdscr,s,n)
#define inchstr(s) winchstr(stdscr,s)
#define innstr(s,n) winnstr(stdscr,(s),(n))
#define innwstr(ws,n) winnwstr(stdscr,ws,n)
#define ins_nwstr(ws,n) wins_nwstr(stdscr,ws,n)
#define ins_wch(c) wins_wch(stdscr,c)
#define ins_wstr(ws) wins_wstr(stdscr,ws)
#define insch(c) winsch(stdscr,c)
#define insdelln(id) winsdelln(stdscr,id)
#define insertln() winsertln(stdscr)
#define insnstr(s,n) winsnstr(stdscr,s,n)
#define insstr(s) winsstr(stdscr,s)
#define instr(s) winstr(stdscr,(s))
#define in_wch(wch) win_wch(stdscr,wch)
#define in_wchnstr(s,n) win_wchnstr(stdscr,s,n)
#define in_wchstr(s) win_wchstr(stdscr,s)
#define inwstr(ws) winwstr(stdscr,ws)
#define move(y,x) wmove(stdscr,y,x)
#define mvaddch(y,x,ch) mvwaddch(stdscr,y,x,ch)
#define mvaddnstr(y,x,s,n) mvwaddnstr(stdscr,y,x,s,n)
#define mvaddstr(y,x,s) mvwaddstr(stdscr,y,x,s)
#define mvdelch(y,x) mvwdelch(stdscr,y,x)
#define mvgetch(y,x) mvwgetch(stdscr,y,x)
#define mvgetstr(y,x,s) mvwgetstr(stdscr,y,x,s)
#define mvinch(y,x) mvwinch(stdscr,y,x)
#define mvins_wch(y,x,c) mvwins_wch(stdscr,y,x,c)
#define mvinsch(y,x,c) mvwinsch(stdscr,y,x,c)
#define mvinsnstr(y,x,s,n) mvwinsnstr(stdscr,y,x,s,n)
#define mvinsstr(y,x,s) mvwinsstr(stdscr,y,x,s)
#define mvaddchstr(y,x,s) mvwaddchstr(stdscr,y,x,s)
#define mvaddchnstr(y,x,s,n) mvwaddchnstr(stdscr,y,x,s,n)
#define mvinstr(y,x,s) mvwinstr(stdscr,y,x,(s))
#define mvinnstr(y,x,s,n) mvwinnstr(stdscr,y,x,(s),(n))
#define mvinchstr(y,x,s) mvwinchstr(stdscr,y,x,s)
#define mvinchnstr(y,x,s,n) mvwinchnstr(stdscr,y,x,s,n)
#define mvhline(y,x,c,num) mvwhline(stdscr,y,x,c,num)
#define mvin_wch(y,x,wc) mvwin_wch(stdscr,y,x,wc)
#define mvvline(y,x,c,num) mvwvline(stdscr,y,x,c,num)
#define mvaddnwstr(y,x,ws,n) mvwaddnwstr(stdscr,y,x,ws,n)
#define mvaddwstr(y,x,ws) mvwaddwstr(stdscr,y,x,ws)
#define mvchgat(y,x,n,a,c,r) mvwchgat(stdscr,y,x,n,a,c,r)
#define mvgetnstr(y,x,s,n) mvwgetnstr(stdscr,y,x,s,n)
#define mvins_nwstr(y,x,ws,n) mvwins_nwstr(stdscr,y,x,ws,n)
#define mvins_wstr(y,x,ws) mvwins_wstr(stdscr,y,x,ws)
#define mvin_wchnstr(y,x,s,n) mvwin_wchnstr(stdscr,y,x,s,n)
#define mvin_wchstr(y,x,s) mvwin_wchstr(stdscr,y,x,s)
#define mvinnwstr(y,x,ws,n) mvwinnwstr(stdscr,y,x,ws,n)
#define mvinwstr(y,x,ws) mvwinwstr(stdscr,y,x,ws)
#define mvwaddch(w,y,x,ch) (wmove(w,y,x)==ERR?ERR:waddch(w,ch))
#define mvwaddnstr(w,y,x,s,n) (wmove(w,y,x)==ERR?ERR:waddnstr(w,s,n))
#define mvwaddstr(w,y,x,s) (wmove(w,y,x)==ERR?ERR:waddstr(w,s))
#define mvwchgat(w,y,x,n,a,c,r) (wmove(w,y,x)==ERR?ERR:wchgat(w,n,a,c,r))
#define mvwdelch(w,y,x) (wmove(w,y,x)==ERR?ERR:wdelch(w))
#define mvwgetch(w,y,x) (wmove(w,y,x)==ERR?ERR:wgetch(w))
#define mvwgetstr(w,y,x,s) (wmove(w,y,x)==ERR?ERR:wgetstr(w,s))
#define mvwin_wch(w,y,wc) (wmove(w,y,x)==ERR?ERR:win_wch(w,wc))
#define mvwinch(w,y,x) (wmove(w,y,x)==ERR?(chtype) ERR:winch(w))
#define mvwinsch(w,y,x,c) (wmove(w,y,x)==ERR?ERR:winsch(w,c))
#define mvwinsnstr(w,y,x,s,n) (wmove(w,y,x)==ERR?ERR:winsnstr(w,s,n))
#define mvwinsstr(w,y,x,s) (wmove(w,y,x)==ERR?ERR:winsstr(w,s))
#define mvwhline(w,y,x,c,num) (wmove(w,y,x)==ERR?ERR:whline(w,c,num))
#define mvwvline(w,y,x,c,num) (wmove(w,y,x)==ERR?ERR:wvline(w,c,num))
#define mvwaddchstr(w,y,x,s) (wmove(w,y,x)==ERR?ERR:waddchstr(w,s))
#define mvwaddchnstr(w,y,x,s,n) (wmove(w,y,x)==ERR?ERR:waddchnstr(w,s,n))
#define mvwinstr(w,y,x,s) (wmove(w,y,x)==ERR?ERR:winstr(w,s))
#define mvwinnstr(w,y,x,s,n) (wmove(w,y,x)==ERR?ERR:winnstr(w,s,n))
#define mvwinchstr(w,y,x,s) (wmove(w,y,x)==ERR?ERR:winchstr(w,s))
#define mvwinchnstr(w,y,x,s,n) (wmove(w,y,x)==ERR?ERR:winchnstr(w,s,n))
#define mvwaddnwstr(w,y,x,ws,n) (wmove(w,y,x)==ERR?ERR:waddnwstr(w,ws,n))
#define mvwaddwstr(w,y,x,ws) (wmove(w,y,x)==ERR?ERR:waddwstr(w,ws))
#define mvwgetnstr(w,y,x,ws,n) (wmove(w,y,x)==ERR?ERR:wgetnstr(w,ws,n))
#define mvwinnwstr(w,y,x,ws,n) (wmove(w,y,x)==ERR?ERR:winnwstr(w,ws,n))
#define mvwins_nwstr(w,y,x,ws,n) (wmove(w,y,x)==ERR?ERR:wins_nwstr(w,ws,n))
#define mvwins_wch(w,y,x,c) (wmove(w,y,x)==ERR?ERR:wins_wch(w,c))
#define mvwins_wstr(w,y,x,ws) (wmove(w,y,x)==ERR?ERR:wins_wstr(w,ws))
#define mvwin_wchnstr(w,y,x,s,n) (wmove(w,y,x)==ERR?ERR:win_wchnstr(w,s,n))
#define mvwin_wchstr(w,y,x,s) (wmove(w,y,x)==ERR?ERR:win_wchstr(w,s))
#define mvwinwstr(w,y,x,ws) (wmove(w,y,x)==ERR?ERR:winwstr(w,ws))
#define refresh() wrefresh(stdscr)
#define scrl(n) wscrl(stdscr,n)
#define setscrreg(t,b) wsetscrreg(stdscr,t,b)
#define standend() wstandend(stdscr)
#define standout() wstandout(stdscr)
#define timeout(tm) wtimeout(stdscr,tm)
#define vline(c,num) wvline(stdscr,c,num)
#define beep() _ring(TRUE)
#define flash() _ring(FALSE)
#define scroll(w) wscrl((w),1)
#define slk_init(f) slk_start(((f == 0) ? 3 : 2),NULL)
#define touchline(w,y,n) wtouchln((w),(y),(n),TRUE)
#define meta(w,flag) _meta(flag)
#define echo() _setecho(TRUE)
#define noecho() _setecho(FALSE)
#define nl() _setnonl(FALSE)
#define nonl() _setnonl(TRUE)
#define qiflush() _setqiflush(TRUE)
#define noqiflush() _setqiflush(FALSE)
#define set_term setcurscreen
#define inwch() winwch(stdscr)
#define mvinwch(y,x) mvwinwch(stdscr,y,x)
#define mvwinwch(w,y,x) (wmove(w,y,x)==ERR?(chtype)ERR:winwch(w))
#define addwch(ch) waddwch(stdscr,ch)
#define addwchnstr(s,n) waddwchnstr(stdscr,s,n)
#define addwchstr(s) waddwchstr(stdscr,s)
#define crmode cbreak
#define echowchar(ch) wechowchar(stdscr,ch)
#define fixterm reset_prog_mode
#define garbagedlines wredrawln
#define garbagedwin redrawwin
#define getnwstr(ws,n) wgetnwstr(stdscr,ws,n)
#define gettmode() (OK)
#define getwch() wgetwch(stdscr)
#define getwstr(ws) wgetwstr(stdscr,ws)
#define insnwstr(ws,n) winsnwstr(stdscr,ws,n)
#define inswch(c) winswch(stdscr,c)
#define inswstr(ws) winswstr(stdscr,ws)
#define inwchnstr(s,n) winwchnstr(stdscr,s,n)
#define inwchstr(s) winwchstr(stdscr,s)
#define mvaddwch(y,x,ch) mvwaddwch(stdscr,y,x,ch)
#define mvaddwchnstr(y,x,s,n) mvwaddwchnstr(stdscr,y,x,s,n)
#define mvaddwchstr(y,x,s) mvwaddwchstr(stdscr,y,x,s)
#define mvgetnwstr(y,x,ws,n) mvwgetnwstr(stdscr,y,x,ws,n)
#define mvgetwch(y,x) mvwgetwch(stdscr,y,x)
#define mvgetwstr(y,x,ws) mvwgetwstr(stdscr,y,x,ws)
#define mvinsnwstr(y,x,ws,n) mvwinsnwstr(stdscr,y,x,ws,n)
#define mvinswch(y,x,c) mvwinswch(stdscr,y,x,c)
#define mvinswstr(y,x,ws) mvwinswstr(stdscr,y,x,ws)
#define mvinwchnstr(y,x,s,n) mvwinwchnstr(stdscr,y,x,s,n)
#define mvinwchstr(y,x,s) mvwinwchstr(stdscr,y,x,s)
#define mvwaddwch(w,y,x,ch) (wmove(w,y,x)==ERR?ERR:waddwch(w,ch))
#define mvwaddwchnstr(w,y,x,s,n) (wmove(w,y,x)==ERR?ERR:waddwchnstr(w,s,n))
#define mvwaddwchstr(w,y,x,s) (wmove(w,y,x)==ERR?ERR:waddwchstr(w,s))
#define mvwgetwch(w,y,x) (wmove(w,y,x)==ERR?ERR:wgetwch(w))
#define mvwgetwstr(w,y,x,ws) (wmove(w,y,x)==ERR?ERR:wgetwstr(w,ws))
#define mvwgetnwstr(w,y,x,ws,n) (wmove(w,y,x)==ERR?ERR:wgetnwstr(w,ws,n))
#define mvwinsnwstr(w,y,x,ws,n) (wmove(w,y,x)==ERR?ERR:winsnwstr(w,ws,n))
#define mvwinswstr(w,y,x,ws) (wmove(w,y,x)==ERR?ERR:winswstr(w,ws))
#define mvwinswch(w,y,x,c) (wmove(w,y,x)==ERR?ERR:winswch(w,c))
#define mvwinwchnstr(w,y,x,s,n) (wmove(w,y,x)==ERR?ERR:winwchnstr(w,s,n))
#define mvwinwchstr(w,y,x,s) (wmove(w,y,x)==ERR?ERR:winwchstr(w,s))
#define nocrmode nocbreak
#define resetterm reset_shell_mode
#define saveterm def_prog_mode
#define setterm(name) setupterm((name),1,(char*)NULL)
#define waddwchstr(w,s) waddwchnstr(w,s,-1)
#define winwchstr(w,s) winwchnstr(w,s,-1)
#define winswstr(w,ws) winsnwstr(w,ws,-1)
#endif /* NOMACROS || lint || _XOPEN_SOURCE */
/*
* Standard alternate character set. The current ACS world is evolving,
* so we support only a widely available subset: the line drawing characters
* from the VT100, plus a few from the Teletype 5410v1. Eventually there
* may be support of more sophisticated ACS line drawing, such as that
* in the Teletype 5410, the HP line drawing set, and the like. There may
* be support for some non line oriented characters as well.
*
* Line drawing ACS names are of the form ACS_trbl, where t is the top, r
* is the right, b is the bottom, and l is the left. t, r, b, and l might
* be B (blank), S (single), D (double), or T (thick). The subset defined
* here only uses B and S.
*/
#define ACS_BSSB (_acs_map['l'])
#define ACS_SSBB (_acs_map['m'])
#define ACS_BBSS (_acs_map['k'])
#define ACS_SBBS (_acs_map['j'])
#define ACS_SBSS (_acs_map['u'])
#define ACS_SSSB (_acs_map['t'])
#define ACS_SSBS (_acs_map['v'])
#define ACS_BSSS (_acs_map['w'])
#define ACS_BSBS (_acs_map['q'])
#define ACS_SBSB (_acs_map['x'])
#define ACS_SSSS (_acs_map['n'])
#define WACS_BSSB (&(_wacs_map['l']))
#define WACS_SSBB (&(_wacs_map['m']))
#define WACS_BBSS (&(_wacs_map['k']))
#define WACS_SBBS (&(_wacs_map['j']))
#define WACS_SBSS (&(_wacs_map['u']))
#define WACS_SSSB (&(_wacs_map['t']))
#define WACS_SSBS (&(_wacs_map['v']))
#define WACS_BSSS (&(_wacs_map['w']))
#define WACS_BSBS (&(_wacs_map['q']))
#define WACS_SBSB (&(_wacs_map['x']))
#define WACS_SSSS (&(_wacs_map['n']))
/*
* Human readable names for the most commonly used characters.
* "Upper", "right", etc. are chosen to be consistent with the vt100 manual.
*/
#define WACS_ULCORNER WACS_BSSB
#define WACS_LLCORNER WACS_SSBB
#define WACS_URCORNER WACS_BBSS
#define WACS_LRCORNER WACS_SBBS
#define WACS_RTEE WACS_SBSS
#define WACS_LTEE WACS_SSSB
#define WACS_BTEE WACS_SSBS
#define WACS_TTEE WACS_BSSS
#define WACS_HLINE WACS_BSBS
#define WACS_VLINE WACS_SBSB
#define WACS_PLUS WACS_SSSS
#define ACS_ULCORNER ACS_BSSB
#define ACS_LLCORNER ACS_SSBB
#define ACS_URCORNER ACS_BBSS
#define ACS_LRCORNER ACS_SBBS
#define ACS_RTEE ACS_SBSS
#define ACS_LTEE ACS_SSSB
#define ACS_BTEE ACS_SSBS
#define ACS_TTEE ACS_BSSS
#define ACS_HLINE ACS_BSBS
#define ACS_VLINE ACS_SBSB
#define ACS_PLUS ACS_SSSS
#define ACS_S1 (_acs_map['o']) /* scan line 1 */
#define ACS_S9 (_acs_map['s']) /* scan line 9 */
#define ACS_DIAMOND (_acs_map['`']) /* diamond */
#define ACS_CKBOARD (_acs_map['a']) /* checker board */
#define ACS_DEGREE (_acs_map['f']) /* degree symbol */
#define ACS_PLMINUS (_acs_map['g']) /* plus/minus */
#define ACS_BULLET (_acs_map['~']) /* bullet */
#define WACS_S1 (&(_wacs_map['o'])) /* scan line 1 */
#define WACS_S9 (&(_wacs_map['s'])) /* scan line 9 */
#define WACS_DIAMOND (&(_wacs_map['`'])) /* diamond */
#define WACS_CKBOARD (&(_wacs_map['a'])) /* checker board */
#define WACS_DEGREE (&(_wacs_map['f'])) /* degree symbol */
#define WACS_PLMINUS (&(_wacs_map['g'])) /* plus/minus */
#define WACS_BULLET (&(_wacs_map['~'])) /* bullet */
/* Teletype 5410v1 symbols */
#define ACS_LARROW (_acs_map[',']) /* arrow left */
#define ACS_RARROW (_acs_map['+']) /* arrow right */
#define ACS_DARROW (_acs_map['.']) /* arrow down */
#define ACS_UARROW (_acs_map['-']) /* arrow up */
#define ACS_BOARD (_acs_map['h']) /* board of squares */
#define ACS_LANTERN (_acs_map['i']) /* lantern symbol */
#define ACS_BLOCK (_acs_map['0']) /* solid square block */
#define WACS_LARROW (&(_wacs_map[','])) /* arrow left */
#define WACS_RARROW (&(_wacs_map['+'])) /* arrow right */
#define WACS_DARROW (&(_wacs_map['.'])) /* arrow down */
#define WACS_UARROW (&(_wacs_map['-'])) /* arrow up */
#define WACS_BOARD (&(_wacs_map['h'])) /* board of squares */
#define WACS_LANTERN (&(_wacs_map['i'])) /* lantern symbol */
#define WACS_BLOCK (&(_wacs_map['0'])) /* solid square block */
/* Funny "characters" enabled for various special function keys for input */
/* This list is created from caps and curses.ed. Do not edit it! */
#define KEY_CODE_YES 0377 /* A key was returned */
#define KEY_MIN 0401 /* Minimum curses key */
#define KEY_BREAK 0401 /* break key (unreliable) */
#define KEY_DOWN 0402 /* Sent by terminal down arrow key */
#define KEY_UP 0403 /* Sent by terminal up arrow key */
#define KEY_LEFT 0404 /* Sent by terminal left arrow key */
#define KEY_RIGHT 0405 /* Sent by terminal right arrow key */
#define KEY_HOME 0406 /* Sent by home key. */
#define KEY_BACKSPACE 0407 /* Sent by backspace key */
#define KEY_F0 0410 /* function key f0. */
#define KEY_F(n) (KEY_F0+(n)) /* Space for 64 function keys is reserved. */
#define KEY_DL 0510 /* Sent by delete line key. */
#define KEY_IL 0511 /* Sent by insert line. */
#define KEY_DC 0512 /* Sent by delete character key. */
#define KEY_IC 0513 /* Sent by ins char/enter ins mode key. */
#define KEY_EIC 0514 /* Sent by rmir or smir in insert mode. */
#define KEY_CLEAR 0515 /* Sent by clear screen or erase key. */
#define KEY_EOS 0516 /* Sent by clear-to-end-of-screen key. */
#define KEY_EOL 0517 /* Sent by clear-to-end-of-line key. */
#define KEY_SF 0520 /* Sent by scroll-forward/down key */
#define KEY_SR 0521 /* Sent by scroll-backward/up key */
#define KEY_NPAGE 0522 /* Sent by next-page key */
#define KEY_PPAGE 0523 /* Sent by previous-page key */
#define KEY_STAB 0524 /* Sent by set-tab key */
#define KEY_CTAB 0525 /* Sent by clear-tab key */
#define KEY_CATAB 0526 /* Sent by clear-all-tabs key. */
#define KEY_ENTER 0527 /* Enter/send (unreliable) */
#define KEY_SRESET 0530 /* soft (partial) reset (unreliable) */
#define KEY_RESET 0531 /* reset or hard reset (unreliable) */
#define KEY_PRINT 0532 /* print or copy */
#define KEY_LL 0533 /* Sent by home-down key */
/* The keypad is arranged like this: */
/* a1 up a3 */
/* left b2 right */
/* c1 down c3 */
#define KEY_A1 0534 /* Upper left of keypad */
#define KEY_A3 0535 /* Upper right of keypad */
#define KEY_B2 0536 /* Center of keypad */
#define KEY_C1 0537 /* Lower left of keypad */
#define KEY_C3 0540 /* Lower right of keypad */
#define KEY_BTAB 0541 /* Back tab key */
#define KEY_BEG 0542 /* beg(inning) key */
#define KEY_CANCEL 0543 /* cancel key */
#define KEY_CLOSE 0544 /* close key */
#define KEY_COMMAND 0545 /* cmd (command) key */
#define KEY_COPY 0546 /* copy key */
#define KEY_CREATE 0547 /* create key */
#define KEY_END 0550 /* end key */
#define KEY_EXIT 0551 /* exit key */
#define KEY_FIND 0552 /* find key */
#define KEY_HELP 0553 /* help key */
#define KEY_MARK 0554 /* mark key */
#define KEY_MESSAGE 0555 /* message key */
#define KEY_MOVE 0556 /* move key */
#define KEY_NEXT 0557 /* next object key */
#define KEY_OPEN 0560 /* open key */
#define KEY_OPTIONS 0561 /* options key */
#define KEY_PREVIOUS 0562 /* previous object key */
#define KEY_REDO 0563 /* redo key */
#define KEY_REFERENCE 0564 /* ref(erence) key */
#define KEY_REFRESH 0565 /* refresh key */
#define KEY_REPLACE 0566 /* replace key */
#define KEY_RESTART 0567 /* restart key */
#define KEY_RESUME 0570 /* resume key */
#define KEY_SAVE 0571 /* save key */
#define KEY_SBEG 0572 /* shifted beginning key */
#define KEY_SCANCEL 0573 /* shifted cancel key */
#define KEY_SCOMMAND 0574 /* shifted command key */
#define KEY_SCOPY 0575 /* shifted copy key */
#define KEY_SCREATE 0576 /* shifted create key */
#define KEY_SDC 0577 /* shifted delete char key */
#define KEY_SDL 0600 /* shifted delete line key */
#define KEY_SELECT 0601 /* select key */
#define KEY_SEND 0602 /* shifted end key */
#define KEY_SEOL 0603 /* shifted clear line key */
#define KEY_SEXIT 0604 /* shifted exit key */
#define KEY_SFIND 0605 /* shifted find key */
#define KEY_SHELP 0606 /* shifted help key */
#define KEY_SHOME 0607 /* shifted home key */
#define KEY_SIC 0610 /* shifted input key */
#define KEY_SLEFT 0611 /* shifted left arrow key */
#define KEY_SMESSAGE 0612 /* shifted message key */
#define KEY_SMOVE 0613 /* shifted move key */
#define KEY_SNEXT 0614 /* shifted next key */
#define KEY_SOPTIONS 0615 /* shifted options key */
#define KEY_SPREVIOUS 0616 /* shifted prev key */
#define KEY_SPRINT 0617 /* shifted print key */
#define KEY_SREDO 0620 /* shifted redo key */
#define KEY_SREPLACE 0621 /* shifted replace key */
#define KEY_SRIGHT 0622 /* shifted right arrow */
#define KEY_SRSUME 0623 /* shifted resume key */
#define KEY_SSAVE 0624 /* shifted save key */
#define KEY_SSUSPEND 0625 /* shifted suspend key */
#define KEY_SUNDO 0626 /* shifted undo key */
#define KEY_SUSPEND 0627 /* suspend key */
#define KEY_UNDO 0630 /* undo key */
#define KEY_MOUSE 0631 /* Mouse event has occured */
#define KEY_MAX 0777 /* Maximum curses key */
/*
The definition for 'reg' is not standard, and is provided for
compatibility reasons. User's are discouraged from using this.
*/
#if !(defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE_EXTENDED >= 1))
#define reg register
#endif /* !(defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE_EXTENDED >= 1)) */
/* Various video attributes */
#define A_STANDOUT 000000200000L /* Terminal's best highlighting mode */
#define _STANDOUT A_STANDOUT /* for compatability with old curses */
#define A_UNDERLINE 000000400000L /* Underlining */
#define A_REVERSE 000001000000L /* Reverse video */
#define A_BLINK 000002000000L /* Blinking */
#define A_DIM 000004000000L /* Half bright */
#define A_BOLD 000010000000L /* Extra bright or bold */
#define A_ALTCHARSET 000100000000L /* Alternate character set */
/* The next two are subject to change so don't depend on them */
#define A_INVIS 000020000000L
#define A_PROTECT 000040000000L
#define A_NORMAL 000000000000L
#define A_ATTRIBUTES 037777600000L /* 0xFFFF0000 */
#define A_CHARTEXT 000000177777L /* 0x0000FFFF */
#define A_COLOR 017600000000L
/* Various video attributes defines for WA_ */
#define WA_STANDOUT A_STANDOUT /* Terminal's best highlighting mode */
#define WA_UNDERLINE A_UNDERLINE /* Underlining */
#define WA_REVERSE A_REVERSE /* Reverse video */
#define WA_BLINK A_BLINK /* Blinking */
#define WA_DIM A_DIM /* Half bright */
#define WA_BOLD A_BOLD /* Extra bright or bold */
#define WA_ALTCHARSET A_ALTCHARSET /* Alternate character set */
#define WA_INVIS A_INVIS
#define WA_PROTECT A_PROTECT
#define WA_NORMAL A_NORMAL
#define WA_HORIZONTAL 000000000001L /* Horizontal highlight */
#define WA_LEFT 000000000002L /* Left highlight */
#define WA_LOW 000000000004L /* Low highlight */
#define WA_RIGHT 000000000010L /* Right highlight */
#define WA_TOP 000000000020L /* Top highlight */
#define WA_VERTICAL 000000000040L /* Vertical highlight */
/* definition of 8 basic color */
#define COLOR_BLACK 0
#define COLOR_RED 1
#define COLOR_GREEN 2
#define COLOR_YELLOW 3
#define COLOR_BLUE 4
#define COLOR_MAGENTA 5
#define COLOR_CYAN 6
#define COLOR_WHITE 7
#if !(defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE_EXTENDED >= 1))
/* mouse related macros: don't change these definitions or bit-masks. */
/* they are interdependent (used by _map_button() in tgetch() */
#define BUTTON_RELEASED 0
#define BUTTON_PRESSED 1
#define BUTTON_CLICKED 2
#define BUTTON_DOUBLE_CLICKED 3
#define BUTTON_TRIPLE_CLICKED 4
#define MOUSE_X_POS (Mouse_status._x)
#define MOUSE_Y_POS (Mouse_status._y)
#define A_BUTTON_CHANGED (Mouse_status._changes & 7)
#define MOUSE_MOVED (Mouse_status._changes & 8)
#define MOUSE_POS_REPORT (Mouse_status._changes & 16)
#define BUTTON_CHANGED(x) (Mouse_status._changes & (1 << ((x) - 1)))
#define BUTTON_STATUS(x) (Mouse_status._button[(x)-1])
/* definition of mouse bit-masks */
#define BUTTON1_RELEASED 000000000001L
#define BUTTON1_PRESSED 000000000002L
#define BUTTON1_CLICKED 000000000004L
#define BUTTON1_DOUBLE_CLICKED 000000000010L
#define BUTTON1_TRIPLE_CLICKED 000000000020L
#define BUTTON2_RELEASED 000000000040L
#define BUTTON2_PRESSED 000000000100L
#define BUTTON2_CLICKED 000000000200L
#define BUTTON2_DOUBLE_CLICKED 000000000400L
#define BUTTON2_TRIPLE_CLICKED 000000001000L
#define BUTTON3_RELEASED 000000002000L
#define BUTTON3_PRESSED 000000004000L
#define BUTTON3_CLICKED 000000010000L
#define BUTTON3_DOUBLE_CLICKED 000000020000L
#define BUTTON3_TRIPLE_CLICKED 000000040000L
#define ALL_MOUSE_EVENTS 000000077777L
#define REPORT_MOUSE_POSITION 000000100000L
#endif /* !(defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE_EXTENDED >= 1))*/
#ifdef __cplusplus
}
#endif
#endif /* _CURSES_H */