PLplot
5.10.0
|
00001 // Maurice LeBrun 00002 // IFS, University of Texas 00003 // 00004 // Header file for plplot Fortran interface stubs. 00005 // THIS FILE IS NOT FOR INCLUSION BY USER CODES!! 00006 // 00007 // The contents of this file are in the public domain. 00008 // 00009 00010 #ifndef __PLSTUBS_H__ 00011 #define __PLSTUBS_H__ 00012 00013 #include "plplotP.h" 00014 00015 //-------------------------------------------------------------------------- 00016 // Select name transformation based on system type. 00017 // 00018 // Define the STUB_LINKAGE flag to get proper C<->Fortran linkage on your 00019 // system. This flag describes what the compiler does to Fortran routine 00020 // names, which we must duplicate on the C stubs so that the Fortran 00021 // routines may call them. You can often set STUB_LINKAGE by the 00022 // construct -DSTUB_LINKAGE=<value> on the C compiler command line, but 00023 // it is best to either rely on the default or explicitly handle your 00024 // system below. 00025 // 00026 // Current choices for STUB_LINKAGE: 00027 // 00028 // STUB_LAU lower-case, append underscore 00029 // STUB_L lower-case 00030 // STUB_U upper-case 00031 // STUB_FORTRAN use "fortran" keyword (MS-DOS convention) 00032 // 00033 // If no choice is made, the default is set to STUB_LAU. This should 00034 // handle most generic Unix boxes not already accounted for. 00035 // 00036 // ** Namespace collision ** 00037 // 00038 // If you use the STUB_L option, the C & Fortran namespaces will collide 00039 // if the Fortran compiler does lower case folding (they usually do). 00040 // The problem is then that the stub names and actual function names will 00041 // be exactly the same, if we insist on the Fortran and C bindings to be 00042 // similar. The solution is to give the externally callable C routines 00043 // unique names, and provide macros to turn the documented entry names in 00044 // to the real ones. This is a horrible kludge, but the alternatives are 00045 // worse. Fortunately it has no effect on the user program, and you can 00046 // forget that you ever read about it here. 00047 //-------------------------------------------------------------------------- 00048 00049 #define STUB_LAU 1 00050 #define STUB_L 2 00051 #define STUB_U 3 00052 #define STUB_FORTRAN 4 00053 #define STUB_STDCALL 5 00054 #define STUB_MINGW 6 00055 #define STUB_IVF 7 00056 00057 #ifndef STUB_LINKAGE 00058 00059 #if defined ( SX ) // NEC Super-UX (SX-3) 00060 #define STUB_LINKAGE STUB_LAU 00061 #endif 00062 00063 #if defined ( _IBMR2 ) && defined ( _AIX ) // AIX 00064 #define STUB_LINKAGE STUB_L 00065 #endif 00066 00067 #ifdef __hpux // HP/UX 00068 #define STUB_LINKAGE STUB_L 00069 #endif 00070 00071 #ifdef __mips // IRIX (SGI systems) 00072 #define STUB_LINKAGE STUB_LAU 00073 #endif 00074 00075 #ifdef sun // Suns 00076 #define STUB_LINKAGE STUB_LAU 00077 #endif 00078 00079 #ifdef CRAY // Cray/UNICOS 00080 #define STUB_LINKAGE STUB_U 00081 #endif 00082 00083 #if defined ( __alpha ) && defined ( __osf__ ) // DEC Alpha AXP/OSF 00084 #define STUB_LINKAGE STUB_LAU 00085 #endif 00086 00087 #ifdef __GO32__ // dos386/djgpp 00088 #ifdef MSDOS 00089 #undef MSDOS 00090 #endif 00091 #endif 00092 00093 #ifdef WIN32 // MS-DOS based 00094 #ifdef IVF // Intel Visual Fortran 00095 #define STUB_LINKAGE STUB_IVF 00096 #elif defined ( CVF ) 00097 #define STUB_LINKAGE STUB_U 00098 #elif defined ( MSDOS ) 00099 #define STUB_LINKAGE STUB_FORTRAN 00100 #elif defined ( _MSC_VER ) 00101 #define STUB_LINKAGE STUB_STDCALL 00102 #elif defined ( __GNUC__ ) 00103 #define STUB_LINKAGE STUB_MINGW 00104 #endif 00105 #elif defined ( MSDOS ) // MS-DOS based 00106 #define STUB_LINKAGE STUB_FORTRAN 00107 #endif // Windows 32-bit 00108 00109 #ifndef STUB_LINKAGE // The default 00110 #define STUB_LINKAGE STUB_LAU 00111 #endif 00112 00113 #endif // ifndef STUB_LINKAGE 00114 00115 //-------------------------------------------------------------------------- 00116 // Define name-translation macro. 00117 // To use, define with x the upper case routine name, y the lower case. 00118 // Should be adaptable to virtually any system. 00119 //-------------------------------------------------------------------------- 00120 00121 #if STUB_LINKAGE == STUB_LAU 00122 #define FNAME( x, y ) PLDLLIMPEXP_F95C y ## _ 00123 #define FNAME_( x, y ) y ## _ 00124 00125 #elif STUB_LINKAGE == STUB_L 00126 #define FNAME( x, y ) y 00127 #define FNAME_( x, y ) y 00128 00129 #elif STUB_LINKAGE == STUB_U 00130 #define FNAME( x, y ) PLDLLIMPEXP_F95C __stdcall x 00131 #define FNAME_( x, y ) x 00132 00133 #elif STUB_LINKAGE == STUB_FORTRAN 00134 #define FNAME( x, y ) fortran x 00135 #define FNAME_( x, y ) x 00136 00137 #elif STUB_LINKAGE == STUB_STDCALL 00138 #define FNAME( x, y ) PLDLLIMPEXP_F95C __stdcall x 00139 #define FNAME_( x, y ) x 00140 00141 #elif STUB_LINKAGE == STUB_MINGW 00142 #define FNAME( x, y ) PLDLLIMPEXP_F95C y ## _ 00143 #define FNAME_( x, y ) y 00144 00145 #elif STUB_LINKAGE == STUB_IVF 00146 #define FNAME( x, y ) PLDLLIMPEXP_F95C x 00147 #define FNAME_( x, y ) x 00148 00149 #else 00150 #error "Illegal setting for STUB_LINKAGE" 00151 #endif 00152 00153 //-------------------------------------------------------------------------- 00154 // Now to actually define the stub names. 00155 // Each stub must have an entry here. 00156 //-------------------------------------------------------------------------- 00157 00158 // N.B. By default the gfortran compiler appends second underscore to name if 00159 // the original name contains any underscore at all. According to info 00160 // gfortran, "This is done to ensure compatibility with code produced by many 00161 // UNIX Fortran compilers." However, other fortran compilers do not have 00162 // this default naming scheme so to avoid trouble I have #defined two 00163 // variations of the embedded underscore names, one with and one without 00164 // the extra trailing underscore. 00165 // 00166 00167 #define PL_SETCONTLABELFORMAT FNAME( PL_SETCONTLABELFORMAT, pl_setcontlabelformat ) 00168 #define PL_SETCONTLABELFORMATa FNAME( PL_SETCONTLABELFORMAT_, pl_setcontlabelformat_ ) 00169 #define PL_SETCONTLABELPARAM FNAME( PL_SETCONTLABELPARAM, pl_setcontlabelparam ) 00170 #define PL_SETCONTLABELPARAMa FNAME( PL_SETCONTLABELPARAM_, pl_setcontlabelparam_ ) 00171 #define PLABORT7 FNAME( PLABORT7, plabort7 ) 00172 #define PLADV FNAME( PLADV, pladv ) 00173 #define PLARC FNAME( PLARC, plarc ) 00174 #define PLAXES7 FNAME( PLAXES7, plaxes7 ) 00175 #define PLBIN FNAME( PLBINF95, plbinf95 ) 00176 #define PLBOP FNAME( PLBOP, plbop ) 00177 #define PLBOX37 FNAME( PLBOX37, plbox37 ) 00178 #define PLBOX7 FNAME( PLBOX7, plbox7 ) 00179 #define PLBTIME FNAME( PLBTIME, plbtime ) 00180 #define PLCALC_WORLD FNAME( PLCALC_WORLD, plcalc_world ) 00181 #define PLCALC_WORLDa FNAME( PLCALC_WORLD_, plcalc_world_ ) 00182 #define PLCLEAR FNAME( PLCLEAR, plclear ) 00183 #define PLCLR FNAME( PLCLR, plclr ) 00184 #define PLCOL0 FNAME( PLCOL0, plcol0 ) 00185 #define PLCOL1 FNAME( PLCOL1, plcol1 ) 00186 #define PLCOLORBAR_CNV_TEXT FNAME( PLCOLORBAR07_CNV_TEXT, plcolorbar07_cnv_text ) 00187 #define PLCOLORBAR FNAME( PLCOLORBAR07, plcolorbar07 ) 00188 #define PLCONFIGTIME FNAME( PLCONFIGTIME, plconfigtime ) 00189 #define PLCON07 FNAME( PLCON07, plcon07 ) 00190 #define PLCON17 FNAME( PLCON17, plcon17 ) 00191 #define PLCON27 FNAME( PLCON27, plcon27 ) 00192 #define PLCONT7 FNAME( PLCONT7, plcont7 ) 00193 #define PLCPSTRM FNAME( PLCPSTRMF95, plcpstrmf95 ) 00194 #define PLCTIME FNAME( PLCTIME, plctime ) 00195 #define PLEND FNAME( PLEND, plend ) 00196 #define PLEND1 FNAME( PLEND1, plend1 ) 00197 #define PLENV FNAME( PLENV, plenv ) 00198 #define PLENV0 FNAME( PLENV0, plenv0 ) 00199 #define PLEOP FNAME( PLEOP, pleop ) 00200 #define PLERRX FNAME( PLERRXF95, plerrxf95 ) 00201 #define PLERRY FNAME( PLERRYF95, plerryf95 ) 00202 #define PLFAMADV FNAME( PLFAMADV, plfamadv ) 00203 #define PLFILL FNAME( PLFILLF95, plfillf95 ) 00204 #define PLFILL3 FNAME( PLFILL3F95, plfill3f95 ) 00205 #define PLFLUSH FNAME( PLFLUSH, plflush ) 00206 #define PLFONT FNAME( PLFONT, plfont ) 00207 #define PLFONTLD FNAME( PLFONTLD, plfontld ) 00208 #define PLGCHR FNAME( PLGCHR, plgchr ) 00209 #define PLGCMAP1_RANGE FNAME( PLGCMAP1_RANGE, plgcmap1_range ) 00210 #define PLGCOL0 FNAME( PLGCOL0, plgcol0 ) 00211 #define PLGCOL0A FNAME( PLGCOL0A, plgcol0a ) 00212 #define PLGCOLBG FNAME( PLGCOLBG, plgcolbg ) 00213 #define PLGCOLBGA FNAME( PLGCOLBGA, plgcolbga ) 00214 #define PLGCOMPRESSION FNAME( PLGCOMPRESSION, plgcompression ) 00215 #define PLGDEV7 FNAME( PLGDEV7, plgdev7 ) 00216 #define PLGDIDEV FNAME( PLGDIDEV, plgdidev ) 00217 #define PLGDIORI FNAME( PLGDIORI, plgdiori ) 00218 #define PLGDIPLT FNAME( PLGDIPLT, plgdiplt ) 00219 #define PLGETCURSOR FNAME( PLGETCURSOR, plgetcursor ) 00220 #define PLGFAM FNAME( PLGFAM, plgfam ) 00221 #define PLGFCI FNAME( PLGFCI, plgfci ) 00222 #define PLGFNAM7 FNAME( PLGFNAM7, plgfnam7 ) 00223 #define PLGFONT FNAME( PLGFONT, plgfont ) 00224 #define PLGLEVEL FNAME( PLGLEVEL, plglevel ) 00225 #define PLGPAGE FNAME( PLGPAGE, plgpage ) 00226 #define PLGRA FNAME( PLGRA, plgra ) 00227 #define PLGRADIENT FNAME( PLGRADIENTF95, plgradientf95 ) 00228 #define PLGRIDDATA FNAME( PLGRIDDATAF95, plgriddataf95 ) 00229 #define PLGSPA FNAME( PLGSPA, plgspa ) 00230 #define PLGSTRM FNAME( PLGSTRM, plgstrm ) 00231 #define PLGVER7 FNAME( PLGVER7, plgver7 ) 00232 #define PLGVPD FNAME( PLGVPD, plgvpd ) 00233 #define PLGVPW FNAME( PLGVPW, plgvpw ) 00234 #define PLGXAX FNAME( PLGXAX, plgxax ) 00235 #define PLGYAX FNAME( PLGYAX, plgyax ) 00236 #define PLGZAX FNAME( PLGZAX, plgzax ) 00237 #define PLHIST FNAME( PLHISTF95, plhistf95 ) 00238 #define PLHLSRGB FNAME( PLHLSRGB, plhlsrgb ) 00239 #define PLIMAGE FNAME( PLIMAGEF95, plimagef95 ) 00240 #define PLIMAGEFR07 FNAME( PLIMAGEFR07, plimagefr07 ) 00241 #define PLIMAGEFR17 FNAME( PLIMAGEFR17, plimagefr17 ) 00242 #define PLIMAGEFR27 FNAME( PLIMAGEFR27, plimagefr27 ) 00243 #define PLIMAGEFR7 FNAME( PLIMAGEFR7, plimagefr7 ) 00244 #define PLINIT FNAME( PLINIT, plinit ) 00245 #define PLJOIN FNAME( PLJOIN, pljoin ) 00246 #define PLLAB7 FNAME( PLLAB7, pllab7 ) 00247 #define PLLEGEND_CNV_TEXT FNAME( PLLEGEND07_CNV_TEXT, pllegend07_cnv_text ) 00248 #define PLLEGEND FNAME( PLLEGEND07, pllegend07 ) 00249 #define PLLIGHTSOURCE FNAME( PLLIGHTSOURCE, pllightsource ) 00250 #define PLLINE FNAME( PLLINEF95, pllinef95 ) 00251 #define PLLINE3 FNAME( PLLINE3F95, plline3f95 ) 00252 #define PLLSTY FNAME( PLLSTY, pllsty ) 00253 #define PLMAP7 FNAME( PLMAP7, plmap7 ) 00254 #define PLMERIDIANS7 FNAME( PLMERIDIANS7, plmeridians7 ) 00255 #define PLMESH FNAME( PLMESHF95, plmeshf95 ) 00256 #define PLMESHC FNAME( PLMESHCF95, plmeshcf95 ) 00257 #define PLMKSTRM FNAME( PLMKSTRM, plmkstrm ) 00258 #define PLMTEX7 FNAME( PLMTEX7, plmtex7 ) 00259 #define PLMTEX37 FNAME( PLMTEX37, plmtex37 ) 00260 #define PLOT3D FNAME( PLOT3DF95, plot3df95 ) 00261 #define PLOT3DC FNAME( PLOT3DCF95, plot3dcf95 ) 00262 00263 #if STUB_LINKAGE == STUB_STDCALL || STUB_LINKAGE == STUB_FORTRAN 00264 #define CALL_PLOT3DC PLOT3DCF95 00265 #elif STUB_LINKAGE == STUB_LAU 00266 #define CALL_PLOT3DC plot3dcf95_ 00267 #else 00268 #define CALL_PLOT3DC PLOT3DC 00269 #endif 00270 00271 #define PLPARSEOPTS7 FNAME( PLPARSEOPTS7, plparseopts7 ) 00272 #define PLPAT FNAME( PLPAT, plpat ) 00273 #define PLPATH FNAME( PLPATH, plpath ) 00274 #define PLPOIN FNAME( PLPOINF95, plpoinf95 ) 00275 #define PLPOIN3 FNAME( PLPOIN3F95, plpoin3f95 ) 00276 #define PLPOLY3 FNAME( PLPOLY3F95, plpoly3f95 ) 00277 #define PLPREC FNAME( PLPREC, plprec ) 00278 #define PLPSTY FNAME( PLPSTY, plpsty ) 00279 #define PLPTEX7 FNAME( PLPTEX7, plptex7 ) 00280 #define PLPTEX37 FNAME( PLPTEX37, plptex37 ) 00281 #define PLRANDD FNAME( PLRANDDF95, plranddf95 ) 00282 #define PLREPLOT FNAME( PLREPLOT, plreplot ) 00283 #define PLRGBHLS FNAME( PLRGBHLS, plrgbhls ) 00284 #define PLSCHR FNAME( PLSCHR, plschr ) 00285 #define PLSCMAP0 FNAME( PLSCMAP0F95, plscmap0f95 ) 00286 #define PLSCMAP0A FNAME( PLSCMAP0AF95, plscmap0af95 ) 00287 #define PLSCMAP0N FNAME( PLSCMAP0N, plscmap0n ) 00288 #define PLSCMAP1 FNAME( PLSCMAP1F95, plscmap1f95 ) 00289 #define PLSCMAP1A FNAME( PLSCMAP1AF95, plscmap1af95 ) 00290 #define PLSCMAP1L FNAME( PLSCMAP1LF95, plscmap1lf95 ) 00291 #define PLSCMAP1L2 FNAME( PLSCMAP1L2F95, plscmap1l2f95 ) 00292 #define PLSCMAP1LA FNAME( PLSCMAP1LAF95, plscmap1laf95 ) 00293 #define PLSCMAP1LA2 FNAME( PLSCMAP1LA2F95, plscmap1la2f95 ) 00294 #define PLSCMAP1N FNAME( PLSCMAP1N, plscmap1n ) 00295 #define PLSCMAP1_RANGE FNAME( PLSCMAP1_RANGE, plscmap1_range ) 00296 #define PLSCOL0 FNAME( PLSCOL0, plscol0 ) 00297 #define PLSCOL0A FNAME( PLSCOL0A, plscol0a ) 00298 #define PLSCOLBG FNAME( PLSCOLBG, plscolbg ) 00299 #define PLSCOLBGA FNAME( PLSCOLBGA, plscolbga ) 00300 #define PLSCOLOR FNAME( PLSCOLOR, plscolor ) 00301 #define PLSCOMPRESSION FNAME( PLSCOMPRESSION, plscompression ) 00302 #define PLSDEV7 FNAME( PLSDEV7, plsdev7 ) 00303 #define PLSDIDEV FNAME( PLSDIDEV, plsdidev ) 00304 #define PLSDIMAP FNAME( PLSDIMAP, plsdimap ) 00305 #define PLSDIORI FNAME( PLSDIORI, plsdiori ) 00306 #define PLSDIPLT FNAME( PLSDIPLT, plsdiplt ) 00307 #define PLSDIPLZ FNAME( PLSDIPLZ, plsdiplz ) 00308 #define PLSEED FNAME( PLSEED, plseed ) 00309 #define PLSESC FNAME( PLSESC, plsesc ) 00310 #define PLSETOPT7 FNAME( PLSETOPT7, plsetopt7 ) 00311 #define PLSFAM FNAME( PLSFAM, plsfam ) 00312 #define PLSFCI FNAME( PLSFCI, plsfci ) 00313 #define PLSFNAM7 FNAME( PLSFNAM7, plsfnam7 ) 00314 #define PLSFONT FNAME( PLSFONT, plsfont ) 00315 #define PLSHADE07 FNAME( PLSHADE07, plshade07 ) 00316 #define PLSHADE17 FNAME( PLSHADE17, plshade17 ) 00317 #define PLSHADE27 FNAME( PLSHADE27, plshade27 ) 00318 #define PLSHADE7 FNAME( PLSHADE7, plshade7 ) 00319 #define PLSHADES07 FNAME( PLSHADES07, plshades07 ) 00320 #define PLSHADES17 FNAME( PLSHADES17, plshades17 ) 00321 #define PLSHADES27 FNAME( PLSHADES27, plshades27 ) 00322 #define PLSHADES7 FNAME( PLSHADES7, plshades7 ) 00323 #define PLSLABELFUNC_ON FNAME( PLSLABELFUNC_ON, plslabelfunc_on ) 00324 #define PLSLABELFUNC_ONa FNAME( PLSLABELFUNC_ON_, plslabelfunc_on_ ) 00325 #define PLSLABELFUNC_OFF FNAME( PLSLABELFUNC_OFF, plslabelfunc_off ) 00326 #define PLSLABELFUNC_OFFa FNAME( PLSLABELFUNC_OFF_, plslabelfunc_off_ ) 00327 #define PLSLABELFUNC_NONE FNAME( PLSLABELFUNC_NONE, plslabelfunc_none ) 00328 #define PLSLABELFUNC_NONEa FNAME( PLSLABELFUNC_NONE_, plslabelfunc_none_ ) 00329 #define PLSMAJ FNAME( PLSMAJ, plsmaj ) 00330 #define PLSMEM FNAME( PLSMEM, plsmem ) 00331 #define PLSMEMA FNAME( PLSMEMA, plsmema ) 00332 #define PLSMIN FNAME( PLSMIN, plsmin ) 00333 #define PLSORI FNAME( PLSORI, plsori ) 00334 #define PLSPAGE FNAME( PLSPAGE, plspage ) 00335 #define PLSPAL07 FNAME( PLSPAL07, plspal07 ) 00336 #define PLSPAL17 FNAME( PLSPAL17, plspal17 ) 00337 #define PLSPAUSE FNAME( PLSPAUSEF95, plspausef95 ) 00338 #define PLSSTRM FNAME( PLSSTRM, plsstrm ) 00339 #define PLSSUB FNAME( PLSSUB, plssub ) 00340 #define PLSSYM FNAME( PLSSYM, plssym ) 00341 #define PLSTAR FNAME( PLSTAR, plstar ) 00342 #define PLSTART7 FNAME( PLSTART7, plstart7 ) 00343 #define PLSTRANSFORM1 FNAME( PLSTRANSFORM1, plstransform1 ) 00344 #define PLSTRANSFORM2 FNAME( PLSTRANSFORM2, plstransform2 ) 00345 #define PLSTRANSFORM3 FNAME( PLSTRANSFORM3, plstransform3 ) 00346 #define PLSTRING7 FNAME( PLSTRING7, plstring7 ) 00347 #define PLSTRING37 FNAME( PLSTRING37, plstring37 ) 00348 #define PLSTRIPA FNAME( PLSTRIPA, plstripa ) 00349 #define PLSTRIPC FNAME( PLSTRIPCF95, plstripcf95 ) 00350 #define PLSTRIPD FNAME( PLSTRIPD, plstripd ) 00351 #define PLSTYL FNAME( PLSTYL, plstyl ) 00352 #define PLSURF3D FNAME( PLSURF3DF95, plsurf3df95 ) 00353 #define PLSVECT1 FNAME( PLSVECT1F95, plsvect1f95 ) 00354 #define PLSVECT2 FNAME( PLSVECT2, plsvect2 ) 00355 #define PLSVPA FNAME( PLSVPA, plsvpa ) 00356 #define PLSXAX FNAME( PLSXAX, plsxax ) 00357 #define PLSYAX FNAME( PLSYAX, plsyax ) 00358 #define PLSYM FNAME( PLSYMF95, plsymf95 ) 00359 #define PLSZAX FNAME( PLSZAX, plszax ) 00360 #define PLTEXT FNAME( PLTEXT, pltext ) 00361 #define PLTIMEFMT7 FNAME( PLTIMEFMT7, pltimefmt7 ) 00362 #define PLVASP FNAME( PLVASP, plvasp ) 00363 #define PLVEC07 FNAME( PLVEC07, plvec07 ) 00364 #define PLVEC17 FNAME( PLVEC17, plvec17 ) 00365 #define PLVEC27 FNAME( PLVEC27, plvec27 ) 00366 #define PLVECT7 FNAME( PLVECT7, plvect7 ) 00367 #define PLVPAS FNAME( PLVPAS, plvpas ) 00368 #define PLVPOR FNAME( PLVPOR, plvpor ) 00369 #define PLVSTA FNAME( PLVSTA, plvsta ) 00370 #define PLW3D FNAME( PLW3D, plw3d ) 00371 #define PLWIDTH FNAME( PLWIDTH, plwidth ) 00372 #define PLWIND FNAME( PLWIND, plwind ) 00373 #define PLXORMOD FNAME( PLXORMODF95, plxormodf95 ) 00374 00375 #ifdef PL_DEPRECATE 00376 #define PLRGB FNAME( PLRGB, plrgb ) 00377 #define PLRGB1 FNAME( PLRGB1, plrgb1 ) 00378 #define PLHLS FNAME( PLHLS, plhls ) 00379 #endif // PL_DEPRECATED 00380 00381 #endif // __PLSTUBS_H__