From: <ai...@us...> - 2011-03-14 03:24:30
|
Revision: 11623 http://plplot.svn.sourceforge.net/plplot/?rev=11623&view=rev Author: airwin Date: 2011-03-14 03:24:23 +0000 (Mon, 14 Mar 2011) Log Message: ----------- Clean up const-related warnings for doubly dimensioned arrays. There is probably a better way to do this since singly dimensioned arrays do not generated these (gcc) warnings. Modified Paths: -------------- trunk/bindings/tcl/tclAPI.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 Modified: trunk/bindings/tcl/tclAPI.c =================================================================== --- trunk/bindings/tcl/tclAPI.c 2011-03-13 20:47:44 UTC (rev 11622) +++ trunk/bindings/tcl/tclAPI.c 2011-03-14 03:24:23 UTC (rev 11623) @@ -1164,7 +1164,7 @@ // contour the data. - plcont( zused, nx, ny, + plcont( (const PLFLT **) zused, nx, ny, kx, lx, ky, ly, matclev->fdata, nclev, pltr, pltr_data ); @@ -1497,7 +1497,7 @@ // plot the vector data. - plvect( uused, vused, nx, ny, + plvect( (const PLFLT **) uused, (const PLFLT **) vused, nx, ny, scaling, pltr, pltr_data ); // Now free up any space which got allocated for our coordinate trickery. @@ -1642,7 +1642,7 @@ return TCL_ERROR; } - plmesh( x, y, z, nx, ny, opt ); + plmesh( x, y, (const PLFLT **) z, nx, ny, opt ); if ( argc == 7 ) { @@ -1881,7 +1881,7 @@ return TCL_ERROR; } - plmeshc( x, y, z, nx, ny, opt, clev, nlev ); + plmeshc( x, y, (const PLFLT **) z, nx, ny, opt, clev, nlev ); if ( argc == 7 ) { @@ -2018,7 +2018,7 @@ return TCL_ERROR; } - plot3d( x, y, z, nx, ny, opt, side ); + plot3d( x, y, (const PLFLT **) z, nx, ny, opt, side ); if ( argc == 8 ) { @@ -2257,7 +2257,7 @@ return TCL_ERROR; } - plot3dc( x, y, z, nx, ny, opt, clev, nlev ); + plot3dc( x, y, (const PLFLT **) z, nx, ny, opt, clev, nlev ); if ( argc == 7 ) { @@ -2496,7 +2496,7 @@ return TCL_ERROR; } - plsurf3d( x, y, z, nx, ny, opt, clev, nlev ); + plsurf3d( x, y, (const PLFLT **) z, nx, ny, opt, clev, nlev ); if ( argc == 7 ) { @@ -2851,7 +2851,7 @@ // Now go make the plot. - plshade( zused, nx, ny, NULL, + plshade( (const PLFLT **) zused, nx, ny, NULL, xmin, xmax, ymin, ymax, sh_min, sh_max, sh_cmap, sh_col, sh_wid, min_col, min_wid, max_col, max_wid, @@ -3176,7 +3176,7 @@ // Now go make the plot. - plshades( zused, nx, ny, NULL, + plshades( (const PLFLT **) zused, nx, ny, NULL, xmin, xmax, ymin, ymax, matclevel->fdata, nlevel, fill_width, cont_color, cont_width, plfill, rect, pltr, pltr_data ); @@ -3688,7 +3688,7 @@ // fprintf(stderr,"Dymin, Dymax: %.17g %.17g\n", Dymin, Dymax); // - c_plimage( pidata, nx, ny, xmin, xmax, ymin, ymax, zmin, zmax, + c_plimage( (const PLFLT **) pidata, nx, ny, xmin, xmax, ymin, ymax, zmin, zmax, Dxmin, Dxmax, Dymin, Dymax ); plFree2dGrid( pidata, nx, ny ); @@ -3794,12 +3794,12 @@ cgrid2.yg[i][j] = yg->fdata[j + i * ( ny + 1 )]; } } - c_plimagefr( pidata, nx, ny, xmin, xmax, ymin, ymax, zmin, zmax, + c_plimagefr( (const PLFLT **) pidata, nx, ny, xmin, xmax, ymin, ymax, zmin, zmax, valuemin, valuemax, pltr2, (void *) &cgrid2 ); } else { - c_plimagefr( pidata, nx, ny, xmin, xmax, ymin, ymax, zmin, zmax, + c_plimagefr( (const PLFLT **) pidata, nx, ny, xmin, xmax, ymin, ymax, zmin, zmax, valuemin, valuemax, pltr0, NULL ); } Modified: trunk/examples/c/x08c.c =================================================================== --- trunk/examples/c/x08c.c 2011-03-13 20:47:44 UTC (rev 11622) +++ trunk/examples/c/x08c.c 2011-03-14 03:24:23 UTC (rev 11623) @@ -202,7 +202,7 @@ } } - plMinMax2dGrid( z, XPTS, YPTS, &zmax, &zmin ); + plMinMax2dGrid( (const PLFLT **) 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-03-13 20:47:44 UTC (rev 11622) +++ trunk/examples/c/x09c.c 2011-03-14 03:24:23 UTC (rev 11623) @@ -101,7 +101,7 @@ } plcol0( 2 ); - plcont( z, RPTS, THETAPTS, 1, RPTS, 1, THETAPTS, lev, 10, + plcont( (const PLFLT **) z, RPTS, THETAPTS, 1, RPTS, 1, THETAPTS, lev, 10, pltr2, (void *) &cgrid2 ); plcol0( 1 ); pllab( "", "", "Polar Contour Plot" ); @@ -248,7 +248,7 @@ { // Negative contours pllsty( 2 ); - plcont( z, PRPTS, PTHETAPTS, 1, PRPTS, 1, PTHETAPTS, + plcont( (const PLFLT **) z, PRPTS, PTHETAPTS, 1, PRPTS, 1, PTHETAPTS, clevelneg, nlevelneg, pltr2, (void *) &cgrid2 ); } @@ -256,7 +256,7 @@ { // Positive contours pllsty( 1 ); - plcont( z, PRPTS, PTHETAPTS, 1, PRPTS, 1, PTHETAPTS, + plcont( (const PLFLT **) z, PRPTS, PTHETAPTS, 1, PRPTS, 1, PTHETAPTS, clevelpos, nlevelpos, pltr2, (void *) &cgrid2 ); } @@ -368,10 +368,10 @@ pl_setcontlabelparam( 0.006, 0.3, 0.1, 1 ); plenv( -1.0, 1.0, -1.0, 1.0, 0, 0 ); plcol0( 2 ); - plcont( z, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, mypltr, NULL ); + plcont( (const PLFLT **) z, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, mypltr, NULL ); plstyl( 1, &mark, &space ); plcol0( 3 ); - plcont( w, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, mypltr, NULL ); + plcont( (const PLFLT **) 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" ); @@ -381,12 +381,12 @@ plenv( -1.0, 1.0, -1.0, 1.0, 0, 0 ); plcol0( 2 ); - plcont( z, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, + plcont( (const PLFLT **) z, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, pltr1, (void *) &cgrid1 ); plstyl( 1, &mark, &space ); plcol0( 3 ); - plcont( w, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, + plcont( (const PLFLT **) w, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, pltr1, (void *) &cgrid1 ); plstyl( 0, &mark, &space ); plcol0( 1 ); @@ -395,12 +395,12 @@ // pl_setcontlabelparam(0.006, 0.3, 0.1, 1); // plenv(-1.0, 1.0, -1.0, 1.0, 0, 0); // plcol0(2); - // plcont(z, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, + // plcont((const PLFLT **) z, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, // pltr1, (void *) &cgrid1); // // plstyl(1, &mark, &space); // plcol0(3); - // plcont(w, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, + // plcont((const PLFLT **) w, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, // pltr1, (void *) &cgrid1); // plstyl(0, &mark, &space); // plcol0(1); @@ -411,12 +411,12 @@ plenv( -1.0, 1.0, -1.0, 1.0, 0, 0 ); plcol0( 2 ); - plcont( z, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, + plcont( (const PLFLT **) z, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, pltr2, (void *) &cgrid2 ); plstyl( 1, &mark, &space ); plcol0( 3 ); - plcont( w, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, + plcont( (const PLFLT **) w, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, pltr2, (void *) &cgrid2 ); plstyl( 0, &mark, &space ); plcol0( 1 ); @@ -425,12 +425,12 @@ // pl_setcontlabelparam(0.006, 0.3, 0.1, 1); // plenv(-1.0, 1.0, -1.0, 1.0, 0, 0); // plcol0(2); - // plcont(z, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, + // plcont((const PLFLT **) z, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, // pltr2, (void *) &cgrid2); // // plstyl(1, &mark, &space); // plcol0(3); - // plcont(w, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, + // plcont((const PLFLT **) 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-03-13 20:47:44 UTC (rev 11622) +++ trunk/examples/c/x11c.c 2011-03-14 03:24:23 UTC (rev 11623) @@ -114,7 +114,7 @@ } } - plMinMax2dGrid( z, XPTS, YPTS, &zmax, &zmin ); + plMinMax2dGrid( (const PLFLT **) 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, z, XPTS, YPTS, opt[k] ); + plmesh( x, y, (const PLFLT **) z, XPTS, YPTS, opt[k] ); // magnitude colored wireframe plot else if ( i == 1 ) - plmesh( x, y, z, XPTS, YPTS, opt[k] | MAG_COLOR ); + plmesh( x, y, (const PLFLT **) z, XPTS, YPTS, opt[k] | MAG_COLOR ); // magnitude colored wireframe plot with sides else if ( i == 2 ) - plot3d( x, y, z, XPTS, YPTS, opt[k] | MAG_COLOR, 1 ); + plot3d( x, y, (const PLFLT **) z, XPTS, YPTS, opt[k] | MAG_COLOR, 1 ); // magnitude colored wireframe plot with base contour else if ( i == 3 ) - plmeshc( x, y, z, XPTS, YPTS, opt[k] | MAG_COLOR | BASE_CONT, + plmeshc( x, y, (const PLFLT **) 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-03-13 20:47:44 UTC (rev 11622) +++ trunk/examples/c/x14c.c 2011-03-14 03:24:23 UTC (rev 11623) @@ -419,10 +419,10 @@ plenv( -1.0, 1.0, -1.0, 1.0, 0, 0 ); plcol0( 2 ); - plcont( z, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, mypltr, NULL ); + plcont( (const PLFLT **) z, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, mypltr, NULL ); plstyl( 1, &mark, &space ); plcol0( 3 ); - plcont( w, XPTS, YPTS, 1, XPTS, 1, YPTS, clevel, 11, mypltr, NULL ); + plcont( (const PLFLT **) 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-03-13 20:47:44 UTC (rev 11622) +++ trunk/examples/c/x16c.c 2011-03-14 03:24:23 UTC (rev 11623) @@ -216,7 +216,7 @@ plpsty( 0 ); - plshades( z, nx, ny, NULL, -1., 1., -1., 1., + plshades( (const PLFLT **) z, nx, ny, NULL, -1., 1., -1., 1., shedge, ns + 1, fill_width, cont_color, cont_width, plfill, 1, NULL, NULL ); @@ -225,7 +225,7 @@ plbox( "bcnst", 0.0, 0, "bcnstv", 0.0, 0 ); plcol0( 2 ); // -// plcont(w, nx, ny, 1, nx, 1, ny, clevel, ns, mypltr, NULL); +// plcont((const PLFLT **) w, nx, ny, 1, nx, 1, ny, clevel, ns, mypltr, NULL); // pllab( "distance", "altitude", "Bogon density" ); @@ -243,7 +243,7 @@ plpsty( 0 ); - plshades( z, nx, ny, NULL, -1., 1., -1., 1., + plshades( (const PLFLT **) z, nx, ny, NULL, -1., 1., -1., 1., shedge, ns + 1, fill_width, cont_color, cont_width, plfill, 1, pltr1, (void *) &cgrid1 ); @@ -252,7 +252,7 @@ plbox( "bcnst", 0.0, 0, "bcnstv", 0.0, 0 ); plcol0( 2 ); // -// plcont(w, nx, ny, 1, nx, 1, ny, clevel, ns, pltr1, (void *) &cgrid1); +// plcont((const PLFLT **) w, nx, ny, 1, nx, 1, ny, clevel, ns, pltr1, (void *) &cgrid1); // pllab( "distance", "altitude", "Bogon density" ); @@ -270,7 +270,7 @@ plpsty( 0 ); - plshades( z, nx, ny, NULL, -1., 1., -1., 1., + plshades( (const PLFLT **) z, nx, ny, NULL, -1., 1., -1., 1., shedge, ns + 1, fill_width, cont_color, cont_width, plfill, 0, pltr2, (void *) &cgrid2 ); @@ -278,7 +278,7 @@ plcol0( 1 ); plbox( "bcnst", 0.0, 0, "bcnstv", 0.0, 0 ); plcol0( 2 ); - plcont( w, nx, ny, 1, nx, 1, ny, clevel, ns, pltr2, (void *) &cgrid2 ); + plcont( (const PLFLT **) w, nx, ny, 1, nx, 1, ny, clevel, ns, pltr2, (void *) &cgrid2 ); pllab( "distance", "altitude", "Bogon density, with streamlines" ); @@ -296,7 +296,7 @@ plpsty( 0 ); - plshades( z, nx, ny, NULL, -1., 1., -1., 1., + plshades( (const PLFLT **) z, nx, ny, NULL, -1., 1., -1., 1., shedge, ns + 1, fill_width, 2, 3, plfill, 0, pltr2, (void *) &cgrid2 ); @@ -304,7 +304,7 @@ plcol0( 1 ); plbox( "bcnst", 0.0, 0, "bcnstv", 0.0, 0 ); plcol0( 2 ); -// plcont(w, nx, ny, 1, nx, 1, ny, clevel, ns, pltr2, (void *) &cgrid2); +// plcont((const PLFLT **) w, nx, ny, 1, nx, 1, ny, clevel, ns, pltr2, (void *) &cgrid2); pllab( "distance", "altitude", "Bogon density" ); @@ -326,7 +326,7 @@ plpsty( 0 ); - plshades( z, nx, ny, zdefined, -1., 1., -1., 1., + plshades( (const PLFLT **) z, nx, ny, zdefined, -1., 1., -1., 1., shedge, ns + 1, fill_width, cont_color, cont_width, plfill, 0, pltr2, (void *) &cgrid2 ); @@ -373,7 +373,7 @@ shedge[i] = zmin + ( zmax - zmin ) * (PLFLT) i / (PLFLT) ns; // Now we can shade the interior region. - plshades( z, nx, ny, NULL, -1., 1., -1., 1., + plshades( (const PLFLT **) 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-03-13 20:47:44 UTC (rev 11622) +++ trunk/examples/c/x20c.c 2011-03-14 03:24:23 UTC (rev 11623) @@ -140,7 +140,7 @@ pllab( "...around a blue square.", " ", "A red border should appear..." ); - plimage( z, XDIM, YDIM, + plimage( (const PLFLT **) 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( z, XDIM, YDIM, 0., 2. * M_PI, 0., 3. * M_PI, 0.05, 1., + plimage( (const PLFLT **) 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( img_f, width, height, 1., width, 1., height, 0., 0., + plimage( (const PLFLT **) 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( img_f, width, height, 1., width, 1., height, 0., 0., xi, xe, ye, yi ); + plimage( (const PLFLT **) 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( img_f, width, height, 1., width, 1., height, 0., 0., xi, xe, ye, yi ); + plimage( (const PLFLT **) img_f, width, height, 1., width, 1., height, 0., 0., xi, xe, ye, yi ); } // Base the dynamic range on the image contents. - plMinMax2dGrid( img_f, width, height, &img_max, &img_min ); + plMinMax2dGrid( (const PLFLT **) 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( 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 **) 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 ); @@ -275,7 +275,7 @@ // mypltr. For compatibilty with other language bindings the same effect // can be achieved by generating the transformed grid first and then // using pltr2. - // plimagefr(img_f, width, height, 0., width, 0., height, 0., 0., img_min, img_max, mypltr, (PLPointer) &stretch); + // plimagefr((const PLFLT **) img_f, width, height, 0., width, 0., height, 0., 0., img_min, img_max, mypltr, (PLPointer) &stretch); plAlloc2dGrid( &cgrid2.xg, width + 1, height + 1 ); plAlloc2dGrid( &cgrid2.yg, width + 1, height + 1 ); @@ -292,7 +292,7 @@ } } - plimagefr( img_f, width, height, 0., width, 0., height, 0., 0., img_min, img_max, pltr2, &cgrid2 ); + plimagefr( (const PLFLT **) 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-03-13 20:47:44 UTC (rev 11622) +++ trunk/examples/c/x21c.c 2011-03-14 03:24:23 UTC (rev 11623) @@ -261,7 +261,7 @@ } } - plMinMax2dGrid( zg, xp, yp, &lzM, &lzm ); + plMinMax2dGrid( (const PLFLT **) 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( zg, xp, yp, NULL, xm, xM, ym, yM, + plshades( (const PLFLT **) 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, zg, xp, yp, DRAW_LINEXY | MAG_COLOR | BASE_CONT, clev, nl ); + plot3dc( xg, yg, (const PLFLT **) zg, xp, yp, DRAW_LINEXY | MAG_COLOR | BASE_CONT, clev, nl ); } } } Modified: trunk/examples/c/x22c.c =================================================================== --- trunk/examples/c/x22c.c 2011-03-13 20:47:44 UTC (rev 11622) +++ trunk/examples/c/x22c.c 2011-03-14 03:24:23 UTC (rev 11623) @@ -85,7 +85,7 @@ plenv( xmin, xmax, ymin, ymax, 0, 0 ); pllab( "(x)", "(y)", "#frPLplot Example 22 - circulation" ); plcol0( 2 ); - plvect( u, v, nx, ny, 0.0, pltr2, (void *) &cgrid2 ); + plvect( (const PLFLT **) u, (const PLFLT **) v, nx, ny, 0.0, pltr2, (void *) &cgrid2 ); plcol0( 1 ); plFree2dGrid( cgrid2.xg, nx, ny ); @@ -153,7 +153,7 @@ plenv( xmin, xmax, ymin, ymax, 0, 0 ); pllab( "(x)", "(y)", "#frPLplot Example 22 - constriction" ); plcol0( 2 ); - plvect( u, v, nx, ny, -0.5, pltr2, (void *) &cgrid2 ); + plvect( (const PLFLT **) u, (const PLFLT **) v, nx, ny, -0.5, pltr2, (void *) &cgrid2 ); plcol0( 1 ); plFree2dGrid( cgrid2.xg, nx, ny ); @@ -275,13 +275,13 @@ } plcol0( 3 ); pllsty( 2 ); - plcont( z, nr, ntheta, 1, nr, 1, ntheta, clevel, nlevel, pltr2, (void *) &cgrid2 ); + plcont( (const PLFLT **) 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( u, v, nr, ntheta, 25.0, pltr2, (void *) &cgrid2 ); + plvect( (const PLFLT **) u, (const PLFLT **) 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-03-13 20:47:44 UTC (rev 11622) +++ trunk/examples/c/x28c.c 2011-03-14 03:24:23 UTC (rev 11623) @@ -163,7 +163,7 @@ 0.0, " revolution" ); } // Draw minimal 3D grid to finish defining the 3D box. - plmesh( x, y, z, XPTS, YPTS, DRAW_LINEXY ); + plmesh( x, y, (const PLFLT **) 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, z, XPTS, YPTS, DRAW_LINEXY ); + plmesh( x, y, (const PLFLT **) 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, z, XPTS, YPTS, DRAW_LINEXY ); + plmesh( x, y, (const PLFLT **) 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, z, XPTS, YPTS, DRAW_LINEXY ); + plmesh( x, y, (const PLFLT **) 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, z, XPTS, YPTS, DRAW_LINEXY ); + plmesh( x, y, (const PLFLT **) z, XPTS, YPTS, DRAW_LINEXY ); // Clean up. free( (void *) x ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |