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