Main Page   Modules   Data Structures   File List   Data Fields   Globals  

incl/f2c.h

Go to the documentation of this file.
00001 /* f2c.h  --  Standard Fortran to C header file */
00002 
00003 #ifndef F2C_INCLUDE
00004 #define F2C_INCLUDE
00005 
00006 typedef long int integer;
00007 typedef char *address;
00008 typedef short int shortint;
00009 typedef float real;
00010 typedef double doublereal;
00011 typedef struct { real r, i; } complex;
00012 typedef struct { doublereal r, i; } doublecomplex;
00013 typedef long int logical;
00014 typedef short int shortlogical;
00015 typedef char logical1;
00016 typedef char integer1;
00017 /* typedef long long longint; */ /* system-dependent */
00018 
00019 #define TRUE_ (1)
00020 #define FALSE_ (0)
00021 
00022 /* Extern is for use with -E */
00023 #ifndef Extern
00024 #define Extern extern
00025 #endif
00026 
00027 /* I/O stuff */
00028 
00029 #ifdef f2c_i2
00030 /* for -i2 */
00031 typedef short flag;
00032 typedef short ftnlen;
00033 typedef short ftnint;
00034 #else
00035 typedef long int flag;
00036 typedef long int ftnlen;
00037 typedef long int ftnint;
00038 #endif
00039 
00040 /*external read, write*/
00041 typedef struct
00042 {       flag cierr;
00043         ftnint ciunit;
00044         flag ciend;
00045         char *cifmt;
00046         ftnint cirec;
00047 } cilist;
00048 
00049 /*internal read, write*/
00050 typedef struct
00051 {       flag icierr;
00052         char *iciunit;
00053         flag iciend;
00054         char *icifmt;
00055         ftnint icirlen;
00056         ftnint icirnum;
00057 } icilist;
00058 
00059 /*open*/
00060 typedef struct
00061 {       flag oerr;
00062         ftnint ounit;
00063         char *ofnm;
00064         ftnlen ofnmlen;
00065         char *osta;
00066         char *oacc;
00067         char *ofm;
00068         ftnint orl;
00069         char *oblnk;
00070 } olist;
00071 
00072 /*close*/
00073 typedef struct
00074 {       flag cerr;
00075         ftnint cunit;
00076         char *csta;
00077 } cllist;
00078 
00079 /*rewind, backspace, endfile*/
00080 typedef struct
00081 {       flag aerr;
00082         ftnint aunit;
00083 } alist;
00084 
00085 /* inquire */
00086 typedef struct
00087 {       flag inerr;
00088         ftnint inunit;
00089         char *infile;
00090         ftnlen infilen;
00091         ftnint  *inex;  /*parameters in standard's order*/
00092         ftnint  *inopen;
00093         ftnint  *innum;
00094         ftnint  *innamed;
00095         char    *inname;
00096         ftnlen  innamlen;
00097         char    *inacc;
00098         ftnlen  inacclen;
00099         char    *inseq;
00100         ftnlen  inseqlen;
00101         char    *indir;
00102         ftnlen  indirlen;
00103         char    *infmt;
00104         ftnlen  infmtlen;
00105         char    *inform;
00106         ftnint  informlen;
00107         char    *inunf;
00108         ftnlen  inunflen;
00109         ftnint  *inrecl;
00110         ftnint  *innrec;
00111         char    *inblank;
00112         ftnlen  inblanklen;
00113 } inlist;
00114 
00115 #define VOID void
00116 
00117 union Multitype {       /* for multiple entry points */
00118         integer1 g;
00119         shortint h;
00120         integer i;
00121         /* longint j; */
00122         real r;
00123         doublereal d;
00124         complex c;
00125         doublecomplex z;
00126         };
00127 
00128 typedef union Multitype Multitype;
00129 
00130 /*typedef long int Long;*/      /* No longer used; formerly in Namelist */
00131 
00132 struct Vardesc {        /* for Namelist */
00133         char *name;
00134         char *addr;
00135         ftnlen *dims;
00136         int  type;
00137         };
00138 typedef struct Vardesc Vardesc;
00139 
00140 struct Namelist {
00141         char *name;
00142         Vardesc **vars;
00143         int nvars;
00144         };
00145 typedef struct Namelist Namelist;
00146 
00147 #define abs(x) ((x) >= 0 ? (x) : -(x))
00148 #define dabs(x) (doublereal)abs(x)
00149 #define min(a,b) ((a) <= (b) ? (a) : (b))
00150 #define max(a,b) ((a) >= (b) ? (a) : (b))
00151 #define dmin(a,b) (doublereal)min(a,b)
00152 #define dmax(a,b) (doublereal)max(a,b)
00153 
00154 /* procedure parameter types for -A and -C++ */
00155 
00156 #define F2C_proc_par_types 1
00157 #ifdef __cplusplus
00158 typedef int /* Unknown procedure type */ (*U_fp)(...);
00159 typedef shortint (*J_fp)(...);
00160 typedef integer (*I_fp)(...);
00161 typedef real (*R_fp)(...);
00162 typedef doublereal (*D_fp)(...), (*E_fp)(...);
00163 typedef /* Complex */ VOID (*C_fp)(...);
00164 typedef /* Double Complex */ VOID (*Z_fp)(...);
00165 typedef logical (*L_fp)(...);
00166 typedef shortlogical (*K_fp)(...);
00167 typedef /* Character */ VOID (*H_fp)(...);
00168 typedef /* Subroutine */ int (*S_fp)(...);
00169 #else
00170 typedef int /* Unknown procedure type */ (*U_fp)();
00171 typedef shortint (*J_fp)();
00172 typedef integer (*I_fp)();
00173 typedef real (*R_fp)();
00174 typedef doublereal (*D_fp)(), (*E_fp)();
00175 typedef /* Complex */ VOID (*C_fp)();
00176 typedef /* Double Complex */ VOID (*Z_fp)();
00177 typedef logical (*L_fp)();
00178 typedef shortlogical (*K_fp)();
00179 typedef /* Character */ VOID (*H_fp)();
00180 typedef /* Subroutine */ int (*S_fp)();
00181 #endif
00182 /* E_fp is for real functions when -R is not specified */
00183 typedef VOID C_f;       /* complex function */
00184 typedef VOID H_f;       /* character function */
00185 typedef VOID Z_f;       /* double complex function */
00186 typedef doublereal E_f; /* real function with -R not specified */
00187 
00188 #define d_sign(a,b) ((b) >= 0 ? abs(a) : -abs(a))
00189 
00190 /* undef any lower-case symbols that your C compiler predefines, e.g.: */
00191 
00192 #ifndef Skip_f2c_Undefs
00193 #undef cray
00194 #undef gcos
00195 #undef mc68010
00196 #undef mc68020
00197 #undef mips
00198 #undef pdp11
00199 #undef sgi
00200 #undef sparc
00201 #undef sun
00202 #undef sun2
00203 #undef sun3
00204 #undef sun4
00205 #undef u370
00206 #undef u3b
00207 #undef u3b2
00208 #undef u3b5
00209 #undef unix
00210 #undef vax
00211 #endif
00212 #endif

Generated on Tue Jul 1 17:35:45 2003 for IFU_C_iolibs by doxygen1.3