1 /*- 2 * Copyright (c) 1980 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * %sccs.include.proprietary.c% 6 * 7 * @(#)lio.h 5.4 (Berkeley) 04/12/91 8 */ 9 10 /* 11 * copy of ftypes from the compiler 12 * variable types numeric assumptions: 13 * int < reals < complexes 14 * TYDREAL-TYREAL = TYDCOMPLEX-TYCOMPLEX 15 */ 16 17 #define TYUNKNOWN 0 18 #define TYADDR 1 19 #define TYSHORT 2 20 #define TYLONG 3 21 #define TYREAL 4 22 #define TYDREAL 5 23 #define TYCOMPLEX 6 24 #define TYDCOMPLEX 7 25 #define TYLOGICAL 8 26 #define TYCHAR 9 27 #define TYSUBR 10 28 #define TYERROR 11 29 30 #define NTYPES (TYERROR+1) 31 32 #define LINE 80 33 #define LINTW (strlen(buf)) 34 #define LLOGW 3 35 #define LSTRW (len+2) 36 #define LLOW 1.0e-1 37 #define LHIGH 1.0e+6 /* 1.0e+LFD */ 38 #define LDHIGH 1.0e+14 /* 1.0e+LDFD */ 39 #define LFD 6 40 #define LFW (LFD+4) 41 #define LDFD 14 42 #define LDFW (LDFD+4) 43 #define LED LFD 44 #define LEW LFW+4 45 #define LEE 2 46 #define LDED LDFD 47 #define LDEW LDFW+4 48 #define LDEE 2 49 #define LCW (width(a)+width(b)+5) 50 #define LDCW (dwidth(a)+dwidth(b)+5) 51 52 #define abs(z) (z<0?-z:z) 53 #define width(z) ((z!=0.0 && (abs(z)>=LHIGH || abs(z)<LLOW))?LEW:LFW) 54 #define dwidth(z) ((z!=0.0 && (abs(z)>=LDHIGH || abs(z)<LLOW))?LDEW:LDFW) 55 #define ERR(x) if(n=(x)) err(n>0?errflag:endflag,n,"list io") 56 #define ERRCHK(x) if(n=(x)) goto got_err; 57 #define chk_len(w) if(recpos+w > line_len) PUT('\n'); 58 59 typedef union 60 { short flshort; 61 ftnint flint; 62 float flreal; 63 double fldouble; 64 } flex; 65 66 extern int (*lioproc)(); 67 extern flag leof; 68 extern ioflag lquit,l_first; 69 extern int lcount,line_len; 70