1 | |
---|
2 | #define pgiFortran |
---|
3 | |
---|
4 | /* cfortran.h 4.1 */ /* anonymous ftp@zebra.desy.de */ |
---|
5 | /* Burkhard Burow burow@desy.de 1990 - 1998. */ |
---|
6 | |
---|
7 | #ifndef __CFORTRAN_LOADED |
---|
8 | #define __CFORTRAN_LOADED |
---|
9 | |
---|
10 | /* |
---|
11 | THIS FILE IS PROPERTY OF BURKHARD BUROW. IF YOU ARE USING THIS FILE YOU |
---|
12 | SHOULD ALSO HAVE ACCESS TO CFORTRAN.DOC WHICH PROVIDES TERMS FOR USING, |
---|
13 | MODIFYING, COPYING AND DISTRIBUTING THE CFORTRAN.H PACKAGE. |
---|
14 | */ |
---|
15 | |
---|
16 | /* |
---|
17 | Avoid symbols already used by compilers and system *.h: |
---|
18 | __ - OSF1 zukal06 V3.0 347 alpha, cc -c -std1 cfortest.c |
---|
19 | |
---|
20 | */ |
---|
21 | |
---|
22 | |
---|
23 | /* First prepare for the C compiler. */ |
---|
24 | |
---|
25 | #ifndef ANSI_C_preprocessor /* i.e. user can override. */ |
---|
26 | #ifdef __CF__KnR |
---|
27 | #define ANSI_C_preprocessor 0 |
---|
28 | #else |
---|
29 | #ifdef __STDC__ |
---|
30 | #define ANSI_C_preprocessor 1 |
---|
31 | #else |
---|
32 | #define _cfleft 1 |
---|
33 | #define _cfright |
---|
34 | #define _cfleft_cfright 0 |
---|
35 | #define ANSI_C_preprocessor _cfleft/**/_cfright |
---|
36 | #endif |
---|
37 | #endif |
---|
38 | #endif |
---|
39 | |
---|
40 | #if ANSI_C_preprocessor |
---|
41 | #define _0(A,B) A##B |
---|
42 | #define _(A,B) _0(A,B) /* see cat,xcat of K&R ANSI C p. 231 */ |
---|
43 | #define _2(A,B) A##B /* K&R ANSI C p.230: .. identifier is not replaced */ |
---|
44 | #define _3(A,B,C) _(A,_(B,C)) |
---|
45 | #else /* if it turns up again during rescanning. */ |
---|
46 | #define _(A,B) A/**/B |
---|
47 | #define _2(A,B) A/**/B |
---|
48 | #define _3(A,B,C) A/**/B/**/C |
---|
49 | #endif |
---|
50 | |
---|
51 | #if (defined(vax)&&defined(unix)) || (defined(__vax__)&&defined(__unix__)) |
---|
52 | #define VAXUltrix |
---|
53 | #endif |
---|
54 | |
---|
55 | #include <stdio.h> /* NULL [in all machines stdio.h] */ |
---|
56 | #include <string.h> /* strlen, memset, memcpy, memchr. */ |
---|
57 | #if !( defined(VAXUltrix) || defined(sun) || (defined(apollo)&&!defined(__STDCPP__)) ) |
---|
58 | #include <stdlib.h> /* malloc,free */ |
---|
59 | #else |
---|
60 | #include <malloc.h> /* Had to be removed for DomainOS h105 10.4 sys5.3 425t*/ |
---|
61 | #ifdef apollo |
---|
62 | #define __CF__APOLLO67 /* __STDCPP__ is in Apollo 6.8 (i.e. ANSI) and onwards */ |
---|
63 | #endif |
---|
64 | #endif |
---|
65 | |
---|
66 | #if !defined(__GNUC__) && !defined(__sun) && (defined(sun)||defined(VAXUltrix)||defined(lynx)) |
---|
67 | #define __CF__KnR /* Sun, LynxOS and VAX Ultrix cc only supports K&R. */ |
---|
68 | /* Manually define __CF__KnR for HP if desired/required.*/ |
---|
69 | #endif /* i.e. We will generate Kernighan and Ritchie C. */ |
---|
70 | /* Note that you may define __CF__KnR before #include cfortran.h, in order to |
---|
71 | generate K&R C instead of the default ANSI C. The differences are mainly in the |
---|
72 | function prototypes and declarations. All machines, except the Apollo, work |
---|
73 | with either style. The Apollo's argument promotion rules require ANSI or use of |
---|
74 | the obsolete std_$call which we have not implemented here. Hence on the Apollo, |
---|
75 | only C calling FORTRAN subroutines will work using K&R style.*/ |
---|
76 | |
---|
77 | |
---|
78 | /* Remainder of cfortran.h depends on the Fortran compiler. */ |
---|
79 | |
---|
80 | #ifdef CLIPPERFortran |
---|
81 | #define f2cFortran |
---|
82 | #endif |
---|
83 | |
---|
84 | /* VAX/VMS does not let us \-split long #if lines. */ |
---|
85 | /* Split #if into 2 because some HP-UX can't handle long #if */ |
---|
86 | #if !(defined(NAGf90Fortran)||defined(f2cFortran)||defined(hpuxFortran)||defined(apolloFortran)||defined(sunFortran)||defined(IBMR2Fortran)||defined(CRAYFortran)||defined(pgiFortran)) |
---|
87 | #if !(defined(mipsFortran)||defined(DECFortran)||defined(vmsFortran)||defined(CONVEXFortran)||defined(PowerStationFortran)||defined(AbsoftUNIXFortran)||defined(AbsoftProFortran)||defined(SXFortran)) |
---|
88 | /* If no Fortran compiler is given, we choose one for the machines we know. */ |
---|
89 | #if defined(lynx) || defined(VAXUltrix) |
---|
90 | #define f2cFortran /* Lynx: Only support f2c at the moment. |
---|
91 | VAXUltrix: f77 behaves like f2c. |
---|
92 | Support f2c or f77 with gcc, vcc with f2c. |
---|
93 | f77 with vcc works, missing link magic for f77 I/O.*/ |
---|
94 | #endif |
---|
95 | #if defined(__hpux) /* 921107: Use __hpux instead of __hp9000s300 */ |
---|
96 | #define hpuxFortran /* Should also allow hp9000s7/800 use.*/ |
---|
97 | #endif |
---|
98 | #if defined(apollo) |
---|
99 | #define apolloFortran /* __CF__APOLLO67 also defines some behavior. */ |
---|
100 | #endif |
---|
101 | #if defined(sun) || defined(__sun) |
---|
102 | #define sunFortran |
---|
103 | #endif |
---|
104 | #if defined(_IBMR2) |
---|
105 | #define IBMR2Fortran |
---|
106 | #endif |
---|
107 | #if defined(_CRAY) |
---|
108 | #define CRAYFortran /* _CRAYT3E also defines some behavior. */ |
---|
109 | #endif |
---|
110 | #if defined(_SX) |
---|
111 | #define SXFortran |
---|
112 | #endif |
---|
113 | #if defined(mips) || defined(__mips) |
---|
114 | #define mipsFortran |
---|
115 | #endif |
---|
116 | #if defined(vms) || defined(__vms) |
---|
117 | #define vmsFortran |
---|
118 | #endif |
---|
119 | #if defined(__alpha) && defined(__unix__) |
---|
120 | #define DECFortran |
---|
121 | #endif |
---|
122 | #if defined(__convex__) |
---|
123 | #define CONVEXFortran |
---|
124 | #endif |
---|
125 | #if defined(VISUAL_CPLUSPLUS) |
---|
126 | #define PowerStationFortran |
---|
127 | #endif |
---|
128 | #endif /* ...Fortran */ |
---|
129 | #endif /* ...Fortran */ |
---|
130 | |
---|
131 | /* Split #if into 2 because some HP-UX can't handle long #if */ |
---|
132 | #if !(defined(NAGf90Fortran)||defined(f2cFortran)||defined(hpuxFortran)||defined(apolloFortran)||defined(sunFortran)||defined(IBMR2Fortran)||defined(CRAYFortran)||defined(pgiFortran)) |
---|
133 | #if !(defined(mipsFortran)||defined(DECFortran)||defined(vmsFortran)||defined(CONVEXFortran)||defined(PowerStationFortran)||defined(AbsoftUNIXFortran)||defined(AbsoftProFortran)||defined(SXFortran)) |
---|
134 | /* If your compiler barfs on ' #error', replace # with the trigraph for # */ |
---|
135 | #error "cfortran.h: Can't find your environment among:\ |
---|
136 | - MIPS cc and f77 2.0. (e.g. Silicon Graphics, DECstations, ...) \ |
---|
137 | - IBM AIX XL C and FORTRAN Compiler/6000 Version 01.01.0000.0000 \ |
---|
138 | - VAX VMS CC 3.1 and FORTRAN 5.4. \ |
---|
139 | - Alpha VMS DEC C 1.3 and DEC FORTRAN 6.0. \ |
---|
140 | - Alpha OSF DEC C and DEC Fortran for OSF/1 AXP Version 1.2 \ |
---|
141 | - Apollo DomainOS 10.2 (sys5.3) with f77 10.7 and cc 6.7. \ |
---|
142 | - CRAY \ |
---|
143 | - NEC SX-4 SUPER-UX \ |
---|
144 | - CONVEX \ |
---|
145 | - Sun \ |
---|
146 | - PowerStation Fortran with Visual C++ \ |
---|
147 | - HP9000s300/s700/s800 Latest test with: HP-UX A.08.07 A 9000/730 \ |
---|
148 | - LynxOS: cc or gcc with f2c. \ |
---|
149 | - VAXUltrix: vcc,cc or gcc with f2c. gcc or cc with f77. \ |
---|
150 | - f77 with vcc works; but missing link magic for f77 I/O. \ |
---|
151 | - NO fort. None of gcc, cc or vcc generate required names.\ |
---|
152 | - f2c : Use #define f2cFortran, or cc -Df2cFortran \ |
---|
153 | - NAG f90: Use #define NAGf90Fortran, or cc -DNAGf90Fortran \ |
---|
154 | - Absoft UNIX F77: Use #define AbsoftUNIXFortran or cc -DAbsoftUNIXFortran \ |
---|
155 | - Absoft Pro Fortran: Use #define AbsoftProFortran \ |
---|
156 | - Portland Group Fortran: Use #define pgiFortran" |
---|
157 | /* Compiler must throw us out at this point! */ |
---|
158 | #endif |
---|
159 | #endif |
---|
160 | |
---|
161 | |
---|
162 | #if defined(VAXC) && !defined(__VAXC) |
---|
163 | #define OLD_VAXC |
---|
164 | #pragma nostandard /* Prevent %CC-I-PARAMNOTUSED. */ |
---|
165 | #endif |
---|
166 | |
---|
167 | /* Throughout cfortran.h we use: UN = Uppercase Name. LN = Lowercase Name. */ |
---|
168 | |
---|
169 | #if defined(f2cFortran) || defined(NAGf90Fortran) || defined(DECFortran) || defined(mipsFortran) || defined(apolloFortran) || defined(sunFortran) || defined(CONVEXFortran) || defined(SXFortran) || defined(extname) || defined(pgiFortran) |
---|
170 | #define CFC_(UN,LN) _(LN,_) /* Lowercase FORTRAN symbols. */ |
---|
171 | #define orig_fcallsc(UN,LN) CFC_(UN,LN) |
---|
172 | #else |
---|
173 | #if defined(CRAYFortran) || defined(PowerStationFortran) || defined(AbsoftProFortran) |
---|
174 | #ifdef _CRAY /* (UN), not UN, circumvents CRAY preprocessor bug. */ |
---|
175 | #define CFC_(UN,LN) (UN) /* Uppercase FORTRAN symbols. */ |
---|
176 | #else /* At least VISUAL_CPLUSPLUS barfs on (UN), so need UN. */ |
---|
177 | #define CFC_(UN,LN) UN /* Uppercase FORTRAN symbols. */ |
---|
178 | #endif |
---|
179 | #define orig_fcallsc(UN,LN) CFC_(UN,LN) /* CRAY insists on arg.'s here. */ |
---|
180 | #else /* For following machines one may wish to change the fcallsc default. */ |
---|
181 | #define CF_SAME_NAMESPACE |
---|
182 | #ifdef vmsFortran |
---|
183 | #define CFC_(UN,LN) LN /* Either case FORTRAN symbols. */ |
---|
184 | /* BUT we usually use UN for C macro to FORTRAN routines, so use LN here,*/ |
---|
185 | /* because VAX/VMS doesn't do recursive macros. */ |
---|
186 | #define orig_fcallsc(UN,LN) UN |
---|
187 | #else /* HP-UX without +ppu or IBMR2 without -qextname. NOT reccomended. */ |
---|
188 | #define CFC_(UN,LN) LN /* Lowercase FORTRAN symbols. */ |
---|
189 | #define orig_fcallsc(UN,LN) CFC_(UN,LN) |
---|
190 | #endif /* vmsFortran */ |
---|
191 | #endif /* CRAYFortran PowerStationFortran */ |
---|
192 | #endif /* ....Fortran */ |
---|
193 | |
---|
194 | #define fcallsc(UN,LN) orig_fcallsc(UN,LN) |
---|
195 | #define preface_fcallsc(P,p,UN,LN) CFC_(_(P,UN),_(p,LN)) |
---|
196 | #define append_fcallsc(P,p,UN,LN) CFC_(_(UN,P),_(LN,p)) |
---|
197 | |
---|
198 | #define C_FUNCTION(UN,LN) fcallsc(UN,LN) |
---|
199 | #define FORTRAN_FUNCTION(UN,LN) CFC_(UN,LN) |
---|
200 | |
---|
201 | #ifndef COMMON_BLOCK |
---|
202 | #ifndef CONVEXFortran |
---|
203 | #ifndef CLIPPERFortran |
---|
204 | #if !(defined(AbsoftUNIXFortran)||defined(AbsoftProFortran)) |
---|
205 | #define COMMON_BLOCK(UN,LN) CFC_(UN,LN) |
---|
206 | #else |
---|
207 | #define COMMON_BLOCK(UN,LN) _(_C,LN) |
---|
208 | #endif /* AbsoftUNIXFortran or AbsoftProFortran */ |
---|
209 | #else |
---|
210 | #define COMMON_BLOCK(UN,LN) _(LN,__) |
---|
211 | #endif /* CLIPPERFortran */ |
---|
212 | #else |
---|
213 | #define COMMON_BLOCK(UN,LN) _3(_,LN,_) |
---|
214 | #endif /* CONVEXFortran */ |
---|
215 | #endif /* COMMON_BLOCK */ |
---|
216 | |
---|
217 | #ifndef DOUBLE_PRECISION |
---|
218 | #if defined(CRAYFortran) && !defined(_CRAYT3E) |
---|
219 | #define DOUBLE_PRECISION long double |
---|
220 | #else |
---|
221 | #define DOUBLE_PRECISION double |
---|
222 | #endif |
---|
223 | #endif |
---|
224 | |
---|
225 | #ifndef FORTRAN_REAL |
---|
226 | #if defined(CRAYFortran) && defined(_CRAYT3E) |
---|
227 | #define FORTRAN_REAL double |
---|
228 | #else |
---|
229 | #define FORTRAN_REAL float |
---|
230 | #endif |
---|
231 | #endif |
---|
232 | |
---|
233 | #ifdef CRAYFortran |
---|
234 | #ifdef _CRAY |
---|
235 | #include <fortran.h> |
---|
236 | #else |
---|
237 | #include "fortran.h" /* i.e. if crosscompiling assume user has file. */ |
---|
238 | #endif |
---|
239 | #define FLOATVVVVVVV_cfPP (FORTRAN_REAL *) /* Used for C calls FORTRAN. */ |
---|
240 | /* CRAY's double==float but CRAY says pointers to doubles and floats are diff.*/ |
---|
241 | #define VOIDP (void *) /* When FORTRAN calls C, we don't know if C routine |
---|
242 | arg.'s have been declared float *, or double *. */ |
---|
243 | #else |
---|
244 | #define FLOATVVVVVVV_cfPP |
---|
245 | #define VOIDP |
---|
246 | #endif |
---|
247 | |
---|
248 | #ifdef vmsFortran |
---|
249 | #if defined(vms) || defined(__vms) |
---|
250 | #include <descrip.h> |
---|
251 | #else |
---|
252 | #include "descrip.h" /* i.e. if crosscompiling assume user has file. */ |
---|
253 | #endif |
---|
254 | #endif |
---|
255 | |
---|
256 | #ifdef sunFortran |
---|
257 | #if defined(sun) || defined(__sun) |
---|
258 | #include <math.h> /* Sun's FLOATFUNCTIONTYPE, ASSIGNFLOAT, RETURNFLOAT. */ |
---|
259 | #else |
---|
260 | #include "math.h" /* i.e. if crosscompiling assume user has file. */ |
---|
261 | #endif |
---|
262 | /* At least starting with the default C compiler SC3.0.1 of SunOS 5.3, |
---|
263 | * FLOATFUNCTIONTYPE, ASSIGNFLOAT, RETURNFLOAT are not required and not in |
---|
264 | * <math.h>, since sun C no longer promotes C float return values to doubles. |
---|
265 | * Therefore, only use them if defined. |
---|
266 | * Even if gcc is being used, assume that it exhibits the Sun C compiler |
---|
267 | * behavior in order to be able to use *.o from the Sun C compiler. |
---|
268 | * i.e. If FLOATFUNCTIONTYPE, etc. are in math.h, they required by gcc. |
---|
269 | */ |
---|
270 | #endif |
---|
271 | |
---|
272 | #ifndef apolloFortran |
---|
273 | #define COMMON_BLOCK_DEF(DEFINITION, NAME) extern DEFINITION NAME |
---|
274 | #define CF_NULL_PROTO |
---|
275 | #else /* HP doesn't understand #elif. */ |
---|
276 | /* Without ANSI prototyping, Apollo promotes float functions to double. */ |
---|
277 | /* Note that VAX/VMS, IBM, Mips choke on 'type function(...);' prototypes. */ |
---|
278 | #define CF_NULL_PROTO ... |
---|
279 | #ifndef __CF__APOLLO67 |
---|
280 | #define COMMON_BLOCK_DEF(DEFINITION, NAME) \ |
---|
281 | DEFINITION NAME __attribute((__section(NAME))) |
---|
282 | #else |
---|
283 | #define COMMON_BLOCK_DEF(DEFINITION, NAME) \ |
---|
284 | DEFINITION NAME #attribute[section(NAME)] |
---|
285 | #endif |
---|
286 | #endif |
---|
287 | |
---|
288 | #ifdef __cplusplus |
---|
289 | #undef CF_NULL_PROTO |
---|
290 | #define CF_NULL_PROTO ... |
---|
291 | #endif |
---|
292 | |
---|
293 | |
---|
294 | #ifndef USE_NEW_DELETE |
---|
295 | #ifdef __cplusplus |
---|
296 | #define USE_NEW_DELETE 1 |
---|
297 | #else |
---|
298 | #define USE_NEW_DELETE 0 |
---|
299 | #endif |
---|
300 | #endif |
---|
301 | #if USE_NEW_DELETE |
---|
302 | #define _cf_malloc(N) new char[N] |
---|
303 | #define _cf_free(P) delete[] P |
---|
304 | #else |
---|
305 | #define _cf_malloc(N) (char *)malloc(N) |
---|
306 | #define _cf_free(P) free(P) |
---|
307 | #endif |
---|
308 | |
---|
309 | #ifdef mipsFortran |
---|
310 | #define CF_DECLARE_GETARG int f77argc; char **f77argv |
---|
311 | #define CF_SET_GETARG(ARGC,ARGV) f77argc = ARGC; f77argv = ARGV |
---|
312 | #else |
---|
313 | #define CF_DECLARE_GETARG |
---|
314 | #define CF_SET_GETARG(ARGC,ARGV) |
---|
315 | #endif |
---|
316 | |
---|
317 | #ifdef OLD_VAXC /* Allow %CC-I-PARAMNOTUSED. */ |
---|
318 | #pragma standard |
---|
319 | #endif |
---|
320 | |
---|
321 | #define AcfCOMMA , |
---|
322 | #define AcfCOLON ; |
---|
323 | |
---|
324 | /*-------------------------------------------------------------------------*/ |
---|
325 | |
---|
326 | /* UTILITIES USED WITHIN CFORTRAN.H */ |
---|
327 | |
---|
328 | #define _cfMIN(A,B) (A<B?A:B) |
---|
329 | |
---|
330 | /* 970211 - XIX.145: |
---|
331 | firstindexlength - better name is all_but_last_index_lengths |
---|
332 | secondindexlength - better name is last_index_length |
---|
333 | */ |
---|
334 | #define firstindexlength(A) (sizeof(A[0])==1 ? 1 : (sizeof(A) / sizeof(A[0])) ) |
---|
335 | #define secondindexlength(A) (sizeof(A[0])==1 ? sizeof(A) : sizeof(A[0]) ) |
---|
336 | |
---|
337 | /* Behavior of FORTRAN LOGICAL. All machines' LOGICAL is same size as C's int. |
---|
338 | Conversion is automatic except for arrays which require F2CLOGICALV/C2FLOGICALV. |
---|
339 | f2c, MIPS f77 [DECstation, SGI], VAX Ultrix f77, |
---|
340 | HP-UX f77 : as in C. |
---|
341 | VAX/VMS FORTRAN, VAX Ultrix fort, |
---|
342 | Absoft Unix Fortran, IBM RS/6000 xlf : LS Bit = 0/1 = TRUE/FALSE. |
---|
343 | Apollo : neg. = TRUE, else FALSE. |
---|
344 | [Apollo accepts -1 as TRUE for function values, but NOT all other neg. values.] |
---|
345 | [DECFortran for Ultrix RISC is also called f77 but is the same as VAX/VMS.] |
---|
346 | [MIPS f77 treats .eqv./.neqv. as .eq./.ne. and hence requires LOGICAL_STRICT.]*/ |
---|
347 | |
---|
348 | #if defined(NAGf90Fortran) || defined(f2cFortran) || defined(mipsFortran) || defined(PowerStationFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran) || defined(AbsoftProFortran) || defined(SXFortran) || defined(pgiFortran) |
---|
349 | /* SX/PowerStationFortran have 0 and 1 defined, others are neither T nor F. */ |
---|
350 | /* hpuxFortran800 has 0 and 0x01000000 defined. Others are unknown. */ |
---|
351 | #define LOGICAL_STRICT /* Other Fortran have .eqv./.neqv. == .eq./.ne. */ |
---|
352 | #endif |
---|
353 | |
---|
354 | #define C2FLOGICALV(A,I) \ |
---|
355 | do {int __i; for(__i=0;__i<I;__i++) A[__i]=C2FLOGICAL(A[__i]); } while (0) |
---|
356 | #define F2CLOGICALV(A,I) \ |
---|
357 | do {int __i; for(__i=0;__i<I;__i++) A[__i]=F2CLOGICAL(A[__i]); } while (0) |
---|
358 | |
---|
359 | #if defined(apolloFortran) |
---|
360 | #define C2FLOGICAL(L) ((L)?-1:(L)&~((unsigned)1<<sizeof(int)*8-1)) |
---|
361 | #define F2CLOGICAL(L) ((L)<0?(L):0) |
---|
362 | #else |
---|
363 | #if defined(CRAYFortran) |
---|
364 | #define C2FLOGICAL(L) _btol(L) |
---|
365 | #define F2CLOGICAL(L) _ltob(&(L)) /* Strangely _ltob() expects a pointer. */ |
---|
366 | #else |
---|
367 | #if defined(IBMR2Fortran) || defined(vmsFortran) || defined(DECFortran) || defined(AbsoftUNIXFortran) |
---|
368 | /* How come no AbsoftProFortran ? */ |
---|
369 | #define C2FLOGICAL(L) ((L)?(L)|1:(L)&~(int)1) |
---|
370 | #define F2CLOGICAL(L) ((L)&1?(L):0) |
---|
371 | #else |
---|
372 | #if defined(CONVEXFortran) |
---|
373 | #define C2FLOGICAL(L) ((L) ? ~0 : 0 ) |
---|
374 | #define F2CLOGICAL(L) (L) |
---|
375 | #else /* others evaluate LOGICALs as for C. */ |
---|
376 | #define C2FLOGICAL(L) (L) |
---|
377 | #define F2CLOGICAL(L) (L) |
---|
378 | #ifndef LOGICAL_STRICT |
---|
379 | #undef C2FLOGICALV |
---|
380 | #undef F2CLOGICALV |
---|
381 | #define C2FLOGICALV(A,I) |
---|
382 | #define F2CLOGICALV(A,I) |
---|
383 | #endif /* LOGICAL_STRICT */ |
---|
384 | #endif /* CONVEXFortran || All Others */ |
---|
385 | #endif /* IBMR2Fortran vmsFortran DECFortran AbsoftUNIXFortran */ |
---|
386 | #endif /* CRAYFortran */ |
---|
387 | #endif /* apolloFortran */ |
---|
388 | |
---|
389 | /* 970514 - In addition to CRAY, there may be other machines |
---|
390 | for which LOGICAL_STRICT makes no sense. */ |
---|
391 | #if defined(LOGICAL_STRICT) && !defined(CRAYFortran) |
---|
392 | /* Force C2FLOGICAL to generate only the values for either .TRUE. or .FALSE. |
---|
393 | SX/PowerStationFortran only have 0 and 1 defined. |
---|
394 | Elsewhere, only needed if you want to do: |
---|
395 | logical lvariable |
---|
396 | if (lvariable .eq. .true.) then ! (1) |
---|
397 | instead of |
---|
398 | if (lvariable .eqv. .true.) then ! (2) |
---|
399 | - (1) may not even be FORTRAN/77 and that Apollo's f77 and IBM's xlf |
---|
400 | refuse to compile (1), so you are probably well advised to stay away from |
---|
401 | (1) and from LOGICAL_STRICT. |
---|
402 | - You pay a (slight) performance penalty for using LOGICAL_STRICT. */ |
---|
403 | #undef C2FLOGICAL |
---|
404 | #ifdef hpuxFortran800 |
---|
405 | #define C2FLOGICAL(L) ((L)?0x01000000:0) |
---|
406 | #else |
---|
407 | #if defined(apolloFortran) || defined(vmsFortran) || defined(DECFortran) |
---|
408 | #define C2FLOGICAL(L) ((L)?-1:0) /* These machines use -1/0 for .true./.false.*/ |
---|
409 | #else |
---|
410 | #define C2FLOGICAL(L) ((L)? 1:0) /* All others use +1/0 for .true./.false.*/ |
---|
411 | #endif |
---|
412 | #endif |
---|
413 | #endif /* LOGICAL_STRICT */ |
---|
414 | |
---|
415 | /* Convert a vector of C strings into FORTRAN strings. */ |
---|
416 | #ifndef __CF__KnR |
---|
417 | static char *c2fstrv(char* cstr, char *fstr, int elem_len, int sizeofcstr) |
---|
418 | #else |
---|
419 | static char *c2fstrv( cstr, fstr, elem_len, sizeofcstr) |
---|
420 | char* cstr; char *fstr; int elem_len; int sizeofcstr; |
---|
421 | #endif |
---|
422 | { int i,j; |
---|
423 | /* elem_len includes \0 for C strings. Fortran strings don't have term. \0. |
---|
424 | Useful size of string must be the same in both languages. */ |
---|
425 | for (i=0; i<sizeofcstr/elem_len; i++) { |
---|
426 | for (j=1; j<elem_len && *cstr; j++) *fstr++ = *cstr++; |
---|
427 | cstr += 1+elem_len-j; |
---|
428 | for (; j<elem_len; j++) *fstr++ = ' '; |
---|
429 | } /* 95109 - Seems to be returning the original fstr. */ |
---|
430 | return fstr-sizeofcstr+sizeofcstr/elem_len; } |
---|
431 | |
---|
432 | /* Convert a vector of FORTRAN strings into C strings. */ |
---|
433 | #ifndef __CF__KnR |
---|
434 | static char *f2cstrv(char *fstr, char* cstr, int elem_len, int sizeofcstr) |
---|
435 | #else |
---|
436 | static char *f2cstrv( fstr, cstr, elem_len, sizeofcstr) |
---|
437 | char *fstr; char* cstr; int elem_len; int sizeofcstr; |
---|
438 | #endif |
---|
439 | { int i,j; |
---|
440 | /* elem_len includes \0 for C strings. Fortran strings don't have term. \0. |
---|
441 | Useful size of string must be the same in both languages. */ |
---|
442 | cstr += sizeofcstr; |
---|
443 | fstr += sizeofcstr - sizeofcstr/elem_len; |
---|
444 | for (i=0; i<sizeofcstr/elem_len; i++) { |
---|
445 | *--cstr = '\0'; |
---|
446 | for (j=1; j<elem_len; j++) *--cstr = *--fstr; |
---|
447 | } return cstr; } |
---|
448 | |
---|
449 | /* kill the trailing char t's in string s. */ |
---|
450 | #ifndef __CF__KnR |
---|
451 | static char *kill_trailing(char *s, char t) |
---|
452 | #else |
---|
453 | static char *kill_trailing( s, t) char *s; char t; |
---|
454 | #endif |
---|
455 | {char *e; |
---|
456 | e = s + strlen(s); |
---|
457 | if (e>s) { /* Need this to handle NULL string.*/ |
---|
458 | while (e>s && *--e==t); /* Don't follow t's past beginning. */ |
---|
459 | e[*e==t?0:1] = '\0'; /* Handle s[0]=t correctly. */ |
---|
460 | } return s; } |
---|
461 | |
---|
462 | /* kill_trailingn(s,t,e) will kill the trailing t's in string s. e normally |
---|
463 | points to the terminating '\0' of s, but may actually point to anywhere in s. |
---|
464 | s's new '\0' will be placed at e or earlier in order to remove any trailing t's. |
---|
465 | If e<s string s is left unchanged. */ |
---|
466 | #ifndef __CF__KnR |
---|
467 | static char *kill_trailingn(char *s, char t, char *e) |
---|
468 | #else |
---|
469 | static char *kill_trailingn( s, t, e) char *s; char t; char *e; |
---|
470 | #endif |
---|
471 | { |
---|
472 | if (e==s) *e = '\0'; /* Kill the string makes sense here.*/ |
---|
473 | else if (e>s) { /* Watch out for neg. length string.*/ |
---|
474 | while (e>s && *--e==t); /* Don't follow t's past beginning. */ |
---|
475 | e[*e==t?0:1] = '\0'; /* Handle s[0]=t correctly. */ |
---|
476 | } return s; } |
---|
477 | |
---|
478 | /* Note the following assumes that any element which has t's to be chopped off, |
---|
479 | does indeed fill the entire element. */ |
---|
480 | #ifndef __CF__KnR |
---|
481 | static char *vkill_trailing(char* cstr, int elem_len, int sizeofcstr, char t) |
---|
482 | #else |
---|
483 | static char *vkill_trailing( cstr, elem_len, sizeofcstr, t) |
---|
484 | char* cstr; int elem_len; int sizeofcstr; char t; |
---|
485 | #endif |
---|
486 | { int i; |
---|
487 | for (i=0; i<sizeofcstr/elem_len; i++) /* elem_len includes \0 for C strings. */ |
---|
488 | kill_trailingn(cstr+elem_len*i,t,cstr+elem_len*(i+1)-1); |
---|
489 | return cstr; } |
---|
490 | |
---|
491 | #ifdef vmsFortran |
---|
492 | typedef struct dsc$descriptor_s fstring; |
---|
493 | #define DSC$DESCRIPTOR_A(DIMCT) \ |
---|
494 | struct { \ |
---|
495 | unsigned short dsc$w_length; unsigned char dsc$b_dtype; \ |
---|
496 | unsigned char dsc$b_class; char *dsc$a_pointer; \ |
---|
497 | char dsc$b_scale; unsigned char dsc$b_digits; \ |
---|
498 | struct { \ |
---|
499 | unsigned : 3; unsigned dsc$v_fl_binscale : 1; \ |
---|
500 | unsigned dsc$v_fl_redim : 1; unsigned dsc$v_fl_column : 1; \ |
---|
501 | unsigned dsc$v_fl_coeff : 1; unsigned dsc$v_fl_bounds : 1; \ |
---|
502 | } dsc$b_aflags; \ |
---|
503 | unsigned char dsc$b_dimct; unsigned long dsc$l_arsize; \ |
---|
504 | char *dsc$a_a0; long dsc$l_m [DIMCT]; \ |
---|
505 | struct { \ |
---|
506 | long dsc$l_l; long dsc$l_u; \ |
---|
507 | } dsc$bounds [DIMCT]; \ |
---|
508 | } |
---|
509 | typedef DSC$DESCRIPTOR_A(1) fstringvector; |
---|
510 | /*typedef DSC$DESCRIPTOR_A(2) fstringarrarr; |
---|
511 | typedef DSC$DESCRIPTOR_A(3) fstringarrarrarr;*/ |
---|
512 | #define initfstr(F,C,ELEMNO,ELEMLEN) \ |
---|
513 | ( (F).dsc$l_arsize= ( (F).dsc$w_length =(ELEMLEN) ) \ |
---|
514 | *( (F).dsc$l_m[0]=(F).dsc$bounds[0].dsc$l_u=(ELEMNO) ), \ |
---|
515 | (F).dsc$a_a0 = ( (F).dsc$a_pointer=(C) ) - (F).dsc$w_length ,(F)) |
---|
516 | |
---|
517 | #else |
---|
518 | #define _NUM_ELEMS -1 |
---|
519 | #define _NUM_ELEM_ARG -2 |
---|
520 | #define NUM_ELEMS(A) A,_NUM_ELEMS |
---|
521 | #define NUM_ELEM_ARG(B) *_2(A,B),_NUM_ELEM_ARG |
---|
522 | #define TERM_CHARS(A,B) A,B |
---|
523 | #ifndef __CF__KnR |
---|
524 | static int num_elem(char *strv, unsigned elem_len, int term_char, int num_term) |
---|
525 | #else |
---|
526 | static int num_elem( strv, elem_len, term_char, num_term) |
---|
527 | char *strv; unsigned elem_len; int term_char; int num_term; |
---|
528 | #endif |
---|
529 | /* elem_len is the number of characters in each element of strv, the FORTRAN |
---|
530 | vector of strings. The last element of the vector must begin with at least |
---|
531 | num_term term_char characters, so that this routine can determine how |
---|
532 | many elements are in the vector. */ |
---|
533 | { |
---|
534 | unsigned num,i; |
---|
535 | if (num_term == _NUM_ELEMS || num_term == _NUM_ELEM_ARG) |
---|
536 | return term_char; |
---|
537 | if (num_term <=0) num_term = (int)elem_len; |
---|
538 | for (num=0; ; num++) { |
---|
539 | for (i=0; i<(unsigned)num_term && *strv==term_char; i++,strv++); |
---|
540 | if (i==(unsigned)num_term) break; |
---|
541 | else strv += elem_len-i; |
---|
542 | } |
---|
543 | return (int)num; |
---|
544 | } |
---|
545 | #endif |
---|
546 | /*-------------------------------------------------------------------------*/ |
---|
547 | |
---|
548 | /* UTILITIES FOR C TO USE STRINGS IN FORTRAN COMMON BLOCKS */ |
---|
549 | |
---|
550 | /* C string TO Fortran Common Block STRing. */ |
---|
551 | /* DIM is the number of DIMensions of the array in terms of strings, not |
---|
552 | characters. e.g. char a[12] has DIM = 0, char a[12][4] has DIM = 1, etc. */ |
---|
553 | #define C2FCBSTR(CSTR,FSTR,DIM) \ |
---|
554 | c2fstrv((char *)CSTR, (char *)FSTR, sizeof(FSTR)/cfelementsof(FSTR,DIM)+1, \ |
---|
555 | sizeof(FSTR)+cfelementsof(FSTR,DIM)) |
---|
556 | |
---|
557 | /* Fortran Common Block string TO C STRing. */ |
---|
558 | #define FCB2CSTR(FSTR,CSTR,DIM) \ |
---|
559 | vkill_trailing(f2cstrv((char *)FSTR, (char *)CSTR, \ |
---|
560 | sizeof(FSTR)/cfelementsof(FSTR,DIM)+1, \ |
---|
561 | sizeof(FSTR)+cfelementsof(FSTR,DIM)), \ |
---|
562 | sizeof(FSTR)/cfelementsof(FSTR,DIM)+1, \ |
---|
563 | sizeof(FSTR)+cfelementsof(FSTR,DIM), ' ') |
---|
564 | |
---|
565 | #define cfDEREFERENCE0 |
---|
566 | #define cfDEREFERENCE1 * |
---|
567 | #define cfDEREFERENCE2 ** |
---|
568 | #define cfDEREFERENCE3 *** |
---|
569 | #define cfDEREFERENCE4 **** |
---|
570 | #define cfDEREFERENCE5 ***** |
---|
571 | #define cfelementsof(A,D) (sizeof(A)/sizeof(_(cfDEREFERENCE,D)(A))) |
---|
572 | |
---|
573 | /*-------------------------------------------------------------------------*/ |
---|
574 | |
---|
575 | /* UTILITIES FOR C TO CALL FORTRAN SUBROUTINES */ |
---|
576 | |
---|
577 | /* Define lookup tables for how to handle the various types of variables. */ |
---|
578 | |
---|
579 | #ifdef OLD_VAXC /* Prevent %CC-I-PARAMNOTUSED. */ |
---|
580 | #pragma nostandard |
---|
581 | #endif |
---|
582 | |
---|
583 | #define ZTRINGV_NUM(I) I |
---|
584 | #define ZTRINGV_ARGFP(I) (*(_2(A,I))) /* Undocumented. For PINT, etc. */ |
---|
585 | #define ZTRINGV_ARGF(I) _2(A,I) |
---|
586 | #ifdef CFSUBASFUN |
---|
587 | #define ZTRINGV_ARGS(I) ZTRINGV_ARGF(I) |
---|
588 | #else |
---|
589 | #define ZTRINGV_ARGS(I) _2(B,I) |
---|
590 | #endif |
---|
591 | |
---|
592 | #define PBYTE_cfVP(A,B) PINT_cfVP(A,B) |
---|
593 | #define PDOUBLE_cfVP(A,B) |
---|
594 | #define PFLOAT_cfVP(A,B) |
---|
595 | #ifdef ZTRINGV_ARGS_allows_Pvariables |
---|
596 | /* This allows Pvariables for ARGS. ARGF machinery is above ARGFP. |
---|
597 | * B is not needed because the variable may be changed by the Fortran routine, |
---|
598 | * but because B is the only way to access an arbitrary macro argument. */ |
---|
599 | #define PINT_cfVP(A,B) int B = (int)A; /* For ZSTRINGV_ARGS */ |
---|
600 | #else |
---|
601 | #define PINT_cfVP(A,B) |
---|
602 | #endif |
---|
603 | #define PLOGICAL_cfVP(A,B) int *B; /* Returning LOGICAL in FUNn and SUBn */ |
---|
604 | #define PLONG_cfVP(A,B) PINT_cfVP(A,B) |
---|
605 | #define PSHORT_cfVP(A,B) PINT_cfVP(A,B) |
---|
606 | |
---|
607 | #define VCF_INT_S(T,A,B) _(T,VVVVVVV_cfTYPE) B = A; |
---|
608 | #define VCF_INT_F(T,A,B) _(T,_cfVCF)(A,B) |
---|
609 | /* _cfVCF table is directly mapped to _cfCCC table. */ |
---|
610 | #define BYTE_cfVCF(A,B) |
---|
611 | #define DOUBLE_cfVCF(A,B) |
---|
612 | #if !defined(__CF__KnR) |
---|
613 | #define FLOAT_cfVCF(A,B) |
---|
614 | #else |
---|
615 | #define FLOAT_cfVCF(A,B) FORTRAN_REAL B = A; |
---|
616 | #endif |
---|
617 | #define INT_cfVCF(A,B) |
---|
618 | #define LOGICAL_cfVCF(A,B) |
---|
619 | #define LONG_cfVCF(A,B) |
---|
620 | #define SHORT_cfVCF(A,B) |
---|
621 | |
---|
622 | /* 980416 |
---|
623 | Cast (void (*)(CF_NULL_PROTO)) causes SunOS CC 4.2 occasionally to barf, |
---|
624 | while the following equivalent typedef is fine. |
---|
625 | For consistency use the typedef on all machines. |
---|
626 | */ |
---|
627 | typedef void (*cfCAST_FUNCTION)(CF_NULL_PROTO); |
---|
628 | |
---|
629 | #define VCF(TN,I) _Icf4(4,V,TN,_(A,I),_(B,I),F) |
---|
630 | #define VVCF(TN,AI,BI) _Icf4(4,V,TN,AI,BI,S) |
---|
631 | #define INT_cfV(T,A,B,F) _(VCF_INT_,F)(T,A,B) |
---|
632 | #define INTV_cfV(T,A,B,F) |
---|
633 | #define INTVV_cfV(T,A,B,F) |
---|
634 | #define INTVVV_cfV(T,A,B,F) |
---|
635 | #define INTVVVV_cfV(T,A,B,F) |
---|
636 | #define INTVVVVV_cfV(T,A,B,F) |
---|
637 | #define INTVVVVVV_cfV(T,A,B,F) |
---|
638 | #define INTVVVVVVV_cfV(T,A,B,F) |
---|
639 | #define PINT_cfV( T,A,B,F) _(T,_cfVP)(A,B) |
---|
640 | #define PVOID_cfV( T,A,B,F) |
---|
641 | #if defined(apolloFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran) || defined(AbsoftProFortran) |
---|
642 | #define ROUTINE_cfV(T,A,B,F) void (*B)(CF_NULL_PROTO) = (cfCAST_FUNCTION)A; |
---|
643 | #else |
---|
644 | #define ROUTINE_cfV(T,A,B,F) |
---|
645 | #endif |
---|
646 | #define SIMPLE_cfV(T,A,B,F) |
---|
647 | #ifdef vmsFortran |
---|
648 | #define STRING_cfV(T,A,B,F) static struct {fstring f; unsigned clen;} B = \ |
---|
649 | {{0,DSC$K_DTYPE_T,DSC$K_CLASS_S,NULL},0}; |
---|
650 | #define PSTRING_cfV(T,A,B,F) static fstring B={0,DSC$K_DTYPE_T,DSC$K_CLASS_S,NULL}; |
---|
651 | #define STRINGV_cfV(T,A,B,F) static fstringvector B = \ |
---|
652 | {sizeof(A),DSC$K_DTYPE_T,DSC$K_CLASS_A,NULL,0,0,{0,0,1,1,1},1,0,NULL,0,{1,0}}; |
---|
653 | #define PSTRINGV_cfV(T,A,B,F) static fstringvector B = \ |
---|
654 | {0,DSC$K_DTYPE_T,DSC$K_CLASS_A,NULL,0,0,{0,0,1,1,1},1,0,NULL,0,{1,0}}; |
---|
655 | #else |
---|
656 | #define STRING_cfV(T,A,B,F) struct {unsigned int clen, flen;} B; |
---|
657 | #define STRINGV_cfV(T,A,B,F) struct {char *s, *fs; unsigned flen;} B; |
---|
658 | #define PSTRING_cfV(T,A,B,F) int B; |
---|
659 | #define PSTRINGV_cfV(T,A,B,F) struct{char *fs; unsigned int sizeofA,flen;}B; |
---|
660 | #endif |
---|
661 | #define ZTRINGV_cfV(T,A,B,F) STRINGV_cfV(T,A,B,F) |
---|
662 | #define PZTRINGV_cfV(T,A,B,F) PSTRINGV_cfV(T,A,B,F) |
---|
663 | |
---|
664 | /* Note that the actions of the A table were performed inside the AA table. |
---|
665 | VAX Ultrix vcc, and HP-UX cc, didn't evaluate arguments to functions left to |
---|
666 | right, so we had to split the original table into the current robust two. */ |
---|
667 | #define ACF(NAME,TN,AI,I) _(TN,_cfSTR)(4,A,NAME,I,AI,_(B,I),0) |
---|
668 | #define DEFAULT_cfA(M,I,A,B) |
---|
669 | #define LOGICAL_cfA(M,I,A,B) B=C2FLOGICAL(B); |
---|
670 | #define PLOGICAL_cfA(M,I,A,B) A=C2FLOGICAL(A); |
---|
671 | #define STRING_cfA(M,I,A,B) STRING_cfC(M,I,A,B,sizeof(A)) |
---|
672 | #define PSTRING_cfA(M,I,A,B) PSTRING_cfC(M,I,A,B,sizeof(A)) |
---|
673 | #ifdef vmsFortran |
---|
674 | #define AATRINGV_cfA( A,B, sA,filA,silA) \ |
---|
675 | initfstr(B,_cf_malloc((sA)-(filA)),(filA),(silA)-1), \ |
---|
676 | c2fstrv(A,B.dsc$a_pointer,(silA),(sA)); |
---|
677 | #define APATRINGV_cfA( A,B, sA,filA,silA) \ |
---|
678 | initfstr(B,A,(filA),(silA)-1),c2fstrv(A,A,(silA),(sA)); |
---|
679 | #else |
---|
680 | #define AATRINGV_cfA( A,B, sA,filA,silA) \ |
---|
681 | (B.s=_cf_malloc((sA)-(filA)),B.fs=c2fstrv(A,B.s,(B.flen=(silA)-1)+1,(sA))); |
---|
682 | #define APATRINGV_cfA( A,B, sA,filA,silA) \ |
---|
683 | B.fs=c2fstrv(A,A,(B.flen=(silA)-1)+1,B.sizeofA=(sA)); |
---|
684 | #endif |
---|
685 | #define STRINGV_cfA(M,I,A,B) \ |
---|
686 | AATRINGV_cfA((char *)A,B,sizeof(A),firstindexlength(A),secondindexlength(A)) |
---|
687 | #define PSTRINGV_cfA(M,I,A,B) \ |
---|
688 | APATRINGV_cfA((char *)A,B,sizeof(A),firstindexlength(A),secondindexlength(A)) |
---|
689 | #define ZTRINGV_cfA(M,I,A,B) AATRINGV_cfA( (char *)A,B, \ |
---|
690 | (_3(M,_ELEMS_,I))*(( _3(M,_ELEMLEN_,I))+1), \ |
---|
691 | (_3(M,_ELEMS_,I)),(_3(M,_ELEMLEN_,I))+1) |
---|
692 | #define PZTRINGV_cfA(M,I,A,B) APATRINGV_cfA( (char *)A,B, \ |
---|
693 | (_3(M,_ELEMS_,I))*(( _3(M,_ELEMLEN_,I))+1), \ |
---|
694 | (_3(M,_ELEMS_,I)),(_3(M,_ELEMLEN_,I))+1) |
---|
695 | |
---|
696 | #define PBYTE_cfAAP(A,B) &A |
---|
697 | #define PDOUBLE_cfAAP(A,B) &A |
---|
698 | #define PFLOAT_cfAAP(A,B) FLOATVVVVVVV_cfPP &A |
---|
699 | #define PINT_cfAAP(A,B) &A |
---|
700 | #define PLOGICAL_cfAAP(A,B) B= &A /* B used to keep a common W table. */ |
---|
701 | #define PLONG_cfAAP(A,B) &A |
---|
702 | #define PSHORT_cfAAP(A,B) &A |
---|
703 | |
---|
704 | #define AACF(TN,AI,I,C) _SEP_(TN,C,cfCOMMA) _Icf(3,AA,TN,AI,_(B,I)) |
---|
705 | #define INT_cfAA(T,A,B) &B |
---|
706 | #define INTV_cfAA(T,A,B) _(T,VVVVVV_cfPP) A |
---|
707 | #define INTVV_cfAA(T,A,B) _(T,VVVVV_cfPP) A[0] |
---|
708 | #define INTVVV_cfAA(T,A,B) _(T,VVVV_cfPP) A[0][0] |
---|
709 | #define INTVVVV_cfAA(T,A,B) _(T,VVV_cfPP) A[0][0][0] |
---|
710 | #define INTVVVVV_cfAA(T,A,B) _(T,VV_cfPP) A[0][0][0][0] |
---|
711 | #define INTVVVVVV_cfAA(T,A,B) _(T,V_cfPP) A[0][0][0][0][0] |
---|
712 | #define INTVVVVVVV_cfAA(T,A,B) _(T,_cfPP) A[0][0][0][0][0][0] |
---|
713 | #define PINT_cfAA(T,A,B) _(T,_cfAAP)(A,B) |
---|
714 | #define PVOID_cfAA(T,A,B) (void *) A |
---|
715 | #if defined(apolloFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran) |
---|
716 | #define ROUTINE_cfAA(T,A,B) &B |
---|
717 | #else |
---|
718 | #define ROUTINE_cfAA(T,A,B) (cfCAST_FUNCTION)A |
---|
719 | #endif |
---|
720 | #define STRING_cfAA(T,A,B) STRING_cfCC(T,A,B) |
---|
721 | #define PSTRING_cfAA(T,A,B) PSTRING_cfCC(T,A,B) |
---|
722 | #ifdef vmsFortran |
---|
723 | #define STRINGV_cfAA(T,A,B) &B |
---|
724 | #else |
---|
725 | #ifdef CRAYFortran |
---|
726 | #define STRINGV_cfAA(T,A,B) _cptofcd(B.fs,B.flen) |
---|
727 | #else |
---|
728 | #define STRINGV_cfAA(T,A,B) B.fs |
---|
729 | #endif |
---|
730 | #endif |
---|
731 | #define PSTRINGV_cfAA(T,A,B) STRINGV_cfAA(T,A,B) |
---|
732 | #define ZTRINGV_cfAA(T,A,B) STRINGV_cfAA(T,A,B) |
---|
733 | #define PZTRINGV_cfAA(T,A,B) STRINGV_cfAA(T,A,B) |
---|
734 | |
---|
735 | #if defined(vmsFortran) || defined(CRAYFortran) |
---|
736 | #define JCF(TN,I) |
---|
737 | #define KCF(TN,I) |
---|
738 | #else |
---|
739 | #define JCF(TN,I) _(TN,_cfSTR)(1,J,_(B,I), 0,0,0,0) |
---|
740 | #if defined(AbsoftUNIXFortran) |
---|
741 | #define DEFAULT_cfJ(B) ,0 |
---|
742 | #else |
---|
743 | #define DEFAULT_cfJ(B) |
---|
744 | #endif |
---|
745 | #define LOGICAL_cfJ(B) DEFAULT_cfJ(B) |
---|
746 | #define PLOGICAL_cfJ(B) DEFAULT_cfJ(B) |
---|
747 | #define STRING_cfJ(B) ,B.flen |
---|
748 | #define PSTRING_cfJ(B) ,B |
---|
749 | #define STRINGV_cfJ(B) STRING_cfJ(B) |
---|
750 | #define PSTRINGV_cfJ(B) STRING_cfJ(B) |
---|
751 | #define ZTRINGV_cfJ(B) STRING_cfJ(B) |
---|
752 | #define PZTRINGV_cfJ(B) STRING_cfJ(B) |
---|
753 | |
---|
754 | /* KCF is identical to DCF, except that KCF ZTRING is not empty. */ |
---|
755 | #define KCF(TN,I) _(TN,_cfSTR)(1,KK,_(B,I), 0,0,0,0) |
---|
756 | #if defined(AbsoftUNIXFortran) |
---|
757 | #define DEFAULT_cfKK(B) , unsigned B |
---|
758 | #else |
---|
759 | #define DEFAULT_cfKK(B) |
---|
760 | #endif |
---|
761 | #define LOGICAL_cfKK(B) DEFAULT_cfKK(B) |
---|
762 | #define PLOGICAL_cfKK(B) DEFAULT_cfKK(B) |
---|
763 | #define STRING_cfKK(B) , unsigned B |
---|
764 | #define PSTRING_cfKK(B) STRING_cfKK(B) |
---|
765 | #define STRINGV_cfKK(B) STRING_cfKK(B) |
---|
766 | #define PSTRINGV_cfKK(B) STRING_cfKK(B) |
---|
767 | #define ZTRINGV_cfKK(B) STRING_cfKK(B) |
---|
768 | #define PZTRINGV_cfKK(B) STRING_cfKK(B) |
---|
769 | #endif |
---|
770 | |
---|
771 | #define WCF(TN,AN,I) _(TN,_cfSTR)(2,W,AN,_(B,I), 0,0,0) |
---|
772 | #define DEFAULT_cfW(A,B) |
---|
773 | #define LOGICAL_cfW(A,B) |
---|
774 | #define PLOGICAL_cfW(A,B) *B=F2CLOGICAL(*B); |
---|
775 | #define STRING_cfW(A,B) (A[B.clen]!='\0'?A[B.clen]='\0':0); /* A?="constnt"*/ |
---|
776 | #define PSTRING_cfW(A,B) kill_trailing(A,' '); |
---|
777 | #ifdef vmsFortran |
---|
778 | #define STRINGV_cfW(A,B) _cf_free(B.dsc$a_pointer); |
---|
779 | #define PSTRINGV_cfW(A,B) \ |
---|
780 | vkill_trailing(f2cstrv((char*)A, (char*)A, \ |
---|
781 | B.dsc$w_length+1, B.dsc$l_arsize+B.dsc$l_m[0]), \ |
---|
782 | B.dsc$w_length+1, B.dsc$l_arsize+B.dsc$l_m[0], ' '); |
---|
783 | #else |
---|
784 | #define STRINGV_cfW(A,B) _cf_free(B.s); |
---|
785 | #define PSTRINGV_cfW(A,B) vkill_trailing( \ |
---|
786 | f2cstrv((char*)A,(char*)A,B.flen+1,B.sizeofA), B.flen+1,B.sizeofA,' '); |
---|
787 | #endif |
---|
788 | #define ZTRINGV_cfW(A,B) STRINGV_cfW(A,B) |
---|
789 | #define PZTRINGV_cfW(A,B) PSTRINGV_cfW(A,B) |
---|
790 | |
---|
791 | #define NCF(TN,I,C) _SEP_(TN,C,cfCOMMA) _Icf(2,N,TN,_(A,I),0) |
---|
792 | #define NNCF(TN,I,C) UUCF(TN,I,C) |
---|
793 | #define NNNCF(TN,I,C) _SEP_(TN,C,cfCOLON) _Icf(2,N,TN,_(A,I),0) |
---|
794 | #define INT_cfN(T,A) _(T,VVVVVVV_cfTYPE) * A |
---|
795 | #define INTV_cfN(T,A) _(T,VVVVVV_cfTYPE) * A |
---|
796 | #define INTVV_cfN(T,A) _(T,VVVVV_cfTYPE) * A |
---|
797 | #define INTVVV_cfN(T,A) _(T,VVVV_cfTYPE) * A |
---|
798 | #define INTVVVV_cfN(T,A) _(T,VVV_cfTYPE) * A |
---|
799 | #define INTVVVVV_cfN(T,A) _(T,VV_cfTYPE) * A |
---|
800 | #define INTVVVVVV_cfN(T,A) _(T,V_cfTYPE) * A |
---|
801 | #define INTVVVVVVV_cfN(T,A) _(T,_cfTYPE) * A |
---|
802 | #define PINT_cfN(T,A) _(T,_cfTYPE) * A |
---|
803 | #define PVOID_cfN(T,A) void * A |
---|
804 | #if defined(apolloFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran) |
---|
805 | #define ROUTINE_cfN(T,A) void (**A)(CF_NULL_PROTO) |
---|
806 | #else |
---|
807 | #define ROUTINE_cfN(T,A) void ( *A)(CF_NULL_PROTO) |
---|
808 | #endif |
---|
809 | #ifdef vmsFortran |
---|
810 | #define STRING_cfN(T,A) fstring * A |
---|
811 | #define STRINGV_cfN(T,A) fstringvector * A |
---|
812 | #else |
---|
813 | #ifdef CRAYFortran |
---|
814 | #define STRING_cfN(T,A) _fcd A |
---|
815 | #define STRINGV_cfN(T,A) _fcd A |
---|
816 | #else |
---|
817 | #define STRING_cfN(T,A) char * A |
---|
818 | #define STRINGV_cfN(T,A) char * A |
---|
819 | #endif |
---|
820 | #endif |
---|
821 | #define PSTRING_cfN(T,A) STRING_cfN(T,A) /* CRAY insists on arg.'s here. */ |
---|
822 | #define PNSTRING_cfN(T,A) STRING_cfN(T,A) /* CRAY insists on arg.'s here. */ |
---|
823 | #define PPSTRING_cfN(T,A) STRING_cfN(T,A) /* CRAY insists on arg.'s here. */ |
---|
824 | #define PSTRINGV_cfN(T,A) STRINGV_cfN(T,A) |
---|
825 | #define ZTRINGV_cfN(T,A) STRINGV_cfN(T,A) |
---|
826 | #define PZTRINGV_cfN(T,A) PSTRINGV_cfN(T,A) |
---|
827 | |
---|
828 | |
---|
829 | /* Apollo 6.7, CRAY, old Sun, VAX/Ultrix vcc/cc and new ultrix |
---|
830 | can't hack more than 31 arg's. |
---|
831 | e.g. ultrix >= 4.3 gives message: |
---|
832 | zow35> cc -c -DDECFortran cfortest.c |
---|
833 | cfe: Fatal: Out of memory: cfortest.c |
---|
834 | zow35> |
---|
835 | Old __hpux had the problem, but new 'HP-UX A.09.03 A 9000/735' is fine |
---|
836 | if using -Aa, otherwise we have a problem. |
---|
837 | */ |
---|
838 | #ifndef MAX_PREPRO_ARGS |
---|
839 | #if !defined(__GNUC__) && (defined(VAXUltrix) || defined(__CF__APOLLO67) || (defined(sun)&&!defined(__sun)) || defined(_CRAY) || defined(__ultrix__) || (defined(__hpux)&&defined(__CF__KnR))) |
---|
840 | #define MAX_PREPRO_ARGS 31 |
---|
841 | #else |
---|
842 | #define MAX_PREPRO_ARGS 99 |
---|
843 | #endif |
---|
844 | #endif |
---|
845 | |
---|
846 | #if defined(AbsoftUNIXFortran) || defined(AbsoftProFortran) |
---|
847 | /* In addition to explicit Absoft stuff, only Absoft requires: |
---|
848 | - DEFAULT coming from _cfSTR. |
---|
849 | DEFAULT could have been called e.g. INT, but keep it for clarity. |
---|
850 | - M term in CFARGT14 and CFARGT14FS. |
---|
851 | */ |
---|
852 | #define ABSOFT_cf1(T0) _(T0,_cfSTR)(0,ABSOFT1,0,0,0,0,0) |
---|
853 | #define ABSOFT_cf2(T0) _(T0,_cfSTR)(0,ABSOFT2,0,0,0,0,0) |
---|
854 | #define ABSOFT_cf3(T0) _(T0,_cfSTR)(0,ABSOFT3,0,0,0,0,0) |
---|
855 | #define DEFAULT_cfABSOFT1 |
---|
856 | #define LOGICAL_cfABSOFT1 |
---|
857 | #define STRING_cfABSOFT1 ,MAX_LEN_FORTRAN_FUNCTION_STRING |
---|
858 | #define DEFAULT_cfABSOFT2 |
---|
859 | #define LOGICAL_cfABSOFT2 |
---|
860 | #define STRING_cfABSOFT2 ,unsigned D0 |
---|
861 | #define DEFAULT_cfABSOFT3 |
---|
862 | #define LOGICAL_cfABSOFT3 |
---|
863 | #define STRING_cfABSOFT3 ,D0 |
---|
864 | #else |
---|
865 | #define ABSOFT_cf1(T0) |
---|
866 | #define ABSOFT_cf2(T0) |
---|
867 | #define ABSOFT_cf3(T0) |
---|
868 | #endif |
---|
869 | |
---|
870 | /* _Z introduced to cicumvent IBM and HP silly preprocessor warning. |
---|
871 | e.g. "Macro CFARGT14 invoked with a null argument." |
---|
872 | */ |
---|
873 | #define _Z |
---|
874 | |
---|
875 | #define CFARGT14S(S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \ |
---|
876 | S(T1,1) S(T2,2) S(T3,3) S(T4,4) S(T5,5) S(T6,6) S(T7,7) \ |
---|
877 | S(T8,8) S(T9,9) S(TA,10) S(TB,11) S(TC,12) S(TD,13) S(TE,14) |
---|
878 | #define CFARGT27S(S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \ |
---|
879 | S(T1,1) S(T2,2) S(T3,3) S(T4,4) S(T5,5) S(T6,6) S(T7,7) \ |
---|
880 | S(T8,8) S(T9,9) S(TA,10) S(TB,11) S(TC,12) S(TD,13) S(TE,14) \ |
---|
881 | S(TF,15) S(TG,16) S(TH,17) S(TI,18) S(TJ,19) S(TK,20) S(TL,21) \ |
---|
882 | S(TM,22) S(TN,23) S(TO,24) S(TP,25) S(TQ,26) S(TR,27) |
---|
883 | |
---|
884 | #define CFARGT14FS(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \ |
---|
885 | F(T1,1,0) F(T2,2,1) F(T3,3,1) F(T4,4,1) F(T5,5,1) F(T6,6,1) F(T7,7,1) \ |
---|
886 | F(T8,8,1) F(T9,9,1) F(TA,10,1) F(TB,11,1) F(TC,12,1) F(TD,13,1) F(TE,14,1) \ |
---|
887 | M CFARGT14S(S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) |
---|
888 | #define CFARGT27FS(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \ |
---|
889 | F(T1,1,0) F(T2,2,1) F(T3,3,1) F(T4,4,1) F(T5,5,1) F(T6,6,1) F(T7,7,1) \ |
---|
890 | F(T8,8,1) F(T9,9,1) F(TA,10,1) F(TB,11,1) F(TC,12,1) F(TD,13,1) F(TE,14,1) \ |
---|
891 | F(TF,15,1) F(TG,16,1) F(TH,17,1) F(TI,18,1) F(TJ,19,1) F(TK,20,1) F(TL,21,1) \ |
---|
892 | F(TM,22,1) F(TN,23,1) F(TO,24,1) F(TP,25,1) F(TQ,26,1) F(TR,27,1) \ |
---|
893 | M CFARGT27S(S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) |
---|
894 | |
---|
895 | #if !(defined(PowerStationFortran)||defined(hpuxFortran800)) |
---|
896 | /* Old CFARGT14 -> CFARGT14FS as seen below, for Absoft cross-compile yields: |
---|
897 | SunOS> cc -c -Xa -DAbsoftUNIXFortran c.c |
---|
898 | "c.c", line 406: warning: argument mismatch |
---|
899 | Haven't checked if this is ANSI C or a SunOS bug. SunOS -Xs works ok. |
---|
900 | Behavior is most clearly seen in example: |
---|
901 | #define A 1 , 2 |
---|
902 | #define C(X,Y,Z) x=X. y=Y. z=Z. |
---|
903 | #define D(X,Y,Z) C(X,Y,Z) |
---|
904 | D(x,A,z) |
---|
905 | Output from preprocessor is: x = x . y = 1 . z = 2 . |
---|
906 | #define CFARGT14(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \ |
---|
907 | CFARGT14FS(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) |
---|
908 | */ |
---|
909 | #define CFARGT14(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \ |
---|
910 | F(T1,1,0) F(T2,2,1) F(T3,3,1) F(T4,4,1) F(T5,5,1) F(T6,6,1) F(T7,7,1) \ |
---|
911 | F(T8,8,1) F(T9,9,1) F(TA,10,1) F(TB,11,1) F(TC,12,1) F(TD,13,1) F(TE,14,1) \ |
---|
912 | M CFARGT14S(S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) |
---|
913 | #define CFARGT27(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \ |
---|
914 | F(T1,1,0) F(T2,2,1) F(T3,3,1) F(T4,4,1) F(T5,5,1) F(T6,6,1) F(T7,7,1) \ |
---|
915 | F(T8,8,1) F(T9,9,1) F(TA,10,1) F(TB,11,1) F(TC,12,1) F(TD,13,1) F(TE,14,1) \ |
---|
916 | F(TF,15,1) F(TG,16,1) F(TH,17,1) F(TI,18,1) F(TJ,19,1) F(TK,20,1) F(TL,21,1) \ |
---|
917 | F(TM,22,1) F(TN,23,1) F(TO,24,1) F(TP,25,1) F(TQ,26,1) F(TR,27,1) \ |
---|
918 | M CFARGT27S(S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) |
---|
919 | |
---|
920 | #define CFARGT20(F,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \ |
---|
921 | F(T1,1,0) F(T2,2,1) F(T3,3,1) F(T4,4,1) F(T5,5,1) F(T6,6,1) F(T7,7,1) \ |
---|
922 | F(T8,8,1) F(T9,9,1) F(TA,10,1) F(TB,11,1) F(TC,12,1) F(TD,13,1) F(TE,14,1) \ |
---|
923 | F(TF,15,1) F(TG,16,1) F(TH,17,1) F(TI,18,1) F(TJ,19,1) F(TK,20,1) \ |
---|
924 | S(T1,1) S(T2,2) S(T3,3) S(T4,4) S(T5,5) S(T6,6) S(T7,7) \ |
---|
925 | S(T8,8) S(T9,9) S(TA,10) S(TB,11) S(TC,12) S(TD,13) S(TE,14) \ |
---|
926 | S(TF,15) S(TG,16) S(TH,17) S(TI,18) S(TJ,19) S(TK,20) |
---|
927 | #define CFARGTA14(F,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE) \ |
---|
928 | F(T1,A1,1,0) F(T2,A2,2,1) F(T3,A3,3,1) F(T4,A4,4,1) F(T5,A5,5,1) F(T6,A6,6,1) \ |
---|
929 | F(T7,A7,7,1) F(T8,A8,8,1) F(T9,A9,9,1) F(TA,AA,10,1) F(TB,AB,11,1) F(TC,AC,12,1) \ |
---|
930 | F(TD,AD,13,1) F(TE,AE,14,1) S(T1,1) S(T2,2) S(T3,3) S(T4,4) \ |
---|
931 | S(T5,5) S(T6,6) S(T7,7) S(T8,8) S(T9,9) S(TA,10) \ |
---|
932 | S(TB,11) S(TC,12) S(TD,13) S(TE,14) |
---|
933 | #if MAX_PREPRO_ARGS>31 |
---|
934 | #define CFARGTA20(F,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) \ |
---|
935 | F(T1,A1,1,0) F(T2,A2,2,1) F(T3,A3,3,1) F(T4,A4,4,1) F(T5,A5,5,1) F(T6,A6,6,1) \ |
---|
936 | F(T7,A7,7,1) F(T8,A8,8,1) F(T9,A9,9,1) F(TA,AA,10,1) F(TB,AB,11,1) F(TC,AC,12,1) \ |
---|
937 | F(TD,AD,13,1) F(TE,AE,14,1) F(TF,AF,15,1) F(TG,AG,16,1) F(TH,AH,17,1) F(TI,AI,18,1) \ |
---|
938 | F(TJ,AJ,19,1) F(TK,AK,20,1) S(T1,1) S(T2,2) S(T3,3) S(T4,4) \ |
---|
939 | S(T5,5) S(T6,6) S(T7,7) S(T8,8) S(T9,9) S(TA,10) \ |
---|
940 | S(TB,11) S(TC,12) S(TD,13) S(TE,14) S(TF,15) S(TG,16) \ |
---|
941 | S(TH,17) S(TI,18) S(TJ,19) S(TK,20) |
---|
942 | #endif |
---|
943 | #else |
---|
944 | #define CFARGT14(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \ |
---|
945 | F(T1,1,0) S(T1,1) F(T2,2,1) S(T2,2) F(T3,3,1) S(T3,3) F(T4,4,1) S(T4,4) \ |
---|
946 | F(T5,5,1) S(T5,5) F(T6,6,1) S(T6,6) F(T7,7,1) S(T7,7) F(T8,8,1) S(T8,8) \ |
---|
947 | F(T9,9,1) S(T9,9) F(TA,10,1) S(TA,10) F(TB,11,1) S(TB,11) F(TC,12,1) S(TC,12) \ |
---|
948 | F(TD,13,1) S(TD,13) F(TE,14,1) S(TE,14) |
---|
949 | #define CFARGT27(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \ |
---|
950 | F(T1,1,0) S(T1,1) F(T2,2,1) S(T2,2) F(T3,3,1) S(T3,3) F(T4,4,1) S(T4,4) \ |
---|
951 | F(T5,5,1) S(T5,5) F(T6,6,1) S(T6,6) F(T7,7,1) S(T7,7) F(T8,8,1) S(T8,8) \ |
---|
952 | F(T9,9,1) S(T9,9) F(TA,10,1) S(TA,10) F(TB,11,1) S(TB,11) F(TC,12,1) S(TC,12) \ |
---|
953 | F(TD,13,1) S(TD,13) F(TE,14,1) S(TE,14) F(TF,15,1) S(TF,15) F(TG,16,1) S(TG,16) \ |
---|
954 | F(TH,17,1) S(TH,17) F(TI,18,1) S(TI,18) F(TJ,19,1) S(TJ,19) F(TK,20,1) S(TK,20) \ |
---|
955 | F(TL,21,1) S(TL,21) F(TM,22,1) S(TM,22) F(TN,23,1) S(TN,23) F(TO,24,1) S(TO,24) \ |
---|
956 | F(TP,25,1) S(TP,25) F(TQ,26,1) S(TQ,26) F(TR,27,1) S(TR,27) |
---|
957 | |
---|
958 | #define CFARGT20(F,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \ |
---|
959 | F(T1,1,0) S(T1,1) F(T2,2,1) S(T2,2) F(T3,3,1) S(T3,3) F(T4,4,1) S(T4,4) \ |
---|
960 | F(T5,5,1) S(T5,5) F(T6,6,1) S(T6,6) F(T7,7,1) S(T7,7) F(T8,8,1) S(T8,8) \ |
---|
961 | F(T9,9,1) S(T9,9) F(TA,10,1) S(TA,10) F(TB,11,1) S(TB,11) F(TC,12,1) S(TC,12) \ |
---|
962 | F(TD,13,1) S(TD,13) F(TE,14,1) S(TE,14) F(TF,15,1) S(TF,15) F(TG,16,1) S(TG,16) \ |
---|
963 | F(TH,17,1) S(TH,17) F(TI,18,1) S(TI,18) F(TJ,19,1) S(TJ,19) F(TK,20,1) S(TK,20) |
---|
964 | #define CFARGTA14(F,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE) \ |
---|
965 | F(T1,A1,1,0) S(T1,1) F(T2,A2,2,1) S(T2,2) F(T3,A3,3,1) S(T3,3) \ |
---|
966 | F(T4,A4,4,1) S(T4,4) F(T5,A5,5,1) S(T5,5) F(T6,A6,6,1) S(T6,6) \ |
---|
967 | F(T7,A7,7,1) S(T7,7) F(T8,A8,8,1) S(T8,8) F(T9,A9,9,1) S(T9,9) \ |
---|
968 | F(TA,AA,10,1) S(TA,10) F(TB,AB,11,1) S(TB,11) F(TC,AC,12,1) S(TC,12) \ |
---|
969 | F(TD,AD,13,1) S(TD,13) F(TE,AE,14,1) S(TE,14) |
---|
970 | #if MAX_PREPRO_ARGS>31 |
---|
971 | #define CFARGTA20(F,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) \ |
---|
972 | F(T1,A1,1,0) S(T1,1) F(T2,A2,2,1) S(T2,2) F(T3,A3,3,1) S(T3,3) \ |
---|
973 | F(T4,A4,4,1) S(T4,4) F(T5,A5,5,1) S(T5,5) F(T6,A6,6,1) S(T6,6) \ |
---|
974 | F(T7,A7,7,1) S(T7,7) F(T8,A8,8,1) S(T8,8) F(T9,A9,9,1) S(T9,9) \ |
---|
975 | F(TA,AA,10,1) S(TA,10) F(TB,AB,11,1) S(TB,11) F(TC,AC,12,1) S(TC,12) \ |
---|
976 | F(TD,AD,13,1) S(TD,13) F(TE,AE,14,1) S(TE,14) F(TF,AF,15,1) S(TF,15) \ |
---|
977 | F(TG,AG,16,1) S(TG,16) F(TH,AH,17,1) S(TH,17) F(TI,AI,18,1) S(TI,18) \ |
---|
978 | F(TJ,AJ,19,1) S(TJ,19) F(TK,AK,20,1) S(TK,20) |
---|
979 | #endif |
---|
980 | #endif |
---|
981 | |
---|
982 | |
---|
983 | #define PROTOCCALLSFSUB1( UN,LN,T1) \ |
---|
984 | PROTOCCALLSFSUB14(UN,LN,T1,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0) |
---|
985 | #define PROTOCCALLSFSUB2( UN,LN,T1,T2) \ |
---|
986 | PROTOCCALLSFSUB14(UN,LN,T1,T2,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0) |
---|
987 | #define PROTOCCALLSFSUB3( UN,LN,T1,T2,T3) \ |
---|
988 | PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0) |
---|
989 | #define PROTOCCALLSFSUB4( UN,LN,T1,T2,T3,T4) \ |
---|
990 | PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0) |
---|
991 | #define PROTOCCALLSFSUB5( UN,LN,T1,T2,T3,T4,T5) \ |
---|
992 | PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0) |
---|
993 | #define PROTOCCALLSFSUB6( UN,LN,T1,T2,T3,T4,T5,T6) \ |
---|
994 | PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0) |
---|
995 | #define PROTOCCALLSFSUB7( UN,LN,T1,T2,T3,T4,T5,T6,T7) \ |
---|
996 | PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0) |
---|
997 | #define PROTOCCALLSFSUB8( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8) \ |
---|
998 | PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0) |
---|
999 | #define PROTOCCALLSFSUB9( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9) \ |
---|
1000 | PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,CF_0,CF_0,CF_0,CF_0,CF_0) |
---|
1001 | #define PROTOCCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA) \ |
---|
1002 | PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,CF_0,CF_0,CF_0,CF_0) |
---|
1003 | #define PROTOCCALLSFSUB11(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB) \ |
---|
1004 | PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,CF_0,CF_0,CF_0) |
---|
1005 | #define PROTOCCALLSFSUB12(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC) \ |
---|
1006 | PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,CF_0,CF_0) |
---|
1007 | #define PROTOCCALLSFSUB13(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD) \ |
---|
1008 | PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,CF_0) |
---|
1009 | |
---|
1010 | |
---|
1011 | #define PROTOCCALLSFSUB15(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF) \ |
---|
1012 | PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,CF_0,CF_0,CF_0,CF_0,CF_0) |
---|
1013 | #define PROTOCCALLSFSUB16(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG) \ |
---|
1014 | PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,CF_0,CF_0,CF_0,CF_0) |
---|
1015 | #define PROTOCCALLSFSUB17(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH) \ |
---|
1016 | PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,CF_0,CF_0,CF_0) |
---|
1017 | #define PROTOCCALLSFSUB18(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI) \ |
---|
1018 | PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,CF_0,CF_0) |
---|
1019 | #define PROTOCCALLSFSUB19(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ) \ |
---|
1020 | PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,CF_0) |
---|
1021 | |
---|
1022 | |
---|
1023 | #ifndef FCALLSC_QUALIFIER |
---|
1024 | #ifdef VISUAL_CPLUSPLUS |
---|
1025 | #define FCALLSC_QUALIFIER __stdcall |
---|
1026 | #else |
---|
1027 | #define FCALLSC_QUALIFIER |
---|
1028 | #endif |
---|
1029 | #endif |
---|
1030 | |
---|
1031 | #ifdef __cplusplus |
---|
1032 | #define CFextern extern "C" |
---|
1033 | #else |
---|
1034 | #define CFextern extern |
---|
1035 | #endif |
---|
1036 | |
---|
1037 | |
---|
1038 | #ifdef CFSUBASFUN |
---|
1039 | #define PROTOCCALLSFSUB0(UN,LN) \ |
---|
1040 | PROTOCCALLSFFUN0( VOID,UN,LN) |
---|
1041 | #define PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \ |
---|
1042 | PROTOCCALLSFFUN14(VOID,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) |
---|
1043 | #define PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK)\ |
---|
1044 | PROTOCCALLSFFUN20(VOID,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) |
---|
1045 | #else |
---|
1046 | /* Note: Prevent compiler warnings, null #define PROTOCCALLSFSUB14/20 after |
---|
1047 | #include-ing cfortran.h if calling the FORTRAN wrapper within the same |
---|
1048 | source code where the wrapper is created. */ |
---|
1049 | #define PROTOCCALLSFSUB0(UN,LN) CFextern void FCALLSC_QUALIFIER CFC_(UN,LN)(); |
---|
1050 | #ifndef __CF__KnR |
---|
1051 | #define PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \ |
---|
1052 | CFextern void FCALLSC_QUALIFIER CFC_(UN,LN)( CFARGT14(NCF,KCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) ); |
---|
1053 | #define PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK)\ |
---|
1054 | CFextern void FCALLSC_QUALIFIER CFC_(UN,LN)( CFARGT20(NCF,KCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) ); |
---|
1055 | #else |
---|
1056 | #define PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \ |
---|
1057 | PROTOCCALLSFSUB0(UN,LN) |
---|
1058 | #define PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \ |
---|
1059 | PROTOCCALLSFSUB0(UN,LN) |
---|
1060 | #endif |
---|
1061 | #endif |
---|
1062 | |
---|
1063 | |
---|
1064 | #ifdef OLD_VAXC /* Allow %CC-I-PARAMNOTUSED. */ |
---|
1065 | #pragma standard |
---|
1066 | #endif |
---|
1067 | |
---|
1068 | |
---|
1069 | #define CCALLSFSUB1( UN,LN,T1, A1) \ |
---|
1070 | CCALLSFSUB5 (UN,LN,T1,CF_0,CF_0,CF_0,CF_0,A1,0,0,0,0) |
---|
1071 | #define CCALLSFSUB2( UN,LN,T1,T2, A1,A2) \ |
---|
1072 | CCALLSFSUB5 (UN,LN,T1,T2,CF_0,CF_0,CF_0,A1,A2,0,0,0) |
---|
1073 | #define CCALLSFSUB3( UN,LN,T1,T2,T3, A1,A2,A3) \ |
---|
1074 | CCALLSFSUB5 (UN,LN,T1,T2,T3,CF_0,CF_0,A1,A2,A3,0,0) |
---|
1075 | #define CCALLSFSUB4( UN,LN,T1,T2,T3,T4, A1,A2,A3,A4)\ |
---|
1076 | CCALLSFSUB5 (UN,LN,T1,T2,T3,T4,CF_0,A1,A2,A3,A4,0) |
---|
1077 | #define CCALLSFSUB5( UN,LN,T1,T2,T3,T4,T5, A1,A2,A3,A4,A5) \ |
---|
1078 | CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,CF_0,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,0,0,0,0,0) |
---|
1079 | #define CCALLSFSUB6( UN,LN,T1,T2,T3,T4,T5,T6, A1,A2,A3,A4,A5,A6) \ |
---|
1080 | CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,0,0,0,0) |
---|
1081 | #define CCALLSFSUB7( UN,LN,T1,T2,T3,T4,T5,T6,T7, A1,A2,A3,A4,A5,A6,A7) \ |
---|
1082 | CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,T7,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,0,0,0) |
---|
1083 | #define CCALLSFSUB8( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8, A1,A2,A3,A4,A5,A6,A7,A8) \ |
---|
1084 | CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,0,0) |
---|
1085 | #define CCALLSFSUB9( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,A1,A2,A3,A4,A5,A6,A7,A8,A9)\ |
---|
1086 | CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,0) |
---|
1087 | #define CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA)\ |
---|
1088 | CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,0,0,0,0) |
---|
1089 | #define CCALLSFSUB11(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB)\ |
---|
1090 | CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,0,0,0) |
---|
1091 | #define CCALLSFSUB12(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC)\ |
---|
1092 | CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,0,0) |
---|
1093 | #define CCALLSFSUB13(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD)\ |
---|
1094 | CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,0) |
---|
1095 | |
---|
1096 | #ifdef __cplusplus |
---|
1097 | #define CPPPROTOCLSFSUB0( UN,LN) |
---|
1098 | #define CPPPROTOCLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) |
---|
1099 | #define CPPPROTOCLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) |
---|
1100 | #else |
---|
1101 | #define CPPPROTOCLSFSUB0(UN,LN) \ |
---|
1102 | PROTOCCALLSFSUB0(UN,LN) |
---|
1103 | #define CPPPROTOCLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \ |
---|
1104 | PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) |
---|
1105 | #define CPPPROTOCLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \ |
---|
1106 | PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) |
---|
1107 | #endif |
---|
1108 | |
---|
1109 | #ifdef CFSUBASFUN |
---|
1110 | #define CCALLSFSUB0(UN,LN) CCALLSFFUN0(UN,LN) |
---|
1111 | #define CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE)\ |
---|
1112 | CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE) |
---|
1113 | #else |
---|
1114 | /* do{...}while(0) allows if(a==b) FORT(); else BORT(); */ |
---|
1115 | #define CCALLSFSUB0( UN,LN) do{CPPPROTOCLSFSUB0(UN,LN) CFC_(UN,LN)();}while(0) |
---|
1116 | #define CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE)\ |
---|
1117 | do{VVCF(T1,A1,B1) VVCF(T2,A2,B2) VVCF(T3,A3,B3) VVCF(T4,A4,B4) VVCF(T5,A5,B5) \ |
---|
1118 | VVCF(T6,A6,B6) VVCF(T7,A7,B7) VVCF(T8,A8,B8) VVCF(T9,A9,B9) VVCF(TA,AA,B10) \ |
---|
1119 | VVCF(TB,AB,B11) VVCF(TC,AC,B12) VVCF(TD,AD,B13) VVCF(TE,AE,B14) \ |
---|
1120 | CPPPROTOCLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \ |
---|
1121 | ACF(LN,T1,A1,1) ACF(LN,T2,A2,2) ACF(LN,T3,A3,3) \ |
---|
1122 | ACF(LN,T4,A4,4) ACF(LN,T5,A5,5) ACF(LN,T6,A6,6) ACF(LN,T7,A7,7) \ |
---|
1123 | ACF(LN,T8,A8,8) ACF(LN,T9,A9,9) ACF(LN,TA,AA,10) ACF(LN,TB,AB,11) \ |
---|
1124 | ACF(LN,TC,AC,12) ACF(LN,TD,AD,13) ACF(LN,TE,AE,14) \ |
---|
1125 | CFC_(UN,LN)( CFARGTA14(AACF,JCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE) );\ |
---|
1126 | WCF(T1,A1,1) WCF(T2,A2,2) WCF(T3,A3,3) WCF(T4,A4,4) WCF(T5,A5,5) \ |
---|
1127 | WCF(T6,A6,6) WCF(T7,A7,7) WCF(T8,A8,8) WCF(T9,A9,9) WCF(TA,AA,10) \ |
---|
1128 | WCF(TB,AB,11) WCF(TC,AC,12) WCF(TD,AD,13) WCF(TE,AE,14) }while(0) |
---|
1129 | #endif |
---|
1130 | |
---|
1131 | |
---|
1132 | #if MAX_PREPRO_ARGS>31 |
---|
1133 | #define CCALLSFSUB15(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF)\ |
---|
1134 | CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,CF_0,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,0,0,0,0,0) |
---|
1135 | #define CCALLSFSUB16(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG)\ |
---|
1136 | CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,0,0,0,0) |
---|
1137 | #define CCALLSFSUB17(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH)\ |
---|
1138 | CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,0,0,0) |
---|
1139 | #define CCALLSFSUB18(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI)\ |
---|
1140 | CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,0,0) |
---|
1141 | #define CCALLSFSUB19(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ)\ |
---|
1142 | CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,0) |
---|
1143 | |
---|
1144 | #ifdef CFSUBASFUN |
---|
1145 | #define CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH, \ |
---|
1146 | TI,TJ,TK, A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) \ |
---|
1147 | CCALLSFFUN20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH, \ |
---|
1148 | TI,TJ,TK, A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) |
---|
1149 | #else |
---|
1150 | #define CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH, \ |
---|
1151 | TI,TJ,TK, A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) \ |
---|
1152 | do{VVCF(T1,A1,B1) VVCF(T2,A2,B2) VVCF(T3,A3,B3) VVCF(T4,A4,B4) VVCF(T5,A5,B5) \ |
---|
1153 | VVCF(T6,A6,B6) VVCF(T7,A7,B7) VVCF(T8,A8,B8) VVCF(T9,A9,B9) VVCF(TA,AA,B10) \ |
---|
1154 | VVCF(TB,AB,B11) VVCF(TC,AC,B12) VVCF(TD,AD,B13) VVCF(TE,AE,B14) VVCF(TF,AF,B15) \ |
---|
1155 | VVCF(TG,AG,B16) VVCF(TH,AH,B17) VVCF(TI,AI,B18) VVCF(TJ,AJ,B19) VVCF(TK,AK,B20) \ |
---|
1156 | CPPPROTOCLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \ |
---|
1157 | ACF(LN,T1,A1,1) ACF(LN,T2,A2,2) ACF(LN,T3,A3,3) ACF(LN,T4,A4,4) \ |
---|
1158 | ACF(LN,T5,A5,5) ACF(LN,T6,A6,6) ACF(LN,T7,A7,7) ACF(LN,T8,A8,8) \ |
---|
1159 | ACF(LN,T9,A9,9) ACF(LN,TA,AA,10) ACF(LN,TB,AB,11) ACF(LN,TC,AC,12) \ |
---|
1160 | ACF(LN,TD,AD,13) ACF(LN,TE,AE,14) ACF(LN,TF,AF,15) ACF(LN,TG,AG,16) \ |
---|
1161 | ACF(LN,TH,AH,17) ACF(LN,TI,AI,18) ACF(LN,TJ,AJ,19) ACF(LN,TK,AK,20) \ |
---|
1162 | CFC_(UN,LN)( CFARGTA20(AACF,JCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) ); \ |
---|
1163 | WCF(T1,A1,1) WCF(T2,A2,2) WCF(T3,A3,3) WCF(T4,A4,4) WCF(T5,A5,5) WCF(T6,A6,6) \ |
---|
1164 | WCF(T7,A7,7) WCF(T8,A8,8) WCF(T9,A9,9) WCF(TA,AA,10) WCF(TB,AB,11) WCF(TC,AC,12) \ |
---|
1165 | WCF(TD,AD,13) WCF(TE,AE,14) WCF(TF,AF,15) WCF(TG,AG,16) WCF(TH,AH,17) WCF(TI,AI,18) \ |
---|
1166 | WCF(TJ,AJ,19) WCF(TK,AK,20) }while(0) |
---|
1167 | #endif |
---|
1168 | #endif /* MAX_PREPRO_ARGS */ |
---|
1169 | |
---|
1170 | /*-------------------------------------------------------------------------*/ |
---|
1171 | |
---|
1172 | /* UTILITIES FOR C TO CALL FORTRAN FUNCTIONS */ |
---|
1173 | |
---|
1174 | /*N.B. PROTOCCALLSFFUNn(..) generates code, whether or not the FORTRAN |
---|
1175 | function is called. Therefore, especially for creator's of C header files |
---|
1176 | for large FORTRAN libraries which include many functions, to reduce |
---|
1177 | compile time and object code size, it may be desirable to create |
---|
1178 | preprocessor directives to allow users to create code for only those |
---|
1179 | functions which they use. */ |
---|
1180 | |
---|
1181 | /* The following defines the maximum length string that a function can return. |
---|
1182 | Of course it may be undefine-d and re-define-d before individual |
---|
1183 | PROTOCCALLSFFUNn(..) as required. It would also be nice to have this derived |
---|
1184 | from the individual machines' limits. */ |
---|
1185 | #define MAX_LEN_FORTRAN_FUNCTION_STRING 0x4FE |
---|
1186 | |
---|
1187 | /* The following defines a character used by CFORTRAN.H to flag the end of a |
---|
1188 | string coming out of a FORTRAN routine. */ |
---|
1189 | #define CFORTRAN_NON_CHAR 0x7F |
---|
1190 | |
---|
1191 | #ifdef OLD_VAXC /* Prevent %CC-I-PARAMNOTUSED. */ |
---|
1192 | #pragma nostandard |
---|
1193 | #endif |
---|
1194 | |
---|
1195 | #define _SEP_(TN,C,cfCOMMA) _(__SEP_,C)(TN,cfCOMMA) |
---|
1196 | #define __SEP_0(TN,cfCOMMA) |
---|
1197 | #define __SEP_1(TN,cfCOMMA) _Icf(2,SEP,TN,cfCOMMA,0) |
---|
1198 | #define INT_cfSEP(T,B) _(A,B) |
---|
1199 | #define INTV_cfSEP(T,B) INT_cfSEP(T,B) |
---|
1200 | #define INTVV_cfSEP(T,B) INT_cfSEP(T,B) |
---|
1201 | #define INTVVV_cfSEP(T,B) INT_cfSEP(T,B) |
---|
1202 | #define INTVVVV_cfSEP(T,B) INT_cfSEP(T,B) |
---|
1203 | #define INTVVVVV_cfSEP(T,B) INT_cfSEP(T,B) |
---|
1204 | #define INTVVVVVV_cfSEP(T,B) INT_cfSEP(T,B) |
---|
1205 | #define INTVVVVVVV_cfSEP(T,B) INT_cfSEP(T,B) |
---|
1206 | #define PINT_cfSEP(T,B) INT_cfSEP(T,B) |
---|
1207 | #define PVOID_cfSEP(T,B) INT_cfSEP(T,B) |
---|
1208 | #define ROUTINE_cfSEP(T,B) INT_cfSEP(T,B) |
---|
1209 | #define SIMPLE_cfSEP(T,B) INT_cfSEP(T,B) |
---|
1210 | #define VOID_cfSEP(T,B) INT_cfSEP(T,B) /* For FORTRAN calls C subr.s.*/ |
---|
1211 | #define STRING_cfSEP(T,B) INT_cfSEP(T,B) |
---|
1212 | #define STRINGV_cfSEP(T,B) INT_cfSEP(T,B) |
---|
1213 | #define PSTRING_cfSEP(T,B) INT_cfSEP(T,B) |
---|
1214 | #define PSTRINGV_cfSEP(T,B) INT_cfSEP(T,B) |
---|
1215 | #define PNSTRING_cfSEP(T,B) INT_cfSEP(T,B) |
---|
1216 | #define PPSTRING_cfSEP(T,B) INT_cfSEP(T,B) |
---|
1217 | #define ZTRINGV_cfSEP(T,B) INT_cfSEP(T,B) |
---|
1218 | #define PZTRINGV_cfSEP(T,B) INT_cfSEP(T,B) |
---|
1219 | |
---|
1220 | #if defined(SIGNED_BYTE) || !defined(UNSIGNED_BYTE) |
---|
1221 | #ifdef OLD_VAXC |
---|
1222 | #define INTEGER_BYTE char /* Old VAXC barfs on 'signed char' */ |
---|
1223 | #else |
---|
1224 | #define INTEGER_BYTE signed char /* default */ |
---|
1225 | #endif |
---|
1226 | #else |
---|
1227 | #define INTEGER_BYTE unsigned char |
---|
1228 | #endif |
---|
1229 | #define BYTEVVVVVVV_cfTYPE INTEGER_BYTE |
---|
1230 | #define DOUBLEVVVVVVV_cfTYPE DOUBLE_PRECISION |
---|
1231 | #define FLOATVVVVVVV_cfTYPE FORTRAN_REAL |
---|
1232 | #define INTVVVVVVV_cfTYPE int |
---|
1233 | #define LOGICALVVVVVVV_cfTYPE int |
---|
1234 | #define LONGVVVVVVV_cfTYPE long |
---|
1235 | #define SHORTVVVVVVV_cfTYPE short |
---|
1236 | #define PBYTE_cfTYPE INTEGER_BYTE |
---|
1237 | #define PDOUBLE_cfTYPE DOUBLE_PRECISION |
---|
1238 | #define PFLOAT_cfTYPE FORTRAN_REAL |
---|
1239 | #define PINT_cfTYPE int |
---|
1240 | #define PLOGICAL_cfTYPE int |
---|
1241 | #define PLONG_cfTYPE long |
---|
1242 | #define PSHORT_cfTYPE short |
---|
1243 | |
---|
1244 | #define CFARGS0(A,T,V,W,X,Y,Z) _3(T,_cf,A) |
---|
1245 | #define CFARGS1(A,T,V,W,X,Y,Z) _3(T,_cf,A)(V) |
---|
1246 | #define CFARGS2(A,T,V,W,X,Y,Z) _3(T,_cf,A)(V,W) |
---|
1247 | #define CFARGS3(A,T,V,W,X,Y,Z) _3(T,_cf,A)(V,W,X) |
---|
1248 | #define CFARGS4(A,T,V,W,X,Y,Z) _3(T,_cf,A)(V,W,X,Y) |
---|
1249 | #define CFARGS5(A,T,V,W,X,Y,Z) _3(T,_cf,A)(V,W,X,Y,Z) |
---|
1250 | |
---|
1251 | #define _Icf(N,T,I,X,Y) _(I,_cfINT)(N,T,I,X,Y,0) |
---|
1252 | #define _Icf4(N,T,I,X,Y,Z) _(I,_cfINT)(N,T,I,X,Y,Z) |
---|
1253 | #define BYTE_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z) |
---|
1254 | #define DOUBLE_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INT,B,X,Y,Z,0) |
---|
1255 | #define FLOAT_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z) |
---|
1256 | #define INT_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z) |
---|
1257 | #define LOGICAL_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z) |
---|
1258 | #define LONG_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z) |
---|
1259 | #define SHORT_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z) |
---|
1260 | #define PBYTE_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z) |
---|
1261 | #define PDOUBLE_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,PINT,B,X,Y,Z,0) |
---|
1262 | #define PFLOAT_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z) |
---|
1263 | #define PINT_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z) |
---|
1264 | #define PLOGICAL_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z) |
---|
1265 | #define PLONG_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z) |
---|
1266 | #define PSHORT_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z) |
---|
1267 | #define BYTEV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z) |
---|
1268 | #define BYTEVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z) |
---|
1269 | #define BYTEVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z) |
---|
1270 | #define BYTEVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z) |
---|
1271 | #define BYTEVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z) |
---|
1272 | #define BYTEVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z) |
---|
1273 | #define BYTEVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z) |
---|
1274 | #define DOUBLEV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTV,B,X,Y,Z,0) |
---|
1275 | #define DOUBLEVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVV,B,X,Y,Z,0) |
---|
1276 | #define DOUBLEVVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVVV,B,X,Y,Z,0) |
---|
1277 | #define DOUBLEVVVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVVVV,B,X,Y,Z,0) |
---|
1278 | #define DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVVVVV,B,X,Y,Z,0) |
---|
1279 | #define DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVVVVVV,B,X,Y,Z,0) |
---|
1280 | #define DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVVVVVVV,B,X,Y,Z,0) |
---|
1281 | #define FLOATV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z) |
---|
1282 | #define FLOATVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z) |
---|
1283 | #define FLOATVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z) |
---|
1284 | #define FLOATVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z) |
---|
1285 | #define FLOATVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z) |
---|
1286 | #define FLOATVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z) |
---|
1287 | #define FLOATVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z) |
---|
1288 | #define INTV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z) |
---|
1289 | #define INTVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z) |
---|
1290 | #define INTVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z) |
---|
1291 | #define INTVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z) |
---|
1292 | #define INTVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z) |
---|
1293 | #define INTVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z) |
---|
1294 | #define INTVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z) |
---|
1295 | #define LOGICALV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z) |
---|
1296 | #define LOGICALVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z) |
---|
1297 | #define LOGICALVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z) |
---|
1298 | #define LOGICALVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z) |
---|
1299 | #define LOGICALVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z) |
---|
1300 | #define LOGICALVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z) |
---|
1301 | #define LOGICALVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z) |
---|
1302 | #define LONGV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z) |
---|
1303 | #define LONGVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z) |
---|
1304 | #define LONGVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z) |
---|
1305 | #define LONGVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z) |
---|
1306 | #define LONGVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z) |
---|
1307 | #define LONGVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z) |
---|
1308 | #define LONGVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z) |
---|
1309 | #define SHORTV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z) |
---|
1310 | #define SHORTVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z) |
---|
1311 | #define SHORTVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z) |
---|
1312 | #define SHORTVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z) |
---|
1313 | #define SHORTVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z) |
---|
1314 | #define SHORTVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z) |
---|
1315 | #define SHORTVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z) |
---|
1316 | #define PVOID_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,B,B,X,Y,Z,0) |
---|
1317 | #define ROUTINE_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z) |
---|
1318 | /*CRAY coughs on the first, |
---|
1319 | i.e. the usual trouble of not being able to |
---|
1320 | define macros to macros with arguments. |
---|
1321 | New ultrix is worse, it coughs on all such uses. |
---|
1322 | */ |
---|
1323 | /*#define SIMPLE_cfINT PVOID_cfINT*/ |
---|
1324 | #define SIMPLE_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z) |
---|
1325 | #define VOID_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z) |
---|
1326 | #define STRING_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z) |
---|
1327 | #define STRINGV_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z) |
---|
1328 | #define PSTRING_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z) |
---|
1329 | #define PSTRINGV_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z) |
---|
1330 | #define PNSTRING_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z) |
---|
1331 | #define PPSTRING_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z) |
---|
1332 | #define ZTRINGV_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z) |
---|
1333 | #define PZTRINGV_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z) |
---|
1334 | #define CF_0_cfINT(N,A,B,X,Y,Z) |
---|
1335 | |
---|
1336 | |
---|
1337 | #define UCF(TN,I,C) _SEP_(TN,C,cfCOMMA) _Icf(2,U,TN,_(A,I),0) |
---|
1338 | #define UUCF(TN,I,C) _SEP_(TN,C,cfCOMMA) _SEP_(TN,1,I) |
---|
1339 | #define UUUCF(TN,I,C) _SEP_(TN,C,cfCOLON) _Icf(2,U,TN,_(A,I),0) |
---|
1340 | #define INT_cfU(T,A) _(T,VVVVVVV_cfTYPE) A |
---|
1341 | #define INTV_cfU(T,A) _(T,VVVVVV_cfTYPE) * A |
---|
1342 | #define INTVV_cfU(T,A) _(T,VVVVV_cfTYPE) * A |
---|
1343 | #define INTVVV_cfU(T,A) _(T,VVVV_cfTYPE) * A |
---|
1344 | #define INTVVVV_cfU(T,A) _(T,VVV_cfTYPE) * A |
---|
1345 | #define INTVVVVV_cfU(T,A) _(T,VV_cfTYPE) * A |
---|
1346 | #define INTVVVVVV_cfU(T,A) _(T,V_cfTYPE) * A |
---|
1347 | #define INTVVVVVVV_cfU(T,A) _(T,_cfTYPE) * A |
---|
1348 | #define PINT_cfU(T,A) _(T,_cfTYPE) * A |
---|
1349 | #define PVOID_cfU(T,A) void *A |
---|
1350 | #define ROUTINE_cfU(T,A) void (*A)(CF_NULL_PROTO) |
---|
1351 | #define VOID_cfU(T,A) void A /* Needed for C calls FORTRAN sub.s. */ |
---|
1352 | #define STRING_cfU(T,A) char *A /* via VOID and wrapper. */ |
---|
1353 | #define STRINGV_cfU(T,A) char *A |
---|
1354 | #define PSTRING_cfU(T,A) char *A |
---|
1355 | #define PSTRINGV_cfU(T,A) char *A |
---|
1356 | #define ZTRINGV_cfU(T,A) char *A |
---|
1357 | #define PZTRINGV_cfU(T,A) char *A |
---|
1358 | |
---|
1359 | /* VOID breaks U into U and UU. */ |
---|
1360 | #define INT_cfUU(T,A) _(T,VVVVVVV_cfTYPE) A |
---|
1361 | #define VOID_cfUU(T,A) /* Needed for FORTRAN calls C sub.s. */ |
---|
1362 | #define STRING_cfUU(T,A) char *A |
---|
1363 | |
---|
1364 | |
---|
1365 | #define BYTE_cfPU(A) CFextern INTEGER_BYTE FCALLSC_QUALIFIER A |
---|
1366 | #define DOUBLE_cfPU(A) CFextern DOUBLE_PRECISION FCALLSC_QUALIFIER A |
---|
1367 | #if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT)) |
---|
1368 | #define FLOAT_cfPU(A) CFextern FORTRAN_REAL FCALLSC_QUALIFIER A |
---|
1369 | #else |
---|
1370 | #define FLOAT_cfPU(A) CFextern FLOATFUNCTIONTYPE FCALLSC_QUALIFIER A |
---|
1371 | #endif |
---|
1372 | #define INT_cfPU(A) CFextern int FCALLSC_QUALIFIER A |
---|
1373 | #define LOGICAL_cfPU(A) CFextern int FCALLSC_QUALIFIER A |
---|
1374 | #define LONG_cfPU(A) CFextern long FCALLSC_QUALIFIER A |
---|
1375 | #define SHORT_cfPU(A) CFextern short FCALLSC_QUALIFIER A |
---|
1376 | #define STRING_cfPU(A) CFextern void FCALLSC_QUALIFIER A |
---|
1377 | #define VOID_cfPU(A) CFextern void FCALLSC_QUALIFIER A |
---|
1378 | |
---|
1379 | #define BYTE_cfE INTEGER_BYTE A0; |
---|
1380 | #define DOUBLE_cfE DOUBLE_PRECISION A0; |
---|
1381 | #if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT)) |
---|
1382 | #define FLOAT_cfE FORTRAN_REAL A0; |
---|
1383 | #else |
---|
1384 | #define FLOAT_cfE FORTRAN_REAL AA0; FLOATFUNCTIONTYPE A0; |
---|
1385 | #endif |
---|
1386 | #define INT_cfE int A0; |
---|
1387 | #define LOGICAL_cfE int A0; |
---|
1388 | #define LONG_cfE long A0; |
---|
1389 | #define SHORT_cfE short A0; |
---|
1390 | #define VOID_cfE |
---|
1391 | #ifdef vmsFortran |
---|
1392 | #define STRING_cfE static char AA0[1+MAX_LEN_FORTRAN_FUNCTION_STRING]; \ |
---|
1393 | static fstring A0 = \ |
---|
1394 | {MAX_LEN_FORTRAN_FUNCTION_STRING,DSC$K_DTYPE_T,DSC$K_CLASS_S,AA0};\ |
---|
1395 | memset(AA0, CFORTRAN_NON_CHAR, MAX_LEN_FORTRAN_FUNCTION_STRING);\ |
---|
1396 | *(AA0+MAX_LEN_FORTRAN_FUNCTION_STRING)='\0'; |
---|
1397 | #else |
---|
1398 | #ifdef CRAYFortran |
---|
1399 | #define STRING_cfE static char AA0[1+MAX_LEN_FORTRAN_FUNCTION_STRING]; \ |
---|
1400 | static _fcd A0; *(AA0+MAX_LEN_FORTRAN_FUNCTION_STRING)='\0';\ |
---|
1401 | memset(AA0,CFORTRAN_NON_CHAR, MAX_LEN_FORTRAN_FUNCTION_STRING);\ |
---|
1402 | A0 = _cptofcd(AA0,MAX_LEN_FORTRAN_FUNCTION_STRING); |
---|
1403 | #else |
---|
1404 | /* 'cc: SC3.0.1 13 Jul 1994' barfs on char A0[0x4FE+1]; |
---|
1405 | * char A0[0x4FE +1]; char A0[1+0x4FE]; are both OK. */ |
---|
1406 | #define STRING_cfE static char A0[1+MAX_LEN_FORTRAN_FUNCTION_STRING]; \ |
---|
1407 | memset(A0, CFORTRAN_NON_CHAR, \ |
---|
1408 | MAX_LEN_FORTRAN_FUNCTION_STRING); \ |
---|
1409 | *(A0+MAX_LEN_FORTRAN_FUNCTION_STRING)='\0'; |
---|
1410 | #endif |
---|
1411 | #endif |
---|
1412 | /* ESTRING must use static char. array which is guaranteed to exist after |
---|
1413 | function returns. */ |
---|
1414 | |
---|
1415 | /* N.B.i) The diff. for 0 (Zero) and >=1 arguments. |
---|
1416 | ii)That the following create an unmatched bracket, i.e. '(', which |
---|
1417 | must of course be matched in the call. |
---|
1418 | iii)Commas must be handled very carefully */ |
---|
1419 | #define INT_cfGZ(T,UN,LN) A0=CFC_(UN,LN)( |
---|
1420 | #define VOID_cfGZ(T,UN,LN) CFC_(UN,LN)( |
---|
1421 | #ifdef vmsFortran |
---|
1422 | #define STRING_cfGZ(T,UN,LN) CFC_(UN,LN)(&A0 |
---|
1423 | #else |
---|
1424 | #if defined(CRAYFortran) || defined(AbsoftUNIXFortran) || defined(AbsoftProFortran) |
---|
1425 | #define STRING_cfGZ(T,UN,LN) CFC_(UN,LN)( A0 |
---|
1426 | #else |
---|
1427 | #define STRING_cfGZ(T,UN,LN) CFC_(UN,LN)( A0,MAX_LEN_FORTRAN_FUNCTION_STRING |
---|
1428 | #endif |
---|
1429 | #endif |
---|
1430 | |
---|
1431 | #define INT_cfG(T,UN,LN) INT_cfGZ(T,UN,LN) |
---|
1432 | #define VOID_cfG(T,UN,LN) VOID_cfGZ(T,UN,LN) |
---|
1433 | #define STRING_cfG(T,UN,LN) STRING_cfGZ(T,UN,LN), /*, is only diff. from _cfG*/ |
---|
1434 | |
---|
1435 | #define BYTEVVVVVVV_cfPP |
---|
1436 | #define INTVVVVVVV_cfPP /* These complement FLOATVVVVVVV_cfPP. */ |
---|
1437 | #define DOUBLEVVVVVVV_cfPP |
---|
1438 | #define LOGICALVVVVVVV_cfPP |
---|
1439 | #define LONGVVVVVVV_cfPP |
---|
1440 | #define SHORTVVVVVVV_cfPP |
---|
1441 | #define PBYTE_cfPP |
---|
1442 | #define PINT_cfPP |
---|
1443 | #define PDOUBLE_cfPP |
---|
1444 | #define PLOGICAL_cfPP |
---|
1445 | #define PLONG_cfPP |
---|
1446 | #define PSHORT_cfPP |
---|
1447 | #define PFLOAT_cfPP FLOATVVVVVVV_cfPP |
---|
1448 | |
---|
1449 | #define BCF(TN,AN,C) _SEP_(TN,C,cfCOMMA) _Icf(2,B,TN,AN,0) |
---|
1450 | #define INT_cfB(T,A) (_(T,VVVVVVV_cfTYPE)) A |
---|
1451 | #define INTV_cfB(T,A) A |
---|
1452 | #define INTVV_cfB(T,A) (A)[0] |
---|
1453 | #define INTVVV_cfB(T,A) (A)[0][0] |
---|
1454 | #define INTVVVV_cfB(T,A) (A)[0][0][0] |
---|
1455 | #define INTVVVVV_cfB(T,A) (A)[0][0][0][0] |
---|
1456 | #define INTVVVVVV_cfB(T,A) (A)[0][0][0][0][0] |
---|
1457 | #define INTVVVVVVV_cfB(T,A) (A)[0][0][0][0][0][0] |
---|
1458 | #define PINT_cfB(T,A) _(T,_cfPP)&A |
---|
1459 | #define STRING_cfB(T,A) (char *) A |
---|
1460 | #define STRINGV_cfB(T,A) (char *) A |
---|
1461 | #define PSTRING_cfB(T,A) (char *) A |
---|
1462 | #define PSTRINGV_cfB(T,A) (char *) A |
---|
1463 | #define PVOID_cfB(T,A) (void *) A |
---|
1464 | #define ROUTINE_cfB(T,A) (cfCAST_FUNCTION)A |
---|
1465 | #define ZTRINGV_cfB(T,A) (char *) A |
---|
1466 | #define PZTRINGV_cfB(T,A) (char *) A |
---|
1467 | |
---|
1468 | #define SCF(TN,NAME,I,A) _(TN,_cfSTR)(3,S,NAME,I,A,0,0) |
---|
1469 | #define DEFAULT_cfS(M,I,A) |
---|
1470 | #define LOGICAL_cfS(M,I,A) |
---|
1471 | #define PLOGICAL_cfS(M,I,A) |
---|
1472 | #define STRING_cfS(M,I,A) ,sizeof(A) |
---|
1473 | #define STRINGV_cfS(M,I,A) ,( (unsigned)0xFFFF*firstindexlength(A) \ |
---|
1474 | +secondindexlength(A)) |
---|
1475 | #define PSTRING_cfS(M,I,A) ,sizeof(A) |
---|
1476 | #define PSTRINGV_cfS(M,I,A) STRINGV_cfS(M,I,A) |
---|
1477 | #define ZTRINGV_cfS(M,I,A) |
---|
1478 | #define PZTRINGV_cfS(M,I,A) |
---|
1479 | |
---|
1480 | #define HCF(TN,I) _(TN,_cfSTR)(3,H,cfCOMMA, H,_(C,I),0,0) |
---|
1481 | #define HHCF(TN,I) _(TN,_cfSTR)(3,H,cfCOMMA,HH,_(C,I),0,0) |
---|
1482 | #define HHHCF(TN,I) _(TN,_cfSTR)(3,H,cfCOLON, H,_(C,I),0,0) |
---|
1483 | #define H_CF_SPECIAL unsigned |
---|
1484 | #define HH_CF_SPECIAL |
---|
1485 | #define DEFAULT_cfH(M,I,A) |
---|
1486 | #define LOGICAL_cfH(S,U,B) |
---|
1487 | #define PLOGICAL_cfH(S,U,B) |
---|
1488 | #define STRING_cfH(S,U,B) _(A,S) _(U,_CF_SPECIAL) B |
---|
1489 | #define STRINGV_cfH(S,U,B) STRING_cfH(S,U,B) |
---|
1490 | #define PSTRING_cfH(S,U,B) STRING_cfH(S,U,B) |
---|
1491 | #define PSTRINGV_cfH(S,U,B) STRING_cfH(S,U,B) |
---|
1492 | #define PNSTRING_cfH(S,U,B) STRING_cfH(S,U,B) |
---|
1493 | #define PPSTRING_cfH(S,U,B) STRING_cfH(S,U,B) |
---|
1494 | #define ZTRINGV_cfH(S,U,B) |
---|
1495 | #define PZTRINGV_cfH(S,U,B) |
---|
1496 | |
---|
1497 | /* Need VOID_cfSTR because Absoft forced function types go through _cfSTR. */ |
---|
1498 | /* No spaces inside expansion. They screws up macro catenation kludge. */ |
---|
1499 | #define VOID_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1500 | #define BYTE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1501 | #define DOUBLE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1502 | #define FLOAT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1503 | #define INT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1504 | #define LOGICAL_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,LOGICAL,A,B,C,D,E) |
---|
1505 | #define LONG_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1506 | #define SHORT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1507 | #define BYTEV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1508 | #define BYTEVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1509 | #define BYTEVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1510 | #define BYTEVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1511 | #define BYTEVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1512 | #define BYTEVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1513 | #define BYTEVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1514 | #define DOUBLEV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1515 | #define DOUBLEVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1516 | #define DOUBLEVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1517 | #define DOUBLEVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1518 | #define DOUBLEVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1519 | #define DOUBLEVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1520 | #define DOUBLEVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1521 | #define FLOATV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1522 | #define FLOATVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1523 | #define FLOATVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1524 | #define FLOATVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1525 | #define FLOATVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1526 | #define FLOATVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1527 | #define FLOATVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1528 | #define INTV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1529 | #define INTVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1530 | #define INTVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1531 | #define INTVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1532 | #define INTVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1533 | #define INTVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1534 | #define INTVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1535 | #define LOGICALV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1536 | #define LOGICALVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1537 | #define LOGICALVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1538 | #define LOGICALVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1539 | #define LOGICALVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1540 | #define LOGICALVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1541 | #define LOGICALVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1542 | #define LONGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1543 | #define LONGVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1544 | #define LONGVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1545 | #define LONGVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1546 | #define LONGVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1547 | #define LONGVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1548 | #define LONGVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1549 | #define SHORTV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1550 | #define SHORTVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1551 | #define SHORTVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1552 | #define SHORTVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1553 | #define SHORTVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1554 | #define SHORTVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1555 | #define SHORTVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1556 | #define PBYTE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1557 | #define PDOUBLE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1558 | #define PFLOAT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1559 | #define PINT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1560 | #define PLOGICAL_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PLOGICAL,A,B,C,D,E) |
---|
1561 | #define PLONG_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1562 | #define PSHORT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1563 | #define STRING_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,STRING,A,B,C,D,E) |
---|
1564 | #define PSTRING_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PSTRING,A,B,C,D,E) |
---|
1565 | #define STRINGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,STRINGV,A,B,C,D,E) |
---|
1566 | #define PSTRINGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PSTRINGV,A,B,C,D,E) |
---|
1567 | #define PNSTRING_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PNSTRING,A,B,C,D,E) |
---|
1568 | #define PPSTRING_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PPSTRING,A,B,C,D,E) |
---|
1569 | #define PVOID_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1570 | #define ROUTINE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1571 | #define SIMPLE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E) |
---|
1572 | #define ZTRINGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,ZTRINGV,A,B,C,D,E) |
---|
1573 | #define PZTRINGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PZTRINGV,A,B,C,D,E) |
---|
1574 | #define CF_0_cfSTR(N,T,A,B,C,D,E) |
---|
1575 | |
---|
1576 | /* See ACF table comments, which explain why CCF was split into two. */ |
---|
1577 | #define CCF(NAME,TN,I) _(TN,_cfSTR)(5,C,NAME,I,_(A,I),_(B,I),_(C,I)) |
---|
1578 | #define DEFAULT_cfC(M,I,A,B,C) |
---|
1579 | #define LOGICAL_cfC(M,I,A,B,C) A=C2FLOGICAL( A); |
---|
1580 | #define PLOGICAL_cfC(M,I,A,B,C) *A=C2FLOGICAL(*A); |
---|
1581 | #ifdef vmsFortran |
---|
1582 | #define STRING_cfC(M,I,A,B,C) (B.clen=strlen(A),B.f.dsc$a_pointer=A, \ |
---|
1583 | C==sizeof(char*)||C==(unsigned)(B.clen+1)?B.f.dsc$w_length=B.clen: \ |
---|
1584 | (memset((A)+B.clen,' ',C-B.clen-1),A[B.f.dsc$w_length=C-1]='\0')); |
---|
1585 | /* PSTRING_cfC to beware of array A which does not contain any \0. */ |
---|
1586 | #define PSTRING_cfC(M,I,A,B,C) (B.dsc$a_pointer=A, C==sizeof(char*) ? \ |
---|
1587 | B.dsc$w_length=strlen(A): (A[C-1]='\0',B.dsc$w_length=strlen(A), \ |
---|
1588 | memset((A)+B.dsc$w_length,' ',C-B.dsc$w_length-1), B.dsc$w_length=C-1)); |
---|
1589 | #else |
---|
1590 | #define STRING_cfC(M,I,A,B,C) (B.clen=strlen(A), \ |
---|
1591 | C==sizeof(char*)||C==(unsigned)(B.clen+1)?B.flen=B.clen: \ |
---|
1592 | (memset((A)+B.clen,' ',C-B.clen-1),A[B.flen=C-1]='\0')); |
---|
1593 | #define PSTRING_cfC(M,I,A,B,C) (C==sizeof(char*)? B=strlen(A): \ |
---|
1594 | (A[C-1]='\0',B=strlen(A),memset((A)+B,' ',C-B-1),B=C-1)); |
---|
1595 | #endif |
---|
1596 | /* For CRAYFortran for (P)STRINGV_cfC, B.fs is set, but irrelevant. */ |
---|
1597 | #define STRINGV_cfC(M,I,A,B,C) \ |
---|
1598 | AATRINGV_cfA( A,B,(C/0xFFFF)*(C%0xFFFF),C/0xFFFF,C%0xFFFF) |
---|
1599 | #define PSTRINGV_cfC(M,I,A,B,C) \ |
---|
1600 | APATRINGV_cfA( A,B,(C/0xFFFF)*(C%0xFFFF),C/0xFFFF,C%0xFFFF) |
---|
1601 | #define ZTRINGV_cfC(M,I,A,B,C) \ |
---|
1602 | AATRINGV_cfA( A,B, (_3(M,_ELEMS_,I))*((_3(M,_ELEMLEN_,I))+1), \ |
---|
1603 | (_3(M,_ELEMS_,I)), (_3(M,_ELEMLEN_,I))+1 ) |
---|
1604 | #define PZTRINGV_cfC(M,I,A,B,C) \ |
---|
1605 | APATRINGV_cfA( A,B, (_3(M,_ELEMS_,I))*((_3(M,_ELEMLEN_,I))+1), \ |
---|
1606 | (_3(M,_ELEMS_,I)), (_3(M,_ELEMLEN_,I))+1 ) |
---|
1607 | |
---|
1608 | #define BYTE_cfCCC(A,B) &A |
---|
1609 | #define DOUBLE_cfCCC(A,B) &A |
---|
1610 | #if !defined(__CF__KnR) |
---|
1611 | #define FLOAT_cfCCC(A,B) &A |
---|
1612 | /* Although the VAX doesn't, at least the */ |
---|
1613 | #else /* HP and K&R mips promote float arg.'s of */ |
---|
1614 | #define FLOAT_cfCCC(A,B) &B /* unprototyped functions to double. Cannot */ |
---|
1615 | #endif /* use A here to pass the argument to FORTRAN. */ |
---|
1616 | #define INT_cfCCC(A,B) &A |
---|
1617 | #define LOGICAL_cfCCC(A,B) &A |
---|
1618 | #define LONG_cfCCC(A,B) &A |
---|
1619 | #define SHORT_cfCCC(A,B) &A |
---|
1620 | #define PBYTE_cfCCC(A,B) A |
---|
1621 | #define PDOUBLE_cfCCC(A,B) A |
---|
1622 | #define PFLOAT_cfCCC(A,B) A |
---|
1623 | #define PINT_cfCCC(A,B) A |
---|
1624 | #define PLOGICAL_cfCCC(A,B) B=A /* B used to keep a common W table. */ |
---|
1625 | #define PLONG_cfCCC(A,B) A |
---|
1626 | #define PSHORT_cfCCC(A,B) A |
---|
1627 | |
---|
1628 | #define CCCF(TN,I,M) _SEP_(TN,M,cfCOMMA) _Icf(3,CC,TN,_(A,I),_(B,I)) |
---|
1629 | #define INT_cfCC(T,A,B) _(T,_cfCCC)(A,B) |
---|
1630 | #define INTV_cfCC(T,A,B) A |
---|
1631 | #define INTVV_cfCC(T,A,B) A |
---|
1632 | #define INTVVV_cfCC(T,A,B) A |
---|
1633 | #define INTVVVV_cfCC(T,A,B) A |
---|
1634 | #define INTVVVVV_cfCC(T,A,B) A |
---|
1635 | #define INTVVVVVV_cfCC(T,A,B) A |
---|
1636 | #define INTVVVVVVV_cfCC(T,A,B) A |
---|
1637 | #define PINT_cfCC(T,A,B) _(T,_cfCCC)(A,B) |
---|
1638 | #define PVOID_cfCC(T,A,B) A |
---|
1639 | #if defined(apolloFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran) |
---|
1640 | #define ROUTINE_cfCC(T,A,B) &A |
---|
1641 | #else |
---|
1642 | #define ROUTINE_cfCC(T,A,B) A |
---|
1643 | #endif |
---|
1644 | #define SIMPLE_cfCC(T,A,B) A |
---|
1645 | #ifdef vmsFortran |
---|
1646 | #define STRING_cfCC(T,A,B) &B.f |
---|
1647 | #define STRINGV_cfCC(T,A,B) &B |
---|
1648 | #define PSTRING_cfCC(T,A,B) &B |
---|
1649 | #define PSTRINGV_cfCC(T,A,B) &B |
---|
1650 | #else |
---|
1651 | #ifdef CRAYFortran |
---|
1652 | #define STRING_cfCC(T,A,B) _cptofcd(A,B.flen) |
---|
1653 | #define STRINGV_cfCC(T,A,B) _cptofcd(B.s,B.flen) |
---|
1654 | #define PSTRING_cfCC(T,A,B) _cptofcd(A,B) |
---|
1655 | #define PSTRINGV_cfCC(T,A,B) _cptofcd(A,B.flen) |
---|
1656 | #else |
---|
1657 | #define STRING_cfCC(T,A,B) A |
---|
1658 | #define STRINGV_cfCC(T,A,B) B.fs |
---|
1659 | #define PSTRING_cfCC(T,A,B) A |
---|
1660 | #define PSTRINGV_cfCC(T,A,B) B.fs |
---|
1661 | #endif |
---|
1662 | #endif |
---|
1663 | #define ZTRINGV_cfCC(T,A,B) STRINGV_cfCC(T,A,B) |
---|
1664 | #define PZTRINGV_cfCC(T,A,B) PSTRINGV_cfCC(T,A,B) |
---|
1665 | |
---|
1666 | #define BYTE_cfX return A0; |
---|
1667 | #define DOUBLE_cfX return A0; |
---|
1668 | #if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT)) |
---|
1669 | #define FLOAT_cfX return A0; |
---|
1670 | #else |
---|
1671 | #define FLOAT_cfX ASSIGNFLOAT(AA0,A0); return AA0; |
---|
1672 | #endif |
---|
1673 | #define INT_cfX return A0; |
---|
1674 | #define LOGICAL_cfX return F2CLOGICAL(A0); |
---|
1675 | #define LONG_cfX return A0; |
---|
1676 | #define SHORT_cfX return A0; |
---|
1677 | #define VOID_cfX return ; |
---|
1678 | #if defined(vmsFortran) || defined(CRAYFortran) |
---|
1679 | #define STRING_cfX return kill_trailing( \ |
---|
1680 | kill_trailing(AA0,CFORTRAN_NON_CHAR),' '); |
---|
1681 | #else |
---|
1682 | #define STRING_cfX return kill_trailing( \ |
---|
1683 | kill_trailing( A0,CFORTRAN_NON_CHAR),' '); |
---|
1684 | #endif |
---|
1685 | |
---|
1686 | #define CFFUN(NAME) _(__cf__,NAME) |
---|
1687 | |
---|
1688 | /* Note that we don't use LN here, but we keep it for consistency. */ |
---|
1689 | #define CCALLSFFUN0(UN,LN) CFFUN(UN)() |
---|
1690 | |
---|
1691 | #ifdef OLD_VAXC /* Allow %CC-I-PARAMNOTUSED. */ |
---|
1692 | #pragma standard |
---|
1693 | #endif |
---|
1694 | |
---|
1695 | #define CCALLSFFUN1( UN,LN,T1, A1) \ |
---|
1696 | CCALLSFFUN5 (UN,LN,T1,CF_0,CF_0,CF_0,CF_0,A1,0,0,0,0) |
---|
1697 | #define CCALLSFFUN2( UN,LN,T1,T2, A1,A2) \ |
---|
1698 | CCALLSFFUN5 (UN,LN,T1,T2,CF_0,CF_0,CF_0,A1,A2,0,0,0) |
---|
1699 | #define CCALLSFFUN3( UN,LN,T1,T2,T3, A1,A2,A3) \ |
---|
1700 | CCALLSFFUN5 (UN,LN,T1,T2,T3,CF_0,CF_0,A1,A2,A3,0,0) |
---|
1701 | #define CCALLSFFUN4( UN,LN,T1,T2,T3,T4, A1,A2,A3,A4)\ |
---|
1702 | CCALLSFFUN5 (UN,LN,T1,T2,T3,T4,CF_0,A1,A2,A3,A4,0) |
---|
1703 | #define CCALLSFFUN5( UN,LN,T1,T2,T3,T4,T5, A1,A2,A3,A4,A5) \ |
---|
1704 | CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,CF_0,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,0,0,0,0,0) |
---|
1705 | #define CCALLSFFUN6( UN,LN,T1,T2,T3,T4,T5,T6, A1,A2,A3,A4,A5,A6) \ |
---|
1706 | CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,T6,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,0,0,0,0) |
---|
1707 | #define CCALLSFFUN7( UN,LN,T1,T2,T3,T4,T5,T6,T7, A1,A2,A3,A4,A5,A6,A7) \ |
---|
1708 | CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,T6,T7,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,0,0,0) |
---|
1709 | #define CCALLSFFUN8( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8, A1,A2,A3,A4,A5,A6,A7,A8) \ |
---|
1710 | CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,0,0) |
---|
1711 | #define CCALLSFFUN9( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,A1,A2,A3,A4,A5,A6,A7,A8,A9)\ |
---|
1712 | CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,0) |
---|
1713 | #define CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA)\ |
---|
1714 | CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,0,0,0,0) |
---|
1715 | #define CCALLSFFUN11(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB)\ |
---|
1716 | CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,0,0,0) |
---|
1717 | #define CCALLSFFUN12(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC)\ |
---|
1718 | CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,0,0) |
---|
1719 | #define CCALLSFFUN13(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD)\ |
---|
1720 | CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,0) |
---|
1721 | |
---|
1722 | #define CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE)\ |
---|
1723 | ((CFFUN(UN)( BCF(T1,A1,0) BCF(T2,A2,1) BCF(T3,A3,1) BCF(T4,A4,1) BCF(T5,A5,1) \ |
---|
1724 | BCF(T6,A6,1) BCF(T7,A7,1) BCF(T8,A8,1) BCF(T9,A9,1) BCF(TA,AA,1) \ |
---|
1725 | BCF(TB,AB,1) BCF(TC,AC,1) BCF(TD,AD,1) BCF(TE,AE,1) \ |
---|
1726 | SCF(T1,LN,1,A1) SCF(T2,LN,2,A2) SCF(T3,LN,3,A3) SCF(T4,LN,4,A4) \ |
---|
1727 | SCF(T5,LN,5,A5) SCF(T6,LN,6,A6) SCF(T7,LN,7,A7) SCF(T8,LN,8,A8) \ |
---|
1728 | SCF(T9,LN,9,A9) SCF(TA,LN,10,AA) SCF(TB,LN,11,AB) SCF(TC,LN,12,AC) \ |
---|
1729 | SCF(TD,LN,13,AD) SCF(TE,LN,14,AE)))) |
---|
1730 | |
---|
1731 | /* N.B. Create a separate function instead of using (call function, function |
---|
1732 | value here) because in order to create the variables needed for the input |
---|
1733 | arg.'s which may be const.'s one has to do the creation within {}, but these |
---|
1734 | can never be placed within ()'s. Therefore one must create wrapper functions. |
---|
1735 | gcc, on the other hand may be able to avoid the wrapper functions. */ |
---|
1736 | |
---|
1737 | /* Prototypes are needed to correctly handle the value returned correctly. N.B. |
---|
1738 | Can only have prototype arg.'s with difficulty, a la G... table since FORTRAN |
---|
1739 | functions returning strings have extra arg.'s. Don't bother, since this only |
---|
1740 | causes a compiler warning to come up when one uses FCALLSCFUNn and CCALLSFFUNn |
---|
1741 | for the same function in the same source code. Something done by the experts in |
---|
1742 | debugging only.*/ |
---|
1743 | |
---|
1744 | #define PROTOCCALLSFFUN0(F,UN,LN) \ |
---|
1745 | _(F,_cfPU)( CFC_(UN,LN))(CF_NULL_PROTO); \ |
---|
1746 | static _Icf(2,U,F,CFFUN(UN),0)() {_(F,_cfE) _Icf(3,GZ,F,UN,LN) ABSOFT_cf1(F));_(F,_cfX)} |
---|
1747 | |
---|
1748 | #define PROTOCCALLSFFUN1( T0,UN,LN,T1) \ |
---|
1749 | PROTOCCALLSFFUN5 (T0,UN,LN,T1,CF_0,CF_0,CF_0,CF_0) |
---|
1750 | #define PROTOCCALLSFFUN2( T0,UN,LN,T1,T2) \ |
---|
1751 | PROTOCCALLSFFUN5 (T0,UN,LN,T1,T2,CF_0,CF_0,CF_0) |
---|
1752 | #define PROTOCCALLSFFUN3( T0,UN,LN,T1,T2,T3) \ |
---|
1753 | PROTOCCALLSFFUN5 (T0,UN,LN,T1,T2,T3,CF_0,CF_0) |
---|
1754 | #define PROTOCCALLSFFUN4( T0,UN,LN,T1,T2,T3,T4) \ |
---|
1755 | PROTOCCALLSFFUN5 (T0,UN,LN,T1,T2,T3,T4,CF_0) |
---|
1756 | #define PROTOCCALLSFFUN5( T0,UN,LN,T1,T2,T3,T4,T5) \ |
---|
1757 | PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,CF_0,CF_0,CF_0,CF_0,CF_0) |
---|
1758 | #define PROTOCCALLSFFUN6( T0,UN,LN,T1,T2,T3,T4,T5,T6) \ |
---|
1759 | PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,T6,CF_0,CF_0,CF_0,CF_0) |
---|
1760 | #define PROTOCCALLSFFUN7( T0,UN,LN,T1,T2,T3,T4,T5,T6,T7) \ |
---|
1761 | PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,CF_0,CF_0,CF_0) |
---|
1762 | #define PROTOCCALLSFFUN8( T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8) \ |
---|
1763 | PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,CF_0,CF_0) |
---|
1764 | #define PROTOCCALLSFFUN9( T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9) \ |
---|
1765 | PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,CF_0) |
---|
1766 | #define PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA) \ |
---|
1767 | PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,CF_0,CF_0,CF_0,CF_0) |
---|
1768 | #define PROTOCCALLSFFUN11(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB) \ |
---|
1769 | PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,CF_0,CF_0,CF_0) |
---|
1770 | #define PROTOCCALLSFFUN12(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC) \ |
---|
1771 | PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,CF_0,CF_0) |
---|
1772 | #define PROTOCCALLSFFUN13(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD) \ |
---|
1773 | PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,CF_0) |
---|
1774 | |
---|
1775 | /* HP/UX 9.01 cc requires the blank between '_Icf(3,G,T0,UN,LN) CCCF(T1,1,0)' */ |
---|
1776 | |
---|
1777 | #ifndef __CF__KnR |
---|
1778 | #define PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \ |
---|
1779 | _(T0,_cfPU)(CFC_(UN,LN))(CF_NULL_PROTO); static _Icf(2,U,T0,CFFUN(UN),0)( \ |
---|
1780 | CFARGT14FS(UCF,HCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) ) \ |
---|
1781 | { CFARGT14S(VCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) _(T0,_cfE) \ |
---|
1782 | CCF(LN,T1,1) CCF(LN,T2,2) CCF(LN,T3,3) CCF(LN,T4,4) CCF(LN,T5,5) \ |
---|
1783 | CCF(LN,T6,6) CCF(LN,T7,7) CCF(LN,T8,8) CCF(LN,T9,9) CCF(LN,TA,10) \ |
---|
1784 | CCF(LN,TB,11) CCF(LN,TC,12) CCF(LN,TD,13) CCF(LN,TE,14) _Icf(3,G,T0,UN,LN) \ |
---|
1785 | CFARGT14(CCCF,JCF,ABSOFT_cf1(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)); \ |
---|
1786 | WCF(T1,A1,1) WCF(T2,A2,2) WCF(T3,A3,3) WCF(T4,A4,4) WCF(T5,A5,5) \ |
---|
1787 | WCF(T6,A6,6) WCF(T7,A7,7) WCF(T8,A8,8) WCF(T9,A9,9) WCF(TA,A10,10) \ |
---|
1788 | WCF(TB,A11,11) WCF(TC,A12,12) WCF(TD,A13,13) WCF(TE,A14,14) _(T0,_cfX)} |
---|
1789 | #else |
---|
1790 | #define PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \ |
---|
1791 | _(T0,_cfPU)(CFC_(UN,LN))(CF_NULL_PROTO); static _Icf(2,U,T0,CFFUN(UN),0)( \ |
---|
1792 | CFARGT14FS(UUCF,HHCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) ) \ |
---|
1793 | CFARGT14FS(UUUCF,HHHCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) ; \ |
---|
1794 | { CFARGT14S(VCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) _(T0,_cfE) \ |
---|
1795 | CCF(LN,T1,1) CCF(LN,T2,2) CCF(LN,T3,3) CCF(LN,T4,4) CCF(LN,T5,5) \ |
---|
1796 | CCF(LN,T6,6) CCF(LN,T7,7) CCF(LN,T8,8) CCF(LN,T9,9) CCF(LN,TA,10) \ |
---|
1797 | CCF(LN,TB,11) CCF(LN,TC,12) CCF(LN,TD,13) CCF(LN,TE,14) _Icf(3,G,T0,UN,LN) \ |
---|
1798 | CFARGT14(CCCF,JCF,ABSOFT_cf1(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)); \ |
---|
1799 | WCF(T1,A1,1) WCF(T2,A2,2) WCF(T3,A3,3) WCF(T4,A4,4) WCF(T5,A5,5) \ |
---|
1800 | WCF(T6,A6,6) WCF(T7,A7,7) WCF(T8,A8,8) WCF(T9,A9,9) WCF(TA,A10,10) \ |
---|
1801 | WCF(TB,A11,11) WCF(TC,A12,12) WCF(TD,A13,13) WCF(TE,A14,14) _(T0,_cfX)} |
---|
1802 | #endif |
---|
1803 | |
---|
1804 | /*-------------------------------------------------------------------------*/ |
---|
1805 | |
---|
1806 | /* UTILITIES FOR FORTRAN TO CALL C ROUTINES */ |
---|
1807 | |
---|
1808 | #ifdef OLD_VAXC /* Prevent %CC-I-PARAMNOTUSED. */ |
---|
1809 | #pragma nostandard |
---|
1810 | #endif |
---|
1811 | |
---|
1812 | #if defined(vmsFortran) || defined(CRAYFortran) |
---|
1813 | #define DCF(TN,I) |
---|
1814 | #define DDCF(TN,I) |
---|
1815 | #define DDDCF(TN,I) |
---|
1816 | #else |
---|
1817 | #define DCF(TN,I) HCF(TN,I) |
---|
1818 | #define DDCF(TN,I) HHCF(TN,I) |
---|
1819 | #define DDDCF(TN,I) HHHCF(TN,I) |
---|
1820 | #endif |
---|
1821 | |
---|
1822 | #define QCF(TN,I) _(TN,_cfSTR)(1,Q,_(B,I), 0,0,0,0) |
---|
1823 | #define DEFAULT_cfQ(B) |
---|
1824 | #define LOGICAL_cfQ(B) |
---|
1825 | #define PLOGICAL_cfQ(B) |
---|
1826 | #define STRINGV_cfQ(B) char *B; unsigned int _(B,N); |
---|
1827 | #define STRING_cfQ(B) char *B=NULL; |
---|
1828 | #define PSTRING_cfQ(B) char *B=NULL; |
---|
1829 | #define PSTRINGV_cfQ(B) STRINGV_cfQ(B) |
---|
1830 | #define PNSTRING_cfQ(B) char *B=NULL; |
---|
1831 | #define PPSTRING_cfQ(B) |
---|
1832 | |
---|
1833 | #ifdef __sgi /* Else SGI gives warning 182 contrary to its C LRM A.17.7 */ |
---|
1834 | #define ROUTINE_orig *(void**)& |
---|
1835 | #else |
---|
1836 | #define ROUTINE_orig (void *) |
---|
1837 | #endif |
---|
1838 | |
---|
1839 | #define ROUTINE_1 ROUTINE_orig |
---|
1840 | #define ROUTINE_2 ROUTINE_orig |
---|
1841 | #define ROUTINE_3 ROUTINE_orig |
---|
1842 | #define ROUTINE_4 ROUTINE_orig |
---|
1843 | #define ROUTINE_5 ROUTINE_orig |
---|
1844 | #define ROUTINE_6 ROUTINE_orig |
---|
1845 | #define ROUTINE_7 ROUTINE_orig |
---|
1846 | #define ROUTINE_8 ROUTINE_orig |
---|
1847 | #define ROUTINE_9 ROUTINE_orig |
---|
1848 | #define ROUTINE_10 ROUTINE_orig |
---|
1849 | #define ROUTINE_11 ROUTINE_orig |
---|
1850 | #define ROUTINE_12 ROUTINE_orig |
---|
1851 | #define ROUTINE_13 ROUTINE_orig |
---|
1852 | #define ROUTINE_14 ROUTINE_orig |
---|
1853 | #define ROUTINE_15 ROUTINE_orig |
---|
1854 | #define ROUTINE_16 ROUTINE_orig |
---|
1855 | #define ROUTINE_17 ROUTINE_orig |
---|
1856 | #define ROUTINE_18 ROUTINE_orig |
---|
1857 | #define ROUTINE_19 ROUTINE_orig |
---|
1858 | #define ROUTINE_20 ROUTINE_orig |
---|
1859 | #define ROUTINE_21 ROUTINE_orig |
---|
1860 | #define ROUTINE_22 ROUTINE_orig |
---|
1861 | #define ROUTINE_23 ROUTINE_orig |
---|
1862 | #define ROUTINE_24 ROUTINE_orig |
---|
1863 | #define ROUTINE_25 ROUTINE_orig |
---|
1864 | #define ROUTINE_26 ROUTINE_orig |
---|
1865 | #define ROUTINE_27 ROUTINE_orig |
---|
1866 | |
---|
1867 | #define TCF(NAME,TN,I,M) _SEP_(TN,M,cfCOMMA) _(TN,_cfT)(NAME,I,_(A,I),_(B,I),_(C,I)) |
---|
1868 | #define BYTE_cfT(M,I,A,B,D) *A |
---|
1869 | #define DOUBLE_cfT(M,I,A,B,D) *A |
---|
1870 | #define FLOAT_cfT(M,I,A,B,D) *A |
---|
1871 | #define INT_cfT(M,I,A,B,D) *A |
---|
1872 | #define LOGICAL_cfT(M,I,A,B,D) F2CLOGICAL(*A) |
---|
1873 | #define LONG_cfT(M,I,A,B,D) *A |
---|
1874 | #define SHORT_cfT(M,I,A,B,D) *A |
---|
1875 | #define BYTEV_cfT(M,I,A,B,D) A |
---|
1876 | #define DOUBLEV_cfT(M,I,A,B,D) A |
---|
1877 | #define FLOATV_cfT(M,I,A,B,D) VOIDP A |
---|
1878 | #define INTV_cfT(M,I,A,B,D) A |
---|
1879 | #define LOGICALV_cfT(M,I,A,B,D) A |
---|
1880 | #define LONGV_cfT(M,I,A,B,D) A |
---|
1881 | #define SHORTV_cfT(M,I,A,B,D) A |
---|
1882 | #define BYTEVV_cfT(M,I,A,B,D) (void *)A /* We have to cast to void *,*/ |
---|
1883 | #define BYTEVVV_cfT(M,I,A,B,D) (void *)A /* since we don't know the */ |
---|
1884 | #define BYTEVVVV_cfT(M,I,A,B,D) (void *)A /* dimensions of the array. */ |
---|
1885 | #define BYTEVVVVV_cfT(M,I,A,B,D) (void *)A /* i.e. Unfortunately, can't */ |
---|
1886 | #define BYTEVVVVVV_cfT(M,I,A,B,D) (void *)A /* check that the type */ |
---|
1887 | #define BYTEVVVVVVV_cfT(M,I,A,B,D) (void *)A /* matches the prototype. */ |
---|
1888 | #define DOUBLEVV_cfT(M,I,A,B,D) (void *)A |
---|
1889 | #define DOUBLEVVV_cfT(M,I,A,B,D) (void *)A |
---|
1890 | #define DOUBLEVVVV_cfT(M,I,A,B,D) (void *)A |
---|
1891 | #define DOUBLEVVVVV_cfT(M,I,A,B,D) (void *)A |
---|
1892 | #define DOUBLEVVVVVV_cfT(M,I,A,B,D) (void *)A |
---|
1893 | #define DOUBLEVVVVVVV_cfT(M,I,A,B,D) (void *)A |
---|
1894 | #define FLOATVV_cfT(M,I,A,B,D) (void *)A |
---|
1895 | #define FLOATVVV_cfT(M,I,A,B,D) (void *)A |
---|
1896 | #define FLOATVVVV_cfT(M,I,A,B,D) (void *)A |
---|
1897 | #define FLOATVVVVV_cfT(M,I,A,B,D) (void *)A |
---|
1898 | #define FLOATVVVVVV_cfT(M,I,A,B,D) (void *)A |
---|
1899 | #define FLOATVVVVVVV_cfT(M,I,A,B,D) (void *)A |
---|
1900 | #define INTVV_cfT(M,I,A,B,D) (void *)A |
---|
1901 | #define INTVVV_cfT(M,I,A,B,D) (void *)A |
---|
1902 | #define INTVVVV_cfT(M,I,A,B,D) (void *)A |
---|
1903 | #define INTVVVVV_cfT(M,I,A,B,D) (void *)A |
---|
1904 | #define INTVVVVVV_cfT(M,I,A,B,D) (void *)A |
---|
1905 | #define INTVVVVVVV_cfT(M,I,A,B,D) (void *)A |
---|
1906 | #define LOGICALVV_cfT(M,I,A,B,D) (void *)A |
---|
1907 | #define LOGICALVVV_cfT(M,I,A,B,D) (void *)A |
---|
1908 | #define LOGICALVVVV_cfT(M,I,A,B,D) (void *)A |
---|
1909 | #define LOGICALVVVVV_cfT(M,I,A,B,D) (void *)A |
---|
1910 | #define LOGICALVVVVVV_cfT(M,I,A,B,D) (void *)A |
---|
1911 | #define LOGICALVVVVVVV_cfT(M,I,A,B,D) (void *)A |
---|
1912 | #define LONGVV_cfT(M,I,A,B,D) (void *)A |
---|
1913 | #define LONGVVV_cfT(M,I,A,B,D) (void *)A |
---|
1914 | #define LONGVVVV_cfT(M,I,A,B,D) (void *)A |
---|
1915 | #define LONGVVVVV_cfT(M,I,A,B,D) (void *)A |
---|
1916 | #define LONGVVVVVV_cfT(M,I,A,B,D) (void *)A |
---|
1917 | #define LONGVVVVVVV_cfT(M,I,A,B,D) (void *)A |
---|
1918 | #define SHORTVV_cfT(M,I,A,B,D) (void *)A |
---|
1919 | #define SHORTVVV_cfT(M,I,A,B,D) (void *)A |
---|
1920 | #define SHORTVVVV_cfT(M,I,A,B,D) (void *)A |
---|
1921 | #define SHORTVVVVV_cfT(M,I,A,B,D) (void *)A |
---|
1922 | #define SHORTVVVVVV_cfT(M,I,A,B,D) (void *)A |
---|
1923 | #define SHORTVVVVVVV_cfT(M,I,A,B,D) (void *)A |
---|
1924 | #define PBYTE_cfT(M,I,A,B,D) A |
---|
1925 | #define PDOUBLE_cfT(M,I,A,B,D) A |
---|
1926 | #define PFLOAT_cfT(M,I,A,B,D) VOIDP A |
---|
1927 | #define PINT_cfT(M,I,A,B,D) A |
---|
1928 | #define PLOGICAL_cfT(M,I,A,B,D) ((*A=F2CLOGICAL(*A)),A) |
---|
1929 | #define PLONG_cfT(M,I,A,B,D) A |
---|
1930 | #define PSHORT_cfT(M,I,A,B,D) A |
---|
1931 | #define PVOID_cfT(M,I,A,B,D) A |
---|
1932 | #if defined(apolloFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran) |
---|
1933 | #define ROUTINE_cfT(M,I,A,B,D) _(ROUTINE_,I) (*A) |
---|
1934 | #else |
---|
1935 | #define ROUTINE_cfT(M,I,A,B,D) _(ROUTINE_,I) A |
---|
1936 | #endif |
---|
1937 | /* A == pointer to the characters |
---|
1938 | D == length of the string, or of an element in an array of strings |
---|
1939 | E == number of elements in an array of strings */ |
---|
1940 | #define TTSTR( A,B,D) \ |
---|
1941 | ((B=_cf_malloc(D+1))[D]='\0', memcpy(B,A,D), kill_trailing(B,' ')) |
---|
1942 | #define TTTTSTR( A,B,D) (!(D<4||A[0]||A[1]||A[2]||A[3]))?NULL: \ |
---|
1943 | memchr(A,'\0',D) ?A : TTSTR(A,B,D) |
---|
1944 | #define TTTTSTRV( A,B,D,E) (_(B,N)=E,B=_cf_malloc(_(B,N)*(D+1)), (void *) \ |
---|
1945 | vkill_trailing(f2cstrv(A,B,D+1, _(B,N)*(D+1)), D+1,_(B,N)*(D+1),' ')) |
---|
1946 | #ifdef vmsFortran |
---|
1947 | #define STRING_cfT(M,I,A,B,D) TTTTSTR( A->dsc$a_pointer,B,A->dsc$w_length) |
---|
1948 | #define STRINGV_cfT(M,I,A,B,D) TTTTSTRV(A->dsc$a_pointer, B, \ |
---|
1949 | A->dsc$w_length , A->dsc$l_m[0]) |
---|
1950 | #define PSTRING_cfT(M,I,A,B,D) TTSTR( A->dsc$a_pointer,B,A->dsc$w_length) |
---|
1951 | #define PPSTRING_cfT(M,I,A,B,D) A->dsc$a_pointer |
---|
1952 | #else |
---|
1953 | #ifdef CRAYFortran |
---|
1954 | #define STRING_cfT(M,I,A,B,D) TTTTSTR( _fcdtocp(A),B,_fcdlen(A)) |
---|
1955 | #define STRINGV_cfT(M,I,A,B,D) TTTTSTRV(_fcdtocp(A),B,_fcdlen(A), \ |
---|
1956 | num_elem(_fcdtocp(A),_fcdlen(A),_3(M,_STRV_A,I))) |
---|
1957 | #define PSTRING_cfT(M,I,A,B,D) TTSTR( _fcdtocp(A),B,_fcdlen(A)) |
---|
1958 | #define PPSTRING_cfT(M,I,A,B,D) _fcdtocp(A) |
---|
1959 | #else |
---|
1960 | #define STRING_cfT(M,I,A,B,D) TTTTSTR( A,B,D) |
---|
1961 | #define STRINGV_cfT(M,I,A,B,D) TTTTSTRV(A,B,D, num_elem(A,D,_3(M,_STRV_A,I))) |
---|
1962 | #define PSTRING_cfT(M,I,A,B,D) TTSTR( A,B,D) |
---|
1963 | #define PPSTRING_cfT(M,I,A,B,D) A |
---|
1964 | #endif |
---|
1965 | #endif |
---|
1966 | #define PNSTRING_cfT(M,I,A,B,D) STRING_cfT(M,I,A,B,D) |
---|
1967 | #define PSTRINGV_cfT(M,I,A,B,D) STRINGV_cfT(M,I,A,B,D) |
---|
1968 | #define CF_0_cfT(M,I,A,B,D) |
---|
1969 | |
---|
1970 | #define RCF(TN,I) _(TN,_cfSTR)(3,R,_(A,I),_(B,I),_(C,I),0,0) |
---|
1971 | #define DEFAULT_cfR(A,B,D) |
---|
1972 | #define LOGICAL_cfR(A,B,D) |
---|
1973 | #define PLOGICAL_cfR(A,B,D) *A=C2FLOGICAL(*A); |
---|
1974 | #define STRING_cfR(A,B,D) if (B) _cf_free(B); |
---|
1975 | #define STRINGV_cfR(A,B,D) _cf_free(B); |
---|
1976 | /* A and D as defined above for TSTRING(V) */ |
---|
1977 | #define RRRRPSTR( A,B,D) if (B) memcpy(A,B, _cfMIN(strlen(B),D)), \ |
---|
1978 | (D>strlen(B)?memset(A+strlen(B),' ', D-strlen(B)):0), _cf_free(B); |
---|
1979 | #define RRRRPSTRV(A,B,D) c2fstrv(B,A,D+1,(D+1)*_(B,N)), _cf_free(B); |
---|
1980 | #ifdef vmsFortran |
---|
1981 | #define PSTRING_cfR(A,B,D) RRRRPSTR( A->dsc$a_pointer,B,A->dsc$w_length) |
---|
1982 | #define PSTRINGV_cfR(A,B,D) RRRRPSTRV(A->dsc$a_pointer,B,A->dsc$w_length) |
---|
1983 | #else |
---|
1984 | #ifdef CRAYFortran |
---|
1985 | #define PSTRING_cfR(A,B,D) RRRRPSTR( _fcdtocp(A),B,_fcdlen(A)) |
---|
1986 | #define PSTRINGV_cfR(A,B,D) RRRRPSTRV(_fcdtocp(A),B,_fcdlen(A)) |
---|
1987 | #else |
---|
1988 | #define PSTRING_cfR(A,B,D) RRRRPSTR( A,B,D) |
---|
1989 | #define PSTRINGV_cfR(A,B,D) RRRRPSTRV(A,B,D) |
---|
1990 | #endif |
---|
1991 | #endif |
---|
1992 | #define PNSTRING_cfR(A,B,D) PSTRING_cfR(A,B,D) |
---|
1993 | #define PPSTRING_cfR(A,B,D) |
---|
1994 | |
---|
1995 | #define BYTE_cfFZ(UN,LN) INTEGER_BYTE FCALLSC_QUALIFIER fcallsc(UN,LN)( |
---|
1996 | #define DOUBLE_cfFZ(UN,LN) DOUBLE_PRECISION FCALLSC_QUALIFIER fcallsc(UN,LN)( |
---|
1997 | #define INT_cfFZ(UN,LN) int FCALLSC_QUALIFIER fcallsc(UN,LN)( |
---|
1998 | #define LOGICAL_cfFZ(UN,LN) int FCALLSC_QUALIFIER fcallsc(UN,LN)( |
---|
1999 | #define LONG_cfFZ(UN,LN) long FCALLSC_QUALIFIER fcallsc(UN,LN)( |
---|
2000 | #define SHORT_cfFZ(UN,LN) short FCALLSC_QUALIFIER fcallsc(UN,LN)( |
---|
2001 | #define VOID_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)( |
---|
2002 | #ifndef __CF__KnR |
---|
2003 | /* The void is req'd by the Apollo, to make this an ANSI function declaration. |
---|
2004 | The Apollo promotes K&R float functions to double. */ |
---|
2005 | #define FLOAT_cfFZ(UN,LN) FORTRAN_REAL FCALLSC_QUALIFIER fcallsc(UN,LN)(void |
---|
2006 | #ifdef vmsFortran |
---|
2007 | #define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(fstring *AS |
---|
2008 | #else |
---|
2009 | #ifdef CRAYFortran |
---|
2010 | #define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(_fcd AS |
---|
2011 | #else |
---|
2012 | #if defined(AbsoftUNIXFortran) || defined(AbsoftProFortran) |
---|
2013 | #define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(char *AS |
---|
2014 | #else |
---|
2015 | #define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(char *AS, unsigned D0 |
---|
2016 | #endif |
---|
2017 | #endif |
---|
2018 | #endif |
---|
2019 | #else |
---|
2020 | #if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT)) |
---|
2021 | #define FLOAT_cfFZ(UN,LN) FORTRAN_REAL FCALLSC_QUALIFIER fcallsc(UN,LN)( |
---|
2022 | #else |
---|
2023 | #define FLOAT_cfFZ(UN,LN) FLOATFUNCTIONTYPE FCALLSC_QUALIFIER fcallsc(UN,LN)( |
---|
2024 | #endif |
---|
2025 | #if defined(vmsFortran) || defined(CRAYFortran) || defined(AbsoftUNIXFortran) |
---|
2026 | #define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(AS |
---|
2027 | #else |
---|
2028 | #define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(AS, D0 |
---|
2029 | #endif |
---|
2030 | #endif |
---|
2031 | |
---|
2032 | #define BYTE_cfF(UN,LN) BYTE_cfFZ(UN,LN) |
---|
2033 | #define DOUBLE_cfF(UN,LN) DOUBLE_cfFZ(UN,LN) |
---|
2034 | #ifndef __CF_KnR |
---|
2035 | #define FLOAT_cfF(UN,LN) FORTRAN_REAL FCALLSC_QUALIFIER fcallsc(UN,LN)( |
---|
2036 | #else |
---|
2037 | #define FLOAT_cfF(UN,LN) FLOAT_cfFZ(UN,LN) |
---|
2038 | #endif |
---|
2039 | #define INT_cfF(UN,LN) INT_cfFZ(UN,LN) |
---|
2040 | #define LOGICAL_cfF(UN,LN) LOGICAL_cfFZ(UN,LN) |
---|
2041 | #define LONG_cfF(UN,LN) LONG_cfFZ(UN,LN) |
---|
2042 | #define SHORT_cfF(UN,LN) SHORT_cfFZ(UN,LN) |
---|
2043 | #define VOID_cfF(UN,LN) VOID_cfFZ(UN,LN) |
---|
2044 | #define STRING_cfF(UN,LN) STRING_cfFZ(UN,LN), |
---|
2045 | |
---|
2046 | #define INT_cfFF |
---|
2047 | #define VOID_cfFF |
---|
2048 | #ifdef vmsFortran |
---|
2049 | #define STRING_cfFF fstring *AS; |
---|
2050 | #else |
---|
2051 | #ifdef CRAYFortran |
---|
2052 | #define STRING_cfFF _fcd AS; |
---|
2053 | #else |
---|
2054 | #define STRING_cfFF char *AS; unsigned D0; |
---|
2055 | #endif |
---|
2056 | #endif |
---|
2057 | |
---|
2058 | #define INT_cfL A0= |
---|
2059 | #define STRING_cfL A0= |
---|
2060 | #define VOID_cfL |
---|
2061 | |
---|
2062 | #define INT_cfK |
---|
2063 | #define VOID_cfK |
---|
2064 | /* KSTRING copies the string into the position provided by the caller. */ |
---|
2065 | #ifdef vmsFortran |
---|
2066 | #define STRING_cfK \ |
---|
2067 | memcpy(AS->dsc$a_pointer,A0,_cfMIN(AS->dsc$w_length,(A0==NULL?0:strlen(A0))));\ |
---|
2068 | AS->dsc$w_length>(A0==NULL?0:strlen(A0))? \ |
---|
2069 | memset(AS->dsc$a_pointer+(A0==NULL?0:strlen(A0)),' ', \ |
---|
2070 | AS->dsc$w_length-(A0==NULL?0:strlen(A0))):0; |
---|
2071 | #else |
---|
2072 | #ifdef CRAYFortran |
---|
2073 | #define STRING_cfK \ |
---|
2074 | memcpy(_fcdtocp(AS),A0, _cfMIN(_fcdlen(AS),(A0==NULL?0:strlen(A0))) ); \ |
---|
2075 | _fcdlen(AS)>(A0==NULL?0:strlen(A0))? \ |
---|
2076 | memset(_fcdtocp(AS)+(A0==NULL?0:strlen(A0)),' ', \ |
---|
2077 | _fcdlen(AS)-(A0==NULL?0:strlen(A0))):0; |
---|
2078 | #else |
---|
2079 | #define STRING_cfK memcpy(AS,A0, _cfMIN(D0,(A0==NULL?0:strlen(A0))) ); \ |
---|
2080 | D0>(A0==NULL?0:strlen(A0))?memset(AS+(A0==NULL?0:strlen(A0)), \ |
---|
2081 | ' ', D0-(A0==NULL?0:strlen(A0))):0; |
---|
2082 | #endif |
---|
2083 | #endif |
---|
2084 | |
---|
2085 | /* Note that K.. and I.. can't be combined since K.. has to access data before |
---|
2086 | R.., in order for functions returning strings which are also passed in as |
---|
2087 | arguments to work correctly. Note that R.. frees and hence may corrupt the |
---|
2088 | string. */ |
---|
2089 | #define BYTE_cfI return A0; |
---|
2090 | #define DOUBLE_cfI return A0; |
---|
2091 | #if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT)) |
---|
2092 | #define FLOAT_cfI return A0; |
---|
2093 | #else |
---|
2094 | #define FLOAT_cfI RETURNFLOAT(A0); |
---|
2095 | #endif |
---|
2096 | #define INT_cfI return A0; |
---|
2097 | #ifdef hpuxFortran800 |
---|
2098 | /* Incredibly, functions must return true as 1, elsewhere .true.==0x01000000. */ |
---|
2099 | #define LOGICAL_cfI return ((A0)?1:0); |
---|
2100 | #else |
---|
2101 | #define LOGICAL_cfI return C2FLOGICAL(A0); |
---|
2102 | #endif |
---|
2103 | #define LONG_cfI return A0; |
---|
2104 | #define SHORT_cfI return A0; |
---|
2105 | #define STRING_cfI return ; |
---|
2106 | #define VOID_cfI return ; |
---|
2107 | |
---|
2108 | #ifdef OLD_VAXC /* Allow %CC-I-PARAMNOTUSED. */ |
---|
2109 | #pragma standard |
---|
2110 | #endif |
---|
2111 | |
---|
2112 | #define FCALLSCSUB0( CN,UN,LN) FCALLSCFUN0(VOID,CN,UN,LN) |
---|
2113 | #define FCALLSCSUB1( CN,UN,LN,T1) FCALLSCFUN1(VOID,CN,UN,LN,T1) |
---|
2114 | #define FCALLSCSUB2( CN,UN,LN,T1,T2) FCALLSCFUN2(VOID,CN,UN,LN,T1,T2) |
---|
2115 | #define FCALLSCSUB3( CN,UN,LN,T1,T2,T3) FCALLSCFUN3(VOID,CN,UN,LN,T1,T2,T3) |
---|
2116 | #define FCALLSCSUB4( CN,UN,LN,T1,T2,T3,T4) \ |
---|
2117 | FCALLSCFUN4(VOID,CN,UN,LN,T1,T2,T3,T4) |
---|
2118 | #define FCALLSCSUB5( CN,UN,LN,T1,T2,T3,T4,T5) \ |
---|
2119 | FCALLSCFUN5(VOID,CN,UN,LN,T1,T2,T3,T4,T5) |
---|
2120 | #define FCALLSCSUB6( CN,UN,LN,T1,T2,T3,T4,T5,T6) \ |
---|
2121 | FCALLSCFUN6(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6) |
---|
2122 | #define FCALLSCSUB7( CN,UN,LN,T1,T2,T3,T4,T5,T6,T7) \ |
---|
2123 | FCALLSCFUN7(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7) |
---|
2124 | #define FCALLSCSUB8( CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8) \ |
---|
2125 | FCALLSCFUN8(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8) |
---|
2126 | #define FCALLSCSUB9( CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9) \ |
---|
2127 | FCALLSCFUN9(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9) |
---|
2128 | #define FCALLSCSUB10(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA) \ |
---|
2129 | FCALLSCFUN10(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA) |
---|
2130 | #define FCALLSCSUB11(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB) \ |
---|
2131 | FCALLSCFUN11(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB) |
---|
2132 | #define FCALLSCSUB12(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC) \ |
---|
2133 | FCALLSCFUN12(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC) |
---|
2134 | #define FCALLSCSUB13(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD) \ |
---|
2135 | FCALLSCFUN13(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD) |
---|
2136 | #define FCALLSCSUB14(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \ |
---|
2137 | FCALLSCFUN14(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) |
---|
2138 | #define FCALLSCSUB15(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF) \ |
---|
2139 | FCALLSCFUN15(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF) |
---|
2140 | #define FCALLSCSUB16(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG) \ |
---|
2141 | FCALLSCFUN16(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG) |
---|
2142 | #define FCALLSCSUB17(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH) \ |
---|
2143 | FCALLSCFUN17(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH) |
---|
2144 | #define FCALLSCSUB18(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI) \ |
---|
2145 | FCALLSCFUN18(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI) |
---|
2146 | #define FCALLSCSUB19(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ) \ |
---|
2147 | FCALLSCFUN19(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ) |
---|
2148 | #define FCALLSCSUB20(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \ |
---|
2149 | FCALLSCFUN20(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) |
---|
2150 | #define FCALLSCSUB21(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL) \ |
---|
2151 | FCALLSCFUN21(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL) |
---|
2152 | #define FCALLSCSUB22(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM) \ |
---|
2153 | FCALLSCFUN22(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM) |
---|
2154 | #define FCALLSCSUB23(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN) \ |
---|
2155 | FCALLSCFUN23(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN) |
---|
2156 | #define FCALLSCSUB24(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO) \ |
---|
2157 | FCALLSCFUN24(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO) |
---|
2158 | #define FCALLSCSUB25(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP) \ |
---|
2159 | FCALLSCFUN25(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP) |
---|
2160 | #define FCALLSCSUB26(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ) \ |
---|
2161 | FCALLSCFUN26(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ) |
---|
2162 | #define FCALLSCSUB27(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \ |
---|
2163 | FCALLSCFUN27(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) |
---|
2164 | |
---|
2165 | |
---|
2166 | #define FCALLSCFUN1( T0,CN,UN,LN,T1) \ |
---|
2167 | FCALLSCFUN5 (T0,CN,UN,LN,T1,CF_0,CF_0,CF_0,CF_0) |
---|
2168 | #define FCALLSCFUN2( T0,CN,UN,LN,T1,T2) \ |
---|
2169 | FCALLSCFUN5 (T0,CN,UN,LN,T1,T2,CF_0,CF_0,CF_0) |
---|
2170 | #define FCALLSCFUN3( T0,CN,UN,LN,T1,T2,T3) \ |
---|
2171 | FCALLSCFUN5 (T0,CN,UN,LN,T1,T2,T3,CF_0,CF_0) |
---|
2172 | #define FCALLSCFUN4( T0,CN,UN,LN,T1,T2,T3,T4) \ |
---|
2173 | FCALLSCFUN5 (T0,CN,UN,LN,T1,T2,T3,T4,CF_0) |
---|
2174 | #define FCALLSCFUN5( T0,CN,UN,LN,T1,T2,T3,T4,T5) \ |
---|
2175 | FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,CF_0,CF_0,CF_0,CF_0,CF_0) |
---|
2176 | #define FCALLSCFUN6( T0,CN,UN,LN,T1,T2,T3,T4,T5,T6) \ |
---|
2177 | FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,CF_0,CF_0,CF_0,CF_0) |
---|
2178 | #define FCALLSCFUN7( T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7) \ |
---|
2179 | FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,CF_0,CF_0,CF_0) |
---|
2180 | #define FCALLSCFUN8( T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8) \ |
---|
2181 | FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,CF_0,CF_0) |
---|
2182 | #define FCALLSCFUN9( T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9) \ |
---|
2183 | FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,CF_0) |
---|
2184 | #define FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA) \ |
---|
2185 | FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,CF_0,CF_0,CF_0,CF_0) |
---|
2186 | #define FCALLSCFUN11(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB) \ |
---|
2187 | FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,CF_0,CF_0,CF_0) |
---|
2188 | #define FCALLSCFUN12(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC) \ |
---|
2189 | FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,CF_0,CF_0) |
---|
2190 | #define FCALLSCFUN13(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD) \ |
---|
2191 | FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,CF_0) |
---|
2192 | |
---|
2193 | |
---|
2194 | #define FCALLSCFUN15(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF) \ |
---|
2195 | FCALLSCFUN20(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,CF_0,CF_0,CF_0,CF_0,CF_0) |
---|
2196 | #define FCALLSCFUN16(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG) \ |
---|
2197 | FCALLSCFUN20(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,CF_0,CF_0,CF_0,CF_0) |
---|
2198 | #define FCALLSCFUN17(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH) \ |
---|
2199 | FCALLSCFUN20(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,CF_0,CF_0,CF_0) |
---|
2200 | #define FCALLSCFUN18(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI) \ |
---|
2201 | FCALLSCFUN20(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,CF_0,CF_0) |
---|
2202 | #define FCALLSCFUN19(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ) \ |
---|
2203 | FCALLSCFUN20(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,CF_0) |
---|
2204 | #define FCALLSCFUN20(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \ |
---|
2205 | FCALLSCFUN27(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0) |
---|
2206 | #define FCALLSCFUN21(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL) \ |
---|
2207 | FCALLSCFUN27(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0) |
---|
2208 | #define FCALLSCFUN22(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM) \ |
---|
2209 | FCALLSCFUN27(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,CF_0,CF_0,CF_0,CF_0,CF_0) |
---|
2210 | #define FCALLSCFUN23(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN) \ |
---|
2211 | FCALLSCFUN27(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,CF_0,CF_0,CF_0,CF_0) |
---|
2212 | #define FCALLSCFUN24(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO) \ |
---|
2213 | FCALLSCFUN27(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,CF_0,CF_0,CF_0) |
---|
2214 | #define FCALLSCFUN25(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP) \ |
---|
2215 | FCALLSCFUN27(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,CF_0,CF_0) |
---|
2216 | #define FCALLSCFUN26(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ) \ |
---|
2217 | FCALLSCFUN27(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,CF_0) |
---|
2218 | |
---|
2219 | |
---|
2220 | #ifndef __CF__KnR |
---|
2221 | #define FCALLSCFUN0(T0,CN,UN,LN) CFextern _(T0,_cfFZ)(UN,LN) ABSOFT_cf2(T0)) \ |
---|
2222 | {_Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN(); _Icf(0,K,T0,0,0) _(T0,_cfI)} |
---|
2223 | |
---|
2224 | #define FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \ |
---|
2225 | CFextern _(T0,_cfF)(UN,LN) \ |
---|
2226 | CFARGT14(NCF,DCF,ABSOFT_cf2(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) ) \ |
---|
2227 | { CFARGT14S(QCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \ |
---|
2228 | _Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN( TCF(LN,T1,1,0) TCF(LN,T2,2,1) \ |
---|
2229 | TCF(LN,T3,3,1) TCF(LN,T4,4,1) TCF(LN,T5,5,1) TCF(LN,T6,6,1) TCF(LN,T7,7,1) \ |
---|
2230 | TCF(LN,T8,8,1) TCF(LN,T9,9,1) TCF(LN,TA,10,1) TCF(LN,TB,11,1) TCF(LN,TC,12,1) \ |
---|
2231 | TCF(LN,TD,13,1) TCF(LN,TE,14,1) ); _Icf(0,K,T0,0,0) \ |
---|
2232 | CFARGT14S(RCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) _(T0,_cfI) } |
---|
2233 | |
---|
2234 | #define FCALLSCFUN27(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \ |
---|
2235 | CFextern _(T0,_cfF)(UN,LN) \ |
---|
2236 | CFARGT27(NCF,DCF,ABSOFT_cf2(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) ) \ |
---|
2237 | { CFARGT27S(QCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \ |
---|
2238 | _Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN( TCF(LN,T1,1,0) TCF(LN,T2,2,1) \ |
---|
2239 | TCF(LN,T3,3,1) TCF(LN,T4,4,1) TCF(LN,T5,5,1) TCF(LN,T6,6,1) TCF(LN,T7,7,1) \ |
---|
2240 | TCF(LN,T8,8,1) TCF(LN,T9,9,1) TCF(LN,TA,10,1) TCF(LN,TB,11,1) TCF(LN,TC,12,1) \ |
---|
2241 | TCF(LN,TD,13,1) TCF(LN,TE,14,1) TCF(LN,TF,15,1) TCF(LN,TG,16,1) TCF(LN,TH,17,1) \ |
---|
2242 | TCF(LN,TI,18,1) TCF(LN,TJ,19,1) TCF(LN,TK,20,1) TCF(LN,TL,21,1) TCF(LN,TM,22,1) \ |
---|
2243 | TCF(LN,TN,23,1) TCF(LN,TO,24,1) TCF(LN,TP,25,1) TCF(LN,TQ,26,1) TCF(LN,TR,27,1) ); _Icf(0,K,T0,0,0) \ |
---|
2244 | CFARGT27S(RCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) _(T0,_cfI) } |
---|
2245 | |
---|
2246 | #else |
---|
2247 | #define FCALLSCFUN0(T0,CN,UN,LN) CFextern _(T0,_cfFZ)(UN,LN) ABSOFT_cf3(T0)) _Icf(0,FF,T0,0,0)\ |
---|
2248 | {_Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN(); _Icf(0,K,T0,0,0) _(T0,_cfI)} |
---|
2249 | |
---|
2250 | #define FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \ |
---|
2251 | CFextern _(T0,_cfF)(UN,LN) \ |
---|
2252 | CFARGT14(NNCF,DDCF,ABSOFT_cf3(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)) _Icf(0,FF,T0,0,0) \ |
---|
2253 | CFARGT14FS(NNNCF,DDDCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE); \ |
---|
2254 | { CFARGT14S(QCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \ |
---|
2255 | _Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN( TCF(LN,T1,1,0) TCF(LN,T2,2,1) \ |
---|
2256 | TCF(LN,T3,3,1) TCF(LN,T4,4,1) TCF(LN,T5,5,1) TCF(LN,T6,6,1) TCF(LN,T7,7,1) \ |
---|
2257 | TCF(LN,T8,8,1) TCF(LN,T9,9,1) TCF(LN,TA,10,1) TCF(LN,TB,11,1) TCF(LN,TC,12,1) \ |
---|
2258 | TCF(LN,TD,13,1) TCF(LN,TE,14,1) ); _Icf(0,K,T0,0,0) \ |
---|
2259 | CFARGT14S(RCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) _(T0,_cfI)} |
---|
2260 | |
---|
2261 | #define FCALLSCFUN27(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \ |
---|
2262 | CFextern _(T0,_cfF)(UN,LN) \ |
---|
2263 | CFARGT27(NNCF,DDCF,ABSOFT_cf3(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR)) _Icf(0,FF,T0,0,0) \ |
---|
2264 | CFARGT27FS(NNNCF,DDDCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR); \ |
---|
2265 | { CFARGT27S(QCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \ |
---|
2266 | _Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN( TCF(LN,T1,1,0) TCF(LN,T2,2,1) \ |
---|
2267 | TCF(LN,T3,3,1) TCF(LN,T4,4,1) TCF(LN,T5,5,1) TCF(LN,T6,6,1) TCF(LN,T7,7,1) \ |
---|
2268 | TCF(LN,T8,8,1) TCF(LN,T9,9,1) TCF(LN,TA,10,1) TCF(LN,TB,11,1) TCF(LN,TC,12,1) \ |
---|
2269 | TCF(LN,TD,13,1) TCF(LN,TE,14,1) TCF(LN,TF,15,1) TCF(LN,TG,16,1) TCF(LN,TH,17,1) \ |
---|
2270 | TCF(LN,TI,18,1) TCF(LN,TJ,19,1) TCF(LN,TK,20,1) TCF(LN,TL,21,1) TCF(LN,TM,22,1) \ |
---|
2271 | TCF(LN,TN,23,1) TCF(LN,TO,24,1) TCF(LN,TP,25,1) TCF(LN,TQ,26,1) TCF(LN,TR,27,1) ); _Icf(0,K,T0,0,0) \ |
---|
2272 | CFARGT27S(RCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) _(T0,_cfI)} |
---|
2273 | |
---|
2274 | #endif |
---|
2275 | |
---|
2276 | |
---|
2277 | #endif /* __CFORTRAN_LOADED */ |
---|
2278 | |
---|