PLplot  5.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
scstubs.c
Go to the documentation of this file.
1 // $Id: scstubs.c 12827 2013-12-09 13:20:01Z andrewross $
2 //
3 // C stub routines.
4 //
5 // Copyright (C) 2004 Alan W. Irwin
6 //
7 // This file is part of PLplot.
8 //
9 // PLplot is free software; you can redistribute it and/or modify
10 // it under the terms of the GNU Library General Public License as published
11 // by the Free Software Foundation; either version 2 of the License, or
12 // (at your option) any later version.
13 //
14 // PLplot is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 // GNU Library General Public License for more details.
18 //
19 // You should have received a copy of the GNU Library General Public License
20 // along with PLplot; if not, write to the Free Software
21 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 //
23 //
24 // The stubs contained here are the ones that are relatively simple,
25 // i.e. involving only a call convention change or integer-to-string
26 // conversion. Exceptions are plparseopts and plstripc which have
27 // a few more complications in them.
28 //
29 
30 #include "plstubs.h"
31 
32 #ifdef CVF
33 #define STDCALL __stdcall
34 #else
35 #define STDCALL
36 #endif
37 static void ( STDCALL *plmapform )( PLINT *, PLFLT *, PLFLT * ); // Note: slightly different prototype than
38  // (*mapform)!
39 // Slightly different to (*label_func) as we don't support PLPointer for
40 // additional data in f95.
41 // Note the hidden argument!
42 static void ( STDCALL *pllabelfunc )( PLINT *, PLFLT *, char *, PLINT *, PLINT );
43 
44 // Slightly different to C version as we don't support PLPointer for additional data
45 static void ( STDCALL *pltransform )( PLFLT *, PLFLT *, PLFLT *, PLFLT * );
46 
47 
48 static char **pllegend_text;
49 static char **pllegend_symbols;
50 static char **plcolorbar_labels;
51 static char **plcolorbar_axisopts;
52 
53 // Function prototypes
54 static void pltransformf2c( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer data );
55 void PL_SETCONTLABELFORMAT( PLINT *lexp, PLINT *sigdig );
56 void PL_SETCONTLABELFORMATa( PLINT *lexp, PLINT *sigdig );
57 void PL_SETCONTLABELPARAM( PLFLT *offset, PLFLT *size, PLFLT *spacing, PLINT *active );
58 void PL_SETCONTLABELPARAMa( PLFLT *offset, PLFLT *size, PLFLT *spacing, PLINT *active );
59 void PLABORT7( const char *text );
60 void PLADV( PLINT *sub );
61 void PLARC( PLFLT *x, PLFLT *y, PLFLT *a, PLFLT *b, PLFLT *angle1, PLFLT *angle2, PLFLT *rotate, PLBOOL *fill );
62 void PLAXES7( PLFLT *x0, PLFLT *y0, const char *xopt, PLFLT *xtick,
63  PLINT *nxsub, const char *yopt, PLFLT *ytick, PLINT *nysub );
64 void PLBIN( PLINT *nbin, PLFLT *x, PLFLT *y, PLINT *center );
65 void PLBTIME( PLINT *year, PLINT *month, PLINT *day, PLINT *hour, PLINT *min, PLFLT *sec, PLFLT *ctime );
66 void PLBOP( void );
67 void PLBOX7( const char *xopt, PLFLT *xtick, PLINT *nxsub,
68  const char *yopt, PLFLT *ytick, PLINT *nysub );
69 void PLBOX37( const char *xopt, const char *xlabel, PLFLT *xtick, PLINT *nxsub,
70  const char *yopt, const char *ylabel, PLFLT *ytick, PLINT *nysub,
71  const char *zopt, const char *zlabel, PLFLT *ztick, PLINT *nzsub );
72 void PLCALC_WORLD( PLFLT *rx, PLFLT *ry, PLFLT *wx, PLFLT *wy, PLINT *window );
73 void PLCALC_WORLDa( PLFLT *rx, PLFLT *ry, PLFLT *wx, PLFLT *wy, PLINT *window );
74 void PLCLEAR( void );
75 void PLCOL0( PLINT *icol );
76 void PLCOL1( PLFLT *col );
77 void PLCOLORBAR( PLFLT *p_colorbar_width, PLFLT *p_colorbar_height,
83  PLINT *n_labels, const PLINT *label_opts,
84  PLINT *n_axes,
85  const PLFLT *ticks, const PLINT *sub_ticks,
86  const PLINT *n_values, const PLFLT *values );
87 void PLCONFIGTIME( PLFLT *scale, PLFLT *offset1, PLFLT *offset2, PLINT *ccontrol, PLBOOL *ifbtime_offset, PLINT *year, PLINT *month, PLINT *day, PLINT *hour, PLINT *min, PLFLT *sec );
88 void PLCPSTRM( PLINT *iplsr, PLBOOL *flags );
89 void PLCTIME( PLINT *year, PLINT *month, PLINT *day, PLINT *hour, PLINT *min, PLFLT *sec, PLFLT *ctime );
90 void PLEND( void );
91 void PLEND1( void );
92 void PLENV( PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLINT *just, PLINT *axis );
93 void PLENV0( PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLINT *just, PLINT *axis );
94 void PLEOP( void );
95 void PLERRX( PLINT *n, PLFLT *xmin, PLFLT *xmax, PLFLT *y );
96 void PLERRY( PLINT *n, PLFLT *x, PLFLT *ymin, PLFLT *ymax );
97 void PLFAMADV( void );
98 void PLFILL( PLINT *n, PLFLT *x, PLFLT *y );
99 void PLFILL3( PLINT *n, PLFLT *x, PLFLT *y, PLFLT *z );
100 void PLFLUSH( void );
101 void PLFONT( PLINT *font );
102 void PLFONTLD( PLINT *charset );
103 void PLGCHR( PLFLT *chrdef, PLFLT *chrht );
104 void PLGCOL0( PLINT *icol0, PLINT *r, PLINT *g, PLINT *b );
105 void PLGCOL0A( PLINT *icol0, PLINT *r, PLINT *g, PLINT *b, PLFLT *a );
106 void PLGCOLBG( PLINT *r, PLINT *g, PLINT *b );
107 void PLGCOLBGA( PLINT *r, PLINT *g, PLINT *b, PLFLT *a );
108 void PLGCOMPRESSION( PLINT *compression );
109 void PLGCMAP1_RANGE( PLFLT *min_color, PLFLT *max_color );
110 void PLGDEV7( char *dev, int length );
111 void PLGDIDEV( PLFLT *p_mar, PLFLT *p_aspect, PLFLT *p_jx, PLFLT *p_jy );
112 void PLGDIORI( PLFLT *p_rot );
113 void PLGDIPLT( PLFLT *p_xmin, PLFLT *p_ymin, PLFLT *p_xmax, PLFLT *p_ymax );
114 void PLGETCURSOR( PLGraphicsIn *gin );
115 void PLGFAM( PLINT *fam, PLINT *num, PLINT *bmax );
116 void PLGFCI( PLUNICODE *pfci );
117 void PLGFNAM7( char *fnam, int length );
118 void PLGFONT( PLINT *family, PLINT *style, PLINT *weight );
119 void PLGLEVEL( PLINT *level );
120 void PLGPAGE( PLFLT *xpmm, PLFLT *ypmm, PLINT *xwid, PLINT *ywid, PLINT *xoff, PLINT *yoff );
121 void PLGRA( void );
122 void PLGRADIENT( PLINT *n, PLFLT *x, PLFLT *y, PLFLT *angle );
123 void PLGSPA( PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax );
124 void PLGSTRM( PLINT *strm );
125 void PLGVER7( char *ver );
126 void PLGVPD( PLFLT *p_xmin, PLFLT *p_xmax, PLFLT *p_ymin, PLFLT *p_ymax );
127 void PLGVPW( PLFLT *p_xmin, PLFLT *p_xmax, PLFLT *p_ymin, PLFLT *p_ymax );
128 void PLGXAX( PLINT *digmax, PLINT *digits );
129 void PLGYAX( PLINT *digmax, PLINT *digits );
130 void PLGZAX( PLINT *digmax, PLINT *digits );
131 void PLHIST( PLINT *n, PLFLT *data, PLFLT *datmin, PLFLT *datmax, PLINT *nbin, PLINT *oldwin );
132 void PLHLS( PLFLT *hue, PLFLT *light, PLFLT *sat );
133 void PLHLSRGB( PLFLT *h, PLFLT *l, PLFLT *s, PLFLT *r, PLFLT *g, PLFLT *b );
134 void PLIMAGEFR( PLFLT *idata, PLINT *nx, PLINT *ny,
135  PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLFLT *zmin, PLFLT *zmax,
136  PLFLT *Dxmin, PLFLT *Dxmax, PLFLT *Dymin, PLFLT *Dymax,
137  PLFLT *valuemin, PLFLT *valuemax );
138 void PLIMAGE( PLFLT *idata, PLINT *nx, PLINT *ny,
139  PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLFLT *zmin, PLFLT *zmax,
140  PLFLT *Dxmin, PLFLT *Dxmax, PLFLT *Dymin, PLFLT *Dymax );
141 void PLINIT( void );
142 void PLJOIN( PLFLT *x1, PLFLT *y1, PLFLT *x2, PLFLT *y2 );
143 void PLLAB7( const char *xlab, const char *ylab, const char *title );
144 void PLLEGEND_CNV_TEXT( PLINT *id, PLINT *number, char *string, PLINT length );
145 void PLLEGEND( PLFLT *p_legend_width, PLFLT *p_legend_height,
146  PLINT *opt, PLINT *position, PLFLT *x, PLFLT *y, PLFLT *plot_width,
148  PLINT *nrow, PLINT *ncolumn,
149  PLINT *nlegend, const PLINT *opt_array,
150  PLFLT *text_offset, PLFLT *text_scale, PLFLT *text_spacing,
151  PLFLT *text_justification,
152  const PLINT *text_colors,
153  const PLINT *box_colors, const PLINT *box_patterns,
154  const PLFLT *box_scales, const PLFLT *box_line_widths,
155  const PLINT *line_colors, const PLINT *line_styles,
156  const PLFLT *line_widths,
157  const PLINT *symbol_colors, const PLFLT *symbol_scales,
158  const PLINT *symbol_numbers );
159 void PLLIGHTSOURCE( PLFLT *x, PLFLT *y, PLFLT *z );
160 void PLLINE( PLINT *n, PLFLT *x, PLFLT *y );
161 void PLLINE3( PLINT *n, PLFLT *x, PLFLT *y, PLFLT *z );
162 void PLLSTY( PLINT *lin );
163 void PLMAP7( const char *type,
164  PLFLT *minlong, PLFLT *maxlong, PLFLT *minlat, PLFLT *maxlat );
165 void PLMERIDIANS7( PLFLT *dlong, PLFLT *dlat,
166  PLFLT *minlong, PLFLT *maxlong, PLFLT *minlat, PLFLT *maxlat );
167 void PLMKSTRM( PLINT *p_strm );
168 void PLMTEX7( const char *side, PLFLT *disp, PLFLT *pos, PLFLT *just, const char *text );
169 void PLMTEX37( const char *side, PLFLT *disp, PLFLT *pos, PLFLT *just, const char *text );
170 void PLPARSEOPTS7( int *numargs, const char *iargs, PLINT *mode, PLINT *maxindex );
171 void PLPAT( PLINT *nlin, PLINT *inc, PLINT *del );
172 void PLPATH( PLINT *n, PLFLT *x1, PLFLT *y1, PLFLT *x2, PLFLT *y2 );
173 void PLPOIN( PLINT *n, PLFLT *x, PLFLT *y, PLINT *code );
174 void PLPOIN3( PLINT *n, PLFLT *x, PLFLT *y, PLFLT *z, PLINT *code );
175 void PLPOLY3( PLINT *n, PLFLT *x, PLFLT *y, PLFLT *z, PLBOOL *draw, PLBOOL *ifcc );
176 void PLPREC( PLINT *setp, PLINT *prec );
177 void PLPSTY( PLINT *patt );
178 void PLPTEX7( PLFLT *x, PLFLT *y, PLFLT *dx, PLFLT *dy, PLFLT *just, const char *text );
179 void PLPTEX37( PLFLT *x, PLFLT *y, PLFLT *z,
180  PLFLT *dx, PLFLT *dy, PLFLT *dz,
181  PLFLT *sx, PLFLT *sy, PLFLT *sz,
182  PLFLT *just, const char *text );
183 PLFLT PLRANDD( void );
184 void PLREPLOT( void );
185 void PLRGB( PLFLT *red, PLFLT *green, PLFLT *blue );
186 void PLRGB1( PLINT *r, PLINT *g, PLINT *b );
187 void PLRGBHLS( PLFLT *r, PLFLT *g, PLFLT *b, PLFLT *h, PLFLT *l, PLFLT *s );
188 void PLSCHR( PLFLT *def, PLFLT *scale );
189 void PLSCMAP0( PLINT *r, PLINT *g, PLINT *b, PLINT *ncol0 );
190 void PLSCMAP0A( PLINT *r, PLINT *g, PLINT *b, PLFLT *a, PLINT *ncol0 );
191 void PLSCMAP0N( PLINT *n );
192 void PLSCMAP1( PLINT *r, PLINT *g, PLINT *b, PLINT *ncol1 );
193 void PLSCMAP1A( PLINT *r, PLINT *g, PLINT *b, PLFLT *a, PLINT *ncol1 );
194 void PLSCMAP1L( PLBOOL *itype, PLINT *npts, PLFLT *intensity,
195  PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLBOOL *alt_hue_path );
196 void PLSCMAP1L2( PLBOOL *itype, PLINT *npts, PLFLT *intensity,
197  PLFLT *coord1, PLFLT *coord2, PLFLT *coord3 );
198 void PLSCMAP1LA( PLBOOL *itype, PLINT *npts, PLFLT *intensity,
199  PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLFLT *a, PLBOOL *alt_hue_path );
200 void PLSCMAP1LA2( PLBOOL *itype, PLINT *npts, PLFLT *intensity,
201  PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLFLT *a );
202 void PLSCMAP1N( PLINT *n );
203 void PLSCMAP1_RANGE( PLFLT *min_color, PLFLT *max_color );
204 void PLSCOL0( PLINT *icol0, PLINT *r, PLINT *g, PLINT *b );
205 void PLSCOL0A( PLINT *icol0, PLINT *r, PLINT *g, PLINT *b, PLFLT *a );
206 void PLSCOLBG( PLINT *r, PLINT *g, PLINT *b );
207 void PLSCOLBGA( PLINT *r, PLINT *g, PLINT *b, PLFLT *a );
208 void PLSCOLOR( PLINT *color );
209 void PLSCOMPRESSION( PLINT *compression );
210 void PLSDEV7( const char *dev );
211 void PLSDIDEV( PLFLT *mar, PLFLT *aspect, PLFLT *jx, PLFLT *jy );
212 void PLSDIMAP( PLINT *dimxmin, PLINT *dimxmax, PLINT *dimymin, PLINT *dimymax,
213  PLFLT *dimxpmm, PLFLT *dimypmm );
214 void PLSDIORI( PLFLT *rot );
215 void PLSDIPLT( PLFLT *xmin, PLFLT *ymin, PLFLT *xmax, PLFLT *ymax );
216 void PLSDIPLZ( PLFLT *xmin, PLFLT *ymin, PLFLT *xmax, PLFLT *ymax );
217 void PLSEED( unsigned int *s );
218 void PLSESC( PLINT *esc );
219 void PLSETOPT7( const char *opt, const char *optarg );
220 void PLSFAM( PLINT *fam, PLINT *num, PLINT *bmax );
221 void PLSFCI( PLUNICODE *fci );
222 void PLSFNAM7( const char *fnam );
223 void PLSFONT( PLINT *family, PLINT *style, PLINT *weight );
224 void PLSLABELFUNC_ON( void ( STDCALL *labelfunc )( PLINT *, PLFLT *, char *, PLINT *, PLINT ) );
225 void PLSLABELFUNC_ONa( void ( STDCALL *labelfunc )( PLINT *, PLFLT *, char *, PLINT *, PLINT ) );
226 void PLSLABELFUNC_OFF( PLINT *dummy );
227 void PLSLABELFUNC_OFFa( PLINT *dummy );
228 void PLSLABELFUNC_NONE( void );
229 void PLSLABELFUNC_NONEa( void );
230 void PLSMAJ( PLFLT *def, PLFLT *scale );
231 void PLSMEM( PLINT *maxx, PLINT *maxy, void *plotmem );
232 void PLSMEMA( PLINT *maxx, PLINT *maxy, void *plotmem );
233 void PLSMIN( PLFLT *def, PLFLT *scale );
234 void PLSORI( PLINT *ori );
235 void PLSPAGE( PLFLT *xpmm, PLFLT *ypmm,
236  PLINT *xwid, PLINT *ywid, PLINT *xoff, PLINT *yoff );
237 void PLSPAL07( const char *filename );
238 void PLSPAL17( const char *filename, PLBOOL *interpolate );
239 void PLSPAUSE( PLBOOL *pause );
240 void PLSSTRM( PLINT *strm );
241 void PLSSUB( PLINT *nx, PLINT *ny );
242 void PLSSYM( PLFLT *def, PLFLT *scale );
243 void PLSTAR( PLINT *nx, PLINT *ny );
244 void PLSTART7( const char *devname, PLINT *nx, PLINT *ny );
245 void PLSTRANSFORM1( void ( STDCALL *transformfunc )( PLFLT *, PLFLT *, PLFLT *, PLFLT * ) );
246 void PLSTRANSFORM2( PLINT *dummy );
247 void PLSTRANSFORM3( void );
248 void PLSTRING7( PLINT *n, PLFLT *x, PLFLT *y, const char *string );
249 void PLSTRING37( PLINT *n, PLFLT *x, PLFLT *y, PLFLT *z, const char *string );
250 void PLSTRIPA( PLINT *id, PLINT *pen, PLFLT *x, PLFLT *y );
251 void PLSTRIPC( PLINT *id, const char *xspec, const char *yspec,
252  PLFLT *xmin, PLFLT *xmax, PLFLT *xjump, PLFLT *ymin, PLFLT *ymax,
253  PLFLT *xlpos, PLFLT *ylpos,
254  PLBOOL *y_ascl, PLBOOL *acc,
255  PLINT *colbox, PLINT *collab,
256  PLINT *colline, PLINT *styline,
257  const char *legline0, const char *legline1,
258  const char *legline2, const char *legline3,
259  const char *labx, const char *laby, const char *labtop );
260 void PLSTRIPD( PLINT *id );
261 void PLSTYL( PLINT *n, PLINT *mark, PLINT *space );
262 void PLSVECT1( PLFLT *arrowx, PLFLT *arrowy, PLINT *npts, PLBOOL *fill );
263 void PLSVECT2( void );
264 void PLSVPA( PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax );
265 void PLSXAX( PLINT *digmax, PLINT *digits );
266 void PLSYAX( PLINT *digmax, PLINT *digits );
267 void PLSYM( PLINT *n, PLFLT *x, PLFLT *y, PLINT *code );
268 void PLSZAX( PLINT *digmax, PLINT *digits );
269 void PLTEXT( void );
270 void PLTIMEFMT7( const char *fmt );
271 void PLVASP( PLFLT *aspect );
272 void PLVPAS( PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLFLT *aspect );
273 void PLVPOR( PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax );
274 void PLVSTA( void );
275 void PLW3D( PLFLT *basex, PLFLT *basey, PLFLT *height,
277  PLFLT *zmin, PLFLT *zmax,
278  PLFLT *alt, PLFLT *az );
279 void PLWIDTH( PLFLT *width );
280 void PLWIND( PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax );
281 void PLXORMOD( PLBOOL *mode, PLBOOL *status );
282 
283 static void
285 {
286  ( *pltransform )( &x, &y, tx, ty );
287 }
288 
289 void
291 {
292  c_pl_setcontlabelformat( *lexp, *sigdig );
293 }
294 
295 void
297 {
298  c_pl_setcontlabelformat( *lexp, *sigdig );
299 }
300 
301 void
302 PL_SETCONTLABELPARAM( PLFLT *offset, PLFLT *size, PLFLT *spacing, PLINT *active )
303 {
304  c_pl_setcontlabelparam( *offset, *size, *spacing, *active );
305 }
306 
307 void
308 PL_SETCONTLABELPARAMa( PLFLT *offset, PLFLT *size, PLFLT *spacing, PLINT *active )
309 {
310  c_pl_setcontlabelparam( *offset, *size, *spacing, *active );
311 }
312 
313 void
314 PLABORT7( const char *text )
315 {
316  plabort( text );
317 }
318 
319 void
320 PLADV( PLINT *sub )
321 {
322  c_pladv( *sub );
323 }
324 
325 void
326 PLARC( PLFLT *x, PLFLT *y, PLFLT *a, PLFLT *b, PLFLT *angle1, PLFLT *angle2, PLFLT *rotate, PLBOOL *fill )
327 {
328  c_plarc( *x, *y, *a, *b, *angle1, *angle2, *rotate, *fill );
329 }
330 
331 void
332 PLAXES7( PLFLT *x0, PLFLT *y0, const char *xopt, PLFLT *xtick,
333  PLINT *nxsub, const char *yopt, PLFLT *ytick, PLINT *nysub )
334 {
335  c_plaxes( *x0, *y0, xopt, *xtick, *nxsub, yopt, *ytick, *nysub );
336 }
337 
338 void
339 PLBIN( PLINT *nbin, PLFLT *x, PLFLT *y, PLINT *center )
340 {
341  c_plbin( *nbin, x, y, *center );
342 }
343 
344 void
345 PLBTIME( PLINT *year, PLINT *month, PLINT *day, PLINT *hour, PLINT *min, PLFLT *sec, PLFLT *ctime )
346 {
347  c_plbtime( year, month, day, hour, min, sec, *ctime );
348 }
349 
350 void
351 PLBOP( void )
352 {
353  c_plbop();
354 }
355 
356 void
357 PLBOX7( const char *xopt, PLFLT *xtick, PLINT *nxsub,
358  const char *yopt, PLFLT *ytick, PLINT *nysub )
359 {
360  c_plbox( xopt, *xtick, *nxsub, yopt, *ytick, *nysub );
361 }
362 
363 void
364 PLBOX37( const char *xopt, const char *xlabel, PLFLT *xtick, PLINT *nxsub,
365  const char *yopt, const char *ylabel, PLFLT *ytick, PLINT *nysub,
366  const char *zopt, const char *zlabel, PLFLT *ztick, PLINT *nzsub )
367 {
368  c_plbox3( xopt, xlabel, *xtick, *nxsub,
369  yopt, ylabel, *ytick, *nysub,
370  zopt, zlabel, *ztick, *nzsub );
371 }
372 
373 void
374 PLCALC_WORLD( PLFLT *rx, PLFLT *ry, PLFLT *wx, PLFLT *wy, PLINT *window )
375 {
376  c_plcalc_world( *rx, *ry, wx, wy, window );
377 }
378 
379 void
380 PLCALC_WORLDa( PLFLT *rx, PLFLT *ry, PLFLT *wx, PLFLT *wy, PLINT *window )
381 {
382  c_plcalc_world( *rx, *ry, wx, wy, window );
383 }
384 
385 void
386 PLCLEAR( void )
387 {
388  c_plclear();
389 }
390 
391 void
392 PLCOL0( PLINT *icol )
393 {
394  c_plcol0( *icol );
395 }
396 
397 void
398 PLCOL1( PLFLT *col )
399 {
400  c_plcol1( *col );
401 }
402 
403 void
405  PLINT *opt, PLINT *position, PLFLT *x, PLFLT *y,
410  PLINT *n_labels, const PLINT *label_opts,
411  PLINT *n_axes,
412  const PLFLT *ticks, const PLINT *sub_ticks,
413  const PLINT *n_values, const PLFLT *values )
414 {
415  // Need to allocate 2d C array for values
416  PLFLT **a;
417  int i, j;
418 
419  a = (PLFLT **) malloc( sizeof ( PLFLT * ) * (size_t) ( *n_axes ) );
420  for ( i = 0; i < *n_axes; i++ )
421  {
422  a[i] = (PLFLT *) malloc( sizeof ( PLFLT ) * (size_t) n_values[i] );
423  for ( j = 0; j < n_values[i]; j++ )
424  {
425  a[i][j] = values[i + j * ( *n_axes )];
426  }
427  }
428 
429  c_plcolorbar( p_colorbar_width, p_colorbar_height,
430  *opt, *position, *x, *y,
431  *x_length, *y_length,
432  *bg_color, *bb_color, *bb_style,
433  *low_cap_color, *high_cap_color,
434  *cont_color, *cont_width,
435  *n_labels, label_opts, (const char * const *) plcolorbar_labels,
436  *n_axes, (const char * const *) plcolorbar_axisopts,
437  ticks, sub_ticks,
438  n_values, (const PLFLT * const *) a );
439  free( *plcolorbar_labels );
440  free( plcolorbar_labels );
441  free( *plcolorbar_axisopts );
442  free( plcolorbar_axisopts );
443  for ( i = 0; i < *n_axes; i++ )
444  {
445  free( a[i] );
446  }
447  free( a );
448 }
449 
450 void
451 PLCONFIGTIME( PLFLT *scale, PLFLT *offset1, PLFLT *offset2, PLINT *ccontrol, PLBOOL *ifbtime_offset, PLINT *year, PLINT *month, PLINT *day, PLINT *hour, PLINT *min, PLFLT *sec )
452 {
453  c_plconfigtime( *scale, *offset1, *offset2, *ccontrol, *ifbtime_offset, *year, *month, *day, *hour, *min, *sec );
454 }
455 
456 void
457 PLCPSTRM( PLINT *iplsr, PLBOOL *flags )
458 {
459  c_plcpstrm( *iplsr, *flags );
460 }
461 
462 void
463 PLCTIME( PLINT *year, PLINT *month, PLINT *day, PLINT *hour, PLINT *min, PLFLT *sec, PLFLT *ctime )
464 {
465  c_plctime( *year, *month, *day, *hour, *min, *sec, ctime );
466 }
467 
468 void
469 PLEND( void )
470 {
471  c_plend();
472 }
473 
474 void
475 PLEND1( void )
476 {
477  c_plend1();
478 }
479 
480 void
482  PLINT *just, PLINT *axis )
483 {
484  c_plenv( *xmin, *xmax, *ymin, *ymax, *just, *axis );
485 }
486 
487 void
489  PLINT *just, PLINT *axis )
490 {
491  c_plenv0( *xmin, *xmax, *ymin, *ymax, *just, *axis );
492 }
493 
494 void
495 PLEOP( void )
496 {
497  c_pleop();
498 }
499 
500 void
502 {
503  c_plerrx( *n, xmin, xmax, y );
504 }
505 
506 void
508 {
509  c_plerry( *n, x, ymin, ymax );
510 }
511 
512 void
513 PLFAMADV( void )
514 {
515  c_plfamadv();
516 }
517 
518 void
519 PLFILL( PLINT *n, PLFLT *x, PLFLT *y )
520 {
521  c_plfill( *n, x, y );
522 }
523 
524 void
525 PLFILL3( PLINT *n, PLFLT *x, PLFLT *y, PLFLT *z )
526 {
527  c_plfill3( *n, x, y, z );
528 }
529 
530 void
531 PLFLUSH( void )
532 {
533  c_plflush();
534 }
535 
536 void
537 PLFONT( PLINT *font )
538 {
539  c_plfont( *font );
540 }
541 
542 void
543 PLFONTLD( PLINT *charset )
544 {
545  c_plfontld( *charset );
546 }
547 
548 void
549 PLGCHR( PLFLT *chrdef, PLFLT *chrht )
550 {
551  c_plgchr( chrdef, chrht );
552 }
553 
554 void
555 PLGCMAP1_RANGE( PLFLT *min_color, PLFLT *max_color )
556 {
557  c_plgcmap1_range( min_color, max_color );
558 }
559 
560 void
561 PLGCOL0( PLINT *icol0, PLINT *r, PLINT *g, PLINT *b )
562 {
563  c_plgcol0( *icol0, r, g, b );
564 }
565 
566 void
567 PLGCOL0A( PLINT *icol0, PLINT *r, PLINT *g, PLINT *b, PLFLT *a )
568 {
569  c_plgcol0a( *icol0, r, g, b, a );
570 }
571 
572 void
573 PLGCOLBG( PLINT *r, PLINT *g, PLINT *b )
574 {
575  c_plgcolbg( r, g, b );
576 }
577 
578 void
579 PLGCOLBGA( PLINT *r, PLINT *g, PLINT *b, PLFLT *a )
580 {
581  c_plgcolbga( r, g, b, a );
582 }
583 
584 void
585 PLGCOMPRESSION( PLINT *compression )
586 {
587  c_plgcompression( compression );
588 }
589 
590 void
591 PLGDEV7( char *dev, int PL_UNUSED( length ) )
592 {
593  c_plgdev( dev );
594 }
595 
596 void
597 PLGDIDEV( PLFLT *p_mar, PLFLT *p_aspect, PLFLT *p_jx, PLFLT *p_jy )
598 {
599  c_plgdidev( p_mar, p_aspect, p_jx, p_jy );
600 }
601 
602 void
603 PLGDIORI( PLFLT *p_rot )
604 {
605  c_plgdiori( p_rot );
606 }
607 
608 void
609 PLGDIPLT( PLFLT *p_xmin, PLFLT *p_ymin, PLFLT *p_xmax, PLFLT *p_ymax )
610 {
611  c_plgdiplt( p_xmin, p_ymin, p_xmax, p_ymax );
612 }
613 
614 void
616 {
617  plGetCursor( gin );
618 }
619 
620 void
621 PLGFAM( PLINT *fam, PLINT *num, PLINT *bmax )
622 {
623  c_plgfam( fam, num, bmax );
624 }
625 
626 // Note: Fortran does not distinguish between unsigned and signed integers
627 // so the 32-bit PLUNICODE can be mapped to 4-byte Fortran integer outside
628 // this routine.
629 void
630 PLGFCI( PLUNICODE *pfci )
631 {
632  c_plgfci( pfci );
633 }
634 
635 void
636 PLGFNAM7( char *fnam, int PL_UNUSED( length ) )
637 {
638  c_plgfnam( fnam );
639 }
640 
641 void
642 PLGFONT( PLINT *family, PLINT *style, PLINT *weight )
643 {
644  c_plgfont( family, style, weight );
645 }
646 
647 void
648 PLGLEVEL( PLINT *level )
649 {
650  c_plglevel( level );
651 }
652 
653 void
654 PLGPAGE( PLFLT *xpmm, PLFLT *ypmm, PLINT *xwid, PLINT *ywid,
655  PLINT *xoff, PLINT *yoff )
656 {
657  c_plgpage( xpmm, ypmm, xwid, ywid, xoff, yoff );
658 }
659 
660 void
661 PLGRA( void )
662 {
663  c_plgra();
664 }
665 
666 void
667 PLGRADIENT( PLINT *n, PLFLT *x, PLFLT *y, PLFLT *angle )
668 {
669  c_plgradient( *n, x, y, *angle );
670 }
671 
672 // AM - removed: also defined, and better in sccont.c
673 // void
674 // PLGRIDDATA(PLFLT *x, PLFLT *y, PLFLT *z, PLINT *npts,
675 // PLFLT *xg, PLINT *nptsx, PLFLT *yg, PLINT *nptsy,
676 // PLFLT **zg, PLINT *type, PLFLT *data)
677 // {
678 // c_plgriddata(x, y, z, *npts,
679 // xg, *nptsx, yg, *nptsy,
680 // zg, *type, *data);
681 // }
682 //
683 
684 void
686 {
687  c_plgspa( xmin, xmax, ymin, ymax );
688 }
689 
690 void
691 PLGSTRM( PLINT *strm )
692 {
693  c_plgstrm( strm );
694 }
695 
696 void
697 PLGVER7( char *ver )
698 {
699  c_plgver( ver );
700 }
701 
702 void
703 PLGVPD( PLFLT *p_xmin, PLFLT *p_xmax, PLFLT *p_ymin, PLFLT *p_ymax )
704 {
705  c_plgvpd( p_xmin, p_xmax, p_ymin, p_ymax );
706 }
707 
708 void
709 PLGVPW( PLFLT *p_xmin, PLFLT *p_xmax, PLFLT *p_ymin, PLFLT *p_ymax )
710 {
711  c_plgvpw( p_xmin, p_xmax, p_ymin, p_ymax );
712 }
713 
714 void
715 PLGXAX( PLINT *digmax, PLINT *digits )
716 {
717  c_plgxax( digmax, digits );
718 }
719 
720 void
721 PLGYAX( PLINT *digmax, PLINT *digits )
722 {
723  c_plgyax( digmax, digits );
724 }
725 
726 void
727 PLGZAX( PLINT *digmax, PLINT *digits )
728 {
729  c_plgzax( digmax, digits );
730 }
731 
732 void
733 PLHIST( PLINT *n, PLFLT *data, PLFLT *datmin, PLFLT *datmax,
734  PLINT *nbin, PLINT *oldwin )
735 {
736  c_plhist( *n, data, *datmin, *datmax, *nbin, *oldwin );
737 }
738 
739 #ifdef PL_DEPRECATED
740 void
741 PLHLS( PLFLT *hue, PLFLT *light, PLFLT *sat )
742 {
743  c_plhls( *hue, *light, *sat );
744 }
745 #endif // PL_DEPRECATED
746 
747 void
748 PLHLSRGB( PLFLT *h, PLFLT *l, PLFLT *s, PLFLT *r, PLFLT *g, PLFLT *b )
749 {
750  c_plhlsrgb( *h, *l, *s, r, g, b );
751 }
752 
753 #if 0
754 void
755 PLIMAGEFR( PLFLT *idata, PLINT *nx, PLINT *ny,
756  PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLFLT *zmin, PLFLT *zmax,
757  PLFLT *Dxmin, PLFLT *Dxmax, PLFLT *Dymin, PLFLT *Dymax,
758  PLFLT *valuemin, PLFLT *valuemax )
759 {
760  int i, j;
761  PLFLT **pidata;
762 
763  plAlloc2dGrid( &pidata, *nx, *ny );
764 
765  for ( i = 0; i < *nx; i++ )
766  {
767  for ( j = 0; j < *ny; j++ )
768  {
769  pidata[i][j] = idata[i + j * ( *nx )];
770  }
771  }
772 
773  c_plimagefr( (const PLFLT * const *) pidata, *nx, *ny,
774  *xmin, *xmax, *ymin, *ymax, *zmin, *zmax,
775  *Dxmin, *Dxmax, *Dymin, *Dymax,
776  *valuemin, *valuemax );
777 
778  plFree2dGrid( pidata, *nx, *ny );
779 }
780 #endif
781 
782 void
783 PLIMAGE( PLFLT *idata, PLINT *nx, PLINT *ny,
784  PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLFLT *zmin, PLFLT *zmax,
785  PLFLT *Dxmin, PLFLT *Dxmax, PLFLT *Dymin, PLFLT *Dymax )
786 {
787  int i, j;
788  PLFLT **pidata;
789 
790  plAlloc2dGrid( &pidata, *nx, *ny );
791 
792  for ( i = 0; i < *nx; i++ )
793  {
794  for ( j = 0; j < *ny; j++ )
795  {
796  pidata[i][j] = idata[i + j * ( *nx )];
797  }
798  }
799 
800  c_plimage( (const PLFLT * const *) pidata, *nx, *ny,
801  *xmin, *xmax, *ymin, *ymax, *zmin, *zmax,
802  *Dxmin, *Dxmax, *Dymin, *Dymax );
803 
804  plFree2dGrid( pidata, *nx, *ny );
805 }
806 
807 void
808 PLINIT( void )
809 {
810  c_plinit();
811 }
812 
813 void
814 PLJOIN( PLFLT *x1, PLFLT *y1, PLFLT *x2, PLFLT *y2 )
815 {
816  c_pljoin( *x1, *y1, *x2, *y2 );
817 }
818 
819 void
820 PLLAB7( const char *xlab, const char *ylab, const char *title )
821 {
822  c_pllab( xlab, ylab, title );
823 }
824 
825 static void
826 pllabelfuncf2c( PLINT axis, PLFLT value, char *label, PLINT length, PLPointer PL_UNUSED( data ) )
827 {
828  int i;
829 
830  // (AM) Note the hidden argument "length" - it ensures that the string "label"
831  // is recognised to have that length
832  //
833  ( *pllabelfunc )( &axis, &value, label, &length, length );
834 
835  // Ensure string is null terminated
836  i = length - 1;
837  while ( ( i >= 0 ) && ( label[i] == ' ' ) )
838  i--;
839  label[i + 1] = '\0';
840 }
841 
842 // Auxiliary function to create a C-compatible string array
843 // Note the hidden argument
844 void
845 PLLEGEND_CNV_TEXT( PLINT *id, PLINT *number, char *string, PLINT length )
846 {
847  int j;
848  int i;
849  char **p_string;
850  char *data;
851 
852  // Ensure the strings are null terminated
853 
854  p_string = (char **) malloc( sizeof ( char * ) * (size_t) ( *number ) );
855  data = (char *) malloc( sizeof ( char * ) * (size_t) ( ( *number ) * ( length + 1 ) ) );
856 
857  for ( j = 0; j < ( *number ); j++ )
858  {
859  p_string[j] = data + j * ( length + 1 );
860  memcpy( p_string[j], &string[j * length], (size_t) length );
861  p_string[j][length] = '\0';
862  i = length - 1;
863  while ( ( i >= 0 ) && ( p_string[j][i] == ' ' ) )
864  i--;
865  p_string[j][i + 1] = '\0';
866  }
867 
868  switch ( *id )
869  {
870  case 1:
871  pllegend_text = p_string;
872  break;
873  case 2:
874  pllegend_symbols = p_string;
875  break;
876  case 3:
877  plcolorbar_labels = p_string;
878  break;
879  case 4:
880  plcolorbar_axisopts = p_string;
881  break;
882  default:
883  // Unknown
884  free( data );
885  free( p_string );
886  break;
887  }
888 }
889 
890 void PLLEGEND(
891  PLFLT *p_legend_width, PLFLT *p_legend_height,
892  PLINT *opt, PLINT *position, PLFLT *x, PLFLT *y, PLFLT *plot_width,
894  PLINT *nrow, PLINT *ncolumn,
895  PLINT *nlegend, const PLINT *opt_array,
896  PLFLT *text_offset, PLFLT *text_scale, PLFLT *text_spacing,
897  PLFLT *text_justification,
898  const PLINT *text_colors,
899  const PLINT *box_colors, const PLINT *box_patterns,
900  const PLFLT *box_scales, const PLFLT *box_line_widths,
901  const PLINT *line_colors, const PLINT *line_styles,
902  const PLFLT *line_widths,
903  const PLINT *symbol_colors, const PLFLT *symbol_scales,
904  const PLINT *symbol_numbers )
905 {
906  c_pllegend( p_legend_width, p_legend_height,
907  *opt, *position, *x, *y, *plot_width,
908  *bg_color, *bb_color, *bb_style,
909  *nrow, *ncolumn,
910  *nlegend, opt_array,
911  *text_offset, *text_scale, *text_spacing,
912  *text_justification,
913  text_colors, (const char * const *) pllegend_text,
914  box_colors, box_patterns,
915  box_scales, box_line_widths,
916  line_colors, line_styles,
917  line_widths,
918  symbol_colors, symbol_scales,
919  symbol_numbers, (const char * const *) pllegend_symbols );
920 
921  free( *pllegend_text );
922  free( pllegend_text );
923  free( *pllegend_symbols );
924  free( pllegend_symbols );
925 }
926 
927 void
928 PLLIGHTSOURCE( PLFLT *x, PLFLT *y, PLFLT *z )
929 {
930  c_pllightsource( *x, *y, *z );
931 }
932 
933 void
934 PLLINE( PLINT *n, PLFLT *x, PLFLT *y )
935 {
936  c_plline( *n, x, y );
937 }
938 
939 void
940 PLLINE3( PLINT *n, PLFLT *x, PLFLT *y, PLFLT *z )
941 {
942  c_plline3( *n, x, y, z );
943 }
944 
945 void
946 PLLSTY( PLINT *lin )
947 {
948  c_pllsty( *lin );
949 }
950 
951 static void
952 plmapf2c( PLINT n, PLFLT *x, PLFLT *y )
953 {
954  ( *plmapform )( &n, x, y );
955 }
956 
957 void
958 PLMAP7( const char *type,
959  PLFLT *minlong, PLFLT *maxlong, PLFLT *minlat, PLFLT *maxlat )
960 
961 {
962  if ( plmapform )
963  c_plmap( plmapf2c, type, *minlong, *maxlong, *minlat, *maxlat );
964  else
965  c_plmap( NULL, type, *minlong, *maxlong, *minlat, *maxlat );
966 }
967 
968 
969 void
970 PLMERIDIANS7( PLFLT *dlong, PLFLT *dlat,
971  PLFLT *minlong, PLFLT *maxlong, PLFLT *minlat, PLFLT *maxlat )
972 {
973  if ( plmapform )
974  c_plmeridians( plmapf2c, *dlong, *dlat, *minlong, *maxlong, *minlat, *maxlat );
975  else
976  c_plmeridians( NULL, *dlong, *dlat, *minlong, *maxlong, *minlat, *maxlat );
977 }
978 
979 void
980 PLMKSTRM( PLINT *p_strm )
981 {
982  c_plmkstrm( p_strm );
983 }
984 
985 void
986 PLMTEX7( const char *side, PLFLT *disp, PLFLT *pos, PLFLT *just, const char *text )
987 {
988  c_plmtex( side, *disp, *pos, *just, text );
989 }
990 
991 void
992 PLMTEX37( const char *side, PLFLT *disp, PLFLT *pos, PLFLT *just, const char *text )
993 {
994  c_plmtex3( side, *disp, *pos, *just, text );
995 }
996 
997 void
998 PLPARSEOPTS7( int *numargs, const char *iargs, PLINT *mode, PLINT *maxindex )
999 {
1000 // Same as in plparseopts fortran subroutine that calls this one.
1001 #define MAXARGS 20
1002  if ( *numargs <= MAXARGS )
1003  {
1004  const char *argv[MAXARGS];
1005  int i;
1006  for ( i = 0; i < *numargs; i++ )
1007  {
1008  argv[i] = iargs + ( i * *maxindex );
1009 // fprintf(stderr, "%d - %s\n", i, argv[i]);
1010  }
1011  c_plparseopts( numargs, argv, *mode );
1012  }
1013  else
1014  fprintf( stderr, "plparseopts7: numargs too large\n" );
1015 }
1016 
1017 void
1018 PLPAT( PLINT *nlin, PLINT *inc, PLINT *del )
1019 {
1020  c_plpat( *nlin, inc, del );
1021 }
1022 
1023 void
1024 PLPATH( PLINT *n, PLFLT *x1, PLFLT *y1, PLFLT *x2, PLFLT *y2 )
1025 {
1026  c_plpath( *n, *x1, *y1, *x2, *y2 );
1027 }
1028 
1029 void
1030 PLPOIN( PLINT *n, PLFLT *x, PLFLT *y, PLINT *code )
1031 {
1032  c_plpoin( *n, x, y, *code );
1033 }
1034 
1035 void
1036 PLPOIN3( PLINT *n, PLFLT *x, PLFLT *y, PLFLT *z, PLINT *code )
1037 {
1038  c_plpoin3( *n, x, y, z, *code );
1039 }
1040 
1041 void
1042 PLPOLY3( PLINT *n, PLFLT *x, PLFLT *y, PLFLT *z, PLBOOL *draw, PLBOOL *ifcc )
1043 {
1044  c_plpoly3( *n, x, y, z, draw, *ifcc );
1045 }
1046 
1047 void
1048 PLPREC( PLINT *setp, PLINT *prec )
1049 {
1050  c_plprec( *setp, *prec );
1051 }
1052 
1053 void
1054 PLPSTY( PLINT *patt )
1055 {
1056  c_plpsty( *patt );
1057 }
1058 
1059 void
1060 PLPTEX7( PLFLT *x, PLFLT *y, PLFLT *dx, PLFLT *dy, PLFLT *just, const char *text )
1061 {
1062  c_plptex( *x, *y, *dx, *dy, *just, text );
1063 }
1064 
1065 void
1066 PLPTEX37(
1067  PLFLT *x, PLFLT *y, PLFLT *z,
1068  PLFLT *dx, PLFLT *dy, PLFLT *dz,
1069  PLFLT *sx, PLFLT *sy, PLFLT *sz,
1070  PLFLT *just, const char *text )
1071 {
1072  c_plptex3( *x, *y, *z, *dx, *dy, *dz, *sx, *sy, *sz, *just, text );
1073 }
1074 
1075 PLFLT
1076 PLRANDD()
1077 {
1078  return c_plrandd();
1079 }
1080 
1081 void
1082 PLREPLOT( void )
1083 {
1084  c_plreplot();
1085 }
1086 
1087 #ifdef PL_DEPRECATED
1088 void
1089 PLRGB( PLFLT *red, PLFLT *green, PLFLT *blue )
1090 {
1091  c_plrgb( *red, *green, *blue );
1092 }
1093 #endif // PL_DEPRECATED
1094 
1095 #ifdef PL_DEPRECATED
1096 void
1097 PLRGB1( PLINT *r, PLINT *g, PLINT *b )
1098 {
1099  c_plrgb1( *r, *g, *b );
1100 }
1101 #endif // PL_DEPRECATED
1102 
1103 void
1104 PLRGBHLS( PLFLT *r, PLFLT *g, PLFLT *b, PLFLT *h, PLFLT *l, PLFLT *s )
1105 {
1106  c_plrgbhls( *r, *g, *b, h, l, s );
1107 }
1108 
1109 void
1110 PLSCHR( PLFLT *def, PLFLT *scale )
1111 {
1112  c_plschr( *def, *scale );
1113 }
1114 
1115 void
1116 PLSCMAP0( PLINT *r, PLINT *g, PLINT *b, PLINT *ncol0 )
1117 {
1118  c_plscmap0( r, g, b, *ncol0 );
1119 }
1120 
1121 void
1122 PLSCMAP0A( PLINT *r, PLINT *g, PLINT *b, PLFLT *a, PLINT *ncol0 )
1123 {
1124  c_plscmap0a( r, g, b, a, *ncol0 );
1125 }
1126 
1127 void
1128 PLSCMAP0N( PLINT *n )
1129 {
1130  c_plscmap0n( *n );
1131 }
1132 
1133 void
1134 PLSCMAP1( PLINT *r, PLINT *g, PLINT *b, PLINT *ncol1 )
1135 {
1136  c_plscmap1( r, g, b, *ncol1 );
1137 }
1138 
1139 void
1140 PLSCMAP1A( PLINT *r, PLINT *g, PLINT *b, PLFLT *a, PLINT *ncol1 )
1141 {
1142  c_plscmap1a( r, g, b, a, *ncol1 );
1143 }
1144 
1145 void
1146 PLSCMAP1L( PLBOOL *itype, PLINT *npts, PLFLT *intensity,
1147  PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLBOOL *alt_hue_path )
1148 {
1149  c_plscmap1l( *itype, *npts, intensity, coord1, coord2, coord3, alt_hue_path );
1150 }
1151 
1152 void
1153 PLSCMAP1L2( PLBOOL *itype, PLINT *npts, PLFLT *intensity,
1154  PLFLT *coord1, PLFLT *coord2, PLFLT *coord3 )
1155 {
1156  c_plscmap1l( *itype, *npts, intensity, coord1, coord2, coord3, NULL );
1157 }
1158 
1159 void
1160 PLSCMAP1LA( PLBOOL *itype, PLINT *npts, PLFLT *intensity,
1161  PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLFLT *a, PLBOOL *alt_hue_path )
1162 {
1163  c_plscmap1la( *itype, *npts, intensity, coord1, coord2, coord3, a, alt_hue_path );
1164 }
1165 
1166 void
1167 PLSCMAP1LA2( PLBOOL *itype, PLINT *npts, PLFLT *intensity,
1168  PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLFLT *a )
1169 {
1170  c_plscmap1la( *itype, *npts, intensity, coord1, coord2, coord3, a, NULL );
1171 }
1172 
1173 void
1174 PLSCMAP1N( PLINT *n )
1175 {
1176  c_plscmap1n( *n );
1177 }
1178 
1179 void
1180 PLSCMAP1_RANGE( PLFLT *min_color, PLFLT *max_color )
1181 {
1182  c_plscmap1_range( *min_color, *max_color );
1183 }
1184 
1185 void
1186 PLSCOL0( PLINT *icol0, PLINT *r, PLINT *g, PLINT *b )
1187 {
1188  c_plscol0( *icol0, *r, *g, *b );
1189 }
1190 
1191 void
1192 PLSCOL0A( PLINT *icol0, PLINT *r, PLINT *g, PLINT *b, PLFLT *a )
1193 {
1194  c_plscol0a( *icol0, *r, *g, *b, *a );
1195 }
1196 
1197 void
1198 PLSCOLBG( PLINT *r, PLINT *g, PLINT *b )
1199 {
1200  c_plscolbg( *r, *g, *b );
1201 }
1202 
1203 void
1204 PLSCOLBGA( PLINT *r, PLINT *g, PLINT *b, PLFLT *a )
1205 {
1206  c_plscolbga( *r, *g, *b, *a );
1207 }
1208 
1209 void
1210 PLSCOLOR( PLINT *color )
1211 {
1212  c_plscolor( *color );
1213 }
1214 
1215 void
1216 PLSCOMPRESSION( PLINT *compression )
1217 {
1218  c_plscompression( *compression );
1219 }
1220 
1221 void
1222 PLSDEV7( const char *dev )
1223 {
1224  c_plsdev( dev );
1225 }
1226 
1227 void
1228 PLSDIDEV( PLFLT *mar, PLFLT *aspect, PLFLT *jx, PLFLT *jy )
1229 {
1230  c_plsdidev( *mar, *aspect, *jx, *jy );
1231 }
1232 
1233 void
1234 PLSDIMAP( PLINT *dimxmin, PLINT *dimxmax, PLINT *dimymin, PLINT *dimymax,
1235  PLFLT *dimxpmm, PLFLT *dimypmm )
1236 {
1237  c_plsdimap( *dimxmin, *dimxmax, *dimymin, *dimymax,
1238  *dimxpmm, *dimypmm );
1239 }
1240 
1241 void
1242 PLSDIORI( PLFLT *rot )
1243 {
1244  c_plsdiori( *rot );
1245 }
1246 
1247 void
1248 PLSDIPLT( PLFLT *xmin, PLFLT *ymin, PLFLT *xmax, PLFLT *ymax )
1249 {
1250  c_plsdiplt( *xmin, *ymin, *xmax, *ymax );
1251 }
1252 
1253 void
1254 PLSDIPLZ( PLFLT *xmin, PLFLT *ymin, PLFLT *xmax, PLFLT *ymax )
1255 {
1256  c_plsdiplz( *xmin, *ymin, *xmax, *ymax );
1257 }
1258 
1259 void
1260 PLSEED( unsigned int *s )
1261 {
1262  c_plseed( *s );
1263 }
1264 
1265 void
1266 PLSESC( PLINT *esc )
1267 {
1268  c_plsesc( (char) *esc );
1269 }
1270 
1271 // Auxiliary routine - not to be used publicly
1272 //
1273 #define PLSETMAPFORMC FNAME( PLSETMAPFORMC, plsetmapformc )
1274 #define PLCLEARMAPFORMC FNAME( PLCLEARMAPFORMC, plclearmapformc )
1275 void PLSETMAPFORMC( void ( STDCALL *mapform )( PLINT *, PLFLT *, PLFLT * ) );
1276 void PLCLEARMAPFORMC( void );
1277 
1278 void
1279 PLSETMAPFORMC( void ( STDCALL *mapform )( PLINT *, PLFLT *, PLFLT * ) )
1280 {
1281  plmapform = mapform;
1282 }
1283 void
1285 {
1286  plmapform = NULL;
1287 }
1288 
1289 void
1290 PLSETOPT7( const char *opt, const char *oarg )
1291 {
1292  c_plsetopt( opt, oarg );
1293 }
1294 
1295 void
1296 PLSFAM( PLINT *fam, PLINT *num, PLINT *bmax )
1297 {
1298  c_plsfam( *fam, *num, *bmax );
1299 }
1300 
1301 // Note: Fortran does not distinguish between unsigned and signed integers
1302 // so the 32-bit PLUNICODE can be mapped to 4-byte Fortran integer outside
1303 // this routine.
1304 void
1306 {
1307  c_plsfci( *fci );
1308 }
1309 
1310 void
1311 PLSFNAM7( const char *fnam )
1312 {
1313  c_plsfnam( fnam );
1314 }
1315 
1316 void
1317 PLSFONT( PLINT *family, PLINT *style, PLINT *weight )
1318 {
1319  c_plsfont( *family, *style, *weight );
1320 }
1321 
1322 void
1323 PLSLABELFUNC_ON( void ( STDCALL *labelfunc )( PLINT *, PLFLT *, char *, PLINT *, PLINT ) )
1324 {
1325  pllabelfunc = labelfunc;
1326  // N.B. neglect pointer to additional data for f95
1327  c_plslabelfunc( pllabelfuncf2c, NULL );
1328 }
1329 
1330 void
1331 PLSLABELFUNC_ONa( void ( STDCALL *labelfunc )( PLINT *, PLFLT *, char *, PLINT *, PLINT ) )
1332 {
1333  pllabelfunc = labelfunc;
1334  // N.B. neglect pointer to additional data for f95
1335  c_plslabelfunc( pllabelfuncf2c, NULL );
1336 }
1337 
1338 void
1339 PLSLABELFUNC_OFF( PLINT * PL_UNUSED( dummy ) )
1340 {
1341  pllabelfunc = NULL;
1342  c_plslabelfunc( NULL, NULL );
1343 }
1344 
1345 void
1346 PLSLABELFUNC_OFFa( PLINT * PL_UNUSED( dummy ) )
1347 {
1348  pllabelfunc = NULL;
1349  c_plslabelfunc( NULL, NULL );
1350 }
1351 
1352 void
1353 PLSLABELFUNC_NONE( void )
1354 {
1355  pllabelfunc = NULL;
1356  c_plslabelfunc( NULL, NULL );
1357 }
1358 void
1359 PLSLABELFUNC_NONEa( void )
1360 {
1361  pllabelfunc = NULL;
1362  c_plslabelfunc( NULL, NULL );
1363 }
1364 
1365 void
1366 PLSMAJ( PLFLT *def, PLFLT *scale )
1367 {
1368  c_plsmaj( *def, *scale );
1369 }
1370 
1371 void
1372 PLSMEM( PLINT *maxx, PLINT *maxy, void *plotmem )
1373 {
1374  c_plsmem( *maxx, *maxy, plotmem );
1375 }
1376 
1377 void
1378 PLSMEMA( PLINT *maxx, PLINT *maxy, void *plotmem )
1379 {
1380  c_plsmema( *maxx, *maxy, plotmem );
1381 }
1382 
1383 void
1384 PLSMIN( PLFLT *def, PLFLT *scale )
1385 {
1386  c_plsmin( *def, *scale );
1387 }
1388 
1389 void
1390 PLSORI( PLINT *ori )
1391 {
1392  c_plsori( *ori );
1393 }
1394 
1395 void
1396 PLSPAGE( PLFLT *xpmm, PLFLT *ypmm,
1397  PLINT *xwid, PLINT *ywid, PLINT *xoff, PLINT *yoff )
1398 {
1399  c_plspage( *xpmm, *ypmm, *xwid, *ywid, *xoff, *yoff );
1400 }
1401 
1402 void
1403 PLSPAL07( const char *filename )
1404 {
1405  c_plspal0( filename );
1406 }
1407 
1408 void
1409 PLSPAL17( const char *filename, PLBOOL *interpolate )
1410 {
1411  c_plspal1( filename, *interpolate );
1412 }
1413 
1414 void
1415 PLSPAUSE( PLBOOL *ipause )
1416 {
1417  c_plspause( *ipause );
1418 }
1419 
1420 void
1421 PLSSTRM( PLINT *strm )
1422 {
1423  c_plsstrm( *strm );
1424 }
1425 
1426 void
1427 PLSSUB( PLINT *nx, PLINT *ny )
1428 {
1429  c_plssub( *nx, *ny );
1430 }
1431 
1432 void
1433 PLSSYM( PLFLT *def, PLFLT *scale )
1434 {
1435  c_plssym( *def, *scale );
1436 }
1437 
1438 void
1439 PLSTAR( PLINT *nx, PLINT *ny )
1440 {
1441  c_plstar( *nx, *ny );
1442 }
1443 
1444 void
1445 PLSTART7( const char *devname, PLINT *nx, PLINT *ny )
1446 {
1447  c_plstart( devname, *nx, *ny );
1448 }
1449 
1450 void
1451 PLSTRANSFORM1( void ( STDCALL *transformfunc )( PLFLT *, PLFLT *, PLFLT *, PLFLT * ) )
1452 {
1453  pltransform = transformfunc;
1454 
1455  c_plstransform( pltransformf2c, NULL );
1456 }
1457 
1458 void
1459 PLSTRANSFORM2( PLINT * PL_UNUSED( dummy ) )
1460 {
1461  pltransform = NULL;
1462 
1463  c_plstransform( NULL, NULL );
1464 }
1465 
1466 void
1467 PLSTRANSFORM3( void )
1468 {
1469  pltransform = NULL;
1470 
1471  c_plstransform( NULL, NULL );
1472 }
1473 
1474 void
1475 PLSTRING7( PLINT *n, PLFLT *x, PLFLT *y, const char *string )
1476 {
1477  c_plstring( *n, x, y, string );
1478 }
1479 
1480 void
1481 PLSTRING37( PLINT *n, PLFLT *x, PLFLT *y, PLFLT *z, const char *string )
1482 {
1483  c_plstring3( *n, x, y, z, string );
1484 }
1485 
1486 void
1487 PLSTRIPA( PLINT *id, PLINT *pen, PLFLT *x, PLFLT *y )
1488 {
1489  c_plstripa( *id, *pen, *x, *y );
1490 }
1491 
1492 void
1493 PLSTRIPC( PLINT *id, const char *xspec, const char *yspec,
1494  PLFLT *xmin, PLFLT *xmax, PLFLT *xjump, PLFLT *ymin, PLFLT *ymax,
1495  PLFLT *xlpos, PLFLT *ylpos,
1496  PLBOOL *y_ascl, PLBOOL *acc,
1497  PLINT *colbox, PLINT *collab,
1498  PLINT *colline, PLINT *styline,
1499  const char *legline0, const char *legline1,
1500  const char *legline2, const char *legline3,
1501  const char *labx, const char *laby, const char *labtop )
1502 {
1503  const char* legline[4];
1504  legline[0] = legline0;
1505  legline[1] = legline1;
1506  legline[2] = legline2;
1507  legline[3] = legline3;
1508 
1509  c_plstripc( id, xspec, yspec,
1510  *xmin, *xmax, *xjump, *ymin, *ymax,
1511  *xlpos, *ylpos,
1512  *y_ascl, *acc,
1513  *colbox, *collab,
1514  colline, styline, legline,
1515  labx, laby, labtop );
1516 }
1517 
1518 void
1519 PLSTRIPD( PLINT *id )
1520 {
1521  c_plstripd( *id );
1522 }
1523 
1524 void
1525 PLSTYL( PLINT *n, PLINT *mark, PLINT *space )
1526 {
1527  c_plstyl( *n, mark, space );
1528 }
1529 
1530 void
1531 PLSVECT1( PLFLT *arrowx, PLFLT *arrowy, PLINT *npts, PLBOOL *fill )
1532 {
1533  c_plsvect( arrowx, arrowy, *npts, *fill );
1534 }
1535 
1536 void
1537 PLSVECT2( void )
1538 {
1539  c_plsvect( NULL, NULL, 0, 0 );
1540 }
1541 
1542 void
1543 PLSVPA( PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax )
1544 {
1545  c_plsvpa( *xmin, *xmax, *ymin, *ymax );
1546 }
1547 
1548 void
1549 PLSXAX( PLINT *digmax, PLINT *digits )
1550 {
1551  c_plsxax( *digmax, *digits );
1552 }
1553 
1554 void
1555 PLSYAX( PLINT *digmax, PLINT *digits )
1556 {
1557  c_plsyax( *digmax, *digits );
1558 }
1559 
1560 void
1561 PLSYM( PLINT *n, PLFLT *x, PLFLT *y, PLINT *code )
1562 {
1563  c_plsym( *n, x, y, *code );
1564 }
1565 
1566 void
1567 PLSZAX( PLINT *digmax, PLINT *digits )
1568 {
1569  c_plszax( *digmax, *digits );
1570 }
1571 
1572 void
1573 PLTEXT( void )
1574 {
1575  c_pltext();
1576 }
1577 
1578 void
1579 PLTIMEFMT7( const char *fmt )
1580 {
1581  c_pltimefmt( fmt );
1582 }
1583 
1584 void
1585 PLVASP( PLFLT *aspect )
1586 {
1587  c_plvasp( *aspect );
1588 }
1589 
1590 void
1591 PLVPAS( PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLFLT *aspect )
1592 {
1593  c_plvpas( *xmin, *xmax, *ymin, *ymax, *aspect );
1594 }
1595 
1596 void
1597 PLVPOR( PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax )
1598 {
1599  c_plvpor( *xmin, *xmax, *ymin, *ymax );
1600 }
1601 
1602 void
1603 PLVSTA( void )
1604 {
1605  c_plvsta();
1606 }
1607 
1608 void
1609 PLW3D( PLFLT *basex, PLFLT *basey, PLFLT *height,
1610  PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax,
1611  PLFLT *zmin, PLFLT *zmax,
1612  PLFLT *alt, PLFLT *az )
1613 {
1614  c_plw3d( *basex, *basey, *height,
1615  *xmin, *xmax, *ymin, *ymax, *zmin, *zmax, *alt, *az );
1616 }
1617 
1618 void
1619 PLWIDTH( PLFLT *width )
1620 {
1621  c_plwidth( *width );
1622 }
1623 
1624 void
1625 PLWIND( PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax )
1626 {
1627  c_plwind( *xmin, *xmax, *ymin, *ymax );
1628 }
1629 
1630 void
1631 PLXORMOD( PLBOOL *mode, PLBOOL *status )
1632 {
1633  c_plxormod( *mode, status );
1634 }