xref: /illumos-gate/usr/src/lib/libeti/form/inc/utility.h (revision 1da57d55)
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 /*	Copyright (c) 1988 AT&T	*/
23*7c478bd9Sstevel@tonic-gate /*	  All Rights Reserved  	*/
24*7c478bd9Sstevel@tonic-gate 
25*7c478bd9Sstevel@tonic-gate 
26*7c478bd9Sstevel@tonic-gate /*
27*7c478bd9Sstevel@tonic-gate  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
28*7c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
29*7c478bd9Sstevel@tonic-gate  */
30*7c478bd9Sstevel@tonic-gate 
31*7c478bd9Sstevel@tonic-gate #ifndef	_UTILITY_H
32*7c478bd9Sstevel@tonic-gate #define	_UTILITY_H
33*7c478bd9Sstevel@tonic-gate 
34*7c478bd9Sstevel@tonic-gate #include <form.h>
35*7c478bd9Sstevel@tonic-gate #include <memory.h>
36*7c478bd9Sstevel@tonic-gate #include <string.h>
37*7c478bd9Sstevel@tonic-gate #include <ctype.h>
38*7c478bd9Sstevel@tonic-gate #include <stdarg.h>
39*7c478bd9Sstevel@tonic-gate #include <sys/types.h>
40*7c478bd9Sstevel@tonic-gate 
41*7c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
42*7c478bd9Sstevel@tonic-gate extern "C" {
43*7c478bd9Sstevel@tonic-gate #endif
44*7c478bd9Sstevel@tonic-gate 
45*7c478bd9Sstevel@tonic-gate /* miscellaneous #defines */
46*7c478bd9Sstevel@tonic-gate typedef	int		BOOLEAN;
47*7c478bd9Sstevel@tonic-gate 
48*7c478bd9Sstevel@tonic-gate #define	MIN(x, y)		((x) < (y) ? (x) : (y))
49*7c478bd9Sstevel@tonic-gate 
50*7c478bd9Sstevel@tonic-gate /* form status flags */
51*7c478bd9Sstevel@tonic-gate #define	POSTED			0x0001	/* posted flag			*/
52*7c478bd9Sstevel@tonic-gate #define	DRIVER			0x0002	/* inside init/term routine	*/
53*7c478bd9Sstevel@tonic-gate #define	OVERLAY			0x0004	/* insert/overlay mode		*/
54*7c478bd9Sstevel@tonic-gate #define	WIN_CHG			0x0010	/* window change (system flag)	*/
55*7c478bd9Sstevel@tonic-gate #define	BUF_CHG			0x0020	/* buffer change (system flag)	*/
56*7c478bd9Sstevel@tonic-gate /* field status flags */
57*7c478bd9Sstevel@tonic-gate #define	USR_CHG			0x0001	/* buffer change (user's flag)	*/
58*7c478bd9Sstevel@tonic-gate #define	TOP_CHG			0x0002	/* toprow change (system flag)	*/
59*7c478bd9Sstevel@tonic-gate #define	NEW_PAGE		0x0004	/* new page (system flag)	*/
60*7c478bd9Sstevel@tonic-gate #define	GROWABLE		0x0008	/* growable page (system flag)	*/
61*7c478bd9Sstevel@tonic-gate /* field type status flags */
62*7c478bd9Sstevel@tonic-gate #define	LINKED			0x0001	/* conjunctive field type	*/
63*7c478bd9Sstevel@tonic-gate #define	ARGS			0x0002	/* has additional arguments	*/
64*7c478bd9Sstevel@tonic-gate #define	CHOICE			0x0004	/* has choice functions		*/
65*7c478bd9Sstevel@tonic-gate /* form/field/fieldtype status manipulation macros */
66*7c478bd9Sstevel@tonic-gate #define	Status(f, s)		((f) -> status & (s))
67*7c478bd9Sstevel@tonic-gate #define	Set(f, s)		((f) -> status |= (s))
68*7c478bd9Sstevel@tonic-gate #define	Clr(f, s)		((f) -> status &= ~(s))
69*7c478bd9Sstevel@tonic-gate /* form/field option manipulation macros */
70*7c478bd9Sstevel@tonic-gate #define	Opt(f, x)		((f) -> opts & (x))
71*7c478bd9Sstevel@tonic-gate /* alloc/free with check */
72*7c478bd9Sstevel@tonic-gate #define	Alloc(x, t)		((x = (t *) malloc(sizeof (t))) != (t *)0)
73*7c478bd9Sstevel@tonic-gate #define	arrayAlloc(x, n, t)	((x = (t *) malloc((n) * sizeof (t))) != \
74*7c478bd9Sstevel@tonic-gate 				(t *)0)
75*7c478bd9Sstevel@tonic-gate #define	Free(x)			{ if (x) free(x); }
76*7c478bd9Sstevel@tonic-gate /* field type macros */
77*7c478bd9Sstevel@tonic-gate #define	MakeArg(f, p, err)	(_makearg((f) -> type, p, err))
78*7c478bd9Sstevel@tonic-gate #define	CopyArg(f, err)		(_copyarg((f) -> type, (f) -> arg, err))
79*7c478bd9Sstevel@tonic-gate #define	FreeArg(f)		(_freearg((f) -> type, (f) -> arg))
80*7c478bd9Sstevel@tonic-gate #define	CheckField(f)		(_checkfield((f) -> type, (f), (f) -> arg))
81*7c478bd9Sstevel@tonic-gate #define	CheckChar(f, c)		(_checkchar((f) -> type, (c), (f) -> arg))
82*7c478bd9Sstevel@tonic-gate #define	NextChoice(f)		(_nextchoice((f) -> type, (f), (f) -> arg))
83*7c478bd9Sstevel@tonic-gate #define	PrevChoice(f)		(_prevchoice((f) -> type, (f), (f) -> arg))
84*7c478bd9Sstevel@tonic-gate #define	IncrType(type)		{ if (type) ++(type -> ref); }
85*7c478bd9Sstevel@tonic-gate #define	DecrType(type)		{ if (type) --(type -> ref); }
86*7c478bd9Sstevel@tonic-gate /* form/field init/term calls */
87*7c478bd9Sstevel@tonic-gate #define	init_field(f)		{					\
88*7c478bd9Sstevel@tonic-gate 					if ((f) -> fieldinit)		\
89*7c478bd9Sstevel@tonic-gate 					{				\
90*7c478bd9Sstevel@tonic-gate 						Set(f, DRIVER);	\
91*7c478bd9Sstevel@tonic-gate 						(*(f) -> fieldinit)(f);	\
92*7c478bd9Sstevel@tonic-gate 						Clr(f, DRIVER);	\
93*7c478bd9Sstevel@tonic-gate 					}				\
94*7c478bd9Sstevel@tonic-gate 				}
95*7c478bd9Sstevel@tonic-gate #define	term_field(f)		{					\
96*7c478bd9Sstevel@tonic-gate 					if ((f) -> fieldterm)		\
97*7c478bd9Sstevel@tonic-gate 					{				\
98*7c478bd9Sstevel@tonic-gate 						Set(f, DRIVER);	\
99*7c478bd9Sstevel@tonic-gate 						(*(f) -> fieldterm)(f);	\
100*7c478bd9Sstevel@tonic-gate 						Clr(f, DRIVER);	\
101*7c478bd9Sstevel@tonic-gate 					}				\
102*7c478bd9Sstevel@tonic-gate 				}
103*7c478bd9Sstevel@tonic-gate #define	init_form(f)		{					\
104*7c478bd9Sstevel@tonic-gate 					if ((f) -> forminit)		\
105*7c478bd9Sstevel@tonic-gate 					{				\
106*7c478bd9Sstevel@tonic-gate 						Set(f, DRIVER);	\
107*7c478bd9Sstevel@tonic-gate 						(*(f) -> forminit)(f);	\
108*7c478bd9Sstevel@tonic-gate 						Clr(f, DRIVER);	\
109*7c478bd9Sstevel@tonic-gate 					}				\
110*7c478bd9Sstevel@tonic-gate 				}
111*7c478bd9Sstevel@tonic-gate #define	term_form(f)		{					\
112*7c478bd9Sstevel@tonic-gate 					if ((f) -> formterm)		\
113*7c478bd9Sstevel@tonic-gate 					{				\
114*7c478bd9Sstevel@tonic-gate 						Set(f, DRIVER);	\
115*7c478bd9Sstevel@tonic-gate 						(*(f) -> formterm)(f);	\
116*7c478bd9Sstevel@tonic-gate 						Clr(f, DRIVER);	\
117*7c478bd9Sstevel@tonic-gate 					}				\
118*7c478bd9Sstevel@tonic-gate 				}
119*7c478bd9Sstevel@tonic-gate /* page macros */
120*7c478bd9Sstevel@tonic-gate #define	P(f)			((f) -> curpage)
121*7c478bd9Sstevel@tonic-gate #define	Pmin(f, p)		((f) -> page [p].pmin)
122*7c478bd9Sstevel@tonic-gate #define	Pmax(f, p)		((f) -> page [p].pmax)
123*7c478bd9Sstevel@tonic-gate #define	Smin(f,	p)		((f) -> page [p].smin)
124*7c478bd9Sstevel@tonic-gate #define	Smax(f, p)		((f) -> page [p].smax)
125*7c478bd9Sstevel@tonic-gate /* form macros */
126*7c478bd9Sstevel@tonic-gate #define	Form(f)			((f) ? (f) : _DEFAULT_FORM)
127*7c478bd9Sstevel@tonic-gate #define	ValidIndex(f, i)	((i) >= 0 && (i) < (f) -> maxfield)
128*7c478bd9Sstevel@tonic-gate #define	ValidPage(f, i)		((i) >= 0 && (i) < (f) -> maxpage)
129*7c478bd9Sstevel@tonic-gate #define	C(f)			((f) -> current)
130*7c478bd9Sstevel@tonic-gate #define	W(f)			((f) -> w)
131*7c478bd9Sstevel@tonic-gate #define	X(f)			((f) -> curcol)
132*7c478bd9Sstevel@tonic-gate #define	Y(f)			((f) -> currow)
133*7c478bd9Sstevel@tonic-gate #define	T(f)			((f) -> toprow)
134*7c478bd9Sstevel@tonic-gate #define	B(f)			((f) -> begincol)
135*7c478bd9Sstevel@tonic-gate #define	Xmax(f)			(C(f) -> dcols)
136*7c478bd9Sstevel@tonic-gate #define	Ymax(f)			(C(f) -> drows)
137*7c478bd9Sstevel@tonic-gate #define	Win(f)			((f) -> win ? (f) -> win : stdscr)
138*7c478bd9Sstevel@tonic-gate #define	Sub(f)			((f) -> sub ? (f) -> sub : Win(f))
139*7c478bd9Sstevel@tonic-gate /* field macros */
140*7c478bd9Sstevel@tonic-gate #define	Field(f)		((f) ? (f) : _DEFAULT_FIELD)
141*7c478bd9Sstevel@tonic-gate #define	Buf(f)			((f) -> buf)
142*7c478bd9Sstevel@tonic-gate #define	OneRow(f)		((f)->rows + (f)->nrow == 1)
143*7c478bd9Sstevel@tonic-gate #define	GrowSize(f)		(((f) -> rows + (f) -> nrow) * (f) -> cols)
144*7c478bd9Sstevel@tonic-gate #define	BufSize(f)		((f) -> drows  * (f) -> dcols)
145*7c478bd9Sstevel@tonic-gate #define	Buffer(f, n)		(Buf(f) + (n) * (BufSize(f) + 1))
146*7c478bd9Sstevel@tonic-gate #define	LineBuf(f, n)		(Buf(f) + (n) * (f) -> dcols)
147*7c478bd9Sstevel@tonic-gate #define	TotalBuf(f)		((BufSize(f) + 1) * ((f) -> nbuf + 1))
148*7c478bd9Sstevel@tonic-gate #define	Just(f)			((f) -> just)
149*7c478bd9Sstevel@tonic-gate #define	Fore(f)			((f) -> fore)
150*7c478bd9Sstevel@tonic-gate #define	Back(f)			((f) -> back)
151*7c478bd9Sstevel@tonic-gate #define	Pad(f)			((f) -> pad)
152*7c478bd9Sstevel@tonic-gate /* system externs */
153*7c478bd9Sstevel@tonic-gate extern int	_next_page(FORM *);		/* REQ_NEXT_PAGE	*/
154*7c478bd9Sstevel@tonic-gate extern int	_prev_page(FORM *);		/* REQ_PREV_PAGE	*/
155*7c478bd9Sstevel@tonic-gate extern int	_first_page(FORM *);		/* REQ_FIRST_PAGE	*/
156*7c478bd9Sstevel@tonic-gate extern int	_last_page(FORM *);		/* REQ_LAST_PAGE	*/
157*7c478bd9Sstevel@tonic-gate 
158*7c478bd9Sstevel@tonic-gate extern int	_next_field(FORM *);		/* REQ_NEXT_FIELD	*/
159*7c478bd9Sstevel@tonic-gate extern int	_prev_field(FORM *);		/* REQ_PREV_FIELD	*/
160*7c478bd9Sstevel@tonic-gate extern int	_first_field(FORM *);		/* REQ_FIRST_FIELD	*/
161*7c478bd9Sstevel@tonic-gate extern int	_last_field(FORM *);		/* REQ_LAST_FIELD	*/
162*7c478bd9Sstevel@tonic-gate extern int	_snext_field(FORM *);		/* REQ_SNEXT_FIELD	*/
163*7c478bd9Sstevel@tonic-gate extern int	_sprev_field(FORM *);		/* REQ_SPREV_FIELD	*/
164*7c478bd9Sstevel@tonic-gate extern int	_sfirst_field(FORM *);		/* REQ_SFIRST_FIELD	*/
165*7c478bd9Sstevel@tonic-gate extern int	_slast_field(FORM *);		/* REQ_SLAST_FIELD	*/
166*7c478bd9Sstevel@tonic-gate extern int	_left_field(FORM *);		/* REQ_LEFT_FIELD	*/
167*7c478bd9Sstevel@tonic-gate extern int	_right_field(FORM *);		/* REQ_RIGHT_FIELD	*/
168*7c478bd9Sstevel@tonic-gate extern int	_up_field(FORM *);		/* REQ_UP_FIELD		*/
169*7c478bd9Sstevel@tonic-gate extern int	_down_field(FORM *);		/* REQ_DOWN_FIELD	*/
170*7c478bd9Sstevel@tonic-gate 
171*7c478bd9Sstevel@tonic-gate extern int	_next_char(FORM *);		/* REQ_NEXT_CHAR	*/
172*7c478bd9Sstevel@tonic-gate extern int	_prev_char(FORM *);		/* REQ_PREV_CHAR	*/
173*7c478bd9Sstevel@tonic-gate extern int	_next_line(FORM *);		/* REQ_NEXT_LINE	*/
174*7c478bd9Sstevel@tonic-gate extern int	_prev_line(FORM *);		/* REQ_PREV_LINE	*/
175*7c478bd9Sstevel@tonic-gate extern int	_next_word(FORM *);		/* REQ_NEXT_WORD	*/
176*7c478bd9Sstevel@tonic-gate extern int	_prev_word(FORM *);		/* REQ_PREV_WORD	*/
177*7c478bd9Sstevel@tonic-gate extern int	_beg_field(FORM *);		/* REQ_BEG_FIELD	*/
178*7c478bd9Sstevel@tonic-gate extern int	_end_field(FORM *);		/* REQ_END_FIELD	*/
179*7c478bd9Sstevel@tonic-gate extern int	_beg_line(FORM *);		/* REQ_BEG_LINE		*/
180*7c478bd9Sstevel@tonic-gate extern int	_end_line(FORM *);		/* REQ_END_LINE		*/
181*7c478bd9Sstevel@tonic-gate extern int	_left_char(FORM *);		/* REQ_LEFT_CHAR	*/
182*7c478bd9Sstevel@tonic-gate extern int	_right_char(FORM *);		/* REQ_RIGHT_CHAR	*/
183*7c478bd9Sstevel@tonic-gate extern int	_up_char(FORM *);		/* REQ_UP_CHAR		*/
184*7c478bd9Sstevel@tonic-gate extern int	_down_char(FORM *);		/* REQ_DOWN_CHAR	*/
185*7c478bd9Sstevel@tonic-gate 
186*7c478bd9Sstevel@tonic-gate extern int	_new_line(FORM *);		/* REQ_NEW_LINE		*/
187*7c478bd9Sstevel@tonic-gate extern int	_ins_char(FORM *);		/* REQ_INS_CHAR		*/
188*7c478bd9Sstevel@tonic-gate extern int	_ins_line(FORM *);		/* REQ_INS_LINE		*/
189*7c478bd9Sstevel@tonic-gate extern int	_del_char(FORM *);		/* REQ_DEL_CHAR		*/
190*7c478bd9Sstevel@tonic-gate extern int	_del_prev(FORM *);		/* REQ_DEL_PREV		*/
191*7c478bd9Sstevel@tonic-gate extern int	_del_line(FORM *);		/* REQ_DEL_LINE		*/
192*7c478bd9Sstevel@tonic-gate extern int	_del_word(FORM *);		/* REQ_DEL_WORD		*/
193*7c478bd9Sstevel@tonic-gate extern int	_clr_eol(FORM *);		/* REQ_CLR_EOL		*/
194*7c478bd9Sstevel@tonic-gate extern int	_clr_eof(FORM *);		/* REQ_CLR_EOF		*/
195*7c478bd9Sstevel@tonic-gate extern int	_clr_field(FORM *);		/* REQ_CLR_FIELD	*/
196*7c478bd9Sstevel@tonic-gate extern int	_ovl_mode(FORM *);		/* REQ_OVL_MODE		*/
197*7c478bd9Sstevel@tonic-gate extern int	_ins_mode(FORM *);		/* REQ_INS_MODE		*/
198*7c478bd9Sstevel@tonic-gate extern int	_scr_fline(FORM *);		/* REQ_SCR_FLINE	*/
199*7c478bd9Sstevel@tonic-gate extern int	_scr_bline(FORM *);		/* REQ_SCR_BLINE	*/
200*7c478bd9Sstevel@tonic-gate extern int	_scr_fpage(FORM *);		/* REQ_SCR_FPAGE	*/
201*7c478bd9Sstevel@tonic-gate extern int	_scr_fhpage(FORM *);		/* REQ_SCR_FHPAGE	*/
202*7c478bd9Sstevel@tonic-gate extern int	_scr_bpage(FORM *);		/* REQ_SCR_BPAGE	*/
203*7c478bd9Sstevel@tonic-gate extern int	_scr_bhpage(FORM *);		/* REQ_SCR_BHPAGE	*/
204*7c478bd9Sstevel@tonic-gate 
205*7c478bd9Sstevel@tonic-gate extern int	_scr_fchar(FORM *);		/* REQ_SCR_FCHAR	*/
206*7c478bd9Sstevel@tonic-gate extern int	_scr_bchar(FORM *);		/* REQ_SCR_BCHAR	*/
207*7c478bd9Sstevel@tonic-gate extern int	_scr_hfline(FORM *);		/* REQ_SCR_HFLINE	*/
208*7c478bd9Sstevel@tonic-gate extern int	_scr_hbline(FORM *);		/* REQ_SCR_HBLINE	*/
209*7c478bd9Sstevel@tonic-gate extern int	_scr_hfhalf(FORM *);		/* REQ_SCR_HFHALF	*/
210*7c478bd9Sstevel@tonic-gate extern int	_scr_hbhalf(FORM *);		/* REQ_SCR_HBHALF	*/
211*7c478bd9Sstevel@tonic-gate 
212*7c478bd9Sstevel@tonic-gate extern int	_validation(FORM *);		/* REQ_VALIDATION	*/
213*7c478bd9Sstevel@tonic-gate extern int	_next_choice(FORM *);		/* REQ_NEXT_CHOICE	*/
214*7c478bd9Sstevel@tonic-gate extern int	_prev_choice(FORM *);		/* REQ_PREV_CHOICE	*/
215*7c478bd9Sstevel@tonic-gate 
216*7c478bd9Sstevel@tonic-gate extern char *	_makearg(FIELDTYPE *, va_list *, int *);
217*7c478bd9Sstevel@tonic-gate extern char *	_copyarg(FIELDTYPE *, char *, int *);
218*7c478bd9Sstevel@tonic-gate extern void	_freearg(FIELDTYPE *,  char *);
219*7c478bd9Sstevel@tonic-gate extern int	_checkfield(FIELDTYPE *, FIELD *, char *);
220*7c478bd9Sstevel@tonic-gate extern int	_checkchar(FIELDTYPE *, int, char *);
221*7c478bd9Sstevel@tonic-gate extern int	_nextchoice(FIELDTYPE *, FIELD *, char *);
222*7c478bd9Sstevel@tonic-gate extern int	_prevchoice(FIELDTYPE *, FIELD *, char *);
223*7c478bd9Sstevel@tonic-gate 
224*7c478bd9Sstevel@tonic-gate extern BOOLEAN	_grow_field(FIELD *, int);
225*7c478bd9Sstevel@tonic-gate extern FIELD *	_first_active(FORM *);
226*7c478bd9Sstevel@tonic-gate extern char *	_data_beg(char *, int);
227*7c478bd9Sstevel@tonic-gate extern char *	_data_end(char *, int);
228*7c478bd9Sstevel@tonic-gate extern char *	_whsp_beg(char *, int);
229*7c478bd9Sstevel@tonic-gate extern char *	_whsp_end(char *, int);
230*7c478bd9Sstevel@tonic-gate extern void	_buf_to_win(FIELD *, WINDOW *);
231*7c478bd9Sstevel@tonic-gate extern void	_win_to_buf(WINDOW *, FIELD *);
232*7c478bd9Sstevel@tonic-gate extern void	_adjust_cursor(FORM *, char *);
233*7c478bd9Sstevel@tonic-gate extern void	_sync_buffer(FORM *);
234*7c478bd9Sstevel@tonic-gate extern int	_sync_linked(FIELD *);
235*7c478bd9Sstevel@tonic-gate extern int	_sync_field(FIELD *);
236*7c478bd9Sstevel@tonic-gate extern int	_sync_attrs(FIELD *);
237*7c478bd9Sstevel@tonic-gate extern int	_sync_opts(FIELD *, OPTIONS);
238*7c478bd9Sstevel@tonic-gate extern int	_validate(FORM *);
239*7c478bd9Sstevel@tonic-gate extern int	_set_current_field(FORM *, FIELD *);
240*7c478bd9Sstevel@tonic-gate extern int	_set_form_page(FORM *, int, FIELD *);
241*7c478bd9Sstevel@tonic-gate extern int	_pos_form_cursor(FORM *);
242*7c478bd9Sstevel@tonic-gate extern int	_update_current(FORM *);
243*7c478bd9Sstevel@tonic-gate extern int	_data_entry(FORM *, int);
244*7c478bd9Sstevel@tonic-gate extern int	_page_navigation(PTF_int, FORM *);
245*7c478bd9Sstevel@tonic-gate extern int	_field_navigation(PTF_int, FORM *);
246*7c478bd9Sstevel@tonic-gate extern int	_data_navigation(PTF_int, FORM *);
247*7c478bd9Sstevel@tonic-gate extern int	_data_manipulation(PTF_int, FORM *);
248*7c478bd9Sstevel@tonic-gate extern int	_misc_request(PTF_int, FORM *);
249*7c478bd9Sstevel@tonic-gate 
250*7c478bd9Sstevel@tonic-gate extern intptr_t	__execute(char *, char *);
251*7c478bd9Sstevel@tonic-gate extern intptr_t	__advance(char *, char *);
252*7c478bd9Sstevel@tonic-gate extern intptr_t	__xpop(intptr_t);
253*7c478bd9Sstevel@tonic-gate extern intptr_t	__xpush(intptr_t, char *);
254*7c478bd9Sstevel@tonic-gate extern intptr_t	__getrnge(intptr_t *, intptr_t *, char *);
255*7c478bd9Sstevel@tonic-gate extern intptr_t	__cclass(char *, char, intptr_t);
256*7c478bd9Sstevel@tonic-gate extern int	__size(char *);
257*7c478bd9Sstevel@tonic-gate extern int	__rpush(char *);
258*7c478bd9Sstevel@tonic-gate extern intptr_t	__rpop(void);
259*7c478bd9Sstevel@tonic-gate 
260*7c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
261*7c478bd9Sstevel@tonic-gate }
262*7c478bd9Sstevel@tonic-gate #endif
263*7c478bd9Sstevel@tonic-gate 
264*7c478bd9Sstevel@tonic-gate #endif	/* _UTILITY_H */
265