• Main Page
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

scstubs.c

Go to the documentation of this file.
00001 // $Id: scstubs.c 11915 2011-09-07 11:45:29Z andrewross $
00002 //
00003 //      C stub routines.
00004 //
00005 // Copyright (C) 2004  Alan W. Irwin
00006 //
00007 // This file is part of PLplot.
00008 //
00009 // PLplot is free software; you can redistribute it and/or modify
00010 // it under the terms of the GNU Library General Public License as published
00011 // by the Free Software Foundation; either version 2 of the License, or
00012 // (at your option) any later version.
00013 //
00014 // PLplot is distributed in the hope that it will be useful,
00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017 // GNU Library General Public License for more details.
00018 //
00019 // You should have received a copy of the GNU Library General Public License
00020 // along with PLplot; if not, write to the Free Software
00021 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
00022 //
00023 //
00024 //      The stubs contained here are the ones that are relatively simple,
00025 //      i.e. involving only a call convention change or integer-to-string
00026 //      conversion.  Exceptions are plparseopts and  plstripc  which have
00027 //      a few more complications in them.
00028 //
00029 
00030 #include "plstubs.h"
00031 
00032 #ifdef CVF
00033 #define STDCALL    __stdcall
00034 #else
00035 #define STDCALL
00036 #endif
00037 static void ( STDCALL *plmapform )( PLINT *, PLFLT *, PLFLT * ); // Note: slightly different prototype than
00038                                                                  // (*mapform)!
00039 // Slightly different to (*label_func) as we don't support PLPointer for
00040 // additional data in f77.
00041 // Note the hidden argument!
00042 static void ( STDCALL *pllabelfunc )( PLINT *, PLFLT *, char *, PLINT *, PLINT );
00043 // Slightly different to C version as we don't support PLPointer  for additional data
00044 static void ( STDCALL *pltransform )( PLFLT *, PLFLT *, PLFLT *, PLFLT * );
00045 
00046 static char **pllegend_text;
00047 static char **pllegend_symbols;
00048 
00049 static void
00050 pltransformf2c( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer data )
00051 {
00052     ( *pltransform )( &x, &y, tx, ty );
00053 }
00054 
00055 
00056 void
00057 PL_SETCONTLABELFORMAT( PLINT *lexp, PLINT *sigdig )
00058 {
00059     c_pl_setcontlabelformat( *lexp, *sigdig );
00060 }
00061 
00062 void
00063 PL_SETCONTLABELFORMATa( PLINT *lexp, PLINT *sigdig )
00064 {
00065     c_pl_setcontlabelformat( *lexp, *sigdig );
00066 }
00067 
00068 void
00069 PL_SETCONTLABELPARAM( PLFLT *offset, PLFLT *size, PLFLT *spacing, PLINT *active )
00070 {
00071     c_pl_setcontlabelparam( *offset, *size, *spacing, *active );
00072 }
00073 
00074 void
00075 PL_SETCONTLABELPARAMa( PLFLT *offset, PLFLT *size, PLFLT *spacing, PLINT *active )
00076 {
00077     c_pl_setcontlabelparam( *offset, *size, *spacing, *active );
00078 }
00079 
00080 void
00081 PLABORT7( const char *text )
00082 {
00083     plabort( text );
00084 }
00085 
00086 void
00087 PLADV( PLINT *sub )
00088 {
00089     c_pladv( *sub );
00090 }
00091 
00092 void
00093 PLARC( PLFLT *x, PLFLT *y, PLFLT *a, PLFLT *b, PLFLT *angle1, PLFLT *angle2, PLFLT *rotate, PLBOOL *fill )
00094 {
00095     c_plarc( *x, *y, *a, *b, *angle1, *angle2, *rotate, *fill );
00096 }
00097 
00098 void
00099 PLAXES7( PLFLT *x0, PLFLT *y0, const char *xopt, PLFLT *xtick,
00100          PLINT *nxsub, const char *yopt, PLFLT *ytick, PLINT *nysub )
00101 {
00102     c_plaxes( *x0, *y0, xopt, *xtick, *nxsub, yopt, *ytick, *nysub );
00103 }
00104 
00105 void
00106 PLBIN( PLINT *nbin, PLFLT *x, PLFLT *y, PLINT *center )
00107 {
00108     c_plbin( *nbin, x, y, *center );
00109 }
00110 
00111 void
00112 PLBTIME( PLINT *year, PLINT *month, PLINT *day, PLINT *hour, PLINT *min, PLFLT *sec, PLFLT *ctime )
00113 {
00114     c_plbtime( year, month, day, hour, min, sec, *ctime );
00115 }
00116 
00117 void
00118 PLBOP( void )
00119 {
00120     c_plbop();
00121 }
00122 
00123 void
00124 PLBOX7( const char *xopt, PLFLT *xtick, PLINT *nxsub,
00125         const char *yopt, PLFLT *ytick, PLINT *nysub )
00126 {
00127     c_plbox( xopt, *xtick, *nxsub, yopt, *ytick, *nysub );
00128 }
00129 
00130 void
00131 PLBOX37( const char *xopt, const char *xlabel, PLFLT *xtick, PLINT *nxsub,
00132          const char *yopt, const char *ylabel, PLFLT *ytick, PLINT *nysub,
00133          const char *zopt, const char *zlabel, PLFLT *ztick, PLINT *nzsub )
00134 {
00135     c_plbox3( xopt, xlabel, *xtick, *nxsub,
00136         yopt, ylabel, *ytick, *nysub,
00137         zopt, zlabel, *ztick, *nzsub );
00138 }
00139 
00140 void
00141 PLCALC_WORLD( PLFLT *rx, PLFLT *ry, PLFLT *wx, PLFLT *wy, PLINT *window )
00142 {
00143     c_plcalc_world( *rx, *ry, wx, wy, window );
00144 }
00145 
00146 void
00147 PLCALC_WORLDa( PLFLT *rx, PLFLT *ry, PLFLT *wx, PLFLT *wy, PLINT *window )
00148 {
00149     c_plcalc_world( *rx, *ry, wx, wy, window );
00150 }
00151 
00152 void
00153 PLCLEAR( void )
00154 {
00155     c_plclear();
00156 }
00157 
00158 void
00159 PLCOL0( PLINT *icol )
00160 {
00161     c_plcol0( *icol );
00162 }
00163 
00164 void
00165 PLCOL1( PLFLT *col )
00166 {
00167     c_plcol1( *col );
00168 }
00169 
00170 //void
00171 //PLCOLORBAR( PLINT *position, PLINT *opt, PLFLT *x, PLFLT *y, PLFLT *length, PLFLT *width,
00172 //            PLINT *cont_color, PLINT *cont_width, PLFLT *ticks, PLINT *sub_ticks,
00173 //            char *axis_opts, char *label, PLINT *n_colors, PLFLT *colors, PLFLT *values )
00174 //{
00175 //    c_plcolorbar( *position, *opt, *x, *y, *length, *width, *cont_color, *cont_width, *ticks, *sub_ticks,
00176 //        axis_opts, label, *n_colors, colors, values );
00177 //}
00178 
00179 void
00180 PLCONFIGTIME( PLFLT *scale, PLFLT *offset1, PLFLT *offset2, PLINT *ccontrol, PLBOOL *ifbtime_offset, PLINT *year, PLINT *month, PLINT *day, PLINT *hour, PLINT *min, PLFLT *sec )
00181 {
00182     c_plconfigtime( *scale, *offset1, *offset2, *ccontrol, *ifbtime_offset, *year, *month, *day, *hour, *min, *sec );
00183 }
00184 
00185 void
00186 PLCPSTRM( PLINT *iplsr, PLBOOL *flags )
00187 {
00188     c_plcpstrm( *iplsr, *flags );
00189 }
00190 
00191 void
00192 PLCTIME( PLINT *year, PLINT *month, PLINT *day, PLINT *hour, PLINT *min, PLFLT *sec, PLFLT *ctime )
00193 {
00194     c_plctime( *year, *month, *day, *hour, *min, *sec, ctime );
00195 }
00196 
00197 void
00198 PLEND( void )
00199 {
00200     c_plend();
00201 }
00202 
00203 void
00204 PLEND1( void )
00205 {
00206     c_plend1();
00207 }
00208 
00209 void
00210 PLENV( PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax,
00211        PLINT *just, PLINT *axis )
00212 {
00213     c_plenv( *xmin, *xmax, *ymin, *ymax, *just, *axis );
00214 }
00215 
00216 void
00217 PLENV0( PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax,
00218         PLINT *just, PLINT *axis )
00219 {
00220     c_plenv0( *xmin, *xmax, *ymin, *ymax, *just, *axis );
00221 }
00222 
00223 void
00224 PLEOP( void )
00225 {
00226     c_pleop();
00227 }
00228 
00229 void
00230 PLERRX( PLINT *n, PLFLT *xmin, PLFLT *xmax, PLFLT *y )
00231 {
00232     c_plerrx( *n, xmin, xmax, y );
00233 }
00234 
00235 void
00236 PLERRY( PLINT *n, PLFLT *x, PLFLT *ymin, PLFLT *ymax )
00237 {
00238     c_plerry( *n, x, ymin, ymax );
00239 }
00240 
00241 void
00242 PLFAMADV( void )
00243 {
00244     c_plfamadv();
00245 }
00246 
00247 void
00248 PLFILL( PLINT *n, PLFLT *x, PLFLT *y )
00249 {
00250     c_plfill( *n, x, y );
00251 }
00252 
00253 void
00254 PLFILL3( PLINT *n, PLFLT *x, PLFLT *y, PLFLT *z )
00255 {
00256     c_plfill3( *n, x, y, z );
00257 }
00258 
00259 void
00260 PLFLUSH( void )
00261 {
00262     c_plflush();
00263 }
00264 
00265 void
00266 PLFONT( PLINT *font )
00267 {
00268     c_plfont( *font );
00269 }
00270 
00271 void
00272 PLFONTLD( PLINT *charset )
00273 {
00274     c_plfontld( *charset );
00275 }
00276 
00277 void
00278 PLGCHR( PLFLT *chrdef, PLFLT *chrht )
00279 {
00280     c_plgchr( chrdef, chrht );
00281 }
00282 
00283 void
00284 PLGCOL0( PLINT *icol0, PLINT *r, PLINT *g, PLINT *b )
00285 {
00286     c_plgcol0( *icol0, r, g, b );
00287 }
00288 
00289 void
00290 PLGCOL0A( PLINT *icol0, PLINT *r, PLINT *g, PLINT *b, PLFLT *a )
00291 {
00292     c_plgcol0a( *icol0, r, g, b, a );
00293 }
00294 
00295 void
00296 PLGCOLBG( PLINT *r, PLINT *g, PLINT *b )
00297 {
00298     c_plgcolbg( r, g, b );
00299 }
00300 
00301 void
00302 PLGCOLBGA( PLINT *r, PLINT *g, PLINT *b, PLFLT *a )
00303 {
00304     c_plgcolbga( r, g, b, a );
00305 }
00306 
00307 void
00308 PLGCOMPRESSION( PLINT *compression )
00309 {
00310     c_plgcompression( compression );
00311 }
00312 
00313 void
00314 PLGDEV7( char *dev, int length )
00315 {
00316     c_plgdev( dev );
00317 }
00318 
00319 void
00320 PLGDIDEV( PLFLT *p_mar, PLFLT *p_aspect, PLFLT *p_jx, PLFLT *p_jy )
00321 {
00322     c_plgdidev( p_mar, p_aspect, p_jx, p_jy );
00323 }
00324 
00325 void
00326 PLGDIORI( PLFLT *p_rot )
00327 {
00328     c_plgdiori( p_rot );
00329 }
00330 
00331 void
00332 PLGDIPLT( PLFLT *p_xmin, PLFLT *p_ymin, PLFLT *p_xmax, PLFLT *p_ymax )
00333 {
00334     c_plgdiplt( p_xmin, p_ymin, p_xmax, p_ymax );
00335 }
00336 
00337 void
00338 PLGFAM( PLINT *fam, PLINT *num, PLINT *bmax )
00339 {
00340     c_plgfam( fam, num, bmax );
00341 }
00342 
00343 // Note: Fortran does not distinguish between unsigned and signed integers
00344 // so the 32-bit PLUNICODE can be mapped to 4-byte Fortran integer outside
00345 // this routine.
00346 void
00347 PLGFCI( PLUNICODE *pfci )
00348 {
00349     c_plgfci( pfci );
00350 }
00351 
00352 void
00353 PLGFNAM7( char *fnam, int length )
00354 {
00355     c_plgfnam( fnam );
00356 }
00357 
00358 void
00359 PLGFONT( PLINT *family, PLINT *style, PLINT *weight )
00360 {
00361     c_plgfont( family, style, weight );
00362 }
00363 
00364 void
00365 PLGLEVEL( PLINT *level )
00366 {
00367     c_plglevel( level );
00368 }
00369 
00370 void
00371 PLGPAGE( PLFLT *xpmm, PLFLT *ypmm, PLINT *xwid, PLINT *ywid,
00372          PLINT *xoff, PLINT *yoff )
00373 {
00374     c_plgpage( xpmm, ypmm, xwid, ywid, xoff, yoff );
00375 }
00376 
00377 void
00378 PLGRA( void )
00379 {
00380     c_plgra();
00381 }
00382 
00383 void
00384 PLGRADIENT( PLINT *n, PLFLT *x, PLFLT *y, PLFLT *angle )
00385 {
00386     c_plgradient( *n, x, y, *angle );
00387 }
00388 
00389 void
00390 PLGSPA( PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax )
00391 {
00392     c_plgspa( xmin, xmax, ymin, ymax );
00393 }
00394 
00395 void
00396 PLGSTRM( PLINT *strm )
00397 {
00398     c_plgstrm( strm );
00399 }
00400 
00401 void
00402 PLGVER7( char *ver )
00403 {
00404     c_plgver( ver );
00405 }
00406 
00407 void
00408 PLGVPD( PLFLT *p_xmin, PLFLT *p_xmax, PLFLT *p_ymin, PLFLT *p_ymax )
00409 {
00410     c_plgvpd( p_xmin, p_xmax, p_ymin, p_ymax );
00411 }
00412 
00413 void
00414 PLGVPW( PLFLT *p_xmin, PLFLT *p_xmax, PLFLT *p_ymin, PLFLT *p_ymax )
00415 {
00416     c_plgvpw( p_xmin, p_xmax, p_ymin, p_ymax );
00417 }
00418 
00419 void
00420 PLGXAX( PLINT *digmax, PLINT *digits )
00421 {
00422     c_plgxax( digmax, digits );
00423 }
00424 
00425 void
00426 PLGYAX( PLINT *digmax, PLINT *digits )
00427 {
00428     c_plgyax( digmax, digits );
00429 }
00430 
00431 void
00432 PLGZAX( PLINT *digmax, PLINT *digits )
00433 {
00434     c_plgzax( digmax, digits );
00435 }
00436 
00437 void
00438 PLHIST( PLINT *n, PLFLT *data, PLFLT *datmin, PLFLT *datmax,
00439         PLINT *nbin, PLINT *oldwin )
00440 {
00441     c_plhist( *n, data, *datmin, *datmax, *nbin, *oldwin );
00442 }
00443 
00444 #ifdef PL_DEPRECATED
00445 void
00446 PLHLS( PLFLT *hue, PLFLT *light, PLFLT *sat )
00447 {
00448     c_plhls( *hue, *light, *sat );
00449 }
00450 #endif  // PL_DEPRECATED
00451 
00452 void
00453 PLHLSRGB( PLFLT *h, PLFLT *l, PLFLT *s, PLFLT *r, PLFLT *g, PLFLT *b )
00454 {
00455     c_plhlsrgb( *h, *l, *s, r, g, b );
00456 }
00457 
00458 void
00459 PLIMAGE( PLFLT *idata, PLINT *nx, PLINT *ny,
00460          PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLFLT *zmin, PLFLT *zmax,
00461          PLFLT *Dxmin, PLFLT *Dxmax, PLFLT *Dymin, PLFLT *Dymax, PLINT *lx )
00462 {
00463     int   i, j;
00464     PLFLT **pidata;
00465 
00466     plAlloc2dGrid( &pidata, *nx, *ny );
00467 
00468     for ( i = 0; i < *nx; i++ )
00469     {
00470         for ( j = 0; j < *ny; j++ )
00471         {
00472             pidata[i][j] = idata[i + j * ( *lx )];
00473         }
00474     }
00475 
00476     c_plimage( (const PLFLT **) pidata, *nx, *ny,
00477         *xmin, *xmax, *ymin, *ymax, *zmin, *zmax,
00478         *Dxmin, *Dxmax, *Dymin, *Dymax );
00479 
00480     plFree2dGrid( pidata, *nx, *ny );
00481 }
00482 
00483 void
00484 PLINIT( void )
00485 {
00486     c_plinit();
00487 }
00488 
00489 void
00490 PLJOIN( PLFLT *x1, PLFLT *y1, PLFLT *x2, PLFLT *y2 )
00491 {
00492     c_pljoin( *x1, *y1, *x2, *y2 );
00493 }
00494 
00495 void
00496 PLLAB7( const char *xlab, const char *ylab, const char *title )
00497 {
00498     c_pllab( xlab, ylab, title );
00499 }
00500 
00501 static void
00502 pllabelfuncf2c( PLINT axis, PLFLT value, char *label, PLINT length, PLPointer data )
00503 {
00504     int i;
00505 
00506     // (AM) Note the hidden argument "length" - it ensures that the string "label"
00507     // is recognised to have that length
00508     //
00509     ( *pllabelfunc )( &axis, &value, label, &length, length );
00510 
00511     // Ensure string is null terminated
00512     i = length - 1;
00513     while ( ( i >= 0 ) && ( label[i] == ' ' ) )
00514         i--;
00515     label[i + 1] = '\0';
00516 }
00517 
00518 // Auxiliary function to create a C-compatible string array
00519 // Note the hidden argument
00520 void
00521 PLLEGEND_CNV_TEXT( PLINT *id, PLINT *number, char *string, PLINT length )
00522 {
00523     int  j;
00524     int  i;
00525     char **p_string;
00526     char *data;
00527 
00528     // Ensure the strings are null terminated
00529 
00530     p_string = (char **) malloc( sizeof ( char * ) * ( *number ) );
00531     data     = (char *) malloc( sizeof ( char * ) * ( *number ) * ( length + 1 ) );
00532 
00533     for ( j = 0; j < ( *number ); j++ )
00534     {
00535         p_string[j] = data + j * ( length + 1 );
00536         memcpy( p_string[j], &string[j * length], length );
00537         p_string[j][length] = '\0';
00538         i = length - 1;
00539         while ( ( i >= 0 ) && ( p_string[j][i] == ' ' ) )
00540             i--;
00541         p_string[j][i + 1] = '\0';
00542     }
00543 
00544     if ( *id == 1 )
00545     {
00546         pllegend_text = p_string;
00547     }
00548     else
00549     {
00550         pllegend_symbols = p_string;
00551     }
00552 }
00553 
00554 void PLLEGEND(
00555     PLFLT *p_legend_width, PLFLT *p_legend_height,
00556     PLINT *opt, PLINT *position, PLFLT *x, PLFLT *y, PLFLT *plot_width,
00557     PLINT *bg_color, PLINT *bb_color, PLINT *bb_style,
00558     PLINT *nrow, PLINT *ncolumn,
00559     PLINT *nlegend, const PLINT *opt_array,
00560     PLFLT *text_offset, PLFLT *text_scale, PLFLT *text_spacing,
00561     PLFLT *text_justification,
00562     const PLINT *text_colors,
00563     const PLINT *box_colors, const PLINT *box_patterns,
00564     const PLFLT *box_scales, const PLINT *box_line_widths,
00565     const PLINT *line_colors, const PLINT *line_styles,
00566     const PLINT *line_widths,
00567     const PLINT *symbol_colors, const PLFLT *symbol_scales,
00568     const PLINT *symbol_numbers )
00569 {
00570     c_pllegend( p_legend_width, p_legend_height,
00571         *opt, *position, *x, *y, *plot_width,
00572         *bg_color, *bb_color, *bb_style,
00573         *nrow, *ncolumn,
00574         *nlegend, opt_array,
00575         *text_offset, *text_scale, *text_spacing,
00576         *text_justification,
00577         text_colors, (const char **) pllegend_text,
00578         box_colors, box_patterns,
00579         box_scales, box_line_widths,
00580         line_colors, line_styles,
00581         line_widths,
00582         symbol_colors, symbol_scales,
00583         symbol_numbers, (const char **) pllegend_symbols );
00584 
00585     free( *pllegend_text );
00586     free( pllegend_text );
00587     free( *pllegend_symbols );
00588     free( pllegend_symbols );
00589 }
00590 
00591 void
00592 PLLIGHTSOURCE( PLFLT *x, PLFLT *y, PLFLT *z )
00593 {
00594     c_pllightsource( *x, *y, *z );
00595 }
00596 
00597 void
00598 PLLINE( PLINT *n, PLFLT *x, PLFLT *y )
00599 {
00600     c_plline( *n, x, y );
00601 }
00602 
00603 void
00604 PLLINE3( PLINT *n, PLFLT *x, PLFLT *y, PLFLT *z )
00605 {
00606     c_plline3( *n, x, y, z );
00607 }
00608 
00609 void
00610 PLLSTY( PLINT *lin )
00611 {
00612     c_pllsty( *lin );
00613 }
00614 
00615 static void
00616 plmapf2c( PLINT n, PLFLT *x, PLFLT *y )
00617 {
00618     ( *plmapform )( &n, x, y );
00619 }
00620 
00621 void
00622 PLMAP7( const char *type,
00623         PLFLT *minlong, PLFLT *maxlong, PLFLT *minlat, PLFLT *maxlat )
00624 
00625 {
00626     if ( plmapform )
00627         c_plmap( plmapf2c, type, *minlong, *maxlong, *minlat, *maxlat );
00628     else
00629         c_plmap( NULL, type, *minlong, *maxlong, *minlat, *maxlat );
00630 }
00631 
00632 
00633 void
00634 PLMERIDIANS7( PLFLT *dlong, PLFLT *dlat,
00635               PLFLT *minlong, PLFLT *maxlong, PLFLT *minlat, PLFLT *maxlat )
00636 {
00637     if ( plmapform )
00638         c_plmeridians( plmapf2c, *dlong, *dlat, *minlong, *maxlong, *minlat, *maxlat );
00639     else
00640         c_plmeridians( NULL, *dlong, *dlat, *minlong, *maxlong, *minlat, *maxlat );
00641 }
00642 
00643 void
00644 PLMKSTRM( PLINT *p_strm )
00645 {
00646     c_plmkstrm( p_strm );
00647 }
00648 
00649 void
00650 PLMTEX7( const char *side, PLFLT *disp, PLFLT *pos, PLFLT *just, const char *text )
00651 {
00652     c_plmtex( side, *disp, *pos, *just, text );
00653 }
00654 
00655 void
00656 PLMTEX37( const char *side, PLFLT *disp, PLFLT *pos, PLFLT *just, const char *text )
00657 {
00658     c_plmtex3( side, *disp, *pos, *just, text );
00659 }
00660 
00661 void
00662 PLPARSEOPTS7( int *numargs, const char *iargs, PLINT *mode, PLINT *maxindex )
00663 {
00664 // Same as in plparseopts fortran subroutine that calls this one.
00665 #define MAXARGS    20
00666     if ( *numargs <= MAXARGS )
00667     {
00668         const char *argv[MAXARGS];
00669         int        i;
00670         for ( i = 0; i < *numargs; i++ )
00671         {
00672             argv[i] = iargs + ( i * *maxindex );
00673 //       fprintf(stderr, "%d - %s\n", i, argv[i]);
00674         }
00675         c_plparseopts( numargs, argv, *mode );
00676     }
00677     else
00678         fprintf( stderr, "plparseopts7: numargs too large\n" );
00679 }
00680 
00681 void
00682 PLPAT( PLINT *nlin, PLINT *inc, PLINT *del )
00683 {
00684     c_plpat( *nlin, inc, del );
00685 }
00686 
00687 void
00688 PLPOIN( PLINT *n, PLFLT *x, PLFLT *y, PLINT *code )
00689 {
00690     c_plpoin( *n, x, y, *code );
00691 }
00692 
00693 void
00694 PLPOIN3( PLINT *n, PLFLT *x, PLFLT *y, PLFLT *z, PLINT *code )
00695 {
00696     c_plpoin3( *n, x, y, z, *code );
00697 }
00698 
00699 void
00700 PLPOLY3( PLINT *n, PLFLT *x, PLFLT *y, PLFLT *z, PLBOOL *draw, PLBOOL *ifcc )
00701 {
00702     c_plpoly3( *n, x, y, z, draw, *ifcc );
00703 }
00704 
00705 void
00706 PLPREC( PLINT *setp, PLINT *prec )
00707 {
00708     c_plprec( *setp, *prec );
00709 }
00710 
00711 void
00712 PLPSTY( PLINT *patt )
00713 {
00714     c_plpsty( *patt );
00715 }
00716 
00717 void
00718 PLPTEX7( PLFLT *x, PLFLT *y, PLFLT *dx, PLFLT *dy, PLFLT *just, const char *text )
00719 {
00720     c_plptex( *x, *y, *dx, *dy, *just, text );
00721 }
00722 
00723 void
00724 PLPTEX37(
00725     PLFLT *x, PLFLT *y, PLFLT *z,
00726     PLFLT *dx, PLFLT *dy, PLFLT *dz,
00727     PLFLT *sx, PLFLT *sy, PLFLT *sz,
00728     PLFLT *just, const char *text )
00729 {
00730     c_plptex3( *x, *y, *z, *dx, *dy, *dz, *sx, *sy, *sz, *just, text );
00731 }
00732 
00733 PLFLT
00734 PLRANDD()
00735 {
00736     return c_plrandd();
00737 }
00738 
00739 void
00740 PLREPLOT( void )
00741 {
00742     c_plreplot();
00743 }
00744 
00745 #ifdef PL_DEPRECATED
00746 void
00747 PLRGB( PLFLT *red, PLFLT *green, PLFLT *blue )
00748 {
00749     c_plrgb( *red, *green, *blue );
00750 }
00751 #endif  // PL_DEPRECATED
00752 
00753 #ifdef PL_DEPRECATED
00754 void
00755 PLRGB1( PLINT *r, PLINT *g, PLINT *b )
00756 {
00757     c_plrgb1( *r, *g, *b );
00758 }
00759 #endif  // PL_DEPRECATED
00760 
00761 void
00762 PLRGBHLS( PLFLT *r, PLFLT *g, PLFLT *b, PLFLT *h, PLFLT *l, PLFLT *s )
00763 {
00764     c_plrgbhls( *r, *g, *b, h, l, s );
00765 }
00766 
00767 void
00768 PLSCHR( PLFLT *def, PLFLT *scale )
00769 {
00770     c_plschr( *def, *scale );
00771 }
00772 
00773 void
00774 PLSCMAP0( PLINT *r, PLINT *g, PLINT *b, PLINT *ncol0 )
00775 {
00776     c_plscmap0( r, g, b, *ncol0 );
00777 }
00778 
00779 void
00780 PLSCMAP0A( PLINT *r, PLINT *g, PLINT *b, PLFLT *a, PLINT *ncol0 )
00781 {
00782     c_plscmap0a( r, g, b, a, *ncol0 );
00783 }
00784 
00785 void
00786 PLSCMAP0N( PLINT *n )
00787 {
00788     c_plscmap0n( *n );
00789 }
00790 
00791 void
00792 PLSCMAP1( PLINT *r, PLINT *g, PLINT *b, PLINT *ncol1 )
00793 {
00794     c_plscmap1( r, g, b, *ncol1 );
00795 }
00796 
00797 void
00798 PLSCMAP1A( PLINT *r, PLINT *g, PLINT *b, PLFLT *a, PLINT *ncol1 )
00799 {
00800     c_plscmap1a( r, g, b, a, *ncol1 );
00801 }
00802 
00803 void
00804 PLSCMAP1L( PLBOOL *itype, PLINT *npts, PLFLT *intensity,
00805            PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLBOOL *rev )
00806 {
00807     c_plscmap1l( *itype, *npts, intensity, coord1, coord2, coord3, rev );
00808 }
00809 
00810 void
00811 PLSCMAP1LA( PLBOOL *itype, PLINT *npts, PLFLT *intensity,
00812             PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLFLT *a, PLBOOL *rev )
00813 {
00814     c_plscmap1la( *itype, *npts, intensity, coord1, coord2, coord3, a, rev );
00815 }
00816 
00817 void
00818 PLSCMAP1N( PLINT *n )
00819 {
00820     c_plscmap1n( *n );
00821 }
00822 
00823 void
00824 PLSCOL0( PLINT *icol0, PLINT *r, PLINT *g, PLINT *b )
00825 {
00826     c_plscol0( *icol0, *r, *g, *b );
00827 }
00828 
00829 void
00830 PLSCOL0A( PLINT *icol0, PLINT *r, PLINT *g, PLINT *b, PLFLT *a )
00831 {
00832     c_plscol0a( *icol0, *r, *g, *b, *a );
00833 }
00834 
00835 void
00836 PLSCOLBG( PLINT *r, PLINT *g, PLINT *b )
00837 {
00838     c_plscolbg( *r, *g, *b );
00839 }
00840 
00841 void
00842 PLSCOLBGA( PLINT *r, PLINT *g, PLINT *b, PLFLT *a )
00843 {
00844     c_plscolbga( *r, *g, *b, *a );
00845 }
00846 
00847 void
00848 PLSCOLOR( PLINT *color )
00849 {
00850     c_plscolor( *color );
00851 }
00852 
00853 void
00854 PLSCOMPRESSION( PLINT *compression )
00855 {
00856     c_plscompression( *compression );
00857 }
00858 
00859 void
00860 PLSDEV7( const char *dev )
00861 {
00862     c_plsdev( dev );
00863 }
00864 
00865 void
00866 PLSDIDEV( PLFLT *mar, PLFLT *aspect, PLFLT *jx, PLFLT *jy )
00867 {
00868     c_plsdidev( *mar, *aspect, *jx, *jy );
00869 }
00870 
00871 void
00872 PLSDIMAP( PLINT *dimxmin, PLINT *dimxmax, PLINT *dimymin, PLINT *dimymax,
00873           PLFLT *dimxpmm, PLFLT *dimypmm )
00874 {
00875     c_plsdimap( *dimxmin, *dimxmax, *dimymin, *dimymax,
00876         *dimxpmm, *dimypmm );
00877 }
00878 
00879 void
00880 PLSDIORI( PLFLT *rot )
00881 {
00882     c_plsdiori( *rot );
00883 }
00884 
00885 void
00886 PLSDIPLT( PLFLT *xmin, PLFLT *ymin, PLFLT *xmax, PLFLT *ymax )
00887 {
00888     c_plsdiplt( *xmin, *ymin, *xmax, *ymax );
00889 }
00890 
00891 void
00892 PLSDIPLZ( PLFLT *xmin, PLFLT *ymin, PLFLT *xmax, PLFLT *ymax )
00893 {
00894     c_plsdiplz( *xmin, *ymin, *xmax, *ymax );
00895 }
00896 
00897 void
00898 PLSEED( unsigned int *s )
00899 {
00900     c_plseed( *s );
00901 }
00902 
00903 void
00904 PLSESC( PLINT *esc )
00905 {
00906     c_plsesc( (char) *esc );
00907 }
00908 
00909 // Auxiliary routine - not to be used publicly
00910 //
00911 #define    PLSETMAPFORMC      FNAME( PLSETMAPFORMC, plsetmapformc )
00912 #define    PLCLEARMAPFORMC    FNAME( PLCLEARMAPFORMC, plclearmapformc )
00913 void
00914 PLSETMAPFORMC( void ( STDCALL *mapform )( PLINT *, PLFLT *, PLFLT * ) )
00915 {
00916     plmapform = mapform;
00917 }
00918 
00919 void
00920 PLCLEARMAPFORMC( )
00921 {
00922     plmapform = NULL;
00923 }
00924 
00925 void
00926 PLSETOPT7( const char *opt, const char *optarg )
00927 {
00928     c_plsetopt( opt, optarg );
00929 }
00930 
00931 void
00932 PLSFAM( PLINT *fam, PLINT *num, PLINT *bmax )
00933 {
00934     c_plsfam( *fam, *num, *bmax );
00935 }
00936 
00937 // Note: Fortran does not distinguish between unsigned and signed integers
00938 // so the 32-bit PLUNICODE can be mapped to 4-byte Fortran integer outside
00939 // this routine.
00940 void
00941 PLSFCI( PLUNICODE *fci )
00942 {
00943     c_plsfci( *fci );
00944 }
00945 
00946 void
00947 PLSFNAM7( const char *fnam )
00948 {
00949     c_plsfnam( fnam );
00950 }
00951 
00952 void
00953 PLSFONT( PLINT *family, PLINT *style, PLINT *weight )
00954 {
00955     c_plsfont( *family, *style, *weight );
00956 }
00957 
00958 void
00959 PLSLABELFUNC( void ( STDCALL *labelfunc )( PLINT *, PLFLT *, char *, PLINT *, PLINT ) )
00960 {
00961     pllabelfunc = labelfunc;
00962     // N.B. neglect pointer to additional data for f77
00963     c_plslabelfunc( pllabelfuncf2c, NULL );
00964 }
00965 
00966 void
00967 PLSLABELFUNC_NONE( void )
00968 {
00969     pllabelfunc = NULL;
00970     c_plslabelfunc( NULL, NULL );
00971 }
00972 
00973 void
00974 PLSLABELFUNC_NONEa( void )
00975 {
00976     pllabelfunc = NULL;
00977     c_plslabelfunc( NULL, NULL );
00978 }
00979 
00980 void
00981 PLSMAJ( PLFLT *def, PLFLT *scale )
00982 {
00983     c_plsmaj( *def, *scale );
00984 }
00985 
00986 void
00987 PLSMEM( PLINT *maxx, PLINT *maxy, void *plotmem )
00988 {
00989     c_plsmem( *maxx, *maxy, plotmem );
00990 }
00991 
00992 void
00993 PLSMEMA( PLINT *maxx, PLINT *maxy, void *plotmem )
00994 {
00995     c_plsmema( *maxx, *maxy, plotmem );
00996 }
00997 
00998 void
00999 PLSMIN( PLFLT *def, PLFLT *scale )
01000 {
01001     c_plsmin( *def, *scale );
01002 }
01003 
01004 void
01005 PLSORI( PLINT *ori )
01006 {
01007     c_plsori( *ori );
01008 }
01009 
01010 void
01011 PLSPAGE( PLFLT *xpmm, PLFLT *ypmm,
01012          PLINT *xwid, PLINT *ywid, PLINT *xoff, PLINT *yoff )
01013 {
01014     c_plspage( *xpmm, *ypmm, *xwid, *ywid, *xoff, *yoff );
01015 }
01016 
01017 void
01018 PLSPAL07( const char *filename )
01019 {
01020     c_plspal0( filename );
01021 }
01022 
01023 void
01024 PLSPAL17( const char *filename, PLBOOL *interpolate )
01025 {
01026     c_plspal1( filename, *interpolate );
01027 }
01028 
01029 void
01030 PLSPAUSE( PLBOOL *pause )
01031 {
01032     c_plspause( *pause );
01033 }
01034 
01035 void
01036 PLSSTRM( PLINT *strm )
01037 {
01038     c_plsstrm( *strm );
01039 }
01040 
01041 void
01042 PLSSUB( PLINT *nx, PLINT *ny )
01043 {
01044     c_plssub( *nx, *ny );
01045 }
01046 
01047 void
01048 PLSSYM( PLFLT *def, PLFLT *scale )
01049 {
01050     c_plssym( *def, *scale );
01051 }
01052 
01053 void
01054 PLSTAR( PLINT *nx, PLINT *ny )
01055 {
01056     c_plstar( *nx, *ny );
01057 }
01058 
01059 void
01060 PLSTART7( const char *devname, PLINT *nx, PLINT *ny )
01061 {
01062     c_plstart( devname, *nx, *ny );
01063 }
01064 
01065 void
01066 PLSTRANSFORM( void ( STDCALL *transformfunc )( PLFLT *, PLFLT *, PLFLT *, PLFLT * ) )
01067 {
01068     pltransform = transformfunc;
01069     // N.B. neglect pointer to additional data for f77
01070     c_plstransform( pltransformf2c, NULL );
01071 }
01072 
01073 void
01074 PLSTRANSFORM_NONE( void )
01075 {
01076     pltransform = NULL;
01077     c_plstransform( NULL, NULL );
01078 }
01079 
01080 void
01081 PLSTRANSFORM_NONE_( void )
01082 {
01083     pltransform = NULL;
01084     c_plstransform( NULL, NULL );
01085 }
01086 
01087 void
01088 PLSTRING7( PLINT *n, PLFLT *x, PLFLT *y, const char *string )
01089 {
01090     c_plstring( *n, x, y, string );
01091 }
01092 
01093 void
01094 PLSTRING37( PLINT *n, PLFLT *x, PLFLT *y, PLFLT *z, const char *string )
01095 {
01096     c_plstring3( *n, x, y, z, string );
01097 }
01098 
01099 void
01100 PLSTRIPA( PLINT *id, PLINT *pen, PLFLT *x, PLFLT *y )
01101 {
01102     c_plstripa( *id, *pen, *x, *y );
01103 }
01104 
01105 void
01106 PLSTRIPC7( PLINT *id, const char *xspec, const char *yspec,
01107            PLFLT *xmin, PLFLT *xmax, PLFLT *xjump, PLFLT *ymin, PLFLT *ymax,
01108            PLFLT *xlpos, PLFLT *ylpos,
01109            PLBOOL *y_ascl, PLBOOL *acc,
01110            PLINT *colbox, PLINT *collab,
01111            PLINT *colline, PLINT *styline,
01112            const char *legline0, const char *legline1,
01113            const char *legline2, const char *legline3,
01114            const char *labx, const char *laby, const char *labtop )
01115 {
01116     const char* legline[4];
01117     legline[0] = legline0;
01118     legline[1] = legline1;
01119     legline[2] = legline2;
01120     legline[3] = legline3;
01121 
01122     c_plstripc( id, xspec, yspec,
01123         *xmin, *xmax, *xjump, *ymin, *ymax,
01124         *xlpos, *ylpos,
01125         *y_ascl, *acc,
01126         *colbox, *collab,
01127         colline, styline, legline,
01128         labx, laby, labtop );
01129 }
01130 
01131 void
01132 PLSTRIPD( PLINT *id )
01133 {
01134     c_plstripd( *id );
01135 }
01136 
01137 void
01138 PLSTYL( PLINT *n, PLINT *mark, PLINT *space )
01139 {
01140     c_plstyl( *n, mark, space );
01141 }
01142 
01143 void
01144 PLSVECT( PLFLT *arrowx, PLFLT *arrowy, PLINT *npts, PLBOOL *fill )
01145 {
01146     c_plsvect( arrowx, arrowy, *npts, *fill );
01147 }
01148 
01149 void
01150 PLSVPA( PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax )
01151 {
01152     c_plsvpa( *xmin, *xmax, *ymin, *ymax );
01153 }
01154 
01155 void
01156 PLSXAX( PLINT *digmax, PLINT *digits )
01157 {
01158     c_plsxax( *digmax, *digits );
01159 }
01160 
01161 void
01162 PLSYAX( PLINT *digmax, PLINT *digits )
01163 {
01164     c_plsyax( *digmax, *digits );
01165 }
01166 
01167 void
01168 PLSYM( PLINT *n, PLFLT *x, PLFLT *y, PLINT *code )
01169 {
01170     c_plsym( *n, x, y, *code );
01171 }
01172 
01173 void
01174 PLSZAX( PLINT *digmax, PLINT *digits )
01175 {
01176     c_plszax( *digmax, *digits );
01177 }
01178 
01179 void
01180 PLTEXT( void )
01181 {
01182     c_pltext();
01183 }
01184 
01185 void
01186 PLTIMEFMT7( const char *fmt )
01187 {
01188     c_pltimefmt( fmt );
01189 }
01190 
01191 void
01192 PLVASP( PLFLT *aspect )
01193 {
01194     c_plvasp( *aspect );
01195 }
01196 
01197 void
01198 PLVPAS( PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLFLT *aspect )
01199 {
01200     c_plvpas( *xmin, *xmax, *ymin, *ymax, *aspect );
01201 }
01202 
01203 void
01204 PLVPOR( PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax )
01205 {
01206     c_plvpor( *xmin, *xmax, *ymin, *ymax );
01207 }
01208 
01209 void
01210 PLVSTA( void )
01211 {
01212     c_plvsta();
01213 }
01214 
01215 void
01216 PLW3D( PLFLT *basex, PLFLT *basey, PLFLT *height,
01217        PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax,
01218        PLFLT *zmin, PLFLT *zmax,
01219        PLFLT *alt, PLFLT *az )
01220 {
01221     c_plw3d( *basex, *basey, *height,
01222         *xmin, *xmax, *ymin, *ymax, *zmin, *zmax, *alt, *az );
01223 }
01224 
01225 void
01226 PLWID( PLINT *width )
01227 {
01228     c_plwid( *width );
01229 }
01230 
01231 void
01232 PLWIND( PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax )
01233 {
01234     c_plwind( *xmin, *xmax, *ymin, *ymax );
01235 }
01236 
01237 void
01238 PLXORMOD( PLBOOL *mode, PLBOOL *status )
01239 {
01240     c_plxormod( *mode, status );
01241 }

Generated on Wed Oct 12 2011 20:42:23 for PLplot by  doxygen 1.7.1