From: <ai...@us...> - 2011-10-27 05:27:05
|
Revision: 12002 http://plplot.svn.sourceforge.net/plplot/?rev=12002&view=rev Author: airwin Date: 2011-10-27 05:26:59 +0000 (Thu, 27 Oct 2011) Log Message: ----------- Style previous changes. Modified Paths: -------------- trunk/bindings/tk/plr.c trunk/include/plplotP.h trunk/src/plargs.c Modified: trunk/bindings/tk/plr.c =================================================================== --- trunk/bindings/tk/plr.c 2011-10-27 05:26:31 UTC (rev 12001) +++ trunk/bindings/tk/plr.c 2011-10-27 05:26:59 UTC (rev 12002) @@ -48,13 +48,13 @@ // Some wrapper macros to return (-1) on error // Note we use %lu and an explicit cast to unsigned long to print size_t pointers. -// C99 adds %zd as an explicit format specifier for size_t but this is not yet -// fully adopted. +// C99 adds %zd as an explicit format specifier for size_t but this is not yet +// fully adopted. -#define plr_rd( code ) \ - if ( code ) { fprintf( stderr, \ - "Unable to read from %s in %s at line %d, bytecount %lu\n", \ - plr->iodev->typeName, __FILE__, __LINE__, (unsigned long) plr->pdfs->bp ); \ +#define plr_rd( code ) \ + if ( code ) { fprintf( stderr, \ + "Unable to read from %s in %s at line %d, bytecount %lu\n", \ + plr->iodev->typeName, __FILE__, __LINE__, (unsigned long) plr->pdfs->bp ); \ return -1; } #define plr_cmd( code ) \ Modified: trunk/include/plplotP.h =================================================================== --- trunk/include/plplotP.h 2011-10-27 05:26:31 UTC (rev 12001) +++ trunk/include/plplotP.h 2011-10-27 05:26:59 UTC (rev 12002) @@ -279,15 +279,15 @@ #define HUGE_VAL ( 1.0 / 0.0 ) #endif -// Macro to mark function parameters as unused. -// For gcc this uses the unused attribute to remove compiler warnings. +// Macro to mark function parameters as unused. +// For gcc this uses the unused attribute to remove compiler warnings. // For all compilers the parameter name is also mangled to prevent // accidental use. #ifdef UNUSED -#elif defined(__GNUC__) -# define UNUSED(x) UNUSED_ ## x __attribute__((unused)) +#elif defined ( __GNUC__ ) +# define UNUSED( x ) UNUSED_ ## x __attribute__( ( unused ) ) #else -# define UNUSED(x) UNUSED_ ## x +# define UNUSED( x ) UNUSED_ ## x #endif //-------------------------------------------------------------------------- Modified: trunk/src/plargs.c =================================================================== --- trunk/src/plargs.c 2011-10-27 05:26:31 UTC (rev 12001) +++ trunk/src/plargs.c 2011-10-27 05:26:59 UTC (rev 12002) @@ -1479,7 +1479,7 @@ //-------------------------------------------------------------------------- static int -opt_h( const char * UNUSED(opt), const char * UNUSED(opt_arg), void * UNUSED(client_data) ) +opt_h( const char * UNUSED( opt ), const char * UNUSED( opt_arg ), void * UNUSED( client_data ) ) { if ( !mode_quiet ) Help(); @@ -1495,7 +1495,7 @@ //-------------------------------------------------------------------------- static int -opt_v( const char * UNUSED(opt), const char * UNUSED(opt_arg), void * UNUSED(client_data) ) +opt_v( const char * UNUSED( opt ), const char * UNUSED( opt_arg ), void * UNUSED( client_data ) ) { if ( !mode_quiet ) fprintf( stderr, "PLplot library version: %s\n", VERSION ); @@ -1511,7 +1511,7 @@ //-------------------------------------------------------------------------- static int -opt_verbose( const char * UNUSED(opt), const char * UNUSED(opt_arg), void * UNUSED(client_data) ) +opt_verbose( const char * UNUSED( opt ), const char * UNUSED( opt_arg ), void * UNUSED( client_data ) ) { plsc->verbose = 1; return 0; @@ -1525,7 +1525,7 @@ //-------------------------------------------------------------------------- static int -opt_debug( const char * UNUSED(opt), const char * UNUSED(opt_arg), void * UNUSED(client_data) ) +opt_debug( const char * UNUSED( opt ), const char * UNUSED( opt_arg ), void * UNUSED( client_data ) ) { plsc->debug = 1; plsc->verbose = 1; @@ -1540,7 +1540,7 @@ //-------------------------------------------------------------------------- static int -opt_hack( const char * UNUSED(opt), const char * UNUSED(opt_arg), void * UNUSED(client_data) ) +opt_hack( const char * UNUSED( opt ), const char * UNUSED( opt_arg ), void * UNUSED( client_data ) ) { plsc->hack = 1; return 0; @@ -1554,7 +1554,7 @@ //-------------------------------------------------------------------------- static int -opt_dev( const char * UNUSED(opt), const char *opt_arg, void * UNUSED(client_data) ) +opt_dev( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) { plsdev( opt_arg ); return 0; @@ -1568,7 +1568,7 @@ //-------------------------------------------------------------------------- static int -opt_o( const char * UNUSED(opt), const char *opt_arg, void * UNUSED(client_data) ) +opt_o( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) { plsfnam( opt_arg ); return 0; @@ -1582,7 +1582,7 @@ //-------------------------------------------------------------------------- static int -opt_mar( const char * UNUSED(opt), const char *opt_arg, void * UNUSED(client_data) ) +opt_mar( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) { plsdidev( atof( opt_arg ), PL_NOTSET, PL_NOTSET, PL_NOTSET ); return 0; @@ -1596,7 +1596,7 @@ //-------------------------------------------------------------------------- static int -opt_a( const char * UNUSED(opt), const char *opt_arg, void * UNUSED(client_data) ) +opt_a( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) { plsdidev( PL_NOTSET, atof( opt_arg ), PL_NOTSET, PL_NOTSET ); return 0; @@ -1610,7 +1610,7 @@ //-------------------------------------------------------------------------- static int -opt_jx( const char * UNUSED(opt), const char *opt_arg, void * UNUSED(client_data) ) +opt_jx( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) { plsdidev( PL_NOTSET, PL_NOTSET, atof( opt_arg ), PL_NOTSET ); return 0; @@ -1624,7 +1624,7 @@ //-------------------------------------------------------------------------- static int -opt_jy( const char * UNUSED(opt), const char *opt_arg, void * UNUSED(client_data) ) +opt_jy( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) { plsdidev( PL_NOTSET, PL_NOTSET, PL_NOTSET, atof( opt_arg ) ); return 0; @@ -1638,7 +1638,7 @@ //-------------------------------------------------------------------------- static int -opt_ori( const char * UNUSED(opt), const char *opt_arg, void * UNUSED(client_data) ) +opt_ori( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) { plsdiori( atof( opt_arg ) ); return 0; @@ -1652,7 +1652,7 @@ //-------------------------------------------------------------------------- static int -opt_freeaspect( const char * UNUSED(opt), const char * UNUSED(opt_arg), void * UNUSED(client_data) ) +opt_freeaspect( const char * UNUSED( opt ), const char * UNUSED( opt_arg ), void * UNUSED( client_data ) ) { plsc->freeaspect = 1; return 0; @@ -1680,7 +1680,7 @@ //-------------------------------------------------------------------------- static int -opt_portrait( const char * UNUSED(opt), const char * UNUSED(opt_arg), void * UNUSED(client_data) ) +opt_portrait( const char * UNUSED( opt ), const char * UNUSED( opt_arg ), void * UNUSED( client_data ) ) { plsc->portrait = 1; return 0; @@ -1694,7 +1694,7 @@ //-------------------------------------------------------------------------- static int -opt_width( const char * UNUSED(opt), const char *opt_arg, void * UNUSED(client_data) ) +opt_width( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) { int width; @@ -1724,7 +1724,7 @@ //-------------------------------------------------------------------------- static int -opt_bg( const char * UNUSED(opt), const char *opt_arg, void * UNUSED(client_data) ) +opt_bg( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) { const char *rgb; char *color_field, *alpha_field; @@ -1800,7 +1800,7 @@ //-------------------------------------------------------------------------- static int -opt_ncol0( const char * UNUSED(opt), const char *opt_arg, void * UNUSED(client_data) ) +opt_ncol0( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) { plsc->ncol0 = atoi( opt_arg ); return 0; @@ -1814,7 +1814,7 @@ //-------------------------------------------------------------------------- static int -opt_ncol1( const char * UNUSED(opt), const char *opt_arg, void * UNUSED(client_data) ) +opt_ncol1( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) { plsc->ncol1 = atoi( opt_arg ); return 0; @@ -1828,7 +1828,7 @@ //-------------------------------------------------------------------------- static int -opt_wplt( const char * UNUSED(opt), const char *opt_arg, void * UNUSED(client_data) ) +opt_wplt( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) { char *field; PLFLT xl, yl, xr, yr; @@ -1868,7 +1868,7 @@ //-------------------------------------------------------------------------- static int -opt_drvopt( const char * UNUSED(opt), const char *opt_arg, void * UNUSED(client_data) ) +opt_drvopt( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) { char t, *tt, *option, *value; int fl = 0; @@ -1951,7 +1951,7 @@ //-------------------------------------------------------------------------- static int -opt_fam( const char * UNUSED(opt), const char * UNUSED(opt_arg), void * UNUSED(client_data) ) +opt_fam( const char * UNUSED( opt ), const char * UNUSED( opt_arg ), void * UNUSED( client_data ) ) { plsfam( 1, -1, -1 ); return 0; @@ -1974,7 +1974,7 @@ //-------------------------------------------------------------------------- static int -opt_fsiz( const char * UNUSED(opt), const char *opt_arg, void * UNUSED(client_data) ) +opt_fsiz( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) { PLINT bytemax; size_t len = strlen( opt_arg ); @@ -2025,7 +2025,7 @@ //-------------------------------------------------------------------------- static int -opt_fbeg( const char * UNUSED(opt), const char *opt_arg, void * UNUSED(client_data) ) +opt_fbeg( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) { plsc->member = atoi( opt_arg ); @@ -2040,7 +2040,7 @@ //-------------------------------------------------------------------------- static int -opt_finc( const char * UNUSED(opt), const char *opt_arg, void * UNUSED(client_data) ) +opt_finc( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) { plsc->finc = atoi( opt_arg ); @@ -2055,7 +2055,7 @@ //-------------------------------------------------------------------------- static int -opt_fflen( const char * UNUSED(opt), const char *opt_arg, void * UNUSED(client_data) ) +opt_fflen( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) { plsc->fflen = atoi( opt_arg ); @@ -2070,7 +2070,7 @@ //-------------------------------------------------------------------------- static int -opt_np( const char * UNUSED(opt), const char * UNUSED(opt_arg), void * UNUSED(client_data) ) +opt_np( const char * UNUSED( opt ), const char * UNUSED( opt_arg ), void * UNUSED( client_data ) ) { plspause( 0 ); return 0; @@ -2084,7 +2084,7 @@ //-------------------------------------------------------------------------- static int -opt_nopixmap( const char * UNUSED(opt), const char * UNUSED(opt_arg), void * UNUSED(client_data) ) +opt_nopixmap( const char * UNUSED( opt ), const char * UNUSED( opt_arg ), void * UNUSED( client_data ) ) { plsc->nopixmap = 1; return 0; @@ -2098,7 +2098,7 @@ //-------------------------------------------------------------------------- static int -opt_db( const char * UNUSED(opt), const char * UNUSED(opt_arg), void * UNUSED(client_data) ) +opt_db( const char * UNUSED( opt ), const char * UNUSED( opt_arg ), void * UNUSED( client_data ) ) { plsc->db = 1; return 0; @@ -2112,7 +2112,7 @@ //-------------------------------------------------------------------------- static int -opt_bufmax( const char * UNUSED(opt), const char *opt_arg, void * UNUSED(client_data) ) +opt_bufmax( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) { plsc->bufmax = atoi( opt_arg ); return 0; @@ -2126,7 +2126,7 @@ //-------------------------------------------------------------------------- static int -opt_server_name( const char * UNUSED(opt), const char *opt_arg, void * UNUSED(client_data) ) +opt_server_name( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) { plsc->server_name = plstrdup( opt_arg ); return 0; @@ -2140,7 +2140,7 @@ //-------------------------------------------------------------------------- static int -opt_plserver( const char * UNUSED(opt), const char *opt_arg, void * UNUSED(client_data) ) +opt_plserver( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) { plsc->plserver = plstrdup( opt_arg ); return 0; @@ -2154,7 +2154,7 @@ //-------------------------------------------------------------------------- static int -opt_plwindow( const char * UNUSED(opt), const char *opt_arg, void * UNUSED(client_data) ) +opt_plwindow( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) { if ( ( plsc->plwindow = (char *) malloc( (size_t) ( 1 + strlen( opt_arg ) ) * sizeof ( char ) ) ) == NULL ) { @@ -2172,7 +2172,7 @@ //-------------------------------------------------------------------------- static int -opt_auto_path( const char * UNUSED(opt), const char *opt_arg, void * UNUSED(client_data) ) +opt_auto_path( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) { plsc->auto_path = plstrdup( opt_arg ); return 0; @@ -2186,7 +2186,7 @@ //-------------------------------------------------------------------------- static int -opt_px( const char * UNUSED(opt), const char *opt_arg, void * UNUSED(client_data) ) +opt_px( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) { plssub( atoi( opt_arg ), -1 ); return 0; @@ -2200,7 +2200,7 @@ //-------------------------------------------------------------------------- static int -opt_py( const char * UNUSED(opt), const char *opt_arg, void * UNUSED(client_data) ) +opt_py( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) { plssub( -1, atoi( opt_arg ) ); return 0; @@ -2218,7 +2218,7 @@ //-------------------------------------------------------------------------- static int -opt_geo( const char * UNUSED(opt), const char *opt_arg, void * UNUSED(client_data) ) +opt_geo( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) { int numargs; PLFLT xdpi = 0., ydpi = 0.; @@ -2304,7 +2304,7 @@ //-------------------------------------------------------------------------- static int -opt_tk_file( const char * UNUSED(opt), const char *opt_arg, void * UNUSED(client_data) ) +opt_tk_file( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) { if ( ( plsc->tk_file = (char *) malloc( (size_t) ( 1 + strlen( opt_arg ) ) * sizeof ( char ) ) ) == NULL ) { @@ -2327,7 +2327,7 @@ //-------------------------------------------------------------------------- static int -opt_dpi( const char * UNUSED(opt), const char *opt_arg, void * UNUSED(client_data) ) +opt_dpi( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) { char *field; PLFLT xdpi = 0., ydpi = 0.; @@ -2368,7 +2368,7 @@ //-------------------------------------------------------------------------- static int -opt_dev_compression( const char * UNUSED(opt), const char *opt_arg, void * UNUSED(client_data) ) +opt_dev_compression( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) { PLINT comp = 0; @@ -2390,7 +2390,7 @@ //-------------------------------------------------------------------------- static int -opt_cmap0( const char * UNUSED(opt), const char *opt_arg, void * UNUSED(client_data) ) +opt_cmap0( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) { plspal0( opt_arg ); return 0; @@ -2403,7 +2403,7 @@ //-------------------------------------------------------------------------- static int -opt_cmap1( const char * UNUSED(opt), const char *opt_arg, void * UNUSED(client_data) ) +opt_cmap1( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) { plspal1( opt_arg, TRUE ); return 0; @@ -2416,7 +2416,7 @@ //-------------------------------------------------------------------------- static int -opt_locale( const char * UNUSED(opt), const char * UNUSED(opt_arg), void * UNUSED(client_data) ) +opt_locale( const char * UNUSED( opt ), const char * UNUSED( opt_arg ), void * UNUSED( client_data ) ) { char *locale; if ( ( locale = setlocale( LC_NUMERIC, "" ) ) ) @@ -2443,7 +2443,7 @@ //-------------------------------------------------------------------------- static int -opt_eofill( const char * UNUSED(opt), const char * UNUSED(opt_arg), void * UNUSED(client_data) ) +opt_eofill( const char * UNUSED( opt ), const char * UNUSED( opt_arg ), void * UNUSED( client_data ) ) { plsc->dev_eofill = 1; return 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2011-10-28 12:03:06
|
Revision: 12007 http://plplot.svn.sourceforge.net/plplot/?rev=12007&view=rev Author: andrewross Date: 2011-10-28 12:02:58 +0000 (Fri, 28 Oct 2011) Log Message: ----------- Fix a batch more compiler warnings, mostly due to unused parameters. These are now marked with the USED macros if the parameters are never used, or cast to void if their use is conditional through C preprocessor defines. Modified Paths: -------------- trunk/bindings/f95/sccont.c trunk/bindings/f95/scstubs.c trunk/bindings/tcl/pltclgen.tcl trunk/bindings/tcl/tclAPI.c trunk/bindings/tcl/tclMain.c trunk/bindings/tcl/tclMatrix.c trunk/bindings/tcl/tclcmd.tpl trunk/bindings/tk/plframe.c trunk/bindings/tk/plr.c trunk/bindings/tk/plserver.c trunk/bindings/tk/plserver.h trunk/bindings/tk/tkMain.c trunk/drivers/cairo.c trunk/drivers/mem.c trunk/drivers/null.c trunk/drivers/ps.c trunk/drivers/psttf.cc trunk/drivers/svg.c trunk/drivers/test-drv-info.c trunk/drivers/tk.c trunk/drivers/wxwidgets.cpp trunk/drivers/wxwidgets_app.cpp trunk/drivers/wxwidgets_dc.cpp trunk/drivers/xwin.c Modified: trunk/bindings/f95/sccont.c =================================================================== --- trunk/bindings/f95/sccont.c 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/bindings/f95/sccont.c 2011-10-28 12:02:58 UTC (rev 12007) @@ -120,7 +120,7 @@ //-------------------------------------------------------------------------- void -pltr0f( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *pltr_data ) +pltr0f( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *UNUSED( pltr_data ) ) { *tx = x + 1.0; *ty = y + 1.0; @@ -353,7 +353,7 @@ //-------------------------------------------------------------------------- void -PLSHADE07( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined, +PLSHADE07( PLFLT *z, PLINT *nx, PLINT *ny, const char *UNUSED( defined ), PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLFLT *shade_min, PLFLT *shade_max, PLINT *sh_cmap, PLFLT *sh_color, PLINT *sh_width, @@ -389,7 +389,7 @@ // 1-d transformation void -PLSHADE17( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined, +PLSHADE17( PLFLT *z, PLINT *nx, PLINT *ny, const char * UNUSED( defined ), PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLFLT *shade_min, PLFLT *shade_max, PLINT *sh_cmap, PLFLT *sh_color, PLINT *sh_width, @@ -430,7 +430,7 @@ // 2-d transformation void -PLSHADE27( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined, +PLSHADE27( PLFLT *z, PLINT *nx, PLINT *ny, const char * UNUSED( defined ), PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLFLT *shade_min, PLFLT *shade_max, PLINT *sh_cmap, PLFLT *sh_color, PLINT *sh_width, @@ -473,7 +473,7 @@ } void -PLSHADE7( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined, +PLSHADE7( PLFLT *z, PLINT *nx, PLINT *ny, const char * UNUSED( defined ), PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLFLT *shade_min, PLFLT *shade_max, PLINT *sh_cmap, PLFLT *sh_color, PLINT *sh_width, @@ -516,7 +516,7 @@ //-------------------------------------------------------------------------- void -PLSHADES07( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined, +PLSHADES07( PLFLT *z, PLINT *nx, PLINT *ny, const char * UNUSED( defined ), PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLFLT *clevel, PLINT *nlevel, PLINT *fill_width, PLINT *cont_color, PLINT *cont_width, PLINT *lx ) @@ -546,7 +546,7 @@ } void -PLSHADES17( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined, +PLSHADES17( PLFLT *z, PLINT *nx, PLINT *ny, const char * UNUSED( defined ), PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLFLT *clevel, PLINT *nlevel, PLINT *fill_width, PLINT *cont_color, PLINT *cont_width, @@ -583,7 +583,7 @@ } void -PLSHADES27( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined, +PLSHADES27( PLFLT *z, PLINT *nx, PLINT *ny, const char * UNUSED( defined ), PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLFLT *clevel, PLINT *nlevel, PLINT *fill_width, PLINT *cont_color, PLINT *cont_width, @@ -623,7 +623,7 @@ } void -PLSHADES7( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined, +PLSHADES7( PLFLT *z, PLINT *nx, PLINT *ny, const char * UNUSED( defined) , PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLFLT *clevel, PLINT *nlevel, PLINT *fill_width, PLINT *cont_color, PLINT *cont_width, PLFLT *ftr, PLINT *lx ) Modified: trunk/bindings/f95/scstubs.c =================================================================== --- trunk/bindings/f95/scstubs.c 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/bindings/f95/scstubs.c 2011-10-28 12:02:58 UTC (rev 12007) @@ -265,7 +265,7 @@ void PLXORMOD( PLBOOL *mode, PLBOOL *status ); static void -pltransformf2c( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer data ) +pltransformf2c( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer UNUSED( data ) ) { ( *pltransform )( &x, &y, tx, ty ); } @@ -519,7 +519,7 @@ } void -PLGDEV7( char *dev, int length ) +PLGDEV7( char *dev, int UNUSED( length ) ) { c_plgdev( dev ); } @@ -564,7 +564,7 @@ } void -PLGFNAM7( char *fnam, int length ) +PLGFNAM7( char *fnam, int UNUSED( length ) ) { c_plgfnam( fnam ); } @@ -754,7 +754,7 @@ } static void -pllabelfuncf2c( PLINT axis, PLFLT value, char *label, PLINT length, PLPointer data ) +pllabelfuncf2c( PLINT axis, PLFLT value, char *label, PLINT length, PLPointer UNUSED( data ) ) { int i; @@ -1243,14 +1243,14 @@ } void -PLSLABELFUNC_OFF( PLINT *dummy ) +PLSLABELFUNC_OFF( PLINT * UNUSED( dummy ) ) { pllabelfunc = NULL; c_plslabelfunc( NULL, NULL ); } void -PLSLABELFUNC_OFFa( PLINT *dummy ) +PLSLABELFUNC_OFFa( PLINT * UNUSED( dummy ) ) { pllabelfunc = NULL; c_plslabelfunc( NULL, NULL ); @@ -1364,7 +1364,7 @@ } void -PLSTRANSFORM2( PLINT *dummy ) +PLSTRANSFORM2( PLINT * UNUSED( dummy ) ) { pltransform = NULL; Modified: trunk/bindings/tcl/pltclgen.tcl =================================================================== --- trunk/bindings/tcl/pltclgen.tcl 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/bindings/tcl/pltclgen.tcl 2011-10-28 12:02:58 UTC (rev 12007) @@ -187,7 +187,7 @@ puts $GENFILE " $argname($i) = atoi(argv\[1+$i\]);" } "PLUNICODE" { - puts $GENFILE " $argname($i) = strtoul(argv\[1+$i\],NULL,10);" + puts $GENFILE " $argname($i) = (PLUNICODE) strtoul(argv\[1+$i\],NULL,10);" } "unsigned int" { puts $GENFILE " $argname($i) = (unsigned int) strtoul(argv\[1+$i\],NULL,10);" Modified: trunk/bindings/tcl/tclAPI.c =================================================================== --- trunk/bindings/tcl/tclAPI.c 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/bindings/tcl/tclAPI.c 2011-10-28 12:02:58 UTC (rev 12007) @@ -71,6 +71,7 @@ static int plstripcCmd( ClientData, Tcl_Interp *, int, const char ** ); static int plslabelfuncCmd( ClientData, Tcl_Interp *, int, const char ** ); void mapform( PLINT n, PLFLT *x, PLFLT *y ); +void labelform( PLINT axis, PLFLT value, char *string, PLINT string_length, PLPointer data ); PLFLT tclMatrix_feval( PLINT i, PLINT j, PLPointer p ); // @@ -206,7 +207,7 @@ //-------------------------------------------------------------------------- static void -plTclCmd_Init( Tcl_Interp *interp ) +plTclCmd_Init( Tcl_Interp * UNUSED( interp ) ) { register Command *cmdPtr; register CmdInfo *cmdInfoPtr; @@ -328,7 +329,7 @@ //-------------------------------------------------------------------------- static int -loopbackCmd( ClientData clientData, Tcl_Interp *interp, +loopbackCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char **argv ) { register Tcl_HashEntry *hPtr; @@ -623,7 +624,7 @@ //-------------------------------------------------------------------------- int -plWait_Until( ClientData clientData, Tcl_Interp *interp, int argc, const char **argv ) +plWait_Until( ClientData UNUSED( clientData ), Tcl_Interp *interp, int UNUSED( argc ), const char **argv ) { int result = 0; @@ -862,7 +863,7 @@ } static int -plcontCmd( ClientData clientData, Tcl_Interp *interp, +plcontCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { tclMatrix *matPtr, *matf, *matclev; @@ -1198,7 +1199,7 @@ // plvect implementation (based on plcont above) //-------------------------------------------------------------------------- static int -plvectCmd( ClientData clientData, Tcl_Interp *interp, +plvectCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { tclMatrix *matPtr, *matu, *matv; @@ -1542,7 +1543,7 @@ //-------------------------------------------------------------------------- static int -plmeshCmd( ClientData clientData, Tcl_Interp *interp, +plmeshCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { PLINT nx, ny, opt; @@ -1680,7 +1681,7 @@ //-------------------------------------------------------------------------- static int -plmeshcCmd( ClientData clientData, Tcl_Interp *interp, +plmeshcCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { PLINT nx, ny, opt, nlev = 10; @@ -1916,7 +1917,7 @@ //-------------------------------------------------------------------------- static int -plot3dCmd( ClientData clientData, Tcl_Interp *interp, +plot3dCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { PLINT nx, ny, opt, side; @@ -2056,7 +2057,7 @@ //-------------------------------------------------------------------------- static int -plot3dcCmd( ClientData clientData, Tcl_Interp *interp, +plot3dcCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { PLINT nx, ny, opt, nlev = 10; @@ -2295,7 +2296,7 @@ //-------------------------------------------------------------------------- static int -plsurf3dCmd( ClientData clientData, Tcl_Interp *interp, +plsurf3dCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { PLINT nx, ny, opt, nlev = 10; @@ -2522,7 +2523,7 @@ //-------------------------------------------------------------------------- static int -plranddCmd( ClientData clientData, Tcl_Interp *interp, +plranddCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char **argv ) { if ( argc != 1 ) @@ -2545,7 +2546,7 @@ //-------------------------------------------------------------------------- static int -plsetoptCmd( ClientData clientData, Tcl_Interp *interp, +plsetoptCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char **argv ) { if ( argc < 2 || argc > 3 ) @@ -2579,15 +2580,15 @@ // wrapping specifier, as in plcont. So the new command looks like: // // *INDENT-OFF* -// plshade z xmin xmax ymin ymax \ -// sh_min sh_max sh_cmap sh_color sh_width \ -// min_col min_wid max_col max_wid \ +// plshade z xmin xmax ymin ymax +// sh_min sh_max sh_cmap sh_color sh_width +// min_col min_wid max_col max_wid // rect [[pltr x y] | NULL ] [wrap] // *INDENT-ON* //-------------------------------------------------------------------------- static int -plshadeCmd( ClientData clientData, Tcl_Interp *interp, +plshadeCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { tclMatrix *matPtr, *matz, *mattrx = NULL, *mattry = NULL; @@ -2901,14 +2902,14 @@ // So the new command looks like: // // *INDENT-OFF* -// plshades z xmin xmax ymin ymax \ -// clevel, fill_width, cont_color, cont_width\ +// plshades z xmin xmax ymin ymax +// clevel, fill_width, cont_color, cont_width // rect [[pltr x y] | NULL] [wrap] // *INDENT-ON* //-------------------------------------------------------------------------- static int -plshadesCmd( ClientData clientData, Tcl_Interp *interp, +plshadesCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { tclMatrix *matPtr, *matz, *mattrx = NULL, *mattry = NULL; @@ -3294,7 +3295,7 @@ //-------------------------------------------------------------------------- static int -plmapCmd( ClientData clientData, Tcl_Interp *interp, +plmapCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { PLFLT minlong, maxlong, minlat, maxlat; @@ -3361,7 +3362,7 @@ //-------------------------------------------------------------------------- static int -plmeridiansCmd( ClientData clientData, Tcl_Interp *interp, +plmeridiansCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { PLFLT dlong, dlat, minlong, maxlong, minlat, maxlat; @@ -3431,7 +3432,7 @@ static char *tcl_xform_code = 0; static void -Tcl_transform( PLFLT x, PLFLT y, PLFLT *xt, PLFLT *yt, PLPointer data ) +Tcl_transform( PLFLT x, PLFLT y, PLFLT *xt, PLFLT *yt, PLPointer UNUSED( data ) ) { Tcl_Obj *objx, *objy; int code; @@ -3491,7 +3492,7 @@ //-------------------------------------------------------------------------- static int -plstransformCmd( ClientData clientData, Tcl_Interp *interp, +plstransformCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { if ( argc == 1 @@ -3509,7 +3510,6 @@ else { size_t len; - const char *data = argc > 2 ? argv[2] : 0; tcl_xform_interp = interp; tcl_xform_procname = plstrdup( argv[1] ); @@ -3530,7 +3530,7 @@ // Processes plgriddata Tcl command. //-------------------------------------------------------------------------- static int -plgriddataCmd( ClientData clientData, Tcl_Interp *interp, +plgriddataCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { tclMatrix *arrx, *arry, *arrz, *xcoord, *ycoord, *zvalue; @@ -3630,7 +3630,7 @@ // Processes plimage Tcl command. //-------------------------------------------------------------------------- static int -plimageCmd( ClientData clientData, Tcl_Interp *interp, +plimageCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { tclMatrix *zvalue; @@ -3706,7 +3706,7 @@ // Very basic! No user-defined interpolation routines //-------------------------------------------------------------------------- static int -plimagefrCmd( ClientData clientData, Tcl_Interp *interp, +plimagefrCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { tclMatrix *zvalue; @@ -3820,7 +3820,7 @@ // Processes plstripc Tcl command. //-------------------------------------------------------------------------- static int -plstripcCmd( ClientData clientData, Tcl_Interp *interp, +plstripcCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { int i; @@ -3930,7 +3930,7 @@ // that handles the custom labels void -labelform( PLINT axis, PLFLT value, char *string, PLINT string_length, PLPointer data ) +labelform( PLINT axis, PLFLT value, char *string, PLINT string_length, PLPointer UNUSED( data ) ) { int objc; @@ -3972,7 +3972,7 @@ //-------------------------------------------------------------------------- static int -plslabelfuncCmd( ClientData clientData, Tcl_Interp *interp, +plslabelfuncCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { if ( argc < 2 || argc > 3 ) @@ -4120,7 +4120,7 @@ } static int -pllegendCmd( ClientData clientData, Tcl_Interp *interp, +pllegendCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { PLFLT legend_width, legend_height; Modified: trunk/bindings/tcl/tclMain.c =================================================================== --- trunk/bindings/tcl/tclMain.c 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/bindings/tcl/tclMain.c 2011-10-28 12:02:58 UTC (rev 12007) @@ -48,8 +48,9 @@ // RCS: @(#) $Id$ // -#include <tcl.h> -#include "plplot.h" +#include "pltcl.h" +// Required for definition of UNUSED macro +#include "plplotP.h" #if TCL_MAJOR_VERSION >= 8 && TCL_MINOR_VERSION >= 5 // From (private) tclInt.h in tcl8.5 @@ -95,6 +96,10 @@ static void plPrepOutputHandler( Tcl_Interp *interp, int code, int tty ); +// Other functio prototypes +void TclSetStartupScriptFileName( char *fileName ); +const char *TclGetStartupScriptFileName( void ); + // These are globally visible and can be replaced void ( *tclErrorHandler )( Tcl_Interp *interp, int code, int tty ) = NULL; @@ -218,7 +223,7 @@ // int PLDLLEXPORT -pltclMain( int argc, const char **argv, char *RcFileName /* OBSOLETE */, +pltclMain( int argc, const char **argv, char * UNUSED( RcFileName ) /* OBSOLETE */, int ( *appInitProc )( Tcl_Interp *interp ) ) { Tcl_Obj *resultPtr; @@ -507,7 +512,7 @@ // static void -plPrepOutputHandler( Tcl_Interp *interp, int code, int tty ) +plPrepOutputHandler( Tcl_Interp *UNUSED( interp ), int UNUSED( code ), int UNUSED( tty ) ) { pltext(); } Modified: trunk/bindings/tcl/tclMatrix.c =================================================================== --- trunk/bindings/tcl/tclMatrix.c 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/bindings/tcl/tclMatrix.c 2011-10-28 12:02:58 UTC (rev 12007) @@ -40,6 +40,7 @@ #include <string.h> #include "pldll.h" #include "tclMatrix.h" +#include "plplotP.h" // Required for definition of UNUSED macro // Cool math macros @@ -120,7 +121,7 @@ //-------------------------------------------------------------------------- int -Tcl_MatrixCmd( ClientData clientData, Tcl_Interp *interp, +Tcl_MatrixCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char **argv ) { register tclMatrix *matPtr; @@ -956,7 +957,7 @@ //-------------------------------------------------------------------------- static void -MatrixPut_f( ClientData clientData, Tcl_Interp* interp, int index, const char *string ) +MatrixPut_f( ClientData clientData, Tcl_Interp* UNUSED( interp ), int index, const char *string ) { tclMatrix *matPtr = (tclMatrix *) clientData; @@ -974,7 +975,7 @@ } static void -MatrixPut_i( ClientData clientData, Tcl_Interp* interp, int index, const char *string ) +MatrixPut_i( ClientData clientData, Tcl_Interp* UNUSED( interp ), int index, const char *string ) { tclMatrix *matPtr = (tclMatrix *) clientData; @@ -987,7 +988,7 @@ } static void -MatrixGet_i( ClientData clientData, Tcl_Interp* interp, int index, char *string ) +MatrixGet_i( ClientData clientData, Tcl_Interp* UNUSED( interp ), int index, char *string ) { tclMatrix *matPtr = (tclMatrix *) clientData; @@ -1011,7 +1012,7 @@ static char * DeleteMatrixVar( ClientData clientData, - Tcl_Interp *interp, char *name1, char *name2, int flags ) + Tcl_Interp * UNUSED( interp ), char * UNUSED( name1 ), char * UNUSED( name2 ), int UNUSED( flags ) ) { tclMatrix *matPtr = (tclMatrix *) clientData; Tcl_CmdInfo infoPtr; Modified: trunk/bindings/tcl/tclcmd.tpl =================================================================== --- trunk/bindings/tcl/tclcmd.tpl 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/bindings/tcl/tclcmd.tpl 2011-10-28 12:02:58 UTC (rev 12007) @@ -5,7 +5,7 @@ \*--------------------------------------------------------------------------*/ static int -%cmd%Cmd( ClientData clientData, Tcl_Interp *interp, int argc, const char *argv[] ) +%cmd%Cmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { <argdecls> Modified: trunk/bindings/tk/plframe.c =================================================================== --- trunk/bindings/tk/plframe.c 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/bindings/tk/plframe.c 2011-10-28 12:02:58 UTC (rev 12007) @@ -356,7 +356,7 @@ // int -plFrameCmd( ClientData clientData, Tcl_Interp *interp, +plFrameCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char **argv ) { Tk_Window new; @@ -1131,7 +1131,7 @@ //-------------------------------------------------------------------------- static void -PlFrameLeaveEH( ClientData clientData, register XEvent *eventPtr ) +PlFrameLeaveEH( ClientData clientData, register XEvent * UNUSED( eventPtr ) ) { register PlFrame *plFramePtr = (PlFrame *) clientData; @@ -1946,6 +1946,8 @@ } fprintf( stderr, "\n" ); } +#else + (void) argc; // Cast to void to suppress compiler warning about unused parameter #endif // Make sure widget has been initialized before going any further @@ -2613,7 +2615,7 @@ static int Closelink( Tcl_Interp *interp, register PlFrame *plFramePtr, - int argc, const char **argv ) + int UNUSED( argc ), const char ** UNUSED( argv ) ) { register PLRDev *plr = plFramePtr->plr; register PLiodev *iodev = plr->iodev; @@ -2787,7 +2789,7 @@ static int Print( Tcl_Interp *interp, register PlFrame *plFramePtr, - int argc, const char **argv ) + int UNUSED( argc ), const char ** UNUSED( argv ) ) { PLINT ipls; int result = TCL_OK; @@ -2921,8 +2923,8 @@ //-------------------------------------------------------------------------- static int -Redraw( Tcl_Interp *interp, register PlFrame *plFramePtr, - int argc, const char **argv ) +Redraw( Tcl_Interp *UNUSED( interp ), register PlFrame *plFramePtr, + int UNUSED( argc ), const char ** UNUSED( argv ) ) { dbug_enter( "Redraw" ); @@ -3317,7 +3319,7 @@ //-------------------------------------------------------------------------- static void -process_bop( void *clientData, int *skip_driver_bop ) +process_bop( void *clientData, int * UNUSED( skip_driver_bop ) ) { register PlFrame *plFramePtr = (PlFrame *) clientData; @@ -3332,7 +3334,7 @@ //-------------------------------------------------------------------------- static void -process_eop( void *clientData, int *skip_driver_eop ) +process_eop( void *clientData, int * UNUSED( skip_driver_eop ) ) { register PlFrame *plFramePtr = (PlFrame *) clientData; Modified: trunk/bindings/tk/plr.c =================================================================== --- trunk/bindings/tk/plr.c 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/bindings/tk/plr.c 2011-10-28 12:02:58 UTC (rev 12007) @@ -375,7 +375,7 @@ //-------------------------------------------------------------------------- static int -plr_eop( PLRDev *plr ) +plr_eop( PLRDev * UNUSED( plr ) ) { dbug_enter( "plr_eop" ); Modified: trunk/bindings/tk/plserver.c =================================================================== --- trunk/bindings/tk/plserver.c 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/bindings/tk/plserver.c 2011-10-28 12:02:58 UTC (rev 12007) @@ -38,6 +38,7 @@ #define NEED_PLDEBUG #include "plserver.h" +#include "plplot_parameters.h" // Application-specific command-line options // Variable declarations @@ -251,7 +252,7 @@ //-------------------------------------------------------------------------- static int -plExitCmd( ClientData clientData, Tcl_Interp *interp, int argc, char **argv ) +plExitCmd( ClientData UNUSED ( clientData ), Tcl_Interp *interp, int argc, char **argv ) { int value = 0; Modified: trunk/bindings/tk/plserver.h =================================================================== --- trunk/bindings/tk/plserver.h 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/bindings/tk/plserver.h 2011-10-28 12:02:58 UTC (rev 12007) @@ -12,7 +12,6 @@ #include "plDevs.h" #include "pltkd.h" #include "pltcl.h" -#include "plplot_parameters.h" // State info for the rendering code Modified: trunk/bindings/tk/tkMain.c =================================================================== --- trunk/bindings/tk/tkMain.c 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/bindings/tk/tkMain.c 2011-10-28 12:02:58 UTC (rev 12007) @@ -471,9 +471,7 @@ // ARGSUSED static void -StdinProc( clientData, mask ) -ClientData clientData; // Not used. -int mask; // Not used. +StdinProc( ClientData UNUSED( clientData ), int UNUSED( mask ) ) { #define BUFFER_SIZE 4000 char input[BUFFER_SIZE + 1]; Modified: trunk/drivers/cairo.c =================================================================== --- trunk/drivers/cairo.c 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/drivers/cairo.c 2011-10-28 12:02:58 UTC (rev 12007) @@ -510,7 +510,7 @@ // PLStream for each element that is drawn. //-------------------------------------------------------------------------- -void plD_state_cairo( PLStream *pls, PLINT op ) +void plD_state_cairo( PLStream * UNUSED( pls ), PLINT UNUSED( op ) ) { } @@ -2517,7 +2517,7 @@ // Set up for the next page. //-------------------------------------------------------------------------- -void plD_bop_memcairo( PLStream *pls ) +void plD_bop_memcairo( PLStream * UNUSED( pls ) ) { // nothing to do here (we want to preserve the memory as it is) } @@ -2823,7 +2823,7 @@ // End of page. //-------------------------------------------------------------------------- -void plD_eop_extcairo( PLStream *pls ) +void plD_eop_extcairo( PLStream * UNUSED( pls ) ) { // nothing to do here, we leave it to the calling program to display // (or not) the update cairo context. @@ -2880,7 +2880,7 @@ // context, etc... //-------------------------------------------------------------------------- -void plD_tidy_extcairo( PLStream *pls ) +void plD_tidy_extcairo( PLStream * UNUSED( pls ) ) { } Modified: trunk/drivers/mem.c =================================================================== --- trunk/drivers/mem.c 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/drivers/mem.c 2011-10-28 12:02:58 UTC (rev 12007) @@ -161,25 +161,25 @@ } void -plD_bop_mem( PLStream *pls ) +plD_bop_mem( PLStream * UNUSED( pls ) ) { // Nothing to do here } void -plD_tidy_mem( PLStream *pls ) +plD_tidy_mem( PLStream * UNUSED( pls ) ) { // Nothing to do here } void -plD_state_mem( PLStream *pls, PLINT op ) +plD_state_mem( PLStream * UNUSED( pls ), PLINT UNUSED( op ) ) { // Nothing to do here } void -plD_esc_mem( PLStream *pls, PLINT op, void *ptr ) +plD_esc_mem( PLStream *UNUSED( pls ), PLINT UNUSED( op ), void * UNUSED( ptr ) ) { // Nothing to do here } Modified: trunk/drivers/null.c =================================================================== --- trunk/drivers/null.c 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/drivers/null.c 2011-10-28 12:02:58 UTC (rev 12007) @@ -48,7 +48,7 @@ //-------------------------------------------------------------------------- void -plD_init_null( PLStream *pls ) +plD_init_null( PLStream *UNUSED( pls ) ) { int xmin = 0; int xmax = PIXELS_X - 1; @@ -69,37 +69,37 @@ //-------------------------------------------------------------------------- void -plD_line_null( PLStream *pls, short x1a, short y1a, short x2a, short y2a ) +plD_line_null( PLStream * UNUSED( pls ), short UNUSED( x1a ), short UNUSED( y1a ), short UNUSED( x2a ), short UNUSED( y2a ) ) { } void -plD_polyline_null( PLStream *pls, short *xa, short *ya, PLINT npts ) +plD_polyline_null( PLStream *UNUSED( pls ), short *UNUSED( xa ), short *UNUSED( ya ), PLINT UNUSED( npts ) ) { } void -plD_eop_null( PLStream *pls ) +plD_eop_null( PLStream *UNUSED( pls ) ) { } void -plD_bop_null( PLStream *pls ) +plD_bop_null( PLStream *UNUSED( pls ) ) { } void -plD_tidy_null( PLStream *pls ) +plD_tidy_null( PLStream *UNUSED( pls ) ) { } void -plD_state_null( PLStream *pls, PLINT op ) +plD_state_null( PLStream *UNUSED( pls ), PLINT UNUSED( op ) ) { } void -plD_esc_null( PLStream *pls, PLINT op, void *ptr ) +plD_esc_null( PLStream *UNUSED( pls ), PLINT UNUSED( op ), void *UNUSED( ptr ) ) { } Modified: trunk/drivers/ps.c =================================================================== --- trunk/drivers/ps.c 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/drivers/ps.c 2011-10-28 12:02:58 UTC (rev 12007) @@ -96,6 +96,9 @@ #ifndef ENABLE_DYNDRIVERS pdt->pl_MenuStr = menustr; pdt->pl_DevName = devnam; +#else + (void) menustr; // Cast to void to silence compiler warnings about unused parameters + (void) devnam; #endif pdt->pl_type = type; pdt->pl_seq = seq; Modified: trunk/drivers/psttf.cc =================================================================== --- trunk/drivers/psttf.cc 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/drivers/psttf.cc 2011-10-28 12:02:58 UTC (rev 12007) @@ -127,6 +127,9 @@ #ifndef ENABLE_DYNDRIVERS pdt->pl_MenuStr = menustr; pdt->pl_DevName = devnam; +#else + (void) menustr; // Cast to void to silence compiler warnings about unused parameters + (void) devnam; #endif pdt->pl_type = type; pdt->pl_seq = seq; Modified: trunk/drivers/svg.c =================================================================== --- trunk/drivers/svg.c 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/drivers/svg.c 2011-10-28 12:02:58 UTC (rev 12007) @@ -373,7 +373,7 @@ // PLStream for each element that is drawn. //-------------------------------------------------------------------------- -void plD_state_svg( PLStream *pls, PLINT op ) +void plD_state_svg( PLStream *UNUSED( pls ), PLINT UNUSED( op ) ) { } Modified: trunk/drivers/test-drv-info.c =================================================================== --- trunk/drivers/test-drv-info.c 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/drivers/test-drv-info.c 2011-10-28 12:02:58 UTC (rev 12007) @@ -39,14 +39,14 @@ // SEGV signal handler RETSIGTYPE -catch_segv( int sig ) +catch_segv( int UNUSED( sig ) ) { fprintf( stderr, "libltdl error: %s\n", lt_dlerror() ); exit( 1 ); } int -main( int argc, char* argv[] ) +main( int UNUSED( argc ), char* argv[] ) { lt_dlhandle dlhand; char sym[SYM_LEN]; Modified: trunk/drivers/tk.c =================================================================== --- trunk/drivers/tk.c 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/drivers/tk.c 2011-10-28 12:02:58 UTC (rev 12007) @@ -1691,7 +1691,7 @@ //-------------------------------------------------------------------------- static int -Abort( ClientData clientData, Tcl_Interp *interp, int argc, char **argv ) +Abort( ClientData clientData, Tcl_Interp *UNUSED( interp ), int UNUSED( argc ), char **UNUSED( argv ) ) { PLStream *pls = (PLStream *) clientData; @@ -2127,7 +2127,7 @@ //-------------------------------------------------------------------------- static int -pltk_toplevel( Tk_Window *w, Tcl_Interp *interp ) +pltk_toplevel( Tk_Window *UNUSED( w ), Tcl_Interp *interp ) { static char wcmd[] = "wm withdraw ."; Modified: trunk/drivers/wxwidgets.cpp =================================================================== --- trunk/drivers/wxwidgets.cpp 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/drivers/wxwidgets.cpp 2011-10-28 12:02:58 UTC (rev 12007) @@ -78,6 +78,8 @@ fprintf( stderr, "\n" ); va_end( args ); fflush( stderr ); +#else + (void) fmt; // Cast to void to silence compiler warnings about unused paraemeter #endif } @@ -97,6 +99,8 @@ fprintf( stderr, "\n" ); va_end( args ); fflush( stderr ); +#else + (void) fmt; // Cast to void to silence compiler warnings about unused paraemeter #endif } @@ -1130,8 +1134,6 @@ { // Log_Verbose( "init_freetype_lv1" ); - wxPLDevBase *dev = (wxPLDevBase *) pls->dev; - plD_FreeType_init( pls ); FT_Data *FT = (FT_Data *) pls->FT; Modified: trunk/drivers/wxwidgets_app.cpp =================================================================== --- trunk/drivers/wxwidgets_app.cpp 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/drivers/wxwidgets_app.cpp 2011-10-28 12:02:58 UTC (rev 12007) @@ -300,7 +300,7 @@ } size_t index = event.GetId() - wxPL_Save; - if ( ( index >= 0 ) && ( index < sizeof ( dev_entries ) / sizeof ( dev_entry ) ) ) + if ( ( event.GetId() >= wxPL_Save ) && ( index < sizeof ( dev_entries ) / sizeof ( dev_entry ) ) ) { int width = 800; int height = 600; @@ -412,6 +412,8 @@ else if ( !strcmp( devname, "wxpnm" ) ) type = wxBITMAP_TYPE_PNM; #endif + else + type = wxBITMAP_TYPE_BMP; bool status = bitmap.SaveFile( wxString( filename, *wxConvCurrent ), type ); if ( !status ) Modified: trunk/drivers/wxwidgets_dc.cpp =================================================================== --- trunk/drivers/wxwidgets_dc.cpp 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/drivers/wxwidgets_dc.cpp 2011-10-28 12:02:58 UTC (rev 12007) @@ -316,6 +316,7 @@ // The GetPixel method is incredible slow for wxGTK. Therefore we set the colour // always to the background color, since this is the case anyway 99% of the time. PLINT bgr, bgg, bgb; // red, green, blue + (void) x; (void) y; // Cast to void to silence compiler warnings about unused parameters plgcolbg( &bgr, &bgg, &bgb ); // get background color information return RGB( bgr, bgg, bgb ); #else Modified: trunk/drivers/xwin.c =================================================================== --- trunk/drivers/xwin.c 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/drivers/xwin.c 2011-10-28 12:02:58 UTC (rev 12007) @@ -1996,7 +1996,7 @@ //-------------------------------------------------------------------------- static void -LeaveEH( PLStream *pls, XEvent *event ) +LeaveEH( PLStream *pls, XEvent * UNUSED( event ) ) { XwDev *dev = (XwDev *) pls->dev; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2011-10-28 12:50:55
|
Revision: 12008 http://plplot.svn.sourceforge.net/plplot/?rev=12008&view=rev Author: andrewross Date: 2011-10-28 12:50:46 +0000 (Fri, 28 Oct 2011) Log Message: ----------- Change UNUSED macro to PL_UNUSED and move to plplot.h to allow use with examples. Fix up some futher unused parameter warnings. Modified Paths: -------------- trunk/bindings/f95/sccont.c trunk/bindings/f95/scstubs.c trunk/bindings/tcl/tclAPI.c trunk/bindings/tcl/tclMain.c trunk/bindings/tcl/tclMatrix.c trunk/bindings/tcl/tclcmd.tpl trunk/bindings/tk/plframe.c trunk/bindings/tk/plr.c trunk/bindings/tk/plserver.c trunk/bindings/tk/tkMain.c trunk/bindings/tk-x-plat/plplotter.c trunk/drivers/cairo.c trunk/drivers/mem.c trunk/drivers/null.c trunk/drivers/svg.c trunk/drivers/test-drv-info.c trunk/drivers/tk.c trunk/drivers/xwin.c trunk/examples/c/extXdrawable_demo.c trunk/examples/c/x09c.c trunk/examples/c/x14c.c trunk/examples/c/x15c.c trunk/examples/c/x16c.c trunk/examples/c/x19c.c trunk/examples/c/x29c.c trunk/examples/c++/x09.cc trunk/examples/c++/x14.cc trunk/examples/c++/x16.cc trunk/examples/c++/x19.cc trunk/include/plplot.h trunk/include/plplotP.h trunk/src/pdfutils.c trunk/src/plargs.c trunk/src/plbox.c trunk/src/plbuf.c trunk/src/plcont.c trunk/src/plcore.c trunk/src/plcvt.c trunk/src/plfill.c trunk/src/plmap.c trunk/src/plot3d.c trunk/src/plshade.c Modified: trunk/bindings/f95/sccont.c =================================================================== --- trunk/bindings/f95/sccont.c 2011-10-28 12:02:58 UTC (rev 12007) +++ trunk/bindings/f95/sccont.c 2011-10-28 12:50:46 UTC (rev 12008) @@ -120,7 +120,7 @@ //-------------------------------------------------------------------------- void -pltr0f( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *UNUSED( pltr_data ) ) +pltr0f( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *PL_UNUSED( pltr_data ) ) { *tx = x + 1.0; *ty = y + 1.0; @@ -353,7 +353,7 @@ //-------------------------------------------------------------------------- void -PLSHADE07( PLFLT *z, PLINT *nx, PLINT *ny, const char *UNUSED( defined ), +PLSHADE07( PLFLT *z, PLINT *nx, PLINT *ny, const char *PL_UNUSED( defined ), PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLFLT *shade_min, PLFLT *shade_max, PLINT *sh_cmap, PLFLT *sh_color, PLINT *sh_width, @@ -389,7 +389,7 @@ // 1-d transformation void -PLSHADE17( PLFLT *z, PLINT *nx, PLINT *ny, const char * UNUSED( defined ), +PLSHADE17( PLFLT *z, PLINT *nx, PLINT *ny, const char * PL_UNUSED( defined ), PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLFLT *shade_min, PLFLT *shade_max, PLINT *sh_cmap, PLFLT *sh_color, PLINT *sh_width, @@ -430,7 +430,7 @@ // 2-d transformation void -PLSHADE27( PLFLT *z, PLINT *nx, PLINT *ny, const char * UNUSED( defined ), +PLSHADE27( PLFLT *z, PLINT *nx, PLINT *ny, const char * PL_UNUSED( defined ), PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLFLT *shade_min, PLFLT *shade_max, PLINT *sh_cmap, PLFLT *sh_color, PLINT *sh_width, @@ -473,7 +473,7 @@ } void -PLSHADE7( PLFLT *z, PLINT *nx, PLINT *ny, const char * UNUSED( defined ), +PLSHADE7( PLFLT *z, PLINT *nx, PLINT *ny, const char * PL_UNUSED( defined ), PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLFLT *shade_min, PLFLT *shade_max, PLINT *sh_cmap, PLFLT *sh_color, PLINT *sh_width, @@ -516,7 +516,7 @@ //-------------------------------------------------------------------------- void -PLSHADES07( PLFLT *z, PLINT *nx, PLINT *ny, const char * UNUSED( defined ), +PLSHADES07( PLFLT *z, PLINT *nx, PLINT *ny, const char * PL_UNUSED( defined ), PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLFLT *clevel, PLINT *nlevel, PLINT *fill_width, PLINT *cont_color, PLINT *cont_width, PLINT *lx ) @@ -546,7 +546,7 @@ } void -PLSHADES17( PLFLT *z, PLINT *nx, PLINT *ny, const char * UNUSED( defined ), +PLSHADES17( PLFLT *z, PLINT *nx, PLINT *ny, const char * PL_UNUSED( defined ), PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLFLT *clevel, PLINT *nlevel, PLINT *fill_width, PLINT *cont_color, PLINT *cont_width, @@ -583,7 +583,7 @@ } void -PLSHADES27( PLFLT *z, PLINT *nx, PLINT *ny, const char * UNUSED( defined ), +PLSHADES27( PLFLT *z, PLINT *nx, PLINT *ny, const char * PL_UNUSED( defined ), PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLFLT *clevel, PLINT *nlevel, PLINT *fill_width, PLINT *cont_color, PLINT *cont_width, @@ -623,7 +623,7 @@ } void -PLSHADES7( PLFLT *z, PLINT *nx, PLINT *ny, const char * UNUSED( defined) , +PLSHADES7( PLFLT *z, PLINT *nx, PLINT *ny, const char * PL_UNUSED( defined) , PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLFLT *clevel, PLINT *nlevel, PLINT *fill_width, PLINT *cont_color, PLINT *cont_width, PLFLT *ftr, PLINT *lx ) Modified: trunk/bindings/f95/scstubs.c =================================================================== --- trunk/bindings/f95/scstubs.c 2011-10-28 12:02:58 UTC (rev 12007) +++ trunk/bindings/f95/scstubs.c 2011-10-28 12:50:46 UTC (rev 12008) @@ -265,7 +265,7 @@ void PLXORMOD( PLBOOL *mode, PLBOOL *status ); static void -pltransformf2c( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer UNUSED( data ) ) +pltransformf2c( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer PL_UNUSED( data ) ) { ( *pltransform )( &x, &y, tx, ty ); } @@ -519,7 +519,7 @@ } void -PLGDEV7( char *dev, int UNUSED( length ) ) +PLGDEV7( char *dev, int PL_UNUSED( length ) ) { c_plgdev( dev ); } @@ -564,7 +564,7 @@ } void -PLGFNAM7( char *fnam, int UNUSED( length ) ) +PLGFNAM7( char *fnam, int PL_UNUSED( length ) ) { c_plgfnam( fnam ); } @@ -754,7 +754,7 @@ } static void -pllabelfuncf2c( PLINT axis, PLFLT value, char *label, PLINT length, PLPointer UNUSED( data ) ) +pllabelfuncf2c( PLINT axis, PLFLT value, char *label, PLINT length, PLPointer PL_UNUSED( data ) ) { int i; @@ -1243,14 +1243,14 @@ } void -PLSLABELFUNC_OFF( PLINT * UNUSED( dummy ) ) +PLSLABELFUNC_OFF( PLINT * PL_UNUSED( dummy ) ) { pllabelfunc = NULL; c_plslabelfunc( NULL, NULL ); } void -PLSLABELFUNC_OFFa( PLINT * UNUSED( dummy ) ) +PLSLABELFUNC_OFFa( PLINT * PL_UNUSED( dummy ) ) { pllabelfunc = NULL; c_plslabelfunc( NULL, NULL ); @@ -1364,7 +1364,7 @@ } void -PLSTRANSFORM2( PLINT * UNUSED( dummy ) ) +PLSTRANSFORM2( PLINT * PL_UNUSED( dummy ) ) { pltransform = NULL; Modified: trunk/bindings/tcl/tclAPI.c =================================================================== --- trunk/bindings/tcl/tclAPI.c 2011-10-28 12:02:58 UTC (rev 12007) +++ trunk/bindings/tcl/tclAPI.c 2011-10-28 12:50:46 UTC (rev 12008) @@ -207,7 +207,7 @@ //-------------------------------------------------------------------------- static void -plTclCmd_Init( Tcl_Interp * UNUSED( interp ) ) +plTclCmd_Init( Tcl_Interp * PL_UNUSED( interp ) ) { register Command *cmdPtr; register CmdInfo *cmdInfoPtr; @@ -329,7 +329,7 @@ //-------------------------------------------------------------------------- static int -loopbackCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, +loopbackCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char **argv ) { register Tcl_HashEntry *hPtr; @@ -624,7 +624,7 @@ //-------------------------------------------------------------------------- int -plWait_Until( ClientData UNUSED( clientData ), Tcl_Interp *interp, int UNUSED( argc ), const char **argv ) +plWait_Until( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int PL_UNUSED( argc ), const char **argv ) { int result = 0; @@ -863,7 +863,7 @@ } static int -plcontCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, +plcontCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { tclMatrix *matPtr, *matf, *matclev; @@ -1199,7 +1199,7 @@ // plvect implementation (based on plcont above) //-------------------------------------------------------------------------- static int -plvectCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, +plvectCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { tclMatrix *matPtr, *matu, *matv; @@ -1543,7 +1543,7 @@ //-------------------------------------------------------------------------- static int -plmeshCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, +plmeshCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { PLINT nx, ny, opt; @@ -1681,7 +1681,7 @@ //-------------------------------------------------------------------------- static int -plmeshcCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, +plmeshcCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { PLINT nx, ny, opt, nlev = 10; @@ -1917,7 +1917,7 @@ //-------------------------------------------------------------------------- static int -plot3dCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, +plot3dCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { PLINT nx, ny, opt, side; @@ -2057,7 +2057,7 @@ //-------------------------------------------------------------------------- static int -plot3dcCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, +plot3dcCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { PLINT nx, ny, opt, nlev = 10; @@ -2296,7 +2296,7 @@ //-------------------------------------------------------------------------- static int -plsurf3dCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, +plsurf3dCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { PLINT nx, ny, opt, nlev = 10; @@ -2523,7 +2523,7 @@ //-------------------------------------------------------------------------- static int -plranddCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, +plranddCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char **argv ) { if ( argc != 1 ) @@ -2546,7 +2546,7 @@ //-------------------------------------------------------------------------- static int -plsetoptCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, +plsetoptCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char **argv ) { if ( argc < 2 || argc > 3 ) @@ -2588,7 +2588,7 @@ //-------------------------------------------------------------------------- static int -plshadeCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, +plshadeCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { tclMatrix *matPtr, *matz, *mattrx = NULL, *mattry = NULL; @@ -2909,7 +2909,7 @@ //-------------------------------------------------------------------------- static int -plshadesCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, +plshadesCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { tclMatrix *matPtr, *matz, *mattrx = NULL, *mattry = NULL; @@ -3295,7 +3295,7 @@ //-------------------------------------------------------------------------- static int -plmapCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, +plmapCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { PLFLT minlong, maxlong, minlat, maxlat; @@ -3362,7 +3362,7 @@ //-------------------------------------------------------------------------- static int -plmeridiansCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, +plmeridiansCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { PLFLT dlong, dlat, minlong, maxlong, minlat, maxlat; @@ -3432,7 +3432,7 @@ static char *tcl_xform_code = 0; static void -Tcl_transform( PLFLT x, PLFLT y, PLFLT *xt, PLFLT *yt, PLPointer UNUSED( data ) ) +Tcl_transform( PLFLT x, PLFLT y, PLFLT *xt, PLFLT *yt, PLPointer PL_UNUSED( data ) ) { Tcl_Obj *objx, *objy; int code; @@ -3492,7 +3492,7 @@ //-------------------------------------------------------------------------- static int -plstransformCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, +plstransformCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { if ( argc == 1 @@ -3530,7 +3530,7 @@ // Processes plgriddata Tcl command. //-------------------------------------------------------------------------- static int -plgriddataCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, +plgriddataCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { tclMatrix *arrx, *arry, *arrz, *xcoord, *ycoord, *zvalue; @@ -3630,7 +3630,7 @@ // Processes plimage Tcl command. //-------------------------------------------------------------------------- static int -plimageCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, +plimageCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { tclMatrix *zvalue; @@ -3706,7 +3706,7 @@ // Very basic! No user-defined interpolation routines //-------------------------------------------------------------------------- static int -plimagefrCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, +plimagefrCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { tclMatrix *zvalue; @@ -3820,7 +3820,7 @@ // Processes plstripc Tcl command. //-------------------------------------------------------------------------- static int -plstripcCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, +plstripcCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { int i; @@ -3930,7 +3930,7 @@ // that handles the custom labels void -labelform( PLINT axis, PLFLT value, char *string, PLINT string_length, PLPointer UNUSED( data ) ) +labelform( PLINT axis, PLFLT value, char *string, PLINT string_length, PLPointer PL_UNUSED( data ) ) { int objc; @@ -3972,7 +3972,7 @@ //-------------------------------------------------------------------------- static int -plslabelfuncCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, +plslabelfuncCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { if ( argc < 2 || argc > 3 ) @@ -4120,7 +4120,7 @@ } static int -pllegendCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, +pllegendCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { PLFLT legend_width, legend_height; Modified: trunk/bindings/tcl/tclMain.c =================================================================== --- trunk/bindings/tcl/tclMain.c 2011-10-28 12:02:58 UTC (rev 12007) +++ trunk/bindings/tcl/tclMain.c 2011-10-28 12:50:46 UTC (rev 12008) @@ -49,7 +49,7 @@ // #include "pltcl.h" -// Required for definition of UNUSED macro +// Required for definition of PL_UNUSED macro #include "plplotP.h" #if TCL_MAJOR_VERSION >= 8 && TCL_MINOR_VERSION >= 5 @@ -223,7 +223,7 @@ // int PLDLLEXPORT -pltclMain( int argc, const char **argv, char * UNUSED( RcFileName ) /* OBSOLETE */, +pltclMain( int argc, const char **argv, char * PL_UNUSED( RcFileName ) /* OBSOLETE */, int ( *appInitProc )( Tcl_Interp *interp ) ) { Tcl_Obj *resultPtr; @@ -512,7 +512,7 @@ // static void -plPrepOutputHandler( Tcl_Interp *UNUSED( interp ), int UNUSED( code ), int UNUSED( tty ) ) +plPrepOutputHandler( Tcl_Interp *PL_UNUSED( interp ), int PL_UNUSED( code ), int PL_UNUSED( tty ) ) { pltext(); } Modified: trunk/bindings/tcl/tclMatrix.c =================================================================== --- trunk/bindings/tcl/tclMatrix.c 2011-10-28 12:02:58 UTC (rev 12007) +++ trunk/bindings/tcl/tclMatrix.c 2011-10-28 12:50:46 UTC (rev 12008) @@ -40,7 +40,6 @@ #include <string.h> #include "pldll.h" #include "tclMatrix.h" -#include "plplotP.h" // Required for definition of UNUSED macro // Cool math macros @@ -121,7 +120,7 @@ //-------------------------------------------------------------------------- int -Tcl_MatrixCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, +Tcl_MatrixCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char **argv ) { register tclMatrix *matPtr; @@ -957,7 +956,7 @@ //-------------------------------------------------------------------------- static void -MatrixPut_f( ClientData clientData, Tcl_Interp* UNUSED( interp ), int index, const char *string ) +MatrixPut_f( ClientData clientData, Tcl_Interp* PL_UNUSED( interp ), int index, const char *string ) { tclMatrix *matPtr = (tclMatrix *) clientData; @@ -975,7 +974,7 @@ } static void -MatrixPut_i( ClientData clientData, Tcl_Interp* UNUSED( interp ), int index, const char *string ) +MatrixPut_i( ClientData clientData, Tcl_Interp* PL_UNUSED( interp ), int index, const char *string ) { tclMatrix *matPtr = (tclMatrix *) clientData; @@ -988,7 +987,7 @@ } static void -MatrixGet_i( ClientData clientData, Tcl_Interp* UNUSED( interp ), int index, char *string ) +MatrixGet_i( ClientData clientData, Tcl_Interp* PL_UNUSED( interp ), int index, char *string ) { tclMatrix *matPtr = (tclMatrix *) clientData; @@ -1012,7 +1011,7 @@ static char * DeleteMatrixVar( ClientData clientData, - Tcl_Interp * UNUSED( interp ), char * UNUSED( name1 ), char * UNUSED( name2 ), int UNUSED( flags ) ) + Tcl_Interp * PL_UNUSED( interp ), char * PL_UNUSED( name1 ), char * PL_UNUSED( name2 ), int PL_UNUSED( flags ) ) { tclMatrix *matPtr = (tclMatrix *) clientData; Tcl_CmdInfo infoPtr; Modified: trunk/bindings/tcl/tclcmd.tpl =================================================================== --- trunk/bindings/tcl/tclcmd.tpl 2011-10-28 12:02:58 UTC (rev 12007) +++ trunk/bindings/tcl/tclcmd.tpl 2011-10-28 12:50:46 UTC (rev 12008) @@ -5,7 +5,7 @@ \*--------------------------------------------------------------------------*/ static int -%cmd%Cmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) +%cmd%Cmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { <argdecls> Modified: trunk/bindings/tk/plframe.c =================================================================== --- trunk/bindings/tk/plframe.c 2011-10-28 12:02:58 UTC (rev 12007) +++ trunk/bindings/tk/plframe.c 2011-10-28 12:50:46 UTC (rev 12008) @@ -356,7 +356,7 @@ // int -plFrameCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, +plFrameCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char **argv ) { Tk_Window new; @@ -1131,7 +1131,7 @@ //-------------------------------------------------------------------------- static void -PlFrameLeaveEH( ClientData clientData, register XEvent * UNUSED( eventPtr ) ) +PlFrameLeaveEH( ClientData clientData, register XEvent * PL_UNUSED( eventPtr ) ) { register PlFrame *plFramePtr = (PlFrame *) clientData; @@ -2615,7 +2615,7 @@ static int Closelink( Tcl_Interp *interp, register PlFrame *plFramePtr, - int UNUSED( argc ), const char ** UNUSED( argv ) ) + int PL_UNUSED( argc ), const char ** PL_UNUSED( argv ) ) { register PLRDev *plr = plFramePtr->plr; register PLiodev *iodev = plr->iodev; @@ -2789,7 +2789,7 @@ static int Print( Tcl_Interp *interp, register PlFrame *plFramePtr, - int UNUSED( argc ), const char ** UNUSED( argv ) ) + int PL_UNUSED( argc ), const char ** PL_UNUSED( argv ) ) { PLINT ipls; int result = TCL_OK; @@ -2923,8 +2923,8 @@ //-------------------------------------------------------------------------- static int -Redraw( Tcl_Interp *UNUSED( interp ), register PlFrame *plFramePtr, - int UNUSED( argc ), const char ** UNUSED( argv ) ) +Redraw( Tcl_Interp *PL_UNUSED( interp ), register PlFrame *plFramePtr, + int PL_UNUSED( argc ), const char ** PL_UNUSED( argv ) ) { dbug_enter( "Redraw" ); @@ -3319,7 +3319,7 @@ //-------------------------------------------------------------------------- static void -process_bop( void *clientData, int * UNUSED( skip_driver_bop ) ) +process_bop( void *clientData, int * PL_UNUSED( skip_driver_bop ) ) { register PlFrame *plFramePtr = (PlFrame *) clientData; @@ -3334,7 +3334,7 @@ //-------------------------------------------------------------------------- static void -process_eop( void *clientData, int * UNUSED( skip_driver_eop ) ) +process_eop( void *clientData, int * PL_UNUSED( skip_driver_eop ) ) { register PlFrame *plFramePtr = (PlFrame *) clientData; Modified: trunk/bindings/tk/plr.c =================================================================== --- trunk/bindings/tk/plr.c 2011-10-28 12:02:58 UTC (rev 12007) +++ trunk/bindings/tk/plr.c 2011-10-28 12:50:46 UTC (rev 12008) @@ -375,7 +375,7 @@ //-------------------------------------------------------------------------- static int -plr_eop( PLRDev * UNUSED( plr ) ) +plr_eop( PLRDev * PL_UNUSED( plr ) ) { dbug_enter( "plr_eop" ); Modified: trunk/bindings/tk/plserver.c =================================================================== --- trunk/bindings/tk/plserver.c 2011-10-28 12:02:58 UTC (rev 12007) +++ trunk/bindings/tk/plserver.c 2011-10-28 12:50:46 UTC (rev 12008) @@ -252,7 +252,7 @@ //-------------------------------------------------------------------------- static int -plExitCmd( ClientData UNUSED ( clientData ), Tcl_Interp *interp, int argc, char **argv ) +plExitCmd( ClientData PL_UNUSED ( clientData ), Tcl_Interp *interp, int argc, char **argv ) { int value = 0; Modified: trunk/bindings/tk/tkMain.c =================================================================== --- trunk/bindings/tk/tkMain.c 2011-10-28 12:02:58 UTC (rev 12007) +++ trunk/bindings/tk/tkMain.c 2011-10-28 12:50:46 UTC (rev 12008) @@ -471,7 +471,7 @@ // ARGSUSED static void -StdinProc( ClientData UNUSED( clientData ), int UNUSED( mask ) ) +StdinProc( ClientData PL_UNUSED( clientData ), int PL_UNUSED( mask ) ) { #define BUFFER_SIZE 4000 char input[BUFFER_SIZE + 1]; Modified: trunk/bindings/tk-x-plat/plplotter.c =================================================================== --- trunk/bindings/tk-x-plat/plplotter.c 2011-10-28 12:02:58 UTC (rev 12007) +++ trunk/bindings/tk-x-plat/plplotter.c 2011-10-28 12:50:46 UTC (rev 12008) @@ -345,7 +345,7 @@ // int -plPlotterCmd( ClientData clientData, Tcl_Interp *interp, +plPlotterCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, const char **argv ) { Tk_Window tkwin; @@ -1092,7 +1092,7 @@ //-------------------------------------------------------------------------- static void -PlPlotterLeaveEH( ClientData clientData, register XEvent *eventPtr ) +PlPlotterLeaveEH( ClientData clientData, register XEvent * PL_UNUSED( eventPtr ) ) { register PlPlotter *plPlotterPtr = (PlPlotter *) clientData; @@ -1721,6 +1721,7 @@ char c3; int result = TCL_OK; char cmdlist[] = "plgcmap0 plgcmap1 plscmap0 plscmap1 plscol0 plscol1"; + char * argv_cp; #ifdef DEBUG if ( pls->debug ) @@ -1835,12 +1836,14 @@ pls->ncol0 = ncol0; for ( i = 0; i < pls->ncol0; i++ ) { - col = strtok( (char *) argv[2 + i], " " ); + argv_cp = plstrdup( argv[2 + i] ); + col = strtok( argv_cp , " " ); if ( col == NULL ) break; if ( scol0( interp, plPlotterPtr, i, col, &changed ) != TCL_OK ) return TCL_ERROR; + free_mem( argv_cp ); } if ( changed ) @@ -1863,7 +1866,8 @@ return TCL_ERROR; } - col = strtok( (char *) argv[2], " " ); + argv_cp = plstrdup( argv[2] ); + col = strtok( argv_cp, " " ); pos = strtok( NULL, " " ); rev = strtok( NULL, " " ); for ( i = 0; i < ncp1; i++ ) @@ -1880,6 +1884,8 @@ rev = strtok( NULL, " " ); } + free_mem( argv_cp ); + if ( changed ) { plsc->ncp1 = ncp1; @@ -2419,7 +2425,7 @@ static int Closelink( Tcl_Interp *interp, register PlPlotter *plPlotterPtr, - int argc, CONST char **argv ) + int PL_UNUSED( argc ), CONST char ** PL_UNUSED( argv ) ) { #if !defined ( MAC_TCL ) && !defined ( __WIN32__ ) register PLRDev *plr = plPlotterPtr->plr; @@ -2607,7 +2613,7 @@ static int Print( Tcl_Interp *interp, register PlPlotter *plPlotterPtr, - int argc, CONST char **argv ) + int PL_UNUSED( argc ), CONST char ** PL_UNUSED( argv ) ) { PLINT ipls; int result = TCL_OK; @@ -2700,7 +2706,7 @@ static int NextPage( Tcl_Interp *interp, register PlPlotter *plPlotterPtr, - int argc, CONST char **argv ) + int argc, CONST char ** PL_UNUSED( argv ) ) { TkwDev *dev = (TkwDev *) plPlotterPtr->pls->dev; if ( argc == 0 ) @@ -2766,8 +2772,8 @@ //-------------------------------------------------------------------------- static int -Redraw( Tcl_Interp *interp, register PlPlotter *plPlotterPtr, - int argc, CONST char **argv ) +Redraw( Tcl_Interp * PL_UNUSED( interp ), register PlPlotter *plPlotterPtr, + int PL_UNUSED( argc ), CONST char ** PL_UNUSED( argv ) ) { dbug_enter( "Redraw" ); Modified: trunk/drivers/cairo.c =================================================================== --- trunk/drivers/cairo.c 2011-10-28 12:02:58 UTC (rev 12007) +++ trunk/drivers/cairo.c 2011-10-28 12:50:46 UTC (rev 12008) @@ -510,7 +510,7 @@ // PLStream for each element that is drawn. //-------------------------------------------------------------------------- -void plD_state_cairo( PLStream * UNUSED( pls ), PLINT UNUSED( op ) ) +void plD_state_cairo( PLStream * PL_UNUSED( pls ), PLINT PL_UNUSED( op ) ) { } @@ -2517,7 +2517,7 @@ // Set up for the next page. //-------------------------------------------------------------------------- -void plD_bop_memcairo( PLStream * UNUSED( pls ) ) +void plD_bop_memcairo( PLStream * PL_UNUSED( pls ) ) { // nothing to do here (we want to preserve the memory as it is) } @@ -2823,7 +2823,7 @@ // End of page. //-------------------------------------------------------------------------- -void plD_eop_extcairo( PLStream * UNUSED( pls ) ) +void plD_eop_extcairo( PLStream * PL_UNUSED( pls ) ) { // nothing to do here, we leave it to the calling program to display // (or not) the update cairo context. @@ -2880,7 +2880,7 @@ // context, etc... //-------------------------------------------------------------------------- -void plD_tidy_extcairo( PLStream * UNUSED( pls ) ) +void plD_tidy_extcairo( PLStream * PL_UNUSED( pls ) ) { } Modified: trunk/drivers/mem.c =================================================================== --- trunk/drivers/mem.c 2011-10-28 12:02:58 UTC (rev 12007) +++ trunk/drivers/mem.c 2011-10-28 12:50:46 UTC (rev 12008) @@ -161,25 +161,25 @@ } void -plD_bop_mem( PLStream * UNUSED( pls ) ) +plD_bop_mem( PLStream * PL_UNUSED( pls ) ) { // Nothing to do here } void -plD_tidy_mem( PLStream * UNUSED( pls ) ) +plD_tidy_mem( PLStream * PL_UNUSED( pls ) ) { // Nothing to do here } void -plD_state_mem( PLStream * UNUSED( pls ), PLINT UNUSED( op ) ) +plD_state_mem( PLStream * PL_UNUSED( pls ), PLINT PL_UNUSED( op ) ) { // Nothing to do here } void -plD_esc_mem( PLStream *UNUSED( pls ), PLINT UNUSED( op ), void * UNUSED( ptr ) ) +plD_esc_mem( PLStream *PL_UNUSED( pls ), PLINT PL_UNUSED( op ), void * PL_UNUSED( ptr ) ) { // Nothing to do here } Modified: trunk/drivers/null.c =================================================================== --- trunk/drivers/null.c 2011-10-28 12:02:58 UTC (rev 12007) +++ trunk/drivers/null.c 2011-10-28 12:50:46 UTC (rev 12008) @@ -48,7 +48,7 @@ //-------------------------------------------------------------------------- void -plD_init_null( PLStream *UNUSED( pls ) ) +plD_init_null( PLStream *PL_UNUSED( pls ) ) { int xmin = 0; int xmax = PIXELS_X - 1; @@ -69,37 +69,37 @@ //-------------------------------------------------------------------------- void -plD_line_null( PLStream * UNUSED( pls ), short UNUSED( x1a ), short UNUSED( y1a ), short UNUSED( x2a ), short UNUSED( y2a ) ) +plD_line_null( PLStream * PL_UNUSED( pls ), short PL_UNUSED( x1a ), short PL_UNUSED( y1a ), short PL_UNUSED( x2a ), short PL_UNUSED( y2a ) ) { } void -plD_polyline_null( PLStream *UNUSED( pls ), short *UNUSED( xa ), short *UNUSED( ya ), PLINT UNUSED( npts ) ) +plD_polyline_null( PLStream *PL_UNUSED( pls ), short *PL_UNUSED( xa ), short *PL_UNUSED( ya ), PLINT PL_UNUSED( npts ) ) { } void -plD_eop_null( PLStream *UNUSED( pls ) ) +plD_eop_null( PLStream *PL_UNUSED( pls ) ) { } void -plD_bop_null( PLStream *UNUSED( pls ) ) +plD_bop_null( PLStream *PL_UNUSED( pls ) ) { } void -plD_tidy_null( PLStream *UNUSED( pls ) ) +plD_tidy_null( PLStream *PL_UNUSED( pls ) ) { } void -plD_state_null( PLStream *UNUSED( pls ), PLINT UNUSED( op ) ) +plD_state_null( PLStream *PL_UNUSED( pls ), PLINT PL_UNUSED( op ) ) { } void -plD_esc_null( PLStream *UNUSED( pls ), PLINT UNUSED( op ), void *UNUSED( ptr ) ) +plD_esc_null( PLStream *PL_UNUSED( pls ), PLINT PL_UNUSED( op ), void *PL_UNUSED( ptr ) ) { } Modified: trunk/drivers/svg.c =================================================================== --- trunk/drivers/svg.c 2011-10-28 12:02:58 UTC (rev 12007) +++ trunk/drivers/svg.c 2011-10-28 12:50:46 UTC (rev 12008) @@ -373,7 +373,7 @@ // PLStream for each element that is drawn. //-------------------------------------------------------------------------- -void plD_state_svg( PLStream *UNUSED( pls ), PLINT UNUSED( op ) ) +void plD_state_svg( PLStream *PL_UNUSED( pls ), PLINT PL_UNUSED( op ) ) { } Modified: trunk/drivers/test-drv-info.c =================================================================== --- trunk/drivers/test-drv-info.c 2011-10-28 12:02:58 UTC (rev 12007) +++ trunk/drivers/test-drv-info.c 2011-10-28 12:50:46 UTC (rev 12008) @@ -39,14 +39,14 @@ // SEGV signal handler RETSIGTYPE -catch_segv( int UNUSED( sig ) ) +catch_segv( int PL_UNUSED( sig ) ) { fprintf( stderr, "libltdl error: %s\n", lt_dlerror() ); exit( 1 ); } int -main( int UNUSED( argc ), char* argv[] ) +main( int PL_UNUSED( argc ), char* argv[] ) { lt_dlhandle dlhand; char sym[SYM_LEN]; Modified: trunk/drivers/tk.c =================================================================== --- trunk/drivers/tk.c 2011-10-28 12:02:58 UTC (rev 12007) +++ trunk/drivers/tk.c 2011-10-28 12:50:46 UTC (rev 12008) @@ -1691,7 +1691,7 @@ //-------------------------------------------------------------------------- static int -Abort( ClientData clientData, Tcl_Interp *UNUSED( interp ), int UNUSED( argc ), char **UNUSED( argv ) ) +Abort( ClientData clientData, Tcl_Interp *PL_UNUSED( interp ), int PL_UNUSED( argc ), char **PL_UNUSED( argv ) ) { PLStream *pls = (PLStream *) clientData; @@ -2127,7 +2127,7 @@ //-------------------------------------------------------------------------- static int -pltk_toplevel( Tk_Window *UNUSED( w ), Tcl_Interp *interp ) +pltk_toplevel( Tk_Window *PL_UNUSED( w ), Tcl_Interp *interp ) { static char wcmd[] = "wm withdraw ."; Modified: trunk/drivers/xwin.c =================================================================== --- trunk/drivers/xwin.c 2011-10-28 12:02:58 UTC (rev 12007) +++ trunk/drivers/xwin.c 2011-10-28 12:50:46 UTC (rev 12008) @@ -1996,7 +1996,7 @@ //-------------------------------------------------------------------------- static void -LeaveEH( PLStream *pls, XEvent * UNUSED( event ) ) +LeaveEH( PLStream *pls, XEvent * PL_UNUSED( event ) ) { XwDev *dev = (XwDev *) pls->dev; Modified: trunk/examples/c/extXdrawable_demo.c =================================================================== --- trunk/examples/c/extXdrawable_demo.c 2011-10-28 12:02:58 UTC (rev 12007) +++ trunk/examples/c/extXdrawable_demo.c 2011-10-28 12:50:46 UTC (rev 12008) @@ -89,7 +89,7 @@ } //-------------------------------------------------------------------------- -static gint ev_plotwindow_conf( GtkWidget *widget, GdkEventConfigure *ev, gpointer *data ) +static gint ev_plotwindow_conf( GtkWidget *widget, GdkEventConfigure * PL_UNUSED( ev ), gpointer * PL_UNUSED( data ) ) { #if TO_PIXMAP == 1 // Allocate pixmap @@ -107,12 +107,14 @@ // the pixmap is now realised (the window widget isn't). // setup_plot_drawable( &app ); + #else + (void) widget; // Cast to void to silence compiler warning about unused parameter #endif return ( TRUE ); } -static gint ev_plotwindow_expose( GtkWidget *widget, GdkEventExpose *ev, gpointer *data ) +static gint ev_plotwindow_expose( GtkWidget *widget, GdkEventExpose *ev, gpointer * PL_UNUSED( data ) ) { #if TO_PIXMAP == 1 // Dump the cached plot (created in the conf handler) to the window from @@ -123,6 +125,8 @@ app.plotwindow_pixmap, ev->area.x, ev->area.y, ev->area.x, ev->area.y, ev->area.width, ev->area.height ); #else + (void) widget; // Cast to void to silence compiler warning about unused parameter + (void) ev; // If drawing direct to an X Window, ensure GTK's double buffering // is turned off for that window or else the plot will be overridden // when the buffer is dumped to the screen. Modified: trunk/examples/c/x09c.c =================================================================== --- trunk/examples/c/x09c.c 2011-10-28 12:02:58 UTC (rev 12007) +++ trunk/examples/c/x09c.c 2011-10-28 12:50:46 UTC (rev 12008) @@ -47,8 +47,9 @@ PLFLT tr[6] = { XSPA, 0.0, -1.0, 0.0, YSPA, -1.0 }; +// pltr_data is unused so mark it with the PL_UNUSED macro static void -mypltr( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *pltr_data ) +mypltr( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void * PL_UNUSED( pltr_data ) ) { *tx = tr[0] * x + tr[1] * y + tr[2]; *ty = tr[3] * x + tr[4] * y + tr[5]; Modified: trunk/examples/c/x14c.c =================================================================== --- trunk/examples/c/x14c.c 2011-10-28 12:02:58 UTC (rev 12007) +++ trunk/examples/c/x14c.c 2011-10-28 12:50:46 UTC (rev 12008) @@ -384,8 +384,9 @@ PLFLT tr[6] = { XSPA, 0.0, -1.0, 0.0, YSPA, -1.0 }; +// pltr_data argument is unused so mark it with the PL_UNUSED macro void -mypltr( PLFLT xx, PLFLT yy, PLFLT *tx, PLFLT *ty, void *pltr_data ) +mypltr( PLFLT xx, PLFLT yy, PLFLT *tx, PLFLT *ty, void * PL_UNUSED( pltr_data ) ) { *tx = tr[0] * xx + tr[1] * yy + tr[2]; *ty = tr[3] * xx + tr[4] * yy + tr[5]; Modified: trunk/examples/c/x15c.c =================================================================== --- trunk/examples/c/x15c.c 2011-10-28 12:02:58 UTC (rev 12007) +++ trunk/examples/c/x15c.c 2011-10-28 12:50:46 UTC (rev 12008) @@ -20,7 +20,7 @@ static void plot2( void ); static void plot3( void ); static void f2mnmx( PLFLT *, PLINT, PLINT, PLFLT *, PLFLT * ); -static void cmap1_init1( void ); +//static void cmap1_init1( void ); static void cmap1_init2( void ); @@ -80,41 +80,41 @@ // Initializes color map 1 in HLS space. //-------------------------------------------------------------------------- -static void -cmap1_init1( void ) -{ - PLFLT i[4], h[4], l[4], s[4]; +//static void +//cmap1_init1( void ) +//{ +// PLFLT i[4], h[4], l[4], s[4]; +// +// i[0] = 0; // left boundary +// i[1] = 0.45; // just before center +// i[2] = 0.55; // just after center +// i[3] = 1; // right boundary +// +// h[0] = 260; // hue -- low: blue-violet +// h[1] = 260; // only change as we go over vertex +// h[2] = 20; // hue -- high: red +// h[3] = 20; // keep fixed +// +//#if 1 +// l[0] = 0.5; // lightness -- low +// l[1] = 0.0; // lightness -- center +// l[2] = 0.0; // lightness -- center +// l[3] = 0.5; // lightness -- high +//#else +// plscolbg( 255, 255, 255 ); +// l[0] = 0.5; // lightness -- low +// l[1] = 1.0; // lightness -- center +// l[2] = 1.0; // lightness -- center +// l[3] = 0.5; // lightness -- high +//#endif +// s[0] = 1; // maximum saturation +// s[1] = 1; // maximum saturation +// s[2] = 1; // maximum saturation +// s[3] = 1; // maximum saturation +// +// c_plscmap1l( 0, 4, i, h, l, s, NULL ); +//} - i[0] = 0; // left boundary - i[1] = 0.45; // just before center - i[2] = 0.55; // just after center - i[3] = 1; // right boundary - - h[0] = 260; // hue -- low: blue-violet - h[1] = 260; // only change as we go over vertex - h[2] = 20; // hue -- high: red - h[3] = 20; // keep fixed - -#if 1 - l[0] = 0.5; // lightness -- low - l[1] = 0.0; // lightness -- center - l[2] = 0.0; // lightness -- center - l[3] = 0.5; // lightness -- high -#else - plscolbg( 255, 255, 255 ); - l[0] = 0.5; // lightness -- low - l[1] = 1.0; // lightness -- center - l[2] = 1.0; // lightness -- center - l[3] = 0.5; // lightness -- high -#endif - s[0] = 1; // maximum saturation - s[1] = 1; // maximum saturation - s[2] = 1; // maximum saturation - s[3] = 1; // maximum saturation - - c_plscmap1l( 0, 4, i, h, l, s, NULL ); -} - //-------------------------------------------------------------------------- // cmap1_init2 // Modified: trunk/examples/c/x16c.c =================================================================== --- trunk/examples/c/x16c.c 2011-10-28 12:02:58 UTC (rev 12007) +++ trunk/examples/c/x16c.c 2011-10-28 12:50:46 UTC (rev 12008) @@ -30,7 +30,7 @@ PLFLT tr[6]; static void -mypltr( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *pltr_data ) +mypltr( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void * PL_UNUSED( pltr_data ) ) { *tx = tr[0] * x + tr[1] * y + tr[2]; *ty = tr[3] * x + tr[4] * y + tr[5]; Modified: trunk/examples/c/x19c.c =================================================================== --- trunk/examples/c/x19c.c 2011-10-28 12:02:58 UTC (rev 12007) +++ trunk/examples/c/x19c.c 2011-10-28 12:50:46 UTC (rev 12008) @@ -12,7 +12,7 @@ void geolocation_labeler( PLINT axis, PLFLT value, char *label, PLINT length, PLPointer data ); void -map_transform( PLFLT x, PLFLT y, PLFLT *xt, PLFLT *yt, PLPointer data ) +map_transform( PLFLT x, PLFLT y, PLFLT *xt, PLFLT *yt, PLPointer PL_UNUSED( data ) ) { double radius; @@ -68,7 +68,7 @@ // A custom axis labeling function for longitudes and latitudes. void -geolocation_labeler( PLINT axis, PLFLT value, char *label, PLINT length, PLPointer data ) +geolocation_labeler( PLINT axis, PLFLT value, char *label, PLINT length, PLPointer PL_UNUSED( data ) ) { const char *direction_label = NULL; PLFLT label_val = 0.0; Modified: trunk/examples/c/x29c.c =================================================================== --- trunk/examples/c/x29c.c 2011-10-28 12:02:58 UTC (rev 12007) +++ trunk/examples/c/x29c.c 2011-10-28 12:50:46 UTC (rev 12008) @@ -238,8 +238,8 @@ // this does not introduce any issues. PLFLT scale, offset1, offset2; - PLFLT xmin, xmax, ymin, ymax, xlabel_step; - int kind, npts, if_TAI_time_format, i; + PLFLT xmin, xmax, ymin = 0.0, ymax = 0.0, xlabel_step = 0.0; + int kind, npts = 0, if_TAI_time_format = 0, i; char time_format[10]; char title_suffix[100]; char xtitle[100]; Modified: trunk/examples/c++/x09.cc =================================================================== --- trunk/examples/c++/x09.cc 2011-10-28 12:02:58 UTC (rev 12007) +++ trunk/examples/c++/x09.cc 2011-10-28 12:50:46 UTC (rev 12008) @@ -87,7 +87,7 @@ static const PLFLT tr[] = { x09::XSPA, 0.0, -1.0, 0.0, x09::YSPA, -1.0 }; -static void mypltr( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *pltr_data ) +static void mypltr( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void * /* pltr_data */ ) { *tx = tr[0] * x + tr[1] * y + tr[2]; *ty = tr[3] * x + tr[4] * y + tr[5]; Modified: trunk/examples/c++/x14.cc =================================================================== --- trunk/examples/c++/x14.cc 2011-10-28 12:02:58 UTC (rev 12007) +++ trunk/examples/c++/x14.cc 2011-10-28 12:50:46 UTC (rev 12008) @@ -65,7 +65,7 @@ const PLFLT x14::tr[6] = { x14::xspa, 0.0, -1.0, 0.0, x14::yspa, -1.0 }; -void x14::mypltr( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *pltr_data ) +void x14::mypltr( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void * /* pltr_data */ ) { *tx = tr[0] * x + tr[1] * y + tr[2]; *ty = tr[3] * x + tr[4] * y + tr[5]; Modified: trunk/examples/c++/x16.cc =================================================================== --- trunk/examples/c++/x16.cc 2011-10-28 12:02:58 UTC (rev 12007) +++ trunk/examples/c++/x16.cc 2011-10-28 12:50:46 UTC (rev 12008) @@ -122,7 +122,7 @@ // Transformation function -static void mypltr( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *pltr_data ) +static void mypltr( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void * /* pltr_data */ ) { *tx = x16::tr[0] * x + x16::tr[1] * y + x16::tr[2]; *ty = x16::tr[3] * x + x16::tr[4] * y + x16::tr[5]; Modified: trunk/examples/c++/x19.cc =================================================================== --- trunk/examples/c++/x19.cc 2011-10-28 12:02:58 UTC (rev 12007) +++ trunk/examples/c++/x19.cc 2011-10-28 12:50:46 UTC (rev 12008) @@ -42,7 +42,7 @@ }; void -map_transform( PLFLT x, PLFLT y, PLFLT *xt, PLFLT *yt, PLPointer data ) +map_transform( PLFLT x, PLFLT y, PLFLT *xt, PLFLT *yt, PLPointer /* data */ ) { double radius; @@ -100,7 +100,7 @@ // A custom axis labeling function for longitudes and latitudes. void -geolocation_labeler( PLINT axis, PLFLT value, char *label, PLINT length, PLPointer data ) +geolocation_labeler( PLINT axis, PLFLT value, char *label, PLINT length, PLPointer /* data */ ) { const char *direction_label = ""; PLFLT label_val = 0.0; Modified: trunk/include/plplot.h =================================================================== --- trunk/include/plplot.h 2011-10-28 12:02:58 UTC (rev 12007) +++ trunk/include/plplot.h 2011-10-28 12:50:46 UTC (rev 12008) @@ -119,6 +119,17 @@ //-------------------------------------------------------------------------- #include "pldll.h" +// Macro to mark function parameters as unused. +// For gcc this uses the unused attribute to remove compiler warnings. +// For all compilers the parameter name is also mangled to prevent +// accidental use. +#ifdef PL_UNUSED +#elif defined ( __GNUC__ ) +# define PL_UNUSED( x ) UNUSED_ ## x __attribute__( ( unused ) ) +#else +# define PL_UNUSED( x ) UNUSED_ ## x +#endif + //-------------------------------------------------------------------------- // Base types for PLplot // Modified: trunk/include/plplotP.h =================================================================== --- trunk/include/plplotP.h 2011-10-28 12:02:58 UTC (rev 12007) +++ trunk/include/plplotP.h 2011-10-28 12:50:46 UTC (rev 12008) @@ -279,17 +279,6 @@ #define HUGE_VAL ( 1.0 / 0.0 ) #endif -// Macro to mark function parameters as unused. -// For gcc this uses the unused attribute to remove compiler warnings. -// For all compilers the parameter name is also mangled to prevent -// accidental use. -#ifdef UNUSED -#elif defined ( __GNUC__ ) -# define UNUSED( x ) UNUSED_ ## x __attribute__( ( unused ) ) -#else -# define UNUSED( x ) UNUSED_ ## x -#endif - //-------------------------------------------------------------------------- // PLPLOT control macros //-------------------------------------------------------------------------- Modified: trunk/src/pdfutils.c =================================================================== --- trunk/src/pdfutils.c 2011-10-28 12:02:58 UTC (rev 12007) +++ trunk/src/pdfutils.c 2011-10-28 12:50:46 UTC (rev 12008) @@ -970,7 +970,7 @@ //-------------------------------------------------------------------------- void -plFree2dGrid( PLFLT **f, PLINT nx, PLINT UNUSED( ny ) ) +plFree2dGrid( PLFLT **f, PLINT nx, PLINT PL_UNUSED( ny ) ) { PLINT i; Modified: trunk/src/plargs.c =================================================================== --- trunk/src/plargs.c 2011-10-28 12:02:58 UTC (rev 12007) +++ trunk/src/plargs.c 2011-10-28 12:50:46 UTC (rev 12008) @@ -1479,7 +1479,7 @@ //-------------------------------------------------------------------------- static int -opt_h( const char * UNUSED( opt ), const char * UNUSED( opt_arg ), void * UNUSED( client_data ) ) +opt_h( const char * PL_UNUSED( opt ), const char * PL_UNUSED( opt_arg ), void * PL_UNUSED( client_data ) ) { if ( !mode_quiet ) Help(); @@ -1495,7 +1495,7 @@ //-------------------------------------------------------------------------- static int -opt_v( const char * UNUSED( opt ), const char * UNUSED( opt_arg ), void * UNUSED( client_data ) ) +opt_v( const char * PL_UNUSED( opt ), const char * PL_UNUSED( opt_arg ), void * PL_UNUSED( client_data ) ) { if ( !mode_quiet ) fprintf( stderr, "PLplot library version: %s\n", VERSION ); @@ -1511,7 +1511,7 @@ //-------------------------------------------------------------------------- static int -opt_verbose( const char * UNUSED( opt ), const char * UNUSED( opt_arg ), void * UNUSED( client_data ) ) +opt_verbose( const char * PL_UNUSED( opt ), const char * PL_UNUSED( opt_arg ), void * PL_UNUSED( client_data ) ) { plsc->verbose = 1; return 0; @@ -1525,7 +1525,7 @@ //-------------------------------------------------------------------------- static int -opt_debug( const char * UNUSED( opt ), const char * UNUSED( opt_arg ), void * UNUSED( client_data ) ) +opt_debug( const char * PL_UNUSED( opt ), const char * PL_UNUSED( opt_arg ), void * PL_UNUSED( client_data ) ) { plsc->debug = 1; plsc->verbose = 1; @@ -1540,7 +1540,7 @@ //-------------------------------------------------------------------------- static int -opt_hack( const char * UNUSED( opt ), const char * UNUSED( opt_arg ), void * UNUSED( client_data ) ) +opt_hack( const char * PL_UNUSED( opt ), const char * PL_UNUSED( opt_arg ), void * PL_UNUSED( client_data ) ) { plsc->hack = 1; return 0; @@ -1554,7 +1554,7 @@ //-------------------------------------------------------------------------- static int -opt_dev( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) +opt_dev( const char * PL_UNUSED( opt ), const char *opt_arg, void * PL_UNUSED( client_data ) ) { plsdev( opt_arg ); return 0; @@ -1568,7 +1568,7 @@ //-------------------------------------------------------------------------- static int -opt_o( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) +opt_o( const char * PL_UNUSED( opt ), const char *opt_arg, void * PL_UNUSED( client_data ) ) { plsfnam( opt_arg ); return 0; @@ -1582,7 +1582,7 @@ //-------------------------------------------------------------------------- static int -opt_mar( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) +opt_mar( const char * PL_UNUSED( opt ), const char *opt_arg, void * PL_UNUSED( client_data ) ) { plsdidev( atof( opt_arg ), PL_NOTSET, PL_NOTSET, PL_NOTSET ); return 0; @@ -1596,7 +1596,7 @@ //-------------------------------------------------------------------------- static int -opt_a( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) +opt_a( const char * PL_UNUSED( opt ), const char *opt_arg, void * PL_UNUSED( client_data ) ) { plsdidev( PL_NOTSET, atof( opt_arg ), PL_NOTSET, PL_NOTSET ); return 0; @@ -1610,7 +1610,7 @@ //-------------------------------------------------------------------------- static int -opt_jx( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) +opt_jx( const char * PL_UNUSED( opt ), const char *opt_arg, void * PL_UNUSED( client_data ) ) { plsdidev( PL_NOTSET, PL_NOTSET, atof( opt_arg ), PL_NOTSET ); return 0; @@ -1624,7 +1624,7 @@ //-------------------------------------------------------------------------- static int -opt_jy( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) +opt_jy( const char * PL_UNUSED( opt ), const char *opt_arg, void * PL_UNUSED( client_data ) ) { plsdidev( PL_NOTSET, PL_NOTSET, PL_NOTSET, atof( opt_arg ) ); return 0; @@ -1638,7 +1638,7 @@ //-------------------------------------------------------------------------- static int -opt_ori( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) +opt_ori( const char * PL_UNUSED( opt ), const char *opt_arg, void * PL_UNUSED( client_data ) ) { plsdiori( atof( opt_arg ) ); return 0; @@ -1652,7 +1652,7 @@ //-------------------------------------------------------------------------- static int -opt_freeaspect( const char * UNUSED( opt ), const char * UNUSED( opt_arg ), void * UNUSED( client_data ) ) +opt_freeaspect( const char * PL_UNUSED( opt ), const char * PL_UNUSED( opt_arg ), void * PL_UNUSED( client_data ) ) { plsc->freeaspect = 1; return 0; @@ -1680,7 +1680,7 @@ //-------------------------------------------------------------------------- static int -opt_portrait( const char * UNUSED( opt ), const char * UNUSED( opt_arg ), void * UNUSED( client_data ) ) +opt_portrait( const char * PL_UNUSED( opt ), const char * PL_UNUSED( opt_arg ), void * PL_UNUSED( client_data ) ) { plsc->portrait = 1; return 0; @@ -1694,7 +1694,7 @@ //-------------------------------------------------------------------------- static int -opt_width( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) +opt_width( const char * PL_UNUSED( opt ), const char *opt_arg, void * PL_UNUSED( client_data ) ) { int width; @@ -1724,7 +1724,7 @@ //-------------------------------------------------------------------------- static int -opt_bg( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) +opt_bg( const char * PL_UNUSED( opt ), const char *opt_arg, void * PL_UNUSED( client_data ) ) { const char *rgb; char *color_field, *alpha_field; @@ -1800,7 +1800,7 @@ //-------------------------------------------------------------------------- static int -opt_ncol0( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) +opt_ncol0( const char * PL_UNUSED( opt ), const char *opt_arg, void * PL_UNUSED( client_data ) ) { plsc->ncol0 = atoi( opt_arg ); return 0; @@ -1814,7 +1814,7 @@ //-------------------------------------------------------------------------- static int -opt_ncol1( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) +opt_ncol1( const char * PL_UNUSED( opt ), const char *opt_arg, void * PL_UNUSED( client_data ) ) { plsc->ncol1 = atoi( opt_arg ); return 0; @@ -1828,7 +1828,7 @@ //-------------------------------------------------------------------------- static int -opt_wplt( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) +opt_wplt( const char * PL_UNUSED( opt ), const char *opt_arg, void * PL_UNUSED( client_data ) ) { char *field; PLFLT xl, yl, xr, yr; @@ -1868,7 +1868,7 @@ //-------------------------------------------------------------------------- static int -opt_drvopt( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) +opt_drvopt( const char * PL_UNUSED( opt ), const char *opt_arg, void * PL_UNUSED( client_data ) ) { char t, *tt, *option, *value; int fl = 0; @@ -1951,7 +1951,7 @@ //-------------------------------------------------------------------------- static int -opt_fam( const char * UNUSED( opt ), const char * UNUSED( opt_arg ), void * UNUSED( client_data ) ) +opt_fam( const char * PL_UNUSED( opt ), const char * PL_UNUSED( opt_arg ), void * PL_UNUSED( client_data ) ) { plsfam( 1, -1, -1 ); return 0; @@ -1974,7 +1974,7 @@ //-------------------------------------------------------------------------- static int -opt_fsiz( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) +opt_fsiz( const char * PL_UNUSED( opt ), const char *opt_arg, void * PL_UNUSED( client_data ) ) { PLINT bytemax; size_t len = strlen( opt_arg ); @@ -2025,7 +2025,7 @@ //-------------------------------------------------------------------------- static int -opt_fbeg( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) +opt_fbeg( const char * PL_UNUSED( opt ), const char *opt_arg, void * PL_UNUSED( client_data ) ) { plsc->member = atoi( opt_arg ); @@ -2040,7 +2040,7 @@ //-------------------------------------------------------------------------- static int -opt_finc( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) +opt_finc( const char * PL_UNUSED( opt ), const char *opt_arg, void * PL_UNUSED( client_data ) ) { plsc->finc = atoi( opt_arg ); @@ -2055,7 +2055,7 @@ //-------------------------------------------------------------------------- static int -opt_fflen( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) +opt_fflen( const char * PL_UNUSED( opt ), const char *opt_arg, void * PL_UNUSED( client_data ) ) { plsc->fflen = atoi( opt_arg ); @@ -2070,7 +2070,7 @@ //-------------------------------------------------------------------------- static int -opt_np( const char * UNUSED( opt ), const char * UNUSED( opt_arg ), void * UNUSED( client_data ) ) +opt_np( const char * PL_UNUSED( opt ), const char * PL_UNUSED( opt_arg ), void * PL_UNUSED( client_data ) ) { plspause( 0 ); return 0; @@ -2084,7 +2084,7 @@ //-------------------------------------------------------------------------- static int -opt_nopixmap( const char * UNUSED( opt ), const char * UNUSED( opt_arg ), void * UNUSED( client_data ) ) +opt_nopixmap( const char * PL_UNUSED( opt ), const char * PL_UNUSED( opt_arg ), void * PL_UNUSED( client_data ) ) { plsc->nopixmap = 1; return 0; @@ -2098,7 +2098,7 @@ //-------------------------------------------------------------------------- static int -opt_db( const char * UNUSED( opt ), const char * UNUSED( opt_arg ), void * UNUSED( client_data ) ) +opt_db( const char * PL_UNUSED( opt ), const char * PL_UNUSED( opt_arg ), void * PL_UNUSED( client_data ) ) { plsc->db = 1; return 0; @@ -2112,7 +2112,7 @@ //-------------------------------------------------------------------------- static int -opt_bufmax( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) +opt_bufmax( const char * PL_UNUSED( opt ), const char *opt_arg, void * PL_UNUSED( client_data ) ) { plsc->bufmax = atoi( opt_arg ); return 0; @@ -2126,7 +2126,7 @@ //-------------------------------------------------------------------------- static int -opt_server_name( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) +opt_server_name( const char * PL_UNUSED( opt ), const char *opt_arg, void * PL_UNUSED( client_data ) ) { plsc->server_name = plstrdup( opt_arg ); return 0; @@ -2140,7 +2140,7 @@ //-------------------------------------------------------------------------- static int -opt_plserver( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) +opt_plserver( const char * PL_UNUSED( opt ), const char *opt_arg, void * PL_UNUSED( client_data ) ) { plsc->plserver = plstrdup( opt_arg ); return 0; @@ -2154,7 +2154,7 @@ //-------------------------------------------------------------------------- static int -opt_plwindow( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) +opt_plwindow( const char * PL_UNUSED( opt ), const char *opt_arg, void * PL_UNUSED( client_data ) ) { if ( ( plsc->plwindow = (char *) malloc( (size_t) ( 1 + strlen( opt_arg ) ) * sizeof ( char ) ) ) == NULL ) { @@ -2172,7 +2172,7 @@ //-------------------------------------------------------------------------- static int -opt_auto_path( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) +opt_auto_path( const char * PL_UNUSED( opt ), const char *opt_arg, void * PL_UNUSED( client_data ) ) { plsc->auto_path = plstrdup( opt_arg ); return 0; @@ -2186,7 +2186,7 @@ //-------------------------------------------------------------------------- static int -opt_px( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) +opt_px( const char * PL_UNUSED( opt ), const char *opt_arg, void * PL_UNUSED( client_data ) ) { plssub( atoi( opt_arg ), -1 ); return 0; @@ -2200,7 +2200,7 @@ //-------------------------------------------------------------------------- static int -opt_py( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) +opt_py( const char * PL_UNUSED( opt ), const char *opt_arg, void * PL_UNUSED( client_data ) ) { plssub( -1, atoi( opt_arg ) ); return 0; @@ -2218,7 +2218,7 @@ //-------------------------------------------------------------------------- static int -opt_geo( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) +opt_geo( const char * PL_UNUSED( opt ), const char *opt_arg, void * PL_UNUSED( client_data ) ) { int numargs; PLFLT xdpi = 0., ydpi = 0.; @@ -2304,7 +2304,7 @@ //-------------------------------------------------------------------------- static int -opt_tk_file( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) +opt_tk_file( const char * PL_UNUSED( opt ), const char *opt_arg, void * PL_UNUSED( client_data ) ) { if ( ( plsc->tk_file = (char *) malloc( (size_t) ( 1 + strlen( opt_arg ) ) * sizeof ( char ) ) ) == NULL ) { @@ -2327,7 +2327,7 @@ //-------------------------------------------------------------------------- static int -opt_dpi( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) +opt_dpi( const char * PL_UNUSED( opt ), const char *opt_arg, void * PL_UNUSED( client_data ) ) { char *field; PLFLT xdpi = 0., ydpi = 0.; @@ -2368,7 +2368,7 @@ //-------------------------------------------------------------------------- static int -opt_dev_compression( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) +opt_dev_compression( const char * PL_UNUSED( opt ), const char *opt_arg, void * PL_UNUSED( client_data ) ) { PLINT comp = 0; @@ -2390,7 +2390,7 @@ //-------------------------------------------------------------------------- static int -opt_cmap0( const char * UNUSED( opt ), const char *opt_arg, void * UNUSED( client_data ) ) +opt_cmap0( const char * PL_UNUSED( opt ), const char *opt_arg, void * PL_UNUSED( client_data ) ) { plspal0( opt_arg ); return 0; @@ -2403,7 +2403,7 @@ //-------------------------------------------------------------------------- static int -opt_cmap1( const char * UNUSED( opt ), const char *opt_arg, void * UNUSE... [truncated message content] |
From: <and...@us...> - 2011-10-28 13:06:34
|
Revision: 12009 http://plplot.svn.sourceforge.net/plplot/?rev=12009&view=rev Author: andrewross Date: 2011-10-28 13:06:27 +0000 (Fri, 28 Oct 2011) Log Message: ----------- Style previous changes. Modified Paths: -------------- trunk/bindings/f95/sccont.c trunk/bindings/tcl/tclAPI.c trunk/bindings/tk/plserver.c trunk/bindings/tk/tkMain.c trunk/bindings/tk-x-plat/plplotter.c trunk/drivers/wxwidgets.cpp trunk/drivers/wxwidgets_app.cpp trunk/src/plshade.c Modified: trunk/bindings/f95/sccont.c =================================================================== --- trunk/bindings/f95/sccont.c 2011-10-28 12:50:46 UTC (rev 12008) +++ trunk/bindings/f95/sccont.c 2011-10-28 13:06:27 UTC (rev 12009) @@ -623,7 +623,7 @@ } void -PLSHADES7( PLFLT *z, PLINT *nx, PLINT *ny, const char * PL_UNUSED( defined) , +PLSHADES7( PLFLT *z, PLINT *nx, PLINT *ny, const char * PL_UNUSED( defined ), PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLFLT *clevel, PLINT *nlevel, PLINT *fill_width, PLINT *cont_color, PLINT *cont_width, PLFLT *ftr, PLINT *lx ) Modified: trunk/bindings/tcl/tclAPI.c =================================================================== --- trunk/bindings/tcl/tclAPI.c 2011-10-28 12:50:46 UTC (rev 12008) +++ trunk/bindings/tcl/tclAPI.c 2011-10-28 13:06:27 UTC (rev 12009) @@ -2580,9 +2580,9 @@ // wrapping specifier, as in plcont. So the new command looks like: // // *INDENT-OFF* -// plshade z xmin xmax ymin ymax -// sh_min sh_max sh_cmap sh_color sh_width -// min_col min_wid max_col max_wid +// plshade z xmin xmax ymin ymax +// sh_min sh_max sh_cmap sh_color sh_width +// min_col min_wid max_col max_wid // rect [[pltr x y] | NULL ] [wrap] // *INDENT-ON* //-------------------------------------------------------------------------- @@ -2902,7 +2902,7 @@ // So the new command looks like: // // *INDENT-OFF* -// plshades z xmin xmax ymin ymax +// plshades z xmin xmax ymin ymax // clevel, fill_width, cont_color, cont_width // rect [[pltr x y] | NULL] [wrap] // *INDENT-ON* @@ -3509,7 +3509,7 @@ } else { - size_t len; + size_t len; tcl_xform_interp = interp; tcl_xform_procname = plstrdup( argv[1] ); Modified: trunk/bindings/tk/plserver.c =================================================================== --- trunk/bindings/tk/plserver.c 2011-10-28 12:50:46 UTC (rev 12008) +++ trunk/bindings/tk/plserver.c 2011-10-28 13:06:27 UTC (rev 12009) @@ -252,7 +252,7 @@ //-------------------------------------------------------------------------- static int -plExitCmd( ClientData PL_UNUSED ( clientData ), Tcl_Interp *interp, int argc, char **argv ) +plExitCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, char **argv ) { int value = 0; Modified: trunk/bindings/tk/tkMain.c =================================================================== --- trunk/bindings/tk/tkMain.c 2011-10-28 12:50:46 UTC (rev 12008) +++ trunk/bindings/tk/tkMain.c 2011-10-28 13:06:27 UTC (rev 12009) @@ -471,7 +471,7 @@ // ARGSUSED static void -StdinProc( ClientData PL_UNUSED( clientData ), int PL_UNUSED( mask ) ) +StdinProc( ClientData PL_UNUSED( clientData ), int PL_UNUSED( mask ) ) { #define BUFFER_SIZE 4000 char input[BUFFER_SIZE + 1]; Modified: trunk/bindings/tk-x-plat/plplotter.c =================================================================== --- trunk/bindings/tk-x-plat/plplotter.c 2011-10-28 12:50:46 UTC (rev 12008) +++ trunk/bindings/tk-x-plat/plplotter.c 2011-10-28 13:06:27 UTC (rev 12009) @@ -1721,7 +1721,7 @@ char c3; int result = TCL_OK; char cmdlist[] = "plgcmap0 plgcmap1 plscmap0 plscmap1 plscol0 plscol1"; - char * argv_cp; + char * argv_cp; #ifdef DEBUG if ( pls->debug ) @@ -1837,7 +1837,7 @@ for ( i = 0; i < pls->ncol0; i++ ) { argv_cp = plstrdup( argv[2 + i] ); - col = strtok( argv_cp , " " ); + col = strtok( argv_cp, " " ); if ( col == NULL ) break; @@ -1867,9 +1867,9 @@ } argv_cp = plstrdup( argv[2] ); - col = strtok( argv_cp, " " ); - pos = strtok( NULL, " " ); - rev = strtok( NULL, " " ); + col = strtok( argv_cp, " " ); + pos = strtok( NULL, " " ); + rev = strtok( NULL, " " ); for ( i = 0; i < ncp1; i++ ) { if ( col == NULL ) Modified: trunk/drivers/wxwidgets.cpp =================================================================== --- trunk/drivers/wxwidgets.cpp 2011-10-28 12:50:46 UTC (rev 12008) +++ trunk/drivers/wxwidgets.cpp 2011-10-28 13:06:27 UTC (rev 12009) @@ -78,7 +78,7 @@ fprintf( stderr, "\n" ); va_end( args ); fflush( stderr ); -#else +#else (void) fmt; // Cast to void to silence compiler warnings about unused paraemeter #endif } @@ -99,7 +99,7 @@ fprintf( stderr, "\n" ); va_end( args ); fflush( stderr ); -#else +#else (void) fmt; // Cast to void to silence compiler warnings about unused paraemeter #endif } Modified: trunk/drivers/wxwidgets_app.cpp =================================================================== --- trunk/drivers/wxwidgets_app.cpp 2011-10-28 12:50:46 UTC (rev 12008) +++ trunk/drivers/wxwidgets_app.cpp 2011-10-28 13:06:27 UTC (rev 12009) @@ -300,7 +300,7 @@ } size_t index = event.GetId() - wxPL_Save; - if ( ( event.GetId() >= wxPL_Save ) && ( index < sizeof ( dev_entries ) / sizeof ( dev_entry ) ) ) + if ( ( event.GetId() >= wxPL_Save ) && ( index < sizeof ( dev_entries ) / sizeof ( dev_entry ) ) ) { int width = 800; int height = 600; Modified: trunk/src/plshade.c =================================================================== --- trunk/src/plshade.c 2011-10-28 12:50:46 UTC (rev 12008) +++ trunk/src/plshade.c 2011-10-28 13:06:27 UTC (rev 12009) @@ -395,7 +395,7 @@ PLPointer pltr_data ) { plshade_int( f2eval, f2eval_data, c2eval, c2eval_data, - NULL, + NULL, nx, ny, xmin, xmax, ymin, ymax, shade_min, shade_max, sh_cmap, sh_color, sh_width, min_color, min_width, max_color, max_width, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jb...@us...> - 2011-11-01 08:35:59
|
Revision: 12021 http://plplot.svn.sourceforge.net/plplot/?rev=12021&view=rev Author: jbauck Date: 2011-11-01 08:35:52 +0000 (Tue, 01 Nov 2011) Log Message: ----------- Small tweaks. Finish unbotching file name. Modified Paths: -------------- trunk/bindings/ada/plplot.ads trunk/bindings/ada/plplot_traditional.ads trunk/examples/ada/x00_easy_a.adb trunk/examples/ada/x00a.adb Added Paths: ----------- trunk/examples/ada/xthick00a.adb Modified: trunk/bindings/ada/plplot.ads =================================================================== --- trunk/bindings/ada/plplot.ads 2011-11-01 08:22:29 UTC (rev 12020) +++ trunk/bindings/ada/plplot.ads 2011-11-01 08:35:52 UTC (rev 12021) @@ -381,7 +381,7 @@ -------------------------------------------------------------------------------- -- Constants copied from PLplot_Thin.ads so that it doesn't have to be seen. -- -- These are replicated herein with other names. Either name may be used, -- --- e.g., Parse_Full is the same as PL_PARSE_FULL. -- +-- e.g., Parse_Full is the same as PL_PARSE_FULL. -- -------------------------------------------------------------------------------- -- Modes for parsing command line arguments (redux). Modified: trunk/bindings/ada/plplot_traditional.ads =================================================================== --- trunk/bindings/ada/plplot_traditional.ads 2011-11-01 08:22:29 UTC (rev 12020) +++ trunk/bindings/ada/plplot_traditional.ads 2011-11-01 08:35:52 UTC (rev 12021) @@ -379,7 +379,7 @@ -------------------------------------------------------------------------------- -- Constants copied from PLplot_Thin.ads so that it doesn't have to be seen. -- -- These are replicated herein with other names. Either name may be used, -- --- e.g., Parse_Full is the same as PL_PARSE_FULL. -- +-- e.g., Parse_Full is the same as PL_PARSE_FULL. -- -------------------------------------------------------------------------------- -- Modes for parsing command line arguments (redux). Modified: trunk/examples/ada/x00_easy_a.adb =================================================================== --- trunk/examples/ada/x00_easy_a.adb 2011-11-01 08:22:29 UTC (rev 12020) +++ trunk/examples/ada/x00_easy_a.adb 2011-11-01 08:35:52 UTC (rev 12021) @@ -32,8 +32,7 @@ PLplot; procedure x00_easy_a is - N : Integer := 100; - x, y : Real_Vector(0 .. N); + x, y : Real_Vector(0 .. 100); x_Min, y_Min : Long_Float := 0.0; x_Max : Long_Float := 1.0; y_Max : Long_Float := 100.0; Modified: trunk/examples/ada/x00a.adb =================================================================== --- trunk/examples/ada/x00a.adb 2011-11-01 08:22:29 UTC (rev 12020) +++ trunk/examples/ada/x00a.adb 2011-11-01 08:35:52 UTC (rev 12021) @@ -34,8 +34,7 @@ PLplot_Traditional; procedure x00a is - N : Integer := 100; - x, y : Real_Vector(0 .. N); + x, y : Real_Vector(0 .. 100); x_Min, y_Min : Long_Float := 0.0; x_Max : Long_Float := 1.0; y_Max : Long_Float := 100.0; Copied: trunk/examples/ada/xthick00a.adb (from rev 12019, trunk/examples/ada/x00thicka.adb) =================================================================== --- trunk/examples/ada/xthick00a.adb (rev 0) +++ trunk/examples/ada/xthick00a.adb 2011-11-01 08:35:52 UTC (rev 12021) @@ -0,0 +1,68 @@ +-- $Id$ +-- +-- Simple demo of a 2D line plot. +-- +-- Copyright (C) 2011 Jerry Bauck +-- +-- This file is part of PLplot. +-- +-- PLplot is free software; you can redistribute it and/or modify +-- it under the terms of the GNU Library General Public License as published +-- by the Free Software Foundation; either version 2 of the License, or +-- (at your option) any later version. +-- +-- PLplot is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU Library General Public License for more details. +-- +-- You should have received a copy of the GNU Library General Public License +-- along with PLplot; if not, write to the Free Software +-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + + +-- See x00_easy_a.adb for an easier way to generate similar results using +-- Ada-specific extensions to PLplot. + +-- See x00a.adb for a version of this program that uses traditional plplot names. + +with + PLplot_Auxiliary, + PLplot; +use + PLplot_Auxiliary, + PLplot; + +procedure x00thicka is + x, y : Real_Vector(0 .. 100); + x_Min, y_Min : Long_Float := 0.0; + x_Max : Long_Float := 1.0; + y_Max : Long_Float := 100.0; +begin + -- Prepare data to be plotted. + for i in x'range loop + x(i) := Long_Float(i) / Long_Float(x'length - 1); + y(i) := y_Max * x(i)**2; + end loop; + + -- Parse and process command line arguments. + Parse_Command_Line_Arguments(Parse_Full); + + -- Initialize plplot. + Initialize_PLplot; + + -- Create a labelled box to hold the plot. + Set_Environment(x_Min, x_Max, y_Min, y_Max, + Justification => Not_Justified, + Axis_Style => Linear_Box_Plus); + Write_Labels + (X_Label => "x", + Y_Label => "y=100 x#u2#d", + Title_Label => "Simple PLplot demo of a 2D line plot"); + + -- Plot the data that was prepared above. + Draw_Curve(x, y); + + -- Close PLplot library. + End_PLplot; +end x00thicka; \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2011-11-24 06:27:37
|
Revision: 12033 http://plplot.svn.sourceforge.net/plplot/?rev=12033&view=rev Author: airwin Date: 2011-11-24 06:27:31 +0000 (Thu, 24 Nov 2011) Log Message: ----------- Implement NON_TRANSITIVE option for just the C++ bindings case. The result (for cmake option -DNON_TRANSITIVE=ON) is the C++ examples build and run without issues for the build tree, traditional installed examples tree (built and tested with Makefile+pkg-config), and installed examples tree (built and tested with CMake-based build system). Modified Paths: -------------- trunk/bindings/c++/CMakeLists.txt trunk/cmake/modules/plplot.cmake trunk/pkgcfg/plplot-template.pc.cmake Modified: trunk/bindings/c++/CMakeLists.txt =================================================================== --- trunk/bindings/c++/CMakeLists.txt 2011-11-18 07:41:00 UTC (rev 12032) +++ trunk/bindings/c++/CMakeLists.txt 2011-11-24 06:27:31 UTC (rev 12033) @@ -44,6 +44,13 @@ endif(BUILD_SHARED_LIBS) target_link_libraries(plplotcxx${LIB_TAG} plplot${LIB_TAG}) + if(NON_TRANSITIVE) + # empty list ==> non-transitive linking for shared libraries for + # everything (e.g., the C++ examples) that links to libplplotcxx. + target_link_libraries(plplotcxx${LIB_TAG} LINK_INTERFACE_LIBRARIES) + # This configures the pkg-config method of having non-transitive linking. + set(PC_REQUIRES_TAG "Requires.private") + endif(NON_TRANSITIVE) if(USE_RPATH) get_target_property(LIB_INSTALL_RPATH plplot${LIB_TAG} INSTALL_RPATH) Modified: trunk/cmake/modules/plplot.cmake =================================================================== --- trunk/cmake/modules/plplot.cmake 2011-11-18 07:41:00 UTC (rev 12032) +++ trunk/cmake/modules/plplot.cmake 2011-11-24 06:27:31 UTC (rev 12033) @@ -22,6 +22,13 @@ # libraries are all shared by default option(BUILD_SHARED_LIBS "Build shared libraries" ON) +# OFF means libraries are transitively linked by default. +option(NON_TRANSITIVE "Experimental option to try non-transitive linking" OFF) +# For now use this default which causes transitive linking of software built +# with our pkg-config files (unless PC_REQUIRES_TAG specifically overridden +# for particular language bindings with Requires.private). +set(PC_REQUIRES_TAG "Requires") + # Color maps (discrete and continuous) to use by default if(NOT DEFAULT_CMAP0_FILE) set(DEFAULT_CMAP0_FILE "cmap0_default.pal") Modified: trunk/pkgcfg/plplot-template.pc.cmake =================================================================== --- trunk/pkgcfg/plplot-template.pc.cmake 2011-11-18 07:41:00 UTC (rev 12032) +++ trunk/pkgcfg/plplot-template.pc.cmake 2011-11-24 06:27:31 UTC (rev 12033) @@ -4,7 +4,7 @@ Name: PLplot @PC_SHORT_NAME@ Description: Scientific plotting library (@PC_LONG_NAME@@PC_PRECISION@ precision) -Requires: @PC_REQUIRES@ +@PC_REQUIRES_TAG@: @PC_REQUIRES@ Version: @VERSION@ Libs: -L${libdir} @PC_LINK_FLAGS@ Cflags: -I${includedir} @PC_COMPILE_FLAGS@ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2011-11-24 19:20:34
|
Revision: 12036 http://plplot.svn.sourceforge.net/plplot/?rev=12036&view=rev Author: airwin Date: 2011-11-24 19:20:27 +0000 (Thu, 24 Nov 2011) Log Message: ----------- Expand non-transitive linking to libplplot, libcsironn, libcsirocsa, and libqsastime. The pkg-config results for libplplot are still unsatisfactory because the libcsironn, libcsirocsa, and libqsastime compile and link data are lumped in with plplotd.pc rather than having that data stored properly in a separate *.pc file for each of libcsironn, libcsirocsa, and libqsastime. Modified Paths: -------------- trunk/lib/csa/CMakeLists.txt trunk/lib/nn/CMakeLists.txt trunk/lib/qsastime/CMakeLists.txt trunk/src/CMakeLists.txt Modified: trunk/lib/csa/CMakeLists.txt =================================================================== --- trunk/lib/csa/CMakeLists.txt 2011-11-24 18:33:08 UTC (rev 12035) +++ trunk/lib/csa/CMakeLists.txt 2011-11-24 19:20:27 UTC (rev 12036) @@ -33,6 +33,12 @@ add_library(csirocsa ${csirocsa_LIB_SRCS}) + if(NON_TRANSITIVE) + # empty list ==> non-transitive linking for everything that links to + # libcsirocsa in the shared libraries case. + target_link_libraries(csirocsa LINK_INTERFACE_LIBRARIES) + endif(NON_TRANSITIVE) + set_target_properties(csirocsa PROPERTIES SOVERSION ${csirocsa_SOVERSION} VERSION ${csirocsa_VERSION} INSTALL_NAME_DIR "${LIB_DIR}" Modified: trunk/lib/nn/CMakeLists.txt =================================================================== --- trunk/lib/nn/CMakeLists.txt 2011-11-24 18:33:08 UTC (rev 12035) +++ trunk/lib/nn/CMakeLists.txt 2011-11-24 19:20:27 UTC (rev 12036) @@ -38,6 +38,13 @@ endif(BUILD_SHARED_LIBS) add_library(csironn ${csironn_LIB_SRCS}) + + if(NON_TRANSITIVE) + # empty list ==> non-transitive linking for everything that links to + # libcsironn in the shared libraries case. + target_link_libraries(csironn LINK_INTERFACE_LIBRARIES) + endif(NON_TRANSITIVE) + set_target_properties( csironn PROPERTIES @@ -47,6 +54,7 @@ INSTALL_NAME_DIR "${LIB_DIR}" ) target_link_libraries(csironn ${QHULL_LIBRARIES}) + install(TARGETS csironn EXPORT export_plplot ARCHIVE DESTINATION ${LIB_DIR} Modified: trunk/lib/qsastime/CMakeLists.txt =================================================================== --- trunk/lib/qsastime/CMakeLists.txt 2011-11-24 18:33:08 UTC (rev 12035) +++ trunk/lib/qsastime/CMakeLists.txt 2011-11-24 19:20:27 UTC (rev 12036) @@ -98,6 +98,12 @@ add_library(qsastime ${qsastime_LIB_SRCS}) add_dependencies(qsastime tai-utc.h_built deltaT.h_built) +if(NON_TRANSITIVE) + # empty list ==> non-transitive linking for everything that links to + # libqsatime in the shared libraries case. + target_link_libraries(qsastime LINK_INTERFACE_LIBRARIES) +endif(NON_TRANSITIVE) + if(MATH_LIB) target_link_libraries(qsastime ${MATH_LIB}) endif(MATH_LIB) Modified: trunk/src/CMakeLists.txt =================================================================== --- trunk/src/CMakeLists.txt 2011-11-24 18:33:08 UTC (rev 12035) +++ trunk/src/CMakeLists.txt 2011-11-24 19:20:27 UTC (rev 12036) @@ -182,6 +182,17 @@ add_library(plplot${LIB_TAG} ${plplot${LIB_TAG}_LIB_SRCS}) add_dependencies(plplot${LIB_TAG} plhershey-unicode.h_built ${qt_dependency}) +if(NON_TRANSITIVE) + # empty list ==> non-transitive linking for everything that links to + # libplplotd in the shared libraries case. + target_link_libraries(plplot${LIB_TAG} LINK_INTERFACE_LIBRARIES) + # This configures the pkg-config method to use non-transitive linking. + set(PC_REQUIRES_TAG "Requires.private") +else(NON_TRANSITIVE) + # This configures the pkg-config method to use transitive linking + set(PC_REQUIRES_TAG "Requires") +endif(NON_TRANSITIVE) + set(LIB_INSTALL_RPATH ${LIB_DIR}) if(ENABLE_DYNDRIVERS) set(libplplot${LIB_TAG}_LINK_LIBRARIES ${LTDL_LIBRARIES}) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2011-11-24 23:41:38
|
Revision: 12042 http://plplot.svn.sourceforge.net/plplot/?rev=12042&view=rev Author: airwin Date: 2011-11-24 23:41:32 +0000 (Thu, 24 Nov 2011) Log Message: ----------- Confirmed that the experimental plplotdmd_SHARED option (which builds the libplplotdmdd library for the D bindings as shared) does not work for Debian stable. The reason is the linker includes a static D library that is not built with the -fPIC flag so cannot be linked to a shared version of libplplotdmdd. Set the plplotdmd_SHARED option globally. Configure the traditional Makefile for the installed examples to use the pkg-config --static flag when appropriate (e.g., for the default plplotdmd_SHARED OFF case). In anticipation that plplotdmd_SHARED will work some day, implement non-transitive linking of libplplotdmd. However, this is a no-op for the current default plplotdmd_SHARED OFF case where libplplotdmd is built statically so the build-tree and traditional installed examples tree D examples have many unused direct dependencies as a result. These changes have been built and run-time tested for the build tree and traditional installed examples tree. The only way to test whether these changes suppress unnecessary linking is (i) find a platform where -Dplplotdmd_SHARED=ON works, and (ii) on that platform try -DNON_TRANSITIVE=ON for both the build tree and the traditional installed examples tree. Modified Paths: -------------- trunk/bindings/d/CMakeLists.txt trunk/cmake/modules/d.cmake trunk/examples/d/CMakeLists.txt trunk/examples/d/Makefile.examples.in Modified: trunk/bindings/d/CMakeLists.txt =================================================================== --- trunk/bindings/d/CMakeLists.txt 2011-11-24 21:33:53 UTC (rev 12041) +++ trunk/bindings/d/CMakeLists.txt 2011-11-24 23:41:32 UTC (rev 12042) @@ -30,11 +30,13 @@ plplot.d ) # Set this option to OFF by default since the STATIC library is - # the only one that seems to work for now on Debian Lenny and + # the only one that seems to work for now on Debian Squeeze and # potentially other Linux systems. option(plplotdmd_SHARED "Treat libplplotdmd as a shared library" OFF) if(plplotdmd_SHARED) + # pkg-config does not use --static option for d examples build. + set(PC_STATIC_OPTION_D) add_library(plplotdmd${LIB_TAG} ${plplotdmd${LIB_TAG}_LIB_SRCS}) if(BUILD_SHARED_LIBS) @@ -62,10 +64,23 @@ ) endif(USE_RPATH) else(plplotdmd_SHARED) + # pkg-config uses --static option for d examples build. + set(PC_STATIC_OPTION_D "--static") add_library(plplotdmd${LIB_TAG} STATIC ${plplotdmd${LIB_TAG}_LIB_SRCS}) target_link_libraries(plplotdmd${LIB_TAG} plplot${LIB_TAG}) endif(plplotdmd_SHARED) + if(NON_TRANSITIVE) + # empty list ==> non-transitive linking for everything that links to + # libplplotadad in the shared libraries case. + target_link_libraries(plplotdmd${LIB_TAG} LINK_INTERFACE_LIBRARIES) + # This configures the pkg-config method to use non-transitive linking. + set(PC_REQUIRES_TAG "Requires.private") + else(NON_TRANSITIVE) + # This configures the pkg-config method to use transitive linking + set(PC_REQUIRES_TAG "Requires") + endif(NON_TRANSITIVE) + install(TARGETS plplotdmd${LIB_TAG} EXPORT export_plplot ARCHIVE DESTINATION ${LIB_DIR} Modified: trunk/cmake/modules/d.cmake =================================================================== --- trunk/cmake/modules/d.cmake 2011-11-24 21:33:53 UTC (rev 12041) +++ trunk/cmake/modules/d.cmake 2011-11-24 23:41:32 UTC (rev 12042) @@ -46,3 +46,10 @@ endif(NOT CMAKE_D_COMPILER_WORKS) endif(ENABLE_d) +if(ENABLE_d) + # Set this option to OFF by default since the STATIC library is + # the only one that seems to work for now on Debian Squeeze and + # potentially other Linux systems. + option(plplotdmd_SHARED "Treat libplplotdmd as a shared library" OFF) +endif(ENABLE_d) + Modified: trunk/examples/d/CMakeLists.txt =================================================================== --- trunk/examples/d/CMakeLists.txt 2011-11-24 21:33:53 UTC (rev 12041) +++ trunk/examples/d/CMakeLists.txt 2011-11-24 23:41:32 UTC (rev 12042) @@ -71,6 +71,21 @@ ) set(DC ${CMAKE_D_COMPILER}) + + if(NON_TRANSITIVE) + if(plplotdmd_SHARED AND BUILD_SHARED_LIBS) + # pkg-config does not use --static option for d examples build. + set(PC_STATIC_OPTION_D) + else(plplotdmd_SHARED AND BUILD_SHARED_LIBS) + # pkg-config uses --static option for d examples build. + set(PC_STATIC_OPTION_D "--static") + endif(plplotdmd_SHARED AND BUILD_SHARED_LIBS) + else(NON_TRANSITIVE) + # pkg-config never uses the --static option for the d examples build + # for the transitive case. + set(PC_STATIC_OPTION_D) + endif(NON_TRANSITIVE) + configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/Makefile.examples.in ${CMAKE_CURRENT_BINARY_DIR}/Makefile.examples Modified: trunk/examples/d/Makefile.examples.in =================================================================== --- trunk/examples/d/Makefile.examples.in 2011-11-24 21:33:53 UTC (rev 12041) +++ trunk/examples/d/Makefile.examples.in 2011-11-24 23:41:32 UTC (rev 12042) @@ -66,6 +66,6 @@ rm -f $(EXECUTABLES_list) .d$(EXEEXT): -@pkg_config_true@ $(DC) $< -o $@ $(RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config --cflags --libs plplot$(LIB_TAG)-d` +@pkg_config_true@ $(DC) $< -o $@ $(RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION_D@ --cflags --libs plplot$(LIB_TAG)-d` .SUFFIXES: .d $(EXEEXT) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2011-11-26 06:46:58
|
Revision: 12050 http://plplot.svn.sourceforge.net/plplot/?rev=12050&view=rev Author: airwin Date: 2011-11-26 06:46:51 +0000 (Sat, 26 Nov 2011) Log Message: ----------- Style previously committed changes. Modified Paths: -------------- trunk/examples/tk/xtk02.c trunk/examples/tk/xtk04.c trunk/src/plargs.c trunk/src/plctrl.c Modified: trunk/examples/tk/xtk02.c =================================================================== --- trunk/examples/tk/xtk02.c 2011-11-26 02:49:31 UTC (rev 12049) +++ trunk/examples/tk/xtk02.c 2011-11-26 06:46:51 UTC (rev 12050) @@ -37,7 +37,7 @@ //-------------------------------------------------------------------------- int stuff( tclMatrix *pm, Tcl_Interp *interp, - int PL_UNUSED( argc ), const char * PL_UNUSED( argv []) ) + int PL_UNUSED( argc ), const char * PL_UNUSED( argv [] ) ) { int i; PLFLT x, y; Modified: trunk/examples/tk/xtk04.c =================================================================== --- trunk/examples/tk/xtk04.c 2011-11-26 02:49:31 UTC (rev 12049) +++ trunk/examples/tk/xtk04.c 2011-11-26 06:46:51 UTC (rev 12050) @@ -149,7 +149,7 @@ return TCL_OK; } -int +int get_dataCmd( ClientData PL_UNUSED( cd ), Tcl_Interp *interp, int PL_UNUSED( argc ), char **argv ) { tclMatrix *pm, *matPtr; Modified: trunk/src/plargs.c =================================================================== --- trunk/src/plargs.c 2011-11-26 02:49:31 UTC (rev 12049) +++ trunk/src/plargs.c 2011-11-26 06:46:51 UTC (rev 12050) @@ -994,7 +994,7 @@ //! @param p_argc ? //! @param p_argsave ? //! @param option_table ? -//! +//! //! @returns ? //! //-------------------------------------------------------------------------- @@ -1542,7 +1542,7 @@ // //! Performs appropriate action for option "h": //! Issues help message -//! +//! //! @param opt Not used. //! @param opt_arg Not used. //! @param client_data Not used. @@ -1565,7 +1565,7 @@ // //! Performs appropriate action for option "v": //! Issues version message -//! +//! //! @param opt Not used. //! @param opt_arg Not used. //! @param client_data Not used. @@ -1588,7 +1588,7 @@ // //! Performs appropriate action for option "verbose": //! Turn on verbosity flag -//! +//! //! @param opt Not used. //! @param opt_arg Not used. //! @param client_data Not used. @@ -1609,7 +1609,7 @@ // //! Performs appropriate action for option "debug": //! Turn on debugging flag -//! +//! //! @param opt Not used. //! @param opt_arg Not used. //! @param client_data Not used. @@ -1631,7 +1631,7 @@ // //! Performs appropriate action for option "hack": //! Enables driver-specific hack(s) -//! +//! //! @param opt Not used. //! @param opt_arg Not used. //! @param client_data Not used. @@ -1652,7 +1652,7 @@ // //! Performs appropriate action for option "dev": //! Sets output device keyword -//! +//! //! @param opt Not used. //! @param opt_arg The name of the output device. //! @param client_data Not used. @@ -1673,7 +1673,7 @@ // //! Performs appropriate action for option "o": //! Sets output file name -//! +//! //! @param opt Not used. //! @param opt_arg The file family name. //! @param client_data Not used. @@ -1694,7 +1694,7 @@ // //! Performs appropriate action for option "mar": //! Sets relative margin width -//! +//! //! @param opt Not used. //! @param opt_arg Plot margin width. //! @param client_data Not used. @@ -1715,7 +1715,7 @@ // //! Performs appropriate action for option "a": //! Sets plot aspect ratio on page -//! +//! //! @param opt Not used. //! @param opt_arg Plot aspect ratio. //! @param client_data Not used. @@ -1736,7 +1736,7 @@ // //! Performs appropriate action for option "jx": //! Sets relative justification in x -//! +//! //! @param opt Not used. //! @param opt_arg Plot relative justification in x(?) //! @param client_data Not used. @@ -1757,7 +1757,7 @@ // //! Performs appropriate action for option "jy": //! Sets relative justification in y -//! +//! //! @param opt Not used. //! @param opt_arg Plot relative justification in y(?) //! @param client_data Not used. @@ -1778,7 +1778,7 @@ // //! Performs appropriate action for option "ori": //! Sets orientation -//! +//! //! @param opt Not used. //! @param opt_arg Plot orientation. //! @param client_data Not used. @@ -1799,7 +1799,7 @@ // //! Performs appropriate action for option "freeaspect": //! Allow aspect ratio to adjust to orientation swaps. -//! +//! //! @param opt Not used. //! @param opt_arg Not used. //! @param client_data Not used. @@ -1834,7 +1834,7 @@ //! may increase in the future. To add to the list simply copy the small //! bit of code from ps.c that has to do with pls->portrait to the //! appropriate driver file. -//! +//! //! @param opt Not used. //! @param opt_arg Not used. //! @param client_data Not used. @@ -1855,7 +1855,7 @@ // //! Performs appropriate action for option "width": //! Sets pen width -//! +//! //! @param opt Not used. //! @param opt_arg Plot pen width. //! @param client_data Not used. @@ -1892,7 +1892,7 @@ //! delimiter), e.g., //! -bg ff0000 (set background to red with an alpha value of 1.0) //! -bg ff0000_0.1 (set background to red with an alpha value of 0.1 -//! +//! //! @param opt Not used. //! @param opt_arg Background RGB color in hex. //! @param client_data Not used. @@ -1975,7 +1975,7 @@ // //! Performs appropriate action for option "ncol0": //! Sets number of colors to allocate in cmap 0 (upper bound). -//! +//! //! @param opt Not used. //! @param opt_arg Number of color map 0 colors. //! @param client_data Not used. @@ -1996,7 +1996,7 @@ // //! Performs appropriate action for option "ncol1": //! Sets number of colors to allocate in cmap 1 (upper bound). -//! +//! //! @param opt Not used. //! @param opt_arg Number of color map 1 colors. //! @param client_data Not used. @@ -2017,7 +2017,7 @@ // //! Performs appropriate action for option "wplt": //! Sets (zoom) window into plot (e.g. "0,0,0.5,0.5") -//! +//! //! @param opt Not used. //! @param opt_arg Zoom setting. //! @param client_data Not used. @@ -2064,7 +2064,7 @@ // //! Get driver specific options in the form <option[=value]>[,option[=value]]* //! If "value" is not specified, it defaults to "1". -//! +//! //! @param opt Not used. //! @param opt_arg The driver specific option. //! @param client_data Not used. @@ -2154,7 +2154,7 @@ // //! Performs appropriate action for option "fam": //! Enables family output files -//! +//! //! @param opt Not used. //! @param opt_arg Not used. //! @param client_data Not used. @@ -2184,7 +2184,7 @@ //! //! Note case of the trailing suffix doesn't matter. //! If no suffix, defaults to MB. -//! +//! //! @param opt Not used. //! @param opt_arg Family size setting. //! @param client_data Not used. @@ -2242,7 +2242,7 @@ // //! Performs appropriate action for option "fbeg": //! Starts with the specified family member number. -//! +//! //! @param opt Not used. //! @param opt_arg Number of the first plot. //! @param client_data Not used. @@ -2264,7 +2264,7 @@ // //! Performs appropriate action for option "finc": //! Specify increment between family members. -//! +//! //! @param opt Not used. //! @param opt_arg Amount to increment the plot number between plots. //! @param client_data Not used. @@ -2286,7 +2286,7 @@ // //! Performs appropriate action for option "fflen": //! Specify minimum field length for family member number. -//! +//! //! @param opt Not used. //! @param opt_arg Size of the family number field (e.g. "1", "01", "001" ?) //! @param client_data Not used. @@ -2308,7 +2308,7 @@ // //! Performs appropriate action for option "np": //! Disables pause between pages -//! +//! //! @param opt Not used. //! @param opt_arg Not used. //! @param client_data Not used. @@ -2329,7 +2329,7 @@ // //! Performs appropriate action for option "nopixmap": //! Disables use of pixmaps in X drivers -//! +//! //! @param opt Not used. //! @param opt_arg Not used. //! @param client_data Not used. @@ -2350,7 +2350,7 @@ // //! Performs appropriate action for option "db": //! Double buffer X output (update only done on eop or Expose) -//! +//! //! @param opt Not used. //! @param opt_arg Not used. //! @param client_data Not used. @@ -2371,7 +2371,7 @@ // //! Performs appropriate action for option "bufmax": //! Sets size of data buffer for tk driver -//! +//! //! @param opt Not used. //! @param opt_arg Size of the data buffer for the tk driver. //! @param client_data Not used. @@ -2392,7 +2392,7 @@ // //! Performs appropriate action for option "server_name": //! Sets main window name of server (Tcl/TK driver only) -//! +//! //! @param opt Not used. //! @param opt_arg The name of the main window. //! @param client_data Not used. @@ -2413,7 +2413,7 @@ // //! Performs appropriate action for option "plserver": //! Sets name to use when invoking server (Tcl/TK driver only) -//! +//! //! @param opt Not used. //! @param opt_arg Name of Tcl/TK server (?). //! @param client_data Not used. @@ -2434,7 +2434,7 @@ // //! Performs appropriate action for option "plwindow": //! Sets PLplot window name -//! +//! //! @param opt Not used. //! @param opt_arg Name of the window. //! @param client_data Not used. @@ -2459,7 +2459,7 @@ // //! Performs appropriate action for option "auto_path": //! Sets additional directories to autoload -//! +//! //! @param opt Not used. //! @param opt_arg Additional directories to add the the load path (?). //! @param client_data Not used. @@ -2480,7 +2480,7 @@ // //! Performs appropriate action for option "px": //! Set packing in x -//! +//! //! @param opt Not used. //! @param opt_arg X packing (?). //! @param client_data Not used. @@ -2501,7 +2501,7 @@ // //! Performs appropriate action for option "py": //! Set packing in y -//! +//! //! @param opt Not used. //! @param opt_arg Y packing (?). //! @param client_data Not used. @@ -2526,7 +2526,7 @@ //! stands for one of the four combinations +XOFF+YOFF, +XOFF-YOFF, //! -XOFF+YOFF, and -XOFF-YOFF. Some examples are the following: //! -geometry 400x300, -geometry -100+200, and -geometry 400x300-100+200. -//! +//! //! @param opt Not used. //! @param opt_arg Plot geometry descriptor. //! @param client_data Not used. @@ -2619,7 +2619,7 @@ // opt_tk_file() // //! File name for plserver tk_file option -//! +//! //! @param opt Not used. //! @param opt_arg Tk file name. //! @param client_data Not used. @@ -2649,7 +2649,7 @@ //! or //! e.g., "-dpi 1200" //! Will set both X and Y dpi to 1200 dpi -//! +//! //! @param opt Not used. //! @param opt_arg DPI descriptor string. //! @param client_data Not used. @@ -2697,7 +2697,7 @@ // opt_dev_compression() // //! Sets device compression -//! +//! //! @param opt Not used. //! @param opt_arg Device compression (?). //! @param client_data Not used. @@ -2726,7 +2726,7 @@ // opt_cmap0() // //! Sets color table 0 based on a cmap0.pal file. -//! +//! //! @param opt Not used. //! @param opt_arg Name of color map 0 .pal file. //! @param client_data Not used. @@ -2746,7 +2746,7 @@ // opt_cmap1() // //! Sets color table 1 based on a cmap1.pal file. -//! +//! //! @param opt Not used. //! @param opt_arg Name of a color map 1 .pal file. //! @param client_data Not used. @@ -2766,7 +2766,7 @@ // opt_locale() // //! Make PLplot portable to all LC_NUMERIC locales. -//! +//! //! @param opt Not used. //! @param opt_arg Not used. //! @param client_data Not used. @@ -2800,7 +2800,7 @@ //! For the case where the boundary of the filled region is //! self-intersecting, use the even-odd fill rule rather than the //! default nonzero fill rule. -//! +//! //! @param opt Not used. //! @param opt_arg Not used. //! @param client_data Not used. Modified: trunk/src/plctrl.c =================================================================== --- trunk/src/plctrl.c 2011-11-26 02:49:31 UTC (rev 12049) +++ trunk/src/plctrl.c 2011-11-26 06:46:51 UTC (rev 12050) @@ -135,8 +135,8 @@ // plcol0() // //! Set color, map 0. Argument is a integer between 0 and plsc->ncol0. -//! -//! @param icol0 The index of the color map 0 color to use as the current +//! +//! @param icol0 The index of the color map 0 color to use as the current //! color. (0 - plsc->ncol0). void @@ -169,8 +169,8 @@ // plcol1() // //! Set color, map 1. Argument is a float between 0. and 1. -//! -//! @param icol1 The index of the color map 1 color to use as the current +//! +//! @param icol1 The index of the color map 1 color to use as the current //! color. (0.0 - 1.0) void @@ -208,7 +208,7 @@ // plscolbg() // //! Set the background color (cmap0[0]) by 8 bit RGB value -//! +//! //! @param r Red value of the background color (0 - 255). //! @param g Green value of the background color (0 - 255). //! @param b Blue value of the background color (0 - 255). @@ -223,11 +223,11 @@ // plscolbga() // //! Set the background color (cmap0[0]) by 8 bit RGB value and alpha value -//! +//! //! @param r Red value of the background color (0 - 255). //! @param g Green value of the background color (0 - 255). //! @param b Blue value of the background color (0 - 255). -//! @param a Alpha (transparency) value of the background color +//! @param a Alpha (transparency) value of the background color //! (0.0 - 1.0). //-------------------------------------------------------------------------- @@ -274,7 +274,7 @@ // //! Set a given color from color map 0 by 8 bit RGB value //! Does not result in any additional cells to be allocated. -//! +//! //! @param icol0 index of the color to set (0 - plsc->ncol0) //! @param r Red value of the color (0 - 255). //! @param g Green value of the color (0 - 255). @@ -309,7 +309,7 @@ // //! Set a given color from color map 0 by 8 bit RGB value and alpha value. //! Does not result in any additional cells to be allocated. -//! +//! //! @param icol0 index of the color to set (0 - plsc->ncol0) //! @param r Red value of the color (0 - 255). //! @param g Green value of the color (0 - 255). @@ -351,7 +351,7 @@ // //! Returns 8 bit RGB values for given color from color map 0 //! Values are negative if an invalid color id is given -//! +//! //! @param icol0 Index of the color to be return (0 - plsc->ncol0). //! @param r Current red value of the color. //! @param g Current green value of the color. @@ -2117,7 +2117,7 @@ //! when finished with it. //! //! @param fn Name of the executable(?). -//! +//! //! @returns The location of the executable file. //-------------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2011-11-29 06:33:12
|
Revision: 12067 http://plplot.svn.sourceforge.net/plplot/?rev=12067&view=rev Author: airwin Date: 2011-11-29 06:33:04 +0000 (Tue, 29 Nov 2011) Log Message: ----------- Use CMake versions of FindwxWidgets.cmake and FindPkgConfig.cmake rather than our own. Our own versions were imported into our build some time ago to allow us to use even older versions of CMake that didn't have them, but that is no longer necessary now that our minimum CMake version is 2.8.2 for Linux and 2.8.6 for all other platforms. Furthermore, the CMake-2.8.x native versions of these two find modules are more up-to-date and better maintained than our own versions in all respects. Finally, the CMake-2.8.x native versions of these files pass all comprehensive testing. Modified Paths: -------------- trunk/examples/CMakeLists.txt Removed Paths: ------------- trunk/cmake/modules/FindPkgConfig.cmake trunk/cmake/modules/FindwxWidgets.cmake Deleted: trunk/cmake/modules/FindPkgConfig.cmake =================================================================== --- trunk/cmake/modules/FindPkgConfig.cmake 2011-11-29 02:29:30 UTC (rev 12066) +++ trunk/cmake/modules/FindPkgConfig.cmake 2011-11-29 06:33:04 UTC (rev 12067) @@ -1,359 +0,0 @@ -# - a pkg-config module for CMake -# -# Usage: -# pkg_check_modules(<PREFIX> [REQUIRED] <MODULE> [<MODULE>]*) -# checks for all the given modules -# -# pkg_search_module(<PREFIX> [REQUIRED] <MODULE> [<MODULE>]*) -# checks for given modules and uses the first working one -# -# When the 'REQUIRED' argument was set, macros will fail with an error -# when module(s) could not be found -# -# It sets the following variables: -# PKG_CONFIG_FOUND ... true iff pkg-config works on the system -# PKG_CONFIG_EXECUTABLE ... pathname of the pkg-config program -# <PREFIX>_FOUND ... set to 1 iff module(s) exist -# -# For the following variables two sets of values exist; first one is the -# common one and has the given PREFIX. The second set contains flags -# which are given out when pkgconfig was called with the '--static' -# option. -# <XPREFIX>_LIBRARIES ... only the libraries (w/o the '-l') -# <XPREFIX>_LIBRARY_DIRS ... the paths of the libraries (w/o the '-L') -# <XPREFIX>_LDFLAGS ... all required linker flags -# <XPREFIX>_LDFLAGS_OTHER ... all other linker flags -# <XPREFIX>_INCLUDE_DIRS ... the '-I' preprocessor flags (w/o the '-I') -# <XPREFIX>_CFLAGS ... all required cflags -# <XPREFIX>_CFLAGS_OTHER ... the other compiler flags -# -# <XPREFIX> = <PREFIX> for common case -# <XPREFIX> = <PREFIX>_STATIC for static linking -# -# There are some special variables whose prefix depends on the count -# of given modules. When there is only one module, <PREFIX> stays -# unchanged. When there are multiple modules, the prefix will be -# changed to <PREFIX>_<MODNAME>: -# <XPREFIX>_VERSION ... version of the module -# <XPREFIX>_PREFIX ... prefix-directory of the module -# <XPREFIX>_INCLUDEDIR ... include-dir of the module -# <XPREFIX>_LIBDIR ... lib-dir of the module -# -# <XPREFIX> = <PREFIX> when |MODULES| == 1, else -# <XPREFIX> = <PREFIX>_<MODNAME> -# -# A <MODULE> parameter can have the following formats: -# {MODNAME} ... matches any version -# {MODNAME}>={VERSION} ... at least version <VERSION> is required -# {MODNAME}={VERSION} ... exactly version <VERSION> is required -# {MODNAME}<={VERSION} ... modules must not be newer than <VERSION> -# -# Examples -# pkg_check_modules (GLIB2 glib-2.0) -# -# pkg_check_modules (GLIB2 glib-2.0>=2.10) -# requires at least version 2.10 of glib2 and defines e.g. -# GLIB2_VERSION=2.10.3 -# -# pkg_check_modules (FOO glib-2.0>=2.10 gtk+-2.0) -# requires both glib2 and gtk2, and defines e.g. -# FOO_glib-2.0_VERSION=2.10.3 -# FOO_gtk+-2.0_VERSION=2.8.20 -# -# pkg_check_modules (XRENDER REQUIRED xrender) -# defines e.g.: -# XRENDER_LIBRARIES=Xrender;X11 -# XRENDER_STATIC_LIBRARIES=Xrender;X11;pthread;Xau;Xdmcp -# -# pkg_search_module (BAR libxml-2.0 libxml2 libxml>=2) - - -# Copyright (C) 2006 Enrico Scholz <enr...@in...> -# -# Redistribution and use, with or without modification, are permitted -# provided that the following conditions are met: -# -# 1. Redistributions must retain the above copyright notice, this -# list of conditions and the following disclaimer. -# 2. The name of the author may not be used to endorse or promote -# products derived from this software without specific prior -# written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -### Common stuff #### -set(PKG_CONFIG_VERSION 1) -set(PKG_CONFIG_FOUND 0) - -find_program(PKG_CONFIG_EXECUTABLE NAMES pkg-config DOC "pkg-config executable") -mark_as_advanced(PKG_CONFIG_EXECUTABLE) - -if(PKG_CONFIG_EXECUTABLE) - set(PKG_CONFIG_FOUND 1) -endif(PKG_CONFIG_EXECUTABLE) - - -# Unsets the given variables -macro(_pkgconfig_unset var) - set(${var} "" CACHE INTERNAL "") -endmacro(_pkgconfig_unset) - -macro(_pkgconfig_set var value) - set(${var} ${value} CACHE INTERNAL "") -endmacro(_pkgconfig_set) - -# Invokes pkgconfig, cleans up the result and sets variables -macro(_pkgconfig_invoke _pkglist _prefix _varname _regexp) - set(_pkgconfig_invoke_result) - - execute_process( - COMMAND ${PKG_CONFIG_EXECUTABLE} ${ARGN} ${_pkglist} - OUTPUT_VARIABLE _pkgconfig_invoke_result - RESULT_VARIABLE _pkgconfig_failed) - - if (_pkgconfig_failed) - set(_pkgconfig_${_varname} "") - _pkgconfig_unset(${_prefix}_${_varname}) - else(_pkgconfig_failed) - string(REGEX REPLACE "[\r\n]" " " _pkgconfig_invoke_result "${_pkgconfig_invoke_result}") - string(REGEX REPLACE " +$" "" _pkgconfig_invoke_result "${_pkgconfig_invoke_result}") - - if (NOT ${_regexp} STREQUAL "") - string(REGEX REPLACE "${_regexp}" " " _pkgconfig_invoke_result "${_pkgconfig_invoke_result}") - endif(NOT ${_regexp} STREQUAL "") - - separate_arguments(_pkgconfig_invoke_result) - - #message(STATUS " ${_varname} ... ${_pkgconfig_invoke_result}") - set(_pkgconfig_${_varname} ${_pkgconfig_invoke_result}) - _pkgconfig_set(${_prefix}_${_varname} "${_pkgconfig_invoke_result}") - endif(_pkgconfig_failed) -endmacro(_pkgconfig_invoke) - -# Invokes pkgconfig two times; once without '--static' and once with -# '--static' -macro(_pkgconfig_invoke_dyn _pkglist _prefix _varname cleanup_regexp) - _pkgconfig_invoke("${_pkglist}" ${_prefix} ${_varname} "${cleanup_regexp}" ${ARGN}) - _pkgconfig_invoke("${_pkglist}" ${_prefix} STATIC_${_varname} "${cleanup_regexp}" --static ${ARGN}) -endmacro(_pkgconfig_invoke_dyn) - -# Splits given arguments into options and a package list -macro(_pkgconfig_parse_options _result _is_req) - set(${_is_req} 0) - - foreach(_pkg ${ARGN}) - if (_pkg STREQUAL "REQUIRED") - set(${_is_req} 1) - endif (_pkg STREQUAL "REQUIRED") - endforeach(_pkg ${ARGN}) - - set(${_result} ${ARGN}) - list(REMOVE_ITEM ${_result} "REQUIRED") -endmacro(_pkgconfig_parse_options) - -### -macro(_pkg_check_modules_internal _is_required _is_silent _prefix) - _pkgconfig_unset(${_prefix}_FOUND) - _pkgconfig_unset(${_prefix}_VERSION) - _pkgconfig_unset(${_prefix}_PREFIX) - _pkgconfig_unset(${_prefix}_INCLUDEDIR) - _pkgconfig_unset(${_prefix}_LIBDIR) - _pkgconfig_unset(${_prefix}_LIBRARIES) - _pkgconfig_unset(${_prefix}_LIBRARY_DIRS) - _pkgconfig_unset(${_prefix}_LDFLAGS) - _pkgconfig_unset(${_prefix}_LDFLAGS_OTHER) - _pkgconfig_unset(${_prefix}_INCLUDE_DIRS) - _pkgconfig_unset(${_prefix}_CFLAGS) - _pkgconfig_unset(${_prefix}_CFLAGS_OTHER) - _pkgconfig_unset(${_prefix}_STATIC_LIBRARIES) - _pkgconfig_unset(${_prefix}_STATIC_LIBRARY_DIRS) - _pkgconfig_unset(${_prefix}_STATIC_LDFLAGS) - _pkgconfig_unset(${_prefix}_STATIC_LDFLAGS_OTHER) - _pkgconfig_unset(${_prefix}_STATIC_INCLUDE_DIRS) - _pkgconfig_unset(${_prefix}_STATIC_CFLAGS) - _pkgconfig_unset(${_prefix}_STATIC_CFLAGS_OTHER) - - # create a better addressable variable of the modules and calculate its size - set(_pkg_check_modules_list ${ARGN}) - list(LENGTH _pkg_check_modules_list _pkg_check_modules_cnt) - - if(PKG_CONFIG_EXECUTABLE) - # give out status message telling checked module - if (NOT ${_is_silent}) - if (_pkg_check_modules_cnt EQUAL 1) - message(STATUS "checking for module '${_pkg_check_modules_list}'") - else(_pkg_check_modules_cnt EQUAL 1) - message(STATUS "checking for modules '${_pkg_check_modules_list}'") - endif(_pkg_check_modules_cnt EQUAL 1) - endif(NOT ${_is_silent}) - - set(_pkg_check_modules_packages) - set(_pkg_check_modules_failed) - - # iterate through module list and check whether they exist and match the required version - foreach (_pkg_check_modules_pkg ${_pkg_check_modules_list}) - set(_pkg_check_modules_exist_query) - - # check whether version is given - if (_pkg_check_modules_pkg MATCHES ".*(>=|=|<=).*") - string(REGEX REPLACE "(.*[^><])(>=|=|<=)(.*)" "\\1" _pkg_check_modules_pkg_name "${_pkg_check_modules_pkg}") - string(REGEX REPLACE "(.*[^><])(>=|=|<=)(.*)" "\\2" _pkg_check_modules_pkg_op "${_pkg_check_modules_pkg}") - string(REGEX REPLACE "(.*[^><])(>=|=|<=)(.*)" "\\3" _pkg_check_modules_pkg_ver "${_pkg_check_modules_pkg}") - else(_pkg_check_modules_pkg MATCHES ".*(>=|=|<=).*") - set(_pkg_check_modules_pkg_name "${_pkg_check_modules_pkg}") - set(_pkg_check_modules_pkg_op) - set(_pkg_check_modules_pkg_ver) - endif(_pkg_check_modules_pkg MATCHES ".*(>=|=|<=).*") - - # handle the operands - if (_pkg_check_modules_pkg_op STREQUAL ">=") - list(APPEND _pkg_check_modules_exist_query --atleast-version) - endif(_pkg_check_modules_pkg_op STREQUAL ">=") - - if (_pkg_check_modules_pkg_op STREQUAL "=") - list(APPEND _pkg_check_modules_exist_query --exact-version) - endif(_pkg_check_modules_pkg_op STREQUAL "=") - - if (_pkg_check_modules_pkg_op STREQUAL "<=") - list(APPEND _pkg_check_modules_exist_query --max-version) - endif(_pkg_check_modules_pkg_op STREQUAL "<=") - - # create the final query which is of the format: - # * --atleast-version <version> <pkg-name> - # * --exact-version <version> <pkg-name> - # * --max-version <version> <pkg-name> - # * --exists <pkg-name> - if (_pkg_check_modules_pkg_op) - list(APPEND _pkg_check_modules_exist_query "${_pkg_check_modules_pkg_ver}") - else(_pkg_check_modules_pkg_op) - list(APPEND _pkg_check_modules_exist_query --exists) - endif(_pkg_check_modules_pkg_op) - - _pkgconfig_unset(${_prefix}_${_pkg_check_modules_pkg_name}_VERSION) - _pkgconfig_unset(${_prefix}_${_pkg_check_modules_pkg_name}_PREFIX) - _pkgconfig_unset(${_prefix}_${_pkg_check_modules_pkg_name}_INCLUDEDIR) - _pkgconfig_unset(${_prefix}_${_pkg_check_modules_pkg_name}_LIBDIR) - - list(APPEND _pkg_check_modules_exist_query "${_pkg_check_modules_pkg_name}") - list(APPEND _pkg_check_modules_packages "${_pkg_check_modules_pkg_name}") - - # execute the query - execute_process( - COMMAND ${PKG_CONFIG_EXECUTABLE} ${_pkg_check_modules_exist_query} - RESULT_VARIABLE _pkgconfig_retval) - - # evaluate result and tell failures - if (_pkgconfig_retval) - if(NOT ${_is_silent}) - message(STATUS " package '${_pkg_check_modules_pkg}' not found") - endif(NOT ${_is_silent}) - - set(_pkg_check_modules_failed 1) - endif(_pkgconfig_retval) - endforeach(_pkg_check_modules_pkg) - - if(_pkg_check_modules_failed) - # fail when requested - if (${_is_required}) - message(SEND_ERROR "A required package was not found") - endif (${_is_required}) - else(_pkg_check_modules_failed) - # when we are here, we checked whether requested modules - # exist. Now, go through them and set variables - - _pkgconfig_set(${_prefix}_FOUND 1) - list(LENGTH _pkg_check_modules_packages pkg_count) - - # iterate through all modules again and set individual variables - foreach (_pkg_check_modules_pkg ${_pkg_check_modules_packages}) - # handle case when there is only one package required - if (pkg_count EQUAL 1) - set(_pkg_check_prefix "${_prefix}") - else(pkg_count EQUAL 1) - set(_pkg_check_prefix "${_prefix}_${_pkg_check_modules_pkg}") - endif(pkg_count EQUAL 1) - - _pkgconfig_invoke(${_pkg_check_modules_pkg} "${_pkg_check_prefix}" VERSION "" --modversion ) - _pkgconfig_invoke(${_pkg_check_modules_pkg} "${_pkg_check_prefix}" PREFIX "" --variable=prefix ) - _pkgconfig_invoke(${_pkg_check_modules_pkg} "${_pkg_check_prefix}" INCLUDEDIR "" --variable=includedir ) - _pkgconfig_invoke(${_pkg_check_modules_pkg} "${_pkg_check_prefix}" LIBDIR "" --variable=libdir ) - - message(STATUS " found ${_pkg_check_modules_pkg}, version ${_pkgconfig_VERSION}") - endforeach(_pkg_check_modules_pkg) - - # set variables which are combined for multiple modules - _pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" LIBRARIES "(^| )-l" --libs-only-l ) - _pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" LIBRARY_DIRS "(^| )-L" --libs-only-L ) - _pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" LDFLAGS "" --libs ) - _pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" LDFLAGS_OTHER "" --libs-only-other ) - - _pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" INCLUDE_DIRS "(^| )-I" --cflags-only-I ) - _pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" CFLAGS "" --cflags ) - _pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" CFLAGS_OTHER "" --cflags-only-other ) - endif(_pkg_check_modules_failed) - else(PKG_CONFIG_EXECUTABLE) - if (${_is_required}) - message(SEND_ERROR "pkg-config tool not found") - endif (${_is_required}) - endif(PKG_CONFIG_EXECUTABLE) -endmacro(_pkg_check_modules_internal) - -### -### User visible macros start here -### - -### -macro(pkg_check_modules _prefix _module0) - # check cached value - if (NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION}) - _pkgconfig_parse_options (_pkg_modules _pkg_is_required "${_module0}" ${ARGN}) - _pkg_check_modules_internal("${_pkg_is_required}" 0 "${_prefix}" ${_pkg_modules}) - - _pkgconfig_set(__pkg_config_checked_${_prefix} ${PKG_CONFIG_VERSION}) - endif(NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION}) -endmacro(pkg_check_modules) - -### -macro(pkg_search_module _prefix _module0) - # check cached value - if (NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION}) - set(_pkg_modules_found 0) - _pkgconfig_parse_options(_pkg_modules_alt _pkg_is_required "${_module0}" ${ARGN}) - - message(STATUS "checking for one of the modules '${_pkg_modules_alt}'") - - # iterate through all modules and stop at the first working one. - foreach(_pkg_alt ${_pkg_modules_alt}) - if(NOT _pkg_modules_found) - _pkg_check_modules_internal(0 1 "${_prefix}" "${_pkg_alt}") - endif(NOT _pkg_modules_found) - - if (${_prefix}_FOUND) - set(_pkg_modules_found 1) - endif(${_prefix}_FOUND) - endforeach(_pkg_alt) - - if (NOT ${_prefix}_FOUND) - if(${_pkg_is_required}) - message(SEND_ERROR "None of the required '${_pkg_modules_alt}' found") - endif(${_pkg_is_required}) - endif(NOT ${_prefix}_FOUND) - - _pkgconfig_set(__pkg_config_checked_${_prefix} ${PKG_CONFIG_VERSION}) - endif(NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION}) -endmacro(pkg_search_module) - -### Local Variables: -### mode: cmake -### End: Deleted: trunk/cmake/modules/FindwxWidgets.cmake =================================================================== --- trunk/cmake/modules/FindwxWidgets.cmake 2011-11-29 02:29:30 UTC (rev 12066) +++ trunk/cmake/modules/FindwxWidgets.cmake 2011-11-29 06:33:04 UTC (rev 12067) @@ -1,1020 +0,0 @@ -# - Find a wxWidgets (a.k.a., wxWindows) installation. -# This module finds if wxWidgets is installed and selects a default -# configuration to use. wxWidgets is a modular library. To specify the -# modules that you will use, you need to name them as components to -# the package: -# -# FIND_PACKAGE(wxWidgets COMPONENTS base core ...) -# -# There are two search branches: a windows style and a unix style. For -# windows, the following variables are searched for and set to -# defaults in case of multiple choices. Change them if the defaults -# are not desired (i.e., these are the only variables you should -# change to select a configuration): -# -# wxWidgets_ROOT_DIR - Base wxWidgets directory -# (e.g., C:/wxWidgets-2.6.3). -# wxWidgets_LIB_DIR - Path to wxWidgets libraries -# (e.g., C:/wxWidgets-2.6.3/lib/vc_lib). -# wxWidgets_CONFIGURATION - Configuration to use -# (e.g., msw, mswd, mswu, mswunivud, etc.) -# -# For unix style it uses the wx-config utility. You can select between -# debug/release, unicode/ansi, universal/non-universal, and -# static/shared in the QtDialog or ccmake interfaces by turning ON/OFF -# the following variables: -# -# wxWidgets_USE_DEBUG -# wxWidgets_USE_UNICODE -# wxWidgets_USE_UNIVERSAL -# wxWidgets_USE_STATIC -# -# The following are set after the configuration is done for both -# windows and unix style: -# -# wxWidgets_FOUND - Set to TRUE if wxWidgets was found. -# wxWidgets_INCLUDE_DIRS - Include directories for WIN32 -# i.e., where to find "wx/wx.h" and -# "wx/setup.h"; possibly empty for unices. -# wxWidgets_LIBRARIES - Path to the wxWidgets libraries. -# wxWidgets_LIBRARY_DIRS - compile time link dirs, useful for -# rpath on UNIX. Typically an empty string -# in WIN32 environment. -# wxWidgets_DEFINITIONS - Contains defines required to compile/link -# against WX, e.g. WXUSINGDLL -# wxWidgets_DEFINITIONS_DEBUG- Contains defines required to compile/link -# against WX debug builds, e.g. __WXDEBUG__ -# wxWidgets_CXX_FLAGS - Include dirs and compiler flags for -# unices, empty on WIN32. Essentially -# "`wx-config --cxxflags`". -# wxWidgets_USE_FILE - Convenience include file. -# -# Sample usage: -# FIND_PACKAGE(wxWidgets COMPONENTS base core gl net) -# IF(wxWidgets_FOUND) -# INCLUDE(${wxWidgets_USE_FILE}) -# # and for each of your dependant executable/library targets: -# TARGET_LINK_LIBRARIES(<YourTarget> ${wxWidgets_LIBRARIES}) -# ENDIF(wxWidgets_FOUND) -# -# If wxWidgets is required (i.e., not an optional part): -# FIND_PACKAGE(wxWidgets REQUIRED base core gl net) -# INCLUDE(${wxWidgets_USE_FILE}) -# # and for each of your dependant executable/library targets: -# TARGET_LINK_LIBRARIES(<YourTarget> ${wxWidgets_LIBRARIES}) - -#============================================================================= -# Copyright 2004-2009 Kitware, Inc. -# Copyright 2007-2009 Miguel A. Figueroa-Villanueva <miguelf at ieee dot org> -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distributed this file outside of CMake, substitute the full -# License text for the above reference.) - -# -# FIXME: check this and provide a correct sample usage... -# Remember to connect back to the upper text. -# Sample usage with monolithic wx build: -# -# FIND_PACKAGE(wxWidgets COMPONENTS mono) -# ... - -# NOTES -# -# This module has been tested on the WIN32 platform with wxWidgets -# 2.6.2, 2.6.3, and 2.5.3. However, it has been designed to -# easily extend support to all possible builds, e.g., static/shared, -# debug/release, unicode, universal, multilib/monolithic, etc.. -# -# If you want to use the module and your build type is not supported -# out-of-the-box, please contact me to exchange information on how -# your system is setup and I'll try to add support for it. -# -# AUTHOR -# -# Miguel A. Figueroa-Villanueva (miguelf at ieee dot org). -# Jan Woetzel (jw at mip.informatik.uni-kiel.de). -# -# Based on previous works of: -# Jan Woetzel (FindwxWindows.cmake), -# Jorgen Bodde and Jerry Fath (FindwxWin.cmake). - -# TODO/ideas -# -# (1) Option/Setting to use all available wx libs -# In contrast to expert developer who lists the -# minimal set of required libs in wxWidgets_USE_LIBS -# there is the newbie user: -# - who just wants to link against WX with more 'magic' -# - doesn't know the internal structure of WX or how it was built, -# in particular if it is monolithic or not -# - want to link against all available WX libs -# Basically, the intent here is to mimic what wx-config would do by -# default (i.e., `wx-config --libs`). -# -# Possible solution: -# Add a reserved keyword "std" that initializes to what wx-config -# would default to. If the user has not set the wxWidgets_USE_LIBS, -# default to "std" instead of "base core" as it is now. To implement -# "std" will basically boil down to a FOR_EACH lib-FOUND, but maybe -# checking whether a minimal set was found. - - -# FIXME: This and all the DBG_MSG calls should be removed after the -# module stabilizes. -# -# Helper macro to control the debugging output globally. There are -# two versions for controlling how verbose your output should be. -MACRO(DBG_MSG _MSG) -# MESSAGE(STATUS -# "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${_MSG}") -ENDMACRO(DBG_MSG) -MACRO(DBG_MSG_V _MSG) -# MESSAGE(STATUS -# "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${_MSG}") -ENDMACRO(DBG_MSG_V) - -# Clear return values in case the module is loaded more than once. -SET(wxWidgets_FOUND FALSE) -SET(wxWidgets_INCLUDE_DIRS "") -SET(wxWidgets_LIBRARIES "") -SET(wxWidgets_LIBRARY_DIRS "") -SET(wxWidgets_CXX_FLAGS "") - -# Using SYSTEM with INCLUDE_DIRECTORIES in conjunction with wxWidgets on -# the Mac produces compiler errors. Set wxWidgets_INCLUDE_DIRS_NO_SYSTEM -# to prevent UsewxWidgets.cmake from using SYSTEM. -# -# See cmake mailing list discussions for more info: -# http://www.cmake.org/pipermail/cmake/2008-April/021115.html -# http://www.cmake.org/pipermail/cmake/2008-April/021146.html -# -IF(APPLE) - SET(wxWidgets_INCLUDE_DIRS_NO_SYSTEM 1) -ENDIF(APPLE) - -# DEPRECATED: This is a patch to support the DEPRECATED use of -# wxWidgets_USE_LIBS. -# -# If wxWidgets_USE_LIBS is set: -# - if using <components>, then override wxWidgets_USE_LIBS -# - else set wxWidgets_FIND_COMPONENTS to wxWidgets_USE_LIBS -IF(wxWidgets_USE_LIBS AND NOT wxWidgets_FIND_COMPONENTS) - SET(wxWidgets_FIND_COMPONENTS ${wxWidgets_USE_LIBS}) -ENDIF(wxWidgets_USE_LIBS AND NOT wxWidgets_FIND_COMPONENTS) -DBG_MSG("wxWidgets_FIND_COMPONENTS : ${wxWidgets_FIND_COMPONENTS}") - -# Add the convenience use file if available. -# -# Get dir of this file which may reside in: -# - CMAKE_MAKE_ROOT/Modules on CMake installation -# - CMAKE_MODULE_PATH if user prefers his own specialized version -SET(wxWidgets_USE_FILE "") -GET_FILENAME_COMPONENT( - wxWidgets_CURRENT_LIST_DIR ${CMAKE_CURRENT_LIST_FILE} PATH) -# Prefer an existing customized version, but the user might override -# the FindwxWidgets module and not the UsewxWidgets one. -IF(EXISTS "${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake") - SET(wxWidgets_USE_FILE - "${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake") -ELSE(EXISTS "${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake") - SET(wxWidgets_USE_FILE UsewxWidgets.cmake) -ENDIF(EXISTS "${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake") - -#===================================================================== -#===================================================================== -IF(WIN32 AND NOT CYGWIN AND NOT MSYS) - SET(wxWidgets_FIND_STYLE "win32") -ELSE(WIN32 AND NOT CYGWIN AND NOT MSYS) - IF(UNIX OR MSYS) - SET(wxWidgets_FIND_STYLE "unix") - ENDIF(UNIX OR MSYS) -ENDIF(WIN32 AND NOT CYGWIN AND NOT MSYS) - -#===================================================================== -# WIN32_FIND_STYLE -#===================================================================== -IF(wxWidgets_FIND_STYLE STREQUAL "win32") - # Useful common wx libs needed by almost all components. - SET(wxWidgets_COMMON_LIBRARIES png tiff jpeg zlib regex expat) - - # DEPRECATED: Use FIND_PACKAGE(wxWidgets COMPONENTS mono) instead. - IF(NOT wxWidgets_FIND_COMPONENTS) - IF(wxWidgets_USE_MONOLITHIC) - SET(wxWidgets_FIND_COMPONENTS mono) - ELSE(wxWidgets_USE_MONOLITHIC) - SET(wxWidgets_FIND_COMPONENTS base core) # this is default - ENDIF(wxWidgets_USE_MONOLITHIC) - ENDIF(NOT wxWidgets_FIND_COMPONENTS) - - # Always add the common required libs. - LIST(APPEND wxWidgets_FIND_COMPONENTS ${wxWidgets_COMMON_LIBRARIES}) - - #------------------------------------------------------------------- - # WIN32: Helper MACROS - #------------------------------------------------------------------- - # - # Get filename components for a configuration. For example, - # if _CONFIGURATION = mswunivud, then _UNV=univ, _UCD=u _DBG=d - # if _CONFIGURATION = mswu, then _UNV="", _UCD=u _DBG="" - # - MACRO(WX_GET_NAME_COMPONENTS _CONFIGURATION _UNV _UCD _DBG) - STRING(REGEX MATCH "univ" ${_UNV} "${_CONFIGURATION}") - STRING(REGEX REPLACE "msw.*(u)[d]*$" "u" ${_UCD} "${_CONFIGURATION}") - IF(${_UCD} STREQUAL ${_CONFIGURATION}) - SET(${_UCD} "") - ENDIF(${_UCD} STREQUAL ${_CONFIGURATION}) - STRING(REGEX MATCH "d$" ${_DBG} "${_CONFIGURATION}") - ENDMACRO(WX_GET_NAME_COMPONENTS) - - # - # Find libraries associated to a configuration. - # - MACRO(WX_FIND_LIBS _UNV _UCD _DBG) - DBG_MSG_V("m_unv = ${_UNV}") - DBG_MSG_V("m_ucd = ${_UCD}") - DBG_MSG_V("m_dbg = ${_DBG}") - - # FIXME: What if both regex libs are available. regex should be - # found outside the loop and only wx${LIB}${_UCD}${_DBG}. - # Find wxWidgets common libraries. - FOREACH(LIB ${wxWidgets_COMMON_LIBRARIES}) - FIND_LIBRARY(WX_${LIB}${_DBG} - NAMES - wx${LIB}${_UCD}${_DBG} # for regex - wx${LIB}${_DBG} - PATHS ${WX_LIB_DIR} - NO_DEFAULT_PATH - ) - MARK_AS_ADVANCED(WX_${LIB}${_DBG}) - ENDFOREACH(LIB) - - # Find wxWidgets multilib base libraries. - FIND_LIBRARY(WX_base${_DBG} - NAMES - wxbase29${_UCD}${_DBG} - wxbase28${_UCD}${_DBG} - wxbase27${_UCD}${_DBG} - wxbase26${_UCD}${_DBG} - wxbase25${_UCD}${_DBG} - PATHS ${WX_LIB_DIR} - NO_DEFAULT_PATH - ) - MARK_AS_ADVANCED(WX_base${_DBG}) - FOREACH(LIB net odbc xml) - FIND_LIBRARY(WX_${LIB}${_DBG} - NAMES - wxbase29${_UCD}${_DBG}_${LIB} - wxbase28${_UCD}${_DBG}_${LIB} - wxbase27${_UCD}${_DBG}_${LIB} - wxbase26${_UCD}${_DBG}_${LIB} - wxbase25${_UCD}${_DBG}_${LIB} - PATHS ${WX_LIB_DIR} - NO_DEFAULT_PATH - ) - MARK_AS_ADVANCED(WX_${LIB}${_DBG}) - ENDFOREACH(LIB) - - # Find wxWidgets monolithic library. - FIND_LIBRARY(WX_mono${_DBG} - NAMES - wxmsw${_UNV}29${_UCD}${_DBG} - wxmsw${_UNV}28${_UCD}${_DBG} - wxmsw${_UNV}27${_UCD}${_DBG} - wxmsw${_UNV}26${_UCD}${_DBG} - wxmsw${_UNV}25${_UCD}${_DBG} - PATHS ${WX_LIB_DIR} - NO_DEFAULT_PATH - ) - MARK_AS_ADVANCED(WX_mono${_DBG}) - - # Find wxWidgets multilib libraries. - FOREACH(LIB core adv aui html media xrc dbgrid gl qa richtext) - FIND_LIBRARY(WX_${LIB}${_DBG} - NAMES - wxmsw${_UNV}29${_UCD}${_DBG}_${LIB} - wxmsw${_UNV}28${_UCD}${_DBG}_${LIB} - wxmsw${_UNV}27${_UCD}${_DBG}_${LIB} - wxmsw${_UNV}26${_UCD}${_DBG}_${LIB} - wxmsw${_UNV}25${_UCD}${_DBG}_${LIB} - PATHS ${WX_LIB_DIR} - NO_DEFAULT_PATH - ) - MARK_AS_ADVANCED(WX_${LIB}${_DBG}) - ENDFOREACH(LIB) - ENDMACRO(WX_FIND_LIBS) - - # - # Clear all library paths, so that FIND_LIBRARY refinds them. - # - # Clear a lib, reset its found flag, and mark as advanced. - MACRO(WX_CLEAR_LIB _LIB) - SET(${_LIB} "${_LIB}-NOTFOUND" CACHE FILEPATH "Cleared." FORCE) - SET(${_LIB}_FOUND FALSE) - MARK_AS_ADVANCED(${_LIB}) - ENDMACRO(WX_CLEAR_LIB) - # Clear all debug or release library paths (arguments are "d" or ""). - MACRO(WX_CLEAR_ALL_LIBS _DBG) - # Clear wxWidgets common libraries. - FOREACH(LIB ${wxWidgets_COMMON_LIBRARIES}) - WX_CLEAR_LIB(WX_${LIB}${_DBG}) - ENDFOREACH(LIB) - - # Clear wxWidgets multilib base libraries. - WX_CLEAR_LIB(WX_base${_DBG}) - FOREACH(LIB net odbc xml) - WX_CLEAR_LIB(WX_${LIB}${_DBG}) - ENDFOREACH(LIB) - - # Clear wxWidgets monolithic library. - WX_CLEAR_LIB(WX_mono${_DBG}) - - # Clear wxWidgets multilib libraries. - FOREACH(LIB core adv aui html media xrc dbgrid gl qa richtext) - WX_CLEAR_LIB(WX_${LIB}${_DBG}) - ENDFOREACH(LIB) - ENDMACRO(WX_CLEAR_ALL_LIBS) - # Clear all wxWidgets debug libraries. - MACRO(WX_CLEAR_ALL_DBG_LIBS) - WX_CLEAR_ALL_LIBS("d") - ENDMACRO(WX_CLEAR_ALL_DBG_LIBS) - # Clear all wxWidgets release libraries. - MACRO(WX_CLEAR_ALL_REL_LIBS) - WX_CLEAR_ALL_LIBS("") - ENDMACRO(WX_CLEAR_ALL_REL_LIBS) - - # - # Set the wxWidgets_LIBRARIES variable. - # Also, Sets output variable wxWidgets_FOUND to FALSE if it fails. - # - MACRO(WX_SET_LIBRARIES _LIBS _DBG) - DBG_MSG_V("Looking for ${${_LIBS}}") - IF(WX_USE_REL_AND_DBG) - FOREACH(LIB ${${_LIBS}}) - DBG_MSG_V("Searching for ${LIB} and ${LIB}d") - DBG_MSG_V("WX_${LIB} : ${WX_${LIB}}") - DBG_MSG_V("WX_${LIB}d : ${WX_${LIB}d}") - IF(WX_${LIB} AND WX_${LIB}d) - DBG_MSG_V("Found ${LIB} and ${LIB}d") - LIST(APPEND wxWidgets_LIBRARIES - debug ${WX_${LIB}d} optimized ${WX_${LIB}} - ) - ELSE(WX_${LIB} AND WX_${LIB}d) - DBG_MSG_V("- not found due to missing WX_${LIB}=${WX_${LIB}} or WX_${LIB}d=${WX_${LIB}d}") - SET(wxWidgets_FOUND FALSE) - ENDIF(WX_${LIB} AND WX_${LIB}d) - ENDFOREACH(LIB) - ELSE(WX_USE_REL_AND_DBG) - FOREACH(LIB ${${_LIBS}}) - DBG_MSG_V("Searching for ${LIB}${_DBG}") - DBG_MSG_V("WX_${LIB}${_DBG} : ${WX_${LIB}${_DBG}}") - IF(WX_${LIB}${_DBG}) - DBG_MSG_V("Found ${LIB}${_DBG}") - LIST(APPEND wxWidgets_LIBRARIES ${WX_${LIB}${_DBG}}) - ELSE(WX_${LIB}${_DBG}) - DBG_MSG_V( - "- not found due to missing WX_${LIB}${_DBG}=${WX_${LIB}${_DBG}}") - SET(wxWidgets_FOUND FALSE) - ENDIF(WX_${LIB}${_DBG}) - ENDFOREACH(LIB) - ENDIF(WX_USE_REL_AND_DBG) - - DBG_MSG_V("OpenGL") - LIST(FIND ${_LIBS} gl WX_USE_GL) - IF(NOT WX_USE_GL EQUAL -1) - DBG_MSG_V("- is required.") - LIST(APPEND wxWidgets_LIBRARIES opengl32 glu32) - ENDIF(NOT WX_USE_GL EQUAL -1) - - LIST(APPEND wxWidgets_LIBRARIES winmm comctl32 rpcrt4 wsock32) - ENDMACRO(WX_SET_LIBRARIES) - - #------------------------------------------------------------------- - # WIN32: Start actual work. - #------------------------------------------------------------------- - - # Look for an installation tree. - FIND_PATH(wxWidgets_ROOT_DIR - NAMES include/wx/wx.h - PATHS - $ENV{wxWidgets_ROOT_DIR} - $ENV{WXWIN} - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\wxWidgets_is1;Inno Setup: App Path]" # WX 2.6.x - C:/ - D:/ - $ENV{ProgramFiles} - PATH_SUFFIXES - wxWidgets-2.9.4 - wxWidgets-2.9.3 - wxWidgets-2.9.2 - wxWidgets-2.9.1 - wxWidgets-2.9.0 - wxWidgets-2.8.9 - wxWidgets-2.8.8 - wxWidgets-2.8.7 - wxWidgets-2.8.6 - wxWidgets-2.8.5 - wxWidgets-2.8.4 - wxWidgets-2.8.3 - wxWidgets-2.8.2 - wxWidgets-2.8.1 - wxWidgets-2.8.0 - wxWidgets-2.7.4 - wxWidgets-2.7.3 - wxWidgets-2.7.2 - wxWidgets-2.7.1 - wxWidgets-2.7.0 - wxWidgets-2.7.0-1 - wxWidgets-2.6.4 - wxWidgets-2.6.3 - wxWidgets-2.6.2 - wxWidgets-2.6.1 - wxWidgets-2.5.4 - wxWidgets-2.5.3 - wxWidgets-2.5.2 - wxWidgets-2.5.1 - wxWidgets - DOC "wxWidgets base/installation directory?" - ) - - # If wxWidgets_ROOT_DIR changed, clear lib dir. - IF(NOT WX_ROOT_DIR STREQUAL wxWidgets_ROOT_DIR) - SET(WX_ROOT_DIR ${wxWidgets_ROOT_DIR} - CACHE INTERNAL "wxWidgets_ROOT_DIR") - SET(wxWidgets_LIB_DIR "wxWidgets_LIB_DIR-NOTFOUND" - CACHE PATH "Cleared." FORCE) - ENDIF(NOT WX_ROOT_DIR STREQUAL wxWidgets_ROOT_DIR) - - IF(WX_ROOT_DIR) - # Select one default tree inside the already determined wx tree. - # Prefer static/shared order usually consistent with build - # settings. - IF(MINGW) - SET(WX_LIB_DIR_PREFIX gcc) - ELSE(MINGW) - SET(WX_LIB_DIR_PREFIX vc) - ENDIF(MINGW) - IF(BUILD_SHARED_LIBS) - FIND_PATH(wxWidgets_LIB_DIR - NAMES - msw/wx/setup.h - mswd/wx/setup.h - mswu/wx/setup.h - mswud/wx/setup.h - mswuniv/wx/setup.h - mswunivd/wx/setup.h - mswunivu/wx/setup.h - mswunivud/wx/setup.h - PATHS - ${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_dll # prefer shared - ${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_lib - DOC "Path to wxWidgets libraries?" - NO_DEFAULT_PATH - ) - ELSE(BUILD_SHARED_LIBS) - FIND_PATH(wxWidgets_LIB_DIR - NAMES - msw/wx/setup.h - mswd/wx/setup.h - mswu/wx/setup.h - mswud/wx/setup.h - mswuniv/wx/setup.h - mswunivd/wx/setup.h - mswunivu/wx/setup.h - mswunivud/wx/setup.h - PATHS - ${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_lib # prefer static - ${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_dll - DOC "Path to wxWidgets libraries?" - NO_DEFAULT_PATH - ) - ENDIF(BUILD_SHARED_LIBS) - - # If wxWidgets_LIB_DIR changed, clear all libraries. - IF(NOT WX_LIB_DIR STREQUAL wxWidgets_LIB_DIR) - SET(WX_LIB_DIR ${wxWidgets_LIB_DIR} CACHE INTERNAL "wxWidgets_LIB_DIR") - WX_CLEAR_ALL_DBG_LIBS() - WX_CLEAR_ALL_REL_LIBS() - ENDIF(NOT WX_LIB_DIR STREQUAL wxWidgets_LIB_DIR) - - IF(WX_LIB_DIR) - # If building shared libs, define WXUSINGDLL to use dllimport. - IF(WX_LIB_DIR MATCHES ".*[dD][lL][lL].*") - SET(wxWidgets_DEFINITIONS WXUSINGDLL) - DBG_MSG_V("detected SHARED/DLL tree WX_LIB_DIR=${WX_LIB_DIR}") - ENDIF(WX_LIB_DIR MATCHES ".*[dD][lL][lL].*") - - # Search for available configuration types. - FOREACH(CFG mswunivud mswunivd mswud mswd mswunivu mswuniv mswu msw) - SET(WX_${CFG}_FOUND FALSE) - IF(EXISTS ${WX_LIB_DIR}/${CFG}) - LIST(APPEND WX_CONFIGURATION_LIST ${CFG}) - SET(WX_${CFG}_FOUND TRUE) - SET(WX_CONFIGURATION ${CFG}) - ENDIF(EXISTS ${WX_LIB_DIR}/${CFG}) - ENDFOREACH(CFG) - DBG_MSG_V("WX_CONFIGURATION_LIST=${WX_CONFIGURATION_LIST}") - - IF(WX_CONFIGURATION) - SET(wxWidgets_FOUND TRUE) - - # If the selected configuration wasn't found force the default - # one. Otherwise, use it but still force a refresh for - # updating the doc string with the current list of available - # configurations. - IF(NOT WX_${wxWidgets_CONFIGURATION}_FOUND) - SET(wxWidgets_CONFIGURATION ${WX_CONFIGURATION} CACHE STRING - "Set wxWidgets configuration (${WX_CONFIGURATION_LIST})" FORCE) - ELSE(NOT WX_${wxWidgets_CONFIGURATION}_FOUND) - SET(wxWidgets_CONFIGURATION ${wxWidgets_CONFIGURATION} CACHE STRING - "Set wxWidgets configuration (${WX_CONFIGURATION_LIST})" FORCE) - ENDIF(NOT WX_${wxWidgets_CONFIGURATION}_FOUND) - - # If release config selected, and both release/debug exist. - IF(WX_${wxWidgets_CONFIGURATION}d_FOUND) - OPTION(wxWidgets_USE_REL_AND_DBG - "Use release and debug configurations?" TRUE) - SET(WX_USE_REL_AND_DBG ${wxWidgets_USE_REL_AND_DBG}) - ELSE(WX_${wxWidgets_CONFIGURATION}d_FOUND) - # If the option exists (already in cache), force it false. - IF(wxWidgets_USE_REL_AND_DBG) - SET(wxWidgets_USE_REL_AND_DBG FALSE CACHE BOOL - "No ${wxWidgets_CONFIGURATION}d found." FORCE) - ENDIF(wxWidgets_USE_REL_AND_DBG) - SET(WX_USE_REL_AND_DBG FALSE) - ENDIF(WX_${wxWidgets_CONFIGURATION}d_FOUND) - - # Get configuration parameters from the name. - WX_GET_NAME_COMPONENTS(${wxWidgets_CONFIGURATION} UNV UCD DBG) - - # Set wxWidgets main include directory. - IF(EXISTS ${WX_ROOT_DIR}/include/wx/wx.h) - SET(wxWidgets_INCLUDE_DIRS ${WX_ROOT_DIR}/include) - ELSE(EXISTS ${WX_ROOT_DIR}/include/wx/wx.h) - DBG_MSG("wxWidgets_FOUND FALSE because WX_ROOT_DIR=${WX_ROOT_DIR} has no ${WX_ROOT_DIR}/include/wx/wx.h") - SET(wxWidgets_FOUND FALSE) - ENDIF(EXISTS ${WX_ROOT_DIR}/include/wx/wx.h) - - # Set wxWidgets lib setup include directory. - IF(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h) - LIST(APPEND wxWidgets_INCLUDE_DIRS - ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}) - ELSE(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h) - DBG_MSG("WXWIDGET_FOUND FALSE because ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h does not exists.") - SET(wxWidgets_FOUND FALSE) - ENDIF(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h) - - # Find wxWidgets libraries. - WX_FIND_LIBS("${UNV}" "${UCD}" "${DBG}") - IF(WX_USE_REL_AND_DBG) - WX_FIND_LIBS("${UNV}" "${UCD}" "d") - ENDIF(WX_USE_REL_AND_DBG) - - # Settings for requested libs (i.e., include dir, libraries, etc.). - WX_SET_LIBRARIES(wxWidgets_FIND_COMPONENTS "${DBG}") - - # Add necessary definitions for unicode builds - IF("${UCD}" STREQUAL "u") - LIST(APPEND wxWidgets_DEFINITIONS UNICODE _UNICODE) - ENDIF("${UCD}" STREQUAL "u") - - # Add necessary definitions for debug builds - SET(wxWidgets_DEFINITIONS_DEBUG _DEBUG __WXDEBUG__) - - ENDIF(WX_CONFIGURATION) - ENDIF(WX_LIB_DIR) - ENDIF(WX_ROOT_DIR) - -#===================================================================== -# UNIX_FIND_STYLE -#===================================================================== -ELSE(wxWidgets_FIND_STYLE STREQUAL "win32") - IF(wxWidgets_FIND_STYLE STREQUAL "unix") - #----------------------------------------------------------------- - # UNIX: Helper MACROS - #----------------------------------------------------------------- - # - # Set the default values based on "wx-config --selected-config". - # - MACRO(WX_CONFIG_SELECT_GET_DEFAULT) - EXECUTE_PROCESS( - COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}" --selected-config - OUTPUT_VARIABLE _wx_selected_config - RESULT_VARIABLE _wx_result - ERROR_QUIET - ) - IF(_wx_result EQUAL 0) - FOREACH(_opt_name debug static unicode universal) - STRING(TOUPPER ${_opt_name} _upper_opt_name) - IF(_wx_selected_config MATCHES ".*${_opt_name}.*") - SET(wxWidgets_DEFAULT_${_upper_opt_name} ON) - ELSE(_wx_selected_config MATCHES ".*${_opt_name}.*") - SET(wxWidgets_DEFAULT_${_upper_opt_name} OFF) - ENDIF(_wx_selected_config MATCHES ".*${_opt_name}.*") - ENDFOREACH(_opt_name) - ELSE(_wx_result EQUAL 0) - FOREACH(_upper_opt_name DEBUG STATIC UNICODE UNIVERSAL) - SET(wxWidgets_DEFAULT_${_upper_opt_name} OFF) - ENDFOREACH(_upper_opt_name) - ENDIF(_wx_result EQUAL 0) - ENDMACRO(WX_CONFIG_SELECT_GET_DEFAULT) - - # - # Query a boolean configuration option to determine if the system - # has both builds available. If so, provide the selection option - # to the user. - # - MACRO(WX_CONFIG_SELECT_QUERY_BOOL _OPT_NAME _OPT_HELP) - EXECUTE_PROCESS( - COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}" --${_OPT_NAME}=yes - RESULT_VARIABLE _wx_result_yes - OUTPUT_QUIET - ERROR_QUIET - ) - EXECUTE_PROCESS( - COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}" --${_OPT_NAME}=no - RESULT_VARIABLE _wx_result_no - OUTPUT_QUIET - ERROR_QUIET - ) - STRING(TOUPPER ${_OPT_NAME} _UPPER_OPT_NAME) - IF(_wx_result_yes EQUAL 0 AND _wx_result_no EQUAL 0) - OPTION(wxWidgets_USE_${_UPPER_OPT_NAME} - ${_OPT_HELP} ${wxWidgets_DEFAULT_${_UPPER_OPT_NAME}}) - ELSE(_wx_result_yes EQUAL 0 AND _wx_result_no EQUAL 0) - # If option exists (already in cache), force to available one. - IF(DEFINED wxWidgets_USE_${_UPPER_OPT_NAME}) - IF(_wx_result_yes EQUAL 0) - SET(wxWidgets_USE_${_UPPER_OPT_NAME} ON CACHE BOOL ${_OPT_HELP} FORCE) - ELSE(_wx_result_yes EQUAL 0) - SET(wxWidgets_USE_${_UPPER_OPT_NAME} OFF CACHE BOOL ${_OPT_HELP} FORCE) - ENDIF(_wx_result_yes EQUAL 0) - ENDIF(DEFINED wxWidgets_USE_${_UPPER_OPT_NAME}) - ENDIF(_wx_result_yes EQUAL 0 AND _wx_result_no EQUAL 0) - ENDMACRO(WX_CONFIG_SELECT_QUERY_BOOL) - - # - # Set wxWidgets_SELECT_OPTIONS to wx-config options for selecting - # among multiple builds. - # - MACRO(WX_CONFIG_SELECT_SET_OPTIONS) - SET(wxWidgets_SELECT_OPTIONS "") - FOREACH(_opt_name debug static unicode universal) - STRING(TOUPPER ${_opt_name} _upper_opt_name) - IF(DEFINED wxWidgets_USE_${_upper_opt_name}) - IF(wxWidgets_USE_${_upper_opt_name}) - LIST(APPEND wxWidgets_SELECT_OPTIONS --${_opt_name}=yes) - ELSE(wxWidgets_USE_${_upper_opt_name}) - LIST(APPEND wxWidgets_SELECT_OPTIONS --${_opt_name}=no) - ENDIF(wxWidgets_USE_${_upper_opt_name}) - ENDIF(DEFINED wxWidgets_USE_${_upper_opt_name}) - ENDFOREACH(_opt_name) - ENDMACRO(WX_CONFIG_SELECT_SET_OPTIONS) - - #----------------------------------------------------------------- - # UNIX: Start actual work. - #----------------------------------------------------------------- - # Support cross-compiling, only search in the target platform. - FIND_PROGRAM(wxWidgets_CONFIG_EXECUTABLE wx-config - ONLY_CMAKE_FIND_ROOT_PATH - ) - - IF(wxWidgets_CONFIG_EXECUTABLE) - SET(wxWidgets_FOUND TRUE) - - # get defaults based on "wx-config --selected-config" - WX_CONFIG_SELECT_GET_DEFAULT() - - # for each option: if both builds are available, provide option - WX_CONFIG_SELECT_QUERY_BOOL(debug "Use debug build?") - WX_CONFIG_SELECT_QUERY_BOOL(unicode "Use unicode build?") - WX_CONFIG_SELECT_QUERY_BOOL(universal "Use universal build?") - WX_CONFIG_SELECT_QUERY_BOOL(static "Link libraries statically?") - - # process selection to set wxWidgets_SELECT_OPTIONS - WX_CONFIG_SELECT_SET_OPTIONS() - DBG_MSG("wxWidgets_SELECT_OPTIONS=${wxWidgets_SELECT_OPTIONS}") - - # run the wx-config program to get cxxflags - EXECUTE_PROCESS( - COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}" - ${wxWidgets_SELECT_OPTIONS} --cxxflags - OUTPUT_VARIABLE wxWidgets_CXX_FLAGS - RESULT_VARIABLE RET - ERROR_QUIET - ) - IF(RET EQUAL 0) - STRING(STRIP "${wxWidgets_CXX_FLAGS}" wxWidgets_CXX_FLAGS) - SEPARATE_ARGUMENTS(wxWidgets_CXX_FLAGS) - - DBG_MSG_V("wxWidgets_CXX_FLAGS=${wxWidgets_CXX_FLAGS}") - - # parse definitions from cxxflags; drop -D* from CXXFLAGS and the -D prefix - STRING(REGEX MATCHALL "-D[^;]+" - wxWidgets_DEFINITIONS "${wxWidgets_CXX_FLAGS}") - STRING(REGEX REPLACE "-D[^;]+;" "" - wxWidgets_CXX_FLAGS "${wxWidgets_CXX_FLAGS}") - STRING(REPLACE "-D" "" - wxWidgets_DEFINITIONS "${wxWidgets_DEFINITIONS}") - - # parse include dirs from cxxflags; drop -I prefix - STRING(REGEX MATCHALL "-I[^;]+" - wxWidgets_INCLUDE_DIRS "${wxWidgets_CXX_FLAGS}") - STRING(REGEX REPLACE "-I[^;]+;" "" - wxWidgets_CXX_FLAGS "${wxWidgets_CXX_FLAGS}") - STRING(REPLACE "-I" "" - wxWidgets_INCLUDE_DIRS "${wxWidgets_INCLUDE_DIRS}") - - DBG_MSG_V("wxWidgets_DEFINITIONS=${wxWidgets_DEFINITIONS}") - DBG_MSG_V("wxWidgets_INCLUDE_DIRS=${wxWidgets_INCLUDE_DIRS}") - DBG_MSG_V("wxWidgets_CXX_FLAGS=${wxWidgets_CXX_FLAGS}") - - ELSE(RET EQUAL 0) - SET(wxWidgets_FOUND FALSE) - DBG_MSG_V( - "${wxWidgets_CONFIG_EXECUTABLE} --cxxflags FAILED with RET=${RET}") - ENDIF(RET EQUAL 0) - - # run the wx-config program to get the libs - # - NOTE: wx-config doesn't verify that the libs requested exist - # it just produces the names. Maybe a TRY_COMPILE would - # be useful here... - STRING(REPLACE ";" "," - wxWidgets_FIND_COMPONENTS "${wxWidgets_FIND_COMPONENTS}") - EXECUTE_PROCESS( - COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}" - ${wxWidgets_SELECT_OPTIONS} --libs ${wxWidgets_FIND_COMPONENTS} - OUTPUT_VARIABLE wxWidgets_LIBRARIES - RESULT_VARIABLE RET - ERROR_QUIET - ) - IF(RET EQUAL 0) - STRING(STRIP "${wxWidgets_LIBRARIES}" wxWidgets_LIBRARIES) - SEPARATE_ARGUMENTS(wxWidgets_LIBRARIES) - STRING(REPLACE "-framework;" "-framework " - wxWidgets_LIBRARIES "${wxWidgets_LIBRARIES}") - STRING(REPLACE "-arch;" "-arch " - wxWidgets_LIBRARIES "${wxWidgets_LIBRARIES}") - STRING(REPLACE "-isysroot;" "-isysroot " - wxWidgets_LIBRARIES "${wxWidgets_LIBRARIES}") - - # extract linkdirs (-L) for rpath (i.e., LINK_DIRECTORIES) - STRING(REGEX MATCHALL "-L[^;]+" - wxWidgets_LIBRARY_DIRS "${wxWidgets_LIBRARIES}") - STRING(REPLACE "-L" "" - wxWidgets_LIBRARY_DIRS "${wxWidgets_LIBRARY_DIRS}") - - DBG_MSG_V("wxWidgets_LIBRARIES=${wxWidgets_LIBRARIES}") - DBG_MSG_V("wxWidgets_LIBRARY_DIRS=${wxWidgets_LIBRARY_DIRS}") - - ELSE(RET EQUAL 0) - SET(wxWidgets_FOUND FALSE) - DBG_MSG("${wxWidgets_CONFIG_EXECUTABLE} --libs ${wxWidgets_FIND_COMPONENTS} FAILED with RET=${RET}") - ENDIF(RET EQUAL 0) - ENDIF(wxWidgets_CONFIG_EXECUTABLE) - -#===================================================================== -# Neither UNIX_FIND_STYLE, nor WIN32_FIND_STYLE -#===================================================================== - ELSE(wxWidgets_FIND_STYLE STREQUAL "unix") - IF(NOT wxWidgets_FIND_QUIETLY) - MESSAGE(STATUS - "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): \n" - " Platform unknown/unsupported. It's neither WIN32 nor UNIX " - "find style." - ) - ENDIF(NOT wxWidgets_FIND_QUIETLY) - ENDIF(wxWidgets_FIND_STYLE STREQUAL "unix") -ENDIF(wxWidgets_FIND_STYLE STREQUAL "win32") - -# Debug output: -DBG_MSG("wxWidgets_FOUND : ${wxWidgets_FOUND}") -DBG_MSG("wxWidgets_INCLUDE_DIRS : ${wxWidgets_INCLUDE_DIRS}") -DBG_MSG("wxWidgets_LIBRARY_DIRS : ${wxWidgets_LIBRARY_DIRS}") -DBG_MSG("wxWidgets_LIBRARIES : ${wxWidgets_LIBRARIES}") -DBG_MSG("wxWidgets_CXX_FLAGS : ${wxWidgets_CXX_FLAGS}") -DBG_MSG("wxWidgets_USE_FILE : ${wxWidgets_USE_FILE}") - -#===================================================================== -#===================================================================== -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(wxWidgets DEFAULT_MSG wxWidgets_FOUND) -# Maintain consistency with all other variables. -SET(wxWidgets_FOUND ${WXWIDGETS_FOUND}) - -#===================================================================== -# Macros for use in wxWidgets apps. -# - This module will not fail to find wxWidgets based on the code -# below. Hence, it's required to check for validity of: -# -# wxWidgets_wxrc_EXECUTABLE -#===================================================================== - -# Resource file compiler. -FIND_PROGRAM(wxWidgets_wxrc_EXECUTABLE wxrc - ${wxWidgets_ROOT_DIR}/utils/wxrc/vc_msw - ) - -# -# WX_SPLIT_ARGUMENTS_ON(<keyword> <left> <right> <arg1> <arg2> ...) -# -# Sets <left> and <right> to contain arguments to the left and right, -# respectively, of <keyword>. -# -# Example usage: -# FUNCTION(WXWIDGETS_ADD_RESOURCES outfiles) -# WX_SPLIT_ARGUMENTS_ON(OPTIONS wxrc_files wxrc_options ${ARGN}) -# ... -# ENDFUNCTION(WXWIDGETS_ADD_RESOURCES) -# -# WXWIDGETS_ADD_RESOURCES(sources ${xrc_files} OPTIONS -e -o file.C) -# -# NOTE: This is a generic piece of code that should be renamed to -# SPLIT_ARGUMENTS_ON and put in a file serving the same purpose as -# FindPackageStandardArgs.cmake. At the time of this writing -# FindQt4.cmake has a QT4_EXTRACT_OPTIONS, which I basically copied -# here a bit more generalized. So, there are already two find modules -# using this approach. -# -FUNCTION(WX_SPLIT_ARGUMENTS_ON _keyword _leftvar _rightvar) - # FIXME: Document that the input variables will be cleared. - #LIST(APPEND ${_leftvar} "") - #LIST(APPEND ${_rightvar} "") - SET(${_leftvar} "") - SET(${_rightvar} "") - - SET(_doing_right FALSE) - FOREACH(element ${ARGN}) - IF("${element}" STREQUAL "${_keyword}") - SET(_doing_right TRUE) - ELSE("${element}" STREQUAL "${_keyword}") - IF(_doing_right) - LIST(APPEND ${_rightvar} "${element}") - ELSE(_doing_right) - LIST(APPEND ${_leftvar} "${element}") - ENDIF(_doing_right) - ENDIF("${element}" STREQUAL "${_keyword}") - ENDFOREACH(element) - - SET(${_leftvar} ${${_leftvar}} PARENT_SCOPE) - SET(${_rightvar} ${${_rightvar}} PARENT_SCOPE) -ENDFUNCTION(WX_SPLIT_ARGUMENTS_ON) - -# -# WX_GET_DEPENDENCIES_FROM_XML( -# <depends> -# <match_pattern> -# <clean_pattern> -# <xml_contents> -# <depends_path> -# ) -# -# FIXME: Add documentation here... -# -FUNCTION(WX_GET_DEPENDENCIES_FROM_XML - _depends - _match_patt - _clean_patt - _xml_contents - _depends_path - ) - - STRING(REGEX MATCHALL - ${_match_patt} - dep_file_list - "${${_xml_contents}}" - ) - FOREACH(dep_file ${dep_file_list}) - STRING(REGEX REPLACE ${_clean_patt} "" dep_file "${dep_file}") - - # make the file have an absolute path - IF(NOT IS_ABSOLUTE "${dep_file}") - SET(dep_file "${${_depends_path}}/${dep_file}") - ENDIF(NOT IS_ABSOLUTE "${dep_file}") - - # append file to dependency list - LIST(APPEND ${_depends} "${dep_file}") - ENDFOREACH(dep_file) - - SET(${_depends} ${${_depends}} PARENT_SCOPE) -ENDFUNCTION(WX_GET_DEPENDENCIES_FROM_XML) - -# -# WXWIDGETS_ADD_RESOURCES(<sources> <xrc_files> -# OPTIONS <options> [NO_CPP_CODE]) -# -# Adds a custom command for resource file compilation of the -# <xrc_files> and appends the output files to <sources>. -# -# Example usages: -# WXWIDGETS_ADD_RESOURCES(sources xrc/main_frame.xrc) -# WXWIDGETS_ADD_RESOURCES(sources ${xrc_files} OPTIONS -e -o altname.cxx) -# -FUNCTION(WXWIDGETS_ADD_RESOURCES _outfiles) - WX_SPLIT_ARGUMENTS_ON(OPTIONS rc_file_list rc_options ${ARGN}) - - # Parse files for dependencies. - SET(rc_file_list_abs "") - SET(rc_depends "") - FOREACH(rc_file ${rc_file_list}) - GET_FILENAME_COMPONENT(depends_path ${rc_file} PATH) - - GET_FILENAME_COMPONENT(rc_file_abs ${rc_file} ABSOLUTE) - LIST(APPEND rc_file_list_abs "${rc_file_abs}") - - # All files have absolute paths or paths relative to the location - # of the rc file. - FILE(READ "${rc_file_abs}" rc_file_contents) - - # get bitmap/bitmap2 files - WX_GET_DEPENDENCIES_FROM_XML( - rc_depends - "<bitmap[^<]+" - "^<bitmap[^>]*>" - rc_file_contents - depends_path - ) - - # get url files - WX_GET_DEPENDENCIES_FROM_XML( - rc_depends - "<url[^<]+" - "^<url[^>]*>" - rc_file_contents - depends_path - ) - - # get wxIcon files - WX_GET_DEPENDENCIES_FROM_XML( - rc_depends - "<object[^>]*class=\"wxIcon\"[^<]+" - "^<object[^>]*>" - rc_file_contents - depends_path - ) - ENDFOREACH(rc_file) - - # - # Parse options. - # - # If NO_CPP_CODE option specified, then produce .xrs file rather - # than a .cpp file (i.e., don't add the default --cpp-code option). - LIST(FIND rc_options NO_CPP_CODE index) - IF(index EQUAL -1) - LIST(APPEND rc_options --cpp-code) - # wxrc's default output filename for cpp code. - SET(outfile resource.cpp) - ELSE(index EQUAL -1) - LIST(REMOVE_AT rc_options ${index}) - # wxrc's default output filename for xrs file. - SET(outfile resource.xrs) - ENDIF(index EQUAL -1) - - # Get output name for use in ADD_CUSTOM_COMMAND. - # - short option scanning - LIST(FIND rc_options -o index) - IF(NOT index EQUAL -1) - MATH(EXPR filename_index "${index} + 1") - LIST(GET rc_options ${filename_index} outfile) - #LIST(REMOVE_AT rc_options ${index} ${filename_index}) - ENDIF(NOT index EQUAL -1) - # - long option scanning - STRING(REGEX MATCH "--output=[^;]*" outfile_opt "${rc_options}") - IF(outfile_opt) - STRING(REPLACE "--output=" "" outfile "${outfile_opt}") - ENDIF(outfile_opt) - #STRING(REGEX REPLACE "--output=[^;]*;?" "" rc_options "${rc_options}") - #STRING(REGEX REPLACE ";$" "" rc_options "${rc_options}") - - IF(NOT IS_ABSOLUTE "${outfile}") - SET(outfile "${CMAKE_CURRENT_BINARY_DIR}/${outfile}") - ENDIF(NOT IS_ABSOLUTE "${outfile}") - ADD_CUSTOM_COMMAND( - OUTPUT "${outfile}" - COMMAND ${wxWidgets_wxrc_EXECUTABLE} ${rc_options} ${rc_file_list_abs} - DEPENDS ${rc_file_list_abs} ${rc_depends} - ) - - # Add generated header to output file list. - LIST(FIND rc_options -e short_index) - LIST(FIND rc_options --extra-cpp-code long_index) - IF(NOT short_index EQUAL -1 OR NOT long_index EQUAL -1) - GET_FILENAME_COMPONENT(outfile_ext ${outfile} EXT) - STRING(REPLACE "${outfile_ext}" ".h" outfile_header "${outfile}") - LIST(APPEND ${_outfiles} "${outfile_header}") - SET_SOURCE_FILES_PROPERTIES( - "${outfile_header}" PROPERTIES GENERATED TRUE - ) - ENDIF(NOT short_index EQUAL -1 OR NOT long_index EQUAL -1) - - # Add generated file to output file list. - LIST(APPEND ${_outfiles} "${outfile}") - - SET(${_outfiles} ${${_outfiles}} PARENT_SCOPE) -ENDFUNCTION(WXWIDGETS_ADD_RESOURCES) Modified: trunk/examples/CMakeLists.txt =================================================================== --- trunk/examples/CMakeLists.txt 2011-11-29 02:29:30 UTC (rev 12066) +++ trunk/examples/CMakeLists.txt 2011-11-29 06:33:04 UTC (rev 12067) @@ -302,7 +302,6 @@ # pkg-config support for CMake-based build system for installed examples. install(FILES ${CMAKE_SOURCE_DIR}/cmake/modules/pkg-config.cmake - ${CMAKE_SOURCE_DIR}/cmake/modules/FindPkgConfig.cmake DESTINATION ${DATA_DIR}/examples/cmake/modules ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2011-11-29 22:47:50
|
Revision: 12069 http://plplot.svn.sourceforge.net/plplot/?rev=12069&view=rev Author: airwin Date: 2011-11-29 22:47:37 +0000 (Tue, 29 Nov 2011) Log Message: ----------- Remove CMake-2.6 logic from our build system(s) since the minimum version of CMake we allow is 2.8.2 for Linux and 2.8.6 for all other platforms. These changes are intrusive, but they have been successfully tested with the four tests (test_noninteractive for the three different trees and ctest for the shared build case) given by scripts/comprehensive_test.sh --do_test_interactive no \ --do_nondynamic no --do_static no The remaining 17 tests (test_interactive for the three different trees for the shared library case and all 7 tests for both the nondynamic and static build cases) should be orthogonal to the above changes so the four tests above should have adequate coverage of these changes. Modified Paths: -------------- trunk/CMakeLists.txt trunk/cmake/modules/language_support.cmake trunk/examples/CMakeLists.txt trunk/plplot_test/CMakeLists.txt Removed Paths: ------------- trunk/cmake/modules/language_support/cmake-2.6/ Modified: trunk/CMakeLists.txt =================================================================== --- trunk/CMakeLists.txt 2011-11-29 21:03:33 UTC (rev 12068) +++ trunk/CMakeLists.txt 2011-11-29 22:47:37 UTC (rev 12069) @@ -65,19 +65,11 @@ set(PACKAGE plplot) # Locations where PLplot cmake build system first looks for cmake modules. -if(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 6) - set(CMAKE_MODULE_PATH - ${PROJECT_SOURCE_DIR}/cmake/modules - ${PROJECT_SOURCE_DIR}/cmake/modules/language_support/cmake - ${PROJECT_SOURCE_DIR}/cmake/modules/language_support/cmake-2.6 - ) -else(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 6) - set(CMAKE_MODULE_PATH - ${PROJECT_SOURCE_DIR}/cmake/modules - ${PROJECT_SOURCE_DIR}/cmake/modules/language_support/cmake - ${PROJECT_SOURCE_DIR}/cmake/modules/language_support/cmake-2.8 - ) -endif(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 6) +set(CMAKE_MODULE_PATH + ${PROJECT_SOURCE_DIR}/cmake/modules + ${PROJECT_SOURCE_DIR}/cmake/modules/language_support/cmake + ${PROJECT_SOURCE_DIR}/cmake/modules/language_support/cmake-2.8 + ) # We need the path to the MinGW/Borland compiler in order to find # the import libraries for system libraries. Modified: trunk/cmake/modules/language_support.cmake =================================================================== --- trunk/cmake/modules/language_support.cmake 2011-11-29 21:03:33 UTC (rev 12068) +++ trunk/cmake/modules/language_support.cmake 2011-11-29 22:47:37 UTC (rev 12069) @@ -14,20 +14,27 @@ set(text "project(test C) # Locations where PLplot cmake build system first looks for cmake modules. -if(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 6) - set(CMAKE_MODULE_PATH - ${PROJECT_SOURCE_DIR}/cmake/modules - ${PROJECT_SOURCE_DIR}/cmake/modules/language_support/cmake - ${PROJECT_SOURCE_DIR}/cmake/modules/language_support/cmake-2.6 +set(CMAKE_MODULE_PATH + ${PROJECT_SOURCE_DIR}/cmake/modules + ${PROJECT_SOURCE_DIR}/cmake/modules/language_support/cmake + ${PROJECT_SOURCE_DIR}/cmake/modules/language_support/cmake-2.8 ) -else(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 6) - set(CMAKE_MODULE_PATH - ${PROJECT_SOURCE_DIR}/cmake/modules - ${PROJECT_SOURCE_DIR}/cmake/modules/language_support/cmake - ${PROJECT_SOURCE_DIR}/cmake/modules/language_support/cmake-2.8 - ) -endif(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 6) -cmake_minimum_required(VERSION 2.6.0) +if(CMAKE_SYSTEM_NAME STREQUAL \"Linux\") + # We prefer to support only the latest CMake version because it + # tends to be more free of issues and more consistent with recent + # software releases of software that PLplot depends on than earlier versions. + # However, as a special concession to our modern (not enterprise or + # LTS) Linux distro users so they can avoid a download of recent CMake, + # we allow them to use the system version of + # CMake which at this time (2011-10) is typically 2.8.2 or later. + cmake_minimum_required(VERSION 2.8.2 FATAL_ERROR) +else(CMAKE_SYSTEM_NAME STREQUAL \"Linux\") + # For non-Linux platforms we prefer to support only the most recent + # CMake version since that tends to be most free of issues and most + # consistent with releases of software that PLplot depends on. The + # most recently released CMake is 2.8.6 at this time (2011-10). + cmake_minimum_required(VERSION 2.8.6 FATAL_ERROR) +endif(CMAKE_SYSTEM_NAME STREQUAL \"Linux\") message(STATUS \"CMAKE_GENERATOR = ${CMAKE_GENERATOR}\") #enable_language(${language} OPTIONAL) enable_language(${language}) @@ -62,18 +69,7 @@ language_support/cmake/Platform/Windows-gdc.cmake ) elseif(language STREQUAL "Fortran") - if(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 6) - set(language_special ON) - set(language_files - language_support/cmake-2.6/CMakeFortranInformation.cmake - language_support/cmake-2.6/Platform/Cygwin-GNU-Fortran.cmake - language_support/cmake-2.6/Platform/Windows-GNU-Fortran.cmake - language_support/cmake-2.6/Platform/Windows-df.cmake - language_support/cmake-2.6/Platform/Windows-f90.cmake - ) - else(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 6) - set(language_special OFF) - endif(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 6) + set(language_special OFF) else(language STREQUAL "Ada") set(language_special OFF) endif(language STREQUAL "Ada") @@ -129,5 +125,3 @@ #message("Java_language_works = ${Java_language_works}") # Just to terminate temporary test for convenience. #message(FATAL_ERROR "") - - Modified: trunk/examples/CMakeLists.txt =================================================================== --- trunk/examples/CMakeLists.txt 2011-11-29 21:03:33 UTC (rev 12068) +++ trunk/examples/CMakeLists.txt 2011-11-29 22:47:37 UTC (rev 12069) @@ -182,15 +182,15 @@ endif(NOT PLD_pdfqt) if(FORCE_EXTERNAL_STATIC) - # This experiment option untested, but it should work as well as - # FORCE_EXTERNAL_STATIC does for the CMake linking case for the - # core build in the build tree. That is, not well at all (drivers - # limited to those without external dependencies and languages limited - # to C, C++, D, Fortran 77, and Fortran 95) because - # of severe limitations in static library support on Linux. + # This experiment option untested, but it should work as well as + # FORCE_EXTERNAL_STATIC does for the CMake linking case for the + # core build in the build tree. That is, not well at all (drivers + # limited to those without external dependencies and languages limited + # to C, C++, D, Fortran 77, and Fortran 95) because + # of severe limitations in static library support on Linux. - # pkg-config does use --static option for traditional installed examples build. - set(PC_STATIC_OPTION "--static") + # pkg-config does use --static option for traditional installed examples build. + set(PC_STATIC_OPTION "--static") else(FORCE_EXTERNAL_STATIC) # pkg-config does not use --static option for traditional installed examples build. set(PC_STATIC_OPTION) @@ -340,18 +340,6 @@ ) endif(ENABLE_d) - if(ENABLE_f77 OR ENABLE_f95) - if(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 6) - set(LANG_SUPPORT_FILES ${LANG_SUPPORT_FILES} - language_support/cmake-2.6:CMakeFortranInformation.cmake - language_support/cmake-2.6/Platform:Cygwin-GNU-Fortran.cmake - language_support/cmake-2.6/Platform:Windows-GNU-Fortran.cmake - language_support/cmake-2.6/Platform:Windows-df.cmake - language_support/cmake-2.6/Platform:Windows-f90.cmake - ) - endif(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 6) - endif(ENABLE_f77 OR ENABLE_f95) - if(LANG_SUPPORT_FILES) foreach(LANG_SUPPORT_info ${LANG_SUPPORT_FILES}) string(REGEX REPLACE "^(.*):.*$" "\\1" LANG_SUPPORT_DIR ${LANG_SUPPORT_info}) @@ -366,21 +354,29 @@ else(CORE_BUILD) project(installed_plplot_examples NONE) - CMAKE_MINIMUM_REQUIRED(VERSION 2.6.4 FATAL_ERROR) + if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + # We prefer to support only the latest CMake version because it + # tends to be more free of issues and more consistent with recent + # software releases of software that PLplot depends on than earlier versions. + # However, as a special concession to our modern (not enterprise or + # LTS) Linux distro users so they can avoid a download of recent CMake, + # we allow them to use the system version of + # CMake which at this time (2011-10) is typically 2.8.2 or later. + cmake_minimum_required(VERSION 2.8.2 FATAL_ERROR) + else(CMAKE_SYSTEM_NAME STREQUAL "Linux") + # For non-Linux platforms we prefer to support only the most recent + # CMake version since that tends to be most free of issues and most + # consistent with releases of software that PLplot depends on. The + # most recently released CMake is 2.8.6 at this time (2011-10). + cmake_minimum_required(VERSION 2.8.6 FATAL_ERROR) + endif(CMAKE_SYSTEM_NAME STREQUAL "Linux") + # Locations where PLplot cmake build system first looks for cmake modules. - if(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 6) - set(CMAKE_MODULE_PATH - ${PROJECT_SOURCE_DIR}/cmake/modules - ${PROJECT_SOURCE_DIR}/cmake/modules/language_support/cmake - ${PROJECT_SOURCE_DIR}/cmake/modules/language_support/cmake-2.6 - ) - else(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 6) - set(CMAKE_MODULE_PATH - ${PROJECT_SOURCE_DIR}/cmake/modules - ${PROJECT_SOURCE_DIR}/cmake/modules/language_support/cmake - ${PROJECT_SOURCE_DIR}/cmake/modules/language_support/cmake-2.8 - ) - endif(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 6) + set(CMAKE_MODULE_PATH + ${PROJECT_SOURCE_DIR}/cmake/modules + ${PROJECT_SOURCE_DIR}/cmake/modules/language_support/cmake + ${PROJECT_SOURCE_DIR}/cmake/modules/language_support/cmake-2.8 + ) #Configure variables and enable languages as needed. include(plplot_configure) @@ -566,7 +562,7 @@ ) endif(ENABLE_DYNDRIVERS) #message("DEBUG:file_device_depends_${device} = ${file_device_depends_${device}}") - list_example_files(${CMAKE_CURRENT_BINARY_DIR} ${device} c output_list) + list_example_files(${CMAKE_CURRENT_BINARY_DIR} ${device} c output_list) add_custom_command( OUTPUT ${output_list} COMMAND ${CMAKE_COMMAND} -E echo "Generate C results for ${device} file device" @@ -620,13 +616,13 @@ endif(ENABLE_DYNDRIVERS) if(PLD_extcairo) - add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/ext-cairo-test.ps - COMMAND ext-cairo-test -drvopt set_background=1 - DEPENDS - ext-cairo-test - ${cairo_target} - ) + add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/ext-cairo-test.ps + COMMAND ext-cairo-test -drvopt set_background=1 + DEPENDS + ext-cairo-test + ${cairo_target} + ) add_custom_target(test_extcairo DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/ext-cairo-test.ps ) @@ -899,7 +895,7 @@ add_dependencies(test_tk_01 test_xwin_dyndriver) endif(FILE_DEPENDS_xwin) list(APPEND targets_examples_tk test_tk_01) - + add_custom_target(test_tk_03 COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tk/tk03 DEPENDS ${xwin_target} @@ -995,7 +991,7 @@ endif(FILE_DEPENDS_xwin) list(APPEND targets_examples_tk test_tk_04) endif(ENABLE_itk) - + endif(ENABLE_tk AND PLD_tk) if(targets_examples_tk) Modified: trunk/plplot_test/CMakeLists.txt =================================================================== --- trunk/plplot_test/CMakeLists.txt 2011-11-29 21:03:33 UTC (rev 12068) +++ trunk/plplot_test/CMakeLists.txt 2011-11-29 22:47:37 UTC (rev 12069) @@ -471,18 +471,15 @@ ${SH_EXECUTABLE} -c "./test_diff.sh" ) # There is a bug in 2.8.x with x < 5 where tests are run out of - # the order in which they are declared by default. - # Also, 2.8.x can run repeat tests out of order due - # to some optimizations that have been implemented. So for - # 2.8.x and above always force examples_compare to be run - # after the other tests it depends on. - if(CMAKE_MAJOR_VERSION EQUAL 2 AND NOT CMAKE_MINOR_VERSION LESS 8) - #message(STATUS "DEBUG: examples_compare_DEPENDS = ${examples_compare_DEPENDS}") - set_tests_properties(examples_compare - PROPERTIES - DEPENDS "${examples_compare_DEPENDS}" - ) - endif(CMAKE_MAJOR_VERSION EQUAL 2 AND NOT CMAKE_MINOR_VERSION LESS 8) + # the order in which they are declared by default. Also, 2.8.x + # can run repeat tests out of order due to some optimizations that + # have been implemented. Thus, always force examples_compare to + # be run after the other tests it depends on. + #message(STATUS "DEBUG: examples_compare_DEPENDS = ${examples_compare_DEPENDS}") + set_tests_properties(examples_compare + PROPERTIES + DEPENDS "${examples_compare_DEPENDS}" + ) endif(CMP_EXECUTABLE OR DIFF_EXECUTABLE AND TAIL_EXECUTABLE) if(BUILD_TEST) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2011-11-30 10:36:37
|
Revision: 12072 http://plplot.svn.sourceforge.net/plplot/?rev=12072&view=rev Author: andrewross Date: 2011-11-30 10:36:26 +0000 (Wed, 30 Nov 2011) Log Message: ----------- Ensure tcl / tck / itcl libraries are explicitly linked in as required so the NON_TRANSITIVE=ON case works correctly. Modified Paths: -------------- trunk/bindings/tk/CMakeLists.txt trunk/examples/tk/CMakeLists.txt trunk/utils/CMakeLists.txt Modified: trunk/bindings/tk/CMakeLists.txt =================================================================== --- trunk/bindings/tk/CMakeLists.txt 2011-11-30 02:02:32 UTC (rev 12071) +++ trunk/bindings/tk/CMakeLists.txt 2011-11-30 10:36:26 UTC (rev 12072) @@ -103,7 +103,7 @@ endif(BUILD_SHARED_LIBS) add_executable(plserver plserver.c) - target_link_libraries(plserver plplot${LIB_TAG} plplottcltk${LIB_TAG}) + target_link_libraries(plserver plplot${LIB_TAG} plplottcltk${LIB_TAG} ${TK_LIBRARY} ${TCL_LIBRARY}) if(USE_RPATH) get_target_property(LIB_INSTALL_RPATH plplot${LIB_TAG} INSTALL_RPATH) Modified: trunk/examples/tk/CMakeLists.txt =================================================================== --- trunk/examples/tk/CMakeLists.txt 2011-11-30 02:02:32 UTC (rev 12071) +++ trunk/examples/tk/CMakeLists.txt 2011-11-30 10:36:26 UTC (rev 12072) @@ -172,7 +172,7 @@ set_source_files_properties(${TK_SRC_FILE} PROPERTIES COMPILE_FLAGS "-DUSINGDLL" ) endif(BUILD_SHARED_LIBS AND CORE_BUILD) - target_link_libraries(${TK_EXE} plplottcltk${LIB_TAG} tclmatrix${LIB_TAG} plplot${LIB_TAG} ${MATH_LIB}) + target_link_libraries(${TK_EXE} plplottcltk${LIB_TAG} tclmatrix${LIB_TAG} plplot${LIB_TAG} ${TK_LIBRARY} ${TCL_LIBRARY} ${MATH_LIB}) set_property(GLOBAL APPEND PROPERTY TARGETS_examples_tk ${TK_EXE}) endforeach(TK_SRC_FILE ${tk_SRC}) set_property(GLOBAL APPEND PROPERTY TARGETS_examples_tk tclIndex_examples_tk) Modified: trunk/utils/CMakeLists.txt =================================================================== --- trunk/utils/CMakeLists.txt 2011-11-30 02:02:32 UTC (rev 12071) +++ trunk/utils/CMakeLists.txt 2011-11-30 10:36:26 UTC (rev 12072) @@ -80,7 +80,7 @@ add_executable(pltcl pltcl.c) - target_link_libraries(pltcl plplot${LIB_TAG} plplottcltk${LIB_TAG}) + target_link_libraries(pltcl plplot${LIB_TAG} plplottcltk${LIB_TAG} ${ITCL_LIBRARY} ${TCL_LIBRARY}) if(USE_RPATH) set_target_properties(pltcl @@ -97,4 +97,4 @@ # Build simple executable to check parity bits of all characters read # by stdin. -add_executable(parity_bit_check parity_bit_check.c) \ No newline at end of file +add_executable(parity_bit_check parity_bit_check.c) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2011-11-30 11:40:17
|
Revision: 12074 http://plplot.svn.sourceforge.net/plplot/?rev=12074&view=rev Author: andrewross Date: 2011-11-30 11:40:11 +0000 (Wed, 30 Nov 2011) Log Message: ----------- Fix up pkg-config link options for NON_TRANSITIVE=ON case so examples work in the install tree with the Makefile build system. Modified Paths: -------------- trunk/bindings/ada/CMakeLists.txt trunk/bindings/d/CMakeLists.txt trunk/bindings/tcl/CMakeLists.txt trunk/bindings/wxwidgets/CMakeLists.txt trunk/examples/c++/Makefile.examples.in Modified: trunk/bindings/ada/CMakeLists.txt =================================================================== --- trunk/bindings/ada/CMakeLists.txt 2011-11-30 11:11:23 UTC (rev 12073) +++ trunk/bindings/ada/CMakeLists.txt 2011-11-30 11:40:11 UTC (rev 12074) @@ -151,6 +151,9 @@ string(REGEX REPLACE "^.*:.*:.*:(.*)$" "\\1" PC_LIBRARY_NAME ${PC_DATA}) set(PC_LINK_FLAGS "${lib${PC_LIBRARY_NAME}_LINK_FLAGS}") set(PC_COMPILE_FLAGS "${lib${PC_LIBRARY_NAME}_COMPILE_FLAGS}") + if(NON_TRANSITIVE) + set(PC_LINK_FLAGS "-lplplot${LIB_TAG} ${PC_LINK_FLAGS}") + endif(NON_TRANSITIVE) set(PC_LINK_FLAGS "-l${PC_LIBRARY_NAME} ${PC_LINK_FLAGS}") set(PC_CONFIGURED_FILE ${CMAKE_BINARY_DIR}/pkgcfg/plplot${LIB_TAG}${PC_FILE_SUFFIX}.pc Modified: trunk/bindings/d/CMakeLists.txt =================================================================== --- trunk/bindings/d/CMakeLists.txt 2011-11-30 11:11:23 UTC (rev 12073) +++ trunk/bindings/d/CMakeLists.txt 2011-11-30 11:40:11 UTC (rev 12074) @@ -110,6 +110,9 @@ string(REGEX REPLACE "^.*:.*:(.*):.*$" "\\1" PC_LONG_NAME ${PC_DATA}) string(REGEX REPLACE "^.*:.*:.*:(.*)$" "\\1" PC_LIBRARY_NAME ${PC_DATA}) set(PC_LINK_FLAGS "${lib${PC_LIBRARY_NAME}_LINK_FLAGS}") + if(NON_TRANSITIVE) + set(PC_LINK_FLAGS "-lplplot${LIB_TAG} ${PC_LINK_FLAGS}") + endif(NON_TRANSITIVE) set(PC_COMPILE_FLAGS "${lib${PC_LIBRARY_NAME}_COMPILE_FLAGS}") set(PC_LINK_FLAGS "-l${PC_LIBRARY_NAME} ${PC_LINK_FLAGS}") set(PC_CONFIGURED_FILE Modified: trunk/bindings/tcl/CMakeLists.txt =================================================================== --- trunk/bindings/tcl/CMakeLists.txt 2011-11-30 11:11:23 UTC (rev 12073) +++ trunk/bindings/tcl/CMakeLists.txt 2011-11-30 11:40:11 UTC (rev 12074) @@ -392,6 +392,9 @@ string(REGEX REPLACE "^.*:.*:.*:(.*)$" "\\1" PC_LIBRARY_NAME ${PC_DATA}) set(PC_LINK_FLAGS "${lib${PC_LIBRARY_NAME}_LINK_FLAGS}") set(PC_COMPILE_FLAGS "${lib${PC_LIBRARY_NAME}_COMPILE_FLAGS}") + if(NON_TRANSITIVE) + set(PC_LINK_FLAGS "-lplplot${LIB_TAG} ${PC_LINK_FLAGS}") + endif(NON_TRANSITIVE) set(PC_LINK_FLAGS "-l${PC_LIBRARY_NAME} ${PC_LINK_FLAGS}") set(PC_CONFIGURED_FILE ${CMAKE_BINARY_DIR}/pkgcfg/plplot${LIB_TAG}${PC_FILE_SUFFIX}.pc Modified: trunk/bindings/wxwidgets/CMakeLists.txt =================================================================== --- trunk/bindings/wxwidgets/CMakeLists.txt 2011-11-30 11:11:23 UTC (rev 12073) +++ trunk/bindings/wxwidgets/CMakeLists.txt 2011-11-30 11:40:11 UTC (rev 12074) @@ -169,6 +169,9 @@ string(REGEX REPLACE "^.*:.*:.*:(.*)$" "\\1" PC_LIBRARY_NAME ${PC_DATA}) set(PC_LINK_FLAGS "${lib${PC_LIBRARY_NAME}_LINK_FLAGS}") set(PC_COMPILE_FLAGS "${lib${PC_LIBRARY_NAME}_COMPILE_FLAGS}") + if(NON_TRANSITIVE) + set(PC_LINK_FLAGS "-lplplotcxx${LIB_TAG} ${PC_LINK_FLAGS}") + endif(NON_TRANSITIVE) set(PC_LINK_FLAGS "-l${PC_LIBRARY_NAME} ${PC_LINK_FLAGS}") set(PC_CONFIGURED_FILE ${CMAKE_BINARY_DIR}/pkgcfg/plplot${LIB_TAG}${PC_FILE_SUFFIX}.pc Modified: trunk/examples/c++/Makefile.examples.in =================================================================== --- trunk/examples/c++/Makefile.examples.in 2011-11-30 11:11:23 UTC (rev 12073) +++ trunk/examples/c++/Makefile.examples.in 2011-11-30 11:40:11 UTC (rev 12074) @@ -88,7 +88,7 @@ @qt_gui_true@@pkg_config_true@ $(QT_MOC_EXECUTABLE) `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags-only-I plplot$(LIB_TAG)-qt` $< -o $@ @qt_gui_true@@pkg_config_true@qt_example$(EXEEXT): qt_example.cpp qt_PlotWindow.cpp moc_qt_PlotWindow.cpp -@qt_gui_true@@pkg_config_true@ $(CXX) qt_example.cpp qt_PlotWindow.cpp moc_qt_PlotWindow.cpp -o $@ $(qt_RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG)-qt` +@qt_gui_true@@pkg_config_true@ $(CXX) qt_example.cpp qt_PlotWindow.cpp moc_qt_PlotWindow.cpp -o $@ $(qt_RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG)-qt` `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot${LIB_TAG}` .cc$(EXEEXT): @pkg_config_true@ $(CXX) $< -o $@ $(RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG)-c++` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2011-12-01 11:52:35
|
Revision: 12081 http://plplot.svn.sourceforge.net/plplot/?rev=12081&view=rev Author: andrewross Date: 2011-12-01 11:52:28 +0000 (Thu, 01 Dec 2011) Log Message: ----------- Fix up old address for FSF in the license section of individual source files. Modified Paths: -------------- trunk/bindings/tk-x-plat/plplotter.c trunk/doc/docbook/src/intro.xml trunk/drivers/plmeta.c trunk/drivers/plplotcanvas-hacktext.c trunk/include/plplotcanvas-hacktext.h Modified: trunk/bindings/tk-x-plat/plplotter.c =================================================================== --- trunk/bindings/tk-x-plat/plplotter.c 2011-12-01 09:43:55 UTC (rev 12080) +++ trunk/bindings/tk-x-plat/plplotter.c 2011-12-01 11:52:28 UTC (rev 12081) @@ -37,8 +37,8 @@ // Library General Public License for more details. // // You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free -// Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // // Based upon tkFrame.c from the TK 3.2 distribution: // Modified: trunk/doc/docbook/src/intro.xml =================================================================== --- trunk/doc/docbook/src/intro.xml 2011-12-01 09:43:55 UTC (rev 12080) +++ trunk/doc/docbook/src/intro.xml 2011-12-01 11:52:28 UTC (rev 12081) @@ -276,8 +276,8 @@ Library General Public License for more details. You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. </programlisting> <para> The text of this license is given in the file COPYING.LIB in the Modified: trunk/drivers/plmeta.c =================================================================== --- trunk/drivers/plmeta.c 2011-12-01 09:43:55 UTC (rev 12080) +++ trunk/drivers/plmeta.c 2011-12-01 11:52:28 UTC (rev 12081) @@ -1,23 +1,21 @@ // $Id$ // -// Copyright 1991, 1992, 1993, 1994, 1995 -// Geoffrey Furnish fu...@di... -// Maurice LeBrun mj...@di... -// Institute for Fusion Studies University of Texas at Austin +// Copyright (C) 1991, 1992, 1993, 1994, 1995 Geoffrey Furnish +// Copyright (C) 1991, 1992, 1993, 1994, 1995 Maurice LeBrun // -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. +// PLplot is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License as published +// by the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. // -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Library General Public License for more details. +// PLplot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Library General Public License for more details. // -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free -// Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// You should have received a copy of the GNU Library General Public License +// along with PLplot; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA // //-------------------------------------------------------------------------- // Modified: trunk/drivers/plplotcanvas-hacktext.c =================================================================== --- trunk/drivers/plplotcanvas-hacktext.c 2011-12-01 09:43:55 UTC (rev 12080) +++ trunk/drivers/plplotcanvas-hacktext.c 2011-12-01 11:52:28 UTC (rev 12081) @@ -15,7 +15,7 @@ // // You should have received a copy of the GNU Library General Public // License along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // // Authors: // Federico Mena <fed...@nu...> Modified: trunk/include/plplotcanvas-hacktext.h =================================================================== --- trunk/include/plplotcanvas-hacktext.h 2011-12-01 09:43:55 UTC (rev 12080) +++ trunk/include/plplotcanvas-hacktext.h 2011-12-01 11:52:28 UTC (rev 12081) @@ -15,7 +15,7 @@ // // You should have received a copy of the GNU Library General Public // License along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // // Authors: // Federico Mena <fed...@nu...> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2011-12-01 11:56:29
|
Revision: 12082 http://plplot.svn.sourceforge.net/plplot/?rev=12082&view=rev Author: andrewross Date: 2011-12-01 11:56:18 +0000 (Thu, 01 Dec 2011) Log Message: ----------- Fix a couple more old addresses for FSF. Modified Paths: -------------- trunk/bindings/octave/PLplot/struct_contains.m trunk/drivers/test-drv-info.c Modified: trunk/bindings/octave/PLplot/struct_contains.m =================================================================== --- trunk/bindings/octave/PLplot/struct_contains.m 2011-12-01 11:52:28 UTC (rev 12081) +++ trunk/bindings/octave/PLplot/struct_contains.m 2011-12-01 11:56:18 UTC (rev 12082) @@ -13,9 +13,8 @@ ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, write to the Free -## Software Foundation, 59 Temple Place - Suite 330, Boston, MA -## 02110-1301, USA. +## along with Octave; see the file COPYING. If not, write to the Free +## Software Foundation, 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## -*- texinfo -*- ## @deftypefn {Function File} {} struct_contains (@var{expr}, @var{name}) Modified: trunk/drivers/test-drv-info.c =================================================================== --- trunk/drivers/test-drv-info.c 2011-12-01 11:52:28 UTC (rev 12081) +++ trunk/drivers/test-drv-info.c 2011-12-01 11:56:18 UTC (rev 12082) @@ -17,7 +17,7 @@ // // You should have received a copy of the GNU Library General Public License // along with the GNU C Library; see the file COPYING.LIB. If not, write to -// the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +// the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, // MA 02110-1301, USA. // This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2011-12-01 20:27:24
|
Revision: 12084 http://plplot.svn.sourceforge.net/plplot/?rev=12084&view=rev Author: andrewross Date: 2011-12-01 20:27:18 +0000 (Thu, 01 Dec 2011) Log Message: ----------- Remove remaining direct access to Tcl interp->result. Modified Paths: -------------- trunk/bindings/tk/plframe.c trunk/bindings/tk/plserver.c trunk/bindings/tk/tkMain.c trunk/bindings/tk/tkshell.c trunk/bindings/tk-x-plat/plplotter.c trunk/drivers/tk.c Modified: trunk/bindings/tk/plframe.c =================================================================== --- trunk/bindings/tk/plframe.c 2011-12-01 20:26:02 UTC (rev 12083) +++ trunk/bindings/tk/plframe.c 2011-12-01 20:27:18 UTC (rev 12084) @@ -484,7 +484,7 @@ Tk_DestroyWindow( plFramePtr->tkwin ); return TCL_ERROR; } - interp->result = Tk_PathName( plFramePtr->tkwin ); + Tcl_SetResult( interp, Tk_PathName( plFramePtr->tkwin ), TCL_VOLATILE ); return TCL_OK; } @@ -515,6 +515,7 @@ int result = TCL_OK; int length; char c; + char res[20]; dbug_enter( "PlFrameWidgetCmd" ); @@ -616,7 +617,8 @@ { bcb.cmd = PLESC_DOUBLEBUFFERING_QUERY; pl_cmd( PLESC_DOUBLEBUFFERING, &bcb ); - sprintf( interp->result, "%d", bcb.result ); + snprintf( res, 20, "%d", bcb.result ); + Tcl_SetResult( interp, res, TCL_VOLATILE ); } } @@ -2676,7 +2678,7 @@ plr->at_bop = 0; if ( Tcl_Eval( interp, plFramePtr->bopCmd ) != TCL_OK ) fprintf( stderr, "Command \"%s\" failed:\n\t %s\n", - plFramePtr->bopCmd, interp->result ); + plFramePtr->bopCmd, Tcl_GetStringResult( interp ) ); } // Signal eop if necessary @@ -2686,7 +2688,7 @@ plr->at_eop = 0; if ( Tcl_Eval( interp, plFramePtr->eopCmd ) != TCL_OK ) fprintf( stderr, "Command \"%s\" failed:\n\t %s\n", - plFramePtr->eopCmd, interp->result ); + plFramePtr->eopCmd, Tcl_GetStringResult( interp ) ); } return result; @@ -3272,11 +3274,12 @@ int argc, const char **argv ) { PLFLT x, y; + char tmpstring[50]; // fprintf( stdout, "Made it into report, argc=%d\n", argc ); if ( argc == 0 ) { - interp->result = "report what?"; + Tcl_SetResult( interp, "report what?", TCL_STATIC ); return TCL_ERROR; } @@ -3287,7 +3290,7 @@ if ( argc != 3 ) { - interp->result = "Wrong # of args: report wc x y"; + Tcl_SetResult( interp, "Wrong # of args: report wc x y", TCL_STATIC ); return TCL_ERROR; } @@ -3301,15 +3304,16 @@ if ( plTranslateCursor( gin ) ) { - sprintf( interp->result, "%f %f", gin->wX, gin->wY ); + snprintf( tmpstring, 50, "%f %f", gin->wX, gin->wY ); + Tcl_SetResult( interp, tmpstring, TCL_VOLATILE ); return TCL_OK; } - interp->result = "Cannot locate"; + Tcl_SetResult( interp, "Cannot locate", TCL_STATIC ); return TCL_OK; } - interp->result = "nonsensical request."; + Tcl_SetResult( interp, "nonsensical request.", TCL_STATIC ); return TCL_ERROR; } @@ -3325,7 +3329,7 @@ if ( Tcl_Eval( plFramePtr->interp, plFramePtr->bopCmd ) != TCL_OK ) fprintf( stderr, "Command \"%s\" failed:\n\t %s\n", - plFramePtr->bopCmd, plFramePtr->interp->result ); + plFramePtr->bopCmd, Tcl_GetStringResult( plFramePtr->interp ) ); } //-------------------------------------------------------------------------- @@ -3340,7 +3344,7 @@ if ( Tcl_Eval( plFramePtr->interp, plFramePtr->eopCmd ) != TCL_OK ) fprintf( stderr, "Command \"%s\" failed:\n\t %s\n", - plFramePtr->eopCmd, plFramePtr->interp->result ); + plFramePtr->eopCmd, Tcl_GetStringResult( plFramePtr->interp ) ); } //-------------------------------------------------------------------------- Modified: trunk/bindings/tk/plserver.c =================================================================== --- trunk/bindings/tk/plserver.c 2011-12-01 20:26:02 UTC (rev 12083) +++ trunk/bindings/tk/plserver.c 2011-12-01 20:27:18 UTC (rev 12084) @@ -127,12 +127,11 @@ if ( Tk_ParseArgv( interp, (Tk_Window) NULL, &argc, argv, argTable, TK_ARGV_NO_DEFAULTS ) != TCL_OK ) { - fprintf( stderr, "\n(plserver) %s\n\n", interp->result ); + fprintf( stderr, "\n(plserver) %s\n\n", Tcl_GetStringResult( interp ) ); fprintf( stderr, "\ The client_<xxx> and -child options should not be used except via the\n\ PLplot/Tk driver.\n\n(wish) " ); - if ( strncmp( interp->result, helpmsg, strlen( helpmsg ) ) ) - exit( 1 ); + Tcl_SetResult( interp, helpmsg, TCL_VOLATILE ); } // No longer need interpreter @@ -254,13 +253,15 @@ static int plExitCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, char **argv ) { - int value = 0; + int value = 0; + char *res; // Print error message if one given + + res = Tcl_GetStringResult( interp ); + if ( res[0] != '\0' ) + fprintf( stderr, "%s\n", res ); - if ( interp->result != NULL && interp->result[0] != '\0' ) - fprintf( stderr, "%s\n", interp->result ); - // Best to check the syntax before proceeding if ( ( argc != 1 ) && ( argc != 2 ) ) Modified: trunk/bindings/tk/tkMain.c =================================================================== --- trunk/bindings/tk/tkMain.c 2011-12-01 20:26:02 UTC (rev 12083) +++ trunk/bindings/tk/tkMain.c 2011-12-01 20:27:18 UTC (rev 12084) @@ -202,7 +202,7 @@ if ( Tk_ParseArgv( interp, (Tk_Window) NULL, &argc, argv, argTable, 0 ) != TCL_OK ) { - fprintf( stderr, "%s\n", interp->result ); + fprintf( stderr, "%s\n", Tcl_GetStringResult( interp ) ); exit( 1 ); } if ( name == NULL ) @@ -331,7 +331,7 @@ if ( ( *AppInit )( interp ) != TCL_OK ) { - fprintf( stderr, "(*AppInit) failed: %s\n", interp->result ); + fprintf( stderr, "(*AppInit) failed: %s\n", Tcl_GetStringResult( interp ) ); } // @@ -343,7 +343,7 @@ code = Tcl_VarEval( interp, "wm geometry . ", geometry, (char *) NULL ); if ( code != TCL_OK ) { - fprintf( stderr, "%s\n", interp->result ); + fprintf( stderr, "%s\n", Tcl_GetStringResult( interp ) ); } } @@ -393,7 +393,7 @@ fullName = Tcl_TildeSubst( interp, RcFileName, &buffer ); if ( fullName == NULL ) { - fprintf( stderr, "%s\n", interp->result ); + fprintf( stderr, "%s\n", Tcl_GetStringResult( interp ) ); } else { @@ -403,7 +403,7 @@ code = Tcl_EvalFile( interp, fullName ); if ( code != TCL_OK ) { - fprintf( stderr, "%s\n", interp->result ); + fprintf( stderr, "%s\n", Tcl_GetStringResult( interp ) ); } fclose( f ); } @@ -442,7 +442,7 @@ msg = Tcl_GetVar( interp, "errorInfo", TCL_GLOBAL_ONLY ); if ( msg == NULL ) { - msg = interp->result; + msg = Tcl_GetStringResult( interp ); } fprintf( stderr, "%s\n", msg ); Tcl_Eval( interp, errorExitCmd ); @@ -478,6 +478,7 @@ static int gotPartial = 0; char *cmd; int code, count; + const char *res; count = (int) read( fileno( stdin ), input, BUFFER_SIZE ); if ( count <= 0 ) @@ -533,11 +534,12 @@ Tk_CreateFileHandler( 0, TK_READABLE, StdinProc, (ClientData) 0 ); #endif Tcl_DStringFree( &command ); - if ( *interp->result != 0 ) + res = Tcl_GetStringResult( interp ); + if ( *res != 0 ) { if ( ( code != TCL_OK ) || ( tty ) ) { - printf( "%s\n", interp->result ); + printf( "%s\n", res ); } } Modified: trunk/bindings/tk/tkshell.c =================================================================== --- trunk/bindings/tk/tkshell.c 2011-12-01 20:26:02 UTC (rev 12083) +++ trunk/bindings/tk/tkshell.c 2011-12-01 20:27:18 UTC (rev 12084) @@ -115,7 +115,7 @@ if ( Tcl_ExprBoolean( interp, argv[1], &result ) ) { fprintf( stderr, "wait_until command \"%s\" failed:\n\t %s\n", - argv[1], interp->result ); + argv[1], Tcl_GetStringResult( interp ) ); break; } if ( result ) Modified: trunk/bindings/tk-x-plat/plplotter.c =================================================================== --- trunk/bindings/tk-x-plat/plplotter.c 2011-12-01 20:26:02 UTC (rev 12083) +++ trunk/bindings/tk-x-plat/plplotter.c 2011-12-01 20:27:18 UTC (rev 12084) @@ -463,7 +463,7 @@ PlPlotterFirstInit( (ClientData) plPlotterPtr ); Tk_GeometryRequest( plPlotterPtr->tkwin, 200, 200 ); - interp->result = Tk_PathName( plPlotterPtr->tkwin ); + Tcl_SetResult( interp, Tk_PathName( plPlotterPtr->tkwin ), TCL_VOLATILE ); return TCL_OK; } @@ -2475,7 +2475,7 @@ plr->at_bop = 0; if ( Tcl_Eval( interp, plPlotterPtr->bopCmd ) != TCL_OK ) fprintf( stderr, "Command \"%s\" failed:\n\t %s\n", - plPlotterPtr->bopCmd, interp->result ); + plPlotterPtr->bopCmd, Tcl_GetStringResult( interp ) ); } // Signal eop if necessary @@ -2485,7 +2485,7 @@ plr->at_eop = 0; if ( Tcl_Eval( interp, plPlotterPtr->eopCmd ) != TCL_OK ) fprintf( stderr, "Command \"%s\" failed:\n\t %s\n", - plPlotterPtr->eopCmd, interp->result ); + plPlotterPtr->eopCmd, Tcl_GetStringResult( interp ) ); } return result; @@ -2497,7 +2497,7 @@ { if ( Tcl_Eval( interp, plPlotterPtr->eopCmd ) != TCL_OK ) fprintf( stderr, "Command \"%s\" failed:\n\t %s\n", - plPlotterPtr->eopCmd, interp->result ); + plPlotterPtr->eopCmd, Tcl_GetStringResult( interp ) ); } } @@ -2507,7 +2507,7 @@ { if ( Tcl_Eval( interp, plPlotterPtr->bopCmd ) != TCL_OK ) fprintf( stderr, "Command \"%s\" failed:\n\t %s\n", - plPlotterPtr->bopCmd, interp->result ); + plPlotterPtr->bopCmd, Tcl_GetStringResult( interp ) ); } } @@ -2542,7 +2542,7 @@ { #endif Tcl_AppendResult( interp, "Packet receive failed:\n\t %s\n", - interp->result, (char *) NULL ); + Tcl_GetStringResult( interp ), (char *) NULL ); return TCL_ERROR; } @@ -3084,11 +3084,12 @@ int argc, CONST char **argv ) { PLFLT x, y; + char res[40]; // fprintf( stdout, "Made it into report, argc=%d\n", argc ); if ( argc == 0 ) { - interp->result = "report what?"; + Tcl_SetResult( interp, "report what?", TCL_STATIC ); return TCL_ERROR; } @@ -3099,7 +3100,7 @@ if ( argc != 3 ) { - interp->result = "Wrong # of args: report wc x y"; + Tcl_SetResult( interp, "Wrong # of args: report wc x y", TCL_STATIC ); return TCL_ERROR; } @@ -3113,15 +3114,16 @@ if ( plTranslateCursor( gin ) ) { - sprintf( interp->result, "%f %f", gin->wX, gin->wY ); + snprintf( res, 40, "%f %f", gin->wX, gin->wY ); + Tcl_SetResult( interp, res, TCL_VOLATILE ); return TCL_OK; } - interp->result = "Cannot locate"; + Tcl_SetResult( interp, "Cannot locate", TCL_STATIC ); return TCL_OK; } - interp->result = "nonsensical request."; + Tcl_SetResult( interp, "nonsensical request.", TCL_STATIC ); return TCL_ERROR; } Modified: trunk/drivers/tk.c =================================================================== --- trunk/drivers/tk.c 2011-12-01 20:26:02 UTC (rev 12083) +++ trunk/drivers/tk.c 2011-12-01 20:27:18 UTC (rev 12084) @@ -765,7 +765,7 @@ if ( Tcl_Init( dev->interp ) != TCL_OK ) { - fprintf( stderr, "%s\n", dev->interp->result ); + fprintf( stderr, "%s\n", Tcl_GetStringResult( dev->interp ) ); abort_session( pls, "Unable to initialize Tcl" ); } @@ -1572,7 +1572,7 @@ 0, 1, ( ClientData ) & iodev->file ) != TCL_OK ) { fprintf( stderr, "Cannot get file info:\n\t %s\n", - dev->interp->result ); + Tcl_GetStringResult( dev->interp ) ); abort_session( pls, "" ); } iodev->fd = fileno( iodev->file ); @@ -1677,7 +1677,7 @@ if ( pl_PacketSend( dev->interp, dev->iodev, pls->pdfs ) ) { fprintf( stderr, "Packet send failed:\n\t %s\n", - dev->interp->result ); + Tcl_GetStringResult( dev->interp ) ); abort_session( pls, "" ); } pdfs->bp = 0; @@ -2135,7 +2135,7 @@ if ( Tk_Init( interp ) ) { - fprintf( stderr, "tk_init:%s\n", interp->result ); + fprintf( stderr, "tk_init:%s\n", Tcl_GetStringResult( interp ) ); return 1; } @@ -2169,7 +2169,7 @@ if ( Tcl_ExprBoolean( dev->interp, dev->cmdbuf, &result ) ) { fprintf( stderr, "tk_wait command \"%s\" failed:\n\t %s\n", - cmd, dev->interp->result ); + cmd, Tcl_GetStringResult( dev->interp ) ); break; } if ( result ) @@ -2229,7 +2229,7 @@ if ( result != TCL_OK ) { fprintf( stderr, "Server command \"%s\" failed:\n\t %s\n", - cmd, dev->interp->result ); + cmd, Tcl_GetStringResult( dev->interp ) ); abort_session( pls, "" ); } } @@ -2251,7 +2251,7 @@ if ( Tcl_VarEval( dev->interp, cmd, (char **) NULL ) != TCL_OK ) { fprintf( stderr, "TCL command \"%s\" failed:\n\t %s\n", - cmd, dev->interp->result ); + cmd, Tcl_GetStringResult( dev->interp ) ); abort_session( pls, "" ); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2011-12-02 13:31:08
|
Revision: 12092 http://plplot.svn.sourceforge.net/plplot/?rev=12092&view=rev Author: andrewross Date: 2011-12-02 13:31:01 +0000 (Fri, 02 Dec 2011) Log Message: ----------- Remove some more unused variables. Modified Paths: -------------- trunk/drivers/cairo.c trunk/drivers/svg.c trunk/src/plstdio.c Modified: trunk/drivers/cairo.c =================================================================== --- trunk/drivers/cairo.c 2011-12-02 13:21:14 UTC (rev 12091) +++ trunk/drivers/cairo.c 2011-12-02 13:31:01 UTC (rev 12092) @@ -522,10 +522,7 @@ void plD_esc_cairo( PLStream *pls, PLINT op, void *ptr ) { - PLCairo *aStream; - aStream = (PLCairo *) pls->dev; - switch ( op ) { case PLESC_FILL: // filled polygon @@ -2030,7 +2027,7 @@ void xcairo_get_cursor( PLStream *pls, PLGraphicsIn *gin ) { - int number_chars; + //int number_chars; const char *ksname; char str[257]; KeySym keysym; @@ -2065,7 +2062,7 @@ // Get key pressed (if any) if ( event.type == KeyPress || event.type == KeyRelease ) { - number_chars = XLookupString( (XKeyEvent *) &event, str, 100, &keysym, NULL ); + //number_chars = XLookupString( (XKeyEvent *) &event, str, 100, &keysym, NULL ); if ( keysym == NoSymbol ) ksname = "NoSymbol"; else if ( !( ksname = XKeysymToString( keysym ) ) ) Modified: trunk/drivers/svg.c =================================================================== --- trunk/drivers/svg.c 2011-12-02 13:21:14 UTC (rev 12091) +++ trunk/drivers/svg.c 2011-12-02 13:31:01 UTC (rev 12092) @@ -354,9 +354,6 @@ void plD_tidy_svg( PLStream *pls ) { - SVG *aStream; - - aStream = pls->dev; if ( svg_family_check( pls ) ) { return; Modified: trunk/src/plstdio.c =================================================================== --- trunk/src/plstdio.c 2011-12-02 13:21:14 UTC (rev 12091) +++ trunk/src/plstdio.c 2011-12-02 13:31:01 UTC (rev 12092) @@ -53,8 +53,6 @@ void plio_fwrite( void *buf, size_t size, size_t nmemb, FILE *stream ) { - size_t bytes; - dbug_enter( "plio_fwrite" ); // Exit if there is nothing to write @@ -64,7 +62,7 @@ // Clear the error flag for this steam clearerr( stream ); - bytes = fwrite( buf, size, nmemb, stream ); + fwrite( buf, size, nmemb, stream ); if ( ferror( stream ) ) { @@ -85,8 +83,6 @@ void plio_fread( void *buf, size_t size, size_t nmemb, FILE *stream ) { - size_t bytes; - dbug_enter( "plio_fread" ); // If the buffer has a size of zero, we should complain @@ -99,7 +95,7 @@ // Clear the error flag for this steam clearerr( stream ); - bytes = fread( buf, size, nmemb, stream ); + fread( buf, size, nmemb, stream ); if ( ferror( stream ) ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2011-12-03 08:33:11
|
Revision: 12093 http://plplot.svn.sourceforge.net/plplot/?rev=12093&view=rev Author: andrewross Date: 2011-12-03 08:33:04 +0000 (Sat, 03 Dec 2011) Log Message: ----------- Fix up some compiler warnings. Modified Paths: -------------- trunk/bindings/tcl/tclAPI.c trunk/bindings/tcl/tclMain.c trunk/bindings/tk/plserver.c trunk/utils/parity_bit_check.c trunk/utils/pltcl.c trunk/utils/pltek.c Modified: trunk/bindings/tcl/tclAPI.c =================================================================== --- trunk/bindings/tcl/tclAPI.c 2011-12-02 13:31:01 UTC (rev 12092) +++ trunk/bindings/tcl/tclAPI.c 2011-12-03 08:33:04 UTC (rev 12093) @@ -1166,7 +1166,7 @@ // contour the data. - plcont( (const PLFLT **) zused, nx, ny, + plcont( (const PLFLT * const *) zused, nx, ny, kx, lx, ky, ly, matclev->fdata, nclev, pltr, pltr_data ); @@ -1499,7 +1499,7 @@ // plot the vector data. - plvect( (const PLFLT **) uused, (const PLFLT **) vused, nx, ny, + plvect( (const PLFLT * const *) uused, (const PLFLT * const *) vused, nx, ny, scaling, pltr, pltr_data ); // Now free up any space which got allocated for our coordinate trickery. @@ -1644,7 +1644,7 @@ return TCL_ERROR; } - plmesh( x, y, (const PLFLT **) z, nx, ny, opt ); + plmesh( x, y, (const PLFLT * const *) z, nx, ny, opt ); if ( argc == 7 ) { @@ -1883,7 +1883,7 @@ return TCL_ERROR; } - plmeshc( x, y, (const PLFLT **) z, nx, ny, opt, clev, nlev ); + plmeshc( x, y, (const PLFLT * const *) z, nx, ny, opt, clev, nlev ); if ( argc == 7 ) { @@ -2020,7 +2020,7 @@ return TCL_ERROR; } - plot3d( x, y, (const PLFLT **) z, nx, ny, opt, side ); + plot3d( x, y, (const PLFLT * const *) z, nx, ny, opt, side ); if ( argc == 8 ) { @@ -2259,7 +2259,7 @@ return TCL_ERROR; } - plot3dc( x, y, (const PLFLT **) z, nx, ny, opt, clev, nlev ); + plot3dc( x, y, (const PLFLT * const *) z, nx, ny, opt, clev, nlev ); if ( argc == 7 ) { @@ -2498,7 +2498,7 @@ return TCL_ERROR; } - plsurf3d( x, y, (const PLFLT **) z, nx, ny, opt, clev, nlev ); + plsurf3d( x, y, (const PLFLT * const *) z, nx, ny, opt, clev, nlev ); if ( argc == 7 ) { @@ -2853,7 +2853,7 @@ // Now go make the plot. - plshade( (const PLFLT **) zused, nx, ny, NULL, + plshade( (const PLFLT * const *) 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, @@ -3178,7 +3178,7 @@ // Now go make the plot. - plshades( (const PLFLT **) zused, nx, ny, NULL, + plshades( (const PLFLT * const *) zused, nx, ny, NULL, xmin, xmax, ymin, ymax, matclevel->fdata, nlevel, fill_width, cont_color, cont_width, plfill, rect, pltr, pltr_data ); @@ -3689,7 +3689,7 @@ // fprintf(stderr,"Dymin, Dymax: %.17g %.17g\n", Dymin, Dymax); // - c_plimage( (const PLFLT **) pidata, nx, ny, xmin, xmax, ymin, ymax, zmin, zmax, + c_plimage( (const PLFLT * const *) pidata, nx, ny, xmin, xmax, ymin, ymax, zmin, zmax, Dxmin, Dxmax, Dymin, Dymax ); plFree2dGrid( pidata, nx, ny ); @@ -3795,12 +3795,12 @@ cgrid2.yg[i][j] = yg->fdata[j + i * ( ny + 1 )]; } } - c_plimagefr( (const PLFLT **) pidata, nx, ny, xmin, xmax, ymin, ymax, zmin, zmax, + c_plimagefr( (const PLFLT * const *) pidata, nx, ny, xmin, xmax, ymin, ymax, zmin, zmax, valuemin, valuemax, pltr2, (void *) &cgrid2 ); } else { - c_plimagefr( (const PLFLT **) pidata, nx, ny, xmin, xmax, ymin, ymax, zmin, zmax, + c_plimagefr( (const PLFLT * const *) pidata, nx, ny, xmin, xmax, ymin, ymax, zmin, zmax, valuemin, valuemax, pltr0, NULL ); } @@ -4193,13 +4193,13 @@ nlegend, opt_array, text_offset, text_scale, text_spacing, text_justification, - text_colors, (const char **) text, + 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_numbers, (const char * const *) symbols ); if ( opt_array != NULL ) free( opt_array ); Modified: trunk/bindings/tcl/tclMain.c =================================================================== --- trunk/bindings/tcl/tclMain.c 2011-12-02 13:31:01 UTC (rev 12092) +++ trunk/bindings/tcl/tclMain.c 2011-12-03 08:33:04 UTC (rev 12093) @@ -74,7 +74,7 @@ // linked into the application. // -//EXTERN int Tcl_LinkVar( ); +EXTERN int Tcl_LinkVar( ); int ( *tclDummyLinkVarPtr )() = Tcl_LinkVar; // Modified: trunk/bindings/tk/plserver.c =================================================================== --- trunk/bindings/tk/plserver.c 2011-12-02 13:31:01 UTC (rev 12092) +++ trunk/bindings/tk/plserver.c 2011-12-03 08:33:04 UTC (rev 12093) @@ -254,7 +254,7 @@ plExitCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, char **argv ) { int value = 0; - char *res; + const char *res; // Print error message if one given Modified: trunk/utils/parity_bit_check.c =================================================================== --- trunk/utils/parity_bit_check.c 2011-12-02 13:31:01 UTC (rev 12092) +++ trunk/utils/parity_bit_check.c 2011-12-03 08:33:04 UTC (rev 12093) @@ -9,6 +9,8 @@ main( int argc, char *argv[] ) { int c; + (void) argc; + (void) argv; while ( ( c = getchar() ) != EOF ) { if ( c & 0x80 ) Modified: trunk/utils/pltcl.c =================================================================== --- trunk/utils/pltcl.c 2011-12-02 13:31:01 UTC (rev 12092) +++ trunk/utils/pltcl.c 2011-12-03 08:33:04 UTC (rev 12093) @@ -69,6 +69,9 @@ plExitCmd( ClientData clientData, Tcl_Interp *interp, int argc, char **argv ) { const char *tmp = Tcl_GetStringResult( interp ); + (void) argc; + (void) argv; + (void) clientData; // Print error message if one given if ( tmp != NULL && tmp != '\0' ) @@ -95,6 +98,9 @@ { PLStream *pls; char prompt[80]; + (void) argc; + (void) argv; + (void) clientData; plgpls( &pls ); Modified: trunk/utils/pltek.c =================================================================== --- trunk/utils/pltek.c 2011-12-02 13:31:01 UTC (rev 12092) +++ trunk/utils/pltek.c 2011-12-03 08:33:04 UTC (rev 12093) @@ -68,7 +68,7 @@ start[0] = 0; for ( i = 0; i < MAXPAGES; i++ ) { - nb = fread( buf, 1, BUFSZ, fd ); + nb = (int) fread( buf, 1, BUFSZ, fd ); if ( nb <= 0 ) break; ifirst = 0; @@ -171,7 +171,7 @@ } xtra = '\0'; } - nb = fread( buf, 1, BUFSZ, fd ); + nb = (int) fread( buf, 1, BUFSZ, fd ); if ( nb <= 0 ) break; ifirst = 0; @@ -179,7 +179,7 @@ { if ( buf[j] == '\f' ) { - if ( fwrite( &buf[ifirst], 1, j - ifirst, stdout ) != j - ifirst ) + if ( (int) fwrite( &buf[ifirst], 1, j - ifirst, stdout ) != j - ifirst ) { fprintf( stderr, "Error writing to stdout\n" ); exit( 1 ); @@ -196,7 +196,7 @@ xtra = ESC; j--; } - if ( fwrite( &buf[ifirst], 1, j - ifirst, stdout ) != j - ifirst ) + if ( (int) fwrite( &buf[ifirst], 1, j - ifirst, stdout ) != j - ifirst ) { fprintf( stderr, "Error writing to stdout\n" ); exit( 1 ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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] |
From: <and...@us...> - 2012-01-05 13:00:21
|
Revision: 12122 http://plplot.svn.sourceforge.net/plplot/?rev=12122&view=rev Author: andrewross Date: 2012-01-05 13:00:11 +0000 (Thu, 05 Jan 2012) Log Message: ----------- Commit patch from Orion to fix a few more unnecessary linkage errors. Modified Paths: -------------- trunk/cmake/modules/FindLTDL.cmake trunk/cmake/modules/tcl-related.cmake trunk/cmake/modules/wxwidgets.cmake trunk/examples/tk/Makefile.examples.in Modified: trunk/cmake/modules/FindLTDL.cmake =================================================================== --- trunk/cmake/modules/FindLTDL.cmake 2012-01-05 11:58:24 UTC (rev 12121) +++ trunk/cmake/modules/FindLTDL.cmake 2012-01-05 13:00:11 UTC (rev 12122) @@ -40,40 +40,44 @@ endif(${_lib}) endmacro(_find_check_libs) - # Find and check platform-dependent libraries which - # libltdl depends upon using model given - # for determining LIBADD_DL in $prefix/share/libtool/libltdl/acinclude.m4 + if(NOT NON_TRANSITIVE) + # Find and check platform-dependent libraries which + # libltdl depends upon using model given + # for determining LIBADD_DL in $prefix/share/libtool/libltdl/acinclude.m4 - # Look for three exclusive alternatives: - # (dld shl_load; dl dlopen; svdl dlopen) - # N.B. all the different ADDLIB variables have to be different because - # of caching of results in the macro. - _find_check_libs(dld shl_load LTDL_LTDL_ADDLIB0 LTDL_LTDL_HAVE_ADDLIB0) - if(LTDL_LTDL_HAVE_ADDLIB0) - set(LTDL_LIBRARIES ${LTDL_LIBRARIES} ${LTDL_LTDL_ADDLIB0}) - set(LTDL_FOUND ON) - else(LTDL_LTDL_HAVE_ADDLIB0) - _find_check_libs(dl dlopen LTDL_LTDL_ADDLIB1 LTDL_LTDL_HAVE_ADDLIB1) - if(LTDL_LTDL_HAVE_ADDLIB1) - set(LTDL_LIBRARIES ${LTDL_LIBRARIES} ${LTDL_LTDL_ADDLIB1}) + # Look for three exclusive alternatives: + # (dld shl_load; dl dlopen; svdl dlopen) + # N.B. all the different ADDLIB variables have to be different because + # of caching of results in the macro. + _find_check_libs(dld shl_load LTDL_LTDL_ADDLIB0 LTDL_LTDL_HAVE_ADDLIB0) + if(LTDL_LTDL_HAVE_ADDLIB0) + set(LTDL_LIBRARIES ${LTDL_LIBRARIES} ${LTDL_LTDL_ADDLIB0}) set(LTDL_FOUND ON) - else(LTDL_LTDL_HAVE_ADDLIB1) - _find_check_libs(svdl dlopen LTDL_LTDL_ADDLIB2 LTDL_LTDL_HAVE_ADDLIB2) - if(LTDL_LTDL_HAVE_ADDLIB2) - set(LTDL_LIBRARIES ${LTDL_LIBRARIES} ${LTDL_LTDL_ADDLIB2}) + else(LTDL_LTDL_HAVE_ADDLIB0) + _find_check_libs(dl dlopen LTDL_LTDL_ADDLIB1 LTDL_LTDL_HAVE_ADDLIB1) + if(LTDL_LTDL_HAVE_ADDLIB1) + set(LTDL_LIBRARIES ${LTDL_LIBRARIES} ${LTDL_LTDL_ADDLIB1}) set(LTDL_FOUND ON) - else(LTDL_LTDL_HAVE_ADDLIB2) - set(LTDL_FOUND OFF) - endif(LTDL_LTDL_HAVE_ADDLIB2) - endif(LTDL_LTDL_HAVE_ADDLIB1) - endif(LTDL_LTDL_HAVE_ADDLIB0) + else(LTDL_LTDL_HAVE_ADDLIB1) + _find_check_libs(svdl dlopen LTDL_LTDL_ADDLIB2 LTDL_LTDL_HAVE_ADDLIB2) + if(LTDL_LTDL_HAVE_ADDLIB2) + set(LTDL_LIBRARIES ${LTDL_LIBRARIES} ${LTDL_LTDL_ADDLIB2}) + set(LTDL_FOUND ON) + else(LTDL_LTDL_HAVE_ADDLIB2) + set(LTDL_FOUND OFF) + endif(LTDL_LTDL_HAVE_ADDLIB2) + endif(LTDL_LTDL_HAVE_ADDLIB1) + endif(LTDL_LTDL_HAVE_ADDLIB0) - # (dld dld_link) appended to any that have been found before. - _find_check_libs(dld dld_link LTDL_LTDL_ADDLIB3 LTDL_LTDL_HAVE_ADDLIB3) - if(LTDL_LTDL_HAVE_ADDLIB3) - set(LTDL_LIBRARIES ${LTDL_LIBRARIES} ${LTDL_LTDL_ADDLIB3}) + # (dld dld_link) appended to any that have been found before. + _find_check_libs(dld dld_link LTDL_LTDL_ADDLIB3 LTDL_LTDL_HAVE_ADDLIB3) + if(LTDL_LTDL_HAVE_ADDLIB3) + set(LTDL_LIBRARIES ${LTDL_LIBRARIES} ${LTDL_LTDL_ADDLIB3}) + set(LTDL_FOUND ON) + endif(LTDL_LTDL_HAVE_ADDLIB3) + else(NOT NON_TRANSITIVE) set(LTDL_FOUND ON) - endif(LTDL_LTDL_HAVE_ADDLIB3) + endif(NOT NON_TRANSITIVE) endif(LTDL_LIBRARIES) endif(LTDL_INCLUDE_DIR) Modified: trunk/cmake/modules/tcl-related.cmake =================================================================== --- trunk/cmake/modules/tcl-related.cmake 2012-01-05 11:58:24 UTC (rev 12121) +++ trunk/cmake/modules/tcl-related.cmake 2012-01-05 13:00:11 UTC (rev 12122) @@ -138,7 +138,7 @@ endif(ENABLE_tk AND NOT X11_FOUND) if(ENABLE_tk) set(TK_INCLUDE_PATH ${TK_INCLUDE_PATH} ${X11_INCLUDE_DIR}) - set(TK_LIBRARY ${TK_LIBRARY} ${X11_LIBRARIES}) + set(TK_LIBRARY ${TK_LIBRARY}) message(STATUS "TK_INCLUDE_PATH = ${TK_INCLUDE_PATH}") message(STATUS "TK_LIBRARY = ${TK_LIBRARY}") else(ENABLE_tk) Modified: trunk/cmake/modules/wxwidgets.cmake =================================================================== --- trunk/cmake/modules/wxwidgets.cmake 2012-01-05 11:58:24 UTC (rev 12121) +++ trunk/cmake/modules/wxwidgets.cmake 2012-01-05 13:00:11 UTC (rev 12122) @@ -91,11 +91,6 @@ wxwidgets_COMPILE_FLAGS "${wxwidgets_COMPILE_FLAGS} -I${AGG_INCLUDE_DIRS}" ) - set( - wxwidgets_LINK_FLAGS - ${wxwidgets_LINK_FLAGS} - ${AGG_LIBRARIES} - ) else(HAVE_AGG) message(STATUS "WARNING: wxwidgets driver and bindings components depending on AGG library have been dropped.") endif(HAVE_AGG) @@ -103,11 +98,6 @@ wxwidgets_COMPILE_FLAGS "${wxwidgets_COMPILE_FLAGS} -I${FREETYPE_INCLUDE_DIR}" ) - set( - wxwidgets_LINK_FLAGS - ${wxwidgets_LINK_FLAGS} - ${FREETYPE_LIBRARIES} - ) endif(WITH_FREETYPE) set(DRIVERS_LINK_FLAGS ${DRIVERS_LINK_FLAGS} Modified: trunk/examples/tk/Makefile.examples.in =================================================================== --- trunk/examples/tk/Makefile.examples.in 2012-01-05 11:58:24 UTC (rev 12121) +++ trunk/examples/tk/Makefile.examples.in 2012-01-05 13:00:11 UTC (rev 12122) @@ -37,7 +37,7 @@ rm -f $(EXECUTABLES_list) $(itk_EXECUTABLES_list) .c$(EXEEXT): -@pkg_config_true@ $(CC) $< -o $@ $(RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG)-tcl` -@pkg_config_false@ $(CC) $< -o $@ `plplot-config --cflags --libs --with-tcl` +@pkg_config_true@ $(CC) $< -o $@ $(RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG)-tcl` -lm +@pkg_config_false@ $(CC) $< -o $@ `plplot-config --cflags --libs --with-tcl` -lm .SUFFIXES: .c $(EXEEXT) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2012-01-05 13:59:47
|
Revision: 12123 http://plplot.svn.sourceforge.net/plplot/?rev=12123&view=rev Author: andrewross Date: 2012-01-05 13:59:36 +0000 (Thu, 05 Jan 2012) Log Message: ----------- Simplify the Makefile.examples support by removing all mentions of plplot-config since it no longer exists. Also remove pkg_config_true and pkg_config_false logic since this serves no useful purpose now. Without pkg-config the Makefiles won't work anyway. There is always the cmake alternative build system. Modified Paths: -------------- trunk/cmake/modules/pkg-config.cmake trunk/debian/rules trunk/doc/docbook/src/deploying.xml trunk/examples/c/Makefile.examples.in trunk/examples/c++/Makefile.examples.in trunk/examples/d/Makefile.examples.in trunk/examples/f77/Makefile.examples.in trunk/examples/f95/Makefile.examples.in trunk/examples/ocaml/Makefile.examples.in trunk/examples/tk/Makefile.examples.in Modified: trunk/cmake/modules/pkg-config.cmake =================================================================== --- trunk/cmake/modules/pkg-config.cmake 2012-01-05 13:00:11 UTC (rev 12122) +++ trunk/cmake/modules/pkg-config.cmake 2012-01-05 13:59:36 UTC (rev 12123) @@ -30,12 +30,6 @@ # PKG_CONFIG_EXECUTABLE - name of pkg-config executable, but can also be # used for logical control with, e.g., # if(PKG_CONFIG_EXECUTABLE) -# pkg_config_true - if null string, then example builds done with -# pkg-config method. if "#" then that method is -# commented out. -# pkg_config_false - always "#" to comment out example builds with -# plplot_config method which does not exist for -# cmake build system. # PKG_CONFIG_DIR - install location for configured PLplot # pkg-config files. # PKG_CONFIG_ENV - the string PKG_CONFIG_PATH=${PKG_CONFIG_DIR} which @@ -43,20 +37,14 @@ include(FindPkgConfig) -set(pkg_config_false "#") - if(PKG_CONFIG_EXECUTABLE) message(STATUS "Looking for pkg-config - found") - set(pkg_config_true "") set(PKG_CONFIG_DIR ${LIB_DIR}/pkgconfig) set(PKG_CONFIG_ENV PKG_CONFIG_PATH=${PKG_CONFIG_DIR}) else(PKG_CONFIG_EXECUTABLE) message(STATUS "Looking for pkg-config - not found") message(STATUS - "WARNING: Makefile+pkg-config version of examples build in the install tree will be disabled.") - # Turn off pkg-config build. (This means both build methods will be - # commented out.) - set(pkg_config_true "#") + "WARNING: Makefile+pkg-config version of examples build in the install tree will not work.") endif(PKG_CONFIG_EXECUTABLE) macro(pkg_check_pkgconfig _package _include_DIR _link_DIR _link_FLAGS _cflags _version) Modified: trunk/debian/rules =================================================================== --- trunk/debian/rules 2012-01-05 13:00:11 UTC (rev 12122) +++ trunk/debian/rules 2012-01-05 13:59:36 UTC (rev 12123) @@ -159,7 +159,6 @@ install --mode=644 examples/perl/x* examples/perl/README* \ $(debex)/perl mv $(debex) $(debdoc)/$(libpkg) - rm -f $(debtmp)/usr/bin/plplot-config for i in libplplot-dev plplot-tcl plplot-tcl-dev \ plplot11-driver-gd plplot11-driver-xwin octave-plplot \ Modified: trunk/doc/docbook/src/deploying.xml =================================================================== --- trunk/doc/docbook/src/deploying.xml 2012-01-05 13:00:11 UTC (rev 12122) +++ trunk/doc/docbook/src/deploying.xml 2012-01-05 13:59:36 UTC (rev 12123) @@ -91,7 +91,7 @@ url="http://plplot.sourceforge.net/resources/index.html">Resources area</ulink> of the PLplot web site for locations of debs and rpms.) Build the application on the build machine using the results of the - <userinput>plplot-config --cflags --libs</userinput> command, and copy + <userinput>pkg-config --cflags --libs plplotd</userinput> command, and copy the resulting executable(s) to the users' machines. </para> @@ -129,7 +129,7 @@ <listitem> <para> Build the application(s) on the build machine using the results - of the <userinput>plplot-config --cflags --libs</userinput> + of the <userinput>pkg-config --cflags --libs plplotd</userinput> command, and copy the resulting executable(s) to the users' machines. Since the PLplot install location is consistent on all machines, the application should work the same way on all Modified: trunk/examples/c/Makefile.examples.in =================================================================== --- trunk/examples/c/Makefile.examples.in 2012-01-05 13:00:11 UTC (rev 12122) +++ trunk/examples/c/Makefile.examples.in 2012-01-05 13:59:36 UTC (rev 12123) @@ -24,19 +24,19 @@ CC = @CC@ EXEEXT = @EXEEXT@ -@pkg_config_true@LIB_TAG = @LIB_TAG@ -@pkg_config_true@PKG_CONFIG_ENV = @PKG_CONFIG_ENV@ -@pkg_config_true@RPATHCMD = @RPATHCMD@ +LIB_TAG = @LIB_TAG@ +PKG_CONFIG_ENV = @PKG_CONFIG_ENV@ +RPATHCMD = @RPATHCMD@ @gcw_true@PLPLOTCANVAS_EXECUTABLES_list = \ @gcw_true@ plplotcanvas_demo$(EXEEXT) \ @gcw_true@ plplotcanvas_animation$(EXEEXT) -@extXdrawable_true@@pkg_config_true@extXdrawable_EXECUTABLES_list = \ -@extXdrawable_true@@pkg_config_true@ extXdrawable_demo$(EXEEXT) +@extXdrawable_true@extXdrawable_EXECUTABLES_list = \ +@extXdrawable_true@ extXdrawable_demo$(EXEEXT) -@extcairo_true@@pkg_config_true@extcairo_EXECUTABLES_list = \ -@extcairo_true@@pkg_config_true@ ext-cairo-test$(EXEEXT) +@extcairo_true@extcairo_EXECUTABLES_list = \ +@extcairo_true@ ext-cairo-test$(EXEEXT) EXECUTABLES_list = \ x00c$(EXEEXT) \ @@ -83,29 +83,23 @@ rm -f $(EXECUTABLES_list) @gcw_true@plplotcanvas_demo$(EXEEXT): plplotcanvas_demo.c -@gcw_true@@pkg_config_true@ $(CC) $< -o $@ $(RPATHCMD) \ -@gcw_true@@pkg_config_true@ `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG)-gnome2` -@gcw_true@@pkg_config_false@ $(CC) $< -o $@ \ -@gcw_true@@pkg_config_false@ `plplot-config @PC_STATIC_OPTION@ --cflags --libs --with-gcw` +@gcw_true@ $(CC) $< -o $@ $(RPATHCMD) \ +@gcw_true@ `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG)-gnome2` @gcw_true@plplotcanvas_animation$(EXEEXT): plplotcanvas_animation.c -@gcw_true@@pkg_config_true@ $(CC) $< -o $@ $(RPATHCMD) \ -@gcw_true@@pkg_config_true@ `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG)-gnome2` \ -@gcw_true@@pkg_config_true@ `pkg-config @PC_STATIC_OPTION@ --cflags --libs gthread-2.0` -@gcw_true@@pkg_config_false@ $(CC) $< -o \ -@gcw_true@@pkg_config_false@ $@ `plplot-config --cflags --libs --with-gcw` \ -@gcw_true@@pkg_config_false@ @GCWTHREAD_CFLAGS@ @GCWTHREAD_LIBS@ +@gcw_true@ $(CC) $< -o $@ $(RPATHCMD) \ +@gcw_true@ `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG)-gnome2` \ +@gcw_true@ `pkg-config @PC_STATIC_OPTION@ --cflags --libs gthread-2.0` -@extXdrawable_true@@pkg_config_true@extXdrawable_demo$(EXEEXT): extXdrawable_demo.c -@extXdrawable_true@@pkg_config_true@ $(CC) $< -o $@ $(RPATHCMD) \ -@extXdrawable_true@@pkg_config_true@ `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG) gtk+-x11-2.0` +@extXdrawable_true@extXdrawable_demo$(EXEEXT): extXdrawable_demo.c +@extXdrawable_true@ $(CC) $< -o $@ $(RPATHCMD) \ +@extXdrawable_true@ `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG) gtk+-x11-2.0` -@extcairo_true@@pkg_config_true@ext-cairo-test$(EXEEXT): ext-cairo-test.c -@extcairo_true@@pkg_config_true@ $(CC) $< -o $@ $(RPATHCMD) \ -@extcairo_true@@pkg_config_true@ `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG) cairo` +@extcairo_true@ext-cairo-test$(EXEEXT): ext-cairo-test.c +@extcairo_true@ $(CC) $< -o $@ $(RPATHCMD) \ +@extcairo_true@ `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG) cairo` .c$(EXEEXT): -@pkg_config_true@ $(CC) $< -o $@ $(RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG)` -@pkg_config_false@ $(CC) $< -o $@ `plplot-config --cflags --libs` + $(CC) $< -o $@ $(RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG)` .SUFFIXES: .c $(EXEEXT) Modified: trunk/examples/c++/Makefile.examples.in =================================================================== --- trunk/examples/c++/Makefile.examples.in 2012-01-05 13:00:11 UTC (rev 12122) +++ trunk/examples/c++/Makefile.examples.in 2012-01-05 13:59:36 UTC (rev 12123) @@ -24,17 +24,17 @@ CXX = @CXX@ EXEEXT = @EXEEXT@ -@pkg_config_true@LIB_TAG = @LIB_TAG@ -@pkg_config_true@PKG_CONFIG_ENV = @PKG_CONFIG_ENV@ -@pkg_config_true@RPATHCMD = @RPATHCMD@ +LIB_TAG = @LIB_TAG@ +PKG_CONFIG_ENV = @PKG_CONFIG_ENV@ +RPATHCMD = @RPATHCMD@ @qt_gui_true@QT_MOC_EXECUTABLE = @QT_MOC_EXECUTABLE@ -@qt_gui_true@@pkg_config_true@qt_RPATHCMD = @qt_RPATHCMD@ +@qt_gui_true@qt_RPATHCMD = @qt_RPATHCMD@ -@wxwidgets_true@@pkg_config_true@PLPLOTWXWIDGETS_EXECUTABLES_list = \ -@wxwidgets_true@@pkg_config_true@ wxPLplotDemo$(EXEEXT) +@wxwidgets_true@PLPLOTWXWIDGETS_EXECUTABLES_list = \ +@wxwidgets_true@ wxPLplotDemo$(EXEEXT) -@qt_gui_true@@pkg_config_true@qt_gui_EXECUTABLES_list = \ -@qt_gui_true@@pkg_config_true@ qt_example$(EXEEXT) +@qt_gui_true@qt_gui_EXECUTABLES_list = \ +@qt_gui_true@ qt_example$(EXEEXT) EXECUTABLES_list = \ x01cc$(EXEEXT) \ @@ -79,19 +79,18 @@ clean: rm -f $(EXECUTABLES_list) -@wxwidgets_true@@pkg_config_true@wxPLplotDemo$(EXEEXT): wxPLplotDemo.cpp -@wxwidgets_true@@pkg_config_true@ $(CXX) $< -o $@ $(RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG)-wxwidgets` +@wxwidgets_true@wxPLplotDemo$(EXEEXT): wxPLplotDemo.cpp +@wxwidgets_true@ $(CXX) $< -o $@ $(RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG)-wxwidgets` # Note, must filter out -p options which confuse $(QT_MOC_EXECUTABLE). Such # options (e.g., -pthread) tend to appear in the static driver case. -@qt_gui_true@@pkg_config_true@moc_qt_PlotWindow.cpp: qt_PlotWindow.h -@qt_gui_true@@pkg_config_true@ $(QT_MOC_EXECUTABLE) `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags-only-I plplot$(LIB_TAG)-qt` $< -o $@ +@qt_gui_true@moc_qt_PlotWindow.cpp: qt_PlotWindow.h +@qt_gui_true@ $(QT_MOC_EXECUTABLE) `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags-only-I plplot$(LIB_TAG)-qt` $< -o $@ -@qt_gui_true@@pkg_config_true@qt_example$(EXEEXT): qt_example.cpp qt_PlotWindow.cpp moc_qt_PlotWindow.cpp -@qt_gui_true@@pkg_config_true@ $(CXX) qt_example.cpp qt_PlotWindow.cpp moc_qt_PlotWindow.cpp -o $@ $(qt_RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG)-qt` `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot${LIB_TAG}` +@qt_gui_true@qt_example$(EXEEXT): qt_example.cpp qt_PlotWindow.cpp moc_qt_PlotWindow.cpp +@qt_gui_true@ $(CXX) qt_example.cpp qt_PlotWindow.cpp moc_qt_PlotWindow.cpp -o $@ $(qt_RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG)-qt` `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot${LIB_TAG}` .cc$(EXEEXT): -@pkg_config_true@ $(CXX) $< -o $@ $(RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG)-c++` -@pkg_config_false@ $(CXX) $< -o $@ `plplot-config --cflags --libs --with-c++` + $(CXX) $< -o $@ $(RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG)-c++` .SUFFIXES: .cc $(EXEEXT) Modified: trunk/examples/d/Makefile.examples.in =================================================================== --- trunk/examples/d/Makefile.examples.in 2012-01-05 13:00:11 UTC (rev 12122) +++ trunk/examples/d/Makefile.examples.in 2012-01-05 13:59:36 UTC (rev 12123) @@ -22,9 +22,9 @@ DC = @DC@ EXEEXT = @EXEEXT@ -@pkg_config_true@LIB_TAG = @LIB_TAG@ -@pkg_config_true@PKG_CONFIG_ENV = @PKG_CONFIG_ENV@ -@pkg_config_true@RPATHCMD = @RPATHCMD@ +LIB_TAG = @LIB_TAG@ +PKG_CONFIG_ENV = @PKG_CONFIG_ENV@ +RPATHCMD = @RPATHCMD@ EXECUTABLES_list = \ x01d$(EXEEXT) \ @@ -66,6 +66,6 @@ rm -f $(EXECUTABLES_list) .d$(EXEEXT): -@pkg_config_true@ $(DC) $< -o $@ $(RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG)-d` + $(DC) $< -o $@ $(RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG)-d` .SUFFIXES: .d $(EXEEXT) Modified: trunk/examples/f77/Makefile.examples.in =================================================================== --- trunk/examples/f77/Makefile.examples.in 2012-01-05 13:00:11 UTC (rev 12122) +++ trunk/examples/f77/Makefile.examples.in 2012-01-05 13:59:36 UTC (rev 12123) @@ -24,9 +24,9 @@ F77 = @F77@ EXEEXT = @EXEEXT@ -@pkg_config_true@LIB_TAG = @LIB_TAG@ -@pkg_config_true@PKG_CONFIG_ENV = @PKG_CONFIG_ENV@ -@pkg_config_true@RPATHCMD = @RPATHCMD@ +LIB_TAG = @LIB_TAG@ +PKG_CONFIG_ENV = @PKG_CONFIG_ENV@ +RPATHCMD = @RPATHCMD@ EXECUTABLES_list = \ x01f$(EXEEXT) \ @@ -70,7 +70,6 @@ rm -f $(EXECUTABLES_list) .f$(EXEEXT): -@pkg_config_true@ $(F77) $< -o $@ $(RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG)-f77` -@pkg_config_false@ $(F77) $< -o $@ `plplot-config --cflags --libs --with-f77` + $(F77) $< -o $@ $(RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG)-f77` .SUFFIXES: .f $(EXEEXT) Modified: trunk/examples/f95/Makefile.examples.in =================================================================== --- trunk/examples/f95/Makefile.examples.in 2012-01-05 13:00:11 UTC (rev 12122) +++ trunk/examples/f95/Makefile.examples.in 2012-01-05 13:59:36 UTC (rev 12123) @@ -24,9 +24,9 @@ F95 = @FC@ EXEEXT = @EXEEXT@ -@pkg_config_true@LIB_TAG = @LIB_TAG@ -@pkg_config_true@PKG_CONFIG_ENV = @PKG_CONFIG_ENV@ -@pkg_config_true@RPATHCMD = @RPATHCMD@ +LIB_TAG = @LIB_TAG@ +PKG_CONFIG_ENV = @PKG_CONFIG_ENV@ +RPATHCMD = @RPATHCMD@ EXECUTABLES_list = \ x01f$(EXEEXT) \ @@ -69,7 +69,6 @@ rm -f $(EXECUTABLES_list) .f90$(EXEEXT): -@pkg_config_true@ $(F95) @MODULESINCCMD@ $< -o $@ $(RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG)-f95` -lplf95demolib$(LIB_TAG) -@pkg_config_false@ $(F95) @MODULESINCCMD@ $< -o $@ `plplot-config --cflags --libs --with-f95` + $(F95) @MODULESINCCMD@ $< -o $@ $(RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG)-f95` -lplf95demolib$(LIB_TAG) .SUFFIXES: .f90 $(EXEEXT) Modified: trunk/examples/ocaml/Makefile.examples.in =================================================================== --- trunk/examples/ocaml/Makefile.examples.in 2012-01-05 13:00:11 UTC (rev 12122) +++ trunk/examples/ocaml/Makefile.examples.in 2012-01-05 13:59:36 UTC (rev 12123) @@ -24,13 +24,12 @@ OCAMLC = @OCAML_EXAMPLE_COMPILER@ EXEEXT = @EXEEXT@ -@pkg_config_true@LIB_TAG = @LIB_TAG@ -@pkg_config_true@PKG_CONFIG_ENV = @PKG_CONFIG_ENV@ -@pkg_config_true@RPATHCMD = -ccopt "@RPATHCMD@" +LIB_TAG = @LIB_TAG@ +PKG_CONFIG_ENV = @PKG_CONFIG_ENV@ +RPATHCMD = -ccopt "@RPATHCMD@" OCAML_CFLAGS = -g -I @OCAML_INSTALL_DIR@/plplot -@pkg_config_true@OCAML_LIBS = $(RPATHCMD) -ccopt "-L@CMAKE_INSTALL_LIBDIR@" plplot.@OCAML_EXAMPLE_LIBEXT@ unix.@OCAML_EXAMPLE_LIBEXT@ -@pkg_config_false@OCAML_LIBS = -ccopt "-L@CMAKE_INSTALL_LIBDIR@" plplot.@OCAML_EXAMPLE_LIBEXT@ unix.@OCAML_EXAMPLE_LIBEXT@ +OCAML_LIBS = $(RPATHCMD) -ccopt "-L@CMAKE_INSTALL_LIBDIR@" plplot.@OCAML_EXAMPLE_LIBEXT@ unix.@OCAML_EXAMPLE_LIBEXT@ EXECUTABLES_list = \ x01ocaml$(EXEEXT) \ Modified: trunk/examples/tk/Makefile.examples.in =================================================================== --- trunk/examples/tk/Makefile.examples.in 2012-01-05 13:00:11 UTC (rev 12122) +++ trunk/examples/tk/Makefile.examples.in 2012-01-05 13:59:36 UTC (rev 12123) @@ -23,9 +23,9 @@ CC = @CC@ EXEEXT = @EXEEXT@ -@pkg_config_true@LIB_TAG = @LIB_TAG@ -@pkg_config_true@PKG_CONFIG_ENV = @PKG_CONFIG_ENV@ -@pkg_config_true@RPATHCMD = @RPATHCMD@ +LIB_TAG = @LIB_TAG@ +PKG_CONFIG_ENV = @PKG_CONFIG_ENV@ +RPATHCMD = @RPATHCMD@ EXECUTABLES_list = xtk01$(EXEEXT) # Second and fourth examples depend on itk. @@ -37,7 +37,6 @@ rm -f $(EXECUTABLES_list) $(itk_EXECUTABLES_list) .c$(EXEEXT): -@pkg_config_true@ $(CC) $< -o $@ $(RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG)-tcl` -lm -@pkg_config_false@ $(CC) $< -o $@ `plplot-config --cflags --libs --with-tcl` -lm + $(CC) $< -o $@ $(RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config @PC_STATIC_OPTION@ --cflags --libs plplot$(LIB_TAG)-tcl` -lm .SUFFIXES: .c $(EXEEXT) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2012-01-14 23:18:00
|
Revision: 12128 http://plplot.svn.sourceforge.net/plplot/?rev=12128&view=rev Author: airwin Date: 2012-01-14 23:17:53 +0000 (Sat, 14 Jan 2012) Log Message: ----------- Style previous commits. Modified Paths: -------------- trunk/bindings/tk/plframe.c trunk/bindings/tk/plserver.c trunk/drivers/cairo.c trunk/drivers/psttf.cc trunk/drivers/test-drv-info.c trunk/examples/c++/x15.cc trunk/src/plcore.c trunk/src/pllegend.c trunk/src/plstdio.c trunk/utils/pltek.c Modified: trunk/bindings/tk/plframe.c =================================================================== --- trunk/bindings/tk/plframe.c 2012-01-13 02:06:02 UTC (rev 12127) +++ trunk/bindings/tk/plframe.c 2012-01-14 23:17:53 UTC (rev 12128) @@ -3274,7 +3274,7 @@ int argc, const char **argv ) { PLFLT x, y; - char tmpstring[50]; + char tmpstring[50]; // fprintf( stdout, "Made it into report, argc=%d\n", argc ); if ( argc == 0 ) Modified: trunk/bindings/tk/plserver.c =================================================================== --- trunk/bindings/tk/plserver.c 2012-01-13 02:06:02 UTC (rev 12127) +++ trunk/bindings/tk/plserver.c 2012-01-14 23:17:53 UTC (rev 12128) @@ -253,11 +253,11 @@ static int plExitCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, char **argv ) { - int value = 0; + int value = 0; const char *res; // Print error message if one given - + res = Tcl_GetStringResult( interp ); if ( res[0] != '\0' ) fprintf( stderr, "%s\n", res ); Modified: trunk/drivers/cairo.c =================================================================== --- trunk/drivers/cairo.c 2012-01-13 02:06:02 UTC (rev 12127) +++ trunk/drivers/cairo.c 2012-01-14 23:17:53 UTC (rev 12128) @@ -522,7 +522,6 @@ void plD_esc_cairo( PLStream *pls, PLINT op, void *ptr ) { - switch ( op ) { case PLESC_FILL: // filled polygon Modified: trunk/drivers/psttf.cc =================================================================== --- trunk/drivers/psttf.cc 2012-01-13 02:06:02 UTC (rev 12127) +++ trunk/drivers/psttf.cc 2012-01-14 23:17:53 UTC (rev 12128) @@ -848,16 +848,16 @@ // Be generous. Used to store lots of font changes which take // 3 characters per change. #define PROC_STR_STRING_LENGTH 1000 - char *strp, str[PROC_STR_STRING_LENGTH], *cur_strp, - cur_str[PROC_STR_STRING_LENGTH]; - float font_factor = 1.4; - PLINT clxmin, clxmax, clymin, clymax; // Clip limits - PLINT clipx[4], clipy[4]; // Current clip limits + char *strp, str[PROC_STR_STRING_LENGTH], *cur_strp, + cur_str[PROC_STR_STRING_LENGTH]; + float font_factor = 1.4; + PLINT clxmin, clxmax, clymin, clymax; // Clip limits + PLINT clipx[4], clipy[4]; // Current clip limits - PLFLT scale = 1., up = 0.; // Font scaling and shifting parameters + PLFLT scale = 1., up = 0.; // Font scaling and shifting parameters - double lineSpacing, xAdvance, ymintmp, ymaxtmp, ymin, ymax, xmin, xmax; - PLINT xx[4], yy[4]; + double lineSpacing, xAdvance, ymintmp, ymaxtmp, ymin, ymax, xmin, xmax; + PLINT xx[4], yy[4]; // unicode only! so test for it. if ( args->unicode_array_len > 0 ) Modified: trunk/drivers/test-drv-info.c =================================================================== --- trunk/drivers/test-drv-info.c 2012-01-13 02:06:02 UTC (rev 12127) +++ trunk/drivers/test-drv-info.c 2012-01-14 23:17:53 UTC (rev 12128) @@ -17,7 +17,7 @@ // // You should have received a copy of the GNU Library General Public License // along with the GNU C Library; see the file COPYING.LIB. If not, write to -// the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +// the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, // MA 02110-1301, USA. // Modified: trunk/examples/c++/x15.cc =================================================================== --- trunk/examples/c++/x15.cc 2012-01-13 02:06:02 UTC (rev 12127) +++ trunk/examples/c++/x15.cc 2012-01-14 23:17:53 UTC (rev 12128) @@ -41,14 +41,14 @@ private: // Class data - plstream *pls; + plstream *pls; - const static int XPTS; - const static int YPTS; + const static int XPTS; + const static int YPTS; }; -const int x15:: XPTS = 35; -const int x15:: YPTS = 46; +const int x15:: XPTS = 35; +const int x15:: YPTS = 46; x15::x15( int argc, const char ** argv ) Modified: trunk/src/plcore.c =================================================================== --- trunk/src/plcore.c 2012-01-13 02:06:02 UTC (rev 12127) +++ trunk/src/plcore.c 2012-01-14 23:17:53 UTC (rev 12128) @@ -1948,7 +1948,7 @@ x0 = ( plsc->phyxma + plsc->phyxmi ) / 2.; y0 = ( plsc->phyyma + plsc->phyymi ) / 2.; -// Rotation +// Rotation cost = ABS( cos( plsc->diorot * PI / 2. ) ); sint = ABS( sin( plsc->diorot * PI / 2. ) ); Modified: trunk/src/pllegend.c =================================================================== --- trunk/src/pllegend.c 2012-01-13 02:06:02 UTC (rev 12127) +++ trunk/src/pllegend.c 2012-01-14 23:17:53 UTC (rev 12128) @@ -573,7 +573,7 @@ PLFLT x_legend_position, y_legend_position, xsign, ysign; //PLINT some_boxes = 0, some_lines = 0; - PLINT some_symbols = 0; + PLINT some_symbols = 0; PLINT max_symbol_numbers = 0; PLINT irow = 0, icolumn = 0; Modified: trunk/src/plstdio.c =================================================================== --- trunk/src/plstdio.c 2012-01-13 02:06:02 UTC (rev 12127) +++ trunk/src/plstdio.c 2012-01-14 23:17:53 UTC (rev 12128) @@ -99,7 +99,7 @@ bytes = fread( buf, size, nmemb, stream ); - if ( (bytes < nmemb) && ferror( stream ) ) + if ( ( bytes < nmemb ) && ferror( stream ) ) { // The read resulted in an error plabort( "Error reading from file" ); Modified: trunk/utils/pltek.c =================================================================== --- trunk/utils/pltek.c 2012-01-13 02:06:02 UTC (rev 12127) +++ trunk/utils/pltek.c 2012-01-14 23:17:53 UTC (rev 12128) @@ -30,13 +30,13 @@ int main( int argc, char *argv[] ) { - FILE *fd; - int i, npage, ipage, ifirst, oldpage; + FILE *fd; + int i, npage, ipage, ifirst, oldpage; size_t j, nb; - int istop; - long start[MAXPAGES]; // start (offset) of each page - char buf[BUFSZ], xtra, lastchar = '\0'; - char c, ibuf[128], *t; + int istop; + long start[MAXPAGES]; // start (offset) of each page + char buf[BUFSZ], xtra, lastchar = '\0'; + char c, ibuf[128], *t; if ( argc < 2 ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2012-01-14 23:47:17
|
Revision: 12130 http://plplot.svn.sourceforge.net/plplot/?rev=12130&view=rev Author: airwin Date: 2012-01-14 23:47:11 +0000 (Sat, 14 Jan 2012) Log Message: ----------- Change invocation of the Python version of plgriddata. # old version (which overwrites preexisting zg in place): zg = reshape(zeros(xp*yp),(xp,yp)) plgriddata(x, y, z, xg, yg, zg, alg, opt[alg-1]) # new version (which uses a properly returned newly created NumPy array # as per the normal Python expectations): zg = plgriddata(x, y, z, xg, yg, alg, opt[alg-1]) Modified Paths: -------------- trunk/README.release trunk/bindings/python/plplotcmodule.i trunk/doc/docbook/src/api.xml trunk/examples/python/xw21.py Modified: trunk/README.release =================================================================== --- trunk/README.release 2012-01-14 23:19:10 UTC (rev 12129) +++ trunk/README.release 2012-01-14 23:47:11 UTC (rev 12130) @@ -89,6 +89,19 @@ OFFICIAL NOTICES FOR USERS +(5.9.10) Those who use the Python version of plgriddata will have to +change their use of this function for this release as follows (see +examples/xw21.py) + +# old version (which overwrites preexisting zg in place): +zg = reshape(zeros(xp*yp),(xp,yp)) +plgriddata(x, y, z, xg, yg, zg, alg, opt[alg-1]) + +# new version (which uses a properly returned newly created NumPy array +# as per the normal Python expectations): + +zg = plgriddata(x, y, z, xg, yg, alg, opt[alg-1]) + (5.9.10) Significant efforts have been made to ensure the PLplot code is standards compliant and free from warnings. Compilance has been tested using the gcc compiler suite -std, -pedantic and -W flags. The Modified: trunk/bindings/python/plplotcmodule.i =================================================================== --- trunk/bindings/python/plplotcmodule.i 2012-01-14 23:19:10 UTC (rev 12129) +++ trunk/bindings/python/plplotcmodule.i 2012-01-14 23:47:11 UTC (rev 12130) @@ -555,7 +555,8 @@ free( $1 ); } -// 2D array, check for consistency input / output version +// 2D array, check for consistency and modify in place version (no longer used +// in favor of correct output version in the combined typemap below). %typemap( in ) PLFLT * *OutMatrixCk( PyArrayObject * tmp ) { int i, size; @@ -577,6 +578,41 @@ free( $1 ); } +// Combined typemap useful for specialized case of plgriddata. +// Set Y length for consistency checking, with trailing count +// combined with 2D output array, check for consistency +%typemap( in ) ( const PLFLT * ArrayY, PLINT ny, PLFLT * *OutMatrixCk ) ( PyArrayObject * tmp, PyObject * array = NULL ) +{ + int i, size; + npy_intp dims[2]; + tmp = (PyArrayObject *) myArray_ContiguousFromObject( $input, PyArray_PLFLT, 1, 1 ); + if ( tmp == NULL ) + return NULL; + Ylen = tmp->dimensions[0]; + $2 = Ylen; + $1 = (PLFLT *) tmp->data; + // Make created 2D array have dimensions from prior ArrayX in the argument + // list and this ArrayY. + dims[0] = Xlen; + dims[1] = Ylen; + array = PyArray_SimpleNew( 2, dims, NPY_DOUBLE ); + if ( !array ) + return NULL; + size = (int) ( sizeof ( double ) * Ylen ); + $3 = (double **) malloc( sizeof ( double * ) * Xlen ); + for ( i = 0; i < Xlen; i++ ) + $3[i] = (double *) ( ( (PyArrayObject *) array )->data + i * size ); +} +%typemap( freearg ) ( const PLFLT * ArrayY, PLINT ny, PLFLT * *OutMatrixCk ) +{ + Py_DECREF( tmp$argnum ); + free( $3 ); +} +%typemap( argout ) ( const PLFLT * ArrayY, PLINT ny, PLFLT * *OutMatrixCk ) +{ + $result = SWIG_Python_AppendOutput( $result, array$argnum ); +} + //************************** // special for pllegend, char ** ArrayCk //*************************** Modified: trunk/doc/docbook/src/api.xml =================================================================== --- trunk/doc/docbook/src/api.xml 2012-01-14 23:19:10 UTC (rev 12129) +++ trunk/doc/docbook/src/api.xml 2012-01-14 23:47:11 UTC (rev 12130) @@ -5017,6 +5017,11 @@ Perl/PDL: Not available? </para> </listitem> + <listitem> + <para> + Python: <literal><parameter>zg</parameter>=<function>plgriddata(x, y, z, xg, yg, type, data)</function> + </para> + </listitem> </itemizedlist> </para> Modified: trunk/examples/python/xw21.py =================================================================== --- trunk/examples/python/xw21.py 2012-01-14 23:19:10 UTC (rev 12129) +++ trunk/examples/python/xw21.py 2012-01-14 23:47:11 UTC (rev 12130) @@ -113,8 +113,7 @@ for k in range(2): pladv(0) for alg in range(1,7): - zg = reshape(zeros(xp*yp),(xp,yp)) - plgriddata(x, y, z, xg, yg, zg, alg, opt[alg-1]) + zg = plgriddata(x, y, z, xg, yg, alg, opt[alg-1]) if alg == GRID_CSA or alg == GRID_DTLI or alg == GRID_NNLI or alg == GRID_NNI: for i in range(xp): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2012-01-17 19:20:18
|
Revision: 12134 http://plplot.svn.sourceforge.net/plplot/?rev=12134&view=rev Author: airwin Date: 2012-01-17 19:20:11 +0000 (Tue, 17 Jan 2012) Log Message: ----------- Speed up the deprecation/removal of the f77 bindings and examples as discussed on list. Modified Paths: -------------- trunk/README.release trunk/cmake/modules/fortran.cmake Modified: trunk/README.release =================================================================== --- trunk/README.release 2012-01-16 18:39:42 UTC (rev 12133) +++ trunk/README.release 2012-01-17 19:20:11 UTC (rev 12134) @@ -148,18 +148,19 @@ as well all g77's legacy features). An important consequence is that we can not test the implementation for -compliance to the FORTRAN 77 standard. Current Fortran compilers do -allow this for the Fortran 95 standard. +compliance to the FORTRAN 77 standard. +Furthermore, we would prefer to concentrate all our Fortran +development effort on our f95 bindings and strongly encourage all our +Fortran users to use those bindings if they haven't switched from the +f77 version already. Therefore, as of this release we are deprecating +the f77 bindings and examples and plan no further support for them. +We signal this deprecation by disabling f77 by default (although our +users can still get access to these unsupported bindings and examples +for now by specifying the -DENABLE_f77=ON cmake option). -We therefore want to encourage anyone who uses PLplot with Fortran programs -to use the Fortran 95 bindings. In the next release we will turn off -the FORTRAN 77 bindings by default. That is, you can still build them -and use them but you will need to specify that explicitly via the -CMake options. +We plan to completely remove the f77 bindings and examples +two releases after this one. -In some future release we will deprecate these bindings. When this -will happen has not been decided yet. - (5.9.10) We have found that some distributions of the Windows MinGW/gfortran compiler (i.e., MinGW/gfortran 4.6.1 and 4.6.2 from http://www.equation.com) may cause a link error due to duplicate Modified: trunk/cmake/modules/fortran.cmake =================================================================== --- trunk/cmake/modules/fortran.cmake 2012-01-16 18:39:42 UTC (rev 12133) +++ trunk/cmake/modules/fortran.cmake 2012-01-17 19:20:11 UTC (rev 12134) @@ -26,7 +26,7 @@ option(ENABLE_f77 "Enable f77 bindings" OFF) option(ENABLE_f95 "Enable f95 bindings" OFF) else(DEFAULT_NO_BINDINGS) - option(ENABLE_f77 "Enable f77 bindings" ON) + option(ENABLE_f77 "Enable f77 bindings" OFF) option(ENABLE_f95 "Enable f95 bindings" ON) endif(DEFAULT_NO_BINDINGS) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2012-01-22 00:21:32
|
Revision: 12146 http://plplot.svn.sourceforge.net/plplot/?rev=12146&view=rev Author: airwin Date: 2012-01-22 00:21:26 +0000 (Sun, 22 Jan 2012) Log Message: ----------- Style previously committed changes. Modified Paths: -------------- trunk/bindings/d/plplot.d trunk/bindings/java/plplotjavac.i trunk/drivers/psttf.cc trunk/include/plplot.h Modified: trunk/bindings/d/plplot.d =================================================================== --- trunk/bindings/d/plplot.d 2012-01-21 21:58:15 UTC (rev 12145) +++ trunk/bindings/d/plplot.d 2012-01-22 00:21:26 UTC (rev 12146) @@ -2083,7 +2083,7 @@ void c_plstart( char *devname, PLINT nx, PLINT ny ); // Set the coordinate transform -void c_plstransform( ct_func coordinate_transform = null , PLPointer coordinate_transform_data = null); +void c_plstransform( ct_func coordinate_transform = null, PLPointer coordinate_transform_data = null ); // Add a point to a stripchart. void c_plstripa( PLINT id, PLINT pen, PLFLT x, PLFLT y ); Modified: trunk/bindings/java/plplotjavac.i =================================================================== --- trunk/bindings/java/plplotjavac.i 2012-01-21 21:58:15 UTC (rev 12145) +++ trunk/bindings/java/plplotjavac.i 2012-01-22 00:21:26 UTC (rev 12146) @@ -326,10 +326,10 @@ // I hate global variables but this is the best way I can think of to manage consistency // checking among function arguments. %{ - static PLINT Alen = 0; - static PLINT Xlen = 0, Ylen = 0; - static PLFLT **xg; - static PLFLT **yg; + static PLINT Alen = 0; + static PLINT Xlen = 0, Ylen = 0; + static PLFLT **xg; + static PLFLT **yg; static PLcGrid2 *cgrid; %} @@ -1532,11 +1532,11 @@ // Second of two object arrays, where we check X and Y with previous object. %typemap( in ) PLPointer OBJECT_DATA { - jPLFLT **adat; - jobject *ai; - int nx = ( *jenv )->GetArrayLength( jenv, $input ); - int ny = -1; - int i, j; + jPLFLT **adat; + jobject *ai; + int nx = ( *jenv )->GetArrayLength( jenv, $input ); + int ny = -1; + int i, j; ai = (jobject *) malloc( nx * sizeof ( jobject ) ); adat = (jPLFLT **) malloc( nx * sizeof ( jPLFLT * ) ); @@ -1580,12 +1580,12 @@ free( adat ); free( ai ); - cgrid = (PLcGrid2 *) malloc( sizeof ( PLcGrid2 ) ); + cgrid = (PLcGrid2 *) malloc( sizeof ( PLcGrid2 ) ); cgrid->xg = xg; cgrid->yg = yg; cgrid->nx = nx; cgrid->ny = ny; - $1 = cgrid; + $1 = cgrid; } %typemap( freearg ) PLPointer OBJECT_DATA { @@ -1676,11 +1676,11 @@ // This is the version for plimagefr where size is 1 larger than previous // array %typemap( in ) PLPointer OBJECT_DATA_img { - jPLFLT **adat; - jobject *ai; - int nx = ( *jenv )->GetArrayLength( jenv, $input ); - int ny = -1; - int i, j; + jPLFLT **adat; + jobject *ai; + int nx = ( *jenv )->GetArrayLength( jenv, $input ); + int ny = -1; + int i, j; ai = (jobject *) malloc( nx * sizeof ( jobject ) ); adat = (jPLFLT **) malloc( nx * sizeof ( jPLFLT * ) ); @@ -1724,7 +1724,7 @@ free( adat ); free( ai ); - cgrid = (PLcGrid2 *) malloc( sizeof ( PLcGrid2 ) ); + cgrid = (PLcGrid2 *) malloc( sizeof ( PLcGrid2 ) ); cgrid->xg = xg; cgrid->yg = yg; cgrid->nx = nx; Modified: trunk/drivers/psttf.cc =================================================================== --- trunk/drivers/psttf.cc 2012-01-21 21:58:15 UTC (rev 12145) +++ trunk/drivers/psttf.cc 2012-01-22 00:21:26 UTC (rev 12146) @@ -451,7 +451,7 @@ doc->osHeader() << "PSDict begin\n"; doc->osHeader() << "@start\n"; - doc->osHeader() << COPIES << " @copies\n" ; + doc->osHeader() << COPIES << " @copies\n"; doc->osHeader() << "@line\n"; doc->osHeader() << YSIZE << " @hsize\n"; doc->osHeader() << XSIZE << " @vsize\n"; Modified: trunk/include/plplot.h =================================================================== --- trunk/include/plplot.h 2012-01-21 21:58:15 UTC (rev 12145) +++ trunk/include/plplot.h 2012-01-22 00:21:26 UTC (rev 12146) @@ -766,17 +766,17 @@ #ifdef PL_DEPRECATED -#define plclr pleop -#define plpage plbop -#define plcol plcol0 -#define plcontf plfcont +#define plclr pleop +#define plpage plbop +#define plcol plcol0 +#define plcontf plfcont // Comment out these as they can upset the C++ bindings since the C++ -// bindings use the function names without the pl prefix. +// bindings use the function names without the pl prefix. //#define Alloc2dGrid plAlloc2dGrid //#define Free2dGrid plFree2dGrid //#define MinMax2dGrid plMinMax2dGrid -#define plP_gvpd plgvpd -#define plP_gvpw plgvpw +#define plP_gvpd plgvpd +#define plP_gvpw plgvpw #define plotsh3d( x, y, z, nx, ny, opt ) plsurf3d( x, y, z, nx, ny, opt, NULL, 0 ) #endif // PL_DEPRECATED This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |