updated on Thu Jan 12 08:01:00 UTC 2012
[aur-mirror.git] / mando-git / f2c.h
blobf97272e1ec15be631fa83f9cbd85178e6983f4df
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) */
7 #ifndef F2C_INCLUDE
8 #define F2C_INCLUDE
10 typedef long int integer;
11 typedef unsigned long int uinteger;
12 typedef char *address;
13 typedef short int shortint;
14 typedef float real;
15 typedef double doublereal;
16 typedef struct { real r, i; } complex;
17 typedef struct { doublereal r, i; } doublecomplex;
18 typedef long int logical;
19 typedef short int shortlogical;
20 typedef char logical1;
21 typedef char integer1;
22 #ifdef INTEGER_STAR_8 /* Adjust for integer*8. */
23 typedef long long longint; /* system-dependent */
24 typedef unsigned long long ulongint; /* system-dependent */
25 #define qbit_clear(a,b) ((a) & ~((ulongint)1 << (b)))
26 #define qbit_set(a,b) ((a) | ((ulongint)1 << (b)))
27 #endif
29 #define TRUE_ (1)
30 #define FALSE_ (0)
32 /* Extern is for use with -E */
33 #ifndef Extern
34 #define Extern extern
35 #endif
37 /* I/O stuff */
39 #ifdef f2c_i2
40 /* for -i2 */
41 typedef short flag;
42 typedef short ftnlen;
43 typedef short ftnint;
44 #else
45 typedef long int flag;
46 typedef long int ftnlen;
47 typedef long int ftnint;
48 #endif
50 /*external read, write*/
51 typedef struct
52 { flag cierr;
53 ftnint ciunit;
54 flag ciend;
55 char *cifmt;
56 ftnint cirec;
57 } cilist;
59 /*internal read, write*/
60 typedef struct
61 { flag icierr;
62 char *iciunit;
63 flag iciend;
64 char *icifmt;
65 ftnint icirlen;
66 ftnint icirnum;
67 } icilist;
69 /*open*/
70 typedef struct
71 { flag oerr;
72 ftnint ounit;
73 char *ofnm;
74 ftnlen ofnmlen;
75 char *osta;
76 char *oacc;
77 char *ofm;
78 ftnint orl;
79 char *oblnk;
80 } olist;
82 /*close*/
83 typedef struct
84 { flag cerr;
85 ftnint cunit;
86 char *csta;
87 } cllist;
89 /*rewind, backspace, endfile*/
90 typedef struct
91 { flag aerr;
92 ftnint aunit;
93 } alist;
95 /* inquire */
96 typedef struct
97 { flag inerr;
98 ftnint inunit;
99 char *infile;
100 ftnlen infilen;
101 ftnint *inex; /*parameters in standard's order*/
102 ftnint *inopen;
103 ftnint *innum;
104 ftnint *innamed;
105 char *inname;
106 ftnlen innamlen;
107 char *inacc;
108 ftnlen inacclen;
109 char *inseq;
110 ftnlen inseqlen;
111 char *indir;
112 ftnlen indirlen;
113 char *infmt;
114 ftnlen infmtlen;
115 char *inform;
116 ftnint informlen;
117 char *inunf;
118 ftnlen inunflen;
119 ftnint *inrecl;
120 ftnint *innrec;
121 char *inblank;
122 ftnlen inblanklen;
123 } inlist;
125 #define VOID void
127 union Multitype { /* for multiple entry points */
128 integer1 g;
129 shortint h;
130 integer i;
131 /* longint j; */
132 real r;
133 doublereal d;
134 complex c;
135 doublecomplex z;
138 typedef union Multitype Multitype;
140 /*typedef long int Long;*/ /* No longer used; formerly in Namelist */
142 struct Vardesc { /* for Namelist */
143 char *name;
144 char *addr;
145 ftnlen *dims;
146 int type;
148 typedef struct Vardesc Vardesc;
150 struct Namelist {
151 char *name;
152 Vardesc **vars;
153 int nvars;
155 typedef struct Namelist Namelist;
157 #define abs(x) ((x) >= 0 ? (x) : -(x))
158 #define dabs(x) (doublereal)abs(x)
159 #define min(a,b) ((a) <= (b) ? (a) : (b))
160 #define max(a,b) ((a) >= (b) ? (a) : (b))
161 #define dmin(a,b) (doublereal)min(a,b)
162 #define dmax(a,b) (doublereal)max(a,b)
163 #define bit_test(a,b) ((a) >> (b) & 1)
164 #define bit_clear(a,b) ((a) & ~((uinteger)1 << (b)))
165 #define bit_set(a,b) ((a) | ((uinteger)1 << (b)))
167 /* procedure parameter types for -A and -C++ */
169 #define F2C_proc_par_types 1
170 #ifdef __cplusplus
171 typedef int /* Unknown procedure type */ (*U_fp)(...);
172 typedef shortint (*J_fp)(...);
173 typedef integer (*I_fp)(...);
174 typedef real (*R_fp)(...);
175 typedef doublereal (*D_fp)(...), (*E_fp)(...);
176 typedef /* Complex */ VOID (*C_fp)(...);
177 typedef /* Double Complex */ VOID (*Z_fp)(...);
178 typedef logical (*L_fp)(...);
179 typedef shortlogical (*K_fp)(...);
180 typedef /* Character */ VOID (*H_fp)(...);
181 typedef /* Subroutine */ int (*S_fp)(...);
182 #else
183 typedef int /* Unknown procedure type */ (*U_fp)();
184 typedef shortint (*J_fp)();
185 typedef integer (*I_fp)();
186 typedef real (*R_fp)();
187 typedef doublereal (*D_fp)(), (*E_fp)();
188 typedef /* Complex */ VOID (*C_fp)();
189 typedef /* Double Complex */ VOID (*Z_fp)();
190 typedef logical (*L_fp)();
191 typedef shortlogical (*K_fp)();
192 typedef /* Character */ VOID (*H_fp)();
193 typedef /* Subroutine */ int (*S_fp)();
194 #endif
195 /* E_fp is for real functions when -R is not specified */
196 typedef VOID C_f; /* complex function */
197 typedef VOID H_f; /* character function */
198 typedef VOID Z_f; /* double complex function */
199 typedef doublereal E_f; /* real function with -R not specified */
201 /* undef any lower-case symbols that your C compiler predefines, e.g.: */
203 #ifndef Skip_f2c_Undefs
204 #undef cray
205 #undef gcos
206 #undef mc68010
207 #undef mc68020
208 #undef mips
209 #undef pdp11
210 #undef sgi
211 #undef sparc
212 #undef sun
213 #undef sun2
214 #undef sun3
215 #undef sun4
216 #undef u370
217 #undef u3b
218 #undef u3b2
219 #undef u3b5
220 #undef unix
221 #undef vax
222 #endif
223 #endif
224 /* If you are using a C++ compiler, append the following to f2c.h
225 for compiling libF77 and libI77. */
227 #ifdef __cplusplus
228 extern "C" {
229 extern int abort_(void);
230 extern double c_abs(complex *);
231 extern void c_cos(complex *, complex *);
232 extern void c_div(complex *, complex *, complex *);
233 extern void c_exp(complex *, complex *);
234 extern void c_log(complex *, complex *);
235 extern void c_sin(complex *, complex *);
236 extern void c_sqrt(complex *, complex *);
237 extern double d_abs(double *);
238 extern double d_acos(double *);
239 extern double d_asin(double *);
240 extern double d_atan(double *);
241 extern double d_atn2(double *, double *);
242 extern void d_cnjg(doublecomplex *, doublecomplex *);
243 extern double d_cos(double *);
244 extern double d_cosh(double *);
245 extern double d_dim(double *, double *);
246 extern double d_exp(double *);
247 extern double d_imag(doublecomplex *);
248 extern double d_int(double *);
249 extern double d_lg10(double *);
250 extern double d_log(double *);
251 extern double d_mod(double *, double *);
252 extern double d_nint(double *);
253 extern double d_prod(float *, float *);
254 extern double d_sign(double *, double *);
255 extern double d_sin(double *);
256 extern double d_sinh(double *);
257 extern double d_sqrt(double *);
258 extern double d_tan(double *);
259 extern double d_tanh(double *);
260 extern double derf_(double *);
261 extern double derfc_(double *);
262 extern integer do_fio(ftnint *, char *, ftnlen);
263 extern integer do_lio(ftnint *, ftnint *, char *, ftnlen);
264 extern integer do_uio(ftnint *, char *, ftnlen);
265 extern integer e_rdfe(void);
266 extern integer e_rdue(void);
267 extern integer e_rsfe(void);
268 extern integer e_rsfi(void);
269 extern integer e_rsle(void);
270 extern integer e_rsli(void);
271 extern integer e_rsue(void);
272 extern integer e_wdfe(void);
273 extern integer e_wdue(void);
274 extern integer e_wsfe(void);
275 extern integer e_wsfi(void);
276 extern integer e_wsle(void);
277 extern integer e_wsli(void);
278 extern integer e_wsue(void);
279 extern int ef1asc_(ftnint *, ftnlen *, ftnint *, ftnlen *);
280 extern integer ef1cmc_(ftnint *, ftnlen *, ftnint *, ftnlen *);
281 extern double erf(double);
282 extern double erf_(float *);
283 extern double erfc(double);
284 extern double erfc_(float *);
285 extern integer f_back(alist *);
286 extern integer f_clos(cllist *);
287 extern integer f_end(alist *);
288 extern void f_exit(void);
289 extern integer f_inqu(inlist *);
290 extern integer f_open(olist *);
291 extern integer f_rew(alist *);
292 extern int flush_(void);
293 extern void getarg_(integer *, char *, ftnlen);
294 extern void getenv_(char *, char *, ftnlen, ftnlen);
295 extern short h_abs(short *);
296 extern short h_dim(short *, short *);
297 extern short h_dnnt(double *);
298 extern short h_indx(char *, char *, ftnlen, ftnlen);
299 extern short h_len(char *, ftnlen);
300 extern short h_mod(short *, short *);
301 extern short h_nint(float *);
302 extern short h_sign(short *, short *);
303 extern short hl_ge(char *, char *, ftnlen, ftnlen);
304 extern short hl_gt(char *, char *, ftnlen, ftnlen);
305 extern short hl_le(char *, char *, ftnlen, ftnlen);
306 extern short hl_lt(char *, char *, ftnlen, ftnlen);
307 extern integer i_abs(integer *);
308 extern integer i_dim(integer *, integer *);
309 extern integer i_dnnt(double *);
310 extern integer i_indx(char *, char *, ftnlen, ftnlen);
311 extern integer i_len(char *, ftnlen);
312 extern integer i_mod(integer *, integer *);
313 extern integer i_nint(float *);
314 extern integer i_sign(integer *, integer *);
315 extern integer iargc_(void);
316 extern ftnlen l_ge(char *, char *, ftnlen, ftnlen);
317 extern ftnlen l_gt(char *, char *, ftnlen, ftnlen);
318 extern ftnlen l_le(char *, char *, ftnlen, ftnlen);
319 extern ftnlen l_lt(char *, char *, ftnlen, ftnlen);
320 extern void pow_ci(complex *, complex *, integer *);
321 extern double pow_dd(double *, double *);
322 extern double pow_di(double *, integer *);
323 extern short pow_hh(short *, shortint *);
324 extern integer pow_ii(integer *, integer *);
325 extern double pow_ri(float *, integer *);
326 extern void pow_zi(doublecomplex *, doublecomplex *, integer *);
327 extern void pow_zz(doublecomplex *, doublecomplex *, doublecomplex *);
328 extern double r_abs(float *);
329 extern double r_acos(float *);
330 extern double r_asin(float *);
331 extern double r_atan(float *);
332 extern double r_atn2(float *, float *);
333 extern void r_cnjg(complex *, complex *);
334 extern double r_cos(float *);
335 extern double r_cosh(float *);
336 extern double r_dim(float *, float *);
337 extern double r_exp(float *);
338 extern double r_imag(complex *);
339 extern double r_int(float *);
340 extern double r_lg10(float *);
341 extern double r_log(float *);
342 extern double r_mod(float *, float *);
343 extern double r_nint(float *);
344 extern double r_sign(float *, float *);
345 extern double r_sin(float *);
346 extern double r_sinh(float *);
347 extern double r_sqrt(float *);
348 extern double r_tan(float *);
349 extern double r_tanh(float *);
350 extern void s_cat(char *, char **, integer *, integer *, ftnlen);
351 extern integer s_cmp(char *, char *, ftnlen, ftnlen);
352 extern void s_copy(char *, char *, ftnlen, ftnlen);
353 extern int s_paus(char *, ftnlen);
354 extern integer s_rdfe(cilist *);
355 extern integer s_rdue(cilist *);
356 extern integer s_rnge(char *, integer, char *, integer);
357 extern integer s_rsfe(cilist *);
358 extern integer s_rsfi(icilist *);
359 extern integer s_rsle(cilist *);
360 extern integer s_rsli(icilist *);
361 extern integer s_rsne(cilist *);
362 extern integer s_rsni(icilist *);
363 extern integer s_rsue(cilist *);
364 extern int s_stop(char *, ftnlen);
365 extern integer s_wdfe(cilist *);
366 extern integer s_wdue(cilist *);
367 extern integer s_wsfe(cilist *);
368 extern integer s_wsfi(icilist *);
369 extern integer s_wsle(cilist *);
370 extern integer s_wsli(icilist *);
371 extern integer s_wsne(cilist *);
372 extern integer s_wsni(icilist *);
373 extern integer s_wsue(cilist *);
374 extern void sig_die(char *, int);
375 extern integer signal_(integer *, void (*)(int));
376 extern integer system_(char *, ftnlen);
377 extern double z_abs(doublecomplex *);
378 extern void z_cos(doublecomplex *, doublecomplex *);
379 extern void z_div(doublecomplex *, doublecomplex *, doublecomplex *);
380 extern void z_exp(doublecomplex *, doublecomplex *);
381 extern void z_log(doublecomplex *, doublecomplex *);
382 extern void z_sin(doublecomplex *, doublecomplex *);
383 extern void z_sqrt(doublecomplex *, doublecomplex *);
385 #endif