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 
11 typedef int integer;
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 int logical;
19 typedef short int shortlogical;
20 typedef char logical1;
21 typedef 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 */
35 typedef short flag;
36 typedef short ftnlen;
37 typedef short ftnint;
38 #else
39 typedef int flag;
40 typedef int ftnlen;
41 typedef int ftnint;
42 #endif
43 
44 /*external read, write*/
45 typedef struct
46 { flag cierr;
47  ftnint ciunit;
48  flag ciend;
49  char *cifmt;
50  ftnint cirec;
51 } cilist;
52 
53 /*internal read, write*/
54 typedef struct
55 { flag icierr;
56  char *iciunit;
57  flag iciend;
58  char *icifmt;
59  ftnint icirlen;
60  ftnint icirnum;
61 } icilist;
62 
63 /*open*/
64 typedef 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*/
77 typedef struct
78 { flag cerr;
79  ftnint cunit;
80  char *csta;
81 } cllist;
82 
83 /*rewind, backspace, endfile*/
84 typedef struct
85 { flag aerr;
86  ftnint aunit;
87 } alist;
88 
89 /* inquire */
90 typedef 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 
121 union Multitype { /* for multiple entry points */
122  shortint h;
123  integer i;
124  real r;
125  doublereal d;
126  complex c;
127  doublecomplex z;
128  };
129 
130 typedef union Multitype Multitype;
131 
132 typedef long Long; /* No longer used; formerly in Namelist */
133 
134 struct Vardesc { /* for Namelist */
135  char *name;
136  char *addr;
137  ftnlen *dims;
138  int type;
139  };
140 typedef struct Vardesc Vardesc;
141 
142 struct Namelist {
143  char *name;
144  Vardesc **vars;
145  int nvars;
146  };
147 typedef 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
166 typedef int /* Unknown procedure type */ (*U_fp)(...);
167 typedef shortint (*J_fp)(...);
168 typedef integer (*I_fp)(...);
169 typedef real (*R_fp)(...);
170 typedef doublereal (*D_fp)(...), (*E_fp)(...);
171 typedef /* Complex */ VOID (*C_fp)(...);
172 typedef /* Double Complex */ VOID (*Z_fp)(...);
173 typedef logical (*L_fp)(...);
174 typedef shortlogical (*K_fp)(...);
175 typedef /* Character */ VOID (*H_fp)(...);
176 typedef /* Subroutine */ int (*S_fp)(...);
177 #else
178 typedef int /* Unknown procedure type */ (*U_fp)(void);
179 typedef shortint (*J_fp)(void);
180 typedef integer (*I_fp)(void);
181 typedef real (*R_fp)(void);
182 typedef doublereal (*D_fp)(void), (*E_fp)(void);
183 typedef /* Complex */ VOID (*C_fp)(void);
184 typedef /* Double Complex */ VOID (*Z_fp)(void);
185 typedef logical (*L_fp)(void);
186 typedef shortlogical (*K_fp)(void);
187 typedef /* Character */ VOID (*H_fp)(void);
188 typedef /* Subroutine */ int (*S_fp)(void);
189 #endif
190 /* E_fp is for real functions when -R is not specified */
191 typedef VOID C_f; /* complex function */
192 typedef VOID H_f; /* character function */
193 typedef VOID Z_f; /* double complex function */
194 typedef 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:54
Definition: f2c.h:121
Definition: f2c.h:90
Definition: f2c.h:64
Definition: f2c.h:45
Definition: f2c.h:84
Definition: f2c.h:77
Definition: f2c.h:16
Definition: f2c.h:134