1 /* f2c.h -- Standard Fortran to C header file */
3 /** barf [ba:rf] 2. "He suggested using FORTRAN, and everybody barfed."
5 - From The Shogakukan DICTIONARY OF NEW ENGLISH (Second edition) */
10 /* F2C_INTEGER will normally be `int' but would be `long' on 16-bit systems */
11 /* we assume short, float are OK */
12 typedef @F2C_INTEGER@
/* long int */ integer
;
13 typedef unsigned @F2C_INTEGER@
/* long */ uinteger
;
14 typedef char *address
;
15 typedef short int shortint
;
17 typedef double doublereal
;
18 typedef struct { real r
, i
; } complex;
19 typedef struct { doublereal r
, i
; } doublecomplex
;
20 typedef @F2C_INTEGER@
/* long int */ logical
;
21 typedef short int shortlogical
;
22 typedef char logical1
;
23 typedef char integer1
;
24 typedef @F2C_LONGINT@
/* long long */ longint
; /* system-dependent */
25 typedef unsigned @F2C_LONGINT@
/* long long */ ulongint
; /* system-dependent */
26 #define qbit_clear(a,b) ((a) & ~((ulongint)1 << (b)))
27 #define qbit_set(a,b) ((a) | ((ulongint)1 << (b)))
32 /* Extern is for use with -E */
40 #error "f2c_i2 will not work with g77!!!!"
46 typedef @F2C_INTEGER@
/* long int */ flag
;
47 typedef @F2C_INTEGER@
/* long int */ ftnlen
;
48 typedef @F2C_INTEGER@
/* long int */ ftnint
;
51 /*external read, write*/
60 /*internal read, write*/
90 /*rewind, backspace, endfile*/
102 ftnint
*inex
; /*parameters in standard's order*/
128 union Multitype
{ /* for multiple entry points */
139 typedef union Multitype Multitype
;
141 /*typedef long int Long;*/ /* No longer used; formerly in Namelist */
143 struct Vardesc
{ /* for Namelist */
149 typedef struct Vardesc Vardesc
;
156 typedef struct Namelist Namelist
;
158 #define abs(x) ((x) >= 0 ? (x) : -(x))
159 #define dabs(x) (doublereal)abs(x)
160 #define min(a,b) ((a) <= (b) ? (a) : (b))
161 #define max(a,b) ((a) >= (b) ? (a) : (b))
162 #define dmin(a,b) (doublereal)min(a,b)
163 #define dmax(a,b) (doublereal)max(a,b)
164 #define bit_test(a,b) ((a) >> (b) & 1)
165 #define bit_clear(a,b) ((a) & ~((uinteger)1 << (b)))
166 #define bit_set(a,b) ((a) | ((uinteger)1 << (b)))
168 /* procedure parameter types for -A and -C++ */
170 #define F2C_proc_par_types 1
172 typedef int /* Unknown procedure type */ (*U_fp
)(...);
173 typedef shortint (*J_fp
)(...);
174 typedef integer (*I_fp
)(...);
175 typedef real (*R_fp
)(...);
176 typedef doublereal (*D_fp
)(...), (*E_fp
)(...);
177 typedef /* Complex */ VOID (*C_fp
)(...);
178 typedef /* Double Complex */ VOID (*Z_fp
)(...);
179 typedef logical (*L_fp
)(...);
180 typedef shortlogical (*K_fp
)(...);
181 typedef /* Character */ VOID (*H_fp
)(...);
182 typedef /* Subroutine */ int (*S_fp
)(...);
184 typedef int /* Unknown procedure type */ (*U_fp
)();
185 typedef shortint (*J_fp
)();
186 typedef integer (*I_fp
)();
187 typedef real (*R_fp
)();
188 typedef doublereal (*D_fp
)(), (*E_fp
)();
189 typedef /* Complex */ VOID (*C_fp
)();
190 typedef /* Double Complex */ VOID (*Z_fp
)();
191 typedef logical (*L_fp
)();
192 typedef shortlogical (*K_fp
)();
193 typedef /* Character */ VOID (*H_fp
)();
194 typedef /* Subroutine */ int (*S_fp
)();
196 /* E_fp is for real functions when -R is not specified */
197 typedef VOID C_f
; /* complex function */
198 typedef VOID H_f
; /* character function */
199 typedef VOID Z_f
; /* double complex function */
200 typedef doublereal E_f
; /* real function with -R not specified */
202 /* undef any lower-case symbols that your C compiler predefines, e.g.: */
204 #ifndef Skip_f2c_Undefs
205 /* (No such symbols should be defined in a strict ANSI C compiler.
206 We can avoid trouble with f2c-translated code by using
207 gcc -ansi [-traditional].) */