PLplot: plstubs.h Source File

PLplot 5.10.0

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
plstubs.h
Go to the documentation of this file.
1 // $Id: plstubs.h 12750 2013-11-25 23:29:30Z andrewross $
2 //
3 // Maurice LeBrun
4 // IFS, University of Texas
5 //
6 // Header file for plplot Fortran interface stubs.
7 // THIS FILE IS NOT FOR INCLUSION BY USER CODES!!
8 //
9 // The contents of this file are in the public domain.
10 //
11
12 #ifndef __PLSTUBS_H__
13 #define __PLSTUBS_H__
14
15 #include "plplotP.h"
16
17 //--------------------------------------------------------------------------
18 // Select name transformation based on system type.
19 //
20 // Define the STUB_LINKAGE flag to get proper C<->Fortran linkage on your
21 // system. This flag describes what the compiler does to Fortran routine
22 // names, which we must duplicate on the C stubs so that the Fortran
23 // routines may call them. You can often set STUB_LINKAGE by the
24 // construct -DSTUB_LINKAGE=<value> on the C compiler command line, but
25 // it is best to either rely on the default or explicitly handle your
26 // system below.
27 //
28 // Current choices for STUB_LINKAGE:
29 //
30 // STUB_LAU lower-case, append underscore
31 // STUB_L lower-case
32 // STUB_U upper-case
33 // STUB_FORTRAN use "fortran" keyword (MS-DOS convention)
34 //
35 // If no choice is made, the default is set to STUB_LAU. This should
36 // handle most generic Unix boxes not already accounted for.
37 //
38 // ** Namespace collision **
39 //
40 // If you use the STUB_L option, the C & Fortran namespaces will collide
41 // if the Fortran compiler does lower case folding (they usually do).
42 // The problem is then that the stub names and actual function names will
43 // be exactly the same, if we insist on the Fortran and C bindings to be
44 // similar. The solution is to give the externally callable C routines
45 // unique names, and provide macros to turn the documented entry names in
46 // to the real ones. This is a horrible kludge, but the alternatives are
47 // worse. Fortunately it has no effect on the user program, and you can
48 // forget that you ever read about it here.
49 //--------------------------------------------------------------------------
50
51 #define STUB_LAU 1
52 #define STUB_L 2
53 #define STUB_U 3
54 #define STUB_FORTRAN 4
55 #define STUB_STDCALL 5
56 #define STUB_MINGW 6
57 #define STUB_IVF 7
58
59 #ifndef STUB_LINKAGE
60
61 #if defined ( SX ) // NEC Super-UX (SX-3)
62 #define STUB_LINKAGE STUB_LAU
63 #endif
64
65 #if defined ( _IBMR2 ) && defined ( _AIX ) // AIX
66 #define STUB_LINKAGE STUB_L
67 #endif
68
69 #ifdef __hpux // HP/UX
70 #define STUB_LINKAGE STUB_L
71 #endif
72
73 #ifdef __mips // IRIX (SGI systems)
74 #define STUB_LINKAGE STUB_LAU
75 #endif
76
77 #ifdef sun // Suns
78 #define STUB_LINKAGE STUB_LAU
79 #endif
80
81 #ifdef CRAY // Cray/UNICOS
82 #define STUB_LINKAGE STUB_U
83 #endif
84
85 #if defined ( __alpha ) && defined ( __osf__ ) // DEC Alpha AXP/OSF
86 #define STUB_LINKAGE STUB_LAU
87 #endif
88
89 #ifdef __GO32__ // dos386/djgpp
90 #ifdef MSDOS
91 #undef MSDOS
92 #endif
93 #endif
94
95 #ifdef WIN32 // MS-DOS based
96 #ifdef IVF // Intel Visual Fortran
97 #define STUB_LINKAGE STUB_IVF
98 #elif defined ( CVF )
99 #define STUB_LINKAGE STUB_U
100 #elif defined ( MSDOS )
101 #define STUB_LINKAGE STUB_FORTRAN
102 #elif defined ( _MSC_VER )
103 #define STUB_LINKAGE STUB_STDCALL
104 #elif defined ( __GNUC__ )
105 #define STUB_LINKAGE STUB_MINGW
106 #endif
107 #elif defined ( MSDOS ) // MS-DOS based
108 #define STUB_LINKAGE STUB_FORTRAN
109 #endif // Windows 32-bit
110
111 #ifndef STUB_LINKAGE // The default
112 #define STUB_LINKAGE STUB_LAU
113 #endif
114
115 #endif // ifndef STUB_LINKAGE
116
117 //--------------------------------------------------------------------------
118 // Define name-translation macro.
119 // To use, define with x the upper case routine name, y the lower case.
120 // Should be adaptable to virtually any system.
121 //--------------------------------------------------------------------------
122
123 #if STUB_LINKAGE == STUB_LAU
124 #define FNAME( x, y ) PLDLLIMPEXP_F95C y ## _
125 #define FNAME_( x, y ) y ## _
126
127 #elif STUB_LINKAGE == STUB_L
128 #define FNAME( x, y ) y
129 #define FNAME_( x, y ) y
130
131 #elif STUB_LINKAGE == STUB_U
132 #define FNAME( x, y ) PLDLLIMPEXP_F95C __stdcall x
133 #define FNAME_( x, y ) x
134
135 #elif STUB_LINKAGE == STUB_FORTRAN
136 #define FNAME( x, y ) fortran x
137 #define FNAME_( x, y ) x
138
139 #elif STUB_LINKAGE == STUB_STDCALL
140 #define FNAME( x, y ) PLDLLIMPEXP_F95C __stdcall x
141 #define FNAME_( x, y ) x
142
143 #elif STUB_LINKAGE == STUB_MINGW
144 #define FNAME( x, y ) PLDLLIMPEXP_F95C y ## _
145 #define FNAME_( x, y ) y
146
147 #elif STUB_LINKAGE == STUB_IVF
148 #define FNAME( x, y ) PLDLLIMPEXP_F95C x
149 #define FNAME_( x, y ) x
150
151 #else
152 #error "Illegal setting for STUB_LINKAGE"
153 #endif
154
155 //--------------------------------------------------------------------------
156 // Now to actually define the stub names.
157 // Each stub must have an entry here.
158 //--------------------------------------------------------------------------
159
160 // N.B. By default the gfortran compiler appends second underscore to name if
161 // the original name contains any underscore at all. According to info
162 // gfortran, "This is done to ensure compatibility with code produced by many
163 // UNIX Fortran compilers." However, other fortran compilers do not have
164 // this default naming scheme so to avoid trouble I have #defined two
165 // variations of the embedded underscore names, one with and one without
166 // the extra trailing underscore.
167 //
168
169 #define PL_SETCONTLABELFORMAT FNAME( PL_SETCONTLABELFORMAT, pl_setcontlabelformat )
170 #define PL_SETCONTLABELFORMATa FNAME( PL_SETCONTLABELFORMAT_, pl_setcontlabelformat_ )
171 #define PL_SETCONTLABELPARAM FNAME( PL_SETCONTLABELPARAM, pl_setcontlabelparam )
172 #define PL_SETCONTLABELPARAMa FNAME( PL_SETCONTLABELPARAM_, pl_setcontlabelparam_ )
173 #define PLABORT7 FNAME( PLABORT7, plabort7 )
174 #define PLADV FNAME( PLADV, pladv )
175 #define PLARC FNAME( PLARC, plarc )
176 #define PLAXES7 FNAME( PLAXES7, plaxes7 )
177 #define PLBIN FNAME( PLBINF95, plbinf95 )
178 #define PLBOP FNAME( PLBOP, plbop )
179 #define PLBOX37 FNAME( PLBOX37, plbox37 )
180 #define PLBOX7 FNAME( PLBOX7, plbox7 )
181 #define PLBTIME FNAME( PLBTIME, plbtime )
182 #define PLCALC_WORLD FNAME( PLCALC_WORLD, plcalc_world )
183 #define PLCALC_WORLDa FNAME( PLCALC_WORLD_, plcalc_world_ )
184 #define PLCLEAR FNAME( PLCLEAR, plclear )
185 #define PLCLR FNAME( PLCLR, plclr )
186 #define PLCOL0 FNAME( PLCOL0, plcol0 )
187 #define PLCOL1 FNAME( PLCOL1, plcol1 )
188 #define PLCOLORBAR_CNV_TEXT FNAME( PLCOLORBAR07_CNV_TEXT, plcolorbar07_cnv_text )
189 #define PLCOLORBAR FNAME( PLCOLORBAR07, plcolorbar07 )
190 #define PLCONFIGTIME FNAME( PLCONFIGTIME, plconfigtime )
191 #define PLCON07 FNAME( PLCON07, plcon07 )
192 #define PLCON17 FNAME( PLCON17, plcon17 )
193 #define PLCON27 FNAME( PLCON27, plcon27 )
194 #define PLCONT7 FNAME( PLCONT7, plcont7 )
195 #define PLCPSTRM FNAME( PLCPSTRMF95, plcpstrmf95 )
196 #define PLCTIME FNAME( PLCTIME, plctime )
197 #define PLEND FNAME( PLEND, plend )
198 #define PLEND1 FNAME( PLEND1, plend1 )
199 #define PLENV FNAME( PLENV, plenv )
200 #define PLENV0 FNAME( PLENV0, plenv0 )
201 #define PLEOP FNAME( PLEOP, pleop )
202 #define PLERRX FNAME( PLERRXF95, plerrxf95 )
203 #define PLERRY FNAME( PLERRYF95, plerryf95 )
204 #define PLFAMADV FNAME( PLFAMADV, plfamadv )
205 #define PLFILL FNAME( PLFILLF95, plfillf95 )
206 #define PLFILL3 FNAME( PLFILL3F95, plfill3f95 )
207 #define PLFLUSH FNAME( PLFLUSH, plflush )
208 #define PLFONT FNAME( PLFONT, plfont )
209 #define PLFONTLD FNAME( PLFONTLD, plfontld )
210 #define PLGCHR FNAME( PLGCHR, plgchr )
211 #define PLGCMAP1_RANGE FNAME( PLGCMAP1_RANGE, plgcmap1_range )
212 #define PLGCOL0 FNAME( PLGCOL0, plgcol0 )
213 #define PLGCOL0A FNAME( PLGCOL0A, plgcol0a )
214 #define PLGCOLBG FNAME( PLGCOLBG, plgcolbg )
215 #define PLGCOLBGA FNAME( PLGCOLBGA, plgcolbga )
216 #define PLGCOMPRESSION FNAME( PLGCOMPRESSION, plgcompression )
217 #define PLGDEV7 FNAME( PLGDEV7, plgdev7 )
218 #define PLGDIDEV FNAME( PLGDIDEV, plgdidev )
219 #define PLGDIORI FNAME( PLGDIORI, plgdiori )
220 #define PLGDIPLT FNAME( PLGDIPLT, plgdiplt )
221 #define PLGETCURSOR FNAME( PLGETCURSOR, plgetcursor )
222 #define PLGFAM FNAME( PLGFAM, plgfam )
223 #define PLGFCI FNAME( PLGFCI, plgfci )
224 #define PLGFNAM7 FNAME( PLGFNAM7, plgfnam7 )
225 #define PLGFONT FNAME( PLGFONT, plgfont )
226 #define PLGLEVEL FNAME( PLGLEVEL, plglevel )
227 #define PLGPAGE FNAME( PLGPAGE, plgpage )
228 #define PLGRA FNAME( PLGRA, plgra )
229 #define PLGRADIENT FNAME( PLGRADIENTF95, plgradientf95 )
230 #define PLGRIDDATA FNAME( PLGRIDDATAF95, plgriddataf95 )
231 #define PLGSPA FNAME( PLGSPA, plgspa )
232 #define PLGSTRM FNAME( PLGSTRM, plgstrm )
233 #define PLGVER7 FNAME( PLGVER7, plgver7 )
234 #define PLGVPD FNAME( PLGVPD, plgvpd )
235 #define PLGVPW FNAME( PLGVPW, plgvpw )
236 #define PLGXAX FNAME( PLGXAX, plgxax )
237 #define PLGYAX FNAME( PLGYAX, plgyax )
238 #define PLGZAX FNAME( PLGZAX, plgzax )
239 #define PLHIST FNAME( PLHISTF95, plhistf95 )
240 #define PLHLSRGB FNAME( PLHLSRGB, plhlsrgb )
241 #define PLIMAGE FNAME( PLIMAGEF95, plimagef95 )
242 #define PLIMAGEFR07 FNAME( PLIMAGEFR07, plimagefr07 )
243 #define PLIMAGEFR17 FNAME( PLIMAGEFR17, plimagefr17 )
244 #define PLIMAGEFR27 FNAME( PLIMAGEFR27, plimagefr27 )
245 #define PLIMAGEFR7 FNAME( PLIMAGEFR7, plimagefr7 )
246 #define PLINIT FNAME( PLINIT, plinit )
247 #define PLJOIN FNAME( PLJOIN, pljoin )
248 #define PLLAB7 FNAME( PLLAB7, pllab7 )
249 #define PLLEGEND_CNV_TEXT FNAME( PLLEGEND07_CNV_TEXT, pllegend07_cnv_text )
250 #define PLLEGEND FNAME( PLLEGEND07, pllegend07 )
251 #define PLLIGHTSOURCE FNAME( PLLIGHTSOURCE, pllightsource )
252 #define PLLINE FNAME( PLLINEF95, pllinef95 )
253 #define PLLINE3 FNAME( PLLINE3F95, plline3f95 )
254 #define PLLSTY FNAME( PLLSTY, pllsty )
255 #define PLMAP7 FNAME( PLMAP7, plmap7 )
256 #define PLMERIDIANS7 FNAME( PLMERIDIANS7, plmeridians7 )
257 #define PLMESH FNAME( PLMESHF95, plmeshf95 )
258 #define PLMESHC FNAME( PLMESHCF95, plmeshcf95 )
259 #define PLMKSTRM FNAME( PLMKSTRM, plmkstrm )
260 #define PLMTEX7 FNAME( PLMTEX7, plmtex7 )
261 #define PLMTEX37 FNAME( PLMTEX37, plmtex37 )
262 #define PLOT3D FNAME( PLOT3DF95, plot3df95 )
263 #define PLOT3DC FNAME( PLOT3DCF95, plot3dcf95 )
264
265 #if STUB_LINKAGE == STUB_STDCALL || STUB_LINKAGE == STUB_FORTRAN
266 #define CALL_PLOT3DC PLOT3DCF95
267 #elif STUB_LINKAGE == STUB_LAU
268 #define CALL_PLOT3DC plot3dcf95_
269 #else
270 #define CALL_PLOT3DC PLOT3DC
271 #endif
272
273 #define PLPARSEOPTS7 FNAME( PLPARSEOPTS7, plparseopts7 )
274 #define PLPAT FNAME( PLPAT, plpat )
275 #define PLPATH FNAME( PLPATH, plpath )
276 #define PLPOIN FNAME( PLPOINF95, plpoinf95 )
277 #define PLPOIN3 FNAME( PLPOIN3F95, plpoin3f95 )
278 #define PLPOLY3 FNAME( PLPOLY3F95, plpoly3f95 )
279 #define PLPREC FNAME( PLPREC, plprec )
280 #define PLPSTY FNAME( PLPSTY, plpsty )
281 #define PLPTEX7 FNAME( PLPTEX7, plptex7 )
282 #define PLPTEX37 FNAME( PLPTEX37, plptex37 )
283 #define PLRANDD FNAME( PLRANDDF95, plranddf95 )
284 #define PLREPLOT FNAME( PLREPLOT, plreplot )
285 #define PLRGBHLS FNAME( PLRGBHLS, plrgbhls )
286 #define PLSCHR FNAME( PLSCHR, plschr )
287 #define PLSCMAP0 FNAME( PLSCMAP0F95, plscmap0f95 )
288 #define PLSCMAP0A FNAME( PLSCMAP0AF95, plscmap0af95 )
289 #define PLSCMAP0N FNAME( PLSCMAP0N, plscmap0n )
290 #define PLSCMAP1 FNAME( PLSCMAP1F95, plscmap1f95 )
291 #define PLSCMAP1A FNAME( PLSCMAP1AF95, plscmap1af95 )
292 #define PLSCMAP1L FNAME( PLSCMAP1LF95, plscmap1lf95 )
293 #define PLSCMAP1L2 FNAME( PLSCMAP1L2F95, plscmap1l2f95 )
294 #define PLSCMAP1LA FNAME( PLSCMAP1LAF95, plscmap1laf95 )
295 #define PLSCMAP1LA2 FNAME( PLSCMAP1LA2F95, plscmap1la2f95 )
296 #define PLSCMAP1N FNAME( PLSCMAP1N, plscmap1n )
297 #define PLSCMAP1_RANGE FNAME( PLSCMAP1_RANGE, plscmap1_range )
298 #define PLSCOL0 FNAME( PLSCOL0, plscol0 )
299 #define PLSCOL0A FNAME( PLSCOL0A, plscol0a )
300 #define PLSCOLBG FNAME( PLSCOLBG, plscolbg )
301 #define PLSCOLBGA FNAME( PLSCOLBGA, plscolbga )
302 #define PLSCOLOR FNAME( PLSCOLOR, plscolor )
303 #define PLSCOMPRESSION FNAME( PLSCOMPRESSION, plscompression )
304 #define PLSDEV7 FNAME( PLSDEV7, plsdev7 )
305 #define PLSDIDEV FNAME( PLSDIDEV, plsdidev )
306 #define PLSDIMAP FNAME( PLSDIMAP, plsdimap )
307 #define PLSDIORI FNAME( PLSDIORI, plsdiori )
308 #define PLSDIPLT FNAME( PLSDIPLT, plsdiplt )
309 #define PLSDIPLZ FNAME( PLSDIPLZ, plsdiplz )
310 #define PLSEED FNAME( PLSEED, plseed )
311 #define PLSESC FNAME( PLSESC, plsesc )
312 #define PLSETOPT7 FNAME( PLSETOPT7, plsetopt7 )
313 #define PLSFAM FNAME( PLSFAM, plsfam )
314 #define PLSFCI FNAME( PLSFCI, plsfci )
315 #define PLSFNAM7 FNAME( PLSFNAM7, plsfnam7 )
316 #define PLSFONT FNAME( PLSFONT, plsfont )
317 #define PLSHADE07 FNAME( PLSHADE07, plshade07 )
318 #define PLSHADE17 FNAME( PLSHADE17, plshade17 )
319 #define PLSHADE27 FNAME( PLSHADE27, plshade27 )
320 #define PLSHADE7 FNAME( PLSHADE7, plshade7 )
321 #define PLSHADES07 FNAME( PLSHADES07, plshades07 )
322 #define PLSHADES17 FNAME( PLSHADES17, plshades17 )
323 #define PLSHADES27 FNAME( PLSHADES27, plshades27 )
324 #define PLSHADES7 FNAME( PLSHADES7, plshades7 )
325 #define PLSLABELFUNC_ON FNAME( PLSLABELFUNC_ON, plslabelfunc_on )
326 #define PLSLABELFUNC_ONa FNAME( PLSLABELFUNC_ON_, plslabelfunc_on_ )
327 #define PLSLABELFUNC_OFF FNAME( PLSLABELFUNC_OFF, plslabelfunc_off )
328 #define PLSLABELFUNC_OFFa FNAME( PLSLABELFUNC_OFF_, plslabelfunc_off_ )
329 #define PLSLABELFUNC_NONE FNAME( PLSLABELFUNC_NONE, plslabelfunc_none )
330 #define PLSLABELFUNC_NONEa FNAME( PLSLABELFUNC_NONE_, plslabelfunc_none_ )
331 #define PLSMAJ FNAME( PLSMAJ, plsmaj )
332 #define PLSMEM FNAME( PLSMEM, plsmem )
333 #define PLSMEMA FNAME( PLSMEMA, plsmema )
334 #define PLSMIN FNAME( PLSMIN, plsmin )
335 #define PLSORI FNAME( PLSORI, plsori )
336 #define PLSPAGE FNAME( PLSPAGE, plspage )
337 #define PLSPAL07 FNAME( PLSPAL07, plspal07 )
338 #define PLSPAL17 FNAME( PLSPAL17, plspal17 )
339 #define PLSPAUSE FNAME( PLSPAUSEF95, plspausef95 )
340 #define PLSSTRM FNAME( PLSSTRM, plsstrm )
341 #define PLSSUB FNAME( PLSSUB, plssub )
342 #define PLSSYM FNAME( PLSSYM, plssym )
343 #define PLSTAR FNAME( PLSTAR, plstar )
344 #define PLSTART7 FNAME( PLSTART7, plstart7 )
345 #define PLSTRANSFORM1 FNAME( PLSTRANSFORM1, plstransform1 )
346 #define PLSTRANSFORM2 FNAME( PLSTRANSFORM2, plstransform2 )
347 #define PLSTRANSFORM3 FNAME( PLSTRANSFORM3, plstransform3 )
348 #define PLSTRING7 FNAME( PLSTRING7, plstring7 )
349 #define PLSTRING37 FNAME( PLSTRING37, plstring37 )
350 #define PLSTRIPA FNAME( PLSTRIPA, plstripa )
351 #define PLSTRIPC FNAME( PLSTRIPCF95, plstripcf95 )
352 #define PLSTRIPD FNAME( PLSTRIPD, plstripd )
353 #define PLSTYL FNAME( PLSTYL, plstyl )
354 #define PLSURF3D FNAME( PLSURF3DF95, plsurf3df95 )
355 #define PLSVECT1 FNAME( PLSVECT1F95, plsvect1f95 )
356 #define PLSVECT2 FNAME( PLSVECT2, plsvect2 )
357 #define PLSVPA FNAME( PLSVPA, plsvpa )
358 #define PLSXAX FNAME( PLSXAX, plsxax )
359 #define PLSYAX FNAME( PLSYAX, plsyax )
360 #define PLSYM FNAME( PLSYMF95, plsymf95 )
361 #define PLSZAX FNAME( PLSZAX, plszax )
362 #define PLTEXT FNAME( PLTEXT, pltext )
363 #define PLTIMEFMT7 FNAME( PLTIMEFMT7, pltimefmt7 )
364 #define PLVASP FNAME( PLVASP, plvasp )
365 #define PLVEC07 FNAME( PLVEC07, plvec07 )
366 #define PLVEC17 FNAME( PLVEC17, plvec17 )
367 #define PLVEC27 FNAME( PLVEC27, plvec27 )
368 #define PLVECT7 FNAME( PLVECT7, plvect7 )
369 #define PLVPAS FNAME( PLVPAS, plvpas )
370 #define PLVPOR FNAME( PLVPOR, plvpor )
371 #define PLVSTA FNAME( PLVSTA, plvsta )
372 #define PLW3D FNAME( PLW3D, plw3d )
373 #define PLWIDTH FNAME( PLWIDTH, plwidth )
374 #define PLWIND FNAME( PLWIND, plwind )
375 #define PLXORMOD FNAME( PLXORMODF95, plxormodf95 )
376
377 #ifdef PL_DEPRECATE
378 #define PLRGB FNAME( PLRGB, plrgb )
379 #define PLRGB1 FNAME( PLRGB1, plrgb1 )
380 #define PLHLS FNAME( PLHLS, plhls )
381 #endif // PL_DEPRECATED
382
383 #endif // __PLSTUBS_H__