/* @(#) $Revision: ../hdr/curses.h@@/main/r11ros/cup_ros-cpe/cup_libc-ros-cpe/1 $ */
#ifndef _XOPEN_CURSES
#define _XOPEN_CURSES 1
#endif

/*
 * (c) Copyright 1995 Hewlett-Packard Co., All Rights Reserved.
 */
/*
 * Copyright (c) 1994
 * Novell, Inc. and International Business Machines Corp. All Rights Reserved.
 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF Novell Inc. and 
 * International Business Machines Corp. 
 * The copyright notice above does not evidence any actual or intended 
 * publication of such source code.
 */
/*
 * Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1992, 1992, 1993, 1994
 * Novell, Inc. All Rights Reserved.
 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF Novell Inc.
 * The copyright notice above does not evidence any 
 * actual or intended publication of such source code.
 */
/*
 * 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.
 */


#if defined(__HP_CURSES) && !defined(__LP64__)
#include <../old/usr/include/curses.h>	/* HP curses */
#else  /* X/Open curses */


#ifndef _CURSES_INCLUDED
#define _CURSES_INCLUDED	/* define prevents multiple includes */

#include <stdio.h>
#include <stddef.h>
#include <wchar.h>
#include <sys/_inttypes.h>
#include <sys/stdsyms.h>
#ifdef _XOPEN_SOURCE_EXTENDED
#include <term.h>
#endif /* _XOPEN_SOURCE_EXTENDED */

#ifdef __cplusplus
extern "C" {
#endif
                                        /* THE FOLLOWING TYPEDEFS ARE
                                           DUPLICATED IN TERM.H */
#ifndef _CHTYPE_DEFINED
#	define _CHTYPE_DEFINED
typedef uint32_t chtype;
#endif /* _CHTYPE_DEFINED */

#ifndef _BOOL_DEFINED
#  if !defined(__cplusplus)
#     define _BOOL_DEFINED
      typedef char bool;
#  elif  __cplusplus < 199707L
#    define _BOOL_DEFINED
#ifndef __cplusplus
#    define bool char
#endif
#  endif /* !defined(__cplusplus) */
#endif /* _BOOL_DEFINED */

#ifdef _XOPEN_SOURCE_EXTENDED
#ifndef _ATTR_T_DEFINED
#       define _ATTR_T_DEFINED
typedef int32_t        attr_t;
#endif /* _ATTR_T_DEFINED */
#endif /* _XOPEN_SOURCE_EXTENDED */

#ifdef _XOPEN_SOURCE_EXTENDED
#ifndef _CCHAR_T_DEFINED
#       define _CCHAR_T_DEFINED
typedef struct { char __reserved[28]; } cchar_t;
#endif /* _CCHAR_T_DEFINED */
#endif /* _XOPEN_SOURCE_EXTENDED */

/* TRUE and FALSE get defined so many times, */
/* let's not get in the way of other definitions. */
#if	!defined(TRUE) || ((TRUE) != 1)
#ifdef TRUE
#undef TRUE
#endif
#define	TRUE	(1)
#endif
#if	!defined(FALSE) || ((FALSE) != 0)
#ifdef FALSE
#undef FALSE
#endif
#define	FALSE	(0)
#endif
#if	!defined(ERR) || ((ERR) != -1)
#ifdef ERR
#undef ERR
#endif
#define	ERR	(-1)
#endif
#if	!defined(OK) || ((OK) != 0)
#ifdef OK
#undef OK
#endif
#define	OK	(0)
#endif

/* short-hand notations */

struct __reserved_str1
{
        int 		__reserved;	/* no user space */
	                                /* used to allow for pointer */
};

struct __reserved_str2
{
        int 		__reserved;	/* no user space */
	                                /* used to allow for pointer */
};

#ifndef _WINDOW_DEFINED
#	define _WINDOW_DEFINED
typedef struct __reserved_str1	WINDOW;
#endif /* _WINDOW_DEFINED */

#ifndef _SCREEN_DEFINED
#	define _SCREEN_DEFINED
typedef struct __reserved_str2	SCREEN;
#endif /* _SCREEN_DEFINED */

/* common external variables */

#ifdef _XOPEN_SOURCE_EXTENDED
extern int	COLOR_PAIRS, COLORS;
#endif /* _XOPEN_SOURCE_EXTENDED */
extern int	COLS, LINES;
extern WINDOW	*curscr, *stdscr;

/* Common definitions    */

/*
 * 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.
 */


#ifdef __HP_CURSES_COMPAT
/*
 * ttytype[] and acs_map[] are present only for backward compatibility.
 * They will not be available in the future releases.
 */

extern	char	ttytype[];
extern	chtype	acs_map[];
#endif /* __HP_CURSES_COMPAT */

#ifdef _XOPEN_SOURCE_EXTENDED
extern	cchar_t	*__wacs_map;
extern	chtype	__acs_map[];

#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']))

#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'])

/*
 * 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 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 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 */

#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		(__wacs_map['o']) /* scan line 1 */
#define ACS_S9 	 	(__wacs_map['s']) /* scan line 9 */
#define ACS_DIAMOND	(__wacs_map['`']) /* diamond */
#define ACS_CKBOARD	(__wacs_map['a']) /* checker board */
#define ACS_DEGREE	(__wacs_map['f']) /* degree symbol */
#define ACS_PLMINUS	(__wacs_map['g']) /* plus/minus */
#define ACS_BULLET	(__wacs_map['~']) /* bullet */
	/* Teletype 5410v1 symbols */
#define ACS_LARROW	(__wacs_map[',']) /* arrow left */
#define ACS_RARROW	(__wacs_map['+']) /* arrow right */
#define ACS_DARROW	(__wacs_map['.']) /* arrow down */
#define ACS_UARROW	(__wacs_map['-']) /* arrow up */
#define ACS_BOARD	(__wacs_map['h']) /* board of squares */
#define ACS_LANTERN	(__wacs_map['i']) /* lantern symbol */
#define ACS_BLOCK	(__wacs_map['0']) /* solid square block */
#endif /* _XOPEN_SOURCE_EXTENDED */

/* Key code returns when enabled for various special function keys for input */

#ifdef _XOPEN_SOURCE_EXTENDED
#define KEY_CODE_YES	0377		/* A key was returned */
#endif /* _XOPEN_SOURCE_EXTENDED */
#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		/* Home key (upward+left arrow) */
#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 */
#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 */
#ifdef _XOPEN_SOURCE_EXTENDED
#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 */
#endif /* _XOPEN_SOURCE_EXTENDED */
#define	KEY_MIN		0401		/* Minimum curses keys */
#define KEY_MOUSE       0631            /* Mouse event has occured */
#define KEY_MAX         0777            /* Maximum curses key */

/* Various video attributes */
#define	A_NORMAL	000000000000
#ifdef _XOPEN_SOURCE_EXTENDED
#define A_ALTCHARSET	000100000000
#endif /* _XOPEN_SOURCE_EXTENDED */
#define A_BLINK		000002000000
#define A_BOLD		000010000000
#define A_DIM		000004000000
#ifdef _XOPEN_SOURCE_EXTENDED
#define A_INVIS		000020000000
#define A_PROTECT	000040000000
#endif /* _XOPEN_SOURCE_EXTENDED */
#define A_REVERSE	000001000000
#define A_STANDOUT	000000200000
#define A_UNDERLINE	000000400000
#define	WA_NORMAL	A_NORMAL
#ifdef _XOPEN_SOURCE_EXTENDED
#define WA_ALTCHARSET	A_ALTCHARSET
#define WA_BLINK	A_BLINK
#define WA_BOLD		A_BOLD
#define WA_DIM		A_DIM
#define WA_HORIZONTAL	000000100000
#define WA_INVIS	A_INVIS
#define WA_LEFT		000000040000
#define WA_LOW		000000020000
#define WA_PROTECT	A_PROTECT
#define WA_REVERSE	A_REVERSE
#define WA_RIGHT	000000010000
#define WA_STANDOUT	A_STANDOUT
#define WA_TOP		000000004000
#define WA_UNDERLINE	A_UNDERLINE
#define WA_VERTICAL	000000002000
#endif /* _XOPEN_SOURCE_EXTENDED */
#define A_ATTRIBUTES	A_STANDOUT|A_UNDERLINE|A_REVERSE|A_BLINK|A_DIM|A_BOLD|A_INVIS|A_PROTECT|A_ALTCHARSET|A_COLOR
#define A_CHARTEXT	000000000377	/* 0x000000FF */
#ifdef _XOPEN_SOURCE_EXTENDED
#define A_COLOR		017600000000
#endif /* _XOPEN_SOURCE_EXTENDED */

/* definition of 8 basic color	*/
#ifdef _XOPEN_SOURCE_EXTENDED
#define COLOR_BLACK	0
#define COLOR_BLUE	1
#define COLOR_GREEN	2
#define COLOR_CYAN	3
#define COLOR_RED	4
#define COLOR_MAGENTA	5
#define COLOR_YELLOW	6
#define COLOR_WHITE	7
#endif /* _XOPEN_SOURCE_EXTENDED */

/* Function declarations */

/* 
 * Macro only Functions to get at the window structure.
 *
 * Note: getsyx() macro and __getsyx() function are present only for
 * backward compatibility.  They will not be available in the future
 * releases.
 */

extern	int	__getcury __((WINDOW *));
extern	int	__getcurx __((WINDOW *));
#ifdef __HP_CURSES_COMPAT
extern	int	__getsyx  __((int *, int *));
#endif /* __HP_CURSES_COMPAT */

#define getyx(__win,__y,__x)	{ WINDOW *__wi; \
				 __wi = __win; ((__y) = __getcury(__wi), \
				 (__x) = __getcurx(__wi)); }
#ifdef __HP_CURSES_COMPAT
#define getsyx(__y, __x)	__getsyx(&(_y), &(_x))
#endif /* __HP_CURSES_COMPAT */

#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	__getbegy __((WINDOW *));
extern	int	__getbegx __((WINDOW *));
extern	int	__getmaxy __((WINDOW *));
extern	int	__getmaxx __((WINDOW *));
extern	int	__getpary __((WINDOW *));
extern	int	__getparx __((WINDOW *));


#define	getbegyx(__win,__y,__x)	{ WINDOW *__wi; \
				 __wi = __win; ((__y) = __getbegy(__wi), \
				 (__x) = __getbegx(__wi)); }
#define	getmaxyx(__win,__y,__x)	{ WINDOW *__wi; \
				  __wi = __win; ((__y) = __getmaxy(__wi), \
				 (__x) = __getmaxx(__wi)); }
#define	getparyx(__win,__y,__x)	{ WINDOW *__wi; \
				 __wi = __win; ((__y) = __getpary(__wi), \
				 (__x) = __getparx(__wi)); }
#endif /* _XOPEN_SOURCE_EXTENDED */

#ifdef __HP_CURSES_COMPAT
/*
 * The following APIs are present only for backward compatibility.  They
 * will not be available in the future releases.
 */

extern	SCREEN	*newscreen __((char *, int, int, int, FILE *, FILE *));
extern  SCREEN	*setcurscreen __((SCREEN *));
extern  void	vidupdate __((chtype, chtype, void (*)(int)));
extern  void	curserr __((void));
extern  int	setsyx __((int, int));
extern  int	draino __((int));
extern  int	newkey __((char *, int, int));
extern  int	slk_start __((int, int *));
extern  int	crmode __((void));
extern  int	nocrmode __((void));
extern	chtype	winwch __((WINDOW *));
extern	int	pechowchar __((WINDOW *, chtype));
extern	int	ungetwch __((const wchar_t));
extern	int	waddwch __((WINDOW *, chtype));
extern	int	waddwchnstr __((WINDOW *, chtype *, const int));
extern	int	wechowchar __((WINDOW *, chtype));
extern  int	wgetnwstr __((WINDOW *, wchar_t *, int));
extern  int	wgetwch __((WINDOW *));
extern	int	wgetwstr __((WINDOW *, wchar_t *));
extern	int	winsnwstr __((WINDOW *, wchar_t *, int));
extern	int	winswch __((WINDOW *, chtype));
extern	int	winwchnstr __((WINDOW *, chtype *, int));
extern	chtype	getattrs __((WINDOW *));
extern	int	fixterm __((void));
extern	int	garbagedlines __((WINDOW *, int, int));
extern	int	garbagedwin __((WINDOW *));
extern	int	gettmode __((void));
extern	int	resetterm __((void));
extern	int	saveterm __((void));
extern	int	setterm __((char *));
extern	int	getnwstr __((wchar_t *, int));
extern	int	insnwstr __((const wchar_t *, int));
extern	int	mvinswch __((int, int, chtype));
extern	int	winswstr __((WINDOW *, wchar_t *));

/*
 * Inlude <term.h> by defining _XOPEN_SOURCE_EXTENDED to get the setupterm()
 * prototype.  It will not be available in <curses.h> in the future releases.
 */

extern  int	setupterm __((char *, int, int *));

/*
 * Inlude <unctrl.> to get the unctrl() prototype.  It will not be
 * available in <curses.h> in the future releases.
 */

extern  char	*unctrl __((int));
#endif /* __HP_CURSES_COMPAT */

/*
 * APIs provided as only functions.
 */

#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	add_wch	__((const cchar_t *));
extern	int	add_wchnstr __((const cchar_t *, int));
extern	int	add_wchstr __((const cchar_t *));
extern	int	attr_get __((attr_t *, short *, void *));
extern	int	attr_off __((attr_t, void *));
extern	int	attr_on __((attr_t, void *));
extern	int	attr_set __((attr_t, short, void *));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	baudrate __((void));
extern	int	beep __((void));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	bkgrnd __((const cchar_t *));
extern	void	bkgrndset __((const cchar_t *));
extern	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 *));
extern	int	box_set __((WINDOW *, const cchar_t *, const cchar_t *));
extern	bool	can_change_color __((void));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	cbreak __((void));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	chgat __((int, attr_t, short, const void *));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	clearok __((WINDOW *, bool));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	color_content __((short, short *, short *, short *));
#ifdef __10_10_COMPAT_CODE
extern	int	color_set __((short));
#else
extern	int	color_set __((short, void *));
#endif /* __10_10_COMPAT_CODE */
extern	int	copywin __((const WINDOW *, WINDOW *, \
			   int, int, int, int, int, int, int));
extern	int	curs_set __((int));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	def_prog_mode __((void));
extern	int	def_shell_mode __((void));
extern	int	delay_output __((int));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	void	delscreen __((SCREEN *));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	delwin __((WINDOW *));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	WINDOW	*derwin __((WINDOW *, int, int, int, int));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	doupdate __((void));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	WINDOW	*dupwin __((WINDOW *));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	echo __((void));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	echo_wchar __((const cchar_t *));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	endwin __((void));
extern	char	erasechar __((void));
#ifdef _XOPEN_SOURCE_EXTENDED
extern int	erasewchar __((wchar_t *));
extern	void	filter __((void));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	flash __((void));
extern	int	flushinp __((void));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	chtype	getbkgd __((WINDOW *));
extern	int	getbkgrnd __((cchar_t *));
extern	int	getcchar __((const cchar_t *, wchar_t *, attr_t *, short *, \
			    void *));
extern	int	getnstr __((char *, int));
extern	int	getn_wstr __((wint_t *, int));
extern	WINDOW	*getwin __((FILE *));
extern	int	get_wstr __((wint_t *));
extern	int	halfdelay __((int));
extern	bool	has_colors __((void));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	bool    has_ic __((void));
extern	bool	has_il __((void));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	hline_set __((const cchar_t *, int));
extern	void	idcok __((WINDOW *, bool));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	idlok __((WINDOW *, bool));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	void	immedok __((WINDOW *, bool));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	WINDOW	*initscr __((void));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	init_color __((short, short, short, short));
extern	int	init_pair __((short, short, short));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	intrflush __((WINDOW *, bool));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	bool    isendwin __((void));
extern	bool	is_linetouched __((WINDOW *, int));
extern	bool	is_wintouched __((WINDOW *));
extern	char	*keyname __((int));
extern char	*key_name __((wchar_t));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	keypad __((WINDOW *, bool));
extern	char	killchar __((void));
#ifdef _XOPEN_SOURCE_EXTENDED
extern int	killwchar __((wchar_t *));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	leaveok __((WINDOW *, bool));
extern	char	*longname __((void));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	meta __((WINDOW *, bool));
extern	int	mvadd_wch __((int, int, const cchar_t *));
extern	int	mvadd_wchnstr __((int, int, const cchar_t *, int));
extern	int	mvadd_wchstr __((int, int, const cchar_t *));
extern	int	mvchgat __((int, int, int, attr_t, short, const void *));
extern	int	mvcur __((int, int, int, int));
extern	int	mvderwin __((WINDOW *, int, int));
extern	int	mvgetnstr __((int, int, char *, int));
extern	int	mvgetn_wstr __((int, int, wchar_t *, int));
extern	int	mvget_wstr __((int, int, wchar_t *));
extern	int	mvhline_set __((int, int, const cchar_t *, int));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	mvprintw __((int, int, char *, ...));
extern	int	mvscanw __((int, int, char *, ...));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	mvvline_set __((int, int, const cchar_t *, int));
extern	int	mvwadd_wch __((WINDOW *, int, int, const cchar_t *));
extern	int	mvwadd_wchnstr __((WINDOW *, int, int, const cchar_t *, int));
extern	int	mvwadd_wchstr __((WINDOW *, int, int, const cchar_t *));
extern	int	mvwchgat __((WINDOW *, int, int, int, attr_t, short, \
			     const void *));
extern	int	mvwgetnstr __((WINDOW *, int, int, char *, int));
extern	int	mvwgetn_wstr __((WINDOW *, int, int, wchar_t *, int));
extern	int	mvwget_wstr __((WINDOW *, int, int, wchar_t *));
extern	int	mvwhline_set __((WINDOW *, int, int, const cchar_t *, int));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	mvwin __((WINDOW *, int, int));
extern	int	mvwprintw __((WINDOW *, int, int, char *, ...));
extern	int	mvwscanw __((WINDOW *, int, int, char *, ...));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	mvwvline_set __((WINDOW *, int, int, const cchar_t *, int));
extern	int	napms __((int));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	WINDOW	*newpad __((int, int));
extern	SCREEN	*newterm __((char *, FILE *, FILE *));
extern	WINDOW	*newwin __((int, int, int, int));
extern	int	nl __((void));
extern	int	nocbreak __((void));
extern	int	nodelay __((WINDOW *, bool));
extern	int	noecho __((void));
extern	int	nonl __((void));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	void	noqiflush __((void));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	noraw __((void));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	notimeout __((WINDOW *, bool));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	overlay __((const WINDOW *, WINDOW *));
extern	int	overwrite __((const WINDOW *, WINDOW *));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	pair_content __((short, short *, short *));
extern	int	pechochar __((WINDOW *, chtype));
extern	int	pecho_wchar __((WINDOW *, const cchar_t *));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	pnoutrefresh __((WINDOW *, int, int, int, int, int, int));
extern	int	prefresh __((WINDOW *, int, int, int, int, int, int));
extern	int	printw __((char *, ...));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	putwin __((WINDOW *, FILE *));
extern	void	qiflush __((void));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	raw __((void));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	redrawwin __((WINDOW *));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	reset_prog_mode __((void));
extern	int	reset_shell_mode __((void));
extern	int	resetty __((void));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	ripoffline __((int, int  (*)(WINDOW *, int)));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	savetty __((void));
extern	int	scanw __((char *, ...));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int     scr_dump __((const char *));
extern	int	scr_init __((const char *));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	scrollok __((WINDOW *, bool));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	scr_restore __((const char *));
extern	int	scr_set __((const char *));
extern	int	setcchar __((cchar_t *, const wchar_t *, const attr_t, \
			    short, const void *));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	SCREEN	*set_term __((SCREEN *));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	slk_attr_off __((const attr_t, void *));
extern	int	slk_attroff __((const chtype));
extern	int	slk_attr_on __((const attr_t, void *));
extern	int	slk_attron __((const chtype));
extern	int	slk_attr_set __((const attr_t, short, void *));
extern	int	slk_attrset __((const chtype));
extern	int	slk_clear __((void));
extern	int	slk_color __((short));
extern	int	slk_init __((int));
extern	char	*slk_label __((int));
extern	int	slk_noutrefresh __((void));
extern	int	slk_refresh __((void));
extern	int	slk_restore __((void));
extern	int	slk_set __((int, const char *, int));
extern	int	slk_touch __((void));
extern int	slk_wset __((int, const wchar_t *, int));
extern	int	start_color __((void));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	WINDOW	*subwin __((WINDOW *, int, int, int, int));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	syncok __((WINDOW *, bool));
extern	chtype	termattrs __((void));
extern	attr_t	term_attrs __((void));
extern	char	*termname __((void));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	touchwin __((WINDOW *));
extern	int	typeahead __((int));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	ungetch __((int));
extern  int     unget_wch __((const wchar_t));
extern	int	untouchwin __((WINDOW *));
extern	void	use_env __((bool));
extern	int	vid_attr __((attr_t, short, void *));
extern	int	vidattr __((chtype));
extern	int	vid_puts __((attr_t, short, void *, int (*)(int)));
extern	int	vidputs __((chtype, int (*)(int)));
extern	int	vline_set __((const cchar_t *, int));
extern	int	vwprintw __((WINDOW *, char *, va_list));
extern	int	vw_printw __((WINDOW *, char *, va_list));
extern	int	vwscanw __((WINDOW *, char *, va_list));
extern	int	vw_scanw __((WINDOW *, char *, va_list));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	waddch __((WINDOW *, const chtype));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	waddchnstr __((WINDOW *, const chtype *, int));
extern	int	waddnstr __((WINDOW *, const char *, int));
extern	int	waddnwstr __((WINDOW *, const wchar_t *, int));
extern	int	wadd_wch __((WINDOW *, const cchar_t *));
extern	int	wadd_wchnstr __((WINDOW *, const cchar_t *, int));
extern	int	wadd_wchstr __((WINDOW *, const cchar_t *));
extern	int	waddwstr __((WINDOW *, const wchar_t *));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	wattroff __((WINDOW *, int));
extern	int	wattron __((WINDOW *, int));
extern	int	wattrset __((WINDOW *, int));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	wattr_get __((WINDOW *, attr_t *, short *, void *));
extern	int	wattr_off __((WINDOW *, attr_t, void *));
extern	int	wattr_on __((WINDOW *, attr_t, void *));
extern	int	wattr_set __((WINDOW *, attr_t, short, void *));
extern	int	wbkgd __((WINDOW *, chtype));
extern	void	wbkgdset __((WINDOW *, chtype));
extern	int	wbkgrnd __((WINDOW *, const cchar_t *));
extern	void	wbkgrndset __((WINDOW *, const cchar_t *));
extern	int	wborder __((WINDOW *, chtype, chtype, chtype, chtype, \
				      chtype, chtype, chtype, chtype));
extern	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 *));
extern	int	wchgat __((WINDOW *, int, attr_t, short, const void *));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	wclrtobot __((WINDOW *));
extern	int	wclrtoeol __((WINDOW *));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	void	wcursyncup __((WINDOW *));
#ifdef __10_10_COMPAT_CODE
extern	int	wcolor_set __((WINDOW *, short));
#else
extern	int	wcolor_set __((WINDOW *, short, void *));
#endif /* __10_10_COMPAT_CODE */
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	wdelch __((WINDOW *));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	wechochar __((WINDOW *, const chtype));
extern	int	wecho_wchar __((WINDOW *, const cchar_t *));
extern	int	wgetbkgrnd __((WINDOW *, cchar_t *));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	wgetch __((WINDOW *));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	wgetnstr __((WINDOW *, char *, int));
extern	int	wgetn_wstr __((WINDOW *, wchar_t *, int));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	wgetstr __((WINDOW *, char *));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	wget_wch __((WINDOW *, wint_t *));
extern	int	wget_wstr __((WINDOW *, wchar_t *));
extern	int	whline __((WINDOW *, chtype, int));
extern	int	whline_set __((WINDOW *, const cchar_t *, int));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	chtype	winch __((WINDOW *));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	winchnstr __((WINDOW *, chtype *, int));
extern	int	winchstr __((WINDOW *, chtype *));
extern	int	winnstr __((WINDOW *, char *, int));
extern	int	winnwstr __((WINDOW *, wchar_t *, int));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	winsch __((WINDOW *, chtype));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	winsdelln __((WINDOW *, int));
extern	int	winsnstr __((WINDOW *, const char *, int));
extern	int	wins_nwstr __((WINDOW *, const wchar_t *, int));
extern	int	winstr __((WINDOW *, char *));
extern	int	wins_wch __((WINDOW *, const cchar_t *));
extern	int	win_wch __((WINDOW *, cchar_t *));
extern	int	win_wchnstr __((WINDOW *, cchar_t *, int));
extern	int	winwstr __((WINDOW *, wchar_t *));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	wmove __((WINDOW *, int, int));
extern	int	wnoutrefresh __((WINDOW *));
extern	int	wprintw __((WINDOW *, char *, ...));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int     wredrawln __((WINDOW *, int, int));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	wrefresh __((WINDOW *));
extern	int	wscanw __((WINDOW *, char *, ...));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	wscrl __((WINDOW *, int));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	wsetscrreg __((WINDOW *, int, int));
extern	int	wstandend __((WINDOW *));
extern	int	wstandout __((WINDOW *));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	void	wsyncup __((WINDOW *));
extern	void	wsyncdown __((WINDOW *));
extern	void	wtimeout __((WINDOW *, int));
extern	int	wtouchln __((WINDOW *, int, int, int));
extern	wchar_t	*wunctrl __((cchar_t *));
extern	int	wvline __((WINDOW *, chtype, int));
extern	int	wvline_set __((WINDOW *, const cchar_t *, int));
#endif /* _XOPEN_SOURCE_EXTENDED */

/*
 * APIs provided as both functions and macros.
 */

#if	defined(NOMACROS) || defined(lint)

#ifdef __HP_CURSES_COMPAT
/*
 * The following APIs are present only for backward compatibility.  They
 * will not be available in the future releases.
 */

extern	int	addwch __((chtype));
extern	int	addwchnstr __((chtype *, int));
extern	int	addwchstr __((chtype *));
extern	int	echowchar __((chtype));
extern	int	getwch __((void));
extern	int	getwstr __((wchar_t *));
extern	int	inswch __((chtype));
extern	int	inswstr __((wchar_t *));
extern	chtype	inwch __((void));
extern	int	inwchnstr __((chtype *, int));
extern	int	inwchstr __((chtype *));
extern	int	mvaddwch __((int, int, chtype));
extern	int	mvaddwchnstr __((int, int, chtype *, int));
extern	int	mvaddwchstr __((int, int, chtype *));
extern	int	mvgetnwstr __((int, int, wchar_t *, int));
extern	int	mvgetwch __((const int, const int));
extern	int	mvgetwstr __((int, int, wchar_t *));
extern	int	mvinsnwstr __((int, int, const wchar_t *, int));
extern	int	mvinswstr __((int, int, wchar_t *));
extern  chtype  mvinwch __((int, int));
extern	int	mvinwchnstr __((int, int, chtype *, int));
extern	int	mvinwchstr __((int, int, chtype *));
extern	int	mvwaddwch __((WINDOW *, int, int, chtype));
extern	int	mvwaddwchnstr __((WINDOW *, int, int, chtype *, int));
extern	int	mvwaddwchstr __((WINDOW *, int, int, chtype *));
extern	int	mvwgetnwstr __((WINDOW *, int, int, wchar_t *, int));
extern	int	mvwgetwch __((WINDOW *, const int, const int));
extern	int	mvwgetwstr __((WINDOW *, int, int, wchar_t *));
extern	int	mvwinsnwstr __((WINDOW *, int, int, wchar_t *, int));
extern	int	mvwinswch __((WINDOW *, int, int, chtype));
extern	int	mvwinswstr __((WINDOW *, int, int, wchar_t *));
extern  chtype  mvwinwch __((WINDOW *, int, int));
extern	int	mvwinwchnstr __((WINDOW *, int, int, chtype *, int));
extern	int	mvwinwchstr __((WINDOW *, int, int,chtype *));
extern	int	waddwchstr __((WINDOW *, chtype *));
extern	int	winwchstr __((WINDOW *, chtype *));
#endif /* __HP_CURSES_COMPAT */

extern	int	addch __((const chtype));
extern	int	addchnstr __((const chtype *, int));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	addchstr __((const chtype *));
extern	int	addnstr __((const char *, int));
extern	int	addnwstr __((const wchar_t *, int));
extern	int	addstr __((const char *));
extern	int	addwstr __((const wchar_t *));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	attroff __((int));
extern	int	attron __((int));
extern	int	attrset __((int));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	bkgd __((chtype));
extern	void	bkgdset __((chtype));
extern	int	border __((chtype, chtype, chtype, chtype, \
			   chtype, chtype, chtype, chtype));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	box __((WINDOW *, chtype, chtype));
extern	int	clear __((void));
extern	int	clrtobot __((void));
extern	int	clrtoeol __((void));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	COLOR_PAIR __((int));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	delch __((void));
extern	int	deleteln __((void));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	echochar __((const chtype));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	erase __((void));
extern	int	getch __((void));
extern	int	getstr __((char *));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	get_wch __((wint_t *));
extern	int	hline __((chtype, int));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	chtype	inch __((void));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	inchnstr __((chtype *, int));
extern	int	inchstr __((chtype *));
extern	int	innstr __((char *, int));
extern	int	innwstr __((wchar_t *, int));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	insch __((chtype));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	insdelln __((int));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	insertln __((void));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	insnstr __((const char *, int));
extern	int	ins_nwstr __((const wchar_t *, int));
extern	int	insstr __((const char *));
extern	int	instr __((char *));
extern	int	ins_wch __((const cchar_t *));
extern	int	ins_wstr __((const wchar_t *));
extern	int	in_wch __((cchar_t *));
extern	int	in_wchnstr __((cchar_t *, int));
extern	int	in_wchstr __((cchar_t *));
extern	int	inwstr __((wchar_t *));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	move __((int, int));
extern	int	mvaddch __((int, int, const chtype));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	mvaddchnstr __((int, int, const chtype *, int));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	mvaddchstr __((int, int, const chtype *));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	mvaddnstr __((int, int, const char *, int));
extern	int	mvaddnwstr __((int, int, const wchar_t *, int));
extern	int	mvaddstr __((int, int, const char *));
extern	int	mvaddwstr __((int, int, const wchar_t *));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	mvdelch __((int, int));
extern	int	mvgetch __((int, int));
extern	int	mvgetstr __((int, int, char *));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	mvget_wch __((int, int, wint_t *));
extern	int	mvhline __((int, int, chtype, int));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	chtype	mvinch __((int, int));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	mvinchnstr __((int, int, chtype *, int));
extern	int	mvinchstr __((int, int, chtype *));
extern	int	mvinnstr __((int, int, char *, int));
extern	int	mvinnwstr __((int, int, wchar_t *, int));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	mvinsch __((int, int, chtype));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	mvinsnstr __((int, int, const char *, int));
extern	int	mvins_nwstr __((int, int, const wchar_t *, int));
extern	int	mvinsstr __((int, int, const char *));
extern	int	mvinstr __((int, int, char *));
extern	int	mvins_wch __((int, int, const cchar_t *));
extern	int	mvins_wstr __((int, int, const wchar_t *));
extern	int	mvin_wch __((int, int, cchar_t *));
extern	int	mvin_wchnstr __((int, int, cchar_t *, int));
extern	int	mvin_wchstr __((int, int, cchar_t *));
extern	int	mvinwstr __((int, int, wchar_t *));
extern	int	mvvline __((int, int, chtype, int));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	mvwaddch __((WINDOW *, int, int, const chtype));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	mvwaddchnstr __((WINDOW *, int, int, const chtype *, int));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	mvwaddchstr __((WINDOW *, int, int, const chtype *));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	mvwaddnstr __((WINDOW *, int, int, const char *, int));
extern	int	mvwaddnwstr __((WINDOW *, int, int, const wchar_t *, int));
extern	int	mvwaddstr __((WINDOW *, int, int, const char *));
extern	int	mvwaddwstr __((WINDOW *, int, int, const wchar_t *));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	mvwdelch __((WINDOW *, int, int));
extern	int	mvwgetch __((WINDOW *, int, int));
extern	int	mvwgetstr __((WINDOW *, int, int, char *));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	mvwget_wch __((WINDOW *, int, int, wint_t *));
extern	int	mvwhline __((WINDOW *, int, int, chtype, int));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	chtype	mvwinch __((WINDOW *, int, int));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	mvwinchnstr __((WINDOW *, int, int, chtype *, int));
extern	int	mvwinchstr __((WINDOW *, int, int, chtype *));
extern	int	mvwinnstr __((WINDOW *, int, int, char *, int));
extern	int	mvwinnwstr __((WINDOW *, int, int, wchar_t *, int));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	mvwinsch __((WINDOW *, int, int, chtype));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	mvwinsnstr __((WINDOW *, int, int, const char *, int));
extern	int	mvwins_nwstr __((WINDOW *, int, int, const wchar_t *, int));
extern	int	mvwinsstr __((WINDOW *, int, int, const char *));
extern	int	mvwinstr __((WINDOW *, int, int, char *));
extern	int	mvwins_wch __((WINDOW *, int, int, const cchar_t *));
extern	int	mvwins_wstr __((WINDOW *, int, int, const wchar_t *));
extern  int	mvwin_wch __((WINDOW *, int, int, cchar_t *));
extern	int	mvwin_wchnstr __((WINDOW *, int, int, cchar_t *, int));
extern	int	mvwin_wchstr __((WINDOW *, int, int, cchar_t *));
extern	int	mvwinwstr __((WINDOW *, int, int, wchar_t *));
extern	int	mvwvline __((WINDOW *, int, int, chtype, int));
extern	int	PAIR_NUMBER __((int));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	refresh __((void));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	scrl __((int));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	scroll __((WINDOW *));
extern	int	setscrreg __((int, int));
extern	int	standend __((void));
extern	int	standout __((void));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	WINDOW	*subpad __((WINDOW *, int, int, int, int));
extern	void	timeout __((int));
extern	int	touchline __((WINDOW *, int, int));
extern	int	vline __((chtype, int));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	waddchstr __((WINDOW *, const chtype *));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	waddstr __((WINDOW *, const char *));
#endif /* _XOPEN_SOURCE_EXTENDED */
extern	int	wclear __((WINDOW *));
extern	int	wdeleteln __((WINDOW *));
extern	int	werase __((WINDOW *));
extern	int	winsertln __((WINDOW *));
#ifdef _XOPEN_SOURCE_EXTENDED
extern	int	winsstr __((WINDOW *, const char *));
extern	int	wins_wstr __((WINDOW *, const wchar_t *));
extern	int	win_wchstr __((WINDOW *, cchar_t *));
#endif /* _XOPEN_SOURCE_EXTENDED */
#else	/* NOMACROS || lint */

/*
 * 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.
 */

#ifdef __HP_CURSES_COMPAT
/*
 * The following APIs are present only for backward compatibility.  They
 * will not be available in the future releases.
 */

#define	addwch(__ch)			waddwch(stdscr,__ch)
#define	addwchnstr(__str,__n)		waddwchnstr(stdscr,__str,__n)
#define	addwchstr(__str)		waddwchnstr(stdscr,__str,(-1))
#define	echowchar(__ch)			wechowchar(stdscr,__ch)
#define	getwch()			wgetwch(stdscr)
#define	getwstr(__ws)			wgetwstr(stdscr, __ws)
#define	inswch(__c)			winswch(stdscr,__c)
#define	inswstr(__ws)			winswstr(stdscr,__ws)
#define	inwch()				winwch(stdscr)
#define	inwchnstr(__str,__n)		winwchnstr(stdscr,__str,__n)
#define	inwchstr(__str)			winwchstr(stdscr,__str)
#define	mvaddwch(__y,__x,__ch)		mvwaddwch(stdscr,__y,__x,__ch)
#define	mvaddwchnstr(__y,__x,__str,__n)	\
					mvwaddwchnstr(stdscr,__y,__x,__str,__n)
#define	mvaddwchstr(__y,__x,__str) \
					mvwaddwchnstr(stdscr,__y,__x,__str,(-1))
#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	mvinswstr(__y,__x,__ws)		mvwinswstr(stdscr,__y,__x,__ws)
#define	mvinwch(__y,__x)		mvwinwch(stdscr,__y,__x)
#define	mvinwchnstr(__y,__x,__str,__n) \
					mvwinwchnstr(stdscr,__y,__x,__str,__n)
#define	mvinwchstr(__y,__x,__str) \
					mvwinwchnstr(stdscr,__y,__x,__str,(-1))
#define	mvwaddwch(__win,__y,__x,__ch)	(wmove(__win,__y,__x)==ERR ? \
					ERR : waddwch(__win,__ch))
#define	mvwaddwchnstr(__win,__y,__x,__str,__n) \
					(wmove(__win,__y,__x)==ERR ? \
					ERR:waddwchnstr(__win,__str,__n))
#define	mvwaddwchstr(__win,__y,__x,__str) \
					(wmove(__win,__y,__x)==ERR ? \
					ERR:waddwchnstr(__win,__str,(-1)))
#define	mvwgetnwstr(__win,__y,__x,__ws,__n) \
					(wmove(__win,__y,__x)==ERR ? \
					ERR:wgetnwstr(__win,__ws,__n))
#define	mvwgetwch(__win,__y,__x)	(wmove(__win,__y,__x)==ERR ? \
					ERR : wgetwch(__win))
#define	mvwgetwstr(__win,__y,__x,__ws)	(wmove(__win,__y,__x)==ERR ? \
					ERR : wgetwstr(__win,__ws))
#define mvwinsnwstr(__win,__y,__x,__ws,__n) \
		(wmove(__win,__y,__x)==ERR ? ERR : winsnwstr(__win,__ws,__n))
#define mvwinswch(__win,__y,__x,__c) \
                        (wmove(__win,__y,__x)==ERR?ERR:winswch(__win,__c))
#define mvwinswstr(__win,__y,__x,__ws) \
			(wmove(__win,__y,__x)==ERR?ERR:winswstr(__win,__ws))
#define mvwinwch(__win,__y,__x) \
			(wmove(__win,__y,__x)==ERR?(chtype)ERR:winwch(__win))
#define mvwinwchnstr(__win,__y,__x,__str,__n) \
		(wmove(__win,__y,__x)==ERR ? ERR : winwchnstr(__win,__str,__n))
#define mvwinwchstr(__win,__y,__x,__str) \
		(wmove(__win,__y,__x)==ERR ? ERR : winwchstr(__win,__str))
#define	waddwchstr(__win,__str)		waddwchnstr(__win,__str,(-1))
#define	winwchstr(__win,__str)		winwchnstr(__win,__str,(-1))
#endif /* __HP_CURSES_COMPAT */

#define	addch(__ch)			waddch(stdscr, __ch)
#define	addchnstr(__str,__n)		waddchnstr(stdscr,__str,__n)
#ifdef _XOPEN_SOURCE_EXTENDED
#define	addchstr(__str)			waddchnstr(stdscr,__str,(-1))
#define	addnstr(__s,__n)		waddnstr(stdscr,__s,__n)
#define	addnwstr(__ws,__n)		waddnwstr(stdscr,__ws,__n)
#define	addstr(__str)			waddnstr(stdscr, __str,(-1))
#define	addwstr(__ws)			waddwstr(stdscr,__ws)
#endif /* _XOPEN_SOURCE_EXTENDED */
#define	attroff(__at)			wattroff(stdscr,__at)
#define	attron(__at)			wattron(stdscr,__at)
#define	attrset(__at)			wattrset(stdscr,__at)
#ifdef _XOPEN_SOURCE_EXTENDED
#define	bkgd(__c)			wbkgd(stdscr,__c)
#define	bkgdset(__c)			wbkgdset(stdscr,__c)
#define	border(__ls,__rs,__ts,__bs,__tl,__tr,__bl,__br) \
			wborder(stdscr,__ls,__rs,__ts,__bs,__tl,__tr,__bl,__br)
#endif /* _XOPEN_SOURCE_EXTENDED */
#define	box(__win,__v,__h)		wborder((__win),(__v),(__v),(__h), \
						 (__h), 0, 0, 0, 0)
#define	clear()				wclear(stdscr)
#define	clrtobot()			wclrtobot(stdscr)
#define	clrtoeol()			wclrtoeol(stdscr)
#ifdef _XOPEN_SOURCE_EXTENDED
#define COLOR_PAIR(n)           	((n) << 25)
#endif /* _XOPEN_SOURCE_EXTENDED */
#define	delch()				wdelch(stdscr)
#define	deleteln()			wdeleteln(stdscr)
#ifdef _XOPEN_SOURCE_EXTENDED
#define	echochar(__ch)			wechochar(stdscr, __ch)
#endif /* _XOPEN_SOURCE_EXTENDED */
#define	erase()				werase(stdscr)
#define	getch()				wgetch(stdscr)
#define	getstr(__str)			wgetstr(stdscr, __str)
#ifdef _XOPEN_SOURCE_EXTENDED
#define get_wch(__wch)			wget_wch(stdscr,__wch)
#define	hline(__c,__num)		whline(stdscr,__c,__num)
#endif /* _XOPEN_SOURCE_EXTENDED */
#define	inch()				winch(stdscr)
#ifdef _XOPEN_SOURCE_EXTENDED
#define	inchnstr(__str,__n)		winchnstr(stdscr,__str,__n)
#define	inchstr(__str)			winchnstr(stdscr,__str,(-1))
#define	innstr(__str,__n)		winnstr(stdscr,__str,__n)
#define	innwstr(__ws,__n)		winnwstr(stdscr,__ws,__n)
#endif /* _XOPEN_SOURCE_EXTENDED */
#define	insch(__c)			winsch(stdscr,__c)
#ifdef _XOPEN_SOURCE_EXTENDED
#define	insdelln(__id)			winsdelln(stdscr,__id)
#endif /* _XOPEN_SOURCE_EXTENDED */
#define	insertln()			winsertln(stdscr)
#ifdef _XOPEN_SOURCE_EXTENDED
#define	insnstr(__s,__n)		winsnstr(stdscr,__s,__n)
#define ins_nwstr(__wstr, __n)		wins_nwstr(stdscr,__wstr,__n)
#define	insstr(__s)			winsstr(stdscr,__s)
#define	instr(__str)			winstr(stdscr,__str)
#define ins_wch(__wch)			wins_wch(stdscr,__wch)
#define ins_wstr(__wstr)        	wins_nwstr(stdscr,__wstr,(-1))
#define in_wch(__wcval)			win_wch(stdscr,__wcval)
#define in_wchnstr(__wchstr,__n)	win_wchnstr(stdscr,__wchstr,__n)
#define in_wchstr(__wchstr)		win_wchnstr(stdscr,__wchstr,(-1))
#define	inwstr(__ws)			winwstr(stdscr,__ws)
#endif /* _XOPEN_SOURCE_EXTENDED */
#define	move(__y, __x)			wmove(stdscr, __y, __x)
#define	mvaddch(__y,__x,__ch)		mvwaddch(stdscr,__y,__x,__ch)
#ifdef _XOPEN_SOURCE_EXTENDED
#define	mvaddchnstr(__y,__x,__str,__n) 	mvwaddchnstr(stdscr,__y,__x,__str,__n)
#endif /* _XOPEN_SOURCE_EXTENDED */
#define	mvaddchstr(__y,__x,__str) 	mvwaddchnstr(stdscr,__y,__x,__str,(-1))
#ifdef _XOPEN_SOURCE_EXTENDED
#define	mvaddnstr(__y,__x,__s,__n) 	mvwaddnstr(stdscr,__y,__x,__s,__n)
#define	mvaddnwstr(__y,__x,__ws,__n)	mvwaddnwstr(stdscr,__y,__x,__ws,__n)
#define	mvaddstr(__y,__x,__str)		mvwaddnstr(stdscr,__y,__x,__str,(-1))
#define	mvaddwstr(__y,__x,__ws)		mvwaddwstr(stdscr,__y,__x,__ws)
#endif /* _XOPEN_SOURCE_EXTENDED */
#define	mvdelch(__y,__x)		mvwdelch(stdscr,__y,__x)
#define	mvgetch(__y,__x)		mvwgetch(stdscr,__y,__x)
#define	mvgetstr(__y,__x,__str)		mvwgetstr(stdscr,__y,__x,__str)
#ifdef _XOPEN_SOURCE_EXTENDED
#define mvget_wch(__y,__x,__wch)	(wmove(stdscr,__y,__x)==ERR ? \
					ERR : wget_wch(stdscr,__wch))
#define	mvhline(__y,__x,__c,__num) 	mvwhline(stdscr,__y,__x,__c,__num)
#endif /* _XOPEN_SOURCE_EXTENDED */
#define	mvinch(__y,__x)			mvwinch(stdscr,__y,__x)
#ifdef _XOPEN_SOURCE_EXTENDED
#define	mvinchnstr(__y,__x,__str,__n)	mvwinchnstr(stdscr,__y,__x,__str,__n)
#define	mvinchstr(__y,__x,__str) 	mvwinchnstr(stdscr,__y,__x,__str,(-1))
#define	mvinnstr(__y,__x,__str,__n) 	mvwinnstr(stdscr,__y,__x,__str,__n)
#define	mvinnwstr(__y,__x,__ws,__n)	mvwinnwstr(stdscr,__y,__x,__ws,__n)
#endif /* _XOPEN_SOURCE_EXTENDED */
#define	mvinsch(__y,__x,__c)		mvwinsch(stdscr,__y,__x,__c)
#ifdef _XOPEN_SOURCE_EXTENDED
#define	mvinsnstr(__y,__x,__s,__n) 	mvwinsnstr(stdscr,__y,__x,__s,__n)
#define mvins_nwstr(__y,__x,__wstr,__n)	(wmove(stdscr,__y,__x)==ERR ? \
					ERR : wins_nwstr(stdscr,__wstr,__n))
#define	mvinsstr(__y,__x,__s)		mvwinsnstr(stdscr,__y,__x,__s,(-1))

#define	mvinstr(__y,__x,__str)		mvwinstr(stdscr,__y,__x,__str)
#define mvins_wch(__y,__x,__wch)	(wmove(stdscr,__y,__x)==ERR ? \
					ERR : wins_wch(stdscr,__wch))
#define mvins_wstr(__y,__x,__wstr)	(wmove(stdscr,__y,__x)==ERR ? \
					ERR : wins_nwstr(stdscr,__wstr,(-1)))
#define mvin_wch(__y,__x,__wcval)	(wmove(stdscr,__y,__x)==ERR ? \
					ERR : win_wch(stdscr,__wcval))
#define mvin_wchnstr(__y,__x,__wchstr,__n) \
					(wmove(stdscr,__y,__x)==ERR ? \
					ERR : win_wchnstr(stdscr,__wchstr,__n))
#define mvin_wchstr(__y,__x,__wchstr)	(wmove(stdscr,__y,__x)==ERR ? \
					ERR: win_wchnstr(stdscr,__wchstr,(-1)))
#define	mvinwstr(__y,__x,__ws)		mvwinwstr(stdscr,__y,__x,__ws)
#define	mvvline(__y,__x,__c,__num)	mvwvline(stdscr,__y,__x,__c,__num)
#endif /* _XOPEN_SOURCE_EXTENDED */
#define	mvwaddch(__win,__y,__x,__ch) 	(wmove(__win,__y,__x)==ERR ? \
					ERR : waddch(__win,__ch))
#ifdef _XOPEN_SOURCE_EXTENDED
#define	mvwaddchnstr(__win,__y,__x,__str,__n) \
					(wmove(__win,__y,__x)==ERR ? \
					ERR : waddchnstr(__win,__str,__n))
#endif /* _XOPEN_SOURCE_EXTENDED */
#define	mvwaddchstr(__win,__y,__x,__str) (wmove(__win,__y,__x)==ERR ? \
					ERR : waddchnstr(__win,__str,(-1)))
#ifdef _XOPEN_SOURCE_EXTENDED
#define	mvwaddnstr(__win,__y,__x,__s,__n) \
					(wmove(__win,__y,__x)==ERR ? \
					ERR:waddnstr(__win,__s,__n))
#define	mvwaddnwstr(__win,__y,__x,__ws,__n) \
					(wmove(__win,__y,__x)==ERR ? \
					ERR : waddnwstr(__win,__ws,__n))
#define	mvwaddstr(__win,__y,__x,__str)	(wmove(__win,__y,__x)==ERR ? \
					ERR:waddstr(__win,__str))
#define	mvwaddwstr(__win,__y,__x,__ws)	(wmove(__win,__y,__x)==ERR ? \
					ERR : waddnwstr(__win,__ws,(-1)))
#endif /* _XOPEN_SOURCE_EXTENDED */
#define mvwdelch(__win,__y,__x)         { int __sx=__getcurx(__win), \
                                              __sy=__getcury(__win); \
                                          return(wmove(__win,__y,__x)==ERR?\
                                          ERR:wdelch(__win)==ERR?\
                                          (wmove(__win,__sy,__sx)&&ERR) : \
                                          wmove(__win,__sy,__sx)); }
#define	mvwgetch(__win,__y,__x)		(wmove(__win,__y,__x)==ERR ? \
					ERR : wgetch(__win))
#define	mvwgetstr(__win,__y,__x,__str)	(wmove(__win,__y,__x)==ERR ? \
					ERR : wgetstr(__win,__str))
#ifdef _XOPEN_SOURCE_EXTENDED
#define mvwget_wch(__win,__y,__x,__wch)	(wmove(__win,__y,__x)==ERR ? \
					ERR : wget_wch(__win,__wch))
#define	mvwhline(__win,__y,__x,__c,__num) \
					(wmove(__win,__y,__x)==ERR ? \
					ERR : whline(__win,__c,__num))
#endif /* _XOPEN_SOURCE_EXTENDED */
#define	mvwinch(__win,__y,__x)		(wmove(__win,__y,__x)==ERR ? \
					(chtype)ERR : winch(__win))
#ifdef _XOPEN_SOURCE_EXTENDED
#define	mvwinchnstr(__win,__y,__x,__str,__n) \
					(wmove(__win,__y,__x)==ERR ? \
					ERR : winchnstr(__win,__str,__n))
#define	mvwinchstr(__win,__y,__x,__str) (wmove(__win,__y,__x)==ERR ? \
					ERR : winchnstr(__win,__str,(-1)))
#define	mvwinnstr(__win,__y,__x,__str,__n) \
					(wmove(__win,__y,__x)==ERR ? \
					ERR : winnstr(__win,__str,__n))
#define	mvwinnwstr(__win,__y,__x,__ws,__n) \
					(wmove(__win,__y,__x)==ERR ? \
					ERR : winnwstr(__win,__ws,__n))
#endif /* _XOPEN_SOURCE_EXTENDED */
#define	mvwinsch(__win,__y,__x,__c)	(wmove(__win,__y,__x)==ERR ? \
					ERR : winsch(__win,__c))
#ifdef _XOPEN_SOURCE_EXTENDED
#define	mvwinsnstr(__win,__y,__x,__s,__n) \
					(wmove(__win,__y,__x)==ERR ? \
					ERR:winsnstr(__win,__s,__n))
#define mvwins_nwstr(__win,__y,__x,__wstr,__n) \
					(wmove(__win,__y,__x)==ERR ? \
					ERR : wins_nwstr(__win,__wstr,__n))
#define	mvwinsstr(__win,__y,__x,__s)	(wmove(__win,__y,__x)==ERR ? \
					ERR : winsnstr(__win,__s,(-1)))
#define	mvwinstr(__win,__y,__x,__str)	(wmove(__win,__y,__x)==ERR ? \
					ERR : winstr(__win,__str))
#define mvwins_wch(__win,__y,__x,__wch)	(wmove(__win,__y,__x)==ERR ? \
					ERR : wins_wch(__win,__wch))
#define mvwins_wstr(__win,__y,__x,__wstr) \
					(wmove(__win,__y,__x)==ERR ? \
					ERR : wins_nwstr(__win,__wstr,(-1)))
#define mvwin_wch(__win,__y,__x,__wcval) (wmove(__win,__y,__x)==ERR ? \
					ERR : win_wch(__win,__wcval))
#define mvwin_wchnstr(__win,__y,__x,__wchstr,__n) \
					(wmove(__win,__y,__x)==ERR? \
					ERR : win_wchnstr(__win,__wchstr,__n))
#define mvwin_wchstr(__win,__y,__x,__wchstr) \
					(wmove(__win,__y,__x)==ERR ? \
					ERR : win_wchnstr(__win,__wchstr,(-1)))
#define	mvwinwstr(__win,__y,__x,__ws)	(wmove(__win,__y,__x)==ERR ? \
					ERR : winwstr(__win,__ws))
#define	mvwvline(__win,__y,__x,__c,__num) \
					(wmove(__win,__y,__x)==ERR ? \
					ERR : wvline(__win,__c,__num))
#define	PAIR_NUMBER(n)			(((n) & A_COLOR) >> 25)
#endif /* _XOPEN_SOURCE_EXTENDED */
#define	refresh()			wrefresh(stdscr)
#ifdef _XOPEN_SOURCE_EXTENDED
#define	scrl(__n)			wscrl(stdscr,__n)
#endif /* _XOPEN_SOURCE_EXTENDED */
#define	scroll(__win)			wscrl((__win),1)
#define	setscrreg(__t,__b)		wsetscrreg(stdscr,__t,__b)
#define	standend()			wstandend(stdscr)
#define	standout()			wstandout(stdscr)
#ifdef _XOPEN_SOURCE_EXTENDED
#define	subpad(__win,__nl,__nc,__by,__bx) \
					derwin((__win),(__nl),(__nc),(__by),\
					       (__bx))
#define	touchline(__win,__y,__n)	wtouchln((__win),(__y),(__n),TRUE)
#define	timeout(__tm)			wtimeout(stdscr,__tm)
#define	vline(__c,__num)		wvline(stdscr,__c,__num)
#endif /* _XOPEN_SOURCE_EXTENDED */
#define	waddchstr(__win,__str)		waddchnstr((__win),(__str),(-1))
#ifdef _XOPEN_SOURCE_EXTENDED
#define	waddstr(__win,__str)		waddnstr((__win),(__str),(-1))
#endif /* _XOPEN_SOURCE_EXTENDED */
#define	wclear(__win)			(clearok((__win),TRUE), werase(__win))
#define	wdeleteln(__win)		winsdelln((__win),-1)
#define	werase(__win)			(wmove((__win),0,0), wclrtobot(__win))
#define	winsertln(__win)		winsdelln((__win),1)
#ifdef _XOPEN_SOURCE_EXTENDED
#define winsstr(__win,__str)		winsnstr((__win),(__str),(-1))
#define wins_wstr(__win,__wstr)		wins_nwstr(__win,__wstr,(-1))
#define win_wchstr(__win,__wchstr)	win_wchnstr(__win,__wchstr,(-1))
#endif /* _XOPEN_SOURCE_EXTENDED */
#endif	/* NOMACROS || lint */

#ifdef __cplusplus
}
#endif

#endif /* defined(__HP_CURSES) && !defined(__LP64__) */

#endif /* _CURSES_INCLUDED */
#ifdef __cplusplus
extern "C" {
#endif
#if defined(__USE_FIXED_PROTOTYPES__) || defined(__cplusplus) || defined (__STRICT_ANSI__)
extern int getcurx (WINDOW *);
extern int getcury (WINDOW *);
extern int mvcur (int, int, int, int);
extern int waddstr (WINDOW *, char *);
#endif /* defined(__USE_FIXED_PROTOTYPES__) || ... */
#ifdef __cplusplus
}
#endif
