xref: /illumos-gate/usr/src/lib/libcurses/screen/curshdr.h (revision 7c478bd95313f5f23a4c958a745db2134aa0324)
1*7c478bd9Sstevel@tonic-gate /*
2*7c478bd9Sstevel@tonic-gate  * CDDL HEADER START
3*7c478bd9Sstevel@tonic-gate  *
4*7c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*7c478bd9Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
6*7c478bd9Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
7*7c478bd9Sstevel@tonic-gate  * with the License.
8*7c478bd9Sstevel@tonic-gate  *
9*7c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*7c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
11*7c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
12*7c478bd9Sstevel@tonic-gate  * and limitations under the License.
13*7c478bd9Sstevel@tonic-gate  *
14*7c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
15*7c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*7c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
17*7c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
18*7c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
19*7c478bd9Sstevel@tonic-gate  *
20*7c478bd9Sstevel@tonic-gate  * CDDL HEADER END
21*7c478bd9Sstevel@tonic-gate  */
22*7c478bd9Sstevel@tonic-gate /*
23*7c478bd9Sstevel@tonic-gate  * Copyright 1997 Sun Microsystems, Inc.  All rights reserved.
24*7c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
25*7c478bd9Sstevel@tonic-gate  */
26*7c478bd9Sstevel@tonic-gate 
27*7c478bd9Sstevel@tonic-gate /*	Copyright (c) 1988 AT&T	*/
28*7c478bd9Sstevel@tonic-gate /*	  All Rights Reserved	*/
29*7c478bd9Sstevel@tonic-gate 
30*7c478bd9Sstevel@tonic-gate /*
31*7c478bd9Sstevel@tonic-gate  * University Copyright- Copyright (c) 1982, 1986, 1988
32*7c478bd9Sstevel@tonic-gate  * The Regents of the University of California
33*7c478bd9Sstevel@tonic-gate  * All Rights Reserved
34*7c478bd9Sstevel@tonic-gate  *
35*7c478bd9Sstevel@tonic-gate  * University Acknowledgment- Portions of this document are derived from
36*7c478bd9Sstevel@tonic-gate  * software developed by the University of California, Berkeley, and its
37*7c478bd9Sstevel@tonic-gate  * contributors.
38*7c478bd9Sstevel@tonic-gate  */
39*7c478bd9Sstevel@tonic-gate 
40*7c478bd9Sstevel@tonic-gate #ifndef _CURSHDR_H
41*7c478bd9Sstevel@tonic-gate #define	_CURSHDR_H
42*7c478bd9Sstevel@tonic-gate 
43*7c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
44*7c478bd9Sstevel@tonic-gate 
45*7c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
46*7c478bd9Sstevel@tonic-gate extern "C" {
47*7c478bd9Sstevel@tonic-gate #endif
48*7c478bd9Sstevel@tonic-gate 
49*7c478bd9Sstevel@tonic-gate #define	_NOHASH		(-1)	/* if the hash value is unknown */
50*7c478bd9Sstevel@tonic-gate #define	_REDRAW		(-2)	/* if line need redrawn */
51*7c478bd9Sstevel@tonic-gate #define	_BLANK		(-3)	/* if line is blank */
52*7c478bd9Sstevel@tonic-gate #define	_THASH		(123)	/* base hash if clash with other hashes */
53*7c478bd9Sstevel@tonic-gate #define	_KEY		(01)
54*7c478bd9Sstevel@tonic-gate #define	_MACRO		(02)
55*7c478bd9Sstevel@tonic-gate 
56*7c478bd9Sstevel@tonic-gate #define	_INPUTPENDING	cur_term->_iwait
57*7c478bd9Sstevel@tonic-gate #define	_PUTS(x, y)	(void) tputs(x, y, _outch)
58*7c478bd9Sstevel@tonic-gate #define	_VIDS(na, oa)	(vidupdate((na), (oa), _outch), curscr->_attrs = (na))
59*7c478bd9Sstevel@tonic-gate #define	_ONINSERT()	(_PUTS(enter_insert_mode, 1), SP->phys_irm = TRUE)
60*7c478bd9Sstevel@tonic-gate #define	_OFFINSERT()	(_PUTS(exit_insert_mode, 1), SP->phys_irm = FALSE)
61*7c478bd9Sstevel@tonic-gate #define	_STRNOTEQ(a, b)	(a == NULL ? (b != NULL) : \
62*7c478bd9Sstevel@tonic-gate 			    (b == NULL ? 1 : strcmp(a, b)))
63*7c478bd9Sstevel@tonic-gate 
64*7c478bd9Sstevel@tonic-gate /*
65*7c478bd9Sstevel@tonic-gate  * IC and IL overheads and costs should be set to this
66*7c478bd9Sstevel@tonic-gate  * value if the corresponding feature is missing
67*7c478bd9Sstevel@tonic-gate  */
68*7c478bd9Sstevel@tonic-gate 
69*7c478bd9Sstevel@tonic-gate #define	LARGECOST	500
70*7c478bd9Sstevel@tonic-gate 
71*7c478bd9Sstevel@tonic-gate typedef	struct
72*7c478bd9Sstevel@tonic-gate {
73*7c478bd9Sstevel@tonic-gate     short	icfixed;		/* Insert char fixed overhead */
74*7c478bd9Sstevel@tonic-gate     short	dcfixed;		/* Delete char fixed overhead */
75*7c478bd9Sstevel@tonic-gate     short	Insert_character;
76*7c478bd9Sstevel@tonic-gate     short	Delete_character;
77*7c478bd9Sstevel@tonic-gate     short	Cursor_home;
78*7c478bd9Sstevel@tonic-gate     short	Cursor_to_ll;
79*7c478bd9Sstevel@tonic-gate     short	Cursor_left;
80*7c478bd9Sstevel@tonic-gate     short	Cursor_right;
81*7c478bd9Sstevel@tonic-gate     short	Cursor_down;
82*7c478bd9Sstevel@tonic-gate     short	Cursor_up;
83*7c478bd9Sstevel@tonic-gate     short	Carriage_return;
84*7c478bd9Sstevel@tonic-gate     short	Tab;
85*7c478bd9Sstevel@tonic-gate     short	Back_tab;
86*7c478bd9Sstevel@tonic-gate     short	Clr_eol;
87*7c478bd9Sstevel@tonic-gate     short	Clr_bol;
88*7c478bd9Sstevel@tonic-gate     short	Parm_ich;
89*7c478bd9Sstevel@tonic-gate     short	Parm_dch;
90*7c478bd9Sstevel@tonic-gate     short	Parm_left_cursor;
91*7c478bd9Sstevel@tonic-gate     short	Parm_up_cursor;
92*7c478bd9Sstevel@tonic-gate     short	Parm_down_cursor;
93*7c478bd9Sstevel@tonic-gate     short	Parm_right_cursor;
94*7c478bd9Sstevel@tonic-gate     short	Cursor_address;
95*7c478bd9Sstevel@tonic-gate     short	Row_address;
96*7c478bd9Sstevel@tonic-gate } COSTS;
97*7c478bd9Sstevel@tonic-gate 
98*7c478bd9Sstevel@tonic-gate #define	_COST(field)	(SP->term_costs.field)
99*7c478bd9Sstevel@tonic-gate 
100*7c478bd9Sstevel@tonic-gate /* Soft label keys */
101*7c478bd9Sstevel@tonic-gate 
102*7c478bd9Sstevel@tonic-gate #define	LABMAX	16	/* max number of labels allowed */
103*7c478bd9Sstevel@tonic-gate #define	LABLEN	8	/* max length of each label */
104*7c478bd9Sstevel@tonic-gate 
105*7c478bd9Sstevel@tonic-gate typedef	struct
106*7c478bd9Sstevel@tonic-gate {
107*7c478bd9Sstevel@tonic-gate     WINDOW	*_win;		/* the window to display labels */
108*7c478bd9Sstevel@tonic-gate     char	_ldis[LABMAX][LABLEN+1]; /* labels suitable to display */
109*7c478bd9Sstevel@tonic-gate     char	_lval[LABMAX][LABLEN+1]; /* labels' true values */
110*7c478bd9Sstevel@tonic-gate     short	_labx[LABMAX];	/* where to display labels */
111*7c478bd9Sstevel@tonic-gate     short	_num;		/* actual number of labels */
112*7c478bd9Sstevel@tonic-gate     short	_len;		/* real length of labels */
113*7c478bd9Sstevel@tonic-gate     bool	_changed;	/* TRUE if some labels changed */
114*7c478bd9Sstevel@tonic-gate     bool	_lch[LABMAX];	/* change status */
115*7c478bd9Sstevel@tonic-gate } SLK_MAP;
116*7c478bd9Sstevel@tonic-gate 
117*7c478bd9Sstevel@tonic-gate struct	screen
118*7c478bd9Sstevel@tonic-gate {
119*7c478bd9Sstevel@tonic-gate     unsigned	fl_echoit : 1;	/* in software echo mode */
120*7c478bd9Sstevel@tonic-gate     unsigned	fl_endwin : 2;	/* has called endwin */
121*7c478bd9Sstevel@tonic-gate     unsigned	fl_meta : 1;	/* in meta mode */
122*7c478bd9Sstevel@tonic-gate     unsigned	fl_nonl : 1;	/* do not xlate input \r-> \n */
123*7c478bd9Sstevel@tonic-gate     unsigned	yesidln : 1;	/* has idln capabilities */
124*7c478bd9Sstevel@tonic-gate     unsigned	dmode : 1;	/* Terminal has delete mode */
125*7c478bd9Sstevel@tonic-gate     unsigned	imode : 1;	/* Terminal has insert mode */
126*7c478bd9Sstevel@tonic-gate     unsigned	ichok : 1;	/* Terminal can insert characters */
127*7c478bd9Sstevel@tonic-gate     unsigned	dchok : 1;	/* Terminal can delete characters */
128*7c478bd9Sstevel@tonic-gate     unsigned	sid_equal : 1;	/* enter insert and delete mode equal */
129*7c478bd9Sstevel@tonic-gate     unsigned	eid_equal : 1;	/* exit insert and delete mode equal */
130*7c478bd9Sstevel@tonic-gate     unsigned	phys_irm : 1;	/* in insert mode or not */
131*7c478bd9Sstevel@tonic-gate     long	baud;		/* baud rate of this tty */
132*7c478bd9Sstevel@tonic-gate     short	kp_state;	/* 1 iff keypad is on, else 0 */
133*7c478bd9Sstevel@tonic-gate     short	Yabove;		/* How many lines are above stdscr */
134*7c478bd9Sstevel@tonic-gate     short	lsize;		/* How many lines decided by newscreen */
135*7c478bd9Sstevel@tonic-gate     short	csize;		/* How many columns decided by newscreen */
136*7c478bd9Sstevel@tonic-gate     short	tsize;		/* How big is a tab decided by newscreen */
137*7c478bd9Sstevel@tonic-gate     WINDOW	*std_scr;	/* primary output screen */
138*7c478bd9Sstevel@tonic-gate     WINDOW	*cur_scr;	/* what's physically on the screen */
139*7c478bd9Sstevel@tonic-gate     WINDOW	*virt_scr;	/* what's virtually on the screen */
140*7c478bd9Sstevel@tonic-gate     int		*cur_hash;	/* hash table of curscr */
141*7c478bd9Sstevel@tonic-gate     int		*virt_hash;	/* hash table of virtscr */
142*7c478bd9Sstevel@tonic-gate     TERMINAL	*tcap;		/* TERMINFO info */
143*7c478bd9Sstevel@tonic-gate     FILE	*term_file;	/* File to write on for output. */
144*7c478bd9Sstevel@tonic-gate     FILE	*input_file;	/* Where to get keyboard input */
145*7c478bd9Sstevel@tonic-gate     SLK_MAP	*slk;		/* Soft label information */
146*7c478bd9Sstevel@tonic-gate     char	**_mks;		/* marks, only used with xhp terminals */
147*7c478bd9Sstevel@tonic-gate     COSTS	term_costs;	/* costs of various capabilities */
148*7c478bd9Sstevel@tonic-gate     SGTTY	save_tty_buf;	/* saved termio state of this tty */
149*7c478bd9Sstevel@tonic-gate #ifdef	SYSV
150*7c478bd9Sstevel@tonic-gate     SGTTYS	save_tty_bufs;	/* saved termios state of this tty */
151*7c478bd9Sstevel@tonic-gate #endif
152*7c478bd9Sstevel@tonic-gate     char	**_color_mks;	/* marks, only used with color xhp terminals */
153*7c478bd9Sstevel@tonic-gate     unsigned long  _trap_mbe;		/* trap these mouse button events    */
154*7c478bd9Sstevel@tonic-gate     unsigned long  _map_mbe_to_key;	/* map selected buttons on top of    */
155*7c478bd9Sstevel@tonic-gate 					/* slk's to function keys */
156*7c478bd9Sstevel@tonic-gate };
157*7c478bd9Sstevel@tonic-gate 
158*7c478bd9Sstevel@tonic-gate extern	SCREEN	*SP;
159*7c478bd9Sstevel@tonic-gate extern	WINDOW	*_virtscr;
160*7c478bd9Sstevel@tonic-gate 
161*7c478bd9Sstevel@tonic-gate #ifdef	DEBUG
162*7c478bd9Sstevel@tonic-gate #ifndef	outf
163*7c478bd9Sstevel@tonic-gate extern	FILE	*outf;
164*7c478bd9Sstevel@tonic-gate #endif	/* outf */
165*7c478bd9Sstevel@tonic-gate #endif	/* DEBUG */
166*7c478bd9Sstevel@tonic-gate 
167*7c478bd9Sstevel@tonic-gate extern	short	cswidth[],	/* byte size of multi-byte chars */
168*7c478bd9Sstevel@tonic-gate 		_curs_scrwidth[];	/* display size */
169*7c478bd9Sstevel@tonic-gate extern	short	_csmax,
170*7c478bd9Sstevel@tonic-gate 		_scrmax;
171*7c478bd9Sstevel@tonic-gate extern	bool	_mbtrue;
172*7c478bd9Sstevel@tonic-gate 
173*7c478bd9Sstevel@tonic-gate #define	MBIT		0200		/* indicator for a multi-byte char */
174*7c478bd9Sstevel@tonic-gate #define	CBIT		002000000000	/* indicator for a continuing col */
175*7c478bd9Sstevel@tonic-gate #define	RBYTE(x)	((x) & 0377)
176*7c478bd9Sstevel@tonic-gate #define	LBYTE(x)	(((x) >> 8) & 0177)
177*7c478bd9Sstevel@tonic-gate #define	ISMBIT(x)	((x) & MBIT)
178*7c478bd9Sstevel@tonic-gate #define	SETMBIT(x)	((x) |= MBIT)
179*7c478bd9Sstevel@tonic-gate #define	CLRMBIT(x)	((x) &= ~MBIT)
180*7c478bd9Sstevel@tonic-gate #define	ISCBIT(x)	((x) & CBIT)
181*7c478bd9Sstevel@tonic-gate #define	SETCBIT(x)	((x) |= CBIT)
182*7c478bd9Sstevel@tonic-gate #define	CLRCBIT(x)	((x) &= ~CBIT)
183*7c478bd9Sstevel@tonic-gate #define	TYPE(x)		((x) == SS2 ? 1 : (x) == SS3 ? 2 : ISMBIT(x) ? 0 : 3)
184*7c478bd9Sstevel@tonic-gate #define	TRIM		037777777777	/* 0xFFFFFFFF */
185*7c478bd9Sstevel@tonic-gate 
186*7c478bd9Sstevel@tonic-gate /* terminfo magic number */
187*7c478bd9Sstevel@tonic-gate #define	MAGNUM	0432
188*7c478bd9Sstevel@tonic-gate 
189*7c478bd9Sstevel@tonic-gate /* curses screen dump magic number */
190*7c478bd9Sstevel@tonic-gate #define	SVR2_DUMP_MAGIC_NUMBER	0433
191*7c478bd9Sstevel@tonic-gate #define	SVR3_DUMP_MAGIC_NUMBER	0434
192*7c478bd9Sstevel@tonic-gate 
193*7c478bd9Sstevel@tonic-gate /* Getting the baud rate is different on the two systems. */
194*7c478bd9Sstevel@tonic-gate 
195*7c478bd9Sstevel@tonic-gate #ifdef	SYSV
196*7c478bd9Sstevel@tonic-gate #define	_BR(x)	(x.c_cflag & CBAUD)
197*7c478bd9Sstevel@tonic-gate #define	_BRS(x)	(cfgetospeed(&x))
198*7c478bd9Sstevel@tonic-gate #include	<values.h>
199*7c478bd9Sstevel@tonic-gate #else	/* SYSV */
200*7c478bd9Sstevel@tonic-gate #define	BITSPERBYTE	8
201*7c478bd9Sstevel@tonic-gate #define	MAXINT		32767
202*7c478bd9Sstevel@tonic-gate #define	_BR(x)	(x.sg_ispeed)
203*7c478bd9Sstevel@tonic-gate #endif	/* SYSV */
204*7c478bd9Sstevel@tonic-gate 
205*7c478bd9Sstevel@tonic-gate #define	_BLNKCHAR	' '
206*7c478bd9Sstevel@tonic-gate #define	_CTRL(c)	(c | 0100)
207*7c478bd9Sstevel@tonic-gate #define	_ATTR(c)	((c) & A_ATTRIBUTES)
208*7c478bd9Sstevel@tonic-gate #define	_CHAR(c)	((c) & A_CHARTEXT)
209*7c478bd9Sstevel@tonic-gate 
210*7c478bd9Sstevel@tonic-gate /*
211*7c478bd9Sstevel@tonic-gate  *	combine CHAR par of the character with the attributes of the window.
212*7c478bd9Sstevel@tonic-gate  *	Two points: 1) If character is blank, usebackground instead
213*7c478bd9Sstevel@tonic-gate  *		    2) If character contains color, delete color from
214*7c478bd9Sstevel@tonic-gate  *			window attribute.
215*7c478bd9Sstevel@tonic-gate  */
216*7c478bd9Sstevel@tonic-gate 
217*7c478bd9Sstevel@tonic-gate #define	_WCHAR(w, c)    (_CHAR((c) == _BLNKCHAR ? (w)->_bkgd : (c))| \
218*7c478bd9Sstevel@tonic-gate 			    (((c) & A_COLOR) ? ((w)->_attrs & ~A_COLOR) : \
219*7c478bd9Sstevel@tonic-gate 			    ((w)->_attrs)))
220*7c478bd9Sstevel@tonic-gate 
221*7c478bd9Sstevel@tonic-gate #define	_DARKCHAR(c)	((c) != _BLNKCHAR)
222*7c478bd9Sstevel@tonic-gate #define	_UNCTRL(c)	((c) ^ 0100)
223*7c478bd9Sstevel@tonic-gate 
224*7c478bd9Sstevel@tonic-gate /* blank lines info of curscr */
225*7c478bd9Sstevel@tonic-gate #define	_BEGNS		curscr->_firstch
226*7c478bd9Sstevel@tonic-gate #define	_ENDNS		curscr->_lastch
227*7c478bd9Sstevel@tonic-gate 
228*7c478bd9Sstevel@tonic-gate /* hash tables */
229*7c478bd9Sstevel@tonic-gate #define	_CURHASH	SP->cur_hash
230*7c478bd9Sstevel@tonic-gate #define	_VIRTHASH	SP->virt_hash
231*7c478bd9Sstevel@tonic-gate 
232*7c478bd9Sstevel@tonic-gate /* top/bot line changed */
233*7c478bd9Sstevel@tonic-gate #define	_VIRTTOP	_virtscr->_parx
234*7c478bd9Sstevel@tonic-gate #define	_VIRTBOT	_virtscr->_pary
235*7c478bd9Sstevel@tonic-gate 
236*7c478bd9Sstevel@tonic-gate /* video marks */
237*7c478bd9Sstevel@tonic-gate #define	_MARKS		SP->_mks
238*7c478bd9Sstevel@tonic-gate #define	_COLOR_MARKS	SP->_color_mks
239*7c478bd9Sstevel@tonic-gate 
240*7c478bd9Sstevel@tonic-gate #define	_NUMELEMENTS(x)	(sizeof (x)/sizeof (x[0]))
241*7c478bd9Sstevel@tonic-gate 
242*7c478bd9Sstevel@tonic-gate #ifdef	_VR3_COMPAT_CODE
243*7c478bd9Sstevel@tonic-gate /*
244*7c478bd9Sstevel@tonic-gate  * #define	_TO_OCHTYPE(x)		((_ochtype)(((x&A_ATTRIBUTES)>>9)| \
245*7c478bd9Sstevel@tonic-gate  * 						(x&0x0000007FUL)))
246*7c478bd9Sstevel@tonic-gate  */
247*7c478bd9Sstevel@tonic-gate #define	_TO_OCHTYPE(x)		((_ochtype)(((x&A_ATTRIBUTES)>>9)|(x&0177)))
248*7c478bd9Sstevel@tonic-gate #define	_FROM_OCHTYPE(x)	((chtype) ((x&0177) | ((x&0177600)<<9)))
249*7c478bd9Sstevel@tonic-gate extern	void	(*_y16update)(WINDOW *, int, int, int, int);
250*7c478bd9Sstevel@tonic-gate #endif	/* _VR3_COMPAT_CODE */
251*7c478bd9Sstevel@tonic-gate 
252*7c478bd9Sstevel@tonic-gate /* functions for screen updates */
253*7c478bd9Sstevel@tonic-gate 
254*7c478bd9Sstevel@tonic-gate extern	int	(*_setidln)(void);
255*7c478bd9Sstevel@tonic-gate extern	int	(*_useidln)(void);
256*7c478bd9Sstevel@tonic-gate extern	int	(*_quick_ptr)(WINDOW *, chtype);
257*7c478bd9Sstevel@tonic-gate extern	int	(_quick_echo)(WINDOW *, chtype);
258*7c478bd9Sstevel@tonic-gate 
259*7c478bd9Sstevel@tonic-gate /* min/max functions */
260*7c478bd9Sstevel@tonic-gate 
261*7c478bd9Sstevel@tonic-gate #define	_MIN(a, b)	((a) < (b) ? (a) : (b))
262*7c478bd9Sstevel@tonic-gate #define	_MAX(a, b)	((a) > (b) ? (a) : (b))
263*7c478bd9Sstevel@tonic-gate 
264*7c478bd9Sstevel@tonic-gate extern	int	(*_do_slk_ref)(void);
265*7c478bd9Sstevel@tonic-gate extern	int	(*_do_slk_tch)(void);
266*7c478bd9Sstevel@tonic-gate extern	int	(*_do_slk_noref)(void);
267*7c478bd9Sstevel@tonic-gate extern	int	_image(WINDOW *);
268*7c478bd9Sstevel@tonic-gate extern	int	_outch(char);
269*7c478bd9Sstevel@tonic-gate extern	int	_outwch(chtype);
270*7c478bd9Sstevel@tonic-gate extern	int	_chkinput(void);
271*7c478bd9Sstevel@tonic-gate extern	int	_curs_mbtowc(wchar_t *, const char *, size_t);
272*7c478bd9Sstevel@tonic-gate extern	int	_curs_wctomb(char *, wchar_t);
273*7c478bd9Sstevel@tonic-gate extern	int	_delay(int, int (*)(char));
274*7c478bd9Sstevel@tonic-gate extern	int	_mbaddch(WINDOW *, chtype, chtype);
275*7c478bd9Sstevel@tonic-gate extern	int	_mbclrch(WINDOW *, int, int);
276*7c478bd9Sstevel@tonic-gate extern	int	_mbinsshift(WINDOW *, int), _mbvalid(WINDOW *);
277*7c478bd9Sstevel@tonic-gate extern	int	_padjust(WINDOW *, int, int, int, int, int, int);
278*7c478bd9Sstevel@tonic-gate extern	int	_prefresh(int (*)(WINDOW *), WINDOW *, int, int, int,
279*7c478bd9Sstevel@tonic-gate 		int, int, int);
280*7c478bd9Sstevel@tonic-gate extern	int	_overlap(WINDOW *, WINDOW *, int);
281*7c478bd9Sstevel@tonic-gate extern	int	_scr_all(char *, int);
282*7c478bd9Sstevel@tonic-gate extern	int	_slk_update(void);
283*7c478bd9Sstevel@tonic-gate extern	int	_tcsearch(char *, short [], char *[], int, int);
284*7c478bd9Sstevel@tonic-gate extern	int	_vsscanf(char *, char *, __va_list);
285*7c478bd9Sstevel@tonic-gate extern	int	force_doupdate(void);
286*7c478bd9Sstevel@tonic-gate extern	int	init_acs(void);
287*7c478bd9Sstevel@tonic-gate extern	int	mbscrw(int);
288*7c478bd9Sstevel@tonic-gate extern	int	mbeucw(int);
289*7c478bd9Sstevel@tonic-gate extern	int	scr_ll_dump(FILE *);
290*7c478bd9Sstevel@tonic-gate extern	int	scr_reset(FILE *, int);
291*7c478bd9Sstevel@tonic-gate extern	int	setkeymap(void);
292*7c478bd9Sstevel@tonic-gate extern	int	ttimeout(int);
293*7c478bd9Sstevel@tonic-gate extern	int	wadjcurspos(WINDOW *);
294*7c478bd9Sstevel@tonic-gate extern	int	wcscrw(wchar_t);
295*7c478bd9Sstevel@tonic-gate extern	int	wmbmove(WINDOW *, int, int);
296*7c478bd9Sstevel@tonic-gate 
297*7c478bd9Sstevel@tonic-gate extern	chtype	tgetch(int);
298*7c478bd9Sstevel@tonic-gate 
299*7c478bd9Sstevel@tonic-gate extern	WINDOW	*_makenew(int, int, int, int);
300*7c478bd9Sstevel@tonic-gate 
301*7c478bd9Sstevel@tonic-gate extern	void	(*_slk_init)(void);
302*7c478bd9Sstevel@tonic-gate extern	void	(*_rip_init)(void);
303*7c478bd9Sstevel@tonic-gate extern	void	delkeymap(TERMINAL *);
304*7c478bd9Sstevel@tonic-gate extern	void	mbgetwidth(void);
305*7c478bd9Sstevel@tonic-gate extern	void	memSset(chtype *, chtype, int);
306*7c478bd9Sstevel@tonic-gate extern	void	_blast_keys(TERMINAL *);
307*7c478bd9Sstevel@tonic-gate extern	void	_init_costs(void);
308*7c478bd9Sstevel@tonic-gate extern	void	_init_HP_pair(short, short, short);
309*7c478bd9Sstevel@tonic-gate extern	void	_update_old_y_area(WINDOW *, int, int, int, int);
310*7c478bd9Sstevel@tonic-gate 
311*7c478bd9Sstevel@tonic-gate extern	char    *tparm_p0(char *);
312*7c478bd9Sstevel@tonic-gate extern	char    *tparm_p1(char *, long);
313*7c478bd9Sstevel@tonic-gate extern	char    *tparm_p2(char *, long, long);
314*7c478bd9Sstevel@tonic-gate extern	char    *tparm_p3(char *, long, long, long);
315*7c478bd9Sstevel@tonic-gate extern	char    *tparm_p4(char *, long, long, long, long);
316*7c478bd9Sstevel@tonic-gate extern	char    *tparm_p7(char *, long, long, long, long, long, long, long);
317*7c478bd9Sstevel@tonic-gate 
318*7c478bd9Sstevel@tonic-gate 
319*7c478bd9Sstevel@tonic-gate extern	char	*infotocap(char *, int *);
320*7c478bd9Sstevel@tonic-gate extern	char	*_strcode2byte(wchar_t *, char *, int);
321*7c478bd9Sstevel@tonic-gate extern	char	*wmbinch(WINDOW *, int, int);
322*7c478bd9Sstevel@tonic-gate 
323*7c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
324*7c478bd9Sstevel@tonic-gate }
325*7c478bd9Sstevel@tonic-gate #endif
326*7c478bd9Sstevel@tonic-gate 
327*7c478bd9Sstevel@tonic-gate #endif	/* _CURSHDR_H */
328