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