Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

f2c.h

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

Generated at Wed Mar 12 01:12:45 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000