1 /* 2 3 * Revision 1.2 1996/08/20 20:26:28 jaf 4 * Any typedef defining a type that was used in lpc10_encoder_state or 5 * lpc10_decoder_state struct's was commented out here and added to 6 * lpc10.h. 7 * 8 * Revision 1.1 1996/08/19 22:32:13 jaf 9 * Initial revision 10 * 11 12 */ 13 14 /* 15 * f2c.h 16 * 17 * SCCS ID: @(#)f2c.h 1.2 96/05/19 18 */ 19 20 /* f2c.h -- Standard Fortran to C header file */ 21 22 /** barf [ba:rf] 2. "He suggested using FORTRAN, and everybody barfed." 23 24 - From The Shogakukan DICTIONARY OF NEW ENGLISH (Second edition) */ 25 26 #ifndef F2C_INCLUDE 27 #define F2C_INCLUDE 28 29 #include "lpc10.h" 30 31 /*typedef long int integer;*/ 32 /*typedef INT32 integer;*/ 33 /*typedef short int shortint;*/ 34 /*typedef INT16 shortint;*/ 35 /*typedef float real;*/ 36 /* doublereal only used for function arguments to sqrt, exp, etc. */ 37 typedef double doublereal; 38 /* 32 bits seems wasteful, but there really aren't that many logical 39 * variables around, and making them 32 bits could avoid word 40 * alignment problems, perhaps. */ 41 /*typedef long int logical;*/ 42 /*typedef INT32 logical;*/ 43 /* The following types are not used in the translated C code for the 44 * LPC-10 coder, but they might be needed by the definitions down 45 * below, so they don't cause compilation errors. */ 46 typedef char *address; 47 typedef struct { real r, i; } complex; 48 typedef struct { doublereal r, i; } doublecomplex; 49 typedef short int shortlogical; 50 typedef char logical1; 51 typedef char integer1; 52 /* typedef long long longint; */ /* system-dependent */ 53 54 #define TRUE_ (1) 55 #define FALSE_ (0) 56 57 /* Extern is for use with -E */ 58 #ifndef Extern 59 #define Extern extern 60 #endif 61 62 /* I/O stuff */ 63 64 #ifdef f2c_i2 65 /* for -i2 */ 66 typedef short flag; 67 typedef short ftnlen; 68 typedef short ftnint; 69 #else 70 typedef long int flag; 71 typedef long int ftnlen; 72 typedef long int ftnint; 73 #endif 74 75 /*external read, write*/ 76 typedef struct 77 { flag cierr; 78 ftnint ciunit; 79 flag ciend; 80 char *cifmt; 81 ftnint cirec; 82 } cilist; 83 84 /*internal read, write*/ 85 typedef struct 86 { flag icierr; 87 char *iciunit; 88 flag iciend; 89 char *icifmt; 90 ftnint icirlen; 91 ftnint icirnum; 92 } icilist; 93 94 /*open*/ 95 typedef struct 96 { flag oerr; 97 ftnint ounit; 98 char *ofnm; 99 ftnlen ofnmlen; 100 char *osta; 101 char *oacc; 102 char *ofm; 103 ftnint orl; 104 char *oblnk; 105 } olist; 106 107 /*close*/ 108 typedef struct 109 { flag cerr; 110 ftnint cunit; 111 char *csta; 112 } cllist; 113 114 /*rewind, backspace, endfile*/ 115 typedef struct 116 { flag aerr; 117 ftnint aunit; 118 } alist; 119 120 /* inquire */ 121 typedef struct 122 { flag inerr; 123 ftnint inunit; 124 char *infile; 125 ftnlen infilen; 126 ftnint *inex; /*parameters in standard's order*/ 127 ftnint *inopen; 128 ftnint *innum; 129 ftnint *innamed; 130 char *inname; 131 ftnlen innamlen; 132 char *inacc; 133 ftnlen inacclen; 134 char *inseq; 135 ftnlen inseqlen; 136 char *indir; 137 ftnlen indirlen; 138 char *infmt; 139 ftnlen infmtlen; 140 char *inform; 141 ftnint informlen; 142 char *inunf; 143 ftnlen inunflen; 144 ftnint *inrecl; 145 ftnint *innrec; 146 char *inblank; 147 ftnlen inblanklen; 148 } inlist; 149 150 #define VOID void 151 152 union Multitype { /* for multiple entry points */ 153 integer1 g; 154 shortint h; 155 integer i; 156 /* longint j; */ 157 real r; 158 doublereal d; 159 complex c; 160 doublecomplex z; 161 }; 162 163 typedef union Multitype Multitype; 164 165 /*typedef long int Long;*/ /* No longer used; formerly in Namelist */ 166 167 struct Vardesc { /* for Namelist */ 168 char *name; 169 char *addr; 170 ftnlen *dims; 171 int type; 172 }; 173 typedef struct Vardesc Vardesc; 174 175 struct Namelist { 176 char *name; 177 Vardesc **vars; 178 int nvars; 179 }; 180 typedef struct Namelist Namelist; 181 182 #define abs(x) ((x) >= 0 ? (x) : -(x)) 183 #define dabs(x) (doublereal)abs(x) 184 #ifndef min 185 #define min(a,b) ((a) <= (b) ? (a) : (b)) 186 #endif 187 #ifndef max 188 #define max(a,b) ((a) >= (b) ? (a) : (b)) 189 #endif 190 #define dmin(a,b) (doublereal)min(a,b) 191 #define dmax(a,b) (doublereal)max(a,b) 192 193 /* undef any lower-case symbols that your C compiler predefines, e.g.: */ 194 195 #ifndef Skip_f2c_Undefs 196 #undef cray 197 #undef gcos 198 #undef mc68010 199 #undef mc68020 200 #undef mips 201 #undef pdp11 202 #undef sgi 203 #undef sparc 204 #undef sun 205 #undef sun2 206 #undef sun3 207 #undef sun4 208 #undef u370 209 #undef u3b 210 #undef u3b2 211 #undef u3b5 212 #undef unix 213 #undef vax 214 #endif 215 #endif 216