Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-06-13 08:29:38

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