Go to the documentation of this file.00001
00002
00007 #ifndef F2C_INCLUDE
00008 #define F2C_INCLUDE
00009 #define _LARGE_FILE_SOURCE
00010 #define _LARGEFILE64_SOURCE
00011 #include <stdint.h>
00012
00013 typedef int32_t integer;
00014 typedef uint32_t uinteger;
00015 typedef char *address;
00016 typedef int16_t shortint;
00017 typedef float real;
00018 typedef double doublereal;
00019 typedef struct { real r, i; } complex;
00020 typedef struct { doublereal r, i; } doublecomplex;
00021 typedef int32_t logical;
00022 typedef int16_t shortlogical;
00023 typedef char logical1;
00024 typedef char integer1;
00025 #ifdef INTEGER_STAR_8
00026 typedef int64_t longint;
00027 typedef uint64_t ulongint;
00028 #define qbit_clear(a,b) ((a) & ~((ulongint)1 << (b)))
00029 #define qbit_set(a,b) ((a) | ((ulongint)1 << (b)))
00030 #endif
00031
00032 #define TRUE_ (1)
00033 #define FALSE_ (0)
00034
00035
00036 #ifndef Extern
00037 #define Extern extern
00038 #endif
00039
00040
00041
00042 #ifdef f2c_i2
00043
00044 typedef int16_t flag;
00045 typedef int16_t ftnlen;
00046 typedef int16_t ftnint;
00047 #else
00048 typedef int32_t flag;
00049 typedef int32_t ftnlen;
00050 typedef int32_t ftnint;
00051 #endif
00052
00053
00054 typedef struct
00055 { flag cierr;
00056 ftnint ciunit;
00057 flag ciend;
00058 char *cifmt;
00059 ftnint cirec;
00060 } cilist;
00061
00062
00063 typedef struct
00064 { flag icierr;
00065 char *iciunit;
00066 flag iciend;
00067 char *icifmt;
00068 ftnint icirlen;
00069 ftnint icirnum;
00070 } icilist;
00071
00072
00073 typedef struct
00074 { flag oerr;
00075 ftnint ounit;
00076 char *ofnm;
00077 ftnlen ofnmlen;
00078 char *osta;
00079 char *oacc;
00080 char *ofm;
00081 ftnint orl;
00082 char *oblnk;
00083 } olist;
00084
00085
00086 typedef struct
00087 { flag cerr;
00088 ftnint cunit;
00089 char *csta;
00090 } cllist;
00091
00092
00093 typedef struct
00094 { flag aerr;
00095 ftnint aunit;
00096 } alist;
00097
00098
00099 typedef struct
00100 { flag inerr;
00101 ftnint inunit;
00102 char *infile;
00103 ftnlen infilen;
00104 ftnint *inex;
00105 ftnint *inopen;
00106 ftnint *innum;
00107 ftnint *innamed;
00108 char *inname;
00109 ftnlen innamlen;
00110 char *inacc;
00111 ftnlen inacclen;
00112 char *inseq;
00113 ftnlen inseqlen;
00114 char *indir;
00115 ftnlen indirlen;
00116 char *infmt;
00117 ftnlen infmtlen;
00118 char *inform;
00119 ftnint informlen;
00120 char *inunf;
00121 ftnlen inunflen;
00122 ftnint *inrecl;
00123 ftnint *innrec;
00124 char *inblank;
00125 ftnlen inblanklen;
00126 } inlist;
00127
00128 #define VOID void
00129
00130 union Multitype {
00131 integer1 g;
00132 shortint h;
00133 integer i;
00134
00135 real r;
00136 doublereal d;
00137 complex c;
00138 doublecomplex z;
00139 };
00140
00141 typedef union Multitype Multitype;
00142
00143
00144
00145 struct Vardesc {
00146 char *name;
00147 char *addr;
00148 ftnlen *dims;
00149 int32_t type;
00150 };
00151 typedef struct Vardesc Vardesc;
00152
00153 struct Namelist {
00154 char *name;
00155 Vardesc **vars;
00156 int32_t nvars;
00157 };
00158 typedef struct Namelist Namelist;
00159
00160 #define abs(x) ((x) >= 0 ? (x) : -(x))
00161 #define dabs(x) (doublereal)abs(x)
00162 #define min(a,b) ((a) <= (b) ? (a) : (b))
00163 #define max(a,b) ((a) >= (b) ? (a) : (b))
00164 #define dmin(a,b) (doublereal)min(a,b)
00165 #define dmax(a,b) (doublereal)max(a,b)
00166 #define bit_test(a,b) ((a) >> (b) & 1)
00167 #define bit_clear(a,b) ((a) & ~((uinteger)1 << (b)))
00168 #define bit_set(a,b) ((a) | ((uinteger)1 << (b)))
00169
00170
00171
00172 #define F2C_proc_par_types 1
00173 #ifdef __cplusplus
00174 typedef int (*U_fp)(...);
00175 typedef shortint (*J_fp)(...);
00176 typedef integer (*I_fp)(...);
00177 typedef real (*R_fp)(...);
00178 typedef doublereal (*D_fp)(...), (*E_fp)(...);
00179 typedef VOID (*C_fp)(...);
00180 typedef VOID (*Z_fp)(...);
00181 typedef logical (*L_fp)(...);
00182 typedef shortlogical (*K_fp)(...);
00183 typedef VOID (*H_fp)(...);
00184 typedef int (*S_fp)(...);
00185 #else
00186 typedef int (*U_fp)();
00187 typedef shortint (*J_fp)();
00188 typedef integer (*I_fp)();
00189 typedef real (*R_fp)();
00190 typedef doublereal (*D_fp)(), (*E_fp)();
00191 typedef VOID (*C_fp)();
00192 typedef VOID (*Z_fp)();
00193 typedef logical (*L_fp)();
00194 typedef shortlogical (*K_fp)();
00195 typedef VOID (*H_fp)();
00196 typedef int (*S_fp)();
00197 #endif
00198
00199 typedef VOID C_f;
00200 typedef VOID H_f;
00201 typedef VOID Z_f;
00202 typedef doublereal E_f;
00203
00204
00205
00206 #ifndef Skip_f2c_Undefs
00207 #undef cray
00208 #undef gcos
00209 #undef mc68010
00210 #undef mc68020
00211 #undef mips
00212 #undef pdp11
00213 #undef sgi
00214 #undef sparc
00215 #undef sun
00216 #undef sun2
00217 #undef sun3
00218 #undef sun4
00219 #undef u370
00220 #undef u3b
00221 #undef u3b2
00222 #undef u3b5
00223 #undef unix
00224 #undef vax
00225 #endif
00226 #endif