From: <and...@us...> - 2013-11-22 13:16:19
|
Revision: 12735 http://sourceforge.net/p/plplot/code/12735 Author: andrewross Date: 2013-11-22 13:16:16 +0000 (Fri, 22 Nov 2013) Log Message: ----------- Fix up const arguments to plgFileDevs calls. Modified Paths: -------------- trunk/bindings/tk/plframe.c trunk/bindings/tk-x-plat/plplotter.c Modified: trunk/bindings/tk/plframe.c =================================================================== --- trunk/bindings/tk/plframe.c 2013-11-21 22:52:38 UTC (rev 12734) +++ trunk/bindings/tk/plframe.c 2013-11-22 13:16:16 UTC (rev 12735) @@ -139,9 +139,9 @@ char *SaveFnam; // File name we are currently saving to. // Malloc'ed. - char **devDesc; // Descriptive names for file-oriented + const char **devDesc; // Descriptive names for file-oriented // devices. Malloc'ed. - char **devName; // Keyword names of file-oriented devices. + const char **devName; // Keyword names of file-oriented devices. // Malloc'ed. // Used in selecting & modifying plot or device area @@ -447,15 +447,15 @@ // Create list of valid device names and keywords for page dumps - plFramePtr->devDesc = (char **) ckalloc( NDEV * sizeof ( char ** ) ); - plFramePtr->devName = (char **) ckalloc( NDEV * sizeof ( char ** ) ); + plFramePtr->devDesc = (const char **) ckalloc( NDEV * sizeof ( char ** ) ); + plFramePtr->devName = (const char **) ckalloc( NDEV * sizeof ( char ** ) ); for ( i = 0; i < NDEV; i++ ) { plFramePtr->devDesc[i] = NULL; plFramePtr->devName[i] = NULL; } ndev = NDEV; - plgFileDevs( (const char ***) &plFramePtr->devDesc, (const char ***) &plFramePtr->devName, &ndev ); + plgFileDevs( &plFramePtr->devDesc, &plFramePtr->devName, &ndev ); // Start up event handlers and other good stuff Modified: trunk/bindings/tk-x-plat/plplotter.c =================================================================== --- trunk/bindings/tk-x-plat/plplotter.c 2013-11-21 22:52:38 UTC (rev 12734) +++ trunk/bindings/tk-x-plat/plplotter.c 2013-11-22 13:16:16 UTC (rev 12735) @@ -151,9 +151,9 @@ char *SaveFnam; // File name we are currently saving to. // Malloc'ed. - char **devDesc; // Descriptive names for file-oriented + const char **devDesc; // Descriptive names for file-oriented // devices. Malloc'ed. - char **devName; // Keyword names of file-oriented devices. + const char **devName; // Keyword names of file-oriented devices. // Malloc'ed. // Used in selecting & modifying plot or device area @@ -433,15 +433,15 @@ // Create list of valid device names and keywords for page dumps - plPlotterPtr->devDesc = (char **) malloc( (size_t) NDEV * sizeof ( char ** ) ); - plPlotterPtr->devName = (char **) malloc( (size_t) NDEV * sizeof ( char ** ) ); + plPlotterPtr->devDesc = (const char **) malloc( (size_t) NDEV * sizeof ( char ** ) ); + plPlotterPtr->devName = (const char **) malloc( (size_t) NDEV * sizeof ( char ** ) ); for ( i = 0; i < NDEV; i++ ) { plPlotterPtr->devDesc[i] = NULL; plPlotterPtr->devName[i] = NULL; } ndev = NDEV; - plgFileDevs( (const char ***) &plPlotterPtr->devDesc, (const char ***) &plPlotterPtr->devName, &ndev ); + plgFileDevs( &plPlotterPtr->devDesc, &plPlotterPtr->devName, &ndev ); // Start up event handlers and other good stuff This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |