17c478bd9Sstevel@tonic-gatee keycaps
27c478bd9Sstevel@tonic-gateH
37c478bd9Sstevel@tonic-gateg/.*KEY_/s//KEY_/
47c478bd9Sstevel@tonic-gateg/KEY_F([1-9]/d
57c478bd9Sstevel@tonic-gateg'\(KEY_[^,]*\),[ 	]*\([0-9][0-9]*\),[ 	]*\(.*\)'s''#define	\1	\2		/* \3 */'
67c478bd9Sstevel@tonic-gatew ./tmp/keycaps
77c478bd9Sstevel@tonic-gatee !sort +2n ./tmp/keycaps
87c478bd9Sstevel@tonic-gateg'\(KEY_[^	]	\)'s''\1	'
97c478bd9Sstevel@tonic-gateg'\(KEY_[^	][^	]	\)'s''\1	'
107c478bd9Sstevel@tonic-gateg'\(KEY_[^	][^	][^	]	\)'s''\1	'
117c478bd9Sstevel@tonic-gate1i
127c478bd9Sstevel@tonic-gate/* Funny "characters" enabled for various special function keys for input */
137c478bd9Sstevel@tonic-gate/* This list is created from caps and curses.ed. Do not edit it! */
147c478bd9Sstevel@tonic-gate#define	KEY_MIN		0401		/* Minimum curses key */
157c478bd9Sstevel@tonic-gate#define	KEY_BREAK	0401		/* break key (unreliable) */
167c478bd9Sstevel@tonic-gate.
177c478bd9Sstevel@tonic-gate/KEY_F(0)/s//KEY_F0	/
187c478bd9Sstevel@tonic-gatea
197c478bd9Sstevel@tonic-gate#define	KEY_F(n)	(KEY_F0+(n))	/* Space for 64 function keys */
207c478bd9Sstevel@tonic-gate					/* is reserved. */
217c478bd9Sstevel@tonic-gate.
227c478bd9Sstevel@tonic-gate/KEY_ENTER/a
237c478bd9Sstevel@tonic-gate#define	KEY_SRESET	0530		/* soft (partial) reset (unreliable) */
247c478bd9Sstevel@tonic-gate#define	KEY_RESET	0531		/* reset or hard reset (unreliable) */
257c478bd9Sstevel@tonic-gate.
267c478bd9Sstevel@tonic-gate/KEY_A1/i
277c478bd9Sstevel@tonic-gate					/* The keypad is arranged like this: */
287c478bd9Sstevel@tonic-gate					/*    a1    up    a3   */
297c478bd9Sstevel@tonic-gate					/*   left   b2  right  */
307c478bd9Sstevel@tonic-gate					/*    c1   down   c3   */
317c478bd9Sstevel@tonic-gate.
327c478bd9Sstevel@tonic-gate$a
337c478bd9Sstevel@tonic-gate#define	KEY_MAX		0777		/* Maximum curses key */
347c478bd9Sstevel@tonic-gate.
357c478bd9Sstevel@tonic-gate1i
367c478bd9Sstevel@tonic-gate#ifndef _CURSES_H
377c478bd9Sstevel@tonic-gate#define	_CURSES_H
387c478bd9Sstevel@tonic-gate
397c478bd9Sstevel@tonic-gate/*
407c478bd9Sstevel@tonic-gate * curses.h - this file is automatically made from caps and
417c478bd9Sstevel@tonic-gate *	curses.ed. Don't make changes directly to curses.h!
427c478bd9Sstevel@tonic-gate */
437c478bd9Sstevel@tonic-gate
447c478bd9Sstevel@tonic-gate#include <widec.h>
457c478bd9Sstevel@tonic-gate
467c478bd9Sstevel@tonic-gate#include <stdio.h>
477c478bd9Sstevel@tonic-gate
487c478bd9Sstevel@tonic-gate#ifdef	__cplusplus
497c478bd9Sstevel@tonic-gateextern "C" {
507c478bd9Sstevel@tonic-gate#endif
517c478bd9Sstevel@tonic-gate
527c478bd9Sstevel@tonic-gate#define	CSMAX   4
537c478bd9Sstevel@tonic-gate
547c478bd9Sstevel@tonic-gate/*
557c478bd9Sstevel@tonic-gate * This trick is used to distinguish between SYSV and V7 systems.
567c478bd9Sstevel@tonic-gate * We assume that L_ctermid is only defined in stdio.h in SYSV
577c478bd9Sstevel@tonic-gate * systems, but not in V7 or Berkeley UNIX.
587c478bd9Sstevel@tonic-gate */
597c478bd9Sstevel@tonic-gate#ifdef L_ctermid
607c478bd9Sstevel@tonic-gate#ifdef SYSV
617c478bd9Sstevel@tonic-gate#undef SYSV
627c478bd9Sstevel@tonic-gate#endif
637c478bd9Sstevel@tonic-gate#define	SYSV
647c478bd9Sstevel@tonic-gate#endif
657c478bd9Sstevel@tonic-gate/* Some V7 systems define	L_ctermid - we list those here */
667c478bd9Sstevel@tonic-gate#ifdef BSD
677c478bd9Sstevel@tonic-gate#undef SYSV
687c478bd9Sstevel@tonic-gate#endif
697c478bd9Sstevel@tonic-gate
707c478bd9Sstevel@tonic-gate#ifdef SYSV
717c478bd9Sstevel@tonic-gate
727c478bd9Sstevel@tonic-gate#include <termio.h>
737c478bd9Sstevel@tonic-gatetypedef struct termio SGTTY;
747c478bd9Sstevel@tonic-gatetypedef struct termios SGTTYS;
757c478bd9Sstevel@tonic-gate
767c478bd9Sstevel@tonic-gate#else /* !SYSV */
777c478bd9Sstevel@tonic-gate
787c478bd9Sstevel@tonic-gate#ifndef _SGTTYB_
797c478bd9Sstevel@tonic-gate#include <sgtty.h>
807c478bd9Sstevel@tonic-gate#endif /* _SGTTYB_ */
817c478bd9Sstevel@tonic-gatetypedef struct sgttyb SGTTY;
827c478bd9Sstevel@tonic-gate
837c478bd9Sstevel@tonic-gate#endif /* SYSV */
847c478bd9Sstevel@tonic-gate
857c478bd9Sstevel@tonic-gate/*
867c478bd9Sstevel@tonic-gate * bool is a built-in type in standard C++ and as such is not
877c478bd9Sstevel@tonic-gate * defined here when using standard C++. However, the GNU compiler
887c478bd9Sstevel@tonic-gate * fixincludes utility nonetheless creates it's own version of this
897c478bd9Sstevel@tonic-gate * header for use by gcc and g++. In that version it adds a redundant
907c478bd9Sstevel@tonic-gate * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
917c478bd9Sstevel@tonic-gate * header we need to include the following magic comment:
927c478bd9Sstevel@tonic-gate *
937c478bd9Sstevel@tonic-gate * we must use the C++ compiler's type
947c478bd9Sstevel@tonic-gate *
957c478bd9Sstevel@tonic-gate * The above comment should not be removed or changed until GNU
967c478bd9Sstevel@tonic-gate * gcc/fixinc/inclhack.def is updated to bypass this header.
977c478bd9Sstevel@tonic-gate */
987c478bd9Sstevel@tonic-gate#if !defined(__cplusplus) && !defined(_BOOL)
997c478bd9Sstevel@tonic-gatetypedef	char bool;
1007c478bd9Sstevel@tonic-gate#endif /* !defined(__cplusplus) && !defined(_BOOL) */
1017c478bd9Sstevel@tonic-gate
1027c478bd9Sstevel@tonic-gate#define	_VR3_COMPAT_CODE
1037c478bd9Sstevel@tonic-gate/*
1047c478bd9Sstevel@tonic-gate * chtype is the type used to store a character together with attributes.
1057c478bd9Sstevel@tonic-gate * It can be set to "char" to save space, or "long" to get more attributes.
1067c478bd9Sstevel@tonic-gate */
1077c478bd9Sstevel@tonic-gate#ifdef	CHTYPE
1087c478bd9Sstevel@tonic-gatetypedef	CHTYPE chtype;
1097c478bd9Sstevel@tonic-gate#else
1107c478bd9Sstevel@tonic-gate#ifdef _LP64
1117c478bd9Sstevel@tonic-gatetypedef unsigned int chtype;
1127c478bd9Sstevel@tonic-gate#else
1137c478bd9Sstevel@tonic-gatetypedef unsigned long chtype;
1147c478bd9Sstevel@tonic-gate#endif /* _LP64 */
1157c478bd9Sstevel@tonic-gate#endif /* CHTYPE */
1167c478bd9Sstevel@tonic-gate
1177c478bd9Sstevel@tonic-gate/*
1187c478bd9Sstevel@tonic-gate *	Define for the 'old' definition of chtype is required
1197c478bd9Sstevel@tonic-gate *	when we are running in compatibility mode
1207c478bd9Sstevel@tonic-gate */
1217c478bd9Sstevel@tonic-gate#ifdef _VR3_COMPAT_CODE
1227c478bd9Sstevel@tonic-gatetypedef unsigned short _ochtype;
1237c478bd9Sstevel@tonic-gate#endif
1247c478bd9Sstevel@tonic-gate
1257c478bd9Sstevel@tonic-gate/* TRUE and FALSE get defined so many times, */
1267c478bd9Sstevel@tonic-gate/* let's not get in the way of other definitions. */
1277c478bd9Sstevel@tonic-gate#if	!defined(TRUE) || ((TRUE) != 1)
1287c478bd9Sstevel@tonic-gate#define	TRUE	(1)
1297c478bd9Sstevel@tonic-gate#endif
1307c478bd9Sstevel@tonic-gate#if	!defined(FALSE) || ((FALSE) != 0)
1317c478bd9Sstevel@tonic-gate#define	FALSE	(0)
1327c478bd9Sstevel@tonic-gate#endif
1337c478bd9Sstevel@tonic-gate#if	!defined(ERR) || ((ERR) != -1)
1347c478bd9Sstevel@tonic-gate#define	ERR	(-1)
1357c478bd9Sstevel@tonic-gate#endif
1367c478bd9Sstevel@tonic-gate#if	!defined(OK) || ((OK) != 0)
1377c478bd9Sstevel@tonic-gate#define	OK	(0)
1387c478bd9Sstevel@tonic-gate#endif
1397c478bd9Sstevel@tonic-gate
1407c478bd9Sstevel@tonic-gate/* short-hand notations */
1417c478bd9Sstevel@tonic-gatetypedef struct _win_st	WINDOW;
1427c478bd9Sstevel@tonic-gatetypedef struct screen	SCREEN;
1437c478bd9Sstevel@tonic-gatetypedef struct _Mouse	MOUSE_STATUS;
1447c478bd9Sstevel@tonic-gate
1457c478bd9Sstevel@tonic-gatestruct _win_st
1467c478bd9Sstevel@tonic-gate{
1477c478bd9Sstevel@tonic-gate	short		_cury, _curx;	/* current coordinates */
1487c478bd9Sstevel@tonic-gate	short		_maxy, _maxx;	/* max coordinates */
1497c478bd9Sstevel@tonic-gate	short		_begy, _begx;	/* (0,0) screen coordinates */
1507c478bd9Sstevel@tonic-gate	char		_flags;
1517c478bd9Sstevel@tonic-gate	short		_yoffset;	/* actual begy is _begy+_yoffset */
1527c478bd9Sstevel@tonic-gate	bool		_clear,		/* clearok() info */
1537c478bd9Sstevel@tonic-gate			_leave,		/* leaveok() info */
1547c478bd9Sstevel@tonic-gate			_immed,		/* window in immediate mode */
1557c478bd9Sstevel@tonic-gate			_sync;		/* auto syncup of parent */
1567c478bd9Sstevel@tonic-gate	WINDOW		*_padwin;	/* "pad" area for current window */
1577c478bd9Sstevel@tonic-gate#ifdef	_VR3_COMPAT_CODE
1587c478bd9Sstevel@tonic-gate	_ochtype	**_y16;		/* MUST stay at this offset in WINDOW */
1597c478bd9Sstevel@tonic-gate#endif
1607c478bd9Sstevel@tonic-gate	short		*_firstch;	/* first change in line */
1617c478bd9Sstevel@tonic-gate	short		*_lastch;	/* last change in line */
1627c478bd9Sstevel@tonic-gate	short		_tmarg, _bmarg;	/* scrolling region bounds */
1637c478bd9Sstevel@tonic-gate					/* MUST stay at this offset in WINDOW */
1647c478bd9Sstevel@tonic-gate	unsigned	_scroll		: 1;	/* scrollok() info */
1657c478bd9Sstevel@tonic-gate	unsigned	_use_idl	: 1;
1667c478bd9Sstevel@tonic-gate	unsigned	_use_keypad	: 1;
1677c478bd9Sstevel@tonic-gate	unsigned	_notimeout	: 1;
1687c478bd9Sstevel@tonic-gate	unsigned	_use_idc	: 1;
1697c478bd9Sstevel@tonic-gate	chtype		_attrs;		/* current window attributes */
1707c478bd9Sstevel@tonic-gate	chtype		_bkgd;		/* background, normally blank */
1717c478bd9Sstevel@tonic-gate	int		_delay;		/* delay period on wgetch */
1727c478bd9Sstevel@tonic-gate					/* 0:  for nodelay */
1737c478bd9Sstevel@tonic-gate					/* <0: for infinite delay */
1747c478bd9Sstevel@tonic-gate					/* >0: delay time in millisec */
1757c478bd9Sstevel@tonic-gate	short		_ndescs;	/* number of descendants */
1767c478bd9Sstevel@tonic-gate	short		_parx, _pary;	/* coords relative to parent (0,0) */
1777c478bd9Sstevel@tonic-gate	WINDOW		*_parent;	/* the parent if this is a subwin */
1787c478bd9Sstevel@tonic-gate	chtype		**_y;		/* lines of data */
1797c478bd9Sstevel@tonic-gate	short		_nbyte;		/* number of bytes to come */
1807c478bd9Sstevel@tonic-gate	short		_index;		/* index to hold coming char */
1817c478bd9Sstevel@tonic-gate	char		_waitc[CSMAX];	/* array to hold partial m-width char */
1827c478bd9Sstevel@tonic-gate	bool		_insmode;	/* TRUE for inserting, */
1837c478bd9Sstevel@tonic-gate					/* FALSE for adding */
1847c478bd9Sstevel@tonic-gate};
1857c478bd9Sstevel@tonic-gate
1867c478bd9Sstevel@tonic-gate/* _lastch is initially set to this, _firstch is set to win->_maxx */
1877c478bd9Sstevel@tonic-gate#define	_NOCHANGE	-1
1887c478bd9Sstevel@tonic-gate#define	_INFINITY	16000	/* no line can be longer than this */
1897c478bd9Sstevel@tonic-gate
1907c478bd9Sstevel@tonic-gate/* values for win->_flags */
1917c478bd9Sstevel@tonic-gate#define	_ISPAD		001
1927c478bd9Sstevel@tonic-gate#define	_WINCHANGED	002
1937c478bd9Sstevel@tonic-gate#define	_WINMOVED	004
1947c478bd9Sstevel@tonic-gate#define	_WINSDEL	010
1957c478bd9Sstevel@tonic-gate#define	_CANT_BE_IMMED	020
1967c478bd9Sstevel@tonic-gate#define	_WIN_ADD_ONE	040
1977c478bd9Sstevel@tonic-gate#define	_WIN_INS_ONE	100
1987c478bd9Sstevel@tonic-gate
1997c478bd9Sstevel@tonic-gatestruct _Mouse {
2007c478bd9Sstevel@tonic-gate	int x, y;
2017c478bd9Sstevel@tonic-gate	short button[3];
2027c478bd9Sstevel@tonic-gate	int   changes;
2037c478bd9Sstevel@tonic-gate};
2047c478bd9Sstevel@tonic-gate
2057c478bd9Sstevel@tonic-gate#define	CURS_STUPID	0
2067c478bd9Sstevel@tonic-gate#define	CURS_UNKNOWN	1
2077c478bd9Sstevel@tonic-gate#define	CURS_BAD_MALLOC	2
2087c478bd9Sstevel@tonic-gate
2097c478bd9Sstevel@tonic-gate/*
2107c478bd9Sstevel@tonic-gate * Various tricks to shut up lint about things that are perfectly fine.
2117c478bd9Sstevel@tonic-gate */
2127c478bd9Sstevel@tonic-gate#if defined(__lint) && !defined(CURSES) /* if not internal to curses source */
2137c478bd9Sstevel@tonic-gatestruct screen {
2147c478bd9Sstevel@tonic-gate	int _nobody_;
2157c478bd9Sstevel@tonic-gate};
2167c478bd9Sstevel@tonic-gate#endif /* __lint */
2177c478bd9Sstevel@tonic-gate
2187c478bd9Sstevel@tonic-gate/* common external variables */
2197c478bd9Sstevel@tonic-gate
2207c478bd9Sstevel@tonic-gateextern	int	LINES, COLS, TABSIZE, COLORS, COLOR_PAIRS;
2217c478bd9Sstevel@tonic-gate
2227c478bd9Sstevel@tonic-gateextern	short	curs_errno;
2237c478bd9Sstevel@tonic-gate
2247c478bd9Sstevel@tonic-gateextern WINDOW *stdscr, *curscr;
2257c478bd9Sstevel@tonic-gate
2267c478bd9Sstevel@tonic-gateextern  MOUSE_STATUS	Mouse_status;
2277c478bd9Sstevel@tonic-gate
2287c478bd9Sstevel@tonic-gateextern char ttytype[];
2297c478bd9Sstevel@tonic-gate
2307c478bd9Sstevel@tonic-gateextern char	curs_parm_err[],
2317c478bd9Sstevel@tonic-gate		*curs_err_strings[];
2327c478bd9Sstevel@tonic-gate
2337c478bd9Sstevel@tonic-gate/* Function declarations */
2347c478bd9Sstevel@tonic-gate
2357c478bd9Sstevel@tonic-gate#ifdef	_VR3_COMPAT_CODE
2367c478bd9Sstevel@tonic-gate
2377c478bd9Sstevel@tonic-gateextern	_ochtype	*acs_map;
2387c478bd9Sstevel@tonic-gateextern chtype 	*acs32map;
2397c478bd9Sstevel@tonic-gate
2407c478bd9Sstevel@tonic-gate/* definitions for Vr3 source compatibility */
2417c478bd9Sstevel@tonic-gate
2427c478bd9Sstevel@tonic-gate#define	initscr		initscr32
2437c478bd9Sstevel@tonic-gate#define	newterm		newterm32
2447c478bd9Sstevel@tonic-gate#define	waddch		w32addch
2457c478bd9Sstevel@tonic-gate#define	wechochar	w32echochar
2467c478bd9Sstevel@tonic-gate#define	pechochar	p32echochar
2477c478bd9Sstevel@tonic-gate#define	winsch		w32insch
2487c478bd9Sstevel@tonic-gate#define	vidputs		vid32puts
2497c478bd9Sstevel@tonic-gate#define	vidattr		vid32attr
2507c478bd9Sstevel@tonic-gate#define	wattroff	w32attroff
2517c478bd9Sstevel@tonic-gate#define	wattron		w32attron
2527c478bd9Sstevel@tonic-gate#define	wattrset	w32attrset
2537c478bd9Sstevel@tonic-gate#define	acs_map		acs32map
2547c478bd9Sstevel@tonic-gate#define	box		box32
2557c478bd9Sstevel@tonic-gate
2567c478bd9Sstevel@tonic-gate#ifdef	__STDC__
2577c478bd9Sstevel@tonic-gateextern WINDOW *initscr(void);
2587c478bd9Sstevel@tonic-gateextern	SCREEN	*newterm(char *, FILE *, FILE *);
2597c478bd9Sstevel@tonic-gate#else
2607c478bd9Sstevel@tonic-gateextern WINDOW *initscr();
2617c478bd9Sstevel@tonic-gateextern	SCREEN	*newterm();
2627c478bd9Sstevel@tonic-gate#endif
2637c478bd9Sstevel@tonic-gate
2647c478bd9Sstevel@tonic-gate/* declarations for mini-curses */
2657c478bd9Sstevel@tonic-gate
2667c478bd9Sstevel@tonic-gate#ifdef	__STDC__
2677c478bd9Sstevel@tonic-gateextern	WINDOW 	*m_initscr(void);
2687c478bd9Sstevel@tonic-gate
2697c478bd9Sstevel@tonic-gateextern	SCREEN	*m_newterm(char *, FILE *, FILE *);
2707c478bd9Sstevel@tonic-gate
2717c478bd9Sstevel@tonic-gateextern	int	m_addch(int), m_addstr(char *), m_clear(void), m_erase(void),
2727c478bd9Sstevel@tonic-gate		m_move(int, int), m_refresh(void);
2737c478bd9Sstevel@tonic-gate
2747c478bd9Sstevel@tonic-gate#else  /* __STDC__ */
2757c478bd9Sstevel@tonic-gateextern	WINDOW	*m_initscr();
2767c478bd9Sstevel@tonic-gate
2777c478bd9Sstevel@tonic-gateextern	SCREEN	*m_newterm();
2787c478bd9Sstevel@tonic-gate
2797c478bd9Sstevel@tonic-gateextern	int	m_addch(), m_addstr(), m_clear(), m_erase(),
2807c478bd9Sstevel@tonic-gate		m_move(), m_refresh();
2817c478bd9Sstevel@tonic-gate
2827c478bd9Sstevel@tonic-gate#endif /* __STDC__ */
2837c478bd9Sstevel@tonic-gate
2847c478bd9Sstevel@tonic-gate#else	/* _VR3_COMPAT_CODE */
2857c478bd9Sstevel@tonic-gate
2867c478bd9Sstevel@tonic-gateextern chtype *acs_map;
2877c478bd9Sstevel@tonic-gate
2887c478bd9Sstevel@tonic-gate#endif	/* _VR3_COMPAT_CODE */
2897c478bd9Sstevel@tonic-gate
2907c478bd9Sstevel@tonic-gate#ifdef __STDC__
2917c478bd9Sstevel@tonic-gate
2927c478bd9Sstevel@tonic-gateextern SCREEN *newscreen(char *, int, int, int, FILE *, FILE *);
2937c478bd9Sstevel@tonic-gateextern SCREEN *setcurscreen(SCREEN *);
2947c478bd9Sstevel@tonic-gate
2957c478bd9Sstevel@tonic-gateextern WINDOW *initscr(void);
2967c478bd9Sstevel@tonic-gateextern WINDOW *newwin(int, int, int, int);
2977c478bd9Sstevel@tonic-gateextern WINDOW *newpad(int, int);
2987c478bd9Sstevel@tonic-gateextern WINDOW *derwin(WINDOW *, int, int, int, int);
2997c478bd9Sstevel@tonic-gateextern WINDOW *dupwin(WINDOW *);
3007c478bd9Sstevel@tonic-gateextern WINDOW *getwin(FILE *);
3017c478bd9Sstevel@tonic-gate
3027c478bd9Sstevel@tonic-gateextern int wgetch(WINDOW *); /* it can return KEY_*, for instance. */
3037c478bd9Sstevel@tonic-gate
3047c478bd9Sstevel@tonic-gateextern char *longname(void);	/* long name of terminal */
3057c478bd9Sstevel@tonic-gateextern char *termname(void);	/* effective terminal name */
3067c478bd9Sstevel@tonic-gateextern char *keyname(int); 	/* name of token returned by wgetch() */
3077c478bd9Sstevel@tonic-gateextern char *slk_label(int);
3087c478bd9Sstevel@tonic-gateextern char erasechar(void);
3097c478bd9Sstevel@tonic-gateextern char killchar(void);
3107c478bd9Sstevel@tonic-gateextern char *unctrl(int);
3117c478bd9Sstevel@tonic-gate
3127c478bd9Sstevel@tonic-gateextern chtype termattrs(void);
3137c478bd9Sstevel@tonic-gate
3147c478bd9Sstevel@tonic-gateextern void vidupdate(chtype, chtype, int (*)(char));
3157c478bd9Sstevel@tonic-gateextern void wsyncup(WINDOW *);
3167c478bd9Sstevel@tonic-gateextern void wsyncdown(WINDOW *);
3177c478bd9Sstevel@tonic-gateextern void delscreen(SCREEN *);
3187c478bd9Sstevel@tonic-gateextern void curserr(void);
3197c478bd9Sstevel@tonic-gateextern void _setqiflush(int);
3207c478bd9Sstevel@tonic-gateextern void wcursyncup(WINDOW *);
3217c478bd9Sstevel@tonic-gate
3227c478bd9Sstevel@tonic-gateextern int cbreak(void);
3237c478bd9Sstevel@tonic-gateextern int nocbreak(void);
3247c478bd9Sstevel@tonic-gateextern int reset_prog_mode(void);
3257c478bd9Sstevel@tonic-gateextern int reset_shell_mode(void);
3267c478bd9Sstevel@tonic-gateextern int def_prog_mode(void);
3277c478bd9Sstevel@tonic-gateextern int _setecho(int);
3287c478bd9Sstevel@tonic-gateextern int _setnonl(int);
3297c478bd9Sstevel@tonic-gateextern int def_shell_mode(void);
3307c478bd9Sstevel@tonic-gateextern int raw(void);
3317c478bd9Sstevel@tonic-gateextern int savetty(void);
3327c478bd9Sstevel@tonic-gateextern int traceon(void);
3337c478bd9Sstevel@tonic-gateextern int _meta(int);
3347c478bd9Sstevel@tonic-gateextern int traceoff(void);
3357c478bd9Sstevel@tonic-gateextern int noraw(void);
3367c478bd9Sstevel@tonic-gateextern int flushinp(void);
3377c478bd9Sstevel@tonic-gateextern int _getsyx(int *, int *);
3387c478bd9Sstevel@tonic-gateextern int _ring(bool);
3397c478bd9Sstevel@tonic-gateextern int resetty(void);
3407c478bd9Sstevel@tonic-gateextern int ripoffline(int, int (*)(WINDOW *, int));
3417c478bd9Sstevel@tonic-gateextern int setsyx(int, int);
3427c478bd9Sstevel@tonic-gateextern int slk_refresh(void);
3437c478bd9Sstevel@tonic-gateextern int slk_restore(void);
3447c478bd9Sstevel@tonic-gateextern int wstandend(WINDOW *);
3457c478bd9Sstevel@tonic-gateextern int wstandout(WINDOW *);
3467c478bd9Sstevel@tonic-gateextern int wattroff(WINDOW *, chtype);
3477c478bd9Sstevel@tonic-gateextern int wattron(WINDOW *, chtype);
3487c478bd9Sstevel@tonic-gateextern int wattrset(WINDOW *, chtype);
3497c478bd9Sstevel@tonic-gateextern int wrefresh(WINDOW *);
3507c478bd9Sstevel@tonic-gate
3517c478bd9Sstevel@tonic-gateextern int copywin(WINDOW *, WINDOW *, int, int, int, int, int, int, int);
3527c478bd9Sstevel@tonic-gateextern int curs_set(int);
3537c478bd9Sstevel@tonic-gateextern int delay_output(int);
3547c478bd9Sstevel@tonic-gateextern int delwin(WINDOW *);
3557c478bd9Sstevel@tonic-gateextern int doupdate(void);
3567c478bd9Sstevel@tonic-gateextern int drainio(int);
3577c478bd9Sstevel@tonic-gateextern int endwin(void);
3587c478bd9Sstevel@tonic-gateextern int isendwin(void);
3597c478bd9Sstevel@tonic-gateextern int baudrate(void);
3607c478bd9Sstevel@tonic-gateextern int has_ic(void);
3617c478bd9Sstevel@tonic-gateextern int has_il(void);
3627c478bd9Sstevel@tonic-gateextern int keypad(WINDOW *, bool);
3637c478bd9Sstevel@tonic-gateextern int mvcur(int, int, int, int);
3647c478bd9Sstevel@tonic-gate
3657c478bd9Sstevel@tonic-gateextern int mvprintw(int, int, ...);
3667c478bd9Sstevel@tonic-gateextern int mvscanw(int, int, ...);
3677c478bd9Sstevel@tonic-gateextern int mvwprintw(WINDOW *, int, int, ...);
3687c478bd9Sstevel@tonic-gateextern int mvwscanw(WINDOW *, int, int, ...);
3697c478bd9Sstevel@tonic-gateextern int printw(char *, ...);
3707c478bd9Sstevel@tonic-gateextern int scanw(char *, ...);
3717c478bd9Sstevel@tonic-gateextern int wprintw(WINDOW *, ...);
3727c478bd9Sstevel@tonic-gateextern int wscanw(WINDOW *, ...);
3737c478bd9Sstevel@tonic-gate
3747c478bd9Sstevel@tonic-gate		/* __va_list is the ANSI-C safe definition of the	*/
3757c478bd9Sstevel@tonic-gate		/* va_list type as allowed to be defined in stdlib.h.	*/
3767c478bd9Sstevel@tonic-gate		/* <stdio.h> provides the nested include of <va_list.h>	*/
3777c478bd9Sstevel@tonic-gate		/* which provides this namespace safe definition.	*/
3787c478bd9Sstevel@tonic-gate		/* Either <stdarg.h> or <varargs.h> must be included to	*/
3797c478bd9Sstevel@tonic-gate		/* use these interfaces.				*/
3807c478bd9Sstevel@tonic-gate
3817c478bd9Sstevel@tonic-gateextern int vwprintw(WINDOW *, char *, __va_list);
3827c478bd9Sstevel@tonic-gateextern int vwscanw(WINDOW *, char *, __va_list);
3837c478bd9Sstevel@tonic-gate
3847c478bd9Sstevel@tonic-gateextern int mvwin(WINDOW *, int, int);
3857c478bd9Sstevel@tonic-gateextern int mvderwin(WINDOW *, int, int);
3867c478bd9Sstevel@tonic-gateextern int napms(int);
3877c478bd9Sstevel@tonic-gateextern int newkey(char *, short, bool);
3887c478bd9Sstevel@tonic-gateextern int filter(void);
3897c478bd9Sstevel@tonic-gateextern int pechochar(WINDOW *, chtype);
3907c478bd9Sstevel@tonic-gateextern int pnoutrefresh(WINDOW *, int, int, int, int, int, int);
3917c478bd9Sstevel@tonic-gateextern int prefresh(WINDOW *, int, int, int, int, int, int);
3927c478bd9Sstevel@tonic-gate
3937c478bd9Sstevel@tonic-gateextern int putwin(WINDOW *, FILE *);
3947c478bd9Sstevel@tonic-gateextern int wredrawln(WINDOW *, int, int);
3957c478bd9Sstevel@tonic-gateextern int scr_dump(char *);
3967c478bd9Sstevel@tonic-gateextern int setupterm(char *, int, int *);
3977c478bd9Sstevel@tonic-gate
3987c478bd9Sstevel@tonic-gateextern int slk_attron(chtype);
3997c478bd9Sstevel@tonic-gateextern int slk_attroff(chtype);
4007c478bd9Sstevel@tonic-gateextern int slk_attrset(chtype);
4017c478bd9Sstevel@tonic-gateextern int slk_clear(void);
4027c478bd9Sstevel@tonic-gateextern int slk_noutrefresh(void);
4037c478bd9Sstevel@tonic-gateextern int slk_set(int, char *, int);
4047c478bd9Sstevel@tonic-gateextern int slk_start(int, int *);
4057c478bd9Sstevel@tonic-gateextern int slk_touch(void);
4067c478bd9Sstevel@tonic-gateextern int start_color(void);
4077c478bd9Sstevel@tonic-gateextern int typeahead(int);
4087c478bd9Sstevel@tonic-gate
4097c478bd9Sstevel@tonic-gateextern bool can_change_color(void);
4107c478bd9Sstevel@tonic-gateextern bool has_colors(void);
4117c478bd9Sstevel@tonic-gate
4127c478bd9Sstevel@tonic-gateextern int waddch(WINDOW *, chtype);
4137c478bd9Sstevel@tonic-gateextern int waddchnstr(WINDOW *, chtype *, int);
4147c478bd9Sstevel@tonic-gateextern int waddnstr(WINDOW *, char *, int);
4157c478bd9Sstevel@tonic-gateextern int wbkgd(WINDOW *, chtype);
4167c478bd9Sstevel@tonic-gateextern int wborder(WINDOW *, chtype, chtype, chtype, chtype,
4177c478bd9Sstevel@tonic-gate		chtype, chtype, chtype, chtype);
4187c478bd9Sstevel@tonic-gateextern int wclrtobot(WINDOW *);
4197c478bd9Sstevel@tonic-gateextern int wclrtoeol(WINDOW *);
4207c478bd9Sstevel@tonic-gateextern int wdelch(WINDOW *);
4217c478bd9Sstevel@tonic-gateextern int wechochar(WINDOW *, chtype);
4227c478bd9Sstevel@tonic-gateextern int wgetstr(WINDOW *, char *);
4237c478bd9Sstevel@tonic-gateextern int wgetnstr(WINDOW *, char *, int);
4247c478bd9Sstevel@tonic-gateextern int whline(WINDOW *, chtype, int);
4257c478bd9Sstevel@tonic-gateextern int wvline(WINDOW *, chtype, int);
4267c478bd9Sstevel@tonic-gateextern int winchnstr(WINDOW *, chtype *, int);
4277c478bd9Sstevel@tonic-gateextern int winchstr(WINDOW *, chtype *);
4287c478bd9Sstevel@tonic-gateextern int winnstr(WINDOW *, char *, int);
4297c478bd9Sstevel@tonic-gateextern int winsch(WINDOW *, chtype);
4307c478bd9Sstevel@tonic-gateextern int winsdelln(WINDOW *, int);		/* internal */
4317c478bd9Sstevel@tonic-gateextern int winsnstr(WINDOW *, char *, int);
4327c478bd9Sstevel@tonic-gateextern int winstr(WINDOW *, char *);
4337c478bd9Sstevel@tonic-gateextern int wmove(WINDOW *, int, int);
4347c478bd9Sstevel@tonic-gateextern int wnoutrefresh(WINDOW *);
4357c478bd9Sstevel@tonic-gateextern int wredrawln(WINDOW *, int, int);
4367c478bd9Sstevel@tonic-gateextern int wscrl(WINDOW *, int);
4377c478bd9Sstevel@tonic-gateextern int wsetscrreg(WINDOW *, int, int);
4387c478bd9Sstevel@tonic-gateextern int wtouchln(WINDOW *, int, int, int);
4397c478bd9Sstevel@tonic-gate
4407c478bd9Sstevel@tonic-gateextern int crmode(void);
4417c478bd9Sstevel@tonic-gateextern int nocrmode(void);
4427c478bd9Sstevel@tonic-gateextern int ungetch(int);
4437c478bd9Sstevel@tonic-gate
4447c478bd9Sstevel@tonic-gateextern int mouse_set(long int);
4457c478bd9Sstevel@tonic-gateextern int mouse_on(long int);
4467c478bd9Sstevel@tonic-gateextern int mouse_off(long int);
4477c478bd9Sstevel@tonic-gateextern int request_mouse_pos(void);
4487c478bd9Sstevel@tonic-gateextern int map_button(unsigned long);
4497c478bd9Sstevel@tonic-gate
4507c478bd9Sstevel@tonic-gateextern void wmouse_position(WINDOW *, int *, int *);
4517c478bd9Sstevel@tonic-gate
4527c478bd9Sstevel@tonic-gateextern unsigned long getmouse(void), getbmap(void);
4537c478bd9Sstevel@tonic-gate
4547c478bd9Sstevel@tonic-gate		/* the following declarations take integers as arguments  */
4557c478bd9Sstevel@tonic-gate		/* to keep the CI5 compiler happy.  what we really want   */
4567c478bd9Sstevel@tonic-gate		/* to pass is given in comments.  (by the way, we don't   */
4577c478bd9Sstevel@tonic-gate		/* save anything by passing short or bool, since compiler */
4587c478bd9Sstevel@tonic-gate		/* expands them to integers any way			  */
4597c478bd9Sstevel@tonic-gate
4607c478bd9Sstevel@tonic-gateextern int pair_content(short, short *, short *);
4617c478bd9Sstevel@tonic-gateextern int color_content(short, short *, short *, short *); /* as above */
4627c478bd9Sstevel@tonic-gateextern int init_color(short, short, short, short);
4637c478bd9Sstevel@tonic-gateextern int init_pair(short, short, short);
4647c478bd9Sstevel@tonic-gateextern int idlok(WINDOW *, bool);
4657c478bd9Sstevel@tonic-gate
4667c478bd9Sstevel@tonic-gateextern void immedok(WINDOW *, bool);
4677c478bd9Sstevel@tonic-gate
4687c478bd9Sstevel@tonic-gateextern chtype winwch(WINDOW *);
4697c478bd9Sstevel@tonic-gate
4707c478bd9Sstevel@tonic-gateextern int pechowchar(WINDOW *, chtype);
4717c478bd9Sstevel@tonic-gateextern int ungetwch(const wchar_t);
4727c478bd9Sstevel@tonic-gateextern int waddnwstr(WINDOW *, wchar_t *, int);
4737c478bd9Sstevel@tonic-gateextern int waddwch(WINDOW *, chtype);
4747c478bd9Sstevel@tonic-gateextern int waddwchnstr(WINDOW *, chtype *, int);
4757c478bd9Sstevel@tonic-gateextern int wechowchar(WINDOW *, chtype);
4767c478bd9Sstevel@tonic-gateextern int wgetnwstr(WINDOW *, wchar_t *, int);
4777c478bd9Sstevel@tonic-gateextern int wgetwch(WINDOW *);
4787c478bd9Sstevel@tonic-gateextern int wgetwstr(WINDOW *, wchar_t *);
4797c478bd9Sstevel@tonic-gateextern int winnwstr(WINDOW *, wchar_t *, int);
4807c478bd9Sstevel@tonic-gateextern int winsnwstr(WINDOW *, wchar_t *, int);
4817c478bd9Sstevel@tonic-gateextern int winswch(WINDOW *, chtype);
4827c478bd9Sstevel@tonic-gateextern int winwchnstr(WINDOW *, chtype *, int);
4837c478bd9Sstevel@tonic-gateextern int winwstr(WINDOW *, wchar_t *);
4847c478bd9Sstevel@tonic-gate
4857c478bd9Sstevel@tonic-gate#else /* __STDC__ */
4867c478bd9Sstevel@tonic-gate
4877c478bd9Sstevel@tonic-gateextern	SCREEN	*newscreen(),	/* termname, lines, cols, tabsiz, fout, fin */
4887c478bd9Sstevel@tonic-gate		*setcurscreen(); /* screenptr */
4897c478bd9Sstevel@tonic-gate
4907c478bd9Sstevel@tonic-gateextern	WINDOW 	*initscr(),
4917c478bd9Sstevel@tonic-gate		*newwin(),		/* nlines, ncols, begy, begx */
4927c478bd9Sstevel@tonic-gate		*newpad(),		/* nlines, ncols */
4937c478bd9Sstevel@tonic-gate		*derwin(),		/* orig, nlines, ncols, begy, begx */
4947c478bd9Sstevel@tonic-gate		*dupwin(),		/* orig */
4957c478bd9Sstevel@tonic-gate		*getwin();		/* file */
4967c478bd9Sstevel@tonic-gate
4977c478bd9Sstevel@tonic-gateextern	int	wgetch(); /* because it can return KEY_*, for instance. */
4987c478bd9Sstevel@tonic-gate
4997c478bd9Sstevel@tonic-gateextern	char	*longname(),	/* long name of terminal */
5007c478bd9Sstevel@tonic-gate		*termname(),	/* effective terminal name */
5017c478bd9Sstevel@tonic-gate		*keyname(),	/* (int)  name of token returned by wgetch() */
5027c478bd9Sstevel@tonic-gate		*slk_label(),	/* index */
5037c478bd9Sstevel@tonic-gate		erasechar(),
5047c478bd9Sstevel@tonic-gate		killchar(),
5057c478bd9Sstevel@tonic-gate		*unctrl();
5067c478bd9Sstevel@tonic-gate
5077c478bd9Sstevel@tonic-gateextern	chtype	termattrs();
5087c478bd9Sstevel@tonic-gate
5097c478bd9Sstevel@tonic-gateextern	void	vidupdate(), wsyncup(), wsyncdown(),
5107c478bd9Sstevel@tonic-gate		delkeymap(),
5117c478bd9Sstevel@tonic-gate		delscreen(), curserr(),
5127c478bd9Sstevel@tonic-gate		_setqiflush(),
5137c478bd9Sstevel@tonic-gate		immedok(),
5147c478bd9Sstevel@tonic-gate		wcursyncup();
5157c478bd9Sstevel@tonic-gate
5167c478bd9Sstevel@tonic-gateextern	int	cbreak(), nocbreak(),
5177c478bd9Sstevel@tonic-gate		reset_prog_mode(), reset_shell_mode(), def_prog_mode(),
5187c478bd9Sstevel@tonic-gate		_setecho(), _setnonl(),
5197c478bd9Sstevel@tonic-gate		def_shell_mode(), raw(),
5207c478bd9Sstevel@tonic-gate		savetty(), traceon(), _meta(),
5217c478bd9Sstevel@tonic-gate		traceoff(), noraw(), flushinp(), _getsyx(),
5227c478bd9Sstevel@tonic-gate		_ring(), resetty(), ripoffline(), setsyx(), slk_refresh(),
5237c478bd9Sstevel@tonic-gate		slk_restore(), wstandend(), wstandout(),
5247c478bd9Sstevel@tonic-gate		wattroff(), wattron(), wattrset(), wrefresh();
5257c478bd9Sstevel@tonic-gate
5267c478bd9Sstevel@tonic-gateextern	int	color_cont(), copywin(), curs_set(), delay_output(), delwin(),
5277c478bd9Sstevel@tonic-gate		doupdate(), drainio(), endwin(), isendwin(),
5287c478bd9Sstevel@tonic-gate		baudrate(), has_ic(), has_il(), idlok(),
5297c478bd9Sstevel@tonic-gate		init_color(), init_pair(), keypad(), mvcur();
5307c478bd9Sstevel@tonic-gate
5317c478bd9Sstevel@tonic-gateextern	int	mvprintw(), mvscanw(), mvwprintw(), mvwscanw(),
5327c478bd9Sstevel@tonic-gate		printw(), scanw(), wprintw(), wscanw(), vwprintw(), vwscanw();
5337c478bd9Sstevel@tonic-gate
5347c478bd9Sstevel@tonic-gateextern	int	mvwin(), mvderwin(), napms(), newkey(), filter(),
5357c478bd9Sstevel@tonic-gate		pair_content(), pechochar(), pnoutrefresh(), prefresh();
5367c478bd9Sstevel@tonic-gate
5377c478bd9Sstevel@tonic-gateextern 	int	putwin(), wredrawln(), scr_dump(), setupterm();
5387c478bd9Sstevel@tonic-gate
5397c478bd9Sstevel@tonic-gateextern	int	slk_attrof(), slk_attrof(), slk_attrset(),
5407c478bd9Sstevel@tonic-gate		slk_clear(), slk_noutrefresh(), slk_set(),
5417c478bd9Sstevel@tonic-gate		slk_start(), slk_touch(), start_color(),
5427c478bd9Sstevel@tonic-gate		typeahead();
5437c478bd9Sstevel@tonic-gate
5447c478bd9Sstevel@tonic-gateextern	bool	can_change_color(), has_colors();
5457c478bd9Sstevel@tonic-gate
5467c478bd9Sstevel@tonic-gateextern	int	waddch(), waddchnstr(), waddnstr(), wbkgd(),
5477c478bd9Sstevel@tonic-gate		wborder(), wclrtobot(), wclrtoeol(), wdelch(), wechochar(),
5487c478bd9Sstevel@tonic-gate		wgetstr(), wgetnstr(), whline(), wvline(), winchnstr(),
5497c478bd9Sstevel@tonic-gate		winchstr(), winnstr(), winsch(),
5507c478bd9Sstevel@tonic-gate		winsdelln(),		/* internal */
5517c478bd9Sstevel@tonic-gate		winsnstr(), winstr(), wmove(), wnoutrefresh(), wredrawln(),
5527c478bd9Sstevel@tonic-gate		wscrl(), wsetscrreg(), wtouchln();
5537c478bd9Sstevel@tonic-gate
5547c478bd9Sstevel@tonic-gateextern	int	crmode(), nocrmode(), ungetch();
5557c478bd9Sstevel@tonic-gate
5567c478bd9Sstevel@tonic-gateextern	int	mouse_set(), mouse_on(), mouse_off(),
5577c478bd9Sstevel@tonic-gate		request_mouse_pos(), map_button();
5587c478bd9Sstevel@tonic-gate
5597c478bd9Sstevel@tonic-gateextern void	wmouse_position();
5607c478bd9Sstevel@tonic-gate
5617c478bd9Sstevel@tonic-gateextern unsigned long getmouse(), getbmap();
5627c478bd9Sstevel@tonic-gate
5637c478bd9Sstevel@tonic-gateextern chtype	winwch();
5647c478bd9Sstevel@tonic-gate
5657c478bd9Sstevel@tonic-gateextern int	pechowchar(), ungetwch(), waddnwstr(), waddwch(),
5667c478bd9Sstevel@tonic-gate		waddwchnstr(), wechowchar(), wgetnwstr(), wgetwch(),
5677c478bd9Sstevel@tonic-gate		wgetwstr(), winnwstr(), winsnwstr(), winswch(),
5687c478bd9Sstevel@tonic-gate		winwchnstr(), winwstr();
5697c478bd9Sstevel@tonic-gate
5707c478bd9Sstevel@tonic-gate#endif /* __STDC__ */
5717c478bd9Sstevel@tonic-gate
5727c478bd9Sstevel@tonic-gate#define	getsyx(y, x)		_getsyx(&(y), &(x))
5737c478bd9Sstevel@tonic-gate
5747c478bd9Sstevel@tonic-gate/*
5757c478bd9Sstevel@tonic-gate * Functions to get at the window structure.
5767c478bd9Sstevel@tonic-gate */
5777c478bd9Sstevel@tonic-gate
5787c478bd9Sstevel@tonic-gate#define	getyx(win, y, x)	((y) = getcury(win), (x) = getcurx(win))
5797c478bd9Sstevel@tonic-gate#define	getbegyx(win, y, x)	((y) = getbegy(win), (x) = getbegx(win))
5807c478bd9Sstevel@tonic-gate#define	getmaxyx(win, y, x)	((y) = getmaxy(win), (x) = getmaxx(win))
5817c478bd9Sstevel@tonic-gate#define	getparyx(win, y, x)	((y) = getpary(win), (x) = getparx(win))
5827c478bd9Sstevel@tonic-gate
5837c478bd9Sstevel@tonic-gate#if	defined(CURS_PERFORMANCE) && !defined(__lint)
5847c478bd9Sstevel@tonic-gate#define	getcury(win)		((win)->_cury)
5857c478bd9Sstevel@tonic-gate#define	getcurx(win)		((win)->_curx)
5867c478bd9Sstevel@tonic-gate#define	getbegy(win)		((win)->_begy)
5877c478bd9Sstevel@tonic-gate#define	getbegx(win)		((win)->_begx)
5887c478bd9Sstevel@tonic-gate#define	getmaxy(win)		((win)->_maxy)
5897c478bd9Sstevel@tonic-gate#define	getmaxx(win)		((win)->_maxx)
5907c478bd9Sstevel@tonic-gate#define	getpary(win)		((win)->_pary)
5917c478bd9Sstevel@tonic-gate#define	getparx(win)		((win)->_parx)
5927c478bd9Sstevel@tonic-gate#define	getbkgd(win)		((win)->_bkgd)
5937c478bd9Sstevel@tonic-gate#define	getattrs(win)		((win)->_attrs)
5947c478bd9Sstevel@tonic-gate#else 	/* defined(CURS_PERFORMANCE) && !defined(__lint) */
5957c478bd9Sstevel@tonic-gate
5967c478bd9Sstevel@tonic-gate#ifdef __STDC__
5977c478bd9Sstevel@tonic-gateextern int getcury(WINDOW *);
5987c478bd9Sstevel@tonic-gateextern int getcurx(WINDOW *);
5997c478bd9Sstevel@tonic-gateextern int getbegy(WINDOW *);
6007c478bd9Sstevel@tonic-gateextern int getbegx(WINDOW *);
6017c478bd9Sstevel@tonic-gateextern int getmaxy(WINDOW *);
6027c478bd9Sstevel@tonic-gateextern int getmaxx(WINDOW *);
6037c478bd9Sstevel@tonic-gateextern int getpary(WINDOW *);
6047c478bd9Sstevel@tonic-gateextern int getparx(WINDOW *);
6057c478bd9Sstevel@tonic-gate
6067c478bd9Sstevel@tonic-gateextern chtype getbkgd(WINDOW *);
6077c478bd9Sstevel@tonic-gateextern chtype getattrs(WINDOW *);
6087c478bd9Sstevel@tonic-gate
6097c478bd9Sstevel@tonic-gate#else  /* __STDC__ */
6107c478bd9Sstevel@tonic-gateextern	int	getcury(), getcurx(), getbegy(), getbegx(),
6117c478bd9Sstevel@tonic-gate		getmaxy(), getmaxx(), getpary(), getparx();
6127c478bd9Sstevel@tonic-gate
6137c478bd9Sstevel@tonic-gateextern chtype	getbkgd(), getattrs();
6147c478bd9Sstevel@tonic-gate
6157c478bd9Sstevel@tonic-gate#endif  /* __STDC__ */
6167c478bd9Sstevel@tonic-gate#endif	/* defined(CURS_PERFORMANCE) && !defined(__lint) */
6177c478bd9Sstevel@tonic-gate
6187c478bd9Sstevel@tonic-gate#if	defined(NOMACROS) || defined(__lint)
6197c478bd9Sstevel@tonic-gate
6207c478bd9Sstevel@tonic-gate#ifdef __STDC__
6217c478bd9Sstevel@tonic-gate
6227c478bd9Sstevel@tonic-gateextern	SCREEN	*newterm(char *, FILE *, FILE *);
6237c478bd9Sstevel@tonic-gateextern	SCREEN  *set_term(SCREEN *);
6247c478bd9Sstevel@tonic-gate
6257c478bd9Sstevel@tonic-gateextern WINDOW *subpad(WINDOW *, int, int, int, int);
6267c478bd9Sstevel@tonic-gateextern WINDOW *subwin(WINDOW *, int, int, int, int);
6277c478bd9Sstevel@tonic-gate
6287c478bd9Sstevel@tonic-gateextern char *unctrl(int);
6297c478bd9Sstevel@tonic-gate
6307c478bd9Sstevel@tonic-gateextern chtype inch(void);
6317c478bd9Sstevel@tonic-gateextern chtype winch(WINDOW *);
6327c478bd9Sstevel@tonic-gateextern chtype mvinch(int, int);
6337c478bd9Sstevel@tonic-gateextern chtype mvwinch(WINDOW *, int, int);
6347c478bd9Sstevel@tonic-gate
6357c478bd9Sstevel@tonic-gateextern int addch(chtype);
6367c478bd9Sstevel@tonic-gateextern int addchnstr(chtype *, int);
6377c478bd9Sstevel@tonic-gateextern int addchstr(chtype *);
6387c478bd9Sstevel@tonic-gateextern int addnstr(char *, int);
6397c478bd9Sstevel@tonic-gateextern int addstr(char *);
6407c478bd9Sstevel@tonic-gateextern int attroff(chtype);
6417c478bd9Sstevel@tonic-gateextern int attron(chtype);
6427c478bd9Sstevel@tonic-gateextern int attrset(chtype);
6437c478bd9Sstevel@tonic-gateextern int beep(void);
6447c478bd9Sstevel@tonic-gateextern int bkgd(chtype);
6457c478bd9Sstevel@tonic-gateextern int border(chtype, chtype, chtype, chtype,
6467c478bd9Sstevel@tonic-gate		chtype, chtype, chtype, chtype);
6477c478bd9Sstevel@tonic-gateextern int box(WINDOW *, chtype, chtype);
6487c478bd9Sstevel@tonic-gateextern int clear(void);
6497c478bd9Sstevel@tonic-gateextern int clearok(WINDOW *, bool);
6507c478bd9Sstevel@tonic-gateextern int clrtobot(void);
6517c478bd9Sstevel@tonic-gateextern int clrtoeol(void);
6527c478bd9Sstevel@tonic-gateextern int crmode(void);
6537c478bd9Sstevel@tonic-gateextern int delch(void);
6547c478bd9Sstevel@tonic-gateextern int deleteln(void);
6557c478bd9Sstevel@tonic-gateextern int echo(void);
6567c478bd9Sstevel@tonic-gateextern int echochar(chtype);
6577c478bd9Sstevel@tonic-gateextern int erase(void);
6587c478bd9Sstevel@tonic-gateextern int fixterm(void);
6597c478bd9Sstevel@tonic-gateextern int flash(void);
6607c478bd9Sstevel@tonic-gateextern int garbagedlines(WINDOW *, int, int);
6617c478bd9Sstevel@tonic-gateextern int garbagedwin(WINDOW *);
6627c478bd9Sstevel@tonic-gateextern int getch(void);
6637c478bd9Sstevel@tonic-gateextern int getstr(char *);
6647c478bd9Sstevel@tonic-gateextern int gettmode(void);
6657c478bd9Sstevel@tonic-gateextern int halfdelay(int);
6667c478bd9Sstevel@tonic-gateextern int hline(chtype, int);
6677c478bd9Sstevel@tonic-gateextern int inchnstr(chtype *, int);
6687c478bd9Sstevel@tonic-gateextern int inchstr(chtype *);
6697c478bd9Sstevel@tonic-gateextern int innstr(char *, int);
6707c478bd9Sstevel@tonic-gateextern int insch(chtype);
6717c478bd9Sstevel@tonic-gateextern int insdelln(int);
6727c478bd9Sstevel@tonic-gateextern int insertln(void);
6737c478bd9Sstevel@tonic-gateextern int insnstr(char *, int);
6747c478bd9Sstevel@tonic-gateextern int insstr(char *);
6757c478bd9Sstevel@tonic-gateextern int instr(char *);
6767c478bd9Sstevel@tonic-gateextern int intrflush(WINDOW *, int);
6777c478bd9Sstevel@tonic-gateextern int is_linetouched(WINDOW *, int);
6787c478bd9Sstevel@tonic-gateextern int is_wintouched(WINDOW *);
6797c478bd9Sstevel@tonic-gateextern int leaveok(WINDOW *, bool);
6807c478bd9Sstevel@tonic-gateextern int meta(WINDOW *, int);
6817c478bd9Sstevel@tonic-gateextern int move(int, int);
6827c478bd9Sstevel@tonic-gateextern int mvaddch(int, int, chtype);
6837c478bd9Sstevel@tonic-gateextern int mvaddchnstr(int, int, chtype *, int);
6847c478bd9Sstevel@tonic-gateextern int mvaddchstr(int, int, chtype *);
6857c478bd9Sstevel@tonic-gateextern int mvaddnstr(int, int, char *, int);
6867c478bd9Sstevel@tonic-gateextern int mvaddstr(int, int, char *);
6877c478bd9Sstevel@tonic-gateextern int mvdelch(int, int);
6887c478bd9Sstevel@tonic-gateextern int mvgetch(int, int);
6897c478bd9Sstevel@tonic-gateextern int mvgetstr(int, int, char *);
6907c478bd9Sstevel@tonic-gateextern int mvhline(int, int, chtype, int);
6917c478bd9Sstevel@tonic-gateextern int mvinchnstr(int, int, chtype *, int);
6927c478bd9Sstevel@tonic-gateextern int mvinchstr(int, int, chtype *);
6937c478bd9Sstevel@tonic-gateextern int mvinnstr(int, int, char *, int);
6947c478bd9Sstevel@tonic-gateextern int mvinsch(int, int, chtype);
6957c478bd9Sstevel@tonic-gateextern int mvinsnstr(int, int, char *, int);
6967c478bd9Sstevel@tonic-gateextern int mvinsstr(int, int, char *);
6977c478bd9Sstevel@tonic-gateextern int mvinstr(int, int, char *);
6987c478bd9Sstevel@tonic-gateextern int mvvline(int, int, chtype, int);
6997c478bd9Sstevel@tonic-gateextern int mvwaddch(WINDOW *, int, int, chtype);
7007c478bd9Sstevel@tonic-gateextern int mvwaddchnstr(WINDOW *, int, int, chtype *, int);
7017c478bd9Sstevel@tonic-gateextern int mvwaddchstr(WINDOW *, int, int, chtype *);
7027c478bd9Sstevel@tonic-gateextern int mvwaddnstr(WINDOW *, int, int, char *, int);
7037c478bd9Sstevel@tonic-gateextern int mvwaddstr(WINDOW *, int, int, char *);
7047c478bd9Sstevel@tonic-gateextern int mvwdelch(WINDOW *, int, int);
7057c478bd9Sstevel@tonic-gateextern int mvwgetch(WINDOW *, int, int);
7067c478bd9Sstevel@tonic-gateextern int mvwgetstr(WINDOW *, int, int, char *);
7077c478bd9Sstevel@tonic-gateextern int mvwhline(WINDOW *, int, int, chtype, int);
7087c478bd9Sstevel@tonic-gateextern int mvwinchnstr(WINDOW *, int, int, chtype *, int);
7097c478bd9Sstevel@tonic-gateextern int mvwinchstr(WINDOW *, int, int, chtype *);
7107c478bd9Sstevel@tonic-gateextern int mvwinnstr(WINDOW *, int, int, char *, int);
7117c478bd9Sstevel@tonic-gateextern int mvwinsch(WINDOW *, int, int, chtype);
7127c478bd9Sstevel@tonic-gateextern int mvwinsnstr(WINDOW *, int, int, char *, int);
7137c478bd9Sstevel@tonic-gateextern int mvwinsstr(WINDOW *, int, int, char *);
7147c478bd9Sstevel@tonic-gateextern int mvwinstr(WINDOW *, int, int, char *);
7157c478bd9Sstevel@tonic-gateextern int mvwvline(WINDOW *, int, int, chtype, int);
7167c478bd9Sstevel@tonic-gateextern int nl(void);
7177c478bd9Sstevel@tonic-gateextern int nocrmode(void);
7187c478bd9Sstevel@tonic-gateextern int nodelay(WINDOW *, bool);
7197c478bd9Sstevel@tonic-gateextern int noecho(void);
7207c478bd9Sstevel@tonic-gateextern int nonl(void);
7217c478bd9Sstevel@tonic-gateextern int notimeout(WINDOW *, bool);
7227c478bd9Sstevel@tonic-gateextern int overlay(WINDOW *, WINDOW *);
7237c478bd9Sstevel@tonic-gateextern int overwrite(WINDOW *, WINDOW *);
7247c478bd9Sstevel@tonic-gateextern int redrawwin(WINDOW *);
7257c478bd9Sstevel@tonic-gateextern int refresh(void);
7267c478bd9Sstevel@tonic-gateextern int resetterm(void);
7277c478bd9Sstevel@tonic-gateextern int saveterm(void);
7287c478bd9Sstevel@tonic-gateextern int scr_init(char *);
7297c478bd9Sstevel@tonic-gateextern int scr_restore(char *);
7307c478bd9Sstevel@tonic-gateextern int scr_set(char *);
7317c478bd9Sstevel@tonic-gateextern int scrl(int);
7327c478bd9Sstevel@tonic-gateextern int scroll(WINDOW *);
7337c478bd9Sstevel@tonic-gateextern int scrollok(WINDOW *, bool);
7347c478bd9Sstevel@tonic-gateextern int setscrreg(int, int);
7357c478bd9Sstevel@tonic-gateextern int setterm(char *);
7367c478bd9Sstevel@tonic-gateextern int slk_init(int);
7377c478bd9Sstevel@tonic-gateextern int standend(void);
7387c478bd9Sstevel@tonic-gateextern int standout(void);
7397c478bd9Sstevel@tonic-gateextern int syncok(WINDOW *, bool);
7407c478bd9Sstevel@tonic-gateextern int touchline(WINDOW *, int, int);
7417c478bd9Sstevel@tonic-gateextern int touchwin(WINDOW *);
7427c478bd9Sstevel@tonic-gateextern int untouchwin(WINDOW *);
7437c478bd9Sstevel@tonic-gateextern int vline(chtype, int);
7447c478bd9Sstevel@tonic-gateextern int waddchstr(WINDOW *, chtype *);
7457c478bd9Sstevel@tonic-gateextern int waddstr(WINDOW *, char *);
7467c478bd9Sstevel@tonic-gateextern int wclear(WINDOW *);
7477c478bd9Sstevel@tonic-gateextern int wdeleteln(WINDOW *);
7487c478bd9Sstevel@tonic-gateextern int werase(WINDOW *);
7497c478bd9Sstevel@tonic-gateextern int winchstr(WINDOW *, chtype *);
7507c478bd9Sstevel@tonic-gateextern int winsertln(WINDOW *);
7517c478bd9Sstevel@tonic-gateextern int winsstr(WINDOW *, char *);
7527c478bd9Sstevel@tonic-gateextern int winstr(WINDOW *, char *);
7537c478bd9Sstevel@tonic-gateextern int wstandend(WINDOW *);
7547c478bd9Sstevel@tonic-gateextern int wstandout(WINDOW *);
7557c478bd9Sstevel@tonic-gate
7567c478bd9Sstevel@tonic-gateextern void bkgdset(chtype);
7577c478bd9Sstevel@tonic-gateextern void idcok(WINDOW *, bool);
7587c478bd9Sstevel@tonic-gateextern void noqiflush(void);
7597c478bd9Sstevel@tonic-gateextern void wbkgdset(WINDOW *, chtype);
7607c478bd9Sstevel@tonic-gateextern void qiflush(void);
7617c478bd9Sstevel@tonic-gateextern void timeout(int);
7627c478bd9Sstevel@tonic-gateextern void wtimeout(WINDOW *, int);
7637c478bd9Sstevel@tonic-gateextern void use_env(int);			/* int sb. char */
7647c478bd9Sstevel@tonic-gate
7657c478bd9Sstevel@tonic-gateextern chtype inwch(void);
7667c478bd9Sstevel@tonic-gateextern chtype mvinwch(int, int);
7677c478bd9Sstevel@tonic-gateextern chtype mvwinwch(WINDOW *, int, int);
7687c478bd9Sstevel@tonic-gate
7697c478bd9Sstevel@tonic-gateextern int addnwstr(wchar_t *, int);
7707c478bd9Sstevel@tonic-gateextern int addwch(chtype);
7717c478bd9Sstevel@tonic-gateextern int addwchnstr(chtype *, int);
7727c478bd9Sstevel@tonic-gateextern int addwchstr(chtype *);
7737c478bd9Sstevel@tonic-gateextern int addwstr(wchar_t *);
7747c478bd9Sstevel@tonic-gateextern int echowchar(chtype);
7757c478bd9Sstevel@tonic-gateextern int getnwstr(wchar_t *, int);
7767c478bd9Sstevel@tonic-gateextern int getwch(void);
7777c478bd9Sstevel@tonic-gateextern int getwstr(wchar_t *);
7787c478bd9Sstevel@tonic-gateextern int innwstr(wchar_t *, int);
7797c478bd9Sstevel@tonic-gateextern int insnwstr(wchar_t *, int);
7807c478bd9Sstevel@tonic-gateextern int inswch(chtype);
7817c478bd9Sstevel@tonic-gateextern int inswstr(wchar_t *);
7827c478bd9Sstevel@tonic-gateextern int inwchnstr(chtype *, int);
7837c478bd9Sstevel@tonic-gateextern int inwchstr(chtype *);
7847c478bd9Sstevel@tonic-gateextern int inwstr(wchar_t *);
7857c478bd9Sstevel@tonic-gateextern int mvaddnwstr(int, int, wchar_t *, int);
7867c478bd9Sstevel@tonic-gateextern int mvaddwch(int, int, chtype);
7877c478bd9Sstevel@tonic-gateextern int mvaddwchnstr(int, int, chtype *, int);
7887c478bd9Sstevel@tonic-gateextern int mvaddwchstr(int, int, chtype *);
7897c478bd9Sstevel@tonic-gateextern int mvaddwstr(int, int, wchar_t *);
7907c478bd9Sstevel@tonic-gateextern int mvgetnwstr(int, int, wchar_t *, int);
7917c478bd9Sstevel@tonic-gateextern int mvgetwch(int, int);
7927c478bd9Sstevel@tonic-gateextern int mvgetwstr(int, int, wchar_t *);
7937c478bd9Sstevel@tonic-gateextern int mvinnwstr(int, int, wchar_t *, int);
7947c478bd9Sstevel@tonic-gateextern int mvinsnwstr(int, int, wchar_t *, int);
7957c478bd9Sstevel@tonic-gateextern int mvinswch(int, int, chtype);
7967c478bd9Sstevel@tonic-gateextern int mvinswstr(int, int, wchar_t *);
7977c478bd9Sstevel@tonic-gateextern int mvinwchnstr(int, int, chtype *, int);
7987c478bd9Sstevel@tonic-gateextern int mvinwchstr(int, int, chtype *);
7997c478bd9Sstevel@tonic-gateextern int mvinwstr(int, int, wchar_t *);
8007c478bd9Sstevel@tonic-gateextern int mvwaddnwstr(WINDOW *, int, int, wchar_t *, int);
8017c478bd9Sstevel@tonic-gateextern int mvwaddwch(WINDOW *, int, int, chtype);
8027c478bd9Sstevel@tonic-gateextern int mvwaddwchnstr(WINDOW *, int, int, chtype *, int);
8037c478bd9Sstevel@tonic-gateextern int mvwaddwchstr(WINDOW *, int, int, chtype *);
8047c478bd9Sstevel@tonic-gateextern int mvwaddwstr(WINDOW *, int, int, wchar_t *);
8057c478bd9Sstevel@tonic-gateextern int mvwgetnwstr(WINDOW *, int, int, wchar_t *, int);
8067c478bd9Sstevel@tonic-gateextern int mvwgetwch(WINDOW *, int, int);
8077c478bd9Sstevel@tonic-gateextern int mvwgetwstr(WINDOW *, int, int, wchar_t *);
8087c478bd9Sstevel@tonic-gateextern int mvwinnwstr(WINDOW *, int, int, wchar_t *, int);
8097c478bd9Sstevel@tonic-gateextern int mvwinsnwstr(WINDOW *, int, int, wchar_t *, int);
8107c478bd9Sstevel@tonic-gateextern int mvwinswch(WINDOW *, int, int, chtype);
8117c478bd9Sstevel@tonic-gateextern int mvwinswstr(WINDOW *, int, int, wchar_t *);
8127c478bd9Sstevel@tonic-gateextern int mvwinwchnstr(WINDOW *, int, int, chtype *, int);
8137c478bd9Sstevel@tonic-gateextern int mvwinwchstr(WINDOW *, int, int, chtype *);
8147c478bd9Sstevel@tonic-gateextern int mvwinwstr(WINDOW *, int, int, wchar_t *);
8157c478bd9Sstevel@tonic-gateextern int waddwchstr(WINDOW *, chtype *);
8167c478bd9Sstevel@tonic-gateextern int waddwstr(WINDOW *, wchar_t *);
8177c478bd9Sstevel@tonic-gateextern int winswstr(WINDOW *, wchar_t *);
8187c478bd9Sstevel@tonic-gateextern int winwchstr(WINDOW *, chtype *);
8197c478bd9Sstevel@tonic-gate
8207c478bd9Sstevel@tonic-gate#else /* __STDC__ */
8217c478bd9Sstevel@tonic-gate
8227c478bd9Sstevel@tonic-gateextern	SCREEN	*newterm(),		/* termname, fout, fin */
8237c478bd9Sstevel@tonic-gateextern	SCREEN	*set_term();		/* screenptr */
8247c478bd9Sstevel@tonic-gate
8257c478bd9Sstevel@tonic-gateextern	WINDOW	*subpad(),
8267c478bd9Sstevel@tonic-gateextern	WINDOW	*subwin();
8277c478bd9Sstevel@tonic-gate
8287c478bd9Sstevel@tonic-gateextern	chtype	inch(), winch(), mvinch(), mvwinch();
8297c478bd9Sstevel@tonic-gate
8307c478bd9Sstevel@tonic-gateextern	char	*unctrl();
8317c478bd9Sstevel@tonic-gate
8327c478bd9Sstevel@tonic-gateextern	int	addch(), addchnstr(), addchstr(), addnstr(), addstr(),
8337c478bd9Sstevel@tonic-gate		attroff(), attron(), attrset(), beep(), bkgd(),
8347c478bd9Sstevel@tonic-gate		border(), box(), clear(), clearok(), clrtobot(), clrtoeol(),
8357c478bd9Sstevel@tonic-gate		crmode(), delch(), deleteln(), echo(), echochar(),
8367c478bd9Sstevel@tonic-gate		erase(),
8377c478bd9Sstevel@tonic-gate/* MORE */	fixterm(),
8387c478bd9Sstevel@tonic-gate		flash(), garbagedlines(), garbagedwin(),
8397c478bd9Sstevel@tonic-gate		getch(), getstr(), gettmode(), halfdelay(), hline(),
8407c478bd9Sstevel@tonic-gate		inchnstr(), inchstr(), innstr(), insch(),
8417c478bd9Sstevel@tonic-gate		insdelln(), insertln(), insnstr(), insstr(), instr(),
8427c478bd9Sstevel@tonic-gate		intrflush(),
8437c478bd9Sstevel@tonic-gate		is_linetouched(), is_wintouched(), leaveok(), meta(),
8447c478bd9Sstevel@tonic-gate		move(), mvaddch(), mvaddchnstr(), mvaddchstr(), mvaddnstr(),
8457c478bd9Sstevel@tonic-gate		mvaddstr(), mvdelch(), mvgetch(), mvgetstr(), mvhline(),
8467c478bd9Sstevel@tonic-gate		mvinchnstr(), mvinchstr(), mvinnstr(), mvinsch(), mvinsnstr(),
8477c478bd9Sstevel@tonic-gate		mvinsstr(), mvinstr(), mvvline(), mvwaddch(), mvwaddchnstr(),
8487c478bd9Sstevel@tonic-gate		mvwaddchstr(), mvwaddnstr(), mvwaddstr(), mvwdelch(),
8497c478bd9Sstevel@tonic-gate		mvwgetch(), mvwgetstr(), mvwhline(), mvwinchnstr(),
8507c478bd9Sstevel@tonic-gate		mvwinchstr(), mvwinnstr(), mvwinsch(), mvwinsnstr(),
8517c478bd9Sstevel@tonic-gate		mvwinsstr(), mvwinstr(), mvwvline(),
8527c478bd9Sstevel@tonic-gate		nl(), nocrmode(), nodelay(),
8537c478bd9Sstevel@tonic-gate		noecho(), nonl(), notimeout(),
8547c478bd9Sstevel@tonic-gate		overlay(), overwrite(), redrawwin(), refresh(),
8557c478bd9Sstevel@tonic-gate		resetterm(), saveterm(), scr_init(),
8567c478bd9Sstevel@tonic-gate		scr_restore(), scr_set(), scrl(),
8577c478bd9Sstevel@tonic-gate		scroll(), scrollok(), setscrreg(), setterm(),
8587c478bd9Sstevel@tonic-gate		slk_init(), standend(), standout(),
8597c478bd9Sstevel@tonic-gate		syncok(), touchline(), touchwin(), untouchwin(), vline(),
8607c478bd9Sstevel@tonic-gate		waddchstr(), waddstr(), wclear(),
8617c478bd9Sstevel@tonic-gate		wdeleteln(), werase(), winchstr(), winsertln(),
8627c478bd9Sstevel@tonic-gate		winsstr(), winstr(), wstandend(), wstandout();
8637c478bd9Sstevel@tonic-gate
8647c478bd9Sstevel@tonic-gateextern	void	bkgdset(), wbkgdset(), idcok(), noqiflush(),
8657c478bd9Sstevel@tonic-gate		qiflush(), timeout(), wtimeout(), use_env();
8667c478bd9Sstevel@tonic-gate
8677c478bd9Sstevel@tonic-gateextern unsigned long getmouse(), getbmap();
8687c478bd9Sstevel@tonic-gate
8697c478bd9Sstevel@tonic-gateextern chtype   inwch(), mvinwch(), mvwinwch();
8707c478bd9Sstevel@tonic-gate
8717c478bd9Sstevel@tonic-gateextern int	addnwstr(), addwch(), addwchnstr(), addwchstr(),
8727c478bd9Sstevel@tonic-gate		addwstr(), echowchar(), getnwstr(), getwch(),
8737c478bd9Sstevel@tonic-gate		getwstr(), innwstr(), insnwstr(), inswch(),
8747c478bd9Sstevel@tonic-gate		inswstr(), inwchnstr(), inwchstr(), inwstr(),
8757c478bd9Sstevel@tonic-gate		mvaddnwstr(), mvaddwch(), mvaddwchnstr(), mvaddwchstr(),
8767c478bd9Sstevel@tonic-gate		mvaddwstr(), mvgetnwstr(), mvgetwch(), mvgetwstr(),
8777c478bd9Sstevel@tonic-gate		mvinnwstr(), mvinsnwstr(), mvinswch(), mvinswstr(),
8787c478bd9Sstevel@tonic-gate		mvinwchnstr(), mvinwchstr(), mvinwstr(), mvwaddnwstr(),
8797c478bd9Sstevel@tonic-gate		mvwaddwch(), mvwaddwchnstr(), mvwaddwchstr(), mvwaddwstr(),
8807c478bd9Sstevel@tonic-gate		mvwgetnwstr(), mvwgetwch(), mvwgetwstr(), mvwinnwstr(),
8817c478bd9Sstevel@tonic-gate		mvwinsnwstr(), mvwinswch(), mvwinswstr(), mvwinwchnstr(),
8827c478bd9Sstevel@tonic-gate		mvwinwchstr(), mvwinwstr(), waddwchstr(), waddwstr(),
8837c478bd9Sstevel@tonic-gate		winswstr(), winwchstr();
8847c478bd9Sstevel@tonic-gate
8857c478bd9Sstevel@tonic-gate#endif /* __STDC__ */
8867c478bd9Sstevel@tonic-gate
8877c478bd9Sstevel@tonic-gate#else	/* NOMACROS || __lint */
8887c478bd9Sstevel@tonic-gate
8897c478bd9Sstevel@tonic-gate/*
8907c478bd9Sstevel@tonic-gate * The defines from here down to the #endif for NOMACROS
8917c478bd9Sstevel@tonic-gate * define	macros, which may be more efficient than their
8927c478bd9Sstevel@tonic-gate * function versions. The functions may be accessed by defining
8937c478bd9Sstevel@tonic-gate * NOMACROS in C code. This is useful for debugging purposes.
8947c478bd9Sstevel@tonic-gate */
8957c478bd9Sstevel@tonic-gate
8967c478bd9Sstevel@tonic-gate#include  <unctrl.h>
8977c478bd9Sstevel@tonic-gate
8987c478bd9Sstevel@tonic-gate/* pseudo functions for stdscr */
8997c478bd9Sstevel@tonic-gate#define	addch(ch)	waddch(stdscr, ch)
9007c478bd9Sstevel@tonic-gate#define	addnstr(s, n)	waddnstr(stdscr, s, n)
9017c478bd9Sstevel@tonic-gate#define	addstr(str)	waddstr(stdscr, str)
9027c478bd9Sstevel@tonic-gate#define	attroff(at)	wattroff(stdscr, at)
9037c478bd9Sstevel@tonic-gate#define	attron(at)	wattron(stdscr, at)
9047c478bd9Sstevel@tonic-gate#define	attrset(at)	wattrset(stdscr, at)
9057c478bd9Sstevel@tonic-gate#define	bkgd(c)		wbkgd(stdscr, c)
9067c478bd9Sstevel@tonic-gate#define	border(ls, rs, ts, bs, tl, tr, bl, br) \
9077c478bd9Sstevel@tonic-gate	wborder(stdscr, ls, rs, ts, bs, tl, tr, bl, br)
9087c478bd9Sstevel@tonic-gate#define	clear()		wclear(stdscr)
9097c478bd9Sstevel@tonic-gate#define	clrtobot()	wclrtobot(stdscr)
9107c478bd9Sstevel@tonic-gate#define	clrtoeol()	wclrtoeol(stdscr)
9117c478bd9Sstevel@tonic-gate#define	delch()		wdelch(stdscr)
9127c478bd9Sstevel@tonic-gate#define	deleteln()	wdeleteln(stdscr)
9137c478bd9Sstevel@tonic-gate#define	echochar(ch)	wechochar(stdscr, ch)
9147c478bd9Sstevel@tonic-gate#define	erase()		werase(stdscr)
9157c478bd9Sstevel@tonic-gate#define	getch()		wgetch(stdscr)
9167c478bd9Sstevel@tonic-gate#define	getstr(str)	wgetstr(stdscr, str)
9177c478bd9Sstevel@tonic-gate#define	inch()		winch(stdscr)
9187c478bd9Sstevel@tonic-gate#define	insch(c)	winsch(stdscr, c)
9197c478bd9Sstevel@tonic-gate#define	insdelln(id)	winsdelln(stdscr, id)
9207c478bd9Sstevel@tonic-gate#define	insertln()	winsertln(stdscr)
9217c478bd9Sstevel@tonic-gate#define	insnstr(s, n)	winsnstr(stdscr, s, n)
9227c478bd9Sstevel@tonic-gate#define	insstr(s)	winsstr(stdscr, s)
9237c478bd9Sstevel@tonic-gate#define	move(y, x)	wmove(stdscr, y, x)
9247c478bd9Sstevel@tonic-gate#define	refresh()	wrefresh(stdscr)
9257c478bd9Sstevel@tonic-gate#define	scrl(n)		wscrl(stdscr, n)
9267c478bd9Sstevel@tonic-gate#define	setscrreg(t, b)	wsetscrreg(stdscr, t, b)
9277c478bd9Sstevel@tonic-gate#define	standend()	wstandend(stdscr)
9287c478bd9Sstevel@tonic-gate#define	standout()	wstandout(stdscr)
9297c478bd9Sstevel@tonic-gate#define	timeout(tm)	wtimeout(stdscr, tm)
9307c478bd9Sstevel@tonic-gate#define	hline(c, num)	whline(stdscr, c, num)
9317c478bd9Sstevel@tonic-gate#define	vline(c, num)	wvline(stdscr, c, num)
9327c478bd9Sstevel@tonic-gate#define	addchstr(str)	waddchstr(stdscr, str)
9337c478bd9Sstevel@tonic-gate#define	addchnstr(str, n)	waddchnstr(stdscr, str, n)
9347c478bd9Sstevel@tonic-gate#define	instr(str)	winstr(stdscr, (str))
9357c478bd9Sstevel@tonic-gate#define	innstr(str, n)	winnstr(stdscr, (str), (n))
9367c478bd9Sstevel@tonic-gate#define	inchstr(str)	winchstr(stdscr, str)
9377c478bd9Sstevel@tonic-gate#define	inchnstr(str, n)	winchnstr(stdscr, str, n)
9387c478bd9Sstevel@tonic-gate#define	bkgdset(c)	wbkgdset(stdscr, c)
9397c478bd9Sstevel@tonic-gate
9407c478bd9Sstevel@tonic-gate#define	addnwstr(ws, n)	waddnwstr(stdscr, ws, n)
9417c478bd9Sstevel@tonic-gate#define	addwch(ch)	waddwch(stdscr, ch)
9427c478bd9Sstevel@tonic-gate#define	addwchnstr(str, n)	waddwchnstr(stdscr, str, n)
9437c478bd9Sstevel@tonic-gate#define	addwchstr(str)	waddwchstr(stdscr, str)
9447c478bd9Sstevel@tonic-gate#define	addwstr(ws)	waddwstr(stdscr, ws)
9457c478bd9Sstevel@tonic-gate#define	echowchar(ch)	wechowchar(stdscr, ch)
9467c478bd9Sstevel@tonic-gate#define	getnwstr(ws, n)	wgetnwstr(stdscr, ws, n)
9477c478bd9Sstevel@tonic-gate#define	getwch()	wgetwch(stdscr)
9487c478bd9Sstevel@tonic-gate#define	getwstr(ws)	wgetwstr(stdscr, ws)
9497c478bd9Sstevel@tonic-gate#define	innwstr(ws, n)	winnwstr(stdscr, ws, n)
9507c478bd9Sstevel@tonic-gate#define	insnwstr(ws, n)	winsnwstr(stdscr, ws, n)
9517c478bd9Sstevel@tonic-gate#define	inswch(c)	winswch(stdscr, c)
9527c478bd9Sstevel@tonic-gate#define	inswstr(ws)	winswstr(stdscr, ws)
9537c478bd9Sstevel@tonic-gate#define	inwch()	winwch(stdscr)
9547c478bd9Sstevel@tonic-gate#define	inwchnstr(str, n)	winwchnstr(stdscr, str, n)
9557c478bd9Sstevel@tonic-gate#define	inwchstr(str)	winwchstr(stdscr, str)
9567c478bd9Sstevel@tonic-gate#define	inwstr(ws)	winwstr(stdscr, ws)
9577c478bd9Sstevel@tonic-gate
9587c478bd9Sstevel@tonic-gate#define	adjcurspos()	wadjcurspos(stdscr)
9597c478bd9Sstevel@tonic-gate#define	movenextch()	wmovenextch(stdscr)
9607c478bd9Sstevel@tonic-gate#define	moveprevch()	wmoveprevch(stdscr)
9617c478bd9Sstevel@tonic-gate
9627c478bd9Sstevel@tonic-gate/* functions to define	environment flags of a window */
9637c478bd9Sstevel@tonic-gate#ifdef	CURS_PERFORMANCE
9647c478bd9Sstevel@tonic-gate#define	wbkgdset(win, c) \
9657c478bd9Sstevel@tonic-gate	(((win)->_attrs = (((win)->_attrs & ~((win)->_bkgd & A_ATTRIBUTES)) | \
9667c478bd9Sstevel@tonic-gate	    (c & A_ATTRIBUTES))), ((win)->_bkgd = (c)))
9677c478bd9Sstevel@tonic-gate#define	syncok(win, bf)		((win)->_parent ? (win)->_sync = (bf) : ERR)
9687c478bd9Sstevel@tonic-gate#define	notimeout(win, bf) \
9697c478bd9Sstevel@tonic-gate	(((win)->_notimeout = ((bf) ? TRUE : FALSE)), OK)
9707c478bd9Sstevel@tonic-gate#define	clearok(win, bf)	(((win)->_clear = (bf)), OK)
9717c478bd9Sstevel@tonic-gate#define	leaveok(win, bf)	(((win)->_leave = (bf)), OK)
9727c478bd9Sstevel@tonic-gate#define	scrollok(win, bf)	(((win)->_scroll = ((bf) ? TRUE : FALSE)), OK)
9737c478bd9Sstevel@tonic-gate#define	idcok(win, bf)		((win)->_use_idc = ((bf) ? TRUE : FALSE))
9747c478bd9Sstevel@tonic-gate#define	nodelay(win, bf)	(((win)->_delay = (bf) ? 0 : -1), OK)
9757c478bd9Sstevel@tonic-gate#define	is_wintouched(win)	((win)->_flags & _WINCHANGED)
9767c478bd9Sstevel@tonic-gate#define	is_linetouched(win, line) \
9777c478bd9Sstevel@tonic-gate	((((line) >= (win)->_maxy) || ((line) < 0)) ? ERR : \
9787c478bd9Sstevel@tonic-gate	    (((win)->_firstch[(line)] == _INFINITY) ? FALSE : TRUE))
9797c478bd9Sstevel@tonic-gate
9807c478bd9Sstevel@tonic-gate#define	subwin(win, nl, nc, by, bx) \
9817c478bd9Sstevel@tonic-gate	derwin((win), (nl), (nc), (by-win->_begy), (bx-win->_begx))
9827c478bd9Sstevel@tonic-gate#define	touchwin(win)		wtouchln((win), 0, (win)->_maxy, TRUE)
9837c478bd9Sstevel@tonic-gate#define	redrawwin(win)		wredrawln((win), 0, (win)->_maxy)
9847c478bd9Sstevel@tonic-gate#define	winchstr(win, str) \
9857c478bd9Sstevel@tonic-gate	winchnstr((win), str, ((win)->_maxx - (win)->_curx))
9867c478bd9Sstevel@tonic-gate#define	winstr(win, str) \
9877c478bd9Sstevel@tonic-gate	winnstr((win), str, ((win)->_maxx - (win)->_curx))
9887c478bd9Sstevel@tonic-gate#define	untouchwin(win)		wtouchln((win), 0, ((win)->_maxy), FALSE)
9897c478bd9Sstevel@tonic-gate#define	winch(win)		((win)->_y[(win)->_cury][(win)->_curx])
9907c478bd9Sstevel@tonic-gate
9917c478bd9Sstevel@tonic-gate#define	wtimeout(win, tm)	((win)->_delay = (tm))
9927c478bd9Sstevel@tonic-gate#define	use_env(bf)		(_use_env = (bf))
9937c478bd9Sstevel@tonic-gate
9947c478bd9Sstevel@tonic-gate#else	/* CURS_PERFORMANCE */
9957c478bd9Sstevel@tonic-gate
9967c478bd9Sstevel@tonic-gate#ifdef __STDC__
9977c478bd9Sstevel@tonic-gate
9987c478bd9Sstevel@tonic-gateextern void wbkgdset(WINDOW *, chtype);
9997c478bd9Sstevel@tonic-gateextern void idcok(WINDOW *, bool);
10007c478bd9Sstevel@tonic-gateextern void wtimeout(WINDOW *, int);
10017c478bd9Sstevel@tonic-gateextern void use_env(int);			 /* int sb. char */
10027c478bd9Sstevel@tonic-gate
10037c478bd9Sstevel@tonic-gateextern int syncok(WINDOW *, bool);
10047c478bd9Sstevel@tonic-gateextern int notimeout(WINDOW *, bool);
10057c478bd9Sstevel@tonic-gateextern int clearok(WINDOW *, bool);
10067c478bd9Sstevel@tonic-gateextern int leaveok(WINDOW *, bool);
10077c478bd9Sstevel@tonic-gateextern int scrollok(WINDOW *, bool);
10087c478bd9Sstevel@tonic-gateextern int nodelay(WINDOW *, bool);
10097c478bd9Sstevel@tonic-gateextern int is_linetouched(WINDOW *, int);
10107c478bd9Sstevel@tonic-gateextern int is_wintouched(WINDOW *);
10117c478bd9Sstevel@tonic-gateextern int touchwin(WINDOW *);
10127c478bd9Sstevel@tonic-gateextern int redrawwin(WINDOW *);
10137c478bd9Sstevel@tonic-gateextern int winchstr(WINDOW *, chtype *);
10147c478bd9Sstevel@tonic-gateextern int winstr(WINDOW *, char *);
10157c478bd9Sstevel@tonic-gateextern int untouchwin(WINDOW *);
10167c478bd9Sstevel@tonic-gate
10177c478bd9Sstevel@tonic-gateextern chtype winch(WINDOW *);
10187c478bd9Sstevel@tonic-gate
10197c478bd9Sstevel@tonic-gateextern WINDOW *subwin(WINDOW *, int, int, int, int);
10207c478bd9Sstevel@tonic-gate
10217c478bd9Sstevel@tonic-gate#else  /* __STDC__ */
10227c478bd9Sstevel@tonic-gate
10237c478bd9Sstevel@tonic-gateextern	void	wbkgdset(), idcok(), wtimeout(), use_env();
10247c478bd9Sstevel@tonic-gate
10257c478bd9Sstevel@tonic-gateextern	int	syncok(), notimeout(), clearok(), leaveok(),
10267c478bd9Sstevel@tonic-gate		scrollok(), nodelay(), is_linetouched(), is_wintouched(),
10277c478bd9Sstevel@tonic-gate		touchwin(), redrawwin(), winchstr(), winstr(),
10287c478bd9Sstevel@tonic-gate		untouchwin();
10297c478bd9Sstevel@tonic-gate
10307c478bd9Sstevel@tonic-gateextern  chtype  winch();
10317c478bd9Sstevel@tonic-gate
10327c478bd9Sstevel@tonic-gateextern WINDOW *subwin();
10337c478bd9Sstevel@tonic-gate
10347c478bd9Sstevel@tonic-gate#endif /* __STDC__ */
10357c478bd9Sstevel@tonic-gate
10367c478bd9Sstevel@tonic-gate#endif	/* CURS_PERFORMANCE */
10377c478bd9Sstevel@tonic-gate
10387c478bd9Sstevel@tonic-gate/* functions for move and update */
10397c478bd9Sstevel@tonic-gate#define	mvaddch(y, x, ch) \
10407c478bd9Sstevel@tonic-gate	mvwaddch(stdscr, y, x, ch)
10417c478bd9Sstevel@tonic-gate#define	mvaddnstr(y, x, s, n) \
10427c478bd9Sstevel@tonic-gate	mvwaddnstr(stdscr, y, x, s, n)
10437c478bd9Sstevel@tonic-gate#define	mvaddstr(y, x, str) \
10447c478bd9Sstevel@tonic-gate	mvwaddstr(stdscr, y, x, str)
10457c478bd9Sstevel@tonic-gate#define	mvdelch(y, x) \
10467c478bd9Sstevel@tonic-gate	mvwdelch(stdscr, y, x)
10477c478bd9Sstevel@tonic-gate#define	mvgetch(y, x) \
10487c478bd9Sstevel@tonic-gate	mvwgetch(stdscr, y, x)
10497c478bd9Sstevel@tonic-gate#define	mvgetstr(y, x, str) \
10507c478bd9Sstevel@tonic-gate	mvwgetstr(stdscr, y, x, str)
10517c478bd9Sstevel@tonic-gate#define	mvinch(y, x) \
10527c478bd9Sstevel@tonic-gate	mvwinch(stdscr, y, x)
10537c478bd9Sstevel@tonic-gate#define	mvinsch(y, x, c) \
10547c478bd9Sstevel@tonic-gate	mvwinsch(stdscr, y, x, c)
10557c478bd9Sstevel@tonic-gate#define	mvinsnstr(y, x, s, n) \
10567c478bd9Sstevel@tonic-gate	mvwinsnstr(stdscr, y, x, s, n)
10577c478bd9Sstevel@tonic-gate#define	mvinsstr(y, x, s) \
10587c478bd9Sstevel@tonic-gate	mvwinsstr(stdscr, y, x, s)
10597c478bd9Sstevel@tonic-gate#define	mvaddchstr(y, x, str) \
10607c478bd9Sstevel@tonic-gate	mvwaddchstr(stdscr, y, x, str)
10617c478bd9Sstevel@tonic-gate#define	mvaddchnstr(y, x, str, n) \
10627c478bd9Sstevel@tonic-gate	mvwaddchnstr(stdscr, y, x, str, n)
10637c478bd9Sstevel@tonic-gate#define	mvinstr(y, x, str) \
10647c478bd9Sstevel@tonic-gate	mvwinstr(stdscr, y, x, (str))
10657c478bd9Sstevel@tonic-gate#define	mvinnstr(y, x, str, n) \
10667c478bd9Sstevel@tonic-gate	mvwinnstr(stdscr, y, x, (str), (n))
10677c478bd9Sstevel@tonic-gate#define	mvinchstr(y, x, str) \
10687c478bd9Sstevel@tonic-gate	mvwinchstr(stdscr, y, x, str)
10697c478bd9Sstevel@tonic-gate#define	mvinchnstr(y, x, str, n) \
10707c478bd9Sstevel@tonic-gate	mvwinchnstr(stdscr, y, x, str, n)
10717c478bd9Sstevel@tonic-gate#define	mvhline(y, x, c, num) \
10727c478bd9Sstevel@tonic-gate	mvwhline(stdscr, y, x, c, num)
10737c478bd9Sstevel@tonic-gate#define	mvvline(y, x, c, num) \
10747c478bd9Sstevel@tonic-gate	mvwvline(stdscr, y, x, c, num)
10757c478bd9Sstevel@tonic-gate
10767c478bd9Sstevel@tonic-gate#define	mvaddnwstr(y, x, ws, n) \
10777c478bd9Sstevel@tonic-gate	mvwaddnwstr(stdscr, y, x, ws, n)
10787c478bd9Sstevel@tonic-gate#define	mvaddwch(y, x, ch) \
10797c478bd9Sstevel@tonic-gate	mvwaddwch(stdscr, y, x, ch)
10807c478bd9Sstevel@tonic-gate#define	mvaddwchnstr(y, x, str, n) \
10817c478bd9Sstevel@tonic-gate	mvwaddwchnstr(stdscr, y, x, str, n)
10827c478bd9Sstevel@tonic-gate#define	mvaddwchstr(y, x, str) \
10837c478bd9Sstevel@tonic-gate	mvwaddwchstr(stdscr, y, x, str)
10847c478bd9Sstevel@tonic-gate#define	mvaddwstr(y, x, ws) \
10857c478bd9Sstevel@tonic-gate	mvwaddwstr(stdscr, y, x, ws)
10867c478bd9Sstevel@tonic-gate#define	mvgetnwstr(y, x, ws, n) \
10877c478bd9Sstevel@tonic-gate	mvwgetnwstr(stdscr, y, x, ws, n)
10887c478bd9Sstevel@tonic-gate#define	mvgetwch(y, x) \
10897c478bd9Sstevel@tonic-gate	mvwgetwch(stdscr, y, x)
10907c478bd9Sstevel@tonic-gate#define	mvgetwstr(y, x, ws) \
10917c478bd9Sstevel@tonic-gate	mvwgetwstr(stdscr, y, x, ws)
10927c478bd9Sstevel@tonic-gate#define	mvinnwstr(y, x, ws, n) \
10937c478bd9Sstevel@tonic-gate	mvwinnwstr(stdscr, y, x, ws, n)
10947c478bd9Sstevel@tonic-gate#define	mvinsnwstr(y, x, ws, n) \
10957c478bd9Sstevel@tonic-gate	mvwinsnwstr(stdscr, y, x, ws, n)
10967c478bd9Sstevel@tonic-gate#define	mvinswch(y, x, c) \
10977c478bd9Sstevel@tonic-gate	mvwinswch(stdscr, y, x, c)
10987c478bd9Sstevel@tonic-gate#define	mvinswstr(y, x, ws) \
10997c478bd9Sstevel@tonic-gate	mvwinswstr(stdscr, y, x, ws)
11007c478bd9Sstevel@tonic-gate#define	mvinwch(y, x) \
11017c478bd9Sstevel@tonic-gate	mvwinwch(stdscr, y, x)
11027c478bd9Sstevel@tonic-gate#define	mvinwchnstr(y, x, str, n) \
11037c478bd9Sstevel@tonic-gate	mvwinwchnstr(stdscr, y, x, str, n)
11047c478bd9Sstevel@tonic-gate#define	mvinwchstr(y, x, str) \
11057c478bd9Sstevel@tonic-gate	mvwinwchstr(stdscr, y, x, str)
11067c478bd9Sstevel@tonic-gate#define	mvinwstr(y, x, ws) \
11077c478bd9Sstevel@tonic-gate	mvwinwstr(stdscr, y, x, ws)
11087c478bd9Sstevel@tonic-gate
11097c478bd9Sstevel@tonic-gate#define	mvwaddch(win, y, x, ch) \
11107c478bd9Sstevel@tonic-gate	(wmove(win, y, x) == ERR ? ERR : waddch(win, ch))
11117c478bd9Sstevel@tonic-gate#define	mvwaddnstr(win, y, x, s, n) \
11127c478bd9Sstevel@tonic-gate	(wmove(win, y, x) == ERR ? ERR : waddnstr(win, s, n))
11137c478bd9Sstevel@tonic-gate#define	mvwaddstr(win, y, x, str) \
11147c478bd9Sstevel@tonic-gate	(wmove(win, y, x) == ERR ? ERR : waddstr(win, str))
11157c478bd9Sstevel@tonic-gate#define	mvwdelch(win, y, x) \
11167c478bd9Sstevel@tonic-gate	(wmove(win, y, x) == ERR ? ERR : wdelch(win))
11177c478bd9Sstevel@tonic-gate#define	mvwgetch(win, y, x) \
11187c478bd9Sstevel@tonic-gate	(wmove(win, y, x) == ERR ? ERR : wgetch(win))
11197c478bd9Sstevel@tonic-gate#define	mvwgetstr(win, y, x, str) \
11207c478bd9Sstevel@tonic-gate	(wmove(win, y, x) == ERR ? ERR : wgetstr(win, str))
11217c478bd9Sstevel@tonic-gate#define	mvwinch(win, y, x) \
11227c478bd9Sstevel@tonic-gate	(wmove(win, y, x) == ERR ? (chtype)ERR : winch(win))
11237c478bd9Sstevel@tonic-gate#define	mvwinsch(win, y, x, c) \
11247c478bd9Sstevel@tonic-gate	(wmove(win, y, x) == ERR ? ERR : winsch(win, c))
11257c478bd9Sstevel@tonic-gate#define	mvwinsnstr(win, y, x, s, n) \
11267c478bd9Sstevel@tonic-gate	(wmove(win, y, x) == ERR ? ERR : winsnstr(win, s, n))
11277c478bd9Sstevel@tonic-gate#define	mvwinsstr(win, y, x, s) \
11287c478bd9Sstevel@tonic-gate	(wmove(win, y, x) == ERR ? ERR : winsstr(win, s))
11297c478bd9Sstevel@tonic-gate#define	mvwhline(win, y, x, c, num) \
11307c478bd9Sstevel@tonic-gate	(wmove(win, y, x) == ERR ? ERR : whline(win, c, num))
11317c478bd9Sstevel@tonic-gate#define	mvwvline(win, y, x, c, num) \
11327c478bd9Sstevel@tonic-gate	(wmove(win, y, x) == ERR ? ERR : wvline(win, c, num))
11337c478bd9Sstevel@tonic-gate#define	mvwaddchstr(win, y, x, str) \
11347c478bd9Sstevel@tonic-gate	(wmove(win, y, x) == ERR ? ERR : waddchstr(win, str))
11357c478bd9Sstevel@tonic-gate#define	mvwaddchnstr(win, y, x, str, n) \
11367c478bd9Sstevel@tonic-gate	(wmove(win, y, x) == ERR ? ERR : waddchnstr(win, str, n))
11377c478bd9Sstevel@tonic-gate#define	mvwinstr(win, y, x, str) \
11387c478bd9Sstevel@tonic-gate	(wmove(win, y, x) == ERR ? ERR : winstr(win, str))
11397c478bd9Sstevel@tonic-gate#define	mvwinnstr(win, y, x, str, n) \
11407c478bd9Sstevel@tonic-gate	(wmove(win, y, x) == ERR ? ERR : winnstr(win, str, n))
11417c478bd9Sstevel@tonic-gate#define	mvwinchstr(win, y, x, str) \
11427c478bd9Sstevel@tonic-gate	(wmove(win, y, x) == ERR ? ERR : winchstr(win, str))
11437c478bd9Sstevel@tonic-gate#define	mvwinchnstr(win, y, x, str, n) \
11447c478bd9Sstevel@tonic-gate	(wmove(win, y, x) == ERR ? ERR : winchnstr(win, str, n))
11457c478bd9Sstevel@tonic-gate#define	mvwaddnwstr(win, y, x, ws, n) \
11467c478bd9Sstevel@tonic-gate	(wmove(win, y, x) == ERR ? ERR : waddnwstr(win, ws, n))
11477c478bd9Sstevel@tonic-gate#define	mvwaddwch(win, y, x, ch) \
11487c478bd9Sstevel@tonic-gate	(wmove(win, y, x) == ERR ? ERR : waddwch(win, ch))
11497c478bd9Sstevel@tonic-gate#define	mvwaddwchnstr(win, y, x, str, n) \
11507c478bd9Sstevel@tonic-gate	(wmove(win, y, x) == ERR ? ERR : waddwchnstr(win, str, n))
11517c478bd9Sstevel@tonic-gate#define	mvwaddwchstr(win, y, x, str) \
11527c478bd9Sstevel@tonic-gate	(wmove(win, y, x) == ERR ? ERR : waddwchstr(win, str))
11537c478bd9Sstevel@tonic-gate#define	mvwaddwstr(win, y, x, ws) \
11547c478bd9Sstevel@tonic-gate	(wmove(win, y, x) == ERR ? ERR : waddwstr(win, ws))
11557c478bd9Sstevel@tonic-gate#define	mvwgetnwstr(win, y, x, ws, n) \
11567c478bd9Sstevel@tonic-gate	(wmove(win, y, x) == ERR ? ERR : wgetnwstr(win, ws, n))
11577c478bd9Sstevel@tonic-gate#define	mvwgetwch(win, y, x) \
11587c478bd9Sstevel@tonic-gate	(wmove(win, y, x) == ERR ? ERR : wgetwch(win))
11597c478bd9Sstevel@tonic-gate#define	mvwgetwstr(win, y, x, ws) \
11607c478bd9Sstevel@tonic-gate	(wmove(win, y, x) == ERR ? ERR : wgetwstr(win, ws))
11617c478bd9Sstevel@tonic-gate#define	mvwinnwstr(win, y, x, ws, n) \
11627c478bd9Sstevel@tonic-gate	(wmove(win, y, x) == ERR ? ERR : winnwstr(win, ws, n))
11637c478bd9Sstevel@tonic-gate#define	mvwinsnwstr(win, y, x, ws, n) \
11647c478bd9Sstevel@tonic-gate	(wmove(win, y, x) == ERR ? ERR : winsnwstr(win, ws, n))
11657c478bd9Sstevel@tonic-gate#define	mvwinswch(win, y, x, c) \
11667c478bd9Sstevel@tonic-gate	(wmove(win, y, x) == ERR ? ERR : winswch(win, c))
11677c478bd9Sstevel@tonic-gate#define	mvwinswstr(win, y, x, ws) \
11687c478bd9Sstevel@tonic-gate	(wmove(win, y, x) == ERR ? ERR : winswstr(win, ws))
11697c478bd9Sstevel@tonic-gate#define	mvwinwch(win, y, x) \
11707c478bd9Sstevel@tonic-gate	(wmove(win, y, x) == ERR ?(chtype) ERR : winwch(win))
11717c478bd9Sstevel@tonic-gate#define	mvwinwchnstr(win, y, x, str, n) \
11727c478bd9Sstevel@tonic-gate	(wmove(win, y, x) == ERR ? ERR : winwchnstr(win, str, n))
11737c478bd9Sstevel@tonic-gate#define	mvwinwchstr(win, y, x, str) \
11747c478bd9Sstevel@tonic-gate	(wmove(win, y, x) == ERR ? ERR : winwchstr(win, str))
11757c478bd9Sstevel@tonic-gate#define	mvwinwstr(win, y, x, ws) \
11767c478bd9Sstevel@tonic-gate	(wmove(win, y, x) == ERR ? ERR : winwstr(win, ws))
11777c478bd9Sstevel@tonic-gate
11787c478bd9Sstevel@tonic-gate#define	waddwchstr(win, str)	waddwchnstr(win, str, -1)
11797c478bd9Sstevel@tonic-gate#define	winwchstr(win, str)	winwchnstr(win, str, -1)
11807c478bd9Sstevel@tonic-gate#define	waddwstr(win, ws)	waddnwstr(win, ws, -1)
11817c478bd9Sstevel@tonic-gate#define	winswstr(win, ws)	winsnwstr(win, ws, -1)
11827c478bd9Sstevel@tonic-gate
11837c478bd9Sstevel@tonic-gate#ifdef CURS_MACROS
11847c478bd9Sstevel@tonic-gate#define	overlay(src, dst)	_overlap((src), (dst), TRUE)
11857c478bd9Sstevel@tonic-gate#define	overwrite(src, dst)	_overlap((src), (dst), FALSE)
11867c478bd9Sstevel@tonic-gate#define	wdeleteln(win)		winsdelln((win), -1)
11877c478bd9Sstevel@tonic-gate#define	winsertln(win)		winsdelln((win), 1)
11887c478bd9Sstevel@tonic-gate#define	wstandend(win)		wattrset((win), A_NORMAL)
11897c478bd9Sstevel@tonic-gate#define	wstandout(win)		wattron((win), A_STANDOUT)
11907c478bd9Sstevel@tonic-gate#define	beep()			_ring(TRUE)
11917c478bd9Sstevel@tonic-gate#define	flash()			_ring(FALSE)
11927c478bd9Sstevel@tonic-gate#define	scroll(win)		wscrl((win), 1)
11937c478bd9Sstevel@tonic-gate#define	slk_init(f)		slk_start(((f == 0) ? 3 : 2), NULL)
11947c478bd9Sstevel@tonic-gate#define	scr_init(file)		_scr_all(file, 0)
11957c478bd9Sstevel@tonic-gate#define	scr_restore(file)	_scr_all(file, 1)
11967c478bd9Sstevel@tonic-gate#define	scr_set(file)		_scr_all(file, 2)
11977c478bd9Sstevel@tonic-gate#define	subpad(win, nl, nc, by, bx) derwin((win), (nl), (nc), (by), (bx))
11987c478bd9Sstevel@tonic-gate#define	box(win, v, h)		wborder((win), (v), (v), (h), (h), 0, 0, 0, 0)
11997c478bd9Sstevel@tonic-gate#define	newterm(type, fout, fin) newscreen((type), 0, 0, 0, (fout), (fin))
12007c478bd9Sstevel@tonic-gate#define	touchline(win, y, n)	wtouchln((win), (y), (n), TRUE)
12017c478bd9Sstevel@tonic-gate
12027c478bd9Sstevel@tonic-gate#define	waddstr(win, str)	waddnstr((win), (str), -1)
12037c478bd9Sstevel@tonic-gate#define	werase(win)		(wmove((win), 0, 0), wclrtobot(win))
12047c478bd9Sstevel@tonic-gate#define	wclear(win)		(clearok((win), TRUE), werase(win))
12057c478bd9Sstevel@tonic-gate#define	intrflush(win, flag)	_setqiflush(flag)
12067c478bd9Sstevel@tonic-gate#define	meta(win, flag)		_meta(flag)
12077c478bd9Sstevel@tonic-gate
12087c478bd9Sstevel@tonic-gate#define	setterm(name)		setupterm((name), 1, (char *)NULL)
12097c478bd9Sstevel@tonic-gate#define	gettmode()		(OK)
12107c478bd9Sstevel@tonic-gate#define	halfdelay(tens)		ttimeout((tens)*100)
12117c478bd9Sstevel@tonic-gate
12127c478bd9Sstevel@tonic-gate#define	echo()			_setecho(TRUE)
12137c478bd9Sstevel@tonic-gate#define	noecho()		_setecho(FALSE)
12147c478bd9Sstevel@tonic-gate#define	nl()			_setnonl(FALSE)
12157c478bd9Sstevel@tonic-gate#define	nonl()			_setnonl(TRUE)
12167c478bd9Sstevel@tonic-gate
12177c478bd9Sstevel@tonic-gate#else /* CURS_MACROS */
12187c478bd9Sstevel@tonic-gate
12197c478bd9Sstevel@tonic-gate#ifdef __STDC__
12207c478bd9Sstevel@tonic-gate
12217c478bd9Sstevel@tonic-gateextern int overlay(WINDOW *, WINDOW *);
12227c478bd9Sstevel@tonic-gateextern int overwrite(WINDOW *, WINDOW *);
12237c478bd9Sstevel@tonic-gateextern int wdeleteln(WINDOW *);
12247c478bd9Sstevel@tonic-gateextern int winsertln(WINDOW *);
12257c478bd9Sstevel@tonic-gateextern int wstandend(WINDOW *);
12267c478bd9Sstevel@tonic-gateextern int wstandout(WINDOW *);
12277c478bd9Sstevel@tonic-gateextern int beep(void);
12287c478bd9Sstevel@tonic-gateextern int flash(void);
12297c478bd9Sstevel@tonic-gateextern int scroll(WINDOW *);
12307c478bd9Sstevel@tonic-gateextern int slk_init(int);
12317c478bd9Sstevel@tonic-gateextern int scr_init(char *);
12327c478bd9Sstevel@tonic-gateextern int scr_restore(char *);
12337c478bd9Sstevel@tonic-gateextern int box(WINDOW *, chtype, chtype);
12347c478bd9Sstevel@tonic-gateextern int touchline(WINDOW *, int, int);
12357c478bd9Sstevel@tonic-gateextern int waddstr(WINDOW *, char *);
12367c478bd9Sstevel@tonic-gateextern int werase(WINDOW *);
12377c478bd9Sstevel@tonic-gateextern int wclear(WINDOW *);
12387c478bd9Sstevel@tonic-gateextern int intrflush(WINDOW *, int);
12397c478bd9Sstevel@tonic-gateextern int meta(WINDOW *, int);
12407c478bd9Sstevel@tonic-gateextern int setterm(char *);
12417c478bd9Sstevel@tonic-gateextern int gettmode(void);
12427c478bd9Sstevel@tonic-gateextern int halfdelay(int);
12437c478bd9Sstevel@tonic-gateextern int echo(void);
12447c478bd9Sstevel@tonic-gateextern int noecho(void);
12457c478bd9Sstevel@tonic-gateextern int nl(void);
12467c478bd9Sstevel@tonic-gateextern int nonl(void);
12477c478bd9Sstevel@tonic-gate
12487c478bd9Sstevel@tonic-gateextern WINDOW *subpad(WINDOW *, int, int, int, int);
12497c478bd9Sstevel@tonic-gate
12507c478bd9Sstevel@tonic-gateextern  SCREEN *newterm(char *, FILE *, FILE *);
12517c478bd9Sstevel@tonic-gate
12527c478bd9Sstevel@tonic-gate#else  /* __STDC__ */
12537c478bd9Sstevel@tonic-gate
12547c478bd9Sstevel@tonic-gateextern	int	overlay(), overwrite(), wdeleteln(), winsertln(),
12557c478bd9Sstevel@tonic-gate		wstandend(), wstandout(), beep(), flash(),
12567c478bd9Sstevel@tonic-gate		scroll(), slk_init(), scr_init(), scr_restore(),
12577c478bd9Sstevel@tonic-gate		box(), touchline(), waddstr(), werase(),
12587c478bd9Sstevel@tonic-gate		wclear(), intrflush(), meta(), setterm(), gettmode(),
12597c478bd9Sstevel@tonic-gate		halfdelay(), echo(), noecho(), nl(), nonl();
12607c478bd9Sstevel@tonic-gate
12617c478bd9Sstevel@tonic-gateextern	WINDOW *subpad();
12627c478bd9Sstevel@tonic-gate
12637c478bd9Sstevel@tonic-gateextern  SCREEN  *newterm();
12647c478bd9Sstevel@tonic-gate
12657c478bd9Sstevel@tonic-gate#endif /* __STDC__ */
12667c478bd9Sstevel@tonic-gate#endif /* CURS_MACROS */
12677c478bd9Sstevel@tonic-gate
12687c478bd9Sstevel@tonic-gate#define	garbagedlines		wredrawln
12697c478bd9Sstevel@tonic-gate#define	garbagedwin		redrawwin
12707c478bd9Sstevel@tonic-gate
12717c478bd9Sstevel@tonic-gate#define	crmode			cbreak
12727c478bd9Sstevel@tonic-gate#define	nocrmode		nocbreak
12737c478bd9Sstevel@tonic-gate#define	saveterm		def_prog_mode
12747c478bd9Sstevel@tonic-gate#define	fixterm			reset_prog_mode
12757c478bd9Sstevel@tonic-gate#define	resetterm		reset_shell_mode
12767c478bd9Sstevel@tonic-gate
12777c478bd9Sstevel@tonic-gate#define	waddchstr(win, str)	waddchnstr((win), (str), -1)
12787c478bd9Sstevel@tonic-gate#define	winsstr(win, str)	winsnstr((win), (str), -1)
12797c478bd9Sstevel@tonic-gate
12807c478bd9Sstevel@tonic-gate/* iocontrol functions */
12817c478bd9Sstevel@tonic-gate#define	qiflush()		_setqiflush(TRUE)
12827c478bd9Sstevel@tonic-gate#define	noqiflush()		_setqiflush(FALSE)
12837c478bd9Sstevel@tonic-gate
12847c478bd9Sstevel@tonic-gate#define	set_term		setcurscreen
12857c478bd9Sstevel@tonic-gate
12867c478bd9Sstevel@tonic-gate#endif	/* NOMACROS || __lint */
12877c478bd9Sstevel@tonic-gate
12887c478bd9Sstevel@tonic-gate/*
12897c478bd9Sstevel@tonic-gate * Standard alternate character set.  The current ACS world is evolving,
12907c478bd9Sstevel@tonic-gate * so we support only a widely available subset: the line drawing characters
12917c478bd9Sstevel@tonic-gate * from the VT100, plus a few from the Teletype 5410v1.  Eventually there
12927c478bd9Sstevel@tonic-gate * may be support of more sophisticated ACS line drawing, such as that
12937c478bd9Sstevel@tonic-gate * in the Teletype 5410, the HP line drawing set, and the like.  There may
12947c478bd9Sstevel@tonic-gate * be support for some non line oriented characters as well.
12957c478bd9Sstevel@tonic-gate *
12967c478bd9Sstevel@tonic-gate * Line drawing ACS names are of the form ACS_trbl, where t is the top, r
12977c478bd9Sstevel@tonic-gate * is the right, b is the bottom, and l is the left.  t, r, b, and l might
12987c478bd9Sstevel@tonic-gate * be B (blank), S (single), D (double), or T (thick).  The subset defined
12997c478bd9Sstevel@tonic-gate * here only uses B and S.
13007c478bd9Sstevel@tonic-gate */
13017c478bd9Sstevel@tonic-gate
13027c478bd9Sstevel@tonic-gate#define	ACS_BSSB	(acs_map['l'])
13037c478bd9Sstevel@tonic-gate#define	ACS_SSBB	(acs_map['m'])
13047c478bd9Sstevel@tonic-gate#define	ACS_BBSS	(acs_map['k'])
13057c478bd9Sstevel@tonic-gate#define	ACS_SBBS	(acs_map['j'])
13067c478bd9Sstevel@tonic-gate#define	ACS_SBSS	(acs_map['u'])
13077c478bd9Sstevel@tonic-gate#define	ACS_SSSB	(acs_map['t'])
13087c478bd9Sstevel@tonic-gate#define	ACS_SSBS	(acs_map['v'])
13097c478bd9Sstevel@tonic-gate#define	ACS_BSSS	(acs_map['w'])
13107c478bd9Sstevel@tonic-gate#define	ACS_BSBS	(acs_map['q'])
13117c478bd9Sstevel@tonic-gate#define	ACS_SBSB	(acs_map['x'])
13127c478bd9Sstevel@tonic-gate#define	ACS_SSSS	(acs_map['n'])
13137c478bd9Sstevel@tonic-gate
13147c478bd9Sstevel@tonic-gate/*
13157c478bd9Sstevel@tonic-gate * Human readable names for the most commonly used characters.
13167c478bd9Sstevel@tonic-gate * "Upper", "right", etc. are chosen to be consistent with the vt100 manual.
13177c478bd9Sstevel@tonic-gate */
13187c478bd9Sstevel@tonic-gate
13197c478bd9Sstevel@tonic-gate#define	ACS_ULCORNER	ACS_BSSB
13207c478bd9Sstevel@tonic-gate#define	ACS_LLCORNER	ACS_SSBB
13217c478bd9Sstevel@tonic-gate#define	ACS_URCORNER	ACS_BBSS
13227c478bd9Sstevel@tonic-gate#define	ACS_LRCORNER	ACS_SBBS
13237c478bd9Sstevel@tonic-gate#define	ACS_RTEE	ACS_SBSS
13247c478bd9Sstevel@tonic-gate#define	ACS_LTEE	ACS_SSSB
13257c478bd9Sstevel@tonic-gate#define	ACS_BTEE	ACS_SSBS
13267c478bd9Sstevel@tonic-gate#define	ACS_TTEE	ACS_BSSS
13277c478bd9Sstevel@tonic-gate#define	ACS_HLINE	ACS_BSBS
13287c478bd9Sstevel@tonic-gate#define	ACS_VLINE	ACS_SBSB
13297c478bd9Sstevel@tonic-gate#define	ACS_PLUS	ACS_SSSS
13307c478bd9Sstevel@tonic-gate#define	ACS_S1		(acs_map['o'])	/* scan line 1 */
13317c478bd9Sstevel@tonic-gate#define	ACS_S9		(acs_map['s'])	/* scan line 9 */
13327c478bd9Sstevel@tonic-gate#define	ACS_DIAMOND	(acs_map['`'])	/* diamond */
13337c478bd9Sstevel@tonic-gate#define	ACS_CKBOARD	(acs_map['a'])	/* checker board (stipple) */
13347c478bd9Sstevel@tonic-gate#define	ACS_DEGREE	(acs_map['f'])	/* degree symbol */
13357c478bd9Sstevel@tonic-gate#define	ACS_PLMINUS	(acs_map['g'])	/* plus/minus */
13367c478bd9Sstevel@tonic-gate#define	ACS_BULLET	(acs_map['~'])	/* bullet */
13377c478bd9Sstevel@tonic-gate	/* Teletype 5410v1 symbols */
13387c478bd9Sstevel@tonic-gate#define	ACS_LARROW	(acs_map[','])	/* arrow pointing left */
13397c478bd9Sstevel@tonic-gate#define	ACS_RARROW	(acs_map['+'])	/* arrow pointing right */
13407c478bd9Sstevel@tonic-gate#define	ACS_DARROW	(acs_map['.'])	/* arrow pointing down */
13417c478bd9Sstevel@tonic-gate#define	ACS_UARROW	(acs_map['-'])	/* arrow pointing up */
13427c478bd9Sstevel@tonic-gate#define	ACS_BOARD	(acs_map['h'])	/* board of squares */
13437c478bd9Sstevel@tonic-gate#define	ACS_LANTERN	(acs_map['i'])	/* lantern symbol */
13447c478bd9Sstevel@tonic-gate#define	ACS_BLOCK	(acs_map['0'])	/* solid square block */
13457c478bd9Sstevel@tonic-gate
13467c478bd9Sstevel@tonic-gate.
13477c478bd9Sstevel@tonic-gate$a
13487c478bd9Sstevel@tonic-gate
13497c478bd9Sstevel@tonic-gate/*
13507c478bd9Sstevel@tonic-gate *	The definition for 'reg' is not standard, and is provided for
13517c478bd9Sstevel@tonic-gate *	compatibility reasons. User's are discouraged from using this.
13527c478bd9Sstevel@tonic-gate */
13537c478bd9Sstevel@tonic-gate#define	reg	register
13547c478bd9Sstevel@tonic-gate
13557c478bd9Sstevel@tonic-gate/* Various video attributes */
13567c478bd9Sstevel@tonic-gate#define	A_STANDOUT	000010000000
13577c478bd9Sstevel@tonic-gate#define	_STANDOUT	A_STANDOUT    /* for compatability with old curses */
13587c478bd9Sstevel@tonic-gate#define	A_UNDERLINE	000020000000
13597c478bd9Sstevel@tonic-gate#define	A_REVERSE	000040000000
13607c478bd9Sstevel@tonic-gate#define	A_BLINK		000100000000
13617c478bd9Sstevel@tonic-gate#define	A_DIM		000200000000
13627c478bd9Sstevel@tonic-gate#define	A_BOLD		000400000000
13637c478bd9Sstevel@tonic-gate#define	A_ALTCHARSET	001000000000
13647c478bd9Sstevel@tonic-gate
13657c478bd9Sstevel@tonic-gate/* The next two are subject to change so don't depend on them */
13667c478bd9Sstevel@tonic-gate#define	A_INVIS		010000000000
13677c478bd9Sstevel@tonic-gate#define	A_PROTECT	020000000000U
13687c478bd9Sstevel@tonic-gate
13697c478bd9Sstevel@tonic-gate#define	A_NORMAL	000000000000
13707c478bd9Sstevel@tonic-gate#define	A_ATTRIBUTES	031777700000U	/* 0xCFFF8000 */
13717c478bd9Sstevel@tonic-gate#define	A_CHARTEXT	006000077777	/* 0x30007FFF */
13727c478bd9Sstevel@tonic-gate#define	A_COLOR		000007700000
13737c478bd9Sstevel@tonic-gate
13747c478bd9Sstevel@tonic-gate#define	A_WATTRIBUTES	031770000000U	/* 0xCFE00000 */
13757c478bd9Sstevel@tonic-gate#define	A_WCHARTEXT	006007777777	/* 0x301FFFFF */
13767c478bd9Sstevel@tonic-gate
13777c478bd9Sstevel@tonic-gate#define	COLOR_PAIR(n)	((n) << 15)
13787c478bd9Sstevel@tonic-gate#define	PAIR_NUMBER(n)	(((n) & A_COLOR) >> 15)
13797c478bd9Sstevel@tonic-gate
13807c478bd9Sstevel@tonic-gate/* definition of 8 basic color	*/
13817c478bd9Sstevel@tonic-gate#define	COLOR_BLACK	0
13827c478bd9Sstevel@tonic-gate#define	COLOR_RED	1
13837c478bd9Sstevel@tonic-gate#define	COLOR_GREEN	2
13847c478bd9Sstevel@tonic-gate#define	COLOR_YELLOW	3
13857c478bd9Sstevel@tonic-gate#define	COLOR_BLUE	4
13867c478bd9Sstevel@tonic-gate#define	COLOR_MAGENTA	5
13877c478bd9Sstevel@tonic-gate#define	COLOR_CYAN	6
13887c478bd9Sstevel@tonic-gate#define	COLOR_WHITE	7
13897c478bd9Sstevel@tonic-gate
13907c478bd9Sstevel@tonic-gate/* mouse related macros: don't change these definitions or bit-masks.	*/
13917c478bd9Sstevel@tonic-gate/* they are interdependent (used by _map_button() in tgetch()		*/
13927c478bd9Sstevel@tonic-gate#define	BUTTON_RELEASED		0
13937c478bd9Sstevel@tonic-gate#define	BUTTON_PRESSED		1
13947c478bd9Sstevel@tonic-gate#define	BUTTON_CLICKED		2
13957c478bd9Sstevel@tonic-gate#define	BUTTON_DOUBLE_CLICKED	3
13967c478bd9Sstevel@tonic-gate#define	BUTTON_TRIPLE_CLICKED	4
13977c478bd9Sstevel@tonic-gate
13987c478bd9Sstevel@tonic-gate#define	MOUSE_X_POS		(Mouse_status.x)
13997c478bd9Sstevel@tonic-gate#define	MOUSE_Y_POS		(Mouse_status.y)
14007c478bd9Sstevel@tonic-gate#define	A_BUTTON_CHANGED	(Mouse_status.changes & 7)
14017c478bd9Sstevel@tonic-gate#define	MOUSE_MOVED		(Mouse_status.changes & 8)
14027c478bd9Sstevel@tonic-gate#define	MOUSE_POS_REPORT	(Mouse_status.changes & 16)
14037c478bd9Sstevel@tonic-gate#define	BUTTON_CHANGED(x)	(Mouse_status.changes & (1 << ((x) - 1)))
14047c478bd9Sstevel@tonic-gate#define	BUTTON_STATUS(x)	(Mouse_status.button[(x)-1])
14057c478bd9Sstevel@tonic-gate
14067c478bd9Sstevel@tonic-gate/* definition of mouse bit-masks	*/
14077c478bd9Sstevel@tonic-gate#define	BUTTON1_RELEASED	000000000001
14087c478bd9Sstevel@tonic-gate#define	BUTTON1_PRESSED		000000000002
14097c478bd9Sstevel@tonic-gate#define	BUTTON1_CLICKED		000000000004
14107c478bd9Sstevel@tonic-gate#define	BUTTON1_DOUBLE_CLICKED	000000000010
14117c478bd9Sstevel@tonic-gate#define	BUTTON1_TRIPLE_CLICKED	000000000020
14127c478bd9Sstevel@tonic-gate#define	BUTTON2_RELEASED	000000000040
14137c478bd9Sstevel@tonic-gate#define	BUTTON2_PRESSED		000000000100
14147c478bd9Sstevel@tonic-gate#define	BUTTON2_CLICKED		000000000200
14157c478bd9Sstevel@tonic-gate#define	BUTTON2_DOUBLE_CLICKED	000000000400
14167c478bd9Sstevel@tonic-gate#define	BUTTON2_TRIPLE_CLICKED	000000001000
14177c478bd9Sstevel@tonic-gate#define	BUTTON3_RELEASED	000000002000
14187c478bd9Sstevel@tonic-gate#define	BUTTON3_PRESSED		000000004000
14197c478bd9Sstevel@tonic-gate#define	BUTTON3_CLICKED		000000010000
14207c478bd9Sstevel@tonic-gate#define	BUTTON3_DOUBLE_CLICKED	000000020000
14217c478bd9Sstevel@tonic-gate#define	BUTTON3_TRIPLE_CLICKED	000000040000
14227c478bd9Sstevel@tonic-gate#define	ALL_MOUSE_EVENTS	000000077777
14237c478bd9Sstevel@tonic-gate#define	REPORT_MOUSE_POSITION	000000100000
14247c478bd9Sstevel@tonic-gate
14257c478bd9Sstevel@tonic-gate#ifdef	__cplusplus
14267c478bd9Sstevel@tonic-gate}
14277c478bd9Sstevel@tonic-gate#endif
14287c478bd9Sstevel@tonic-gate
14297c478bd9Sstevel@tonic-gate#endif	/* _CURSES_H */
14307c478bd9Sstevel@tonic-gate.
14317c478bd9Sstevel@tonic-gate0r copyright.h
1432*a6600459Sstevelg/\@(\#)curses\.ed/s//\@(\#)curses\.h/
14337c478bd9Sstevel@tonic-gatew curses.h
1434