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