SphinxBase 5prealpha
f2c.h
1/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */
2/* f2c.h -- Standard Fortran to C header file */
3
8#ifndef F2C_INCLUDE
9#define F2C_INCLUDE
10
11typedef int integer;
12typedef char *address;
13typedef short int shortint;
14typedef float real;
15typedef double doublereal;
16typedef struct { real r, i; } complex;
17typedef struct { doublereal r, i; } doublecomplex;
18typedef int logical;
19typedef short int shortlogical;
20typedef char logical1;
21typedef char integer1;
22
23#define TRUE_ (1)
24#define FALSE_ (0)
25
26/* Extern is for use with -E */
27#ifndef Extern
28#define Extern extern
29#endif
30
31/* I/O stuff */
32
33#ifdef f2c_i2
34/* for -i2 */
35typedef short flag;
36typedef short ftnlen;
37typedef short ftnint;
38#else
39typedef int flag;
40typedef int ftnlen;
41typedef int ftnint;
42#endif
43
44/*external read, write*/
45typedef struct
46{ flag cierr;
47 ftnint ciunit;
48 flag ciend;
49 char *cifmt;
50 ftnint cirec;
51} cilist;
52
53/*internal read, write*/
54typedef struct
55{ flag icierr;
56 char *iciunit;
57 flag iciend;
58 char *icifmt;
59 ftnint icirlen;
60 ftnint icirnum;
61} icilist;
62
63/*open*/
64typedef struct
65{ flag oerr;
66 ftnint ounit;
67 char *ofnm;
68 ftnlen ofnmlen;
69 char *osta;
70 char *oacc;
71 char *ofm;
72 ftnint orl;
73 char *oblnk;
74} olist;
75
76/*close*/
77typedef struct
78{ flag cerr;
79 ftnint cunit;
80 char *csta;
81} cllist;
82
83/*rewind, backspace, endfile*/
84typedef struct
85{ flag aerr;
86 ftnint aunit;
87} alist;
88
89/* inquire */
90typedef struct
91{ flag inerr;
92 ftnint inunit;
93 char *infile;
94 ftnlen infilen;
95 ftnint *inex; /*parameters in standard's order*/
96 ftnint *inopen;
97 ftnint *innum;
98 ftnint *innamed;
99 char *inname;
100 ftnlen innamlen;
101 char *inacc;
102 ftnlen inacclen;
103 char *inseq;
104 ftnlen inseqlen;
105 char *indir;
106 ftnlen indirlen;
107 char *infmt;
108 ftnlen infmtlen;
109 char *inform;
110 ftnint informlen;
111 char *inunf;
112 ftnlen inunflen;
113 ftnint *inrecl;
114 ftnint *innrec;
115 char *inblank;
116 ftnlen inblanklen;
117} inlist;
118
119#define VOID void
120
121union Multitype { /* for multiple entry points */
122 shortint h;
123 integer i;
124 real r;
125 doublereal d;
126 complex c;
128 };
129
130typedef union Multitype Multitype;
131
132typedef long Long; /* No longer used; formerly in Namelist */
133
134struct Vardesc { /* for Namelist */
135 char *name;
136 char *addr;
137 ftnlen *dims;
138 int type;
139 };
140typedef struct Vardesc Vardesc;
141
142struct Namelist {
143 char *name;
144 Vardesc **vars;
145 int nvars;
146 };
147typedef struct Namelist Namelist;
148
149#ifndef abs
150#define abs(x) ((x) >= 0 ? (x) : -(x))
151#endif
152#define dabs(x) (doublereal)abs(x)
153#ifndef min
154#define min(a,b) ((a) <= (b) ? (a) : (b))
155#endif
156#ifndef max
157#define max(a,b) ((a) >= (b) ? (a) : (b))
158#endif
159#define dmin(a,b) (doublereal)min(a,b)
160#define dmax(a,b) (doublereal)max(a,b)
161
162/* procedure parameter types for -A and -C++ */
163
164#define F2C_proc_par_types 1
165#ifdef __cplusplus
166typedef int /* Unknown procedure type */ (*U_fp)(...);
167typedef shortint (*J_fp)(...);
168typedef integer (*I_fp)(...);
169typedef real (*R_fp)(...);
170typedef doublereal (*D_fp)(...), (*E_fp)(...);
171typedef /* Complex */ VOID (*C_fp)(...);
172typedef /* Double Complex */ VOID (*Z_fp)(...);
173typedef logical (*L_fp)(...);
174typedef shortlogical (*K_fp)(...);
175typedef /* Character */ VOID (*H_fp)(...);
176typedef /* Subroutine */ int (*S_fp)(...);
177#else
178typedef int /* Unknown procedure type */ (*U_fp)(void);
179typedef shortint (*J_fp)(void);
180typedef integer (*I_fp)(void);
181typedef real (*R_fp)(void);
182typedef doublereal (*D_fp)(void), (*E_fp)(void);
183typedef /* Complex */ VOID (*C_fp)(void);
184typedef /* Double Complex */ VOID (*Z_fp)(void);
185typedef logical (*L_fp)(void);
186typedef shortlogical (*K_fp)(void);
187typedef /* Character */ VOID (*H_fp)(void);
188typedef /* Subroutine */ int (*S_fp)(void);
189#endif
190/* E_fp is for real functions when -R is not specified */
191typedef VOID C_f; /* complex function */
192typedef VOID H_f; /* character function */
193typedef VOID Z_f; /* double complex function */
194typedef doublereal E_f; /* real function with -R not specified */
195
196/* undef any lower-case symbols that your C compiler predefines, e.g.: */
197
198#ifndef Skip_f2c_Undefs
199#undef cray
200#undef gcos
201#undef mc68010
202#undef mc68020
203#undef mips
204#undef pdp11
205#undef sgi
206#undef sparc
207#undef sun
208#undef sun2
209#undef sun3
210#undef sun4
211#undef u370
212#undef u3b
213#undef u3b2
214#undef u3b5
215#undef unix
216#undef vax
217#endif
218#endif
Definition: f2c.h:142
Definition: f2c.h:134
Definition: f2c.h:85
Definition: f2c.h:46
Definition: f2c.h:78
Definition: f2c.h:16
Definition: f2c.h:55
Definition: f2c.h:91
Definition: f2c.h:65
Definition: f2c.h:121