Skip to content

AFNI/NIfTI Server

Sections
Personal tools
You are here: Home » AFNI » Documentation

Doxygen Source Code Documentation


Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Search  

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

Powered by Plone

This site conforms to the following standards: