PLplot  5.9.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
f77/scstubs.c
Go to the documentation of this file.
1 // $Id: scstubs.c 12288 2013-01-30 04:40:35Z airwin $
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 // Slightly different to C version as we don't support PLPointer for additional data
44 static void ( STDCALL *pltransform )( PLFLT *, PLFLT *, PLFLT *, PLFLT * );
45 
46 static char **pllegend_text;
47 static char **pllegend_symbols;
48 
49 static void
51 {
52  ( *pltransform )( &x, &y, tx, ty );
53 }
54 
55 
56 void
58 {
59  c_pl_setcontlabelformat( *lexp, *sigdig );
60 }
61 
62 void
64 {
65  c_pl_setcontlabelformat( *lexp, *sigdig );
66 }
67 
68 void
69 PL_SETCONTLABELPARAM( PLFLT *offset, PLFLT *size, PLFLT *spacing, PLINT *active )
70 {
71  c_pl_setcontlabelparam( *offset, *size, *spacing, *active );
72 }
73 
74 void
75 PL_SETCONTLABELPARAMa( PLFLT *offset, PLFLT *size, PLFLT *spacing, PLINT *active )
76 {
77  c_pl_setcontlabelparam( *offset, *size, *spacing, *active );
78 }
79 
80 void
81 PLABORT7( const char *text )
82 {
83  plabort( text );
84 }
85 
86 void
87 PLADV( PLINT *sub )
88 {
89  c_pladv( *sub );
90 }
91 
92 void
93 PLARC( PLFLT *x, PLFLT *y, PLFLT *a, PLFLT *b, PLFLT *angle1, PLFLT *angle2, PLFLT *rotate, PLBOOL *fill )
94 {
95  c_plarc( *x, *y, *a, *b, *angle1, *angle2, *rotate, *fill );
96 }
97 
98 void
99 PLAXES7( PLFLT *x0, PLFLT *y0, const char *xopt, PLFLT *xtick,
100  PLINT *nxsub, const char *yopt, PLFLT *ytick, PLINT *nysub )
101 {
102  c_plaxes( *x0, *y0, xopt, *xtick, *nxsub, yopt, *ytick, *nysub );
103 }
104 
105 void
106 PLBIN( PLINT *nbin, PLFLT *x, PLFLT *y, PLINT *center )
107 {
108  c_plbin( *nbin, x, y, *center );
109 }
110 
111 void
112 PLBTIME( PLINT *year, PLINT *month, PLINT *day, PLINT *hour, PLINT *min, PLFLT *sec, PLFLT *ctime )
113 {
114  c_plbtime( year, month, day, hour, min, sec, *ctime );
115 }
116 
117 void
118 PLBOP( void )
119 {
120  c_plbop();
121 }
122 
123 void
124 PLBOX7( const char *xopt, PLFLT *xtick, PLINT *nxsub,
125  const char *yopt, PLFLT *ytick, PLINT *nysub )
126 {
127  c_plbox( xopt, *xtick, *nxsub, yopt, *ytick, *nysub );
128 }
129 
130 void
131 PLBOX37( const char *xopt, const char *xlabel, PLFLT *xtick, PLINT *nxsub,
132  const char *yopt, const char *ylabel, PLFLT *ytick, PLINT *nysub,
133  const char *zopt, const char *zlabel, PLFLT *ztick, PLINT *nzsub )
134 {
135  c_plbox3( xopt, xlabel, *xtick, *nxsub,
136  yopt, ylabel, *ytick, *nysub,
137  zopt, zlabel, *ztick, *nzsub );
138 }
139 
140 void
141 PLCALC_WORLD( PLFLT *rx, PLFLT *ry, PLFLT *wx, PLFLT *wy, PLINT *window )
142 {
143  c_plcalc_world( *rx, *ry, wx, wy, window );
144 }
145 
146 void
147 PLCALC_WORLDa( PLFLT *rx, PLFLT *ry, PLFLT *wx, PLFLT *wy, PLINT *window )
148 {
149  c_plcalc_world( *rx, *ry, wx, wy, window );
150 }
151 
152 void
153 PLCLEAR( void )
154 {
155  c_plclear();
156 }
157 
158 void
159 PLCOL0( PLINT *icol )
160 {
161  c_plcol0( *icol );
162 }
163 
164 void
165 PLCOL1( PLFLT *col )
166 {
167  c_plcol1( *col );
168 }
169 
170 //void
171 //PLCOLORBAR( PLINT *position, PLINT *opt, PLFLT *x, PLFLT *y, PLFLT *length, PLFLT *width,
172 // PLINT *cont_color, PLINT *cont_width, PLFLT *ticks, PLINT *sub_ticks,
173 // char *axis_opts, char *label, PLINT *n_colors, PLFLT *colors, PLFLT *values )
174 //{
175 // c_plcolorbar( *position, *opt, *x, *y, *length, *width, *cont_color, *cont_width, *ticks, *sub_ticks,
176 // axis_opts, label, *n_colors, colors, values );
177 //}
178 
179 void
180 PLCONFIGTIME( PLFLT *scale, PLFLT *offset1, PLFLT *offset2, PLINT *ccontrol, PLBOOL *ifbtime_offset, PLINT *year, PLINT *month, PLINT *day, PLINT *hour, PLINT *min, PLFLT *sec )
181 {
182  c_plconfigtime( *scale, *offset1, *offset2, *ccontrol, *ifbtime_offset, *year, *month, *day, *hour, *min, *sec );
183 }
184 
185 void
186 PLCPSTRM( PLINT *iplsr, PLBOOL *flags )
187 {
188  c_plcpstrm( *iplsr, *flags );
189 }
190 
191 void
192 PLCTIME( PLINT *year, PLINT *month, PLINT *day, PLINT *hour, PLINT *min, PLFLT *sec, PLFLT *ctime )
193 {
194  c_plctime( *year, *month, *day, *hour, *min, *sec, ctime );
195 }
196 
197 void
198 PLEND( void )
199 {
200  c_plend();
201 }
202 
203 void
204 PLEND1( void )
205 {
206  c_plend1();
207 }
208 
209 void
211  PLINT *just, PLINT *axis )
212 {
213  c_plenv( *xmin, *xmax, *ymin, *ymax, *just, *axis );
214 }
215 
216 void
218  PLINT *just, PLINT *axis )
219 {
220  c_plenv0( *xmin, *xmax, *ymin, *ymax, *just, *axis );
221 }
222 
223 void
224 PLEOP( void )
225 {
226  c_pleop();
227 }
228 
229 void
231 {
232  c_plerrx( *n, xmin, xmax, y );
233 }
234 
235 void
237 {
238  c_plerry( *n, x, ymin, ymax );
239 }
240 
241 void
242 PLFAMADV( void )
243 {
244  c_plfamadv();
245 }
246 
247 void
249 {
250  c_plfill( *n, x, y );
251 }
252 
253 void
254 PLFILL3( PLINT *n, PLFLT *x, PLFLT *y, PLFLT *z )
255 {
256  c_plfill3( *n, x, y, z );
257 }
258 
259 void
260 PLFLUSH( void )
261 {
262  c_plflush();
263 }
264 
265 void
266 PLFONT( PLINT *font )
267 {
268  c_plfont( *font );
269 }
270 
271 void
272 PLFONTLD( PLINT *charset )
273 {
274  c_plfontld( *charset );
275 }
276 
277 void
278 PLGCHR( PLFLT *chrdef, PLFLT *chrht )
279 {
280  c_plgchr( chrdef, chrht );
281 }
282 
283 void
284 PLGCOL0( PLINT *icol0, PLINT *r, PLINT *g, PLINT *b )
285 {
286  c_plgcol0( *icol0, r, g, b );
287 }
288 
289 void
290 PLGCOL0A( PLINT *icol0, PLINT *r, PLINT *g, PLINT *b, PLFLT *a )
291 {
292  c_plgcol0a( *icol0, r, g, b, a );
293 }
294 
295 void
296 PLGCOLBG( PLINT *r, PLINT *g, PLINT *b )
297 {
298  c_plgcolbg( r, g, b );
299 }
300 
301 void
302 PLGCOLBGA( PLINT *r, PLINT *g, PLINT *b, PLFLT *a )
303 {
304  c_plgcolbga( r, g, b, a );
305 }
306 
307 void
308 PLGCOMPRESSION( PLINT *compression )
309 {
310  c_plgcompression( compression );
311 }
312 
313 void
314 PLGDEV7( char *dev, int length )
315 {
316  c_plgdev( dev );
317 }
318 
319 void
320 PLGDIDEV( PLFLT *p_mar, PLFLT *p_aspect, PLFLT *p_jx, PLFLT *p_jy )
321 {
322  c_plgdidev( p_mar, p_aspect, p_jx, p_jy );
323 }
324 
325 void
326 PLGDIORI( PLFLT *p_rot )
327 {
328  c_plgdiori( p_rot );
329 }
330 
331 void
332 PLGDIPLT( PLFLT *p_xmin, PLFLT *p_ymin, PLFLT *p_xmax, PLFLT *p_ymax )
333 {
334  c_plgdiplt( p_xmin, p_ymin, p_xmax, p_ymax );
335 }
336 
337 void
338 PLGFAM( PLINT *fam, PLINT *num, PLINT *bmax )
339 {
340  c_plgfam( fam, num, bmax );
341 }
342 
343 // Note: Fortran does not distinguish between unsigned and signed integers
344 // so the 32-bit PLUNICODE can be mapped to 4-byte Fortran integer outside
345 // this routine.
346 void
348 {
349  c_plgfci( pfci );
350 }
351 
352 void
353 PLGFNAM7( char *fnam, int length )
354 {
355  c_plgfnam( fnam );
356 }
357 
358 void
359 PLGFONT( PLINT *family, PLINT *style, PLINT *weight )
360 {
361  c_plgfont( family, style, weight );
362 }
363 
364 void
365 PLGLEVEL( PLINT *level )
366 {
367  c_plglevel( level );
368 }
369 
370 void
371 PLGPAGE( PLFLT *xpmm, PLFLT *ypmm, PLINT *xwid, PLINT *ywid,
372  PLINT *xoff, PLINT *yoff )
373 {
374  c_plgpage( xpmm, ypmm, xwid, ywid, xoff, yoff );
375 }
376 
377 void
378 PLGRA( void )
379 {
380  c_plgra();
381 }
382 
383 void
384 PLGRADIENT( PLINT *n, PLFLT *x, PLFLT *y, PLFLT *angle )
385 {
386  c_plgradient( *n, x, y, *angle );
387 }
388 
389 void
391 {
392  c_plgspa( xmin, xmax, ymin, ymax );
393 }
394 
395 void
396 PLGSTRM( PLINT *strm )
397 {
398  c_plgstrm( strm );
399 }
400 
401 void
402 PLGVER7( char *ver )
403 {
404  c_plgver( ver );
405 }
406 
407 void
408 PLGVPD( PLFLT *p_xmin, PLFLT *p_xmax, PLFLT *p_ymin, PLFLT *p_ymax )
409 {
410  c_plgvpd( p_xmin, p_xmax, p_ymin, p_ymax );
411 }
412 
413 void
414 PLGVPW( PLFLT *p_xmin, PLFLT *p_xmax, PLFLT *p_ymin, PLFLT *p_ymax )
415 {
416  c_plgvpw( p_xmin, p_xmax, p_ymin, p_ymax );
417 }
418 
419 void
420 PLGXAX( PLINT *digmax, PLINT *digits )
421 {
422  c_plgxax( digmax, digits );
423 }
424 
425 void
426 PLGYAX( PLINT *digmax, PLINT *digits )
427 {
428  c_plgyax( digmax, digits );
429 }
430 
431 void
432 PLGZAX( PLINT *digmax, PLINT *digits )
433 {
434  c_plgzax( digmax, digits );
435 }
436 
437 void
438 PLHIST( PLINT *n, PLFLT *data, PLFLT *datmin, PLFLT *datmax,
439  PLINT *nbin, PLINT *oldwin )
440 {
441  c_plhist( *n, data, *datmin, *datmax, *nbin, *oldwin );
442 }
443 
444 #ifdef PL_DEPRECATED
445 void
446 PLHLS( PLFLT *hue, PLFLT *light, PLFLT *sat )
447 {
448  c_plhls( *hue, *light, *sat );
449 }
450 #endif // PL_DEPRECATED
451 
452 void
453 PLHLSRGB( PLFLT *h, PLFLT *l, PLFLT *s, PLFLT *r, PLFLT *g, PLFLT *b )
454 {
455  c_plhlsrgb( *h, *l, *s, r, g, b );
456 }
457 
458 void
459 PLIMAGE( PLFLT *idata, PLINT *nx, PLINT *ny,
460  PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLFLT *zmin, PLFLT *zmax,
461  PLFLT *Dxmin, PLFLT *Dxmax, PLFLT *Dymin, PLFLT *Dymax, PLINT *lx )
462 {
463  int i, j;
464  PLFLT **pidata;
465 
466  plAlloc2dGrid( &pidata, *nx, *ny );
467 
468  for ( i = 0; i < *nx; i++ )
469  {
470  for ( j = 0; j < *ny; j++ )
471  {
472  pidata[i][j] = idata[i + j * ( *lx )];
473  }
474  }
475 
476  c_plimage( (const PLFLT * const *) pidata, *nx, *ny,
477  *xmin, *xmax, *ymin, *ymax, *zmin, *zmax,
478  *Dxmin, *Dxmax, *Dymin, *Dymax );
479 
480  plFree2dGrid( pidata, *nx, *ny );
481 }
482 
483 void
484 PLINIT( void )
485 {
486  c_plinit();
487 }
488 
489 void
490 PLJOIN( PLFLT *x1, PLFLT *y1, PLFLT *x2, PLFLT *y2 )
491 {
492  c_pljoin( *x1, *y1, *x2, *y2 );
493 }
494 
495 void
496 PLLAB7( const char *xlab, const char *ylab, const char *title )
497 {
498  c_pllab( xlab, ylab, title );
499 }
500 
501 static void
502 pllabelfuncf2c( PLINT axis, PLFLT value, char *label, PLINT length, PLPointer data )
503 {
504  int i;
505 
506  // (AM) Note the hidden argument "length" - it ensures that the string "label"
507  // is recognised to have that length
508  //
509  ( *pllabelfunc )( &axis, &value, label, &length, length );
510 
511  // Ensure string is null terminated
512  i = length - 1;
513  while ( ( i >= 0 ) && ( label[i] == ' ' ) )
514  i--;
515  label[i + 1] = '\0';
516 }
517 
518 // Auxiliary function to create a C-compatible string array
519 // Note the hidden argument
520 void
521 PLLEGEND_CNV_TEXT( PLINT *id, PLINT *number, char *string, PLINT length )
522 {
523  int j;
524  int i;
525  char **p_string;
526  char *data;
527 
528  // Ensure the strings are null terminated
529 
530  p_string = (char **) malloc( sizeof ( char * ) * ( *number ) );
531  data = (char *) malloc( sizeof ( char * ) * ( *number ) * ( length + 1 ) );
532 
533  for ( j = 0; j < ( *number ); j++ )
534  {
535  p_string[j] = data + j * ( length + 1 );
536  memcpy( p_string[j], &string[j * length], length );
537  p_string[j][length] = '\0';
538  i = length - 1;
539  while ( ( i >= 0 ) && ( p_string[j][i] == ' ' ) )
540  i--;
541  p_string[j][i + 1] = '\0';
542  }
543 
544  if ( *id == 1 )
545  {
546  pllegend_text = p_string;
547  }
548  else
549  {
550  pllegend_symbols = p_string;
551  }
552 }
553 
554 void PLLEGEND(
555  PLFLT *p_legend_width, PLFLT *p_legend_height,
556  PLINT *opt, PLINT *position, PLFLT *x, PLFLT *y, PLFLT *plot_width,
558  PLINT *nrow, PLINT *ncolumn,
559  PLINT *nlegend, const PLINT *opt_array,
560  PLFLT *text_offset, PLFLT *text_scale, PLFLT *text_spacing,
561  PLFLT *text_justification,
562  const PLINT *text_colors,
563  const PLINT *box_colors, const PLINT *box_patterns,
564  const PLFLT *box_scales, const PLINT *box_line_widths,
565  const PLINT *line_colors, const PLINT *line_styles,
566  const PLINT *line_widths,
567  const PLINT *symbol_colors, const PLFLT *symbol_scales,
568  const PLINT *symbol_numbers )
569 {
570  c_pllegend( p_legend_width, p_legend_height,
571  *opt, *position, *x, *y, *plot_width,
572  *bg_color, *bb_color, *bb_style,
573  *nrow, *ncolumn,
574  *nlegend, opt_array,
575  *text_offset, *text_scale, *text_spacing,
576  *text_justification,
577  text_colors, (const char * const *) pllegend_text,
578  box_colors, box_patterns,
579  box_scales, box_line_widths,
580  line_colors, line_styles,
581  line_widths,
582  symbol_colors, symbol_scales,
583  symbol_numbers, (const char * const *) pllegend_symbols );
584 
585  free( *pllegend_text );
586  free( pllegend_text );
587  free( *pllegend_symbols );
588  free( pllegend_symbols );
589 }
590 
591 void
593 {
594  c_pllightsource( *x, *y, *z );
595 }
596 
597 void
599 {
600  c_plline( *n, x, y );
601 }
602 
603 void
604 PLLINE3( PLINT *n, PLFLT *x, PLFLT *y, PLFLT *z )
605 {
606  c_plline3( *n, x, y, z );
607 }
608 
609 void
610 PLLSTY( PLINT *lin )
611 {
612  c_pllsty( *lin );
613 }
614 
615 static void
617 {
618  ( *plmapform )( &n, x, y );
619 }
620 
621 void
622 PLMAP7( const char *type,
623  PLFLT *minlong, PLFLT *maxlong, PLFLT *minlat, PLFLT *maxlat )
624 
625 {
626  if ( plmapform )
627  c_plmap( plmapf2c, type, *minlong, *maxlong, *minlat, *maxlat );
628  else
629  c_plmap( NULL, type, *minlong, *maxlong, *minlat, *maxlat );
630 }
631 
632 
633 void
634 PLMERIDIANS7( PLFLT *dlong, PLFLT *dlat,
635  PLFLT *minlong, PLFLT *maxlong, PLFLT *minlat, PLFLT *maxlat )
636 {
637  if ( plmapform )
638  c_plmeridians( plmapf2c, *dlong, *dlat, *minlong, *maxlong, *minlat, *maxlat );
639  else
640  c_plmeridians( NULL, *dlong, *dlat, *minlong, *maxlong, *minlat, *maxlat );
641 }
642 
643 void
644 PLMKSTRM( PLINT *p_strm )
645 {
646  c_plmkstrm( p_strm );
647 }
648 
649 void
650 PLMTEX7( const char *side, PLFLT *disp, PLFLT *pos, PLFLT *just, const char *text )
651 {
652  c_plmtex( side, *disp, *pos, *just, text );
653 }
654 
655 void
656 PLMTEX37( const char *side, PLFLT *disp, PLFLT *pos, PLFLT *just, const char *text )
657 {
658  c_plmtex3( side, *disp, *pos, *just, text );
659 }
660 
661 void
662 PLPARSEOPTS7( int *numargs, const char *iargs, PLINT *mode, PLINT *maxindex )
663 {
664 // Same as in plparseopts fortran subroutine that calls this one.
665 #define MAXARGS 20
666  if ( *numargs <= MAXARGS )
667  {
668  const char *argv[MAXARGS];
669  int i;
670  for ( i = 0; i < *numargs; i++ )
671  {
672  argv[i] = iargs + ( i * *maxindex );
673 // fprintf(stderr, "%d - %s\n", i, argv[i]);
674  }
675  c_plparseopts( numargs, argv, *mode );
676  }
677  else
678  fprintf( stderr, "plparseopts7: numargs too large\n" );
679 }
680 
681 void
682 PLPAT( PLINT *nlin, PLINT *inc, PLINT *del )
683 {
684  c_plpat( *nlin, inc, del );
685 }
686 
687 void
688 PLPOIN( PLINT *n, PLFLT *x, PLFLT *y, PLINT *code )
689 {
690  c_plpoin( *n, x, y, *code );
691 }
692 
693 void
694 PLPOIN3( PLINT *n, PLFLT *x, PLFLT *y, PLFLT *z, PLINT *code )
695 {
696  c_plpoin3( *n, x, y, z, *code );
697 }
698 
699 void
700 PLPOLY3( PLINT *n, PLFLT *x, PLFLT *y, PLFLT *z, PLBOOL *draw, PLBOOL *ifcc )
701 {
702  c_plpoly3( *n, x, y, z, draw, *ifcc );
703 }
704 
705 void
706 PLPREC( PLINT *setp, PLINT *prec )
707 {
708  c_plprec( *setp, *prec );
709 }
710 
711 void
712 PLPSTY( PLINT *patt )
713 {
714  c_plpsty( *patt );
715 }
716 
717 void
718 PLPTEX7( PLFLT *x, PLFLT *y, PLFLT *dx, PLFLT *dy, PLFLT *just, const char *text )
719 {
720  c_plptex( *x, *y, *dx, *dy, *just, text );
721 }
722 
723 void
725  PLFLT *x, PLFLT *y, PLFLT *z,
726  PLFLT *dx, PLFLT *dy, PLFLT *dz,
727  PLFLT *sx, PLFLT *sy, PLFLT *sz,
728  PLFLT *just, const char *text )
729 {
730  c_plptex3( *x, *y, *z, *dx, *dy, *dz, *sx, *sy, *sz, *just, text );
731 }
732 
733 PLFLT
735 {
736  return c_plrandd();
737 }
738 
739 void
740 PLREPLOT( void )
741 {
742  c_plreplot();
743 }
744 
745 #ifdef PL_DEPRECATED
746 void
747 PLRGB( PLFLT *red, PLFLT *green, PLFLT *blue )
748 {
749  c_plrgb( *red, *green, *blue );
750 }
751 #endif // PL_DEPRECATED
752 
753 #ifdef PL_DEPRECATED
754 void
755 PLRGB1( PLINT *r, PLINT *g, PLINT *b )
756 {
757  c_plrgb1( *r, *g, *b );
758 }
759 #endif // PL_DEPRECATED
760 
761 void
762 PLRGBHLS( PLFLT *r, PLFLT *g, PLFLT *b, PLFLT *h, PLFLT *l, PLFLT *s )
763 {
764  c_plrgbhls( *r, *g, *b, h, l, s );
765 }
766 
767 void
768 PLSCHR( PLFLT *def, PLFLT *scale )
769 {
770  c_plschr( *def, *scale );
771 }
772 
773 void
774 PLSCMAP0( PLINT *r, PLINT *g, PLINT *b, PLINT *ncol0 )
775 {
776  c_plscmap0( r, g, b, *ncol0 );
777 }
778 
779 void
780 PLSCMAP0A( PLINT *r, PLINT *g, PLINT *b, PLFLT *a, PLINT *ncol0 )
781 {
782  c_plscmap0a( r, g, b, a, *ncol0 );
783 }
784 
785 void
787 {
788  c_plscmap0n( *n );
789 }
790 
791 void
792 PLSCMAP1( PLINT *r, PLINT *g, PLINT *b, PLINT *ncol1 )
793 {
794  c_plscmap1( r, g, b, *ncol1 );
795 }
796 
797 void
798 PLSCMAP1A( PLINT *r, PLINT *g, PLINT *b, PLFLT *a, PLINT *ncol1 )
799 {
800  c_plscmap1a( r, g, b, a, *ncol1 );
801 }
802 
803 void
804 PLSCMAP1L( PLBOOL *itype, PLINT *npts, PLFLT *intensity,
805  PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLBOOL *alt_hue_path )
806 {
807  c_plscmap1l( *itype, *npts, intensity, coord1, coord2, coord3, alt_hue_path );
808 }
809 
810 void
811 PLSCMAP1LA( PLBOOL *itype, PLINT *npts, PLFLT *intensity,
812  PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLFLT *a, PLBOOL *alt_hue_path )
813 {
814  c_plscmap1la( *itype, *npts, intensity, coord1, coord2, coord3, a, alt_hue_path );
815 }
816 
817 void
819 {
820  c_plscmap1n( *n );
821 }
822 
823 void
824 PLSCOL0( PLINT *icol0, PLINT *r, PLINT *g, PLINT *b )
825 {
826  c_plscol0( *icol0, *r, *g, *b );
827 }
828 
829 void
830 PLSCOL0A( PLINT *icol0, PLINT *r, PLINT *g, PLINT *b, PLFLT *a )
831 {
832  c_plscol0a( *icol0, *r, *g, *b, *a );
833 }
834 
835 void
836 PLSCOLBG( PLINT *r, PLINT *g, PLINT *b )
837 {
838  c_plscolbg( *r, *g, *b );
839 }
840 
841 void
842 PLSCOLBGA( PLINT *r, PLINT *g, PLINT *b, PLFLT *a )
843 {
844  c_plscolbga( *r, *g, *b, *a );
845 }
846 
847 void
848 PLSCOLOR( PLINT *color )
849 {
850  c_plscolor( *color );
851 }
852 
853 void
854 PLSCOMPRESSION( PLINT *compression )
855 {
856  c_plscompression( *compression );
857 }
858 
859 void
860 PLSDEV7( const char *dev )
861 {
862  c_plsdev( dev );
863 }
864 
865 void
866 PLSDIDEV( PLFLT *mar, PLFLT *aspect, PLFLT *jx, PLFLT *jy )
867 {
868  c_plsdidev( *mar, *aspect, *jx, *jy );
869 }
870 
871 void
872 PLSDIMAP( PLINT *dimxmin, PLINT *dimxmax, PLINT *dimymin, PLINT *dimymax,
873  PLFLT *dimxpmm, PLFLT *dimypmm )
874 {
875  c_plsdimap( *dimxmin, *dimxmax, *dimymin, *dimymax,
876  *dimxpmm, *dimypmm );
877 }
878 
879 void
881 {
882  c_plsdiori( *rot );
883 }
884 
885 void
887 {
888  c_plsdiplt( *xmin, *ymin, *xmax, *ymax );
889 }
890 
891 void
893 {
894  c_plsdiplz( *xmin, *ymin, *xmax, *ymax );
895 }
896 
897 void
898 PLSEED( unsigned int *s )
899 {
900  c_plseed( *s );
901 }
902 
903 void
904 PLSESC( PLINT *esc )
905 {
906  c_plsesc( (char) *esc );
907 }
908 
909 // Auxiliary routine - not to be used publicly
910 //
911 #define PLSETMAPFORMC FNAME( PLSETMAPFORMC, plsetmapformc )
912 #define PLCLEARMAPFORMC FNAME( PLCLEARMAPFORMC, plclearmapformc )
913 void
914 PLSETMAPFORMC( void ( STDCALL *mapform )( PLINT *, PLFLT *, PLFLT * ) )
915 {
916  plmapform = mapform;
917 }
918 
919 void
921 {
922  plmapform = NULL;
923 }
924 
925 void
926 PLSETOPT7( const char *opt, const char *optarg )
927 {
928  c_plsetopt( opt, optarg );
929 }
930 
931 void
932 PLSFAM( PLINT *fam, PLINT *num, PLINT *bmax )
933 {
934  c_plsfam( *fam, *num, *bmax );
935 }
936 
937 // Note: Fortran does not distinguish between unsigned and signed integers
938 // so the 32-bit PLUNICODE can be mapped to 4-byte Fortran integer outside
939 // this routine.
940 void
942 {
943  c_plsfci( *fci );
944 }
945 
946 void
947 PLSFNAM7( const char *fnam )
948 {
949  c_plsfnam( fnam );
950 }
951 
952 void
953 PLSFONT( PLINT *family, PLINT *style, PLINT *weight )
954 {
955  c_plsfont( *family, *style, *weight );
956 }
957 
958 void
959 PLSLABELFUNC( void ( STDCALL *labelfunc )( PLINT *, PLFLT *, char *, PLINT *, PLINT ) )
960 {
961  pllabelfunc = labelfunc;
962  // N.B. neglect pointer to additional data for f77
964 }
965 
966 void
968 {
969  pllabelfunc = NULL;
970  c_plslabelfunc( NULL, NULL );
971 }
972 
973 void
975 {
976  pllabelfunc = NULL;
977  c_plslabelfunc( NULL, NULL );
978 }
979 
980 void
981 PLSMAJ( PLFLT *def, PLFLT *scale )
982 {
983  c_plsmaj( *def, *scale );
984 }
985 
986 void
987 PLSMEM( PLINT *maxx, PLINT *maxy, void *plotmem )
988 {
989  c_plsmem( *maxx, *maxy, plotmem );
990 }
991 
992 void
993 PLSMEMA( PLINT *maxx, PLINT *maxy, void *plotmem )
994 {
995  c_plsmema( *maxx, *maxy, plotmem );
996 }
997 
998 void
999 PLSMIN( PLFLT *def, PLFLT *scale )
1000 {
1001  c_plsmin( *def, *scale );
1002 }
1003 
1004 void
1005 PLSORI( PLINT *ori )
1006 {
1007  c_plsori( *ori );
1008 }
1009 
1010 void
1011 PLSPAGE( PLFLT *xpmm, PLFLT *ypmm,
1012  PLINT *xwid, PLINT *ywid, PLINT *xoff, PLINT *yoff )
1013 {
1014  c_plspage( *xpmm, *ypmm, *xwid, *ywid, *xoff, *yoff );
1015 }
1016 
1017 void
1018 PLSPAL07( const char *filename )
1019 {
1020  c_plspal0( filename );
1021 }
1022 
1023 void
1024 PLSPAL17( const char *filename, PLBOOL *interpolate )
1025 {
1026  c_plspal1( filename, *interpolate );
1027 }
1028 
1029 void
1030 PLSPAUSE( PLBOOL *pause )
1031 {
1032  c_plspause( *pause );
1033 }
1034 
1035 void
1036 PLSSTRM( PLINT *strm )
1037 {
1038  c_plsstrm( *strm );
1039 }
1040 
1041 void
1043 {
1044  c_plssub( *nx, *ny );
1045 }
1046 
1047 void
1048 PLSSYM( PLFLT *def, PLFLT *scale )
1049 {
1050  c_plssym( *def, *scale );
1051 }
1052 
1053 void
1055 {
1056  c_plstar( *nx, *ny );
1057 }
1058 
1059 void
1060 PLSTART7( const char *devname, PLINT *nx, PLINT *ny )
1061 {
1062  c_plstart( devname, *nx, *ny );
1063 }
1064 
1065 void
1066 PLSTRANSFORM( void ( STDCALL *transformfunc )( PLFLT *, PLFLT *, PLFLT *, PLFLT * ) )
1067 {
1068  pltransform = transformfunc;
1069  // N.B. neglect pointer to additional data for f77
1070  c_plstransform( pltransformf2c, NULL );
1071 }
1072 
1073 void
1075 {
1076  pltransform = NULL;
1077  c_plstransform( NULL, NULL );
1078 }
1079 
1080 void
1082 {
1083  pltransform = NULL;
1084  c_plstransform( NULL, NULL );
1085 }
1086 
1087 void
1088 PLSTRING7( PLINT *n, PLFLT *x, PLFLT *y, const char *string )
1089 {
1090  c_plstring( *n, x, y, string );
1091 }
1092 
1093 void
1094 PLSTRING37( PLINT *n, PLFLT *x, PLFLT *y, PLFLT *z, const char *string )
1095 {
1096  c_plstring3( *n, x, y, z, string );
1097 }
1098 
1099 void
1100 PLSTRIPA( PLINT *id, PLINT *pen, PLFLT *x, PLFLT *y )
1101 {
1102  c_plstripa( *id, *pen, *x, *y );
1103 }
1104 
1105 void
1106 PLSTRIPC7( PLINT *id, const char *xspec, const char *yspec,
1107  PLFLT *xmin, PLFLT *xmax, PLFLT *xjump, PLFLT *ymin, PLFLT *ymax,
1108  PLFLT *xlpos, PLFLT *ylpos,
1109  PLBOOL *y_ascl, PLBOOL *acc,
1110  PLINT *colbox, PLINT *collab,
1111  PLINT *colline, PLINT *styline,
1112  const char *legline0, const char *legline1,
1113  const char *legline2, const char *legline3,
1114  const char *labx, const char *laby, const char *labtop )
1115 {
1116  const char* legline[4];
1117  legline[0] = legline0;
1118  legline[1] = legline1;
1119  legline[2] = legline2;
1120  legline[3] = legline3;
1121 
1122  c_plstripc( id, xspec, yspec,
1123  *xmin, *xmax, *xjump, *ymin, *ymax,
1124  *xlpos, *ylpos,
1125  *y_ascl, *acc,
1126  *colbox, *collab,
1127  colline, styline, legline,
1128  labx, laby, labtop );
1129 }
1130 
1131 void
1133 {
1134  c_plstripd( *id );
1135 }
1136 
1137 void
1138 PLSTYL( PLINT *n, PLINT *mark, PLINT *space )
1139 {
1140  c_plstyl( *n, mark, space );
1141 }
1142 
1143 void
1144 PLSVECT( PLFLT *arrowx, PLFLT *arrowy, PLINT *npts, PLBOOL *fill )
1145 {
1146  c_plsvect( arrowx, arrowy, *npts, *fill );
1147 }
1148 
1149 void
1151 {
1152  c_plsvpa( *xmin, *xmax, *ymin, *ymax );
1153 }
1154 
1155 void
1156 PLSXAX( PLINT *digmax, PLINT *digits )
1157 {
1158  c_plsxax( *digmax, *digits );
1159 }
1160 
1161 void
1162 PLSYAX( PLINT *digmax, PLINT *digits )
1163 {
1164  c_plsyax( *digmax, *digits );
1165 }
1166 
1167 void
1168 PLSYM( PLINT *n, PLFLT *x, PLFLT *y, PLINT *code )
1169 {
1170  c_plsym( *n, x, y, *code );
1171 }
1172 
1173 void
1174 PLSZAX( PLINT *digmax, PLINT *digits )
1175 {
1176  c_plszax( *digmax, *digits );
1177 }
1178 
1179 void
1180 PLTEXT( void )
1181 {
1182  c_pltext();
1183 }
1184 
1185 void
1186 PLTIMEFMT7( const char *fmt )
1187 {
1188  c_pltimefmt( fmt );
1189 }
1190 
1191 void
1192 PLVASP( PLFLT *aspect )
1193 {
1194  c_plvasp( *aspect );
1195 }
1196 
1197 void
1199 {
1200  c_plvpas( *xmin, *xmax, *ymin, *ymax, *aspect );
1201 }
1202 
1203 void
1205 {
1206  c_plvpor( *xmin, *xmax, *ymin, *ymax );
1207 }
1208 
1209 void
1210 PLVSTA( void )
1211 {
1212  c_plvsta();
1213 }
1214 
1215 void
1216 PLW3D( PLFLT *basex, PLFLT *basey, PLFLT *height,
1218  PLFLT *zmin, PLFLT *zmax,
1219  PLFLT *alt, PLFLT *az )
1220 {
1221  c_plw3d( *basex, *basey, *height,
1222  *xmin, *xmax, *ymin, *ymax, *zmin, *zmax, *alt, *az );
1223 }
1224 
1225 void
1226 PLWID( PLINT *width )
1227 {
1228  c_plwidth( *width );
1229 }
1230 
1231 void
1233 {
1234  c_plwind( *xmin, *xmax, *ymin, *ymax );
1235 }
1236 
1237 void
1238 PLXORMOD( PLBOOL *mode, PLBOOL *status )
1239 {
1240  c_plxormod( *mode, status );
1241 }