PLaSK library
Loading...
Searching...
No Matches
f2c.h
Go to the documentation of this file.
1/* f2c.h -- Standard Fortran to C header file */
2
7#ifndef F2C_INCLUDE
8#define F2C_INCLUDE
9
10#if defined(__alpha__) || defined(__sparc64__) || defined(__x86_64__) || defined(__ia64__)
11typedef int integer;
12typedef unsigned int uinteger;
13#else
14typedef long int integer;
15typedef unsigned long int uinteger;
16#endif
17typedef char *address;
18typedef short int shortint;
19typedef float real;
20typedef double doublereal;
21typedef struct { real r, i; } complex;
22typedef struct { doublereal r, i; } doublecomplex;
23#if defined(__alpha__) || defined(__sparc64__) || defined(__x86_64__) || defined(__ia64__)
24typedef int logical;
25#else
26typedef long int logical;
27#endif
28typedef short int shortlogical;
29typedef char logical1;
30typedef char integer1;
31#ifdef INTEGER_STAR_8 /* Adjust for integer*8. */
32#if defined(__alpha__) || defined(__sparc64__) || defined(__x86_64__) || defined(__ia64__)
33typedef long longint; /* system-dependent */
34typedef unsigned long ulongint; /* system-dependent */
35#else
36typedef long long longint; /* system-dependent - oh yeah*/
37typedef unsigned long long ulongint; /* system-dependent - oh yeah*/
38#endif
39#define qbit_clear(a,b) ((a) & ~((ulongint)1 << (b)))
40#define qbit_set(a,b) ((a) | ((ulongint)1 << (b)))
41#endif
42
43#define TRUE_ (1)
44#define FALSE_ (0)
45
46/* Extern is for use with -E */
47#ifndef Extern
48#define Extern extern
49#endif
50
51/* I/O stuff */
52
53#ifdef f2c_i2
54/* for -i2 */
55typedef short flag;
56typedef short ftnlen;
57typedef short ftnint;
58#else
59#if defined(__alpha__) || defined(__sparc64__) || defined(__x86_64__) || defined(__ia64__)
60typedef int flag;
61typedef int ftnlen;
62typedef int ftnint;
63#else
64typedef long int flag;
65typedef long int ftnlen;
66typedef long int ftnint;
67#endif
68#endif
69
70/*external read, write*/
78
79/*internal read, write*/
88
89/*open*/
90typedef struct
93 char *ofnm;
95 char *osta;
96 char *oacc;
97 char *ofm;
99 char *oblnk;
100} olist;
101
102/*close*/
103typedef struct
106 char *csta;
107} cllist;
108
109/*rewind, backspace, endfile*/
110typedef struct
113} alist;
114
115/* inquire */
144
145#define VOID void
146
147union Multitype { /* for multiple entry points */
151 /* longint j; */
156 };
157
158typedef union Multitype Multitype;
159
160/*typedef long int Long;*/ /* No longer used; formerly in Namelist */
161
162struct Vardesc { /* for Namelist */
163 char *name;
164 char *addr;
166 int type;
167 };
168typedef struct Vardesc Vardesc;
169
170struct Namelist {
171 char *name;
173 int nvars;
174 };
175typedef struct Namelist Namelist;
176
177#define abs(x) ((x) >= 0 ? (x) : -(x))
178#define dabs(x) (doublereal)abs(x)
179#define min(a,b) ((a) <= (b) ? (a) : (b))
180#define max(a,b) ((a) >= (b) ? (a) : (b))
181#define dmin(a,b) (doublereal)min(a,b)
182#define dmax(a,b) (doublereal)max(a,b)
183#define bit_test(a,b) ((a) >> (b) & 1)
184#define bit_clear(a,b) ((a) & ~((uinteger)1 << (b)))
185#define bit_set(a,b) ((a) | ((uinteger)1 << (b)))
186
187/* procedure parameter types for -A and -C++ */
188
189#define F2C_proc_par_types 1
190#ifdef __cplusplus
191typedef int /* Unknown procedure type */ (*U_fp)(...);
192typedef shortint (*J_fp)(...);
193typedef integer (*I_fp)(...);
194typedef real (*R_fp)(...);
195typedef doublereal (*D_fp)(...), (*E_fp)(...);
196typedef /* Complex */ VOID (*C_fp)(...);
197typedef /* Double Complex */ VOID (*Z_fp)(...);
198typedef logical (*L_fp)(...);
199typedef shortlogical (*K_fp)(...);
200typedef /* Character */ VOID (*H_fp)(...);
201typedef /* Subroutine */ int (*S_fp)(...);
202#else
203typedef int /* Unknown procedure type */ (*U_fp)();
204typedef shortint (*J_fp)();
205typedef integer (*I_fp)();
206typedef real (*R_fp)();
207typedef doublereal (*D_fp)(), (*E_fp)();
208typedef /* Complex */ VOID (*C_fp)();
209typedef /* Double Complex */ VOID (*Z_fp)();
210typedef logical (*L_fp)();
211typedef shortlogical (*K_fp)();
212typedef /* Character */ VOID (*H_fp)();
213typedef /* Subroutine */ int (*S_fp)();
214#endif
215/* E_fp is for real functions when -R is not specified */
216typedef VOID C_f; /* complex function */
217typedef VOID H_f; /* character function */
218typedef VOID Z_f; /* double complex function */
219typedef doublereal E_f; /* real function with -R not specified */
220
221/* undef any lower-case symbols that your C compiler predefines, e.g.: */
222
223#ifndef Skip_f2c_Undefs
224#undef cray
225#undef gcos
226#undef mc68010
227#undef mc68020
228#undef mips
229#undef pdp11
230#undef sgi
231#undef sparc
232#undef sun
233#undef sun2
234#undef sun3
235#undef sun4
236#undef u370
237#undef u3b
238#undef u3b2
239#undef u3b5
240#undef unix
241#undef vax
242#endif
243#endif