Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:02:53

0001 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0002 //
0003 // This file is part of Open CASCADE Technology software library.
0004 //
0005 // This library is free software; you can redistribute it and/or modify it under
0006 // the terms of the GNU Lesser General Public License version 2.1 as published
0007 // by the Free Software Foundation, with special exception defined in the file
0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0009 // distribution for complete text of the license and disclaimer of any warranty.
0010 //
0011 // Alternatively, this file may be used under the terms of Open CASCADE
0012 // commercial license or contractual agreement.
0013 
0014 // AdvApp2Var_Data_f2c.hxx
0015 #ifndef AdvApp2Var_Data_f2c_HeaderFile
0016 #define AdvApp2Var_Data_f2c_HeaderFile
0017 
0018 #ifndef F2CTYPE_DEFINED
0019 typedef int integer;
0020 typedef double doublereal;
0021 #define  F2CTYPE_DEFINED
0022 #endif
0023 
0024 typedef unsigned long uinteger;
0025 typedef char *address;
0026 typedef short int shortint;
0027 typedef float real;
0028 typedef struct { real r, i; } complex;
0029 typedef struct { doublereal r, i; } doublecomplex;
0030 typedef long int logical;
0031 typedef short int shortlogical;
0032 typedef char logical1;
0033 typedef char integer1;
0034 #if 0   /* Adjust for integer*8. */
0035 typedef long long longint;      /* system-dependent */
0036 typedef unsigned long long ulongint;    /* system-dependent */
0037 #define qbit_clear(a,b) ((a) & ~((ulongint)1 << (b)))
0038 #define qbit_set(a,b)   ((a) |  ((ulongint)1 << (b)))
0039 #endif
0040 
0041 #define TRUE_ (1)
0042 #define FALSE_ (0)
0043 
0044 /* Extern is for use with -E */
0045 #ifndef Extern
0046 #define Extern extern
0047 #endif
0048 
0049 /* I/O stuff */
0050 
0051 #ifdef f2c_i2
0052 /* for -i2 */
0053 typedef short flag;
0054 typedef short ftnlen;
0055 typedef short ftnint;
0056 #else
0057 typedef long int flag;
0058 typedef long int ftnlen;
0059 typedef long int ftnint;
0060 #endif
0061 
0062 /*external read, write*/
0063 typedef struct
0064 {   flag cierr;
0065     ftnint ciunit;
0066     flag ciend;
0067     char *cifmt;
0068     ftnint cirec;
0069 } cilist;
0070 
0071 /*internal read, write*/
0072 typedef struct
0073 {   flag icierr;
0074     char *iciunit;
0075     flag iciend;
0076     char *icifmt;
0077     ftnint icirlen;
0078     ftnint icirnum;
0079 } icilist;
0080 
0081 /*open*/
0082 typedef struct
0083 {   flag oerr;
0084     ftnint ounit;
0085     char *ofnm;
0086     ftnlen ofnmlen;
0087     char *osta;
0088     char *oacc;
0089     char *ofm;
0090     ftnint orl;
0091     char *oblnk;
0092 } olist;
0093 
0094 /*close*/
0095 typedef struct
0096 {   flag cerr;
0097     ftnint cunit;
0098     char *csta;
0099 } cllist;
0100 
0101 /*rewind, backspace, endfile*/
0102 typedef struct
0103 {   flag aerr;
0104     ftnint aunit;
0105 } alist;
0106 
0107 /* inquire */
0108 typedef struct
0109 {   flag inerr;
0110     ftnint inunit;
0111     char *infile;
0112     ftnlen infilen;
0113     ftnint  *inex;  /*parameters in standard's order*/
0114     ftnint  *inopen;
0115     ftnint  *innum;
0116     ftnint  *innamed;
0117     char    *inname;
0118     ftnlen  innamlen;
0119     char    *inacc;
0120     ftnlen  inacclen;
0121     char    *inseq;
0122     ftnlen  inseqlen;
0123     char    *indir;
0124     ftnlen  indirlen;
0125     char    *infmt;
0126     ftnlen  infmtlen;
0127     char    *inform;
0128     ftnint  informlen;
0129     char    *inunf;
0130     ftnlen  inunflen;
0131     ftnint  *inrecl;
0132     ftnint  *innrec;
0133     char    *inblank;
0134     ftnlen  inblanklen;
0135 } inlist;
0136 
0137 #define VOID void
0138 
0139 union Multitype {   /* for multiple entry points */
0140     integer1 g;
0141     shortint h;
0142     integer i;
0143     /* longint j; */
0144     real r;
0145     doublereal d;
0146     complex c;
0147     doublecomplex z;
0148     };
0149 
0150 typedef union Multitype Multitype;
0151 
0152 /*typedef long int Long;*/  /* No longer used; formerly in Namelist */
0153 
0154 struct Vardesc {    /* for Namelist */
0155     char *name;
0156     char *addr;
0157     ftnlen *dims;
0158     int  type;
0159     };
0160 typedef struct Vardesc Vardesc;
0161 
0162 struct Namelist {
0163     char *name;
0164     Vardesc **vars;
0165     int nvars;
0166     };
0167 typedef struct Namelist Namelist;
0168 
0169 #define advapp_abs(x) ((x) >= 0 ? (x) : -(x))
0170 #define dabs(x) (doublereal)advapp_abs(x)
0171 #define advapp_min(a,b) ((a) <= (b) ? (a) : (b))
0172 #define advapp_max(a,b) ((a) >= (b) ? (a) : (b))
0173 #define dmin(a,b) (doublereal)advapp_min(a,b)
0174 #define dmax(a,b) (doublereal)advapp_max(a,b)
0175 #define bit_test(a,b)   ((a) >> (b) & 1)
0176 #define bit_clear(a,b)  ((a) & ~((uinteger)1 << (b)))
0177 #define bit_set(a,b)    ((a) |  ((uinteger)1 << (b)))
0178 
0179 /* procedure parameter types for -A and -C++ */
0180 
0181 #define F2C_proc_par_types 1
0182 #ifdef __cplusplus
0183 typedef int /* Unknown procedure type */ (*U_fp)(...);
0184 typedef shortint (*J_fp)(...);
0185 typedef integer (*I_fp)(...);
0186 typedef real (*R_fp)(...);
0187 typedef doublereal (*D_fp)(...), (*E_fp)(...);
0188 typedef /* Complex */ VOID (*C_fp)(...);
0189 typedef /* Double Complex */ VOID (*Z_fp)(...);
0190 typedef logical (*L_fp)(...);
0191 typedef shortlogical (*K_fp)(...);
0192 typedef /* Character */ VOID (*H_fp)(...);
0193 typedef /* Subroutine */ int (*S_fp)(...);
0194 #else
0195 typedef int /* Unknown procedure type */ (*U_fp)();
0196 typedef shortint (*J_fp)();
0197 typedef integer (*I_fp)();
0198 typedef real (*R_fp)();
0199 typedef doublereal (*D_fp)(), (*E_fp)();
0200 typedef /* Complex */ VOID (*C_fp)();
0201 typedef /* Double Complex */ VOID (*Z_fp)();
0202 typedef logical (*L_fp)();
0203 typedef shortlogical (*K_fp)();
0204 typedef /* Character */ VOID (*H_fp)();
0205 typedef /* Subroutine */ int (*S_fp)();
0206 #endif
0207 /* E_fp is for real functions when -R is not specified */
0208 typedef VOID C_f;   /* complex function */
0209 typedef VOID H_f;   /* character function */
0210 typedef VOID Z_f;   /* double complex function */
0211 typedef doublereal E_f; /* real function with -R not specified */
0212 
0213 /* undef any lower-case symbols that your C compiler predefines, e.g.: */
0214 
0215 #ifndef Skip_f2c_Undefs
0216 #undef cray
0217 #undef gcos
0218 #undef mc68010
0219 #undef mc68020
0220 #undef mips
0221 #undef pdp11
0222 #undef sgi
0223 #undef sparc
0224 #undef sun
0225 #undef sun2
0226 #undef sun3
0227 #undef sun4
0228 #undef u370
0229 #undef u3b
0230 #undef u3b2
0231 #undef u3b5
0232 #undef unix
0233 #undef vax
0234 #endif
0235 //#endif
0236 #endif