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