1 /* $Header: a2p.h,v 1.0 87/12/18 13:06:58 root Exp $
4 * Revision 1.0 87/12/18 13:06:58 root
157 extern char *opname[];
163 } ops[50000]; /* hope they have 200k to spare */
172 #include <sys/types.h>
173 #include <sys/stat.h>
175 #include <sys/times.h>
177 typedef struct string STR;
178 typedef struct htbl HASH;
183 /* A string is TRUE if not "" or "0". */
184 #define True(val) (tmps = (val), (*tmps && !(*tmps == '0' && !tmps[1])))
185 EXT char *Yes INIT("1");
186 EXT char *No INIT("");
188 #define str_true(str) (Str = (str), (Str->str_pok ? True(Str->str_ptr) : (Str->str_nok ? (Str->str_nval != 0.0) : 0 )))
190 #define str_peek(str) (Str = (str), (Str->str_pok ? Str->str_ptr : (Str->str_nok ? (sprintf(buf,"num(%g)",Str->str_nval),buf) : "" )))
191 #define str_get(str) (Str = (str), (Str->str_pok ? Str->str_ptr : str_2ptr(Str)))
192 #define str_gnum(str) (Str = (str), (Str->str_nok ? Str->str_nval : str_2num(Str)))
195 #define GROWSTR(pp,lp,len) if (*(lp) < (len)) growstr(pp,lp,len)
204 EXT int line INIT(0);
208 EXT char *bufptr INIT(buf);
210 EXT STR *linestr INIT(Nullstr);
212 EXT char tokenbuf[256];
213 EXT int expectterm INIT(TRUE);
216 EXT int debug INIT(0);
217 EXT int dlevel INIT(0);
222 EXT STR *freestrroot INIT(Nullstr);
227 EXT bool do_split INIT(FALSE);
228 EXT bool split_to_array INIT(FALSE);
229 EXT bool set_array_base INIT(FALSE);
230 EXT bool saw_RS INIT(FALSE);
231 EXT bool saw_OFS INIT(FALSE);
232 EXT bool saw_ORS INIT(FALSE);
233 EXT bool saw_line_op INIT(FALSE);
234 EXT bool in_begin INIT(TRUE);
235 EXT bool do_opens INIT(FALSE);
236 EXT bool do_fancy_opens INIT(FALSE);
237 EXT bool lval_field INIT(FALSE);
238 EXT bool do_chop INIT(FALSE);
239 EXT bool need_entire INIT(FALSE);
240 EXT bool absmaxfld INIT(FALSE);
242 EXT char const_FS INIT(0);
243 EXT char *namelist INIT(Nullch);
244 EXT char fswitch INIT(0);
246 EXT int saw_FS INIT(0);
247 EXT int maxfld INIT(0);
248 EXT int arymax INIT(0);