0022550: Fixing data races
[occt.git] / src / AdvApp2Var / AdvApp2Var_Data_f2c.hxx
CommitLineData
7fd59977 1//
2// AdvApp2Var_Data_f2c.hxx
3//
4#ifndef Data_f2c_HeaderFile
5#define Data_f2c_HeaderFile
6
7#ifndef F2CTYPE_DEFINED
8typedef int integer;
9typedef double doublereal;
10#define F2CTYPE_DEFINED
11#endif
12
13typedef unsigned long uinteger;
14typedef char *address;
15typedef short int shortint;
16typedef float real;
17typedef struct { real r, i; } complex;
18typedef struct { doublereal r, i; } doublecomplex;
19typedef long int logical;
20typedef short int shortlogical;
21typedef char logical1;
22typedef char integer1;
23#if 0 /* Adjust for integer*8. */
24typedef long long longint; /* system-dependent */
25typedef unsigned long long ulongint; /* system-dependent */
26#define qbit_clear(a,b) ((a) & ~((ulongint)1 << (b)))
27#define qbit_set(a,b) ((a) | ((ulongint)1 << (b)))
28#endif
29
30#define TRUE_ (1)
31#define FALSE_ (0)
32
33/* Extern is for use with -E */
34#ifndef Extern
35#define Extern extern
36#endif
37
38/* I/O stuff */
39
40#ifdef f2c_i2
41/* for -i2 */
42typedef short flag;
43typedef short ftnlen;
44typedef short ftnint;
45#else
46typedef long int flag;
47typedef long int ftnlen;
48typedef long int ftnint;
49#endif
50
51/*external read, write*/
52typedef struct
53{ flag cierr;
54 ftnint ciunit;
55 flag ciend;
56 char *cifmt;
57 ftnint cirec;
58} cilist;
59
60/*internal read, write*/
61typedef struct
62{ flag icierr;
63 char *iciunit;
64 flag iciend;
65 char *icifmt;
66 ftnint icirlen;
67 ftnint icirnum;
68} icilist;
69
70/*open*/
71typedef struct
72{ flag oerr;
73 ftnint ounit;
74 char *ofnm;
75 ftnlen ofnmlen;
76 char *osta;
77 char *oacc;
78 char *ofm;
79 ftnint orl;
80 char *oblnk;
81} olist;
82
83/*close*/
84typedef struct
85{ flag cerr;
86 ftnint cunit;
87 char *csta;
88} cllist;
89
90/*rewind, backspace, endfile*/
91typedef struct
92{ flag aerr;
93 ftnint aunit;
94} alist;
95
96/* inquire */
97typedef struct
98{ flag inerr;
99 ftnint inunit;
100 char *infile;
101 ftnlen infilen;
102 ftnint *inex; /*parameters in standard's order*/
103 ftnint *inopen;
104 ftnint *innum;
105 ftnint *innamed;
106 char *inname;
107 ftnlen innamlen;
108 char *inacc;
109 ftnlen inacclen;
110 char *inseq;
111 ftnlen inseqlen;
112 char *indir;
113 ftnlen indirlen;
114 char *infmt;
115 ftnlen infmtlen;
116 char *inform;
117 ftnint informlen;
118 char *inunf;
119 ftnlen inunflen;
120 ftnint *inrecl;
121 ftnint *innrec;
122 char *inblank;
123 ftnlen inblanklen;
124} inlist;
125
126#define VOID void
127
128union Multitype { /* for multiple entry points */
129 integer1 g;
130 shortint h;
131 integer i;
132 /* longint j; */
133 real r;
134 doublereal d;
135 complex c;
136 doublecomplex z;
137 };
138
139typedef union Multitype Multitype;
140
141/*typedef long int Long;*/ /* No longer used; formerly in Namelist */
142
143struct Vardesc { /* for Namelist */
144 char *name;
145 char *addr;
146 ftnlen *dims;
147 int type;
148 };
149typedef struct Vardesc Vardesc;
150
151struct Namelist {
152 char *name;
153 Vardesc **vars;
154 int nvars;
155 };
156typedef struct Namelist Namelist;
157
41194117
K
158#define advapp_abs(x) ((x) >= 0 ? (x) : -(x))
159#define dabs(x) (doublereal)advapp_abs(x)
160#define advapp_min(a,b) ((a) <= (b) ? (a) : (b))
161#define advapp_max(a,b) ((a) >= (b) ? (a) : (b))
162#define dmin(a,b) (doublereal)advapp_min(a,b)
163#define dmax(a,b) (doublereal)advapp_max(a,b)
7fd59977 164#define bit_test(a,b) ((a) >> (b) & 1)
165#define bit_clear(a,b) ((a) & ~((uinteger)1 << (b)))
166#define bit_set(a,b) ((a) | ((uinteger)1 << (b)))
167
168/* procedure parameter types for -A and -C++ */
169
170#define F2C_proc_par_types 1
171#ifdef __cplusplus
172typedef int /* Unknown procedure type */ (*U_fp)(...);
173typedef shortint (*J_fp)(...);
174typedef integer (*I_fp)(...);
175typedef real (*R_fp)(...);
176typedef doublereal (*D_fp)(...), (*E_fp)(...);
177typedef /* Complex */ VOID (*C_fp)(...);
178typedef /* Double Complex */ VOID (*Z_fp)(...);
179typedef logical (*L_fp)(...);
180typedef shortlogical (*K_fp)(...);
181typedef /* Character */ VOID (*H_fp)(...);
182typedef /* Subroutine */ int (*S_fp)(...);
183#else
184typedef int /* Unknown procedure type */ (*U_fp)();
185typedef shortint (*J_fp)();
186typedef integer (*I_fp)();
187typedef real (*R_fp)();
188typedef doublereal (*D_fp)(), (*E_fp)();
189typedef /* Complex */ VOID (*C_fp)();
190typedef /* Double Complex */ VOID (*Z_fp)();
191typedef logical (*L_fp)();
192typedef shortlogical (*K_fp)();
193typedef /* Character */ VOID (*H_fp)();
194typedef /* Subroutine */ int (*S_fp)();
195#endif
196/* E_fp is for real functions when -R is not specified */
197typedef VOID C_f; /* complex function */
198typedef VOID H_f; /* character function */
199typedef VOID Z_f; /* double complex function */
200typedef doublereal E_f; /* real function with -R not specified */
201
202/* undef any lower-case symbols that your C compiler predefines, e.g.: */
203
204#ifndef Skip_f2c_Undefs
205#undef cray
206#undef gcos
207#undef mc68010
208#undef mc68020
209#undef mips
210#undef pdp11
211#undef sgi
212#undef sparc
213#undef sun
214#undef sun2
215#undef sun3
216#undef sun4
217#undef u370
218#undef u3b
219#undef u3b2
220#undef u3b5
221#undef unix
222#undef vax
223#endif
224//#endif
225#endif