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