HARM
harm and utilities
 All Data Structures Files Functions Variables Typedefs Macros Pages
f2c.h
Go to the documentation of this file.
1 
9 #ifndef F2C_INCLUDE
10 #define F2C_INCLUDE
11 
12 typedef long int integer;
13 typedef unsigned long int uinteger;
14 typedef char *address;
15 typedef short int shortint;
16 typedef float real;
17 typedef double doublereal;
18 typedef struct { real r, i; } complex;
19 typedef struct { doublereal r, i; } doublecomplex;
20 typedef long int logical;
21 typedef short int shortlogical;
22 typedef char logical1;
23 typedef char integer1;
24 #ifdef INTEGER_STAR_8 /* Adjust for integer*8. */
25 typedef long long longint; /* system-dependent */
26 typedef unsigned long long ulongint; /* system-dependent */
27 #define qbit_clear(a,b) ((a) & ~((ulongint)1 << (b)))
28 #define qbit_set(a,b) ((a) | ((ulongint)1 << (b)))
29 #endif
30 
31 #define TRUE_ (1)
32 #define FALSE_ (0)
33 
34 /* Extern is for use with -E */
35 #ifndef Extern
36 #define Extern extern
37 #endif
38 
39 /* I/O stuff */
40 
41 #ifdef f2c_i2
42 /* for -i2 */
43 typedef short flag;
44 typedef short ftnlen;
45 typedef short ftnint;
46 #else
47 typedef long int flag;
48 typedef long int ftnlen;
49 typedef long int ftnint;
50 #endif
51 
52 /*external read, write*/
53 typedef struct
57  char *cifmt;
59 } cilist;
60 
61 /*internal read, write*/
62 typedef struct
64  char *iciunit;
66  char *icifmt;
69 } icilist;
70 
71 /*open*/
72 typedef struct
75  char *ofnm;
77  char *osta;
78  char *oacc;
79  char *ofm;
81  char *oblnk;
82 } olist;
83 
84 /*close*/
85 typedef struct
88  char *csta;
89 } cllist;
90 
91 /*rewind, backspace, endfile*/
92 typedef struct
95 } alist;
96 
97 /* inquire */
98 typedef struct
101  char *infile;
103  ftnint *inex; /*parameters in standard's order*/
107  char *inname;
109  char *inacc;
111  char *inseq;
113  char *indir;
115  char *infmt;
117  char *inform;
119  char *inunf;
123  char *inblank;
125 } inlist;
126 
127 #define VOID void
128 
129 union Multitype { /* for multiple entry points */
133  /* longint j; */
138 };
139 
140 typedef union Multitype Multitype;
141 
142 /*typedef long int Long;*/ /* No longer used; formerly in Namelist */
143 
144 struct Vardesc { /* for Namelist */
145  char *name;
146  char *addr;
148  int type;
149 };
150 typedef struct Vardesc Vardesc;
151 
152 struct Namelist {
153  char *name;
155  int nvars;
156 };
157 typedef struct Namelist Namelist;
158 
159 #define abs(x) ((x) >= 0 ? (x) : -(x))
160 #define dabs(x) (doublereal)abs(x)
161 #ifdef WIN32
162 #undef min
163 #undef max
164 #endif
165 #define min(a,b) ((a) <= (b) ? (a) : (b))
166 #define max(a,b) ((a) >= (b) ? (a) : (b))
167 #define dmin(a,b) (doublereal)min(a,b)
168 #define dmax(a,b) (doublereal)max(a,b)
169 #define bit_test(a,b) ((a) >> (b) & 1)
170 #define bit_clear(a,b) ((a) & ~((uinteger)1 << (b)))
171 #define bit_set(a,b) ((a) | ((uinteger)1 << (b)))
172 
173 /* procedure parameter types for -A and -C++ */
174 
175 #define F2C_proc_par_types 1
176 #ifdef __cplusplus
177 typedef int /* Unknown procedure type */ (*U_fp)(...);
178 typedef shortint (*J_fp)(...);
179 typedef integer (*I_fp)(...);
180 typedef real (*R_fp)(...);
181 typedef doublereal (*D_fp)(...), (*E_fp)(...);
182 typedef /* Complex */ VOID (*C_fp)(...);
183 typedef /* Double Complex */ VOID (*Z_fp)(...);
184 typedef logical (*L_fp)(...);
185 typedef shortlogical (*K_fp)(...);
186 typedef /* Character */ VOID (*H_fp)(...);
187 typedef /* Subroutine */ int (*S_fp)(...);
188 #else
189 typedef int /* Unknown procedure type */ (*U_fp)();
190 typedef shortint (*J_fp)();
191 typedef integer (*I_fp)();
192 typedef real (*R_fp)();
193 typedef doublereal (*D_fp)(), (*E_fp)();
194 typedef /* Complex */ VOID (*C_fp)();
195 typedef /* Double Complex */ VOID (*Z_fp)();
196 typedef logical (*L_fp)();
197 typedef shortlogical (*K_fp)();
198 typedef /* Character */ VOID (*H_fp)();
199 typedef /* Subroutine */ int (*S_fp)();
200 #endif
201 /* E_fp is for real functions when -R is not specified */
202 typedef VOID C_f; /* complex function */
203 typedef VOID H_f; /* character function */
204 typedef VOID Z_f; /* double complex function */
205 typedef doublereal E_f; /* real function with -R not specified */
206 
207 /* undef any lower-case symbols that your C compiler predefines, e.g.: */
208 
209 #ifndef Skip_f2c_Undefs
210 #undef cray
211 #undef gcos
212 #undef mc68010
213 #undef mc68020
214 #undef mips
215 #undef pdp11
216 #undef sgi
217 #undef sparc
218 #undef sun
219 #undef sun2
220 #undef sun3
221 #undef sun4
222 #undef u370
223 #undef u3b
224 #undef u3b2
225 #undef u3b5
226 #undef unix
227 #undef vax
228 #endif
229 #endif