Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
f2c_gnu011.h
1 /* f2c.h -- Standard Fortran to C header file */
2 
3 /** barf [ba:rf] 2. "He suggested using FORTRAN, and everybody barfed."
4 
5  - From The Shogakukan DICTIONARY OF NEW ENGLISH (Second edition) */
6 
7 #ifndef F2C_INCLUDE
8 #define F2C_INCLUDE
9 
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
28 
29 #define TRUE_ (1)
30 #define FALSE_ (0)
31 
32 /* Extern is for use with -E */
33 #ifndef Extern
34 #define Extern extern
35 #endif
36 
37 /* I/O stuff */
38 
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
49 
50 /*external read, write*/
51 typedef struct
52 { flag cierr;
53  ftnint ciunit;
54  flag ciend;
55  char *cifmt;
56  ftnint cirec;
57 } cilist;
58 
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;
68 
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;
81 
82 /*close*/
83 typedef struct
84 { flag cerr;
85  ftnint cunit;
86  char *csta;
87 } cllist;
88 
89 /*rewind, backspace, endfile*/
90 typedef struct
91 { flag aerr;
92  ftnint aunit;
93 } alist;
94 
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;
124 
125 #define VOID void
126 
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;
136  };
137 
138 typedef union Multitype Multitype;
139 
140 /*typedef long int Long;*/ /* No longer used; formerly in Namelist */
141 
142 struct Vardesc { /* for Namelist */
143  char *name;
144  char *addr;
145  ftnlen *dims;
146  int type;
147  };
148 typedef struct Vardesc Vardesc;
149 
150 struct Namelist {
151  char *name;
152  Vardesc **vars;
153  int nvars;
154  };
155 typedef struct Namelist Namelist;
156 
157 #ifndef _STDLIB_H
158 /* abs is definde in stdlib.h of glibc 2.2 */
159 #define abs(x) ((x) >= 0 ? (x) : -(x))
160 #endif
161 #define dabs(x) (doublereal)abs(x)
162 #define min(a,b) ((a) <= (b) ? (a) : (b))
163 #define max(a,b) ((a) >= (b) ? (a) : (b))
164 #define dmin(a,b) (doublereal)min(a,b)
165 #define dmax(a,b) (doublereal)max(a,b)
166 #define bit_test(a,b) ((a) >> (b) & 1)
167 #define bit_clear(a,b) ((a) & ~((uinteger)1 << (b)))
168 #define bit_set(a,b) ((a) | ((uinteger)1 << (b)))
169 
170 /* procedure parameter types for -A and -C++ */
171 
172 #define F2C_proc_par_types 1
173 #ifdef __cplusplus
174 typedef int /* Unknown procedure type */ (*U_fp)(...);
175 typedef shortint (*J_fp)(...);
176 typedef integer (*I_fp)(...);
177 typedef real (*R_fp)(...);
178 typedef doublereal (*D_fp)(...), (*E_fp)(...);
179 typedef /* Complex */ VOID (*C_fp)(...);
180 typedef /* Double Complex */ VOID (*Z_fp)(...);
181 typedef logical (*L_fp)(...);
182 typedef shortlogical (*K_fp)(...);
183 typedef /* Character */ VOID (*H_fp)(...);
184 typedef /* Subroutine */ int (*S_fp)(...);
185 #else
186 typedef int /* Unknown procedure type */ (*U_fp)();
187 typedef shortint (*J_fp)();
188 typedef integer (*I_fp)();
189 typedef real (*R_fp)();
190 typedef doublereal (*D_fp)(), (*E_fp)();
191 typedef /* Complex */ VOID (*C_fp)();
192 typedef /* Double Complex */ VOID (*Z_fp)();
193 typedef logical (*L_fp)();
194 typedef shortlogical (*K_fp)();
195 typedef /* Character */ VOID (*H_fp)();
196 typedef /* Subroutine */ int (*S_fp)();
197 #endif
198 /* E_fp is for real functions when -R is not specified */
199 typedef VOID C_f; /* complex function */
200 typedef VOID H_f; /* character function */
201 typedef VOID Z_f; /* double complex function */
202 typedef doublereal E_f; /* real function with -R not specified */
203 
204 /* undef any lower-case symbols that your C compiler predefines, e.g.: */
205 
206 #ifndef Skip_f2c_Undefs
207 #undef cray
208 #undef gcos
209 #undef mc68010
210 #undef mc68020
211 #undef mips
212 #undef pdp11
213 #undef sgi
214 #undef sparc
215 #undef sun
216 #undef sun2
217 #undef sun3
218 #undef sun4
219 #undef u370
220 #undef u3b
221 #undef u3b2
222 #undef u3b5
223 #undef unix
224 #undef vax
225 #endif
226 #endif
doublereal d
Definition: f2c.h:135
shortint h
Definition: f2c.h:131
int type
Definition: f2c.h:148
complex c
Definition: f2c.h:136
char * name
Definition: f2c.h:153
Definition: f2c.h:152
char * name
Definition: f2c.h:145
char * addr
Definition: f2c.h:146
Definition: f2c.h:60
Definition: f2c.h:129
Definition: f2c.h:98
Definition: f2c.h:70
Vardesc ** vars
Definition: f2c.h:154
Definition: f2c.h:51
real r
Definition: f2c.h:134
rewind, backspace, endfile
Definition: f2c.h:92
Definition: f2c.h:83
doublecomplex z
Definition: f2c.h:137
integer1 g
Definition: f2c.h:130
integer i
Definition: f2c.h:132
Definition: f2c.h:16
int nvars
Definition: f2c.h:155
Definition: f2c.h:144
ftnlen * dims
Definition: f2c.h:147