17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
57c478bd9Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
67c478bd9Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
77c478bd9Sstevel@tonic-gate  * with the License.
87c478bd9Sstevel@tonic-gate  *
97c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
107c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
117c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
127c478bd9Sstevel@tonic-gate  * and limitations under the License.
137c478bd9Sstevel@tonic-gate  *
147c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
157c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
167c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
177c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
187c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
197c478bd9Sstevel@tonic-gate  *
207c478bd9Sstevel@tonic-gate  * CDDL HEADER END
217c478bd9Sstevel@tonic-gate  */
22*e8031f0aSraf 
237c478bd9Sstevel@tonic-gate /*
24*e8031f0aSraf  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
257c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
267c478bd9Sstevel@tonic-gate  */
277c478bd9Sstevel@tonic-gate 
287c478bd9Sstevel@tonic-gate /*	Copyright (c) 1988 AT&T	*/
297c478bd9Sstevel@tonic-gate /*	  All Rights Reserved	*/
307c478bd9Sstevel@tonic-gate 
317c478bd9Sstevel@tonic-gate /*
327c478bd9Sstevel@tonic-gate  * University Copyright- Copyright (c) 1982, 1986, 1988
337c478bd9Sstevel@tonic-gate  * The Regents of the University of California
347c478bd9Sstevel@tonic-gate  * All Rights Reserved
357c478bd9Sstevel@tonic-gate  *
367c478bd9Sstevel@tonic-gate  * University Acknowledgment- Portions of this document are derived from
377c478bd9Sstevel@tonic-gate  * software developed by the University of California, Berkeley, and its
387c478bd9Sstevel@tonic-gate  * contributors.
397c478bd9Sstevel@tonic-gate  */
407c478bd9Sstevel@tonic-gate 
417c478bd9Sstevel@tonic-gate #ifndef _CURSHDR_H
427c478bd9Sstevel@tonic-gate #define	_CURSHDR_H
437c478bd9Sstevel@tonic-gate 
447c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
457c478bd9Sstevel@tonic-gate 
467c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
477c478bd9Sstevel@tonic-gate extern "C" {
487c478bd9Sstevel@tonic-gate #endif
497c478bd9Sstevel@tonic-gate 
507c478bd9Sstevel@tonic-gate #define	_NOHASH		(-1)	/* if the hash value is unknown */
517c478bd9Sstevel@tonic-gate #define	_REDRAW		(-2)	/* if line need redrawn */
527c478bd9Sstevel@tonic-gate #define	_BLANK		(-3)	/* if line is blank */
537c478bd9Sstevel@tonic-gate #define	_THASH		(123)	/* base hash if clash with other hashes */
547c478bd9Sstevel@tonic-gate #define	_KEY		(01)
557c478bd9Sstevel@tonic-gate #define	_MACRO		(02)
567c478bd9Sstevel@tonic-gate 
577c478bd9Sstevel@tonic-gate #define	_INPUTPENDING	cur_term->_iwait
587c478bd9Sstevel@tonic-gate #define	_PUTS(x, y)	(void) tputs(x, y, _outch)
597c478bd9Sstevel@tonic-gate #define	_VIDS(na, oa)	(vidupdate((na), (oa), _outch), curscr->_attrs = (na))
607c478bd9Sstevel@tonic-gate #define	_ONINSERT()	(_PUTS(enter_insert_mode, 1), SP->phys_irm = TRUE)
617c478bd9Sstevel@tonic-gate #define	_OFFINSERT()	(_PUTS(exit_insert_mode, 1), SP->phys_irm = FALSE)
627c478bd9Sstevel@tonic-gate #define	_STRNOTEQ(a, b)	(a == NULL ? (b != NULL) : \
637c478bd9Sstevel@tonic-gate 			    (b == NULL ? 1 : strcmp(a, b)))
647c478bd9Sstevel@tonic-gate 
657c478bd9Sstevel@tonic-gate /*
667c478bd9Sstevel@tonic-gate  * IC and IL overheads and costs should be set to this
677c478bd9Sstevel@tonic-gate  * value if the corresponding feature is missing
687c478bd9Sstevel@tonic-gate  */
697c478bd9Sstevel@tonic-gate 
707c478bd9Sstevel@tonic-gate #define	LARGECOST	500
717c478bd9Sstevel@tonic-gate 
727c478bd9Sstevel@tonic-gate typedef	struct
737c478bd9Sstevel@tonic-gate {
747c478bd9Sstevel@tonic-gate     short	icfixed;		/* Insert char fixed overhead */
757c478bd9Sstevel@tonic-gate     short	dcfixed;		/* Delete char fixed overhead */
767c478bd9Sstevel@tonic-gate     short	Insert_character;
777c478bd9Sstevel@tonic-gate     short	Delete_character;
787c478bd9Sstevel@tonic-gate     short	Cursor_home;
797c478bd9Sstevel@tonic-gate     short	Cursor_to_ll;
807c478bd9Sstevel@tonic-gate     short	Cursor_left;
817c478bd9Sstevel@tonic-gate     short	Cursor_right;
827c478bd9Sstevel@tonic-gate     short	Cursor_down;
837c478bd9Sstevel@tonic-gate     short	Cursor_up;
847c478bd9Sstevel@tonic-gate     short	Carriage_return;
857c478bd9Sstevel@tonic-gate     short	Tab;
867c478bd9Sstevel@tonic-gate     short	Back_tab;
877c478bd9Sstevel@tonic-gate     short	Clr_eol;
887c478bd9Sstevel@tonic-gate     short	Clr_bol;
897c478bd9Sstevel@tonic-gate     short	Parm_ich;
907c478bd9Sstevel@tonic-gate     short	Parm_dch;
917c478bd9Sstevel@tonic-gate     short	Parm_left_cursor;
927c478bd9Sstevel@tonic-gate     short	Parm_up_cursor;
937c478bd9Sstevel@tonic-gate     short	Parm_down_cursor;
947c478bd9Sstevel@tonic-gate     short	Parm_right_cursor;
957c478bd9Sstevel@tonic-gate     short	Cursor_address;
967c478bd9Sstevel@tonic-gate     short	Row_address;
977c478bd9Sstevel@tonic-gate } COSTS;
987c478bd9Sstevel@tonic-gate 
997c478bd9Sstevel@tonic-gate #define	_COST(field)	(SP->term_costs.field)
1007c478bd9Sstevel@tonic-gate 
1017c478bd9Sstevel@tonic-gate /* Soft label keys */
1027c478bd9Sstevel@tonic-gate 
1037c478bd9Sstevel@tonic-gate #define	LABMAX	16	/* max number of labels allowed */
1047c478bd9Sstevel@tonic-gate #define	LABLEN	8	/* max length of each label */
1057c478bd9Sstevel@tonic-gate 
1067c478bd9Sstevel@tonic-gate typedef	struct
1077c478bd9Sstevel@tonic-gate {
1087c478bd9Sstevel@tonic-gate     WINDOW	*_win;		/* the window to display labels */
1097c478bd9Sstevel@tonic-gate     char	_ldis[LABMAX][LABLEN+1]; /* labels suitable to display */
1107c478bd9Sstevel@tonic-gate     char	_lval[LABMAX][LABLEN+1]; /* labels' true values */
1117c478bd9Sstevel@tonic-gate     short	_labx[LABMAX];	/* where to display labels */
1127c478bd9Sstevel@tonic-gate     short	_num;		/* actual number of labels */
1137c478bd9Sstevel@tonic-gate     short	_len;		/* real length of labels */
1147c478bd9Sstevel@tonic-gate     bool	_changed;	/* TRUE if some labels changed */
1157c478bd9Sstevel@tonic-gate     bool	_lch[LABMAX];	/* change status */
1167c478bd9Sstevel@tonic-gate } SLK_MAP;
1177c478bd9Sstevel@tonic-gate 
1187c478bd9Sstevel@tonic-gate struct	screen
1197c478bd9Sstevel@tonic-gate {
1207c478bd9Sstevel@tonic-gate     unsigned	fl_echoit : 1;	/* in software echo mode */
1217c478bd9Sstevel@tonic-gate     unsigned	fl_endwin : 2;	/* has called endwin */
1227c478bd9Sstevel@tonic-gate     unsigned	fl_meta : 1;	/* in meta mode */
1237c478bd9Sstevel@tonic-gate     unsigned	fl_nonl : 1;	/* do not xlate input \r-> \n */
1247c478bd9Sstevel@tonic-gate     unsigned	yesidln : 1;	/* has idln capabilities */
1257c478bd9Sstevel@tonic-gate     unsigned	dmode : 1;	/* Terminal has delete mode */
1267c478bd9Sstevel@tonic-gate     unsigned	imode : 1;	/* Terminal has insert mode */
1277c478bd9Sstevel@tonic-gate     unsigned	ichok : 1;	/* Terminal can insert characters */
1287c478bd9Sstevel@tonic-gate     unsigned	dchok : 1;	/* Terminal can delete characters */
1297c478bd9Sstevel@tonic-gate     unsigned	sid_equal : 1;	/* enter insert and delete mode equal */
1307c478bd9Sstevel@tonic-gate     unsigned	eid_equal : 1;	/* exit insert and delete mode equal */
1317c478bd9Sstevel@tonic-gate     unsigned	phys_irm : 1;	/* in insert mode or not */
1327c478bd9Sstevel@tonic-gate     long	baud;		/* baud rate of this tty */
1337c478bd9Sstevel@tonic-gate     short	kp_state;	/* 1 iff keypad is on, else 0 */
1347c478bd9Sstevel@tonic-gate     short	Yabove;		/* How many lines are above stdscr */
1357c478bd9Sstevel@tonic-gate     short	lsize;		/* How many lines decided by newscreen */
1367c478bd9Sstevel@tonic-gate     short	csize;		/* How many columns decided by newscreen */
1377c478bd9Sstevel@tonic-gate     short	tsize;		/* How big is a tab decided by newscreen */
1387c478bd9Sstevel@tonic-gate     WINDOW	*std_scr;	/* primary output screen */
1397c478bd9Sstevel@tonic-gate     WINDOW	*cur_scr;	/* what's physically on the screen */
1407c478bd9Sstevel@tonic-gate     WINDOW	*virt_scr;	/* what's virtually on the screen */
1417c478bd9Sstevel@tonic-gate     int		*cur_hash;	/* hash table of curscr */
1427c478bd9Sstevel@tonic-gate     int		*virt_hash;	/* hash table of virtscr */
1437c478bd9Sstevel@tonic-gate     TERMINAL	*tcap;		/* TERMINFO info */
1447c478bd9Sstevel@tonic-gate     FILE	*term_file;	/* File to write on for output. */
1457c478bd9Sstevel@tonic-gate     FILE	*input_file;	/* Where to get keyboard input */
1467c478bd9Sstevel@tonic-gate     SLK_MAP	*slk;		/* Soft label information */
1477c478bd9Sstevel@tonic-gate     char	**_mks;		/* marks, only used with xhp terminals */
1487c478bd9Sstevel@tonic-gate     COSTS	term_costs;	/* costs of various capabilities */
1497c478bd9Sstevel@tonic-gate     SGTTY	save_tty_buf;	/* saved termio state of this tty */
1507c478bd9Sstevel@tonic-gate #ifdef	SYSV
1517c478bd9Sstevel@tonic-gate     SGTTYS	save_tty_bufs;	/* saved termios state of this tty */
1527c478bd9Sstevel@tonic-gate #endif
1537c478bd9Sstevel@tonic-gate     char	**_color_mks;	/* marks, only used with color xhp terminals */
1547c478bd9Sstevel@tonic-gate     unsigned long  _trap_mbe;		/* trap these mouse button events    */
1557c478bd9Sstevel@tonic-gate     unsigned long  _map_mbe_to_key;	/* map selected buttons on top of    */
1567c478bd9Sstevel@tonic-gate 					/* slk's to function keys */
1577c478bd9Sstevel@tonic-gate };
1587c478bd9Sstevel@tonic-gate 
1597c478bd9Sstevel@tonic-gate extern	SCREEN	*SP;
1607c478bd9Sstevel@tonic-gate extern	WINDOW	*_virtscr;
1617c478bd9Sstevel@tonic-gate 
1627c478bd9Sstevel@tonic-gate #ifdef	DEBUG
1637c478bd9Sstevel@tonic-gate #ifndef	outf
1647c478bd9Sstevel@tonic-gate extern	FILE	*outf;
1657c478bd9Sstevel@tonic-gate #endif	/* outf */
1667c478bd9Sstevel@tonic-gate #endif	/* DEBUG */
1677c478bd9Sstevel@tonic-gate 
1687c478bd9Sstevel@tonic-gate extern	short	cswidth[],	/* byte size of multi-byte chars */
1697c478bd9Sstevel@tonic-gate 		_curs_scrwidth[];	/* display size */
1707c478bd9Sstevel@tonic-gate extern	short	_csmax,
1717c478bd9Sstevel@tonic-gate 		_scrmax;
1727c478bd9Sstevel@tonic-gate extern	bool	_mbtrue;
1737c478bd9Sstevel@tonic-gate 
1747c478bd9Sstevel@tonic-gate #define	MBIT		0200		/* indicator for a multi-byte char */
1757c478bd9Sstevel@tonic-gate #define	CBIT		002000000000	/* indicator for a continuing col */
1767c478bd9Sstevel@tonic-gate #define	RBYTE(x)	((x) & 0377)
1777c478bd9Sstevel@tonic-gate #define	LBYTE(x)	(((x) >> 8) & 0177)
1787c478bd9Sstevel@tonic-gate #define	ISMBIT(x)	((x) & MBIT)
1797c478bd9Sstevel@tonic-gate #define	SETMBIT(x)	((x) |= MBIT)
1807c478bd9Sstevel@tonic-gate #define	CLRMBIT(x)	((x) &= ~MBIT)
1817c478bd9Sstevel@tonic-gate #define	ISCBIT(x)	((x) & CBIT)
1827c478bd9Sstevel@tonic-gate #define	SETCBIT(x)	((x) |= CBIT)
1837c478bd9Sstevel@tonic-gate #define	CLRCBIT(x)	((x) &= ~CBIT)
1847c478bd9Sstevel@tonic-gate #define	TYPE(x)		((x) == SS2 ? 1 : (x) == SS3 ? 2 : ISMBIT(x) ? 0 : 3)
1857c478bd9Sstevel@tonic-gate #define	TRIM		037777777777	/* 0xFFFFFFFF */
1867c478bd9Sstevel@tonic-gate 
1877c478bd9Sstevel@tonic-gate /* terminfo magic number */
1887c478bd9Sstevel@tonic-gate #define	MAGNUM	0432
1897c478bd9Sstevel@tonic-gate 
1907c478bd9Sstevel@tonic-gate /* curses screen dump magic number */
1917c478bd9Sstevel@tonic-gate #define	SVR2_DUMP_MAGIC_NUMBER	0433
1927c478bd9Sstevel@tonic-gate #define	SVR3_DUMP_MAGIC_NUMBER	0434
1937c478bd9Sstevel@tonic-gate 
1947c478bd9Sstevel@tonic-gate /* Getting the baud rate is different on the two systems. */
1957c478bd9Sstevel@tonic-gate 
1967c478bd9Sstevel@tonic-gate #ifdef	SYSV
1977c478bd9Sstevel@tonic-gate #define	_BR(x)	(x.c_cflag & CBAUD)
1987c478bd9Sstevel@tonic-gate #define	_BRS(x)	(cfgetospeed(&x))
1997c478bd9Sstevel@tonic-gate #include	<values.h>
2007c478bd9Sstevel@tonic-gate #else	/* SYSV */
2017c478bd9Sstevel@tonic-gate #define	BITSPERBYTE	8
2027c478bd9Sstevel@tonic-gate #define	MAXINT		32767
2037c478bd9Sstevel@tonic-gate #define	_BR(x)	(x.sg_ispeed)
2047c478bd9Sstevel@tonic-gate #endif	/* SYSV */
2057c478bd9Sstevel@tonic-gate 
2067c478bd9Sstevel@tonic-gate #define	_BLNKCHAR	' '
2077c478bd9Sstevel@tonic-gate #define	_CTRL(c)	(c | 0100)
2087c478bd9Sstevel@tonic-gate #define	_ATTR(c)	((c) & A_ATTRIBUTES)
2097c478bd9Sstevel@tonic-gate #define	_CHAR(c)	((c) & A_CHARTEXT)
2107c478bd9Sstevel@tonic-gate 
2117c478bd9Sstevel@tonic-gate /*
2127c478bd9Sstevel@tonic-gate  *	combine CHAR par of the character with the attributes of the window.
2137c478bd9Sstevel@tonic-gate  *	Two points: 1) If character is blank, usebackground instead
2147c478bd9Sstevel@tonic-gate  *		    2) If character contains color, delete color from
2157c478bd9Sstevel@tonic-gate  *			window attribute.
2167c478bd9Sstevel@tonic-gate  */
2177c478bd9Sstevel@tonic-gate 
2187c478bd9Sstevel@tonic-gate #define	_WCHAR(w, c)    (_CHAR((c) == _BLNKCHAR ? (w)->_bkgd : (c))| \
2197c478bd9Sstevel@tonic-gate 			    (((c) & A_COLOR) ? ((w)->_attrs & ~A_COLOR) : \
2207c478bd9Sstevel@tonic-gate 			    ((w)->_attrs)))
2217c478bd9Sstevel@tonic-gate 
2227c478bd9Sstevel@tonic-gate #define	_DARKCHAR(c)	((c) != _BLNKCHAR)
2237c478bd9Sstevel@tonic-gate #define	_UNCTRL(c)	((c) ^ 0100)
2247c478bd9Sstevel@tonic-gate 
2257c478bd9Sstevel@tonic-gate /* blank lines info of curscr */
2267c478bd9Sstevel@tonic-gate #define	_BEGNS		curscr->_firstch
2277c478bd9Sstevel@tonic-gate #define	_ENDNS		curscr->_lastch
2287c478bd9Sstevel@tonic-gate 
2297c478bd9Sstevel@tonic-gate /* hash tables */
2307c478bd9Sstevel@tonic-gate #define	_CURHASH	SP->cur_hash
2317c478bd9Sstevel@tonic-gate #define	_VIRTHASH	SP->virt_hash
2327c478bd9Sstevel@tonic-gate 
2337c478bd9Sstevel@tonic-gate /* top/bot line changed */
2347c478bd9Sstevel@tonic-gate #define	_VIRTTOP	_virtscr->_parx
2357c478bd9Sstevel@tonic-gate #define	_VIRTBOT	_virtscr->_pary
2367c478bd9Sstevel@tonic-gate 
2377c478bd9Sstevel@tonic-gate /* video marks */
2387c478bd9Sstevel@tonic-gate #define	_MARKS		SP->_mks
2397c478bd9Sstevel@tonic-gate #define	_COLOR_MARKS	SP->_color_mks
2407c478bd9Sstevel@tonic-gate 
2417c478bd9Sstevel@tonic-gate #define	_NUMELEMENTS(x)	(sizeof (x)/sizeof (x[0]))
2427c478bd9Sstevel@tonic-gate 
2437c478bd9Sstevel@tonic-gate #ifdef	_VR3_COMPAT_CODE
2447c478bd9Sstevel@tonic-gate /*
2457c478bd9Sstevel@tonic-gate  * #define	_TO_OCHTYPE(x)		((_ochtype)(((x&A_ATTRIBUTES)>>9)| \
2467c478bd9Sstevel@tonic-gate  * 						(x&0x0000007FUL)))
2477c478bd9Sstevel@tonic-gate  */
2487c478bd9Sstevel@tonic-gate #define	_TO_OCHTYPE(x)		((_ochtype)(((x&A_ATTRIBUTES)>>9)|(x&0177)))
2497c478bd9Sstevel@tonic-gate #define	_FROM_OCHTYPE(x)	((chtype) ((x&0177) | ((x&0177600)<<9)))
2507c478bd9Sstevel@tonic-gate extern	void	(*_y16update)(WINDOW *, int, int, int, int);
2517c478bd9Sstevel@tonic-gate #endif	/* _VR3_COMPAT_CODE */
2527c478bd9Sstevel@tonic-gate 
2537c478bd9Sstevel@tonic-gate /* functions for screen updates */
2547c478bd9Sstevel@tonic-gate 
2557c478bd9Sstevel@tonic-gate extern	int	(*_setidln)(void);
2567c478bd9Sstevel@tonic-gate extern	int	(*_useidln)(void);
2577c478bd9Sstevel@tonic-gate extern	int	(*_quick_ptr)(WINDOW *, chtype);
2587c478bd9Sstevel@tonic-gate extern	int	(_quick_echo)(WINDOW *, chtype);
2597c478bd9Sstevel@tonic-gate 
2607c478bd9Sstevel@tonic-gate /* min/max functions */
2617c478bd9Sstevel@tonic-gate 
2627c478bd9Sstevel@tonic-gate #define	_MIN(a, b)	((a) < (b) ? (a) : (b))
2637c478bd9Sstevel@tonic-gate #define	_MAX(a, b)	((a) > (b) ? (a) : (b))
2647c478bd9Sstevel@tonic-gate 
2657c478bd9Sstevel@tonic-gate extern	int	(*_do_slk_ref)(void);
2667c478bd9Sstevel@tonic-gate extern	int	(*_do_slk_tch)(void);
2677c478bd9Sstevel@tonic-gate extern	int	(*_do_slk_noref)(void);
2687c478bd9Sstevel@tonic-gate extern	int	_image(WINDOW *);
2697c478bd9Sstevel@tonic-gate extern	int	_outch(char);
2707c478bd9Sstevel@tonic-gate extern	int	_outwch(chtype);
2717c478bd9Sstevel@tonic-gate extern	int	_chkinput(void);
2727c478bd9Sstevel@tonic-gate extern	int	_curs_mbtowc(wchar_t *, const char *, size_t);
2737c478bd9Sstevel@tonic-gate extern	int	_curs_wctomb(char *, wchar_t);
2747c478bd9Sstevel@tonic-gate extern	int	_delay(int, int (*)(char));
2757c478bd9Sstevel@tonic-gate extern	int	_mbaddch(WINDOW *, chtype, chtype);
2767c478bd9Sstevel@tonic-gate extern	int	_mbclrch(WINDOW *, int, int);
2777c478bd9Sstevel@tonic-gate extern	int	_mbinsshift(WINDOW *, int), _mbvalid(WINDOW *);
2787c478bd9Sstevel@tonic-gate extern	int	_padjust(WINDOW *, int, int, int, int, int, int);
2797c478bd9Sstevel@tonic-gate extern	int	_prefresh(int (*)(WINDOW *), WINDOW *, int, int, int,
2807c478bd9Sstevel@tonic-gate 		int, int, int);
2817c478bd9Sstevel@tonic-gate extern	int	_overlap(WINDOW *, WINDOW *, int);
2827c478bd9Sstevel@tonic-gate extern	int	_scr_all(char *, int);
2837c478bd9Sstevel@tonic-gate extern	int	_slk_update(void);
2847c478bd9Sstevel@tonic-gate extern	int	_tcsearch(char *, short [], char *[], int, int);
285*e8031f0aSraf extern	int	_vsscanf(const char *, const char *, __va_list);
2867c478bd9Sstevel@tonic-gate extern	int	force_doupdate(void);
2877c478bd9Sstevel@tonic-gate extern	int	init_acs(void);
2887c478bd9Sstevel@tonic-gate extern	int	mbscrw(int);
2897c478bd9Sstevel@tonic-gate extern	int	mbeucw(int);
2907c478bd9Sstevel@tonic-gate extern	int	scr_ll_dump(FILE *);
2917c478bd9Sstevel@tonic-gate extern	int	scr_reset(FILE *, int);
2927c478bd9Sstevel@tonic-gate extern	int	setkeymap(void);
2937c478bd9Sstevel@tonic-gate extern	int	ttimeout(int);
2947c478bd9Sstevel@tonic-gate extern	int	wadjcurspos(WINDOW *);
2957c478bd9Sstevel@tonic-gate extern	int	wcscrw(wchar_t);
2967c478bd9Sstevel@tonic-gate extern	int	wmbmove(WINDOW *, int, int);
2977c478bd9Sstevel@tonic-gate 
2987c478bd9Sstevel@tonic-gate extern	chtype	tgetch(int);
2997c478bd9Sstevel@tonic-gate 
3007c478bd9Sstevel@tonic-gate extern	WINDOW	*_makenew(int, int, int, int);
3017c478bd9Sstevel@tonic-gate 
3027c478bd9Sstevel@tonic-gate extern	void	(*_slk_init)(void);
3037c478bd9Sstevel@tonic-gate extern	void	(*_rip_init)(void);
3047c478bd9Sstevel@tonic-gate extern	void	delkeymap(TERMINAL *);
3057c478bd9Sstevel@tonic-gate extern	void	mbgetwidth(void);
3067c478bd9Sstevel@tonic-gate extern	void	memSset(chtype *, chtype, int);
3077c478bd9Sstevel@tonic-gate extern	void	_blast_keys(TERMINAL *);
3087c478bd9Sstevel@tonic-gate extern	void	_init_costs(void);
3097c478bd9Sstevel@tonic-gate extern	void	_init_HP_pair(short, short, short);
3107c478bd9Sstevel@tonic-gate extern	void	_update_old_y_area(WINDOW *, int, int, int, int);
3117c478bd9Sstevel@tonic-gate 
3127c478bd9Sstevel@tonic-gate extern	char    *tparm_p0(char *);
3137c478bd9Sstevel@tonic-gate extern	char    *tparm_p1(char *, long);
3147c478bd9Sstevel@tonic-gate extern	char    *tparm_p2(char *, long, long);
3157c478bd9Sstevel@tonic-gate extern	char    *tparm_p3(char *, long, long, long);
3167c478bd9Sstevel@tonic-gate extern	char    *tparm_p4(char *, long, long, long, long);
3177c478bd9Sstevel@tonic-gate extern	char    *tparm_p7(char *, long, long, long, long, long, long, long);
3187c478bd9Sstevel@tonic-gate 
3197c478bd9Sstevel@tonic-gate 
3207c478bd9Sstevel@tonic-gate extern	char	*infotocap(char *, int *);
3217c478bd9Sstevel@tonic-gate extern	char	*_strcode2byte(wchar_t *, char *, int);
3227c478bd9Sstevel@tonic-gate extern	char	*wmbinch(WINDOW *, int, int);
3237c478bd9Sstevel@tonic-gate 
3247c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
3257c478bd9Sstevel@tonic-gate }
3267c478bd9Sstevel@tonic-gate #endif
3277c478bd9Sstevel@tonic-gate 
3287c478bd9Sstevel@tonic-gate #endif	/* _CURSHDR_H */
329