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