00001
00033 #ifndef F2C_INCLUDE
00034 #define F2C_INCLUDE
00035
00036 typedef long int integer;
00037 typedef unsigned long int uinteger;
00038 typedef char *address;
00039 typedef short int shortint;
00040 typedef float real;
00041 typedef double doublereal;
00043 typedef struct { real r, i; } complex;
00045 typedef struct { doublereal r, i; } doublecomplex;
00046 typedef long int logical;
00047 typedef short int shortlogical;
00048 typedef char logical1;
00049 typedef char integer1;
00050 #ifdef INTEGER_STAR_8
00051
00052 typedef long long longint;
00054 typedef unsigned long long ulongint;
00055 #define qbit_clear(a,b) ((a) & ~((ulongint)1 << (b)))
00056 #define qbit_set(a,b) ((a) | ((ulongint)1 << (b)))
00057 #endif
00058
00059 #define TRUE_ (1)
00060 #define FALSE_ (0)
00061
00062 #ifndef Extern
00063
00064 #define Extern extern
00065 #endif
00066
00067
00068
00069 #ifdef f2c_i2
00070
00071 typedef short flag;
00072 typedef short ftnlen;
00073 typedef short ftnint;
00074 #else
00075 typedef long int flag;
00076 typedef long int ftnlen;
00077 typedef long int ftnint;
00078 #endif
00079
00081 typedef struct
00082 { flag cierr;
00083 ftnint ciunit;
00084 flag ciend;
00085 char *cifmt;
00086 ftnint cirec;
00087 } cilist;
00088
00090 typedef struct
00091 { flag icierr;
00092 char *iciunit;
00093 flag iciend;
00094 char *icifmt;
00095 ftnint icirlen;
00096 ftnint icirnum;
00097 } icilist;
00098
00100 typedef struct
00101 { flag oerr;
00102 ftnint ounit;
00103 char *ofnm;
00104 ftnlen ofnmlen;
00105 char *osta;
00106 char *oacc;
00107 char *ofm;
00108 ftnint orl;
00109 char *oblnk;
00110 } olist;
00111
00113 typedef struct
00114 { flag cerr;
00115 ftnint cunit;
00116 char *csta;
00117 } cllist;
00118
00120 typedef struct
00121 { flag aerr;
00122 ftnint aunit;
00123 } alist;
00124
00126 typedef struct
00127 { flag inerr;
00128 ftnint inunit;
00129 char *infile;
00130 ftnlen infilen;
00131 ftnint *inex;
00132 ftnint *inopen;
00133 ftnint *innum;
00134 ftnint *innamed;
00135 char *inname;
00136 ftnlen innamlen;
00137 char *inacc;
00138 ftnlen inacclen;
00139 char *inseq;
00140 ftnlen inseqlen;
00141 char *indir;
00142 ftnlen indirlen;
00143 char *infmt;
00144 ftnlen infmtlen;
00145 char *inform;
00146 ftnint informlen;
00147 char *inunf;
00148 ftnlen inunflen;
00149 ftnint *inrecl;
00150 ftnint *innrec;
00151 char *inblank;
00152 ftnlen inblanklen;
00153 } inlist;
00154
00155 #define VOID void
00156
00158 union Multitype {
00159 integer1 g;
00160 shortint h;
00161 integer i;
00162
00163 real r;
00164 doublereal d;
00165 complex c;
00166 doublecomplex z;
00167 };
00168
00169 typedef union Multitype Multitype;
00170
00171
00172
00174 struct Vardesc {
00175 char *name;
00176 char *addr;
00177 ftnlen *dims;
00178 int type;
00179 };
00180 typedef struct Vardesc Vardesc;
00181
00183 struct Namelist {
00184 char *name;
00185 Vardesc **vars;
00186 int nvars;
00187 };
00188 typedef struct Namelist Namelist;
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209 #undef abs
00210 #undef dabs
00211 #undef min
00212 #undef max
00213 #undef dmin
00214 #undef dmax
00215
00216 #define abs(x) ((x) >= 0 ? (x) : -(x))
00217 #define dabs(x) (doublereal)abs(x)
00218 #define min(a,b) ((a) <= (b) ? (a) : (b))
00219 #define max(a,b) ((a) >= (b) ? (a) : (b))
00220 #define dmin(a,b) (doublereal)min(a,b)
00221 #define dmax(a,b) (doublereal)max(a,b)
00222
00223 #define bit_test(a,b) ((a) >> (b) & 1)
00224 #define bit_clear(a,b) ((a) & ~((uinteger)1 << (b)))
00225 #define bit_set(a,b) ((a) | ((uinteger)1 << (b)))
00226
00227
00228
00229 #define F2C_proc_par_types 1
00230 #ifdef __cplusplus
00231 typedef int (*U_fp)(...);
00232 typedef shortint (*J_fp)(...);
00233 typedef integer (*I_fp)(...);
00234 typedef real (*R_fp)(...);
00235 typedef doublereal (*D_fp)(...), (*E_fp)(...);
00236 typedef VOID (*C_fp)(...);
00237 typedef VOID (*Z_fp)(...);
00238 typedef logical (*L_fp)(...);
00239 typedef shortlogical (*K_fp)(...);
00240 typedef VOID (*H_fp)(...);
00241 typedef int (*S_fp)(...);
00242 #else
00243 typedef int (*U_fp)();
00244 typedef shortint (*J_fp)();
00245 typedef integer (*I_fp)();
00246 typedef real (*R_fp)();
00247 typedef doublereal (*D_fp)(), (*E_fp)();
00248 typedef VOID (*C_fp)();
00249 typedef VOID (*Z_fp)();
00250 typedef logical (*L_fp)();
00251 typedef shortlogical (*K_fp)();
00252 typedef VOID (*H_fp)();
00253 typedef int (*S_fp)();
00254 #endif
00255
00256 typedef VOID C_f;
00257 typedef VOID H_f;
00258 typedef VOID Z_f;
00259 typedef doublereal E_f;
00261
00262
00263 #ifndef Skip_f2c_Undefs
00264 #undef cray
00265 #undef gcos
00266 #undef mc68010
00267 #undef mc68020
00268 #undef mips
00269 #undef pdp11
00270 #undef sgi
00271 #undef sparc
00272 #undef sun
00273 #undef sun2
00274 #undef sun3
00275 #undef sun4
00276 #undef u370
00277 #undef u3b
00278 #undef u3b2
00279 #undef u3b5
00280 #undef unix
00281 #undef vax
00282 #endif
00283
00284
00285
00286
00287 #ifdef __cplusplus
00288 extern "C" {
00289 extern int abort_(void);
00290 extern double c_abs(complex *);
00291 extern void c_cos(complex *, complex *);
00292 extern void c_div(complex *, complex *, complex *);
00293 extern void c_exp(complex *, complex *);
00294 extern void c_log(complex *, complex *);
00295 extern void c_sin(complex *, complex *);
00296 extern void c_sqrt(complex *, complex *);
00297 extern double d_abs(double *);
00298 extern double d_acos(double *);
00299 extern double d_asin(double *);
00300 extern double d_atan(double *);
00301 extern double d_atn2(double *, double *);
00302 extern void d_cnjg(doublecomplex *, doublecomplex *);
00303 extern double d_cos(double *);
00304 extern double d_cosh(double *);
00305 extern double d_dim(double *, double *);
00306 extern double d_exp(double *);
00307 extern double d_imag(doublecomplex *);
00308 extern double d_int(double *);
00309 extern double d_lg10(double *);
00310 extern double d_log(double *);
00311 extern double d_mod(double *, double *);
00312 extern double d_nint(double *);
00313 extern double d_prod(float *, float *);
00314 extern double d_sign(double *, double *);
00315 extern double d_sin(double *);
00316 extern double d_sinh(double *);
00317 extern double d_sqrt(double *);
00318 extern double d_tan(double *);
00319 extern double d_tanh(double *);
00320 extern double derf_(double *);
00321 extern double derfc_(double *);
00322 extern integer do_fio(ftnint *, char *, ftnlen);
00323 extern integer do_lio(ftnint *, ftnint *, char *, ftnlen);
00324 extern integer do_uio(ftnint *, char *, ftnlen);
00325 extern integer e_rdfe(void);
00326 extern integer e_rdue(void);
00327 extern integer e_rsfe(void);
00328 extern integer e_rsfi(void);
00329 extern integer e_rsle(void);
00330 extern integer e_rsli(void);
00331 extern integer e_rsue(void);
00332 extern integer e_wdfe(void);
00333 extern integer e_wdue(void);
00334 extern integer e_wsfe(void);
00335 extern integer e_wsfi(void);
00336 extern integer e_wsle(void);
00337 extern integer e_wsli(void);
00338 extern integer e_wsue(void);
00339 extern int ef1asc_(ftnint *, ftnlen *, ftnint *, ftnlen *);
00340 extern integer ef1cmc_(ftnint *, ftnlen *, ftnint *, ftnlen *);
00341 extern double erf(double);
00342 extern double erf_(float *);
00343 extern double erfc(double);
00344 extern double erfc_(float *);
00345 extern integer f_back(alist *);
00346 extern integer f_clos(cllist *);
00347 extern integer f_end(alist *);
00348 extern void f_exit(void);
00349 extern integer f_inqu(inlist *);
00350 extern integer f_open(olist *);
00351 extern integer f_rew(alist *);
00352 extern int flush_(void);
00353 extern void getarg_(integer *, char *, ftnlen);
00354 extern void getenv_(char *, char *, ftnlen, ftnlen);
00355 extern short h_abs(short *);
00356 extern short h_dim(short *, short *);
00357 extern short h_dnnt(double *);
00358 extern short h_indx(char *, char *, ftnlen, ftnlen);
00359 extern short h_len(char *, ftnlen);
00360 extern short h_mod(short *, short *);
00361 extern short h_nint(float *);
00362 extern short h_sign(short *, short *);
00363 extern short hl_ge(char *, char *, ftnlen, ftnlen);
00364 extern short hl_gt(char *, char *, ftnlen, ftnlen);
00365 extern short hl_le(char *, char *, ftnlen, ftnlen);
00366 extern short hl_lt(char *, char *, ftnlen, ftnlen);
00367 extern integer i_abs(integer *);
00368 extern integer i_dim(integer *, integer *);
00369 extern integer i_dnnt(double *);
00370 extern integer i_indx(char *, char *, ftnlen, ftnlen);
00371 extern integer i_len(char *, ftnlen);
00372 extern integer i_mod(integer *, integer *);
00373 extern integer i_nint(float *);
00374 extern integer i_sign(integer *, integer *);
00375 extern integer iargc_(void);
00376 extern ftnlen l_ge(char *, char *, ftnlen, ftnlen);
00377 extern ftnlen l_gt(char *, char *, ftnlen, ftnlen);
00378 extern ftnlen l_le(char *, char *, ftnlen, ftnlen);
00379 extern ftnlen l_lt(char *, char *, ftnlen, ftnlen);
00380 extern void pow_ci(complex *, complex *, integer *);
00381 extern double pow_dd(double *, double *);
00382 extern double pow_di(double *, integer *);
00383 extern short pow_hh(short *, shortint *);
00384 extern integer pow_ii(integer *, integer *);
00385 extern double pow_ri(float *, integer *);
00386 extern void pow_zi(doublecomplex *, doublecomplex *, integer *);
00387 extern void pow_zz(doublecomplex *, doublecomplex *, doublecomplex *);
00388 extern double r_abs(float *);
00389 extern double r_acos(float *);
00390 extern double r_asin(float *);
00391 extern double r_atan(float *);
00392 extern double r_atn2(float *, float *);
00393 extern void r_cnjg(complex *, complex *);
00394 extern double r_cos(float *);
00395 extern double r_cosh(float *);
00396 extern double r_dim(float *, float *);
00397 extern double r_exp(float *);
00398 extern double r_imag(complex *);
00399 extern double r_int(float *);
00400 extern double r_lg10(float *);
00401 extern double r_log(float *);
00402 extern double r_mod(float *, float *);
00403 extern double r_nint(float *);
00404 extern double r_sign(float *, float *);
00405 extern double r_sin(float *);
00406 extern double r_sinh(float *);
00407 extern double r_sqrt(float *);
00408 extern double r_tan(float *);
00409 extern double r_tanh(float *);
00410 extern void s_cat(char *, char **, integer *, integer *, ftnlen);
00411 extern integer s_cmp(char *, char *, ftnlen, ftnlen);
00412 extern void s_copy(char *, char *, ftnlen, ftnlen);
00413 extern int s_paus(char *, ftnlen);
00414 extern integer s_rdfe(cilist *);
00415 extern integer s_rdue(cilist *);
00416 extern integer s_rnge(char *, integer, char *, integer);
00417 extern integer s_rsfe(cilist *);
00418 extern integer s_rsfi(icilist *);
00419 extern integer s_rsle(cilist *);
00420 extern integer s_rsli(icilist *);
00421 extern integer s_rsne(cilist *);
00422 extern integer s_rsni(icilist *);
00423 extern integer s_rsue(cilist *);
00424 extern int s_stop(char *, ftnlen);
00425 extern integer s_wdfe(cilist *);
00426 extern integer s_wdue(cilist *);
00427 extern integer s_wsfe(cilist *);
00428 extern integer s_wsfi(icilist *);
00429 extern integer s_wsle(cilist *);
00430 extern integer s_wsli(icilist *);
00431 extern integer s_wsne(cilist *);
00432 extern integer s_wsni(icilist *);
00433 extern integer s_wsue(cilist *);
00434 extern void sig_die(char *, int);
00435 extern integer signal_(integer *, void (*)(int));
00436 extern integer system_(char *, ftnlen);
00437 extern double z_abs(doublecomplex *);
00438 extern void z_cos(doublecomplex *, doublecomplex *);
00439 extern void z_div(doublecomplex *, doublecomplex *, doublecomplex *);
00440 extern void z_exp(doublecomplex *, doublecomplex *);
00441 extern void z_log(doublecomplex *, doublecomplex *);
00442 extern void z_sin(doublecomplex *, doublecomplex *);
00443 extern void z_sqrt(doublecomplex *, doublecomplex *);
00444 }
00445 #endif
00446
00447 #endif
00448
00449