From: <and...@us...> - 2011-12-03 08:56:24
|
Revision: 12095 http://plplot.svn.sourceforge.net/plplot/?rev=12095&view=rev Author: andrewross Date: 2011-12-03 08:56:15 +0000 (Sat, 03 Dec 2011) Log Message: ----------- Large changes to functions taking 2-d arrays to convert from (const PLFLT **) to (const PLFLT * const *) . Use of const PLFLT ** is not really safe (generates gcc warnings) as it only ensure the data is unchanged, not the arrays of pointers. It is therefore trivial to change the array contents by changing the pointers. This is not generally what is intended. Modified Paths: -------------- trunk/bindings/c++/plstream.cc trunk/bindings/f77/sc3d.c trunk/bindings/f77/sccont.c trunk/bindings/f77/scstubs.c trunk/bindings/f95/sc3d.c trunk/bindings/f95/sccont.c trunk/bindings/f95/scstubs.c trunk/drivers/cairo.c trunk/examples/c/x08c.c trunk/examples/c/x09c.c trunk/examples/c/x11c.c trunk/examples/c/x14c.c trunk/examples/c/x16c.c trunk/examples/c/x20c.c trunk/examples/c/x21c.c trunk/examples/c/x22c.c trunk/examples/c/x28c.c trunk/examples/c/x33c.c trunk/examples/tk/xtk01.c trunk/include/plplot.h trunk/include/plplotP.h trunk/src/pdfutils.c trunk/src/plcont.c trunk/src/plgradient.c trunk/src/plimage.c trunk/src/pllegend.c trunk/src/plot3d.c trunk/src/plshade.c trunk/src/plvect.c Modified: trunk/bindings/c++/plstream.cc =================================================================== --- trunk/bindings/c++/plstream.cc 2011-12-03 08:35:52 UTC (rev 12094) +++ trunk/bindings/c++/plstream.cc 2011-12-03 08:56:15 UTC (rev 12095) @@ -335,7 +335,7 @@ { set_stream(); - plvect( (const PLFLT **) u, (const PLFLT **) v, nx, ny, scale, pltr, pltr_data ); + plvect( u, v, nx, ny, scale, pltr, pltr_data ); } void @@ -502,7 +502,7 @@ { set_stream(); - plcont( (const PLFLT **) f, nx, ny, kx, lx, ky, ly, clevel, nlevel, + plcont( f, nx, ny, kx, lx, ky, ly, clevel, nlevel, pltr, pltr_data ); } @@ -1095,7 +1095,7 @@ { set_stream(); - plmesh( x, y, (const PLFLT **) z, nx, ny, opt ); + plmesh( x, y, z, nx, ny, opt ); } // Plots a mesh representation of the function z[x][y] with contour. @@ -1105,7 +1105,7 @@ { set_stream(); - plmeshc( x, y, (const PLFLT **) z, nx, ny, opt, clevel, nlevel ); + plmeshc( x, y, z, nx, ny, opt, clevel, nlevel ); } // Creates a new stream and makes it the default. @@ -1145,7 +1145,7 @@ { set_stream(); - plsurf3d( x, y, (const PLFLT **) z, nx, ny, opt, clevel, nlevel ); + plsurf3d( x, y, z, nx, ny, opt, clevel, nlevel ); } // Plots a 3-d shaded representation of the function z[x][y] with @@ -1159,7 +1159,7 @@ { set_stream(); - plsurf3dl( x, y, (const PLFLT **) z, nx, ny, opt, clevel, nlevel, ixstart, ixn, + plsurf3dl( x, y, z, nx, ny, opt, clevel, nlevel, ixstart, ixn, indexymin, indexymax ); } @@ -1170,7 +1170,7 @@ { set_stream(); - ::plot3d( x, y, (const PLFLT **) z, nx, ny, opt, (PLBOOL) side ); + ::plot3d( x, y, z, nx, ny, opt, (PLBOOL) side ); } // Deprecated version using PLINT not bool @@ -1179,7 +1179,7 @@ { set_stream(); - ::plot3d( x, y, (const PLFLT **) z, nx, ny, opt, (PLBOOL) side ); + ::plot3d( x, y, z, nx, ny, opt, (PLBOOL) side ); } // Plots a 3-d representation of the function z[x][y] with contour. @@ -1190,7 +1190,7 @@ { set_stream(); - ::plot3dc( x, y, (const PLFLT **) z, nx, ny, opt, clevel, nlevel ); + ::plot3dc( x, y, z, nx, ny, opt, clevel, nlevel ); } // Plots a 3-d representation of the function z[x][y] with contour @@ -1204,7 +1204,7 @@ { set_stream(); - ::plot3dcl( x, y, (const PLFLT **) z, nx, ny, opt, clevel, nlevel, ixstart, ixn, + ::plot3dcl( x, y, z, nx, ny, opt, clevel, nlevel, ixstart, ixn, indexymin, indexymax ); } @@ -1698,7 +1698,7 @@ { set_stream(); - plshade( (const PLFLT **) a, nx, ny, defined, left, right, bottom, top, + plshade( a, nx, ny, defined, left, right, bottom, top, shade_min, shade_max, sh_cmap, sh_color, sh_width, min_color, min_width, max_color, max_width, @@ -1720,7 +1720,7 @@ { set_stream(); - plshade( (const PLFLT **) a, nx, ny, defined, left, right, bottom, top, + plshade( a, nx, ny, defined, left, right, bottom, top, shade_min, shade_max, sh_cmap, sh_color, sh_width, min_color, min_width, max_color, max_width, @@ -1739,7 +1739,7 @@ { set_stream(); - plshades( (const PLFLT **) a, nx, ny, defined, xmin, xmax, ymin, ymax, + plshades( a, nx, ny, defined, xmin, xmax, ymin, ymax, clevel, nlevel, fill_width, cont_color, cont_width, fill, (PLBOOL) rectangular, pltr, pltr_data ); } @@ -1757,7 +1757,7 @@ { set_stream(); - plshades( (const PLFLT **) a, nx, ny, defined, xmin, xmax, ymin, ymax, + plshades( a, nx, ny, defined, xmin, xmax, ymin, ymax, clevel, nlevel, fill_width, cont_color, cont_width, fill, (PLBOOL) rectangular, pltr, pltr_data ); } @@ -2161,7 +2161,7 @@ { set_stream(); - plimage( (const PLFLT **) data, nx, ny, xmin, xmax, ymin, ymax, zmin, zmax, + plimage( data, nx, ny, xmin, xmax, ymin, ymax, zmin, zmax, Dxmin, Dxmax, Dymin, Dymax ); } @@ -2175,7 +2175,7 @@ { set_stream(); - plimagefr( (const PLFLT **) data, nx, ny, xmin, xmax, ymin, ymax, zmin, zmax, + plimagefr( data, nx, ny, xmin, xmax, ymin, ymax, zmin, zmax, valuemin, valuemax, pltr, pltr_data ); } @@ -2690,7 +2690,7 @@ { set_stream(); - ::plMinMax2dGrid( (const PLFLT **) f, nx, ny, fmax, fmin ); + ::plMinMax2dGrid( f, nx, ny, fmax, fmin ); } // Functions for converting between HLS and RGB color space Modified: trunk/bindings/f77/sc3d.c =================================================================== --- trunk/bindings/f77/sc3d.c 2011-12-03 08:35:52 UTC (rev 12094) +++ trunk/bindings/f77/sc3d.c 2011-12-03 08:56:15 UTC (rev 12095) @@ -42,7 +42,7 @@ } } - c_plot3dc( x, y, (const PLFLT **) a, *nx, *ny, *opt, clevel, *nlevel ); + c_plot3dc( x, y, (const PLFLT * const *) a, *nx, *ny, *opt, clevel, *nlevel ); // Clean up memory allocated for a plFree2dGrid( a, *nx, *ny ); @@ -93,7 +93,7 @@ for ( j = 0; j < *ny; j++ ) temp[i][j] = *( z + j * *lx + i ); - c_plsurf3d( x, y, (const PLFLT **) temp, *nx, *ny, *opt, clevel, *nlevel ); + c_plsurf3d( x, y, (const PLFLT * const *) temp, *nx, *ny, *opt, clevel, *nlevel ); for ( i = 0; i < *nx; i++ ) free( (void *) temp[i] ); Modified: trunk/bindings/f77/sccont.c =================================================================== --- trunk/bindings/f77/sccont.c 2011-12-03 08:35:52 UTC (rev 12094) +++ trunk/bindings/f77/sccont.c 2011-12-03 08:56:15 UTC (rev 12095) @@ -565,7 +565,7 @@ } } - c_plimagefr( (const PLFLT **) pidata, *nx, *ny, + c_plimagefr( (const PLFLT * const *) pidata, *nx, *ny, *xmin, *xmax, *ymin, *ymax, *zmin, *zmax, *valuemin, *valuemax, pltr0, NULL ); @@ -597,7 +597,7 @@ } } - c_plimagefr( (const PLFLT **) pidata, *nx, *ny, + c_plimagefr( (const PLFLT * const *) pidata, *nx, *ny, *xmin, *xmax, *ymin, *ymax, *zmin, *zmax, *valuemin, *valuemax, pltr1, (void *) &cgrid ); @@ -637,7 +637,7 @@ } } - c_plimagefr( (const PLFLT **) pidata, *nx, *ny, + c_plimagefr( (const PLFLT * const *) pidata, *nx, *ny, *xmin, *xmax, *ymin, *ymax, *zmin, *zmax, *valuemin, *valuemax, pltr2, (void *) &cgrid2 ); @@ -665,7 +665,7 @@ } } - c_plimagefr( (const PLFLT **) pidata, *nx, *ny, + c_plimagefr( (const PLFLT * const *) pidata, *nx, *ny, *xmin, *xmax, *ymin, *ymax, *zmin, *zmax, *valuemin, *valuemax, pltr, (void *) ftr ); Modified: trunk/bindings/f77/scstubs.c =================================================================== --- trunk/bindings/f77/scstubs.c 2011-12-03 08:35:52 UTC (rev 12094) +++ trunk/bindings/f77/scstubs.c 2011-12-03 08:56:15 UTC (rev 12095) @@ -473,7 +473,7 @@ } } - c_plimage( (const PLFLT **) pidata, *nx, *ny, + c_plimage( (const PLFLT * const *) pidata, *nx, *ny, *xmin, *xmax, *ymin, *ymax, *zmin, *zmax, *Dxmin, *Dxmax, *Dymin, *Dymax ); @@ -574,13 +574,13 @@ *nlegend, opt_array, *text_offset, *text_scale, *text_spacing, *text_justification, - text_colors, (const char **) pllegend_text, + text_colors, (const char * const *) pllegend_text, box_colors, box_patterns, box_scales, box_line_widths, line_colors, line_styles, line_widths, symbol_colors, symbol_scales, - symbol_numbers, (const char **) pllegend_symbols ); + symbol_numbers, (const char * const *) pllegend_symbols ); free( *pllegend_text ); free( pllegend_text ); Modified: trunk/bindings/f95/sc3d.c =================================================================== --- trunk/bindings/f95/sc3d.c 2011-12-03 08:35:52 UTC (rev 12094) +++ trunk/bindings/f95/sc3d.c 2011-12-03 08:56:15 UTC (rev 12095) @@ -60,7 +60,7 @@ } } - c_plot3dc( x, y, (const PLFLT **) a, *nx, *ny, *opt, clevel, *nlevel ); + c_plot3dc( x, y, (const PLFLT * const *) a, *nx, *ny, *opt, clevel, *nlevel ); // Clean up memory allocated for a plFree2dGrid( a, *nx, *ny ); @@ -111,7 +111,7 @@ for ( j = 0; j < *ny; j++ ) temp[i][j] = *( z + j * *lx + i ); - c_plsurf3d( x, y, (const PLFLT **) temp, *nx, *ny, *opt, clevel, *nlevel ); + c_plsurf3d( x, y, (const PLFLT * const *) temp, *nx, *ny, *opt, clevel, *nlevel ); for ( i = 0; i < *nx; i++ ) free( (void *) temp[i] ); Modified: trunk/bindings/f95/sccont.c =================================================================== --- trunk/bindings/f95/sccont.c 2011-12-03 08:35:52 UTC (rev 12094) +++ trunk/bindings/f95/sccont.c 2011-12-03 08:56:15 UTC (rev 12095) @@ -374,7 +374,7 @@ } } - c_plshade( (const PLFLT **) a, *nx, *ny, NULL, + c_plshade( (const PLFLT * const *) a, *nx, *ny, NULL, *xmin, *xmax, *ymin, *ymax, *shade_min, *shade_max, *sh_cmap, *sh_color, *sh_width, @@ -416,7 +416,7 @@ cgrid.ny = *ny; cgrid.xg = xg1; cgrid.yg = yg1; - c_plshade( (const PLFLT **) a, *nx, *ny, NULL, + c_plshade( (const PLFLT * const *) a, *nx, *ny, NULL, *xmin, *xmax, *ymin, *ymax, *shade_min, *shade_max, *sh_cmap, *sh_color, *sh_width, @@ -459,7 +459,7 @@ } } - c_plshade( (const PLFLT **) a, *nx, *ny, NULL, + c_plshade( (const PLFLT * const *) a, *nx, *ny, NULL, *xmin, *xmax, *ymin, *ymax, *shade_min, *shade_max, *sh_cmap, *sh_color, *sh_width, @@ -494,7 +494,7 @@ } } - c_plshade( (const PLFLT **) a, *nx, *ny, NULL, + c_plshade( (const PLFLT * const *) a, *nx, *ny, NULL, *xmin, *xmax, *ymin, *ymax, *shade_min, *shade_max, *sh_cmap, *sh_color, *sh_width, @@ -535,7 +535,7 @@ } } - c_plshades( (const PLFLT **) a, *nx, *ny, NULL, + c_plshades( (const PLFLT * const *) a, *nx, *ny, NULL, *xmin, *xmax, *ymin, *ymax, clevel, *nlevel, *fill_width, *cont_color, *cont_width, @@ -572,7 +572,7 @@ cgrid.xg = xg1; cgrid.yg = yg1; - c_plshades( (const PLFLT **) a, *nx, *ny, NULL, + c_plshades( (const PLFLT * const *) a, *nx, *ny, NULL, *xmin, *xmax, *ymin, *ymax, clevel, *nlevel, *fill_width, *cont_color, *cont_width, @@ -610,7 +610,7 @@ } } - c_plshades( (const PLFLT **) a, *nx, *ny, NULL, + c_plshades( (const PLFLT * const *) a, *nx, *ny, NULL, *xmin, *xmax, *ymin, *ymax, clevel, *nlevel, *fill_width, *cont_color, *cont_width, @@ -642,7 +642,7 @@ } } - c_plshades( (const PLFLT **) a, *nx, *ny, NULL, + c_plshades( (const PLFLT * const *) a, *nx, *ny, NULL, *xmin, *xmax, *ymin, *ymax, clevel, *nlevel, *fill_width, *cont_color, *cont_width, @@ -695,7 +695,7 @@ } } - c_plimagefr( (const PLFLT **) pidata, *nx, *ny, + c_plimagefr( (const PLFLT * const *) pidata, *nx, *ny, *xmin, *xmax, *ymin, *ymax, *zmin, *zmax, *valuemin, *valuemax, pltr0, NULL ); @@ -727,7 +727,7 @@ } } - c_plimagefr( (const PLFLT **) pidata, *nx, *ny, + c_plimagefr( (const PLFLT * const *) pidata, *nx, *ny, *xmin, *xmax, *ymin, *ymax, *zmin, *zmax, *valuemin, *valuemax, pltr1, (void *) &cgrid ); @@ -767,7 +767,7 @@ } } - c_plimagefr( (const PLFLT **) pidata, *nx, *ny, + c_plimagefr( (const PLFLT * const *) pidata, *nx, *ny, *xmin, *xmax, *ymin, *ymax, *zmin, *zmax, *valuemin, *valuemax, pltr2, (void *) &cgrid2 ); @@ -795,7 +795,7 @@ } } - c_plimagefr( (const PLFLT **) pidata, *nx, *ny, + c_plimagefr( (const PLFLT * const *) pidata, *nx, *ny, *xmin, *xmax, *ymin, *ymax, *zmin, *zmax, *valuemin, *valuemax, pltr, (void *) ftr ); Modified: trunk/bindings/f95/scstubs.c =================================================================== --- trunk/bindings/f95/scstubs.c 2011-12-03 08:35:52 UTC (rev 12094) +++ trunk/bindings/f95/scstubs.c 2011-12-03 08:56:15 UTC (rev 12095) @@ -701,7 +701,7 @@ } } - c_plimagefr( (const PLFLT **) pidata, *nx, *ny, + c_plimagefr( (const PLFLT * const *) pidata, *nx, *ny, *xmin, *xmax, *ymin, *ymax, *zmin, *zmax, *Dxmin, *Dxmax, *Dymin, *Dymax, *valuemin, *valuemax ); @@ -728,7 +728,7 @@ } } - c_plimage( (const PLFLT **) pidata, *nx, *ny, + c_plimage( (const PLFLT * const *) pidata, *nx, *ny, *xmin, *xmax, *ymin, *ymax, *zmin, *zmax, *Dxmin, *Dxmax, *Dymin, *Dymax ); @@ -829,13 +829,13 @@ *nlegend, opt_array, *text_offset, *text_scale, *text_spacing, *text_justification, - text_colors, (const char **) pllegend_text, + text_colors, (const char * const *) pllegend_text, box_colors, box_patterns, box_scales, box_line_widths, line_colors, line_styles, line_widths, symbol_colors, symbol_scales, - symbol_numbers, (const char **) pllegend_symbols ); + symbol_numbers, (const char * const *) pllegend_symbols ); free( *pllegend_text ); free( pllegend_text ); Modified: trunk/drivers/cairo.c =================================================================== --- trunk/drivers/cairo.c 2011-12-03 08:35:52 UTC (rev 12094) +++ trunk/drivers/cairo.c 2011-12-03 08:56:15 UTC (rev 12095) @@ -2027,7 +2027,6 @@ void xcairo_get_cursor( PLStream *pls, PLGraphicsIn *gin ) { - //int number_chars; const char *ksname; char str[257]; KeySym keysym; @@ -2062,7 +2061,7 @@ // Get key pressed (if any) if ( event.type == KeyPress || event.type == KeyRelease ) { - //number_chars = XLookupString( (XKeyEvent *) &event, str, 100, &keysym, NULL ); + XLookupString( (XKeyEvent *) &event, str, 100, &keysym, NULL ); if ( keysym == NoSymbol ) ksname = "NoSymbol"; else if ( !( ksname = XKeysymToString( keysym ) ) ) Modified: trunk/examples/c/x08c.c =================================================================== --- trunk/examples/c/x08c.c 2011-12-03 08:35:52 UTC (rev 12094) +++ trunk/examples/c/x08c.c 2011-12-03 08:56:15 UTC (rev 12095) @@ -202,7 +202,7 @@ } } - plMinMax2dGrid( (const PLFLT **) z, XPTS, YPTS, &zmax, &zmin ); + plMinMax2dGrid( (const PLFLT * const *) z, XPTS, YPTS, &zmax, &zmin ); step = ( zmax - zmin ) / ( nlevel + 1 ); for ( i = 0; i < nlevel; i++ ) clevel[i] = zmin + step + step * i; Modified: trunk/examples/c/x09c.c =================================================================== --- trunk/examples/c/x09c.c 2011-12-03 08:35:52 UTC (rev 12094) +++ trunk/examples/c/x09c.c 2011-12-03 08:56:15 UTC (rev 12095) @@ -102,7 +102,7 @@ } plcol0( 2 ); - plcont( (const PLFLT **) z, RPTS, THETAPTS, 1, RPTS, 1, THETAPTS, lev, 10, + plcont( (const PLFLT * const *) z, RPTS, THETAPTS, 1, RPTS, 1, THETAPTS, lev, 10, pltr2, (void *) &cgrid2 ); plcol0( 1 ); pllab( "", "", "Polar Contour Plot" ); @@ -249,7 +249,7 @@ { // Negative contours pllsty( 2 ); - plcont( (const PLFLT **) z, PRPTS, PTHETAPTS, 1, PRPTS, 1, PTHETAPTS, + plcont( (const PLFLT * const *) z, PRPTS, PTHETAPTS, 1, PRPTS, 1, PTHETAPTS, clevelneg, nlevelneg, pltr2, (void *) &cgrid2 ); } @@ -257,7 +257,7 @@ { // Positive contours pllsty( 1 ); - plcont( (const PLFLT **) z, PRPTS, PTHETAPTS, 1, PRPTS, 1, PTHETAPTS, + plcont( (const PLFLT * const *) z, PRPTS, PTHETAPTS, 1, PRPTS, 1, PTHETAPTS, clevelpos, nlevelpos, pltr2, (void *) &cgrid2 ); } @@ -369,10 +369,10 @@ pl_setcontlabelparam( 0.006, 0.3, 0.1, 1 ); plenv( -1.0, 1.0, -1.0, 1.0, 0, 0 ); plcol0( 2 ); - plcont( (const PLFLT **) z, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, mypltr, NULL ); + plcont( (const PLFLT * const *) z, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, mypltr, NULL ); plstyl( 1, &mark, &space ); plcol0( 3 ); - plcont( (const PLFLT **) w, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, mypltr, NULL ); + plcont( (const PLFLT * const *) w, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, mypltr, NULL ); plstyl( 0, &mark, &space ); plcol0( 1 ); pllab( "X Coordinate", "Y Coordinate", "Streamlines of flow" ); @@ -382,12 +382,12 @@ plenv( -1.0, 1.0, -1.0, 1.0, 0, 0 ); plcol0( 2 ); - plcont( (const PLFLT **) z, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, + plcont( (const PLFLT * const *) z, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, pltr1, (void *) &cgrid1 ); plstyl( 1, &mark, &space ); plcol0( 3 ); - plcont( (const PLFLT **) w, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, + plcont( (const PLFLT * const *) w, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, pltr1, (void *) &cgrid1 ); plstyl( 0, &mark, &space ); plcol0( 1 ); @@ -412,12 +412,12 @@ plenv( -1.0, 1.0, -1.0, 1.0, 0, 0 ); plcol0( 2 ); - plcont( (const PLFLT **) z, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, + plcont( (const PLFLT * const *) z, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, pltr2, (void *) &cgrid2 ); plstyl( 1, &mark, &space ); plcol0( 3 ); - plcont( (const PLFLT **) w, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, + plcont( (const PLFLT * const *) w, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, pltr2, (void *) &cgrid2 ); plstyl( 0, &mark, &space ); plcol0( 1 ); Modified: trunk/examples/c/x11c.c =================================================================== --- trunk/examples/c/x11c.c 2011-12-03 08:35:52 UTC (rev 12094) +++ trunk/examples/c/x11c.c 2011-12-03 08:56:15 UTC (rev 12095) @@ -114,7 +114,7 @@ } } - plMinMax2dGrid( (const PLFLT **) z, XPTS, YPTS, &zmax, &zmin ); + plMinMax2dGrid( (const PLFLT * const*) z, XPTS, YPTS, &zmax, &zmin ); step = ( zmax - zmin ) / ( nlevel + 1 ); for ( i = 0; i < nlevel; i++ ) clevel[i] = zmin + step + step * i; @@ -137,19 +137,19 @@ // wireframe plot if ( i == 0 ) - plmesh( x, y, (const PLFLT **) z, XPTS, YPTS, opt[k] ); + plmesh( x, y, (const PLFLT * const *) z, XPTS, YPTS, opt[k] ); // magnitude colored wireframe plot else if ( i == 1 ) - plmesh( x, y, (const PLFLT **) z, XPTS, YPTS, opt[k] | MAG_COLOR ); + plmesh( x, y, (const PLFLT * const *) z, XPTS, YPTS, opt[k] | MAG_COLOR ); // magnitude colored wireframe plot with sides else if ( i == 2 ) - plot3d( x, y, (const PLFLT **) z, XPTS, YPTS, opt[k] | MAG_COLOR, 1 ); + plot3d( x, y, (const PLFLT * const *) z, XPTS, YPTS, opt[k] | MAG_COLOR, 1 ); // magnitude colored wireframe plot with base contour else if ( i == 3 ) - plmeshc( x, y, (const PLFLT **) z, XPTS, YPTS, opt[k] | MAG_COLOR | BASE_CONT, + plmeshc( x, y, (const PLFLT * const *) z, XPTS, YPTS, opt[k] | MAG_COLOR | BASE_CONT, clevel, nlevel ); plcol0( 3 ); Modified: trunk/examples/c/x14c.c =================================================================== --- trunk/examples/c/x14c.c 2011-12-03 08:35:52 UTC (rev 12094) +++ trunk/examples/c/x14c.c 2011-12-03 08:56:15 UTC (rev 12095) @@ -421,10 +421,10 @@ plenv( -1.0, 1.0, -1.0, 1.0, 0, 0 ); plcol0( 2 ); - plcont( (const PLFLT **) z, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, mypltr, NULL ); + plcont( (const PLFLT * const *) z, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, mypltr, NULL ); plstyl( 1, &mark, &space ); plcol0( 3 ); - plcont( (const PLFLT **) w, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, mypltr, NULL ); + plcont( (const PLFLT * const *) w, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, mypltr, NULL ); plcol0( 1 ); pllab( "X Coordinate", "Y Coordinate", "Streamlines of flow" ); plflush(); Modified: trunk/examples/c/x16c.c =================================================================== --- trunk/examples/c/x16c.c 2011-12-03 08:35:52 UTC (rev 12094) +++ trunk/examples/c/x16c.c 2011-12-03 08:56:15 UTC (rev 12095) @@ -231,7 +231,7 @@ plpsty( 0 ); - plshades( (const PLFLT **) z, nx, ny, NULL, -1., 1., -1., 1., + plshades( (const PLFLT * const *) z, nx, ny, NULL, -1., 1., -1., 1., shedge, ns + 1, fill_width, cont_color, cont_width, plfill, 1, NULL, NULL ); @@ -278,7 +278,7 @@ plpsty( 0 ); - plshades( (const PLFLT **) z, nx, ny, NULL, -1., 1., -1., 1., + plshades( (const PLFLT * const *) z, nx, ny, NULL, -1., 1., -1., 1., shedge, ns + 1, fill_width, cont_color, cont_width, plfill, 1, pltr1, (void *) &cgrid1 ); @@ -325,7 +325,7 @@ plpsty( 0 ); - plshades( (const PLFLT **) z, nx, ny, NULL, -1., 1., -1., 1., + plshades( (const PLFLT * const *) z, nx, ny, NULL, -1., 1., -1., 1., shedge, ns + 1, fill_width, cont_color, cont_width, plfill, 0, pltr2, (void *) &cgrid2 ); @@ -353,7 +353,7 @@ plcol0( 1 ); plbox( "bcnst", 0.0, 0, "bcnstv", 0.0, 0 ); plcol0( 2 ); - plcont( (const PLFLT **) w, nx, ny, 1, nx, 1, ny, clevel, ns, pltr2, (void *) &cgrid2 ); + plcont( (const PLFLT * const *) w, nx, ny, 1, nx, 1, ny, clevel, ns, pltr2, (void *) &cgrid2 ); pllab( "distance", "altitude", "Bogon density, with streamlines" ); @@ -371,7 +371,7 @@ plpsty( 0 ); - plshades( (const PLFLT **) z, nx, ny, NULL, -1., 1., -1., 1., + plshades( (const PLFLT * const *) z, nx, ny, NULL, -1., 1., -1., 1., shedge, ns + 1, fill_width, 2, 3, plfill, 0, pltr2, (void *) &cgrid2 ); @@ -421,7 +421,7 @@ plpsty( 0 ); - plshades( (const PLFLT **) z, nx, ny, zdefined, -1., 1., -1., 1., + plshades( (const PLFLT * const *) z, nx, ny, zdefined, -1., 1., -1., 1., shedge, ns + 1, fill_width, cont_color, cont_width, plfill, 0, pltr2, (void *) &cgrid2 ); @@ -468,7 +468,7 @@ shedge[i] = zmin + ( zmax - zmin ) * (PLFLT) i / (PLFLT) ns; // Now we can shade the interior region. - plshades( (const PLFLT **) z, nx, ny, NULL, -1., 1., -1., 1., + plshades( (const PLFLT * const *) z, nx, ny, NULL, -1., 1., -1., 1., shedge, ns + 1, fill_width, cont_color, cont_width, plfill, 0, pltr2, (void *) &cgrid2 ); Modified: trunk/examples/c/x20c.c =================================================================== --- trunk/examples/c/x20c.c 2011-12-03 08:35:52 UTC (rev 12094) +++ trunk/examples/c/x20c.c 2011-12-03 08:56:15 UTC (rev 12095) @@ -140,7 +140,7 @@ pllab( "...around a blue square.", " ", "A red border should appear..." ); - plimage( (const PLFLT **) z, XDIM, YDIM, + plimage( (const PLFLT * const *) z, XDIM, YDIM, 1., (PLFLT) XDIM, 1., (PLFLT) YDIM, 0., 0., 1., (PLFLT) XDIM, 1., (PLFLT) YDIM ); } @@ -166,7 +166,7 @@ pllab( "No, an amplitude clipped \"sombrero\"", "", "Saturn?" ); plptex( 2., 2., 3., 4., 0., "Transparent image" ); - plimage( (const PLFLT **) z, XDIM, YDIM, 0., 2. * M_PI, 0., 3. * M_PI, 0.05, 1., + plimage( (const PLFLT * const *) z, XDIM, YDIM, 0., 2. * M_PI, 0., 3. * M_PI, 0.05, 1., 0., 2. * M_PI, 0., 3. * M_PI ); plFree2dGrid( r, XDIM, YDIM ); @@ -201,7 +201,7 @@ else pllab( "", " ", "Lena..." ); - plimage( (const PLFLT **) img_f, width, height, 1., width, 1., height, 0., 0., + plimage( (const PLFLT * const *) img_f, width, height, 1., width, 1., height, 0., 0., 1., width, 1., height ); // plend();exit(0); @@ -242,24 +242,24 @@ pladv( 0 ); // display selection only - plimage( (const PLFLT **) img_f, width, height, 1., width, 1., height, 0., 0., xi, xe, ye, yi ); + plimage( (const PLFLT * const *) img_f, width, height, 1., width, 1., height, 0., 0., xi, xe, ye, yi ); plspause( 1 ); // zoom in selection plenv( xi, xe, ye, yi, 1, -1 ); - plimage( (const PLFLT **) img_f, width, height, 1., width, 1., height, 0., 0., xi, xe, ye, yi ); + plimage( (const PLFLT * const *) img_f, width, height, 1., width, 1., height, 0., 0., xi, xe, ye, yi ); } // Base the dynamic range on the image contents. - plMinMax2dGrid( (const PLFLT **) img_f, width, height, &img_max, &img_min ); + plMinMax2dGrid( (const PLFLT * const *) img_f, width, height, &img_max, &img_min ); // Draw a saturated version of the original image. Only use the middle 50% // of the image's full dynamic range. plcol0( 2 ); plenv( 0, width, 0, height, 1, -1 ); pllab( "", "", "Reduced dynamic range image example" ); - plimagefr( (const PLFLT **) img_f, width, height, 0., width, 0., height, 0., 0., img_min + img_max * 0.25, img_max - img_max * 0.25, NULL, NULL ); + plimagefr( (const PLFLT * const *) img_f, width, height, 0., width, 0., height, 0., 0., img_min + img_max * 0.25, img_max - img_max * 0.25, NULL, NULL ); // Draw a distorted version of the original image, showing its full dynamic range. plenv( 0, width, 0, height, 1, -1 ); @@ -292,7 +292,7 @@ } } - plimagefr( (const PLFLT **) img_f, width, height, 0., width, 0., height, 0., 0., img_min, img_max, pltr2, &cgrid2 ); + plimagefr( (const PLFLT * const *) img_f, width, height, 0., width, 0., height, 0., 0., img_min, img_max, pltr2, &cgrid2 ); plFree2dGrid( cgrid2.xg, width + 1, height + 1 ); plFree2dGrid( cgrid2.yg, width + 1, height + 1 ); Modified: trunk/examples/c/x21c.c =================================================================== --- trunk/examples/c/x21c.c 2011-12-03 08:35:52 UTC (rev 12094) +++ trunk/examples/c/x21c.c 2011-12-03 08:56:15 UTC (rev 12095) @@ -261,7 +261,7 @@ } } - plMinMax2dGrid( (const PLFLT **) zg, xp, yp, &lzM, &lzm ); + plMinMax2dGrid( (const PLFLT * const *) zg, xp, yp, &lzM, &lzm ); lzm = MIN( lzm, zmin ); lzM = MAX( lzM, zmax ); @@ -283,7 +283,7 @@ plenv0( xm, xM, ym, yM, 2, 0 ); plcol0( 15 ); pllab( "X", "Y", title[alg - 1] ); - plshades( (const PLFLT **) zg, xp, yp, NULL, xm, xM, ym, yM, + plshades( (const PLFLT * const *) zg, xp, yp, NULL, xm, xM, ym, yM, clev, nl, 1, 0, 1, plfill, 1, NULL, NULL ); plcol0( 2 ); } @@ -309,7 +309,7 @@ "bcdfntu", "Z", 0.5, 0 ); plcol0( 15 ); pllab( "", "", title[alg - 1] ); - plot3dc( xg, yg, (const PLFLT **) zg, xp, yp, DRAW_LINEXY | MAG_COLOR | BASE_CONT, clev, nl ); + plot3dc( xg, yg, (const PLFLT * const *) zg, xp, yp, DRAW_LINEXY | MAG_COLOR | BASE_CONT, clev, nl ); } } } Modified: trunk/examples/c/x22c.c =================================================================== --- trunk/examples/c/x22c.c 2011-12-03 08:35:52 UTC (rev 12094) +++ trunk/examples/c/x22c.c 2011-12-03 08:56:15 UTC (rev 12095) @@ -90,7 +90,7 @@ plenv( xmin, xmax, ymin, ymax, 0, 0 ); pllab( "(x)", "(y)", "#frPLplot Example 22 - circulation" ); plcol0( 2 ); - plvect( (const PLFLT **) u, (const PLFLT **) v, nx, ny, 0.0, pltr2, (void *) &cgrid2 ); + plvect( (const PLFLT * const *) u, (const PLFLT * const *) v, nx, ny, 0.0, pltr2, (void *) &cgrid2 ); plcol0( 1 ); plFree2dGrid( cgrid2.xg, nx, ny ); @@ -158,7 +158,7 @@ plenv( xmin, xmax, ymin, ymax, 0, 0 ); pllab( "(x)", "(y)", "#frPLplot Example 22 - constriction" ); plcol0( 2 ); - plvect( (const PLFLT **) u, (const PLFLT **) v, nx, ny, -0.5, pltr2, (void *) &cgrid2 ); + plvect( (const PLFLT * const *) u, (const PLFLT * const *) v, nx, ny, -0.5, pltr2, (void *) &cgrid2 ); plcol0( 1 ); plFree2dGrid( cgrid2.xg, nx, ny ); @@ -282,13 +282,13 @@ } plcol0( 3 ); pllsty( 2 ); - plcont( (const PLFLT **) z, nr, ntheta, 1, nr, 1, ntheta, clevel, nlevel, pltr2, (void *) &cgrid2 ); + plcont( (const PLFLT * const *) z, nr, ntheta, 1, nr, 1, ntheta, clevel, nlevel, pltr2, (void *) &cgrid2 ); pllsty( 1 ); plcol0( 1 ); // Plot the vectors of the gradient of the potential plcol0( 2 ); - plvect( (const PLFLT **) u, (const PLFLT **) v, nr, ntheta, 25.0, pltr2, (void *) &cgrid2 ); + plvect( (const PLFLT * const *) u, (const PLFLT * const *) v, nr, ntheta, 25.0, pltr2, (void *) &cgrid2 ); plcol0( 1 ); // Plot the perimeter of the cylinder Modified: trunk/examples/c/x28c.c =================================================================== --- trunk/examples/c/x28c.c 2011-12-03 08:35:52 UTC (rev 12094) +++ trunk/examples/c/x28c.c 2011-12-03 08:56:15 UTC (rev 12095) @@ -163,7 +163,7 @@ 0.0, " revolution" ); } // Draw minimal 3D grid to finish defining the 3D box. - plmesh( x, y, (const PLFLT **) z, XPTS, YPTS, DRAW_LINEXY ); + plmesh( x, y, (const PLFLT * const *) z, XPTS, YPTS, DRAW_LINEXY ); // Page 2: Demonstrate rotation of string around its axis. pladv( 0 ); @@ -240,7 +240,7 @@ 0.5, "rotation for z = z#dmin#u" ); } // Draw minimal 3D grid to finish defining the 3D box. - plmesh( x, y, (const PLFLT **) z, XPTS, YPTS, DRAW_LINEXY ); + plmesh( x, y, (const PLFLT * const *) z, XPTS, YPTS, DRAW_LINEXY ); // Page 3: Demonstrate shear of string along its axis. // Work around xcairo and pngcairo (but not pscairo) problems for @@ -321,7 +321,7 @@ 0.5, "shear for z = z#dmin#u" ); } // Draw minimal 3D grid to finish defining the 3D box. - plmesh( x, y, (const PLFLT **) z, XPTS, YPTS, DRAW_LINEXY ); + plmesh( x, y, (const PLFLT * const *) z, XPTS, YPTS, DRAW_LINEXY ); // Page 4: Demonstrate drawing a string on a 3D path. pladv( 0 ); @@ -372,7 +372,7 @@ omega += domega; } // Draw minimal 3D grid to finish defining the 3D box. - plmesh( x, y, (const PLFLT **) z, XPTS, YPTS, DRAW_LINEXY ); + plmesh( x, y, (const PLFLT * const *) z, XPTS, YPTS, DRAW_LINEXY ); // Page 5: Demonstrate plmtex3 axis labelling capability pladv( 0 ); @@ -400,7 +400,7 @@ plmtex3( "zs", -2.5, 0.5, 0.5, "Arbitrarily displaced" ); plmtex3( "zs", -1.0, 0.5, 0.5, "secondary Z-axis label" ); // Draw minimal 3D grid to finish defining the 3D box. - plmesh( x, y, (const PLFLT **) z, XPTS, YPTS, DRAW_LINEXY ); + plmesh( x, y, (const PLFLT * const *) z, XPTS, YPTS, DRAW_LINEXY ); // Clean up. free( (void *) x ); Modified: trunk/examples/c/x33c.c =================================================================== --- trunk/examples/c/x33c.c 2011-12-03 08:35:52 UTC (rev 12094) +++ trunk/examples/c/x33c.c 2011-12-03 08:56:15 UTC (rev 12095) @@ -366,10 +366,10 @@ pllegend( &legend_width, &legend_height, opt, position, 0.05, 0.05, 0.1, 15, 1, 1, 0, 0, nlegend, opt_array, 1.0, 1.0, 2.0, - 1., text_colors, (const char **) text, + 1., text_colors, (const char * const *) text, NULL, NULL, NULL, NULL, line_colors, line_styles, line_widths, - symbol_colors, symbol_scales, symbol_numbers, (const char **) symbols ); + symbol_colors, symbol_scales, symbol_numbers, (const char * const *) symbols ); } // Second page illustrating effect of nrow, ncolumn for the same legend @@ -414,10 +414,10 @@ pllegend( &legend_width, &legend_height, opt, position, x, y, 0.05, 15, 1, 1, nrow, ncolumn, nlegend, opt_array, 1.0, 1.0, 2.0, - 1., text_colors, (const char **) text, + 1., text_colors, (const char * const *) text, NULL, NULL, NULL, NULL, line_colors, line_styles, line_widths, - symbol_colors, symbol_scales, symbol_numbers, (const char **) symbols ); + symbol_colors, symbol_scales, symbol_numbers, (const char * const *) symbols ); position = PL_POSITION_BOTTOM | PL_POSITION_OUTSIDE; opt = opt_base; @@ -428,10 +428,10 @@ pllegend( &legend_width, &legend_height, opt, position, x, y, 0.05, 15, 1, 1, nrow, ncolumn, nlegend, opt_array, 1.0, 1.0, 2.0, - 1., text_colors, (const char **) text, + 1., text_colors, (const char * const *) text, NULL, NULL, NULL, NULL, line_colors, line_styles, line_widths, - symbol_colors, symbol_scales, symbol_numbers, (const char **) symbols ); + symbol_colors, symbol_scales, symbol_numbers, (const char * const *) symbols ); position = PL_POSITION_LEFT | PL_POSITION_OUTSIDE; opt = opt_base; @@ -442,10 +442,10 @@ pllegend( &legend_width, &legend_height, opt, position, x, y, 0.05, 15, 1, 1, nrow, ncolumn, nlegend, opt_array, 1.0, 1.0, 2.0, - 1., text_colors, (const char **) text, + 1., text_colors, (const char * const *) text, NULL, NULL, NULL, NULL, line_colors, line_styles, line_widths, - symbol_colors, symbol_scales, symbol_numbers, (const char **) symbols ); + symbol_colors, symbol_scales, symbol_numbers, (const char * const *) symbols ); position = PL_POSITION_RIGHT | PL_POSITION_OUTSIDE; opt = opt_base; @@ -456,10 +456,10 @@ pllegend( &legend_width, &legend_height, opt, position, x, y, 0.05, 15, 1, 1, nrow, ncolumn, nlegend, opt_array, 1.0, 1.0, 2.0, - 1., text_colors, (const char **) text, + 1., text_colors, (const char * const *) text, NULL, NULL, NULL, NULL, line_colors, line_styles, line_widths, - symbol_colors, symbol_scales, symbol_numbers, (const char **) symbols ); + symbol_colors, symbol_scales, symbol_numbers, (const char * const *) symbols ); position = PL_POSITION_LEFT | PL_POSITION_TOP | PL_POSITION_INSIDE; opt = opt_base; @@ -470,10 +470,10 @@ pllegend( &legend_width, &legend_height, opt, position, x, y, 0.05, 15, 1, 1, nrow, ncolumn, nlegend, opt_array, 1.0, 1.0, 2.0, - 1., text_colors, (const char **) text, + 1., text_colors, (const char * const *) text, NULL, NULL, NULL, NULL, line_colors, line_styles, line_widths, - symbol_colors, symbol_scales, symbol_numbers, (const char **) symbols ); + symbol_colors, symbol_scales, symbol_numbers, (const char * const *) symbols ); position = PL_POSITION_RIGHT | PL_POSITION_TOP | PL_POSITION_INSIDE; opt = opt_base | PL_LEGEND_ROW_MAJOR; @@ -484,10 +484,10 @@ pllegend( &legend_width, &legend_height, opt, position, x, y, 0.05, 15, 1, 1, nrow, ncolumn, nlegend, opt_array, 1.0, 1.0, 2.0, - 1., text_colors, (const char **) text, + 1., text_colors, (const char * const *) text, NULL, NULL, NULL, NULL, line_colors, line_styles, line_widths, - symbol_colors, symbol_scales, symbol_numbers, (const char **) symbols ); + symbol_colors, symbol_scales, symbol_numbers, (const char * const *) symbols ); position = PL_POSITION_BOTTOM | PL_POSITION_INSIDE; opt = opt_base | PL_LEGEND_ROW_MAJOR; @@ -498,10 +498,10 @@ pllegend( &legend_width, &legend_height, opt, position, x, y, 0.05, 15, 1, 1, nrow, ncolumn, nlegend, opt_array, 1.0, 1.0, 2.0, - 1., text_colors, (const char **) text, + 1., text_colors, (const char * const *) text, NULL, NULL, NULL, NULL, line_colors, line_styles, line_widths, - symbol_colors, symbol_scales, symbol_numbers, (const char **) symbols ); + symbol_colors, symbol_scales, symbol_numbers, (const char * const *) symbols ); // Third page demonstrating legend alignment pladv( 0 ); @@ -550,10 +550,10 @@ pllegend( &legend_width, &legend_height, opt, position, x, y, 0.025, 15, 1, 1, nrow, ncolumn, nlegend, opt_array, 1.0, 1.0, 1.5, - 1., text_colors, (const char **) text, + 1., text_colors, (const char * const *) text, NULL, NULL, NULL, NULL, line_colors, line_styles, line_widths, - symbol_colors, symbol_scales, symbol_numbers, (const char **) symbols ); + symbol_colors, symbol_scales, symbol_numbers, (const char * const *) symbols ); if ( i == nturn ) { @@ -634,10 +634,10 @@ pllegend( &legend_width, &legend_height, opt, position, x, y, 0.1, 15, 1, 1, 0, 0, nlegend, opt_array, 1.0, text_scale, 2.0, - 0., text_colors, (const char **) text, + 0., text_colors, (const char * const *) text, box_colors, box_patterns, box_scales, box_line_widths, line_colors, line_styles, line_widths, - symbol_colors, symbol_scales, symbol_numbers, (const char **) symbols ); + symbol_colors, symbol_scales, symbol_numbers, (const char * const *) symbols ); max_height = MAX( max_height, legend_height ); // Set up symbol legend entries with various symbols. @@ -659,10 +659,10 @@ pllegend( &legend_width, &legend_height, opt, position, x, y, 0.1, 15, 1, 1, 0, 0, nlegend, opt_array, 1.0, text_scale, 2.0, - 0., text_colors, (const char **) text, + 0., text_colors, (const char * const *) text, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - symbol_colors, symbol_scales, symbol_numbers, (const char **) symbols ); + symbol_colors, symbol_scales, symbol_numbers, (const char * const *) symbols ); max_height = MAX( max_height, legend_height ); // Set up symbol legend entries with various numbers of symbols. @@ -684,10 +684,10 @@ pllegend( &legend_width, &legend_height, opt, position, x, y, 0.1, 15, 1, 1, 0, 0, nlegend, opt_array, 1.0, text_scale, 2.0, - 0., text_colors, (const char **) text, + 0., text_colors, (const char * const *) text, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - symbol_colors, symbol_scales, symbol_numbers, (const char **) symbols ); + symbol_colors, symbol_scales, symbol_numbers, (const char * const *) symbols ); max_height = MAX( max_height, legend_height ); // Set up box legend entries with various colours. @@ -712,7 +712,7 @@ pllegend( &legend_width, &legend_height, opt, position, x, y, 0.1, 15, 1, 1, 0, 0, nlegend, opt_array, 1.0, text_scale, 2.0, - 0., text_colors, (const char **) text, + 0., text_colors, (const char * const *) text, box_colors, box_patterns, box_scales, box_line_widths, NULL, NULL, NULL, NULL, NULL, NULL, NULL ); @@ -737,7 +737,7 @@ pllegend( &legend_width, &legend_height, opt, position, x, y, 0.1, 15, 1, 1, 0, 0, nlegend, opt_array, 1.0, text_scale, 2.0, - 0., text_colors, (const char **) text, + 0., text_colors, (const char * const *) text, box_colors, box_patterns, box_scales, box_line_widths, NULL, NULL, NULL, NULL, NULL, NULL, NULL ); @@ -762,7 +762,7 @@ pllegend( &legend_width, &legend_height, opt, position, x, y, 0.1, 15, 1, 1, 0, 0, nlegend, opt_array, 1.0, text_scale, 2.0, - 0., text_colors, (const char **) text, + 0., text_colors, (const char * const *) text, box_colors, box_patterns, box_scales, box_line_widths, NULL, NULL, NULL, NULL, NULL, NULL, NULL ); @@ -789,7 +789,7 @@ pllegend( &legend_width, &legend_height, opt, position, x, y, 0.1, 15, 1, 1, 0, 0, nlegend, opt_array, 1.0, text_scale, 2.0, - 0., text_colors, (const char **) text, + 0., text_colors, (const char * const *) text, NULL, NULL, NULL, NULL, line_colors, line_styles, line_widths, NULL, NULL, NULL, NULL ); @@ -813,7 +813,7 @@ pllegend( &legend_width, &legend_height, opt, position, x, y, 0.1, 15, 1, 1, 0, 0, nlegend, opt_array, 1.0, text_scale, 2.0, - 0., text_colors, (const char **) text, + 0., text_colors, (const char * const *) text, NULL, NULL, NULL, NULL, line_colors, line_styles, line_widths, NULL, NULL, NULL, NULL ); @@ -837,7 +837,7 @@ pllegend( &legend_width, &legend_height, opt, position, x, y, 0.1, 15, 1, 1, 0, 0, nlegend, opt_array, 1.0, text_scale, 2.0, - 0., text_colors, (const char **) text, + 0., text_colors, (const char * const *) text, NULL, NULL, NULL, NULL, line_colors, line_styles, line_widths, NULL, NULL, NULL, NULL ); Modified: trunk/examples/tk/xtk01.c =================================================================== --- trunk/examples/tk/xtk01.c 2011-12-03 08:35:52 UTC (rev 12094) +++ trunk/examples/tk/xtk01.c 2011-12-03 08:56:15 UTC (rev 12095) @@ -441,7 +441,7 @@ sh_width = 2; plpsty( 0 ); - plshade( (const PLFLT **) z, XPTS, YPTS, NULL, -1., 1., -1., 1., + plshade( (const PLFLT * const *)z, XPTS, YPTS, NULL, -1., 1., -1., 1., shade_min, shade_max, sh_cmap, sh_color, sh_width, min_color, min_width, max_color, max_width, Modified: trunk/include/plplot.h =================================================================== --- trunk/include/plplot.h 2011-12-03 08:35:52 UTC (rev 12094) +++ trunk/include/plplot.h 2011-12-03 08:56:15 UTC (rev 12095) @@ -884,7 +884,7 @@ // PLDLLIMPEXP void -c_plcont( const PLFLT **f, PLINT nx, PLINT ny, PLINT kx, PLINT lx, +c_plcont( const PLFLT * const *f, PLINT nx, PLINT ny, PLINT kx, PLINT lx, PLINT ky, PLINT ly, const PLFLT *clevel, PLINT nlevel, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data ); @@ -1237,13 +1237,13 @@ PLINT nlegend, const PLINT *opt_array, PLFLT text_offset, PLFLT text_scale, PLFLT text_spacing, PLFLT text_justification, - const PLINT *text_colors, const char **text, + const PLINT *text_colors, const char * const *text, const PLINT *box_colors, const PLINT *box_patterns, const PLFLT *box_scales, const PLINT *box_line_widths, const PLINT *line_colors, const PLINT *line_styles, const PLINT *line_widths, const PLINT *symbol_colors, const PLFLT *symbol_scales, - const PLINT *symbol_numbers, const char **symbols ); + const PLINT *symbol_numbers, const char * const *symbols ); // Routine for drawing continous colour legends PLDLLIMPEXP void @@ -1292,7 +1292,7 @@ // Plots a mesh representation of the function z[x][y]. PLDLLIMPEXP void -c_plmesh( const PLFLT *x, const PLFLT *y, const PLFLT **z, PLINT nx, PLINT ny, PLINT opt ); +c_plmesh( const PLFLT *x, const PLFLT *y, const PLFLT * const *z, PLINT nx, PLINT ny, PLINT opt ); // Like plmesh, but uses an evaluator function to access z data from zp @@ -1303,7 +1303,7 @@ // Plots a mesh representation of the function z[x][y] with contour PLDLLIMPEXP void -c_plmeshc( const PLFLT *x, const PLFLT *y, const PLFLT **z, PLINT nx, PLINT ny, PLINT opt, +c_plmeshc( const PLFLT *x, const PLFLT *y, const PLFLT * const *z, PLINT nx, PLINT ny, PLINT opt, const PLFLT *clevel, PLINT nlevel ); // Like plmeshc, but uses an evaluator function to access z data from zp @@ -1332,7 +1332,7 @@ // Plots a 3-d representation of the function z[x][y]. PLDLLIMPEXP void -c_plot3d( const PLFLT *x, const PLFLT *y, const PLFLT **z, +c_plot3d( const PLFLT *x, const PLFLT *y, const PLFLT * const *z, PLINT nx, PLINT ny, PLINT opt, PLBOOL side ); // Like plot3d, but uses an evaluator function to access z data from zp @@ -1344,7 +1344,7 @@ // Plots a 3-d representation of the function z[x][y] with contour. PLDLLIMPEXP void -c_plot3dc( const PLFLT *x, const PLFLT *y, const PLFLT **z, +c_plot3dc( const PLFLT *x, const PLFLT *y, const PLFLT * const *z, PLINT nx, PLINT ny, PLINT opt, const PLFLT *clevel, PLINT nlevel ); @@ -1358,7 +1358,7 @@ // y index limits. PLDLLIMPEXP void -c_plot3dcl( const PLFLT *x, const PLFLT *y, const PLFLT **z, +c_plot3dcl( const PLFLT *x, const PLFLT *y, const PLFLT * const *z, PLINT nx, PLINT ny, PLINT opt, const PLFLT *clevel, PLINT nlevel, PLINT ixstart, PLINT ixn, const PLINT *indexymin, const PLINT *indexymax ); @@ -1616,7 +1616,7 @@ // Shade region. PLDLLIMPEXP void -c_plshade( const PLFLT **a, PLINT nx, PLINT ny, PLINT ( *defined )( PLFLT, PLFLT ), +c_plshade( const PLFLT * const *a, PLINT nx, PLINT ny, PLINT ( *defined )( PLFLT, PLFLT ), PLFLT left, PLFLT right, PLFLT bottom, PLFLT top, PLFLT shade_min, PLFLT shade_max, PLINT sh_cmap, PLFLT sh_color, PLINT sh_width, @@ -1638,7 +1638,7 @@ PLPointer pltr_data ); PLDLLIMPEXP void -c_plshades( const PLFLT **a, PLINT nx, PLINT ny, PLINT ( *defined )( PLFLT, PLFLT ), +c_plshades( const PLFLT * const *a, PLINT nx, PLINT ny, PLINT ( *defined )( PLFLT, PLFLT ), PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, const PLFLT *clevel, PLINT nlevel, PLINT fill_width, PLINT cont_color, PLINT cont_width, @@ -1811,7 +1811,7 @@ // plots a 2d image (or a matrix too large for plshade() ) PLDLLIMPEXP void -c_plimagefr( const PLFLT **idata, PLINT nx, PLINT ny, +c_plimagefr( const PLFLT * const *idata, PLINT nx, PLINT ny, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT zmin, PLFLT zmax, PLFLT valuemin, PLFLT valuemax, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), @@ -1833,7 +1833,7 @@ // automatically scaled PLDLLIMPEXP void -c_plimage( const PLFLT **idata, PLINT nx, PLINT ny, +c_plimage( const PLFLT * const *idata, PLINT nx, PLINT ny, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT zmin, PLFLT zmax, PLFLT Dxmin, PLFLT Dxmax, PLFLT Dymin, PLFLT Dymax ); @@ -1855,7 +1855,7 @@ // Plots the 3d surface representation of the function z[x][y]. PLDLLIMPEXP void -c_plsurf3d( const PLFLT *x, const PLFLT *y, const PLFLT **z, PLINT nx, PLINT ny, +c_plsurf3d( const PLFLT *x, const PLFLT *y, const PLFLT * const *z, PLINT nx, PLINT ny, PLINT opt, const PLFLT *clevel, PLINT nlevel ); // Like plsurf3d, but uses an evaluator function to access z data from zp @@ -1868,7 +1868,7 @@ // index limits. PLDLLIMPEXP void -c_plsurf3dl( const PLFLT *x, const PLFLT *y, const PLFLT **z, PLINT nx, PLINT ny, +c_plsurf3dl( const PLFLT *x, const PLFLT *y, const PLFLT * const *z, PLINT nx, PLINT ny, PLINT opt, const PLFLT *clevel, PLINT nlevel, PLINT ixstart, PLINT ixn, const PLINT *indexymin, const PLINT *indexymax ); @@ -1934,7 +1934,7 @@ // simple arrow plotter. PLDLLIMPEXP void -c_plvect( const PLFLT **u, const PLFLT **v, PLINT nx, PLINT ny, PLFLT scale, +c_plvect( const PLFLT * const *u, const PLFLT * const *v, PLINT nx, PLINT ny, PLFLT scale, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data ); @@ -2272,7 +2272,7 @@ // Find the maximum and minimum of a 2d matrix allocated with plAllc2dGrid(). PLDLLIMPEXP void -plMinMax2dGrid( const PLFLT **f, PLINT nx, PLINT ny, PLFLT *fmax, PLFLT *fmin ); +plMinMax2dGrid( const PLFLT * const *f, PLINT nx, PLINT ny, PLFLT *fmax, PLFLT *fmin ); // Wait for graphics input event and translate to world coordinates Modified: trunk/include/plplotP.h =================================================================== --- trunk/include/plplotP.h 2011-12-03 08:35:52 UTC (rev 12094) +++ trunk/include/plplotP.h 2011-12-03 08:56:15 UTC (rev 12095) @@ -724,7 +724,7 @@ } CONT_LEVEL; void -cont_store( const PLFLT **f, PLINT nx, PLINT ny, +cont_store( const PLFLT * const *f, PLINT nx, PLINT ny, PLINT kx, PLINT lx, PLINT ky, PLINT ly, const PLFLT *clevel, PLINT nlevel, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), Modified: trunk/src/pdfutils.c =================================================================== --- trunk/src/pdfutils.c 2011-12-03 08:35:52 UTC (rev 12094) +++ trunk/src/pdfutils.c 2011-12-03 08:56:15 UTC (rev 12095) @@ -1152,7 +1152,7 @@ //-------------------------------------------------------------------------- void -plMinMax2dGrid( const PLFLT **f, PLINT nx, PLINT ny, PLFLT *fnmax, PLFLT *fnmin ) +plMinMax2dGrid( const PLFLT * const*f, PLINT nx, PLINT ny, PLFLT *fnmax, PLFLT *fnmin ) { int i, j; PLFLT m, M; Modified: trunk/src/plcont.c =================================================================== --- trunk/src/plcont.c 2011-12-03 08:35:52 UTC (rev 12094) +++ trunk/src/plcont.c 2011-12-03 08:56:15 UTC (rev 12095) @@ -489,7 +489,7 @@ //-------------------------------------------------------------------------- void -cont_store( const PLFLT **f, PLINT nx, PLINT ny, PLINT kx, PLINT lx, +cont_store( const PLFLT * const *f, PLINT nx, PLINT ny, PLINT kx, PLINT lx, PLINT ky, PLINT ly, const PLFLT *clevel, PLINT nlevel, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data, @@ -512,7 +512,7 @@ //-------------------------------------------------------------------------- void -c_plcont( const PLFLT **f, PLINT nx, PLINT ny, PLINT kx, PLINT lx, +c_plcont( const PLFLT * const *f, PLINT nx, PLINT ny, PLINT kx, PLINT lx, PLINT ky, PLINT ly, const PLFLT *clevel, PLINT nlevel, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data ) Modified: trunk/src/plgradient.c =================================================================== --- trunk/src/plgradient.c 2011-12-03 08:35:52 UTC (rev 12094) +++ trunk/src/plgradient.c 2011-12-03 08:56:15 UTC (rev 12095) @@ -253,7 +253,7 @@ for ( i = 0; i < NEDGE; i++ ) edge[i] = (PLFLT) i / (PLFLT) ( NEDGE - 1 ); - plshades( (const PLFLT **) z, NX, NY, gradient_defined, xmin, xmax, ymin, ymax, + plshades( (const PLFLT * const *) z, NX, NY, gradient_defined, xmin, xmax, ymin, ymax, edge, NEDGE, 0, 0, 0, plfill, 1, NULL, NULL ); free( (void *) edge ); plFree2dGrid( z, NX, NY ); Modified: trunk/src/plimage.c =================================================================== --- trunk/src/plimage.c 2011-12-03 08:35:52 UTC (rev 12094) +++ trunk/src/plimage.c 2011-12-03 08:56:15 UTC (rev 12095) @@ -191,7 +191,7 @@ // //-------------------------------------------------------------------------- void -c_plimagefr( const PLFLT **idata, PLINT nx, PLINT ny, +c_plimagefr( const PLFLT * const *idata, PLINT nx, PLINT ny, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT zmin, PLFLT zmax, PLFLT valuemin, PLFLT valuemax, void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), @@ -330,7 +330,7 @@ // //-------------------------------------------------------------------------- void -c_plimage( const PLFLT **idata, PLINT nx, PLINT ny, +c_plimage( const PLFLT * const *idata, PLINT nx, PLINT ny, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT zmin, PLFLT zmax, PLFLT Dxmin, PLFLT Dxmax, PLFLT Dymin, PLFLT Dymax ) { Modified: trunk/src/pllegend.c =================================================================== --- trunk/src/pllegend.c 2011-12-03 08:35:52 UTC (rev 12094) +++ trunk/src/pllegend.c 2011-12-03 08:56:15 UTC (rev 12095) @@ -532,13 +532,13 @@ PLINT nlegend, const PLINT *opt_array, PLFLT text_offset, PLFLT text_scale, PLFLT text_spacing, PLFLT text_justification, - const PLINT *text_colors, const char **text, + const PLINT *text_colors, const char * const *text, const PLINT *box_colors, const PLINT *box_patterns, const PLFLT *box_scales, const PLINT *box_line_widths, const PLINT *line_colors, const PLINT *line_styles, const PLINT *line_widths, const PLINT *symbol_colors, const PLFLT *symbol_scales, - const PLINT *symbol_numbers, const char **symbols ) + const PLINT *symbol_numbers, const char * const *symbols ) { // Legend position @@ -1962,7 +1962,7 @@ } } // Draw the color bar - plimage( (const PLFLT **) color_data, ni, nj, wx_min, wx_max, wy_min, wy_max, + plimage( (const PLFLT * const *) color_data, ni, nj, wx_min, wx_max, wy_min, wy_max, min_value, max_value, wx_min, wx_max, wy_min, wy_max ); plFree2dGrid( color_data, ni, nj ); } @@ -2051,7 +2051,7 @@ } // Draw the color bar - plshades( (const PLFLT **) color_data, ni, nj, NULL, wx_min, wx_max, wy_min, wy_max, + plshades( (const PLFLT * const *) color_data, ni, nj, NULL, wx_min, wx_max, wy_min, wy_max, values, n_steps, 0, cont_color, cont_width, plfill, TRUE, pltr1, (void *) ( &grid ) ); plFree2dGrid( color_data, ni, nj ); Modified: trunk/src/plot3d.c =================================================================== --- trunk/src/plot3d.c 2011-12-03 08:35:52 UTC (rev 12094) +++ trunk/src/plot3d.c 2011-12-03 08:56:15 UTC (rev 12095) @@ -115,7 +115,7 @@ //-------------------------------------------------------------------------- void -c_plmesh( const PLFLT *x, const PLFLT *y, const PLFLT **z, PLINT nx, PLINT ny, PLINT opt ) +c_plmesh( const PLFLT *x, const PLFLT *y, const PLFLT * const *z, PLINT nx, PLINT ny, PLINT opt ) { plfplot3dc( x, y, plf2ops_c(), (PLPointer) z, nx, ny, opt | MESH, NULL, 0 ); } @@ -147,7 +147,7 @@ //-------------------------------------------------------------------------- void -c_plmeshc( const PLFLT *x, const PLFLT *y, const PLFLT **z, PLINT nx, PLINT ny, PLINT opt, +c_plmeshc( const PLFLT *x, const PLFLT *y, const PLFLT * const *z, PLINT nx, PLINT ny, PLINT opt, const PLFLT *clevel, PLINT nlevel ) { plfplot3dc( x, y, plf2ops_c(), (PLPointer) z, nx, ny, opt | MESH, clevel, nlevel ); @@ -323,7 +323,7 @@ //-------------------------------------------------------------------------- void -c_plsurf3d( const PLFLT *x, const PLFLT *y, const PLFLT **z, PLINT nx, PLINT ny, +c_plsurf3d( const PLFLT *x, const PLFLT *y, const PLFLT * const *z, PLINT nx, PLINT ny, PLINT opt, const PLFLT *clevel, PLINT nlevel ) { plfsurf3d( x, y, plf2ops_c(), (PLPointer) z, nx, ny, @@ -386,7 +386,7 @@ //-------------------------------------------------------------------------- void -c_plsurf3dl( const PLFLT *x, const PLFLT *y, const PLFLT **z, PLINT nx, PLINT ny, +c_plsurf3dl( const PLFLT *x, const PLFLT *y, const PLFLT * const *z, PLINT nx, PLINT ny, PLINT opt, const PLFLT *clevel, PLINT nlevel, PLINT ixstart, PLINT ixn, const PLINT *indexymin, const PLINT *indexymax ) { @@ -617,7 +617,7 @@ } } // Fill cont structure with contours. - cont_store( (const PLFLT **) zstore, nx, ny, ixstart + 1, ixn, 1, ny, + cont_store( (const PLFLT * const *) zstore, nx, ny, ixstart + 1, ixn, 1, ny, clevel, nlevel, pltr2, (void *) &cgrid2, &cont ); // Free the 2D input arrays to cont_store since not needed any more. @@ -854,7 +854,7 @@ //-------------------------------------------------------------------------- void -c_plot3d( const PLFLT *x, const PLFLT *y, const PLFLT **z, +c_plot3d( const PLFLT *x, const PLFLT *y, const PLFLT * const *z, PLINT nx, PLINT ny, PLINT opt, PLBOOL side ) { plfplot3dc( x, y, plf2ops_c(), (PLPointer) z, nx, ny, opt | ( side != 0 ? DRAW_SIDES : 0 ), NULL, 0 ); @@ -877,7 +877,7 @@ //-------------------------------------------------------------------------- void -c_plot3dc( const PLFLT *x, const PLFLT *y, const PLFLT **z, +c_plot3dc( const PLFLT *x, const PLFLT *y, const PLFLT * const*z, PLINT nx, PLINT ny, PLINT opt, const PLFLT *clevel, PLINT nlevel ) { @@ -915,7 +915,7 @@ //-------------------------------------------------------------------------- void -c_plot3dcl( const PLFLT *x, const PLFLT *y, const PLFLT **z, +c_plot3dcl( const PLFLT *x, const PLFLT *y, const PLFLT * const *z, PLINT nx, PLINT ny, PLINT opt, const PLFLT *clevel, PLINT nlevel, PLINT ixstart, PLINT ixn, const PLINT *indexymin, const PLINT *indexymax ) @@ -1323,7 +1323,7 @@ pl3upv = 0; // Fill cont structure with contours. - cont_store( (const PLFLT **) zstore, nx, ny, 1, nx, 1, ny, + cont_store( (const PLFLT * const *) zstore, nx, ny, 1, nx, 1, ny, clevel, nlevel, pltr2, (void *) &cgrid2, &cont ); // Free the 2D input arrays to cont_store since not needed any more. Modified: trunk/src/plshade.c =================================================================== --- trunk/src/plshade.c 2011-12-03 08:35:52 UTC (rev 12094) +++ trunk/src/plshade.c 2011-12-03 08:56:15 UTC (rev 12095) @@ -202,7 +202,7 @@ // (if cont_color <= 0 or cont_width <=0, no such contours are drawn). //-------------------------------------------------------------------------- -void c_plshades( const PLFLT **a, PLINT nx, PLINT ny, PLINT ( *defined )( PLFLT, PLFLT ), +void c_plshades( const PLFLT * const *a, PLINT nx, PLINT ny, PLINT ( *defined )( PLFLT, PLFLT ), PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, const PLFLT *clevel, PLINT nlevel, PLINT fill_width, PLINT cont_color, PLINT cont_width, @@ -210,7 +210,7 @@ void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data ) { - plfshades( plf2ops_c(), a, nx, ny, defined, + plfshades( plf2ops_c(), (PLPointer) a, nx, ny, defined, xmin, xmax, ymin, ymax, clevel, nlevel, fill_width, cont_color, cont_width, @@ -318,7 +318,7 @@ // via a (PLFLT **), and is column-dominant (normal C ordering). //-------------------------------------------------------------------------- -void c_plshade( const PLFLT **a, PLINT nx, PLINT ny, PLINT ( *defined )( PLFLT, PLFLT ), +void c_plshade( const PLFLT * const *a, PLINT nx, PLINT ny, PLINT ( *defined )( PLFLT, PLFLT ), PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT shade_min, PLFLT shade_max, PLINT sh_cmap, PLFLT sh_color, PLINT sh_width, Modified: trunk/src/plvect.c =====================... [truncated message content] |