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