cfortran.h 126 KB

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