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