You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(33) |
Jun
|
Jul
(30) |
Aug
(2) |
Sep
|
Oct
(30) |
Nov
(136) |
Dec
(59) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(255) |
Feb
(169) |
Mar
(322) |
Apr
(185) |
May
(33) |
Jun
(89) |
Jul
(47) |
Aug
(59) |
Sep
(40) |
Oct
(31) |
Nov
(74) |
Dec
(84) |
2002 |
Jan
(163) |
Feb
(78) |
Mar
(23) |
Apr
(5) |
May
(22) |
Jun
(75) |
Jul
(143) |
Aug
(48) |
Sep
(111) |
Oct
(58) |
Nov
(124) |
Dec
(278) |
2003 |
Jan
(106) |
Feb
(276) |
Mar
(354) |
Apr
(97) |
May
(14) |
Jun
(3) |
Jul
(7) |
Aug
(21) |
Sep
(83) |
Oct
(110) |
Nov
(3) |
Dec
(119) |
2004 |
Jan
(318) |
Feb
(409) |
Mar
(68) |
Apr
(23) |
May
(105) |
Jun
(147) |
Jul
(69) |
Aug
(53) |
Sep
(23) |
Oct
(14) |
Nov
(15) |
Dec
(63) |
2005 |
Jan
(146) |
Feb
(69) |
Mar
(157) |
Apr
(127) |
May
(166) |
Jun
(8) |
Jul
(5) |
Aug
(3) |
Sep
(8) |
Oct
(17) |
Nov
(29) |
Dec
(34) |
2006 |
Jan
(3) |
Feb
(4) |
Mar
(1) |
Apr
(70) |
May
(241) |
Jun
(82) |
Jul
(344) |
Aug
(196) |
Sep
(87) |
Oct
(57) |
Nov
(121) |
Dec
(86) |
2007 |
Jan
(60) |
Feb
(67) |
Mar
(102) |
Apr
(28) |
May
(13) |
Jun
(29) |
Jul
(38) |
Aug
(56) |
Sep
(91) |
Oct
(89) |
Nov
(50) |
Dec
(68) |
2008 |
Jan
(87) |
Feb
(47) |
Mar
(100) |
Apr
(34) |
May
(65) |
Jun
(54) |
Jul
(98) |
Aug
(128) |
Sep
(109) |
Oct
(141) |
Nov
(40) |
Dec
(206) |
2009 |
Jan
(176) |
Feb
(226) |
Mar
(134) |
Apr
(84) |
May
(152) |
Jun
(85) |
Jul
(91) |
Aug
(153) |
Sep
(141) |
Oct
(59) |
Nov
(87) |
Dec
(75) |
2010 |
Jan
(58) |
Feb
(41) |
Mar
(51) |
Apr
(74) |
May
(81) |
Jun
(39) |
Jul
(30) |
Aug
(43) |
Sep
(76) |
Oct
(59) |
Nov
(62) |
Dec
(52) |
2011 |
Jan
(125) |
Feb
(41) |
Mar
(96) |
Apr
(53) |
May
(21) |
Jun
(23) |
Jul
(48) |
Aug
(71) |
Sep
(37) |
Oct
(81) |
Nov
(60) |
Dec
(32) |
2012 |
Jan
(51) |
Feb
(23) |
Mar
|
Apr
(8) |
May
(2) |
Jun
|
Jul
(8) |
Aug
(25) |
Sep
(4) |
Oct
(32) |
Nov
(17) |
Dec
(2) |
2013 |
Jan
(8) |
Feb
(2) |
Mar
(9) |
Apr
(9) |
May
(37) |
Jun
(48) |
Jul
(63) |
Aug
(42) |
Sep
(59) |
Oct
(83) |
Nov
(141) |
Dec
(133) |
2014 |
Jan
(57) |
Feb
(58) |
Mar
(58) |
Apr
(25) |
May
(14) |
Jun
(3) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
From: <ai...@us...> - 2013-11-18 21:54:29
|
Revision: 12714 http://sourceforge.net/p/plplot/code/12714 Author: airwin Date: 2013-11-18 21:54:26 +0000 (Mon, 18 Nov 2013) Log Message: ----------- Style previous commits. Modified Paths: -------------- trunk/bindings/tk/plserver.c trunk/drivers/tk.c trunk/src/plstdio.c Modified: trunk/bindings/tk/plserver.c =================================================================== --- trunk/bindings/tk/plserver.c 2013-11-18 21:45:22 UTC (rev 12713) +++ trunk/bindings/tk/plserver.c 2013-11-18 21:54:26 UTC (rev 12714) @@ -115,7 +115,7 @@ // Save arglist to get around Tk_ParseArgv limitations - myargv = (const char **) malloc( argc * sizeof(char *) ); + myargv = (const char **) malloc( argc * sizeof ( char * ) ); for ( i = 0; i < argc; i++ ) { myargv[i] = argv[i]; Modified: trunk/drivers/tk.c =================================================================== --- trunk/drivers/tk.c 2013-11-18 21:45:22 UTC (rev 12713) +++ trunk/drivers/tk.c 2013-11-18 21:54:26 UTC (rev 12714) @@ -1518,10 +1518,10 @@ static void link_init( PLStream *pls ) { - TkDev *dev = (TkDev *) pls->dev; - PLiodev *iodev = (PLiodev *) dev->iodev; - size_t bufmax = (size_t) ( pls->bufmax * 1.2 ); - char *dirname = NULL; + TkDev *dev = (TkDev *) pls->dev; + PLiodev *iodev = (PLiodev *) dev->iodev; + size_t bufmax = (size_t) ( pls->bufmax * 1.2 ); + char *dirname = NULL; dbug_enter( "link_init" ); @@ -1529,11 +1529,11 @@ if ( !pls->dp ) { - // This uses the pl_create_tempfifo function to create + // This uses the pl_create_tempfifo function to create // the fifo in a safe manner by first creating a private // temporary directory. iodev->fileName = pl_create_tempfifo( (char **) &iodev->fileName, &dirname ); - if ( dirname == NULL || iodev->fileName == NULL ) + if ( dirname == NULL || iodev->fileName == NULL ) abort_session( pls, "mkfifo error" ); // Tell plframe widget to open FIFO (for reading). @@ -1556,7 +1556,7 @@ // Unlink FIFO so that it isn't left around if program crashes. // This also ensures no other program can mess with it. - if ( unlink( iodev->fileName) == -1 ) + if ( unlink( iodev->fileName ) == -1 ) abort_session( pls, "Error removing fifo" ); if ( rmdir( dirname ) == -1 ) abort_session( pls, "Error removing temporary directory" ); Modified: trunk/src/plstdio.c =================================================================== --- trunk/src/plstdio.c 2013-11-18 21:45:22 UTC (rev 12713) +++ trunk/src/plstdio.c 2013-11-18 21:54:26 UTC (rev 12714) @@ -260,12 +260,12 @@ // pl_create_tempfifo() // // Securely create a temporary fifo and return the file name. -// This only works on POSIX compliant platforms at the moment. -// It creates a secure directory first using mkdtemp, then -// creates the named fifo in this directory. The combination of +// This only works on POSIX compliant platforms at the moment. +// It creates a secure directory first using mkdtemp, then +// creates the named fifo in this directory. The combination of // a private directory and mkfifo failing if the file name already exists // makes this secure against race conditions / DoS attacks. This function -// includes additional functionality over mkdtemp in that it honours the +// includes additional functionality over mkdtemp in that it honours the // TMP / TMPDIR / TEMP environment variables. // // The function returns the file name of the fifo. @@ -274,14 +274,14 @@ pl_create_tempfifo( char **p_fifoname, char **p_dirname ) { #if !defined PL_HAVE_MKDTEMP || !defined PL_HAVE_MKFIFO - plwarn("Creating fifos not supported on this platform"); + plwarn( "Creating fifos not supported on this platform" ); return NULL; -#else +#else FILE *fd; const char *tmpdir; - char *template; - char *dirname; - const char *tmpname = "plplot_dir_XXXXXX"; + char *template; + char *dirname; + const char *tmpname = "plplot_dir_XXXXXX"; const char *fifoname = "plplot_fifo"; int flags; @@ -316,11 +316,11 @@ #endif strcat( dirname, tmpname ); // Create the temporary directory - dirname = mkdtemp( dirname ); + dirname = mkdtemp( dirname ); *p_dirname = dirname; // Now create the fifo in the directory - template = (char *) malloc( sizeof ( char ) * ( strlen( tmpdir ) + strlen( tmpname ) + strlen(fifoname) + 4 ) ); + template = (char *) malloc( sizeof ( char ) * ( strlen( tmpdir ) + strlen( tmpname ) + strlen( fifoname ) + 4 ) ); strcpy( template, dirname ); #if defined ( MSDOS ) || defined ( WIN32 ) strcat( template, "\\" ); @@ -331,13 +331,14 @@ *p_fifoname = template; // Check that mkfifo succeeds safely - if ( mkfifo( template, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH ) < 0 ) { - plwarn( "mkfifo error" ); - free( template ); - *p_fifoname = NULL; - free( dirname ); - *p_dirname = NULL; - return NULL; + if ( mkfifo( template, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH ) < 0 ) + { + plwarn( "mkfifo error" ); + free( template ); + *p_fifoname = NULL; + free( dirname ); + *p_dirname = NULL; + return NULL; } return template; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-18 21:45:25
|
Revision: 12713 http://sourceforge.net/p/plplot/code/12713 Author: airwin Date: 2013-11-18 21:45:22 +0000 (Mon, 18 Nov 2013) Log Message: ----------- Replace call to private TclObjCommandComplete with combination of public calls to Tcl_GetString and Tcl_CommandComplete. Modified Paths: -------------- trunk/bindings/tcl/tclMain.c Modified: trunk/bindings/tcl/tclMain.c =================================================================== --- trunk/bindings/tcl/tclMain.c 2013-11-18 20:17:42 UTC (rev 12712) +++ trunk/bindings/tcl/tclMain.c 2013-11-18 21:45:22 UTC (rev 12713) @@ -54,10 +54,6 @@ #define TclFormatInt( buf, n ) sprintf( ( buf ), "%ld", (long) ( n ) ) -#ifndef TclObjCommandComplete_TCL_DECLARED -EXTERN int TclObjCommandComplete _ANSI_ARGS_( ( Tcl_Obj * cmdPtr ) ); -#endif - # undef TCL_STORAGE_CLASS # define TCL_STORAGE_CLASS DLLEXPORT @@ -68,8 +64,10 @@ // linked into the application. // -EXTERN int Tcl_LinkVar( ); -int ( *tclDummyLinkVarPtr )() = Tcl_LinkVar; +// Experiments show this is no longer required, and in any case +// it screws up using the Tcl stub library. So comment out (AWI). +//EXTERN int Tcl_LinkVar( ); +//int ( *tclDummyLinkVarPtr )() = Tcl_LinkVar; // // Declarations for various library procedures and variables (don't want @@ -90,7 +88,7 @@ static void plPrepOutputHandler( Tcl_Interp *interp, int code, int tty ); -// Other functio prototypes +// Other function prototypes void TclSetStartupScriptFileName( char *fileName ); const char *TclGetStartupScriptFileName( void ); @@ -423,7 +421,7 @@ // Tcl_AppendToObj( commandPtr, "\n", 1 ); - if ( !TclObjCommandComplete( commandPtr ) ) + if ( !Tcl_CommandComplete( Tcl_GetString( commandPtr ) ) ) { gotPartial = 1; continue; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arj...@us...> - 2013-11-18 20:17:45
|
Revision: 12712 http://sourceforge.net/p/plplot/code/12712 Author: arjenmarkus Date: 2013-11-18 20:17:42 +0000 (Mon, 18 Nov 2013) Log Message: ----------- Use [info nameofexecutable] to identify whether the Tcl/Tk interpreter program is "plserver" or one of the standard shells. Include tclsh in the mix and use a switch statement. Modified Paths: -------------- trunk/examples/tk/tkdemos.tcl Modified: trunk/examples/tk/tkdemos.tcl =================================================================== --- trunk/examples/tk/tkdemos.tcl 2013-11-18 19:31:25 UTC (rev 12711) +++ trunk/examples/tk/tkdemos.tcl 2013-11-18 20:17:42 UTC (rev 12712) @@ -43,28 +43,36 @@ set utf8_examples {4 18 24 26 33} # In order to distinguish whether this is a plserver or wish -# environment we assume that $argv0 has the string "plserver" or -# "wish" in it. Some contrived examples can be figured out where this +# environment we assume that [info nameofexecutable] has the string "plserver", +# "wish" or "tclsh" in it. Some contrived examples can be figured out where this # assumption is not correct, and for those cases we simply emit an # error message and return. But normally this assumption is correct, # and it is certainly correct for our tests. -if { [string first "plserver" $argv0] >= 0 } { - # use 'plserver' method - plstdwin . - plxframe .plw - set plwin .plw.plwin -} elseif { [string first "wish" $argv0] >= 0 } { - # use 'wish" method - plframe .plw - set plwin .plw -} else { - puts stderr "Error: argv0 = \"$argv0\"\ndoes not contain either the substrings \"plserver\" or \"wish\"" - puts stderr "Therefore cannot decide how to proceed with tkdemos.tcl so giving up" - return +switch -glob -- [info nameofexecutable] { + "*plserver*" { + # use 'plserver' method + plstdwin . + plxframe .plw + set plwin .plw.plwin + } + "*wish*" - + "*tclsh*" { + # use 'wish" method + plframe .plw + set plwin .plw + } + default { + puts stderr "Error: argv0 = \"$argv0\"\ndoes not contain either the substrings \"plserver\" or \"wish\"" + puts stderr "Therefore cannot decide how to proceed with tkdemos.tcl so giving up" + return + } } +puts "append ..." pack append . .plw {left expand fill} for {set i 0} {$i <= 33} {incr i} { + + puts "$i ..." if {$i != 32} { set demo x[format "%02d" $i] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arj...@us...> - 2013-11-18 19:31:29
|
Revision: 12711 http://sourceforge.net/p/plplot/code/12711 Author: arjenmarkus Date: 2013-11-18 19:31:25 +0000 (Mon, 18 Nov 2013) Log Message: ----------- Add print statements to make it clear to the user what went wrong if parts of the initialization fail. Also use the lappend command to set the auto_path variable, to prevent directories containing spaces to cause difficult to trace problems. Finally distinguish between the tow forms of the "exit" command (with and without a return code). The original code may have been causing segfaults, though it has to be confirmed that that particular problem has been solved. Modified Paths: -------------- trunk/bindings/tk/plserver.c trunk/bindings/tk/tkMain.c Modified: trunk/bindings/tk/plserver.c =================================================================== --- trunk/bindings/tk/plserver.c 2013-11-17 00:49:08 UTC (rev 12710) +++ trunk/bindings/tk/plserver.c 2013-11-18 19:31:25 UTC (rev 12711) @@ -96,7 +96,7 @@ main( int argc, const char **argv ) { int i, myargc = argc; - const char *myargv[20]; + const char **myargv; Tcl_Interp *interp; const char *helpmsg = "Command-specific options:"; @@ -113,8 +113,9 @@ interp = Tcl_CreateInterp(); -// Save arglist to get around tk_ParseArgv limitations +// Save arglist to get around Tk_ParseArgv limitations + myargv = (const char **) malloc( argc * sizeof(char *) ); for ( i = 0; i < argc; i++ ) { myargv[i] = argv[i]; @@ -224,7 +225,7 @@ if ( auto_path != NULL ) { Tcl_SetVar( interp, "dir", auto_path, 0 ); - tcl_cmd( interp, "set auto_path [list $dir $auto_path]" ); + tcl_cmd( interp, "lappend auto_path $dir" ); } // Rename "exit" to "tkexit", and insert custom exit handler @@ -277,8 +278,17 @@ Tcl_VarEval( interp, "plserver_link_end", (char **) NULL ); // Now really exit +// (Note: this function is actually deprecated, but as it is only used here +// at the end of the program, let's leave it.) - return Tcl_VarEval( interp, "tkexit", argv[1], (char **) NULL ); + if ( argc == 1 ) + { + return Tcl_VarEval( interp, "tkexit", (char **) NULL ); + } + else + { + return Tcl_VarEval( interp, "tkexit", argv[1], (char **) NULL ); + } } //-------------------------------------------------------------------------- Modified: trunk/bindings/tk/tkMain.c =================================================================== --- trunk/bindings/tk/tkMain.c 2013-11-17 00:49:08 UTC (rev 12710) +++ trunk/bindings/tk/tkMain.c 2013-11-18 19:31:25 UTC (rev 12711) @@ -251,21 +251,25 @@ if ( Tcl_Init( interp ) == TCL_ERROR ) { + fprintf( stderr, "Tcl initialisation failed: %s\n", Tcl_GetStringResult( interp ) ); return TCL_ERROR; } if ( Tk_Init( interp ) == TCL_ERROR ) { + fprintf( stderr, "Tk initialisation failed: %s\n", Tcl_GetStringResult( interp ) ); return TCL_ERROR; } #ifdef HAVE_ITCL if ( Itcl_Init( interp ) == TCL_ERROR ) { + fprintf( stderr, "Itcl initialisation failed: %s\n", Tcl_GetStringResult( interp ) ); return TCL_ERROR; } #endif #ifdef HAVE_ITK if ( Itk_Init( interp ) == TCL_ERROR ) { + fprintf( stderr, "Itk initialisation failed: %s\n", Tcl_GetStringResult( interp ) ); return TCL_ERROR; } @@ -281,17 +285,20 @@ if ( Tcl_Import( interp, Tcl_GetGlobalNamespace( interp ), "::itk::*", /* allowOverwrite */ 1 ) != TCL_OK ) { + fprintf( stderr, "Itk initialisation failed: %s\n", Tcl_GetStringResult( interp ) ); return TCL_ERROR; } if ( Tcl_Import( interp, Tcl_GetGlobalNamespace( interp ), "::itcl::*", /* allowOverwrite */ 1 ) != TCL_OK ) { + fprintf( stderr, "Itk initialisation failed: %s\n", Tcl_GetStringResult( interp ) ); return TCL_ERROR; } if ( Tcl_Eval( interp, "auto_mkindex_parser::slavehook { _%@namespace import -force ::itcl::* ::itk::* }" ) != TCL_OK ) { + fprintf( stderr, "Itk initialisation failed: %s\n", Tcl_GetStringResult( interp ) ); return TCL_ERROR; } #endif @@ -333,6 +340,7 @@ if ( ( *AppInit )( interp ) != TCL_OK ) { fprintf( stderr, "(*AppInit) failed: %s\n", Tcl_GetStringResult( interp ) ); + return TCL_ERROR; } // @@ -412,7 +420,7 @@ Tcl_DStringFree( &buffer ); } // Exclude UNIX-only feature -#if !defined ( MAC_TCL ) && !defined ( __WIN32__ ) && !defined ( __CYGWIN__ ) +#if !defined ( MAC_TCL ) && !defined ( __WIN32__ ) Tk_CreateFileHandler( 0, TK_READABLE, StdinProc, (ClientData) 0 ); #endif if ( tty ) @@ -493,7 +501,7 @@ } else { -#if !defined ( MAC_TCL ) && !defined ( __WIN32__ ) && !defined ( __CYGWIN__ ) +#if !defined ( MAC_TCL ) && !defined ( __WIN32__ ) Tk_DeleteFileHandler( 0 ); #endif } @@ -527,11 +535,11 @@ // finished. Among other things, this will trash the text of the // command being evaluated. // -#if !defined ( MAC_TCL ) && !defined ( __WIN32__ ) && !defined ( __CYGWIN__ ) +#if !defined ( MAC_TCL ) && !defined ( __WIN32__ ) Tk_CreateFileHandler( 0, 0, StdinProc, (ClientData) 0 ); #endif code = Tcl_RecordAndEval( interp, cmd, 0 ); -#if !defined ( MAC_TCL ) && !defined ( __WIN32__ ) && !defined ( __CYGWIN__ ) +#if !defined ( MAC_TCL ) && !defined ( __WIN32__ ) Tk_CreateFileHandler( 0, TK_READABLE, StdinProc, (ClientData) 0 ); #endif Tcl_DStringFree( &command ); @@ -574,8 +582,8 @@ // static void -Prompt( intp, partial ) -Tcl_Interp * intp; // Interpreter to use for prompting. +Prompt( interp, partial ) +Tcl_Interp * interp; // Interpreter to use for prompting. int partial; // Non-zero means there already // exists a partial command, so use // the secondary prompt. @@ -583,7 +591,7 @@ const char *promptCmd; int code; - promptCmd = Tcl_GetVar( intp, + promptCmd = Tcl_GetVar( interp, partial ? "tcl_prompt2" : "tcl_prompt1", TCL_GLOBAL_ONLY ); if ( promptCmd == NULL ) { @@ -595,12 +603,12 @@ } else { - code = Tcl_Eval( intp, promptCmd ); + code = Tcl_Eval( interp, promptCmd ); if ( code != TCL_OK ) { - Tcl_AddErrorInfo( intp, + Tcl_AddErrorInfo( interp, "\n (script that generates prompt)" ); - fprintf( stderr, "%s\n", Tcl_GetStringResult( intp ) ); + fprintf( stderr, "%s\n", Tcl_GetStringResult( interp ) ); goto defaultPrompt; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-17 00:49:10
|
Revision: 12710 http://sourceforge.net/p/plplot/code/12710 Author: airwin Date: 2013-11-17 00:49:08 +0000 (Sun, 17 Nov 2013) Log Message: ----------- Propagate DATA_DIR to the installed examples build system so that the tclsh_standard_examples(.in) and wish_standard_examples(.in) scripts will be correctly configured in that case. Tested by Alan W. Irwin <ai...@us...> on Linux using the CMake-based build system for the installed examples and the test_interactive target. Modified Paths: -------------- trunk/examples/plplot_configure.cmake_installed_examples.in Modified: trunk/examples/plplot_configure.cmake_installed_examples.in =================================================================== --- trunk/examples/plplot_configure.cmake_installed_examples.in 2013-11-17 00:45:35 UTC (rev 12709) +++ trunk/examples/plplot_configure.cmake_installed_examples.in 2013-11-17 00:49:08 UTC (rev 12710) @@ -137,6 +137,8 @@ set(TCL_TCLSH @TCL_TCLSH@) set(MKTCLINDEX ${CMAKE_SOURCE_DIR}/tcl/mktclIndex) set(MKTCLINDEX_ARGS @MKTCLINDEX_ARGS@) + # Needed to configure tclsh_standard_examples and wish_standard_examples + set(DATA_DIR @DATA_DIR@) endif(ENABLE_tcl OR ENABLE_tk) if(ENABLE_tk) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-17 00:45:38
|
Revision: 12709 http://sourceforge.net/p/plplot/code/12709 Author: airwin Date: 2013-11-17 00:45:35 +0000 (Sun, 17 Nov 2013) Log Message: ----------- Make Tcl logic much more robust for discovering whether the path to the relevant pkgIndex.tcl file is a subdirectory of the build tree. This fixes an issue with the old logic which was based on whether the current directory was a subdirectory of the build tree. That old logic obviously failed for the common case when the build tree for the installed examples was actually a subdirectory of the core build tree. The new logic is independent of the current directory which is a good thing. Modified Paths: -------------- trunk/bindings/tcl/pkgIndex.tcl.in trunk/bindings/tk/pkgIndex.tcl.in trunk/bindings/tk-x-plat/pkgIndex.tcl.in Modified: trunk/bindings/tcl/pkgIndex.tcl.in =================================================================== --- trunk/bindings/tcl/pkgIndex.tcl.in 2013-11-16 22:21:59 UTC (rev 12708) +++ trunk/bindings/tcl/pkgIndex.tcl.in 2013-11-17 00:45:35 UTC (rev 12709) @@ -34,9 +34,14 @@ if {$tcl_platform(platform) == "unix"} { set thisDir [pwd] + # Find absolute path of $dir + cd $dir + set pkgIndexDir [pwd] + cd $thisDir set buildDir "@BUILD_DIR@" set bLen [string length $buildDir] - if {![string compare -length $bLen $buildDir $thisDir]} then { + # If pkgIndexDir is in the build tree... + if {![string compare -length $bLen $buildDir $pkgIndexDir]} then { set searchdirs "."} else { set searchdirs [list "@LIB_HARDDIR@"]} #puts $searchdirs Modified: trunk/bindings/tk/pkgIndex.tcl.in =================================================================== --- trunk/bindings/tk/pkgIndex.tcl.in 2013-11-16 22:21:59 UTC (rev 12708) +++ trunk/bindings/tk/pkgIndex.tcl.in 2013-11-17 00:45:35 UTC (rev 12709) @@ -35,9 +35,14 @@ if {$tcl_platform(platform) == "unix"} { set stem tk set thisDir [pwd] + # Find absolute path of $dir + cd $dir + set pkgIndexDir [pwd] + cd $thisDir set buildDir "@BUILD_DIR@" set bLen [string length $buildDir] - if {![string compare -length $bLen $buildDir $thisDir]} then { + # If pkgIndexDir is in the build tree... + if {![string compare -length $bLen $buildDir $pkgIndexDir]} then { set searchdirs "../../drivers"} else { set searchdirs [list "@DRV_HARDDIR@"]} #puts $searchdirs Modified: trunk/bindings/tk-x-plat/pkgIndex.tcl.in =================================================================== --- trunk/bindings/tk-x-plat/pkgIndex.tcl.in 2013-11-16 22:21:59 UTC (rev 12708) +++ trunk/bindings/tk-x-plat/pkgIndex.tcl.in 2013-11-17 00:45:35 UTC (rev 12709) @@ -35,9 +35,14 @@ if {$tcl_platform(platform) == "unix"} { set stem tkwin set thisDir [pwd] + # Find absolute path of $dir + cd $dir + set pkgIndexDir [pwd] + cd $thisDir set buildDir "@BUILD_DIR@" set bLen [string length $buildDir] - if {![string compare -length $bLen $buildDir $thisDir]} then { + # If pkgIndexDir is in the build tree... + if {![string compare -length $bLen $buildDir $pkgIndexDir]} then { set searchdirs "../../drivers"} else { set searchdirs [list "@DRV_HARDDIR@"]} #puts $searchdirs This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-16 22:22:02
|
Revision: 12708 http://sourceforge.net/p/plplot/code/12708 Author: airwin Date: 2013-11-16 22:21:59 +0000 (Sat, 16 Nov 2013) Log Message: ----------- Remove this sed script since it was only used to check plplot_octave_def which has already been removed as part of the recent matwrap cleanout. Removed Paths: ------------- trunk/bindings/octave/global_defines.sed Deleted: trunk/bindings/octave/global_defines.sed =================================================================== --- trunk/bindings/octave/global_defines.sed 2013-11-16 21:36:48 UTC (rev 12707) +++ trunk/bindings/octave/global_defines.sed 2013-11-16 22:21:59 UTC (rev 12708) @@ -1,19 +0,0 @@ -# sed script specifically designed to parse the #define statements in -# bindings/swig-support/plplotcapi.i into a file that can be used for -# global variable definitions for octave. - -# Drop every line that is not a #define -/^#define/! d - -# Drop specific #defines from the file that are not available to swig-generated -# octave because of specific #if statements. -/^#define ZEROW/ d -/^#define ONEW/ d -/OBJECT_DATA/ d -/^#define pltr_img/ d - -# First translate comment identifier into octave. -/^#define/ s?//?#? -# Parse what is left while preserving trailing comments. Watch out -# for parentheses around value as well. -/^#define/ s?^#define *\([^ ]*\)[ (]*\([^ ]*\)[ )]*\(.*\)$?global \1\n\1 = \2; \3? This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-16 21:36:51
|
Revision: 12707 http://sourceforge.net/p/plplot/code/12707 Author: airwin Date: 2013-11-16 21:36:48 +0000 (Sat, 16 Nov 2013) Log Message: ----------- There is a segfault generated by the Tcl exit command in the wish_standard_examples(.in) script that is still under investigation. Until that issue is resolved, still allow the test_wish_standard_examples target can be run directly to aid that investigation. But temporarily remove this target from the list of targets that are run automatically as dependencies of the test_interactive target so the segfault does not interfere with the running those other targets. Modified Paths: -------------- trunk/examples/CMakeLists.txt Modified: trunk/examples/CMakeLists.txt =================================================================== --- trunk/examples/CMakeLists.txt 2013-11-16 19:15:17 UTC (rev 12706) +++ trunk/examples/CMakeLists.txt 2013-11-16 21:36:48 UTC (rev 12707) @@ -998,7 +998,15 @@ if(FILE_DEPENDS_xwin) add_dependencies(test_wish_standard_examples test_xwin_dyndriver) endif(FILE_DEPENDS_xwin) - list(APPEND targets_examples_tk test_wish_standard_examples) + # Temporarily suspend adding this target to the rest of the Tk + # interactive targets (and therefore also this target is not added + # to the overall list of targets run by the test_interactive + # target) because of a segfault generated by this target. The + # cause of that segfault is the Tcl exit command is somehow not + # compatible with how we have implemented the Tcl plframe command + # that is run by tkdemos.tcl in the wish case, but that is as much + # as we know at this stage. + # list(APPEND targets_examples_tk test_wish_standard_examples) if(ENABLE_itk) add_custom_target(test_tk_02 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-16 19:15:21
|
Revision: 12706 http://sourceforge.net/p/plplot/code/12706 Author: airwin Date: 2013-11-16 19:15:17 +0000 (Sat, 16 Nov 2013) Log Message: ----------- In plgesc_string, follow plgesc logic which is to set the default escape if plsc->esc is in its initial state. This change gets rid of lots of plgesc_string warning messages about plsc->esc being invalid. Modified Paths: -------------- trunk/src/plbox.c Modified: trunk/src/plbox.c =================================================================== --- trunk/src/plbox.c 2013-11-16 07:24:58 UTC (rev 12705) +++ trunk/src/plbox.c 2013-11-16 19:15:17 UTC (rev 12706) @@ -2616,6 +2616,11 @@ { static const char *esc_strings = { "!\0#\0$\0%\0&\0*\0@\0^\0~\0" }; int d; + // Follow plgesc logic here which is to set the default escape + // if plsc->esc is in its initial state. + if ( plsc->esc == '\0' ) + plsc->esc = '#'; + switch ( plsc->esc ) { case '!': This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-16 07:25:11
|
Revision: 12705 http://sourceforge.net/p/plplot/code/12705 Author: airwin Date: 2013-11-16 07:24:58 +0000 (Sat, 16 Nov 2013) Log Message: ----------- Several different functions in plbox incorrectly assume that the PLplot string escape character is '#'. Fix that assumption by implementing a small static function that returns the string (not integer code) corresponding to the current escape character, and use that instead. (Lightly) tested by: Alan W. Irwin <ai...@us...> on Linux by running a run-time test where plsesc( '@'); was called in example 1 and showing that no longer interfered with the exponent used on the viewport Y label axis for one of the plots. Modified Paths: -------------- trunk/src/plbox.c Modified: trunk/src/plbox.c =================================================================== --- trunk/src/plbox.c 2013-11-16 01:36:52 UTC (rev 12704) +++ trunk/src/plbox.c 2013-11-16 07:24:58 UTC (rev 12705) @@ -74,6 +74,9 @@ static void plP_default_label( PLINT axis, PLFLT value, char *string, PLINT len, void *data ); +static const char * +plgesc_string( void ); + //-------------------------------------------------------------------------- // void plbox() // @@ -793,7 +796,8 @@ PLFLT pos, tn, tp, temp, height, tick1, vmin, vmax; // Note that 'tspace' is the minimim distance away (in fractional number // of ticks) from the boundary that an X or Y numerical label can be drawn. - PLFLT dwx, dwy, lambda, tcrit, tspace = 0.1; + PLFLT dwx, dwy, lambda, tcrit, tspace = 0.1; + const char * esc_string = plgesc_string(); vmin = ( vmax_in > vmin_in ) ? vmin_in : vmax_in; vmax = ( vmax_in > vmin_in ) ? vmax_in : vmin_in; @@ -927,7 +931,7 @@ *digits = 2; if ( !ll && !lo && mode ) { - snprintf( string, STRING_LEN, "(x10#u%d#d)", (int) scale ); + snprintf( string, STRING_LEN, "(x10%su%d%sd)", esc_string, (int) scale, esc_string ); plxytx( wx1, wy1, wx2, wy2, height, 1.0, 0.5, string ); } } @@ -1020,6 +1024,7 @@ PLFLT pos, tn, tp, temp, height, tick1; PLFLT dwy, lambda, diag, major, minor, xmajor, xminor; PLFLT ymajor, yminor, dxm, dym, vmin, vmax; + const char * esc_string = plgesc_string(); vmin = ( vmax_in > vmin_in ) ? vmin_in : vmax_in; vmax = ( vmax_in > vmin_in ) ? vmax_in : vmin_in; @@ -1163,7 +1168,7 @@ } if ( !ll && !lo && mode ) { - snprintf( string, STRING_LEN, "(x10#u%d#d)", (int) scale ); + snprintf( string, STRING_LEN, "(x10%su%d%sd)", esc_string, (int) scale, esc_string ); pos = 1.15; height = 0.5; if ( ln && !right ) @@ -1408,7 +1413,8 @@ // -O3 -Wuninitialized warnings that are obvious false alarms from // the clarity of the code associated with the true or false // result for custom_exponent_placement. - PLFLT pos = 0.0, height = 0.0, just = 0.0; + PLFLT pos = 0.0, height = 0.0, just = 0.0; + const char * esc_string = plgesc_string(); plgchr( &default_mm, &char_height_mm ); @@ -1548,7 +1554,7 @@ pos = 1.0; just = 0.5; } - snprintf( string, STRING_LEN, "(x10#u%d#d)", (int) xscale ); + snprintf( string, STRING_LEN, "(x10%su%d%sd)", esc_string, (int) xscale, esc_string ); if ( lnx ) { // Bottom axis exponent. @@ -1777,7 +1783,7 @@ if ( !lly && !ldy && !loy && ymode ) { - snprintf( string, STRING_LEN, "(x10#u%d#d)", (int) yscale ); + snprintf( string, STRING_LEN, "(x10%su%d%sd)", esc_string, (int) yscale, esc_string ); if ( custom_exponent_placement ) { height = ( (PLLabelDefaults *) plsc->label_data )->exp_label_disp; @@ -1904,7 +1910,8 @@ // -O3 -Wuninitialized warnings that are obvious false alarms from // the clarity of the code associated with the true or false // result for custom_exponent_placement. - PLFLT pos = 0.0, height = 0.0, just = 0.0; + PLFLT pos = 0.0, height = 0.0, just = 0.0; + const char * esc_string = plgesc_string(); plgchr( &default_mm, &char_height_mm ); @@ -2098,7 +2105,7 @@ pos = 1.0; just = 0.5; } - snprintf( string, STRING_LEN, "(x10#u%d#d)", (int) xscale ); + snprintf( string, STRING_LEN, "(x10%su%d%sd)", esc_string, (int) xscale, esc_string ); if ( lnx ) { // Bottom axis exponent. @@ -2341,7 +2348,7 @@ if ( !lly && !ldy && !loy && ymode ) { - snprintf( string, STRING_LEN, "(x10#u%d#d)", (int) yscale ); + snprintf( string, STRING_LEN, "(x10%su%d%sd)", esc_string, (int) yscale, esc_string ); if ( custom_exponent_placement ) { height = ( (PLLabelDefaults *) plsc->label_data )->exp_label_disp; @@ -2456,8 +2463,9 @@ //-------------------------------------------------------------------------- void plP_default_label_log( PLINT PL_UNUSED( axis ), PLFLT value, char *string, PLINT len, void * PL_UNUSED( data ) ) { + const char * esc_string = plgesc_string(); // Exponential, i.e. 10^-1, 10^0, 10^1, etc - snprintf( string, (size_t) len, "10#u%d", (int) ROUND( value ) ); + snprintf( string, (size_t) len, "10%su%d", esc_string, (int) ROUND( value ) ); } void plP_default_label_log_fixed( PLINT PL_UNUSED( axis ), PLFLT value, char *string, PLINT len, void * PL_UNUSED( data ) ) @@ -2602,3 +2610,45 @@ plsc->label_func = label_func; plsc->label_data = label_data; } + +static const char * +plgesc_string( void ) +{ + static const char *esc_strings = { "!\0#\0$\0%\0&\0*\0@\0^\0~\0" }; + int d; + switch ( plsc->esc ) + { + case '!': + d = 0; + break; + case '#': + d = 1; + break; + case '$': + d = 2; + break; + case '%': + d = 3; + break; + case '&': + d = 4; + break; + case '*': + d = 5; + break; + case '@': + d = 6; + break; + case '^': + d = 7; + break; + case '~': + d = 8; + break; + default: + plwarn( "plgesc_string: Invalid escape character, assuming '#' instead" ); + d = 1; + break; + } + return &( esc_strings[d * 2] ); +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-16 01:36:54
|
Revision: 12704 http://sourceforge.net/p/plplot/code/12704 Author: airwin Date: 2013-11-16 01:36:52 +0000 (Sat, 16 Nov 2013) Log Message: ----------- Replace horrible hack with searching for substrings in $argv0 to decide if tkdemos.tcl was being sourced from a plserver or wish environment. Tested by Alan W. Irwin <ai...@us...> on Linux using the test_tk_standard_examples and test_wish_standard_examples targets. Note, the second target had a segfault right after example 33 completed so investigation of that issue is ongoing. Since the horrible hack is gone, there is a reasonable chance now that these two targets (and also the test_interactive target which depends on them) will also work fine in the installed examples tree. But that case has not been tested yet. Modified Paths: -------------- trunk/examples/CMakeLists.txt trunk/examples/tk/CMakeLists.txt trunk/examples/tk/tkdemos.tcl Modified: trunk/examples/CMakeLists.txt =================================================================== --- trunk/examples/CMakeLists.txt 2013-11-16 01:07:16 UTC (rev 12703) +++ trunk/examples/CMakeLists.txt 2013-11-16 01:36:52 UTC (rev 12704) @@ -983,21 +983,21 @@ list(APPEND targets_examples_tk test_tk_standard_examples) add_custom_target(test_wish_standard_examples - COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tk/wish_standard_examples + COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tk/wish_standard_examples -geometry 800x600 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tk ) add_dependencies(test_wish_standard_examples plplottcltk${LIB_TAG} tk - # FIXME, the tkwin dependency is part of the horrible hack to - # allow tkdemos.tcl to distinguish between the plserver and wish - # environments. - tkwin + xwin tcl_examples tclIndex_tcl tclIndex_tk tclIndex_examples_tk ) + if(FILE_DEPENDS_xwin) + add_dependencies(test_wish_standard_examples test_xwin_dyndriver) + endif(FILE_DEPENDS_xwin) list(APPEND targets_examples_tk test_wish_standard_examples) if(ENABLE_itk) Modified: trunk/examples/tk/CMakeLists.txt =================================================================== --- trunk/examples/tk/CMakeLists.txt 2013-11-16 01:07:16 UTC (rev 12703) +++ trunk/examples/tk/CMakeLists.txt 2013-11-16 01:36:52 UTC (rev 12704) @@ -185,11 +185,9 @@ # wish_standard_examples is a configured shell script that runs all # the standard examples under wish using a TEA-based approach. # pkgIndex_LOCATION is the directory where the relevant pkgIndex.tcl - # file is located. FIXME! use two directories temporarily as - # part of the horrible hack currently allowing tkdemos to distinguish - # between the plserver and wish environments. + # file is located. if(CORE_BUILD) - set(pkgIndex_LOCATION "${CMAKE_BINARY_DIR}/bindings/tk-x-plat ${CMAKE_BINARY_DIR}/bindings/tk") + set(pkgIndex_LOCATION ${CMAKE_BINARY_DIR}/bindings/tk) else(CORE_BUILD) set(pkgIndex_LOCATION ${DATA_DIR}) endif(CORE_BUILD) Modified: trunk/examples/tk/tkdemos.tcl =================================================================== --- trunk/examples/tk/tkdemos.tcl 2013-11-16 01:07:16 UTC (rev 12703) +++ trunk/examples/tk/tkdemos.tcl 2013-11-16 01:36:52 UTC (rev 12704) @@ -42,17 +42,25 @@ set utf8_examples {4 18 24 26 33} -# This is hacked logic for distinguishing between the plserver -# and wish cases which requires an extra directory be lappended in -# the build tree for the Pltk case. FIXME. -if {[catch {package require Plplotter}]} { +# In order to distinguish whether this is a plserver or wish +# environment we assume that $argv0 has the string "plserver" or +# "wish" in it. Some contrived examples can be figured out where this +# assumption is not correct, and for those cases we simply emit an +# error message and return. But normally this assumption is correct, +# and it is certainly correct for our tests. +if { [string first "plserver" $argv0] >= 0 } { # use 'plserver' method plstdwin . plxframe .plw set plwin .plw.plwin -} else { +} elseif { [string first "wish" $argv0] >= 0 } { + # use 'wish" method plframe .plw set plwin .plw +} else { + puts stderr "Error: argv0 = \"$argv0\"\ndoes not contain either the substrings \"plserver\" or \"wish\"" + puts stderr "Therefore cannot decide how to proceed with tkdemos.tcl so giving up" + return } pack append . .plw {left expand fill} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-16 01:07:19
|
Revision: 12703 http://sourceforge.net/p/plplot/code/12703 Author: airwin Date: 2013-11-16 01:07:16 +0000 (Sat, 16 Nov 2013) Log Message: ----------- Note that "make test_interactive" incorporates almost all (runAllDemos.tcl is the one exception) of these tests that can be run by hand. Drop the FIXME remarks which are about to become irrelevant. Modified Paths: -------------- trunk/examples/tcl/README.tcldemos trunk/examples/tk/README.tkdemos Modified: trunk/examples/tcl/README.tcldemos =================================================================== --- trunk/examples/tcl/README.tcldemos 2013-11-15 01:09:36 UTC (rev 12702) +++ trunk/examples/tcl/README.tcldemos 2013-11-16 01:07:16 UTC (rev 12703) @@ -1,5 +1,15 @@ Running the Tcl Demos. +Note these directions as well as taking proper care of all the +dependencies have been incorporated into our CMake-based build systems +for the core build and the installed examples build. So the tests +below of the Tcl component of PLplot can be done by simply running + +make test_interactive + +However, we preserve the directions below for historical reasons and +in case you want to do any of these commands by hand. + There are two ways to run the examples below, where the alternatives are indicated by "|". The first alternative should only be used if you have changed directories to Modified: trunk/examples/tk/README.tkdemos =================================================================== --- trunk/examples/tk/README.tkdemos 2013-11-15 01:09:36 UTC (rev 12702) +++ trunk/examples/tk/README.tkdemos 2013-11-16 01:07:16 UTC (rev 12703) @@ -1,11 +1,28 @@ Running the Tk Demos. -PLplot doesn't need to be installed to run these demos. -However, different commands might be needed to run the demos when PLplot -is installed or not; in these cases, the first command must be used for -the installed situation, while the second, separated by a '|', is for the -uninstalled situation. +Note these directions (aside from runAllDemos.tcl) as well as taking +proper care of all the dependencies have been incorporated into our +CMake-based build systems for the core build and the installed +examples build. So with the exception of runAllDemos.tcl the tests +below of the Tcl, Tk, Itcl, Itk, and Iwidgets components of PLplot can +be done by simply running +make test_interactive + +However, we preserve the directions below for historical reasons and +in case you want to do any of these commands by hand. + +There are two ways to run the examples below, where the alternatives +are indicated by "|". The first alternative should only be used if +you have changed directories to +$prefix/share/plplot$VERSION/examples/tk where $prefix is the PLplot +install prefix and $VERSION is the PLplot release version, e.g., +5.9.10. (That is, the first alternative should be used if you have +changed directories to the installed tk examples directory.) The +second alternative should only be used if you have changed directories +to bindings/examples/tk in the build tree. + + To run the plot.tcl demo follow the directions in that file to run it under plserver using the plframe widget. @@ -20,16 +37,6 @@ # from "plserver" to "../../bindings/plserver" ./xtk04 -f tk04 -There are two ways to run the examples below, where the alternatives -are indicated by "|". The first alternative should only be used if -you have changed directories to -$prefix/share/plplot$VERSION/examples/tk where $prefix is the PLplot -install prefix and $VERSION is the PLplot release version, e.g., -5.9.10. (That is, the first alternative should be used if you have -changed directories to the installed tk examples directory.) The -second alternative should only be used if you have changed directories -to bindings/examples/tk in the build tree. - (1) Run tkdemos.tcl from plserver. This potentially exercises all the x??.tcl examples using the plframe widget: @@ -45,24 +52,13 @@ (2) Run tkdemos.tcl from wish. wish -geometry 600x400 -lappend auto_path $prefix/share/plplot$VERSION ../../bindings/tk-x-plat ../../bindings/tk +lappend auto_path $prefix/share/plplot$VERSION | ../../bindings/tk package require Pltk source tkdemos.tcl 1 2 .... -FIXME: Note the ../../bindings/tk-x-plat in auto_path is a temporary -measure to support the hacked tkdemos.tcl logic which invokes package -require Plplotter to distinguish between the plserver case (where that -package is not available) and the current wish case (where that -package can be successfully loaded because of ../../bindings/tk-x-plat -in auto_path). - -FIXME: Try examples 10 and 12 which should work. Most of the rest -(e.g., 1, 2,) currently do not work because PLplot library constants -are not available under wish for some unknown reason. - To find out more about the wish command (which comes as part of the Tk package) use man wish. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-15 01:09:39
|
Revision: 12702 http://sourceforge.net/p/plplot/code/12702 Author: airwin Date: 2013-11-15 01:09:36 +0000 (Fri, 15 Nov 2013) Log Message: ----------- Implement test_wish_standard_examples target that executes all the standard examples using wish and PLplot's TEA capabilities. Make this target a dependency of test_interactive. N.B. For some strange reason the display of the plots is currently getting lost when this script is run non-interactively. That is, if you run the script directly or by mentioning it as an argument for the wish command or if it sourced from an interactive wish environment. However, if you run the commands in this script interactively, i.e. cut and paste the script lines directly into a wish environment, the display of the plots is fine! See the current question on the plplot-devel list about how this issue can be fixed. Nevertheless, despite this issue the current test does work in the sense that all the examples run without any error condition. Modified Paths: -------------- trunk/examples/CMakeLists.txt trunk/examples/tk/CMakeLists.txt trunk/examples/tk/tkdemos.tcl Added Paths: ----------- trunk/examples/tk/wish_standard_examples.in Modified: trunk/examples/CMakeLists.txt =================================================================== --- trunk/examples/CMakeLists.txt 2013-11-15 00:58:19 UTC (rev 12701) +++ trunk/examples/CMakeLists.txt 2013-11-15 01:09:36 UTC (rev 12702) @@ -964,19 +964,11 @@ endif(FILE_DEPENDS_xwin) list(APPEND targets_examples_tk test_tk_plgrid) - if(CORE_BUILD) - add_custom_target(test_tk_standard_examples - COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tk/standard_examples - DEPENDS ${xwin_target} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tk - ) - else(CORE_BUILD) - add_custom_target(test_tk_standard_examples - COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tk/standard_examples - DEPENDS ${xwin_target} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tk - ) - endif(CORE_BUILD) + add_custom_target(test_tk_standard_examples + COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tk/standard_examples + DEPENDS ${xwin_target} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tk + ) add_dependencies(test_tk_standard_examples plserver tcl_examples @@ -990,6 +982,24 @@ endif(FILE_DEPENDS_xwin) list(APPEND targets_examples_tk test_tk_standard_examples) + add_custom_target(test_wish_standard_examples + COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tk/wish_standard_examples + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tk + ) + add_dependencies(test_wish_standard_examples + plplottcltk${LIB_TAG} + tk + # FIXME, the tkwin dependency is part of the horrible hack to + # allow tkdemos.tcl to distinguish between the plserver and wish + # environments. + tkwin + tcl_examples + tclIndex_tcl + tclIndex_tk + tclIndex_examples_tk + ) + list(APPEND targets_examples_tk test_wish_standard_examples) + if(ENABLE_itk) add_custom_target(test_tk_02 COMMAND xtk02 -f ${CMAKE_CURRENT_BINARY_DIR}/tk/tk02 Modified: trunk/examples/tk/CMakeLists.txt =================================================================== --- trunk/examples/tk/CMakeLists.txt 2013-11-15 00:58:19 UTC (rev 12701) +++ trunk/examples/tk/CMakeLists.txt 2013-11-15 01:09:36 UTC (rev 12702) @@ -142,7 +142,7 @@ # standard_examples is a configured shell script that runs all the standard # examples under plserver. -set(tk_SCRIPTS tk01 tk03 plgrid standard_examples) +set(tk_SCRIPTS tk01 tk03 plgrid standard_examples wish_standard_examples) # The second and fourth Tk examples depend on Itk to work. if(ENABLE_itk) list(APPEND tk_SCRIPTS tk02 tk04) @@ -181,6 +181,19 @@ # Provide locations for several tk-related targets that will be used # to configure the tk_SCRIPTS. + + # wish_standard_examples is a configured shell script that runs all + # the standard examples under wish using a TEA-based approach. + # pkgIndex_LOCATION is the directory where the relevant pkgIndex.tcl + # file is located. FIXME! use two directories temporarily as + # part of the horrible hack currently allowing tkdemos to distinguish + # between the plserver and wish environments. + if(CORE_BUILD) + set(pkgIndex_LOCATION "${CMAKE_BINARY_DIR}/bindings/tk-x-plat ${CMAKE_BINARY_DIR}/bindings/tk") + else(CORE_BUILD) + set(pkgIndex_LOCATION ${DATA_DIR}) + endif(CORE_BUILD) + foreach(tk_related_target xtk01 plserver xtk02 xtk04) if(TARGET ${tk_related_target}) get_target_property(${tk_related_target}_LOCATION Modified: trunk/examples/tk/tkdemos.tcl =================================================================== --- trunk/examples/tk/tkdemos.tcl 2013-11-15 00:58:19 UTC (rev 12701) +++ trunk/examples/tk/tkdemos.tcl 2013-11-15 01:09:36 UTC (rev 12702) @@ -74,6 +74,8 @@ proc $i {} " global plwin $demo $plwin + # Disable pausing (currently only does that for the wish version) + $plwin cmd plspause 0 $plwin cmd plcol0 1 $plwin cmd plsori 0 $plwin cmd plspal0 cmap0_default.pal Added: trunk/examples/tk/wish_standard_examples.in =================================================================== --- trunk/examples/tk/wish_standard_examples.in (rev 0) +++ trunk/examples/tk/wish_standard_examples.in 2013-11-15 01:09:36 UTC (rev 12702) @@ -0,0 +1,51 @@ +#!@SH_EXECUTABLE@ +# Run standard examples using wish TEA-based approach. +# Drop examples 14 and 31 because querying for devices does not +# seem to work in this context. +# We use of the wish -colormap new option since it cannot hurt, +# but this does not solve color issues +# for both examples 2 ("Couldn't parse color 76") and 24 ("illegal number of colors in cmap0: red") so we comment out those examples for now. +# Example 20 enables plspause so comment out for now. +# The following exec command reexecutes the script under wish. This +# is possible because all comment lines are ignored by wish including +# continued ones with a trailing backslash like this one \ +exec @TK_WISH@ "$0" "$@" +lappend auto_path @pkgIndex_LOCATION@ +package require Pltk +source tkdemos.tcl +# disable pauses +$plwin cmd plspause 0 +0 +1 +#2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +#14 +15 +16 +17 +18 +19 +#20 +21 +22 +23 +#24 +25 +26 +27 +28 +29 +30 +#31 +33 +exit Property changes on: trunk/examples/tk/wish_standard_examples.in ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-15 00:58:22
|
Revision: 12701 http://sourceforge.net/p/plplot/code/12701 Author: airwin Date: 2013-11-15 00:58:19 +0000 (Fri, 15 Nov 2013) Log Message: ----------- Move to a more traditional startup of tclsh. Modified Paths: -------------- trunk/examples/tcl/tclsh_standard_examples.in Modified: trunk/examples/tcl/tclsh_standard_examples.in =================================================================== --- trunk/examples/tcl/tclsh_standard_examples.in 2013-11-14 23:19:09 UTC (rev 12700) +++ trunk/examples/tcl/tclsh_standard_examples.in 2013-11-15 00:58:19 UTC (rev 12701) @@ -1,16 +1,17 @@ #!@SH_EXECUTABLE@ -# Examples 14 and 31 left out - see Tk standard_examples.in -# Choose the xwin device below (after plinit) -# Note the backslash at the end - this causes Tcl to ignore -# the next line. It becomes a valid Tcl script as well as -# valid shell script -# \ -@TCL_TCLSH@ <<EOF +# Examples 14 and 31 commented out - see Tk standard_examples.in +# Choose the xwin device below although any other interactive +# device would work. +# The following exec command reexecutes the script under tclsh. This +# is possible because all comment lines are ignored by tclsh including +# continued ones with a trailing backslash like this one \ +exec @TCL_TCLSH@ "$0" "$@" lappend auto_path @pkgIndex_LOCATION@ package require Pltcl source tcldemos.tcl plsdev "xwin" plinit +# Disable pausing. plspause 0 0 1 @@ -26,12 +27,14 @@ 11 12 13 +#14 15 16 17 18 19 20 +# example 20 enables plspause so must disable it again. plspause 0 21 22 @@ -43,6 +46,6 @@ 28 29 30 +#31 33 exit -EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2013-11-14 23:19:11
|
Revision: 12700 http://sourceforge.net/p/plplot/code/12700 Author: andrewross Date: 2013-11-14 23:19:09 +0000 (Thu, 14 Nov 2013) Log Message: ----------- Remove obsolete support for matwrap generated octave bindings. The new swig generated bindings offer a fuller coverage of the plplot API and are more maintainable. Modified Paths: -------------- trunk/bindings/octave/CMakeLists.txt trunk/cmake/modules/octave.cmake trunk/plplot_test/CMakeLists.txt trunk/plplot_test/test_octave.sh.in Removed Paths: ------------- trunk/bindings/octave/matwrap/ trunk/bindings/octave/plplot_octave_def Modified: trunk/bindings/octave/CMakeLists.txt =================================================================== --- trunk/bindings/octave/CMakeLists.txt 2013-11-14 23:04:56 UTC (rev 12699) +++ trunk/bindings/octave/CMakeLists.txt 2013-11-14 23:19:09 UTC (rev 12700) @@ -121,160 +121,59 @@ ) # Build octave interface. - if(ENABLE_matwrapped_octave) + add_custom_command( + OUTPUT + ${CMAKE_CURRENT_BINARY_DIR}/plplot_stub.m + COMMAND ${CMAKE_COMMAND} -E copy + ${CMAKE_CURRENT_SOURCE_DIR}/plplot_stub_hand_crafted.m + ${CMAKE_CURRENT_BINARY_DIR}/plplot_stub.m + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/plplot_stub_hand_crafted.m + ) - # Add (Unix) custom target to check that plplot_oct_def (used only - # when ENABLE_matwrapped_octave is ON) is consistent - # with swig-support/plplotcapi.i. - add_custom_target( - check_plplot_octave_def - COMMAND ${CMAKE_COMMAND} -E remove -f - ${CMAKE_CURRENT_BINARY_DIR}/plplot_octave_compare - COMMAND - sed -f ${CMAKE_CURRENT_SOURCE_DIR}/global_defines.sed < - ${CMAKE_SOURCE_DIR}/bindings/swig-support/plplotcapi.i > - ${CMAKE_CURRENT_BINARY_DIR}/plplot_octave_compare - COMMAND - ${CMAKE_COMMAND} -E echo "Check that plplot_octave_def is consistent with bindings/swig-support/plplotcapi.i" - COMMAND - cmp ${CMAKE_CURRENT_SOURCE_DIR}/plplot_octave_def - ${CMAKE_CURRENT_BINARY_DIR}/plplot_octave_compare - ) + add_custom_target( + plplot_stub.m_built ALL + DEPENDS + ${CMAKE_CURRENT_BINARY_DIR}/plplot_stub.m + ) - set(octave_interface_INCLUDE_PATHS - ${CMAKE_SOURCE_DIR}/include - ${CMAKE_BINARY_DIR} - ${CMAKE_BINARY_DIR}/include - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR} - ${OCTAVE_INCLUDE_PATH} - ) - include_directories(${octave_interface_INCLUDE_PATHS}) + set(octave_interface_INCLUDE_PATHS + ${CMAKE_SOURCE_DIR}/include + ${CMAKE_SOURCE_DIR}/lib/qsastime + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}/include + ${CMAKE_CURRENT_BINARY_DIR} + ${OCTAVE_INCLUDE_PATH} + ${CMAKE_SOURCE_DIR}/bindings/swig-support + ) + include_directories(${octave_interface_INCLUDE_PATHS}) + set(CMAKE_SWIG_FLAGS -DSWIG_OCTAVE) + set(CMAKE_SWIG_OUTDIR ${CMAKE_CURRENT_BINARY_DIR}) - add_custom_command( - OUTPUT - ${CMAKE_CURRENT_BINARY_DIR}/plplot_octave.cc - ${CMAKE_CURRENT_BINARY_DIR}/tmp_stub - COMMAND ${PERL_EXECUTABLE} - -I${MATWRAP_PATH} ${MATWRAP} - -language octave -o plplot_octave.cc -stub tmp_stub - -cpp_ignore ${CMAKE_CURRENT_SOURCE_DIR} - -cpp_ignore ${CMAKE_CURRENT_SOURCE_DIR}/plplot_octave_rej.h - -cpp ${CMAKE_C_COMPILER} -D__builtin_va_list=void -E - -I${CMAKE_CURRENT_SOURCE_DIR} -I${CMAKE_CURRENT_BINARY_DIR} -C plplot_octave.h - DEPENDS - ${CMAKE_CURRENT_BINARY_DIR}/plplot_octave.h - ) - set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/plplot_octave.cc - PROPERTIES GENERATED ON) + set_source_files_properties(plplot_octave.i + PROPERTIES + SWIG_MODULE_NAME plplot_octave + CPLUSPLUS ON + ) - add_library(plplot_octave MODULE ${CMAKE_CURRENT_BINARY_DIR}/plplot_octave.cc) - target_link_libraries( - plplot_octave - plplot${LIB_TAG} - "${OCTAVE_LIBRARIES}" - "${OCTINTERP_LIBRARIES}" - ) + set(SWIG_MODULE_plplot_octave_EXTRA_DEPS + ${CMAKE_SOURCE_DIR}/bindings/swig-support/swig_documentation.i + ${CMAKE_SOURCE_DIR}/bindings/swig-support/plplotcapi.i + ) - # Build and install plplot_stub.m - add_executable(massage massage.c) - get_target_property( - massage_LOCATION - massage - LOCATION - ) + # Set up swig + c wrapper. + swig_add_module(plplot_octave octave plplot_octave.i) + swig_link_libraries( + plplot_octave + plplot${LIB_TAG} + "${OCTAVE_LIBRARIES}" + "${OCTINTERP_LIBRARIES}" + ) - file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/plplot_stub.m_part2 - "# It was also massaged to add online documentation\n" - "# extracted from some PLplot distribution files\n" - "\n" - "1;\n" - "\n" - ) - add_custom_command( - OUTPUT - ${CMAKE_CURRENT_BINARY_DIR}/plplot_stub.m - ${CMAKE_CURRENT_BINARY_DIR}/missing_help - COMMAND head -5 tmp_stub > plplot_stub.m - COMMAND - cat plplot_stub.m_part2 >> plplot_stub.m - COMMAND cat ${CMAKE_CURRENT_SOURCE_DIR}/plplot_octave_def >> plplot_stub.m - COMMAND echo >> plplot_stub.m - COMMAND - ${massage_LOCATION} >> plplot_stub.m 2> missing_help - DEPENDS - ${CMAKE_CURRENT_BINARY_DIR}/tmp_stub - ${CMAKE_CURRENT_SOURCE_DIR}/plplot_octave_def - ${massage_LOCATION} - ${make_documentation_DEPENDS} - ) + # Make sure plplot_stub.m is copied to build tree before plplot_octave + # is created so can use plplot_octave in normal way. + add_dependencies(plplot_octave plplot_stub.m_built) - add_custom_target( - plplot_stub.m_built ALL - DEPENDS - ${CMAKE_CURRENT_BINARY_DIR}/plplot_stub.m - ) - - # Both these targets file-depend on custom commands which in turn - # file-depend on ${make_documentation_DEPENDS}. Therefore, must - # serialize these custom targets so that parallel build jobs - # don't interfere with each other. - add_dependencies(plplot_stub.m_built make_documentation) - else(ENABLE_matwrapped_octave) - add_custom_command( - OUTPUT - ${CMAKE_CURRENT_BINARY_DIR}/plplot_stub.m - COMMAND ${CMAKE_COMMAND} -E copy - ${CMAKE_CURRENT_SOURCE_DIR}/plplot_stub_hand_crafted.m - ${CMAKE_CURRENT_BINARY_DIR}/plplot_stub.m - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/plplot_stub_hand_crafted.m - ) - - add_custom_target( - plplot_stub.m_built ALL - DEPENDS - ${CMAKE_CURRENT_BINARY_DIR}/plplot_stub.m - ) - - set(octave_interface_INCLUDE_PATHS - ${CMAKE_SOURCE_DIR}/include - ${CMAKE_SOURCE_DIR}/lib/qsastime - ${CMAKE_BINARY_DIR} - ${CMAKE_BINARY_DIR}/include - ${CMAKE_CURRENT_BINARY_DIR} - ${OCTAVE_INCLUDE_PATH} - ${CMAKE_SOURCE_DIR}/bindings/swig-support - ) - include_directories(${octave_interface_INCLUDE_PATHS}) - set(CMAKE_SWIG_FLAGS -DSWIG_OCTAVE) - set(CMAKE_SWIG_OUTDIR ${CMAKE_CURRENT_BINARY_DIR}) - - set_source_files_properties(plplot_octave.i - PROPERTIES - SWIG_MODULE_NAME plplot_octave - CPLUSPLUS ON - ) - - set(SWIG_MODULE_plplot_octave_EXTRA_DEPS - ${CMAKE_SOURCE_DIR}/bindings/swig-support/swig_documentation.i - ${CMAKE_SOURCE_DIR}/bindings/swig-support/plplotcapi.i - ) - - # Set up swig + c wrapper. - swig_add_module(plplot_octave octave plplot_octave.i) - swig_link_libraries( - plplot_octave - plplot${LIB_TAG} - "${OCTAVE_LIBRARIES}" - "${OCTINTERP_LIBRARIES}" - ) - - # Make sure plplot_stub.m is copied to build tree before plplot_octave - # is created so can use plplot_octave in normal way. - add_dependencies(plplot_octave plplot_stub.m_built) - endif(ENABLE_matwrapped_octave) - # Need access elsewhere (examples/octave) to the file depends of # this custom target. set_property(GLOBAL PROPERTY Deleted: trunk/bindings/octave/plplot_octave_def =================================================================== --- trunk/bindings/octave/plplot_octave_def 2013-11-14 23:04:56 UTC (rev 12699) +++ trunk/bindings/octave/plplot_octave_def 2013-11-14 23:19:09 UTC (rev 12700) @@ -1,256 +0,0 @@ -global PLESC_SET_RGB -PLESC_SET_RGB = 1; # obsolete -global PLESC_ALLOC_NCOL -PLESC_ALLOC_NCOL = 2; # obsolete -global PLESC_SET_LPB -PLESC_SET_LPB = 3; # obsolete -global PLESC_EXPOSE -PLESC_EXPOSE = 4; # handle window expose -global PLESC_RESIZE -PLESC_RESIZE = 5; # handle window resize -global PLESC_REDRAW -PLESC_REDRAW = 6; # handle window redraw -global PLESC_TEXT -PLESC_TEXT = 7; # switch to text screen -global PLESC_GRAPH -PLESC_GRAPH = 8; # switch to graphics screen -global PLESC_FILL -PLESC_FILL = 9; # fill polygon -global PLESC_DI -PLESC_DI = 10; # handle DI command -global PLESC_FLUSH -PLESC_FLUSH = 11; # flush output -global PLESC_EH -PLESC_EH = 12; # handle Window events -global PLESC_GETC -PLESC_GETC = 13; # get cursor position -global PLESC_SWIN -PLESC_SWIN = 14; # set window parameters -global PLESC_PLFLTBUFFERING -PLESC_PLFLTBUFFERING = 15; # configure PLFLT buffering -global PLESC_XORMOD -PLESC_XORMOD = 16; # set xor mode -global PLESC_SET_COMPRESSION -PLESC_SET_COMPRESSION = 17; # AFR: set compression -global PLESC_CLEAR -PLESC_CLEAR = 18; # RL: clear graphics region -global PLESC_DASH -PLESC_DASH = 19; # RL: draw dashed line -global PLESC_HAS_TEXT -PLESC_HAS_TEXT = 20; # driver draws text -global PLESC_IMAGE -PLESC_IMAGE = 21; # handle image -global PLESC_IMAGEOPS -PLESC_IMAGEOPS = 22; # plimage related operations -global DRAW_LINEX -DRAW_LINEX = 0x01; # draw lines parallel to the X axis -global DRAW_LINEY -DRAW_LINEY = 0x02; # draw lines parallel to the Y axis -global DRAW_LINEXY -DRAW_LINEXY = 0x03; # draw lines parallel to both the X and Y axes -global MAG_COLOR -MAG_COLOR = 0x04; # draw the mesh with a color dependent of the magnitude -global BASE_CONT -BASE_CONT = 0x08; # draw contour plot at bottom xy plane -global TOP_CONT -TOP_CONT = 0x10; # draw contour plot at top xy plane -global SURF_CONT -SURF_CONT = 0x20; # draw contour plot at surface -global DRAW_SIDES -DRAW_SIDES = 0x40; # draw sides -global FACETED -FACETED = 0x80; # draw outline for each square that makes up the surface -global MESH -MESH = 0x100; # draw mesh -global PL_BIN_DEFAULT -PL_BIN_DEFAULT = 0; -global PL_BIN_CENTRED -PL_BIN_CENTRED = 1; -global PL_BIN_NOEXPAND -PL_BIN_NOEXPAND = 2; -global PL_BIN_NOEMPTY -PL_BIN_NOEMPTY = 4; -global PL_HIST_DEFAULT -PL_HIST_DEFAULT = 0; -global PL_HIST_NOSCALING -PL_HIST_NOSCALING = 1; -global PL_HIST_IGNORE_OUTLIERS -PL_HIST_IGNORE_OUTLIERS = 2; -global PL_HIST_NOEXPAND -PL_HIST_NOEXPAND = 8; -global PL_HIST_NOEMPTY -PL_HIST_NOEMPTY = 16; -global PL_POSITION_LEFT -PL_POSITION_LEFT = 1; -global PL_POSITION_RIGHT -PL_POSITION_RIGHT = 2; -global PL_POSITION_TOP -PL_POSITION_TOP = 4; -global PL_POSITION_BOTTOM -PL_POSITION_BOTTOM = 8; -global PL_POSITION_INSIDE -PL_POSITION_INSIDE = 16; -global PL_POSITION_OUTSIDE -PL_POSITION_OUTSIDE = 32; -global PL_POSITION_VIEWPORT -PL_POSITION_VIEWPORT = 64; -global PL_POSITION_SUBPAGE -PL_POSITION_SUBPAGE = 128; -global PL_LEGEND_NONE -PL_LEGEND_NONE = 1; -global PL_LEGEND_COLOR_BOX -PL_LEGEND_COLOR_BOX = 2; -global PL_LEGEND_LINE -PL_LEGEND_LINE = 4; -global PL_LEGEND_SYMBOL -PL_LEGEND_SYMBOL = 8; -global PL_LEGEND_TEXT_LEFT -PL_LEGEND_TEXT_LEFT = 16; -global PL_LEGEND_BACKGROUND -PL_LEGEND_BACKGROUND = 32; -global PL_LEGEND_BOUNDING_BOX -PL_LEGEND_BOUNDING_BOX = 64; -global PL_LEGEND_ROW_MAJOR -PL_LEGEND_ROW_MAJOR = 128; -global PL_COLORBAR_LABEL_LEFT -PL_COLORBAR_LABEL_LEFT = 0x1; -global PL_COLORBAR_LABEL_RIGHT -PL_COLORBAR_LABEL_RIGHT = 0x2; -global PL_COLORBAR_LABEL_TOP -PL_COLORBAR_LABEL_TOP = 0x4; -global PL_COLORBAR_LABEL_BOTTOM -PL_COLORBAR_LABEL_BOTTOM = 0x8; -global PL_COLORBAR_IMAGE -PL_COLORBAR_IMAGE = 0x10; -global PL_COLORBAR_SHADE -PL_COLORBAR_SHADE = 0x20; -global PL_COLORBAR_GRADIENT -PL_COLORBAR_GRADIENT = 0x40; -global PL_COLORBAR_CAP_NONE -PL_COLORBAR_CAP_NONE = 0x80; -global PL_COLORBAR_CAP_LOW -PL_COLORBAR_CAP_LOW = 0x100; -global PL_COLORBAR_CAP_HIGH -PL_COLORBAR_CAP_HIGH = 0x200; -global PL_COLORBAR_SHADE_LABEL -PL_COLORBAR_SHADE_LABEL = 0x400; -global PL_COLORBAR_ORIENT_RIGHT -PL_COLORBAR_ORIENT_RIGHT = 0x800; -global PL_COLORBAR_ORIENT_TOP -PL_COLORBAR_ORIENT_TOP = 0x1000; -global PL_COLORBAR_ORIENT_LEFT -PL_COLORBAR_ORIENT_LEFT = 0x2000; -global PL_COLORBAR_ORIENT_BOTTOM -PL_COLORBAR_ORIENT_BOTTOM = 0x4000; -global PL_COLORBAR_BACKGROUND -PL_COLORBAR_BACKGROUND = 0x8000; -global PL_COLORBAR_BOUNDING_BOX -PL_COLORBAR_BOUNDING_BOX = 0x10000; -global PLSWIN_DEVICE -PLSWIN_DEVICE = 1; # device coordinates -global PLSWIN_WORLD -PLSWIN_WORLD = 2; # world coordinates -global PL_X_AXIS -PL_X_AXIS = 1; # The x-axis -global PL_Y_AXIS -PL_Y_AXIS = 2; # The y-axis -global PL_Z_AXIS -PL_Z_AXIS = 3; # The z-axis -global PL_OPT_ENABLED -PL_OPT_ENABLED = 0x0001; # Obsolete -global PL_OPT_ARG -PL_OPT_ARG = 0x0002; # Option has an argment -global PL_OPT_NODELETE -PL_OPT_NODELETE = 0x0004; # Don't delete after processing -global PL_OPT_INVISIBLE -PL_OPT_INVISIBLE = 0x0008; # Make invisible -global PL_OPT_DISABLED -PL_OPT_DISABLED = 0x0010; # Processing is disabled -global PL_OPT_FUNC -PL_OPT_FUNC = 0x0100; # Call handler function -global PL_OPT_BOOL -PL_OPT_BOOL = 0x0200; # Set *var = 1 -global PL_OPT_INT -PL_OPT_INT = 0x0400; # Set *var = atoi(optarg) -global PL_OPT_FLOAT -PL_OPT_FLOAT = 0x0800; # Set *var = atof(optarg) -global PL_OPT_STRING -PL_OPT_STRING = 0x1000; # Set var = optarg -global PL_PARSE_PARTIAL -PL_PARSE_PARTIAL = 0x0000; # For backward compatibility -global PL_PARSE_FULL -PL_PARSE_FULL = 0x0001; # Process fully & exit if error -global PL_PARSE_QUIET -PL_PARSE_QUIET = 0x0002; # Don't issue messages -global PL_PARSE_NODELETE -PL_PARSE_NODELETE = 0x0004; # Don't delete options after -global PL_PARSE_SHOWALL -PL_PARSE_SHOWALL = 0x0008; # Show invisible options -global PL_PARSE_OVERRIDE -PL_PARSE_OVERRIDE = 0x0010; # Obsolete -global PL_PARSE_NOPROGRAM -PL_PARSE_NOPROGRAM = 0x0020; # Program name NOT in *argv[0].. -global PL_PARSE_NODASH -PL_PARSE_NODASH = 0x0040; # Set if leading dash NOT required -global PL_PARSE_SKIP -PL_PARSE_SKIP = 0x0080; # Skip over unrecognized args -global PL_FCI_MARK -PL_FCI_MARK = 0x80000000; -global PL_FCI_IMPOSSIBLE -PL_FCI_IMPOSSIBLE = 0x00000000; -global PL_FCI_HEXDIGIT_MASK -PL_FCI_HEXDIGIT_MASK = 0xf; -global PL_FCI_HEXPOWER_MASK -PL_FCI_HEXPOWER_MASK = 0x7; -global PL_FCI_HEXPOWER_IMPOSSIBLE -PL_FCI_HEXPOWER_IMPOSSIBLE = 0xf; -global PL_FCI_FAMILY -PL_FCI_FAMILY = 0x0; -global PL_FCI_STYLE -PL_FCI_STYLE = 0x1; -global PL_FCI_WEIGHT -PL_FCI_WEIGHT = 0x2; -global PL_FCI_SANS -PL_FCI_SANS = 0x0; -global PL_FCI_SERIF -PL_FCI_SERIF = 0x1; -global PL_FCI_MONO -PL_FCI_MONO = 0x2; -global PL_FCI_SCRIPT -PL_FCI_SCRIPT = 0x3; -global PL_FCI_SYMBOL -PL_FCI_SYMBOL = 0x4; -global PL_FCI_UPRIGHT -PL_FCI_UPRIGHT = 0x0; -global PL_FCI_ITALIC -PL_FCI_ITALIC = 0x1; -global PL_FCI_OBLIQUE -PL_FCI_OBLIQUE = 0x2; -global PL_FCI_MEDIUM -PL_FCI_MEDIUM = 0x0; -global PL_FCI_BOLD -PL_FCI_BOLD = 0x1; -global PL_MAXKEY -PL_MAXKEY = 16; -global PL_MAXWINDOWS -PL_MAXWINDOWS = 64; # Max number of windows/page tracked -global PL_NOTSET -PL_NOTSET = -42; -global PLESPLFLTBUFFERING_ENABLE -PLESPLFLTBUFFERING_ENABLE = 1; -global PLESPLFLTBUFFERING_DISABLE -PLESPLFLTBUFFERING_DISABLE = 2; -global PLESPLFLTBUFFERING_QUERY -PLESPLFLTBUFFERING_QUERY = 3; -global GRID_CSA -GRID_CSA = 1; # Bivariate Cubic Spline approximation -global GRID_DTLI -GRID_DTLI = 2; # Delaunay Triangulation Linear Interpolation -global GRID_NNI -GRID_NNI = 3; # Natural Neighbors Interpolation -global GRID_NNIDW -GRID_NNIDW = 4; # Nearest Neighbors Inverse Distance Weighted -global GRID_NNLI -GRID_NNLI = 5; # Nearest Neighbors Linear Interpolation -global GRID_NNAIDW -GRID_NNAIDW = 6; # Nearest Neighbors Around Inverse Distance Weighted Modified: trunk/cmake/modules/octave.cmake =================================================================== --- trunk/cmake/modules/octave.cmake 2013-11-14 23:04:56 UTC (rev 12699) +++ trunk/cmake/modules/octave.cmake 2013-11-14 23:19:09 UTC (rev 12700) @@ -208,13 +208,6 @@ endif(ENABLE_octave) if(ENABLE_octave) - #MATWRAP is the path+filename of the matwrap script. - set(MATWRAP "${CMAKE_CURRENT_SOURCE_DIR}/bindings/octave/matwrap/matwrap") - message(STATUS "MATWRAP = ${MATWRAP}") - #MATWRAP_PATH is the path of the matwrap script - get_filename_component(MATWRAP_PATH ${MATWRAP} PATH) - message(STATUS "MATWRAP_PATH = ${MATWRAP_PATH}") - # PLPLOT_OCTAVE_DIR is the directory for installation of the PLplot_Octave # specific m files set(PLPLOT_OCTAVE_DIR ${CMAKE_INSTALL_DATADIR}/plplot_octave) @@ -286,13 +279,5 @@ if(PL_DOUBLE) set(DEFINE_PL_DOUBLE "#define PL_DOUBLE") endif(PL_DOUBLE) -# option(ENABLE_matwrapped_octave "Enable legacy Octave bindings generated by matwrap" OFF) -# if(NOT SWIG_FOUND AND NOT ENABLE_matwrapped_octave) -# message(STATUS "WARNING: " -# "SWIG not found. Falling back to deprecated matwrapped Octave bindings.") -# set(ENABLE_matwrapped_octave ON CACHE BOOL "Enable legacy Octave bindings generated by matwrap" FORCE) -# endif(NOT SWIG_FOUND AND NOT ENABLE_matwrapped_octave) - # Force disabling of matwrapped bindings which are no longer maintained. - set(ENABLE_matwrapped_octave OFF CACHE BOOL "Enable legacy Octave bindings generated by matwrap" FORCE) endif(ENABLE_octave) Modified: trunk/plplot_test/CMakeLists.txt =================================================================== --- trunk/plplot_test/CMakeLists.txt 2013-11-14 23:04:56 UTC (rev 12699) +++ trunk/plplot_test/CMakeLists.txt 2013-11-14 23:19:09 UTC (rev 12700) @@ -140,13 +140,6 @@ endif(ENABLE_java) if(ENABLE_octave) - if(ENABLE_matwrapped_octave) - set(matwrap_octave_comment) - set(swig_octave_comment "# (ignore for matwrap-generated case) ") - else(ENABLE_matwrapped_octave) - set(swig_octave_comment) - set(matwrap_octave_comment "# (ignore for swig-generated case) ") - endif(ENABLE_matwrapped_octave) configure_file( test_octave_interactive.sh.in Modified: trunk/plplot_test/test_octave.sh.in =================================================================== --- trunk/plplot_test/test_octave.sh.in 2013-11-14 23:04:56 UTC (rev 12699) +++ trunk/plplot_test/test_octave.sh.in 2013-11-14 23:19:09 UTC (rev 12700) @@ -59,8 +59,7 @@ # Remove 7, 16 until plshade1 fix is done. -@swig_octave_comment@for i=[1:6 8 9 13 15 21] ; -@matwrap_octave_comment@for i=[1:6 8 9 13 15 21] ; +for i=[1:6 8 9 13 15 21] ; if (verbose_test) printf("p%d\n",i); endif @@ -73,10 +72,7 @@ # Example 32 not implemented because there has been no call for propagation # and it exercises no new API. failed = [] ; -@swig_octave_comment@for i=[0:18 19 20:31 33] ; -# Drop 4, 18, 26, and 33 because deprecated matwrap does not include plstring, -# plstring3, pllegend, or plcolorbar. -@matwrap_octave_comment@for i=[0:3 5:17 20:25 27:31 ] ; +for i=[0:18 19 20:31 33] ; ofile = sprintf("${OUTPUT_DIR}/x%.2d${lang}_${dsuffix}.txt",i); strm = fopen(ofile,"w"); cmd = sprintf("x%.2dc",i); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2013-11-14 23:04:59
|
Revision: 12699 http://sourceforge.net/p/plplot/code/12699 Author: andrewross Date: 2013-11-14 23:04:56 +0000 (Thu, 14 Nov 2013) Log Message: ----------- Update the way the tk driver creates fifos to avoid GNU linker complaining about use of the insecure tmpnam. Instead we now use mkdtemp to securely create a private temporary directory, then create the fifo in that. This avoids potential race conditions. Modified Paths: -------------- trunk/cmake/modules/plplot.cmake trunk/config.h.in trunk/drivers/tk.c trunk/include/plplotP.h trunk/src/plstdio.c Modified: trunk/cmake/modules/plplot.cmake =================================================================== --- trunk/cmake/modules/plplot.cmake 2013-11-14 21:32:36 UTC (rev 12698) +++ trunk/cmake/modules/plplot.cmake 2013-11-14 23:04:56 UTC (rev 12699) @@ -253,6 +253,8 @@ check_function_exists(popen HAVE_POPEN) check_function_exists(usleep PL_HAVE_USLEEP) check_function_exists(mkstemp PL_HAVE_MKSTEMP) +check_function_exists(mkdtemp PL_HAVE_MKDTEMP) +check_function_exists(mkfifo PL_HAVE_MKFIFO) check_function_exists(unlink PL_HAVE_UNLINK) check_function_exists(_NSGetArgc HAVE_NSGETARGC) Modified: trunk/config.h.in =================================================================== --- trunk/config.h.in 2013-11-14 21:32:36 UTC (rev 12698) +++ trunk/config.h.in 2013-11-14 23:04:56 UTC (rev 12699) @@ -109,6 +109,12 @@ // Define to 1 if the function mkstemp is available. #cmakedefine PL_HAVE_MKSTEMP 1 +// Define to 1 if the function mkdtemp is available. +#cmakedefine PL_HAVE_MKDTEMP 1 + +// Define to 1 if the function mkfifo is available. +#cmakedefine PL_HAVE_MKFIFO 1 + // Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. #cmakedefine HAVE_NDIR_H 1 Modified: trunk/drivers/tk.c =================================================================== --- trunk/drivers/tk.c 2013-11-14 21:32:36 UTC (rev 12698) +++ trunk/drivers/tk.c 2013-11-14 23:04:56 UTC (rev 12699) @@ -1521,6 +1521,7 @@ TkDev *dev = (TkDev *) pls->dev; PLiodev *iodev = (PLiodev *) dev->iodev; size_t bufmax = (size_t) ( pls->bufmax * 1.2 ); + char *dirname = NULL; dbug_enter( "link_init" ); @@ -1528,11 +1529,11 @@ if ( !pls->dp ) { - // This of tmpnam should (?) be safe since mkfifo - // will fail if the filename already exists - iodev->fileName = (char *) tmpnam( NULL ); - if ( mkfifo( iodev->fileName, - S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH ) < 0 ) + // This uses the pl_create_tempfifo function to create + // the fifo in a safe manner by first creating a private + // temporary directory. + iodev->fileName = pl_create_tempfifo( (char **) &iodev->fileName, &dirname ); + if ( dirname == NULL || iodev->fileName == NULL ) abort_session( pls, "mkfifo error" ); // Tell plframe widget to open FIFO (for reading). @@ -1555,8 +1556,10 @@ // Unlink FIFO so that it isn't left around if program crashes. // This also ensures no other program can mess with it. - if ( unlink( iodev->fileName ) == -1 ) + if ( unlink( iodev->fileName) == -1 ) abort_session( pls, "Error removing fifo" ); + if ( rmdir( dirname ) == -1 ) + abort_session( pls, "Error removing temporary directory" ); } // Create socket for data transfer to the plframe widget Modified: trunk/include/plplotP.h =================================================================== --- trunk/include/plplotP.h 2013-11-14 21:32:36 UTC (rev 12698) +++ trunk/include/plplotP.h 2013-11-14 23:04:56 UTC (rev 12699) @@ -1227,6 +1227,10 @@ PLDLLIMPEXP FILE * pl_create_tempfile( char **fname ); +// Create a temporary fifo securely +PLDLLIMPEXP char * +pl_create_tempfifo( char **p_fifoname, char **p_dirname ); + #ifdef __cplusplus } #endif Modified: trunk/src/plstdio.c =================================================================== --- trunk/src/plstdio.c 2013-11-14 21:32:36 UTC (rev 12698) +++ trunk/src/plstdio.c 2013-11-14 23:04:56 UTC (rev 12699) @@ -27,10 +27,12 @@ #if defined ( MSDOS ) || defined ( WIN32 ) #include <sys/types.h> -#include <sys/stat.h> #include <fcntl.h> #endif +// This is needed for mode flags for mkfifo as well sa for MSDOS / WIN32 +#include <sys/stat.h> + // For Visual C++ 2005 and later mktemp() and open() are deprecated (see // http://msdn.microsoft.com/en-us/library/ms235413.aspx and // http://msdn.microsoft.com/en-us/library/ms235491.aspx). mktemp() @@ -254,3 +256,91 @@ return fd; } +// +// pl_create_tempfifo() +// +// Securely create a temporary fifo and return the file name. +// This only works on POSIX compliant platforms at the moment. +// It creates a secure directory first using mkdtemp, then +// creates the named fifo in this directory. The combination of +// a private directory and mkfifo failing if the file name already exists +// makes this secure against race conditions / DoS attacks. This function +// includes additional functionality over mkdtemp in that it honours the +// TMP / TMPDIR / TEMP environment variables. +// +// The function returns the file name of the fifo. +// +char * +pl_create_tempfifo( char **p_fifoname, char **p_dirname ) +{ +#if !defined PL_HAVE_MKDTEMP || !defined PL_HAVE_MKFIFO + plwarn("Creating fifos not supported on this platform"); + return NULL; +#else + FILE *fd; + const char *tmpdir; + char *template; + char *dirname; + const char *tmpname = "plplot_dir_XXXXXX"; + const char *fifoname = "plplot_fifo"; + int flags; + +#if defined ( MSDOS ) || defined ( WIN32 ) + tmpdir = getenv( "TEMP" ); +#else + tmpdir = getenv( "TMPDIR" ); +#endif + +// The P_TMPDIR macro is defined in stdio.h on many UNIX systems - try that +#ifdef P_TMPDIR + if ( tmpdir == NULL ) + tmpdir = P_TMPDIR; +#endif + + if ( tmpdir == NULL ) + { +#if defined ( MSDOS ) || defined ( WIN32 ) + tmpdir = "c:\\windows\\Temp"; +#else + tmpdir = "/tmp"; +#endif + } + + // N.B. Malloc ensures template is long enough so strcpy and strcat are safe here + dirname = (char *) malloc( sizeof ( char ) * ( strlen( tmpdir ) + strlen( tmpname ) + 2 ) ); + strcpy( dirname, tmpdir ); +#if defined ( MSDOS ) || defined ( WIN32 ) + strcat( dirname, "\\" ); +#else + strcat( dirname, "/" ); +#endif + strcat( dirname, tmpname ); + // Create the temporary directory + dirname = mkdtemp( dirname ); + *p_dirname = dirname; + + // Now create the fifo in the directory + template = (char *) malloc( sizeof ( char ) * ( strlen( tmpdir ) + strlen( tmpname ) + strlen(fifoname) + 4 ) ); + strcpy( template, dirname ); +#if defined ( MSDOS ) || defined ( WIN32 ) + strcat( template, "\\" ); +#else + strcat( template, "/" ); +#endif + strcat( template, fifoname ); + *p_fifoname = template; + + // Check that mkfifo succeeds safely + if ( mkfifo( template, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH ) < 0 ) { + plwarn( "mkfifo error" ); + free( template ); + *p_fifoname = NULL; + free( dirname ); + *p_dirname = NULL; + return NULL; + } + + return template; +#endif +} + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-14 21:32:38
|
Revision: 12698 http://sourceforge.net/p/plplot/code/12698 Author: airwin Date: 2013-11-14 21:32:36 +0000 (Thu, 14 Nov 2013) Log Message: ----------- Remove "$plwin cmd plspause 0" command since for some reason that does not (yet) work under plserver, and any case this should be part of the plserver or wish script that sources tkdemos.tcl. Modified Paths: -------------- trunk/examples/tk/tkdemos.tcl Modified: trunk/examples/tk/tkdemos.tcl =================================================================== --- trunk/examples/tk/tkdemos.tcl 2013-11-14 19:56:31 UTC (rev 12697) +++ trunk/examples/tk/tkdemos.tcl 2013-11-14 21:32:36 UTC (rev 12698) @@ -73,7 +73,6 @@ proc $i {} " global plwin - $plwin cmd plspause 0 $demo $plwin $plwin cmd plcol0 1 $plwin cmd plsori 0 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-14 19:56:38
|
Revision: 12697 http://sourceforge.net/p/plplot/code/12697 Author: airwin Date: 2013-11-14 19:56:31 +0000 (Thu, 14 Nov 2013) Log Message: ----------- Add the test_tclsh_standard_examples target to automate the tclsh TEA-based testing that is mentioned in examples/tcl/README.tcldemos. Make the test_interactive target depend on this new target so this new test will be done automatically whenever the test_interactive target is run. Tested by Alan W. Irwin <ai...@us...> on Linux using the test_tclsh_standard_examples target in the build tree. I did this from a scratch build to demonstrate that all dependencies of this test were handled correctly. Modified Paths: -------------- trunk/examples/CMakeLists.txt trunk/examples/tcl/CMakeLists.txt Added Paths: ----------- trunk/examples/tcl/tclsh_standard_examples.in Modified: trunk/examples/CMakeLists.txt =================================================================== --- trunk/examples/CMakeLists.txt 2013-11-14 07:54:24 UTC (rev 12696) +++ trunk/examples/CMakeLists.txt 2013-11-14 19:56:31 UTC (rev 12697) @@ -873,19 +873,11 @@ endif(ENABLE_pygcw) if(ENABLE_tcl AND PLD_xwin) - if(CORE_BUILD) - add_custom_target(test_tcl_standard_examples - COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tcl/standard_examples -dev xwin -np - DEPENDS ${xwin_target} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tcl - ) - else(CORE_BUILD) - add_custom_target(test_tcl_standard_examples - COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tcl/standard_examples -dev xwin -np - DEPENDS ${xwin_target} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tcl - ) - endif(CORE_BUILD) + add_custom_target(test_tcl_standard_examples + COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tcl/standard_examples -dev xwin -np + DEPENDS ${xwin_target} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tcl + ) add_dependencies(test_tcl_standard_examples pltcl tcl_examples @@ -897,6 +889,22 @@ endif(FILE_DEPENDS_xwin) list(APPEND interactive_targets_LIST test_tcl_standard_examples) + add_custom_target(test_tclsh_standard_examples + COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tcl/tclsh_standard_examples + DEPENDS ${xwin_target} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tcl + ) + add_dependencies(test_tclsh_standard_examples + pltcl + tcl_examples + tclIndex_tcl + xwin + ) + if(FILE_DEPENDS_xwin) + add_dependencies(test_tclsh_standard_examples test_xwin_dyndriver) + endif(FILE_DEPENDS_xwin) + list(APPEND interactive_targets_LIST test_tclsh_standard_examples) + endif(ENABLE_tcl AND PLD_xwin) if(ENABLE_tk AND PLD_tk) Modified: trunk/examples/tcl/CMakeLists.txt =================================================================== --- trunk/examples/tcl/CMakeLists.txt 2013-11-14 07:54:24 UTC (rev 12696) +++ trunk/examples/tcl/CMakeLists.txt 2013-11-14 19:56:31 UTC (rev 12697) @@ -85,6 +85,21 @@ @ONLY ) +# tclsh_standard_examples is a configured shell script that runs all +# the standard examples under tclsh use a TEA-based approach. +# pkgIndex_LOCATION is the directory where the relevant pkgIndex.tcl +# file is located. +if(CORE_BUILD) + set(pkgIndex_LOCATION ${CMAKE_BINARY_DIR}/bindings/tcl) +else(CORE_BUILD) + set(pkgIndex_LOCATION ${DATA_DIR}) +endif(CORE_BUILD) +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/tclsh_standard_examples.in + ${CMAKE_CURRENT_BINARY_DIR}/tclsh_standard_examples + @ONLY + ) + # Copy file and scripts to the binary directory if different to the # source directory. Needed for ctest, but also so the tclIndex file # is generated in the binary tree not the source tree. @@ -120,7 +135,7 @@ ) install(FILES ${tcl_FILES} DESTINATION ${DATA_DIR}/examples/tcl) - install(PROGRAMS ${tcl_SCRIPTS} standard_examples.in + install(PROGRAMS ${tcl_SCRIPTS} standard_examples.in tclsh_standard_examples.in DESTINATION ${DATA_DIR}/examples/tcl ) Added: trunk/examples/tcl/tclsh_standard_examples.in =================================================================== --- trunk/examples/tcl/tclsh_standard_examples.in (rev 0) +++ trunk/examples/tcl/tclsh_standard_examples.in 2013-11-14 19:56:31 UTC (rev 12697) @@ -0,0 +1,48 @@ +#!@SH_EXECUTABLE@ +# Examples 14 and 31 left out - see Tk standard_examples.in +# Choose the xwin device below (after plinit) +# Note the backslash at the end - this causes Tcl to ignore +# the next line. It becomes a valid Tcl script as well as +# valid shell script +# \ +@TCL_TCLSH@ <<EOF +lappend auto_path @pkgIndex_LOCATION@ +package require Pltcl +source tcldemos.tcl +plsdev "xwin" +plinit +plspause 0 +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +15 +16 +17 +18 +19 +20 +plspause 0 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +33 +exit +EOF Property changes on: trunk/examples/tcl/tclsh_standard_examples.in ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arj...@us...> - 2013-11-14 07:54:27
|
Revision: 12696 http://sourceforge.net/p/plplot/code/12696 Author: arjenmarkus Date: 2013-11-14 07:54:24 +0000 (Thu, 14 Nov 2013) Log Message: ----------- Always use TclFormatInt as a macro, instead of relying on its presence in the Tcl library for older versions of Tcl. It is used only once in the code, so that the performance advantages the function offers are of no interest. The original code caused problems in some cases, even though the Tcl version used was 8.5 or later. Modified Paths: -------------- trunk/bindings/tcl/tclMain.c Modified: trunk/bindings/tcl/tclMain.c =================================================================== --- trunk/bindings/tcl/tclMain.c 2013-11-13 23:53:45 UTC (rev 12695) +++ trunk/bindings/tcl/tclMain.c 2013-11-14 07:54:24 UTC (rev 12696) @@ -52,13 +52,7 @@ // Required for definition of PL_UNUSED macro #include "plplotP.h" -#if TCL_MAJOR_VERSION >= 8 && TCL_MINOR_VERSION >= 5 -// From (private) tclInt.h in tcl8.5 #define TclFormatInt( buf, n ) sprintf( ( buf ), "%ld", (long) ( n ) ) -#else -// From (private) tclIntDecls.h in tcl8.4 and before -EXTERN int TclFormatInt _ANSI_ARGS_( ( char * buffer, long n ) ); -#endif #ifndef TclObjCommandComplete_TCL_DECLARED EXTERN int TclObjCommandComplete _ANSI_ARGS_( ( Tcl_Obj * cmdPtr ) ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-13 23:53:48
|
Revision: 12695 http://sourceforge.net/p/plplot/code/12695 Author: airwin Date: 2013-11-13 23:53:45 +0000 (Wed, 13 Nov 2013) Log Message: ----------- Make Tcl constants in the PLPLOT namespace properly accessible from all environments including tclsh and wish. Modified Paths: -------------- trunk/bindings/tcl/tclAPI.c trunk/bindings/tk/plserver.c Modified: trunk/bindings/tcl/tclAPI.c =================================================================== --- trunk/bindings/tcl/tclAPI.c 2013-11-13 22:53:37 UTC (rev 12694) +++ trunk/bindings/tcl/tclAPI.c 2013-11-13 23:53:45 UTC (rev 12695) @@ -386,7 +386,7 @@ //-------------------------------------------------------------------------- // PlbasicInit // -// Used by both Pltcl and Pltk. Ensures we have been correctly loaded +// Used by Pltcl_Init, Pltk_Init(.c), and Plplotter_Init(.c). Ensures we have been correctly loaded // into a Tcl/Tk interpreter, that the plplot.tcl startup file can be // found and sourced, and that the Matrix library can be found and used, // and that it correctly exports a stub table. @@ -593,6 +593,9 @@ Tcl_CreateCommand( interp, "wait_until", (Tcl_CmdProc *) plWait_Until, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL ); +// Define the flags as variables in the PLPLOT namespace + set_plplot_parameters( interp ); + return TCL_OK; } @@ -630,10 +633,6 @@ (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL ); } -// Define the flags as variables in the PLPLOT namespace - - set_plplot_parameters( interp ); - // We really need this so the TEA based 'make install' can // properly determine the package we have installed Modified: trunk/bindings/tk/plserver.c =================================================================== --- trunk/bindings/tk/plserver.c 2013-11-13 22:53:37 UTC (rev 12694) +++ trunk/bindings/tk/plserver.c 2013-11-13 23:53:45 UTC (rev 12695) @@ -38,7 +38,6 @@ #define NEED_PLDEBUG #include "plserver.h" -#include "plplot_parameters.h" // Application-specific command-line options // Variable declarations @@ -235,10 +234,6 @@ Tcl_CreateCommand( interp, "exit", (Tcl_CmdProc *) plExitCmd, (ClientData) mainWindow, (Tcl_CmdDeleteProc *) NULL ); -// Define the flags as variables in the PLPLOT namespace - - set_plplot_parameters( interp ); - return TCL_OK; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-13 22:53:41
|
Revision: 12694 http://sourceforge.net/p/plplot/code/12694 Author: airwin Date: 2013-11-13 22:53:37 +0000 (Wed, 13 Nov 2013) Log Message: ----------- Fix minor build-system issue that was keeping the test_tcl_standard_examples target from being added to what was run by the test_interactive target. Tested by Alan W. Irwin <ai...@us...> on Linux using the test_interactive target. Modified Paths: -------------- trunk/examples/CMakeLists.txt Modified: trunk/examples/CMakeLists.txt =================================================================== --- trunk/examples/CMakeLists.txt 2013-11-13 22:07:52 UTC (rev 12693) +++ trunk/examples/CMakeLists.txt 2013-11-13 22:53:37 UTC (rev 12694) @@ -895,7 +895,7 @@ if(FILE_DEPENDS_xwin) add_dependencies(test_tcl_standard_examples test_xwin_dyndriver) endif(FILE_DEPENDS_xwin) - list(APPEND interactive_targets_LIST ${test_tcl_standard_examples}) + list(APPEND interactive_targets_LIST test_tcl_standard_examples) endif(ENABLE_tcl AND PLD_xwin) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-13 22:07:55
|
Revision: 12693 http://sourceforge.net/p/plplot/code/12693 Author: airwin Date: 2013-11-13 22:07:52 +0000 (Wed, 13 Nov 2013) Log Message: ----------- Fix long-standing bug with tcl examples where superscript/subscript escapes were being ignored in subsequent examples (i.e., example 33) run in the same batch because this example failed (until this fix) to restore the default escape character "#". Modified Paths: -------------- trunk/examples/tcl/x29.tcl Modified: trunk/examples/tcl/x29.tcl =================================================================== --- trunk/examples/tcl/x29.tcl 2013-11-13 19:58:55 UTC (rev 12692) +++ trunk/examples/tcl/x29.tcl 2013-11-13 22:07:52 UTC (rev 12693) @@ -45,6 +45,9 @@ x29_plot4 $w + # Restore escape character back to default so we don't affect + # later plots made after this one. + $w cmd plsesc "#" } # Plot a model diurnal cycle of temperature This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-13 19:58:59
|
Revision: 12692 http://sourceforge.net/p/plplot/code/12692 Author: airwin Date: 2013-11-13 19:58:55 +0000 (Wed, 13 Nov 2013) Log Message: ----------- For historical reasons ZEROW2B, ZEROW2D, ONEW2B, and ONEW2D were dropped from the Tcl constants, but since those are correctly #defined in plplot.h and not dropped by any other language include those constants. Make important fix for all tcl constants in the PLPLOT namespace which is to process them with expr to convert the hexadecimal form to decimal. It turns out the hexadecimal form never worked previously, but we didn't know that because only constants that were unused in our tcl standard examples were expressed as hexadecimal. But since the recent repropagation effort based on the numerical macros in plplot.h (many of which were in hexadecimal form) a much larger fraction of the tcl constants were in hexadecimal form and this (until the present fix to convert all tcl constants to decimal form) completely screwed up standard example 33 results for tcl. Tested by: Alan W. Irwin <ai...@us...> on Linux using the test_diff_psc target. Modified Paths: -------------- trunk/bindings/tcl/global_defines.sed trunk/bindings/tcl/plplot_parameters.h Modified: trunk/bindings/tcl/global_defines.sed =================================================================== --- trunk/bindings/tcl/global_defines.sed 2013-11-13 19:27:17 UTC (rev 12691) +++ trunk/bindings/tcl/global_defines.sed 2013-11-13 19:58:55 UTC (rev 12692) @@ -29,8 +29,6 @@ # Drop specific #defines from the file that are not available # because of specific #if statements. -/^#define ZEROW/ d -/^#define ONEW/ d /OBJECT_DATA/ d /^#define pltr_img/ d @@ -38,8 +36,9 @@ /^#define/ s?//?#? # Parse what is left while preserving trailing comments. Watch out -# for parentheses around value as well. -/^#define/ s?^#define *\([^ ]*\)[ (]*\([^ ]*\)[ )]*\(.*\)$?\\n\\\n\3\\n\\\nvariable \1 \2\\n\\? +# for parentheses around value as well. Use the expr syntax to +# convert all hexadecimal constants to integers. +/^#define/ s?^#define *\([^ ]*\)[ (]*\([^ ]*\)[ )]*\(.*\)$?\\n\\\n\3\\n\\\nvariable \1 [expr \2]\\n\\? # Append extra constants not #defined in plplotcapi.i after PL_NOTSET # is processed. Modified: trunk/bindings/tcl/plplot_parameters.h =================================================================== --- trunk/bindings/tcl/plplot_parameters.h 2013-11-13 19:27:17 UTC (rev 12691) +++ trunk/bindings/tcl/plplot_parameters.h 2013-11-13 19:58:55 UTC (rev 12692) @@ -15,465 +15,477 @@ Tcl_Eval( interp, "namespace eval ::PLPLOT { \n\ \n\ # obsolete\n\ -variable PLESC_SET_RGB 1\n\ +variable PLESC_SET_RGB [expr 1]\n\ \n\ # obsolete\n\ -variable PLESC_ALLOC_NCOL 2\n\ +variable PLESC_ALLOC_NCOL [expr 2]\n\ \n\ # obsolete\n\ -variable PLESC_SET_LPB 3\n\ +variable PLESC_SET_LPB [expr 3]\n\ \n\ # handle window expose\n\ -variable PLESC_EXPOSE 4\n\ +variable PLESC_EXPOSE [expr 4]\n\ \n\ # handle window resize\n\ -variable PLESC_RESIZE 5\n\ +variable PLESC_RESIZE [expr 5]\n\ \n\ # handle window redraw\n\ -variable PLESC_REDRAW 6\n\ +variable PLESC_REDRAW [expr 6]\n\ \n\ # switch to text screen\n\ -variable PLESC_TEXT 7\n\ +variable PLESC_TEXT [expr 7]\n\ \n\ # switch to graphics screen\n\ -variable PLESC_GRAPH 8\n\ +variable PLESC_GRAPH [expr 8]\n\ \n\ # fill polygon\n\ -variable PLESC_FILL 9\n\ +variable PLESC_FILL [expr 9]\n\ \n\ # handle DI command\n\ -variable PLESC_DI 10\n\ +variable PLESC_DI [expr 10]\n\ \n\ # flush output\n\ -variable PLESC_FLUSH 11\n\ +variable PLESC_FLUSH [expr 11]\n\ \n\ # handle Window events\n\ -variable PLESC_EH 12\n\ +variable PLESC_EH [expr 12]\n\ \n\ # get cursor position\n\ -variable PLESC_GETC 13\n\ +variable PLESC_GETC [expr 13]\n\ \n\ # set window parameters\n\ -variable PLESC_SWIN 14\n\ +variable PLESC_SWIN [expr 14]\n\ \n\ # configure double buffering\n\ -variable PLESC_DOUBLEBUFFERING 15\n\ +variable PLESC_DOUBLEBUFFERING [expr 15]\n\ \n\ # set xor mode\n\ -variable PLESC_XORMOD 16\n\ +variable PLESC_XORMOD [expr 16]\n\ \n\ # AFR: set compression\n\ -variable PLESC_SET_COMPRESSION 17\n\ +variable PLESC_SET_COMPRESSION [expr 17]\n\ \n\ # RL: clear graphics region\n\ -variable PLESC_CLEAR 18\n\ +variable PLESC_CLEAR [expr 18]\n\ \n\ # RL: draw dashed line\n\ -variable PLESC_DASH 19\n\ +variable PLESC_DASH [expr 19]\n\ \n\ # driver draws text\n\ -variable PLESC_HAS_TEXT 20\n\ +variable PLESC_HAS_TEXT [expr 20]\n\ \n\ # handle image\n\ -variable PLESC_IMAGE 21\n\ +variable PLESC_IMAGE [expr 21]\n\ \n\ # plimage related operations\n\ -variable PLESC_IMAGEOPS 22\n\ +variable PLESC_IMAGEOPS [expr 22]\n\ \n\ # convert PLColor to device color\n\ -variable PLESC_PL2DEVCOL 23\n\ +variable PLESC_PL2DEVCOL [expr 23]\n\ \n\ # convert device color to PLColor\n\ -variable PLESC_DEV2PLCOL 24\n\ +variable PLESC_DEV2PLCOL [expr 24]\n\ \n\ # set BG, FG colors\n\ -variable PLESC_SETBGFG 25\n\ +variable PLESC_SETBGFG [expr 25]\n\ \n\ # alternate device initialization\n\ -variable PLESC_DEVINIT 26\n\ +variable PLESC_DEVINIT [expr 26]\n\ \n\ # get used backend of (wxWidgets) driver\n\ -variable PLESC_GETBACKEND 27\n\ +variable PLESC_GETBACKEND [expr 27]\n\ \n\ # get ready to draw a line of text\n\ -variable PLESC_BEGIN_TEXT 28\n\ +variable PLESC_BEGIN_TEXT [expr 28]\n\ \n\ # render a character of text\n\ -variable PLESC_TEXT_CHAR 29\n\ +variable PLESC_TEXT_CHAR [expr 29]\n\ \n\ # handle a text control character (super/subscript, etc.)\n\ -variable PLESC_CONTROL_CHAR 30\n\ +variable PLESC_CONTROL_CHAR [expr 30]\n\ \n\ # finish a drawing a line of text\n\ -variable PLESC_END_TEXT 31\n\ +variable PLESC_END_TEXT [expr 31]\n\ \n\ # start rasterized rendering\n\ -variable PLESC_START_RASTERIZE 32\n\ +variable PLESC_START_RASTERIZE [expr 32]\n\ \n\ # end rasterized rendering\n\ -variable PLESC_END_RASTERIZE 33\n\ +variable PLESC_END_RASTERIZE [expr 33]\n\ \n\ # render an arc\n\ -variable PLESC_ARC 34\n\ +variable PLESC_ARC [expr 34]\n\ \n\ # render a gradient\n\ -variable PLESC_GRADIENT 35\n\ +variable PLESC_GRADIENT [expr 35]\n\ \n\ # set drawing mode\n\ -variable PLESC_MODESET 36\n\ +variable PLESC_MODESET [expr 36]\n\ \n\ # get drawing mode\n\ -variable PLESC_MODEGET 37\n\ +variable PLESC_MODEGET [expr 37]\n\ \n\ # font change in the text stream\n\ -variable PLTEXT_FONTCHANGE 0\n\ +variable PLTEXT_FONTCHANGE [expr 0]\n\ \n\ # superscript in the text stream\n\ -variable PLTEXT_SUPERSCRIPT 1\n\ +variable PLTEXT_SUPERSCRIPT [expr 1]\n\ \n\ # subscript in the text stream\n\ -variable PLTEXT_SUBSCRIPT 2\n\ +variable PLTEXT_SUBSCRIPT [expr 2]\n\ \n\ # back-char in the text stream\n\ -variable PLTEXT_BACKCHAR 3\n\ +variable PLTEXT_BACKCHAR [expr 3]\n\ \n\ # toggle overline in the text stream\n\ -variable PLTEXT_OVERLINE 4\n\ +variable PLTEXT_OVERLINE [expr 4]\n\ \n\ # toggle underline in the text stream\n\ -variable PLTEXT_UNDERLINE 5\n\ +variable PLTEXT_UNDERLINE [expr 5]\n\ \n\ +\n\ +variable ZEROW2B [expr 1]\n\ +\n\ +\n\ +variable ZEROW2D [expr 2]\n\ +\n\ +\n\ +variable ONEW2B [expr 3]\n\ +\n\ +\n\ +variable ONEW2D [expr 4]\n\ +\n\ # device coordinates\n\ -variable PLSWIN_DEVICE 1\n\ +variable PLSWIN_DEVICE [expr 1]\n\ \n\ # world coordinates\n\ -variable PLSWIN_WORLD 2\n\ +variable PLSWIN_WORLD [expr 2]\n\ \n\ # The x-axis\n\ -variable PL_X_AXIS 1\n\ +variable PL_X_AXIS [expr 1]\n\ \n\ # The y-axis\n\ -variable PL_Y_AXIS 2\n\ +variable PL_Y_AXIS [expr 2]\n\ \n\ # The z-axis\n\ -variable PL_Z_AXIS 3\n\ +variable PL_Z_AXIS [expr 3]\n\ \n\ # Obsolete\n\ -variable PL_OPT_ENABLED 0x0001\n\ +variable PL_OPT_ENABLED [expr 0x0001]\n\ \n\ # Option has an argment\n\ -variable PL_OPT_ARG 0x0002\n\ +variable PL_OPT_ARG [expr 0x0002]\n\ \n\ # Don't delete after processing\n\ -variable PL_OPT_NODELETE 0x0004\n\ +variable PL_OPT_NODELETE [expr 0x0004]\n\ \n\ # Make invisible\n\ -variable PL_OPT_INVISIBLE 0x0008\n\ +variable PL_OPT_INVISIBLE [expr 0x0008]\n\ \n\ # Processing is disabled\n\ -variable PL_OPT_DISABLED 0x0010\n\ +variable PL_OPT_DISABLED [expr 0x0010]\n\ \n\ # Call handler function\n\ -variable PL_OPT_FUNC 0x0100\n\ +variable PL_OPT_FUNC [expr 0x0100]\n\ \n\ # Set *var = 1\n\ -variable PL_OPT_BOOL 0x0200\n\ +variable PL_OPT_BOOL [expr 0x0200]\n\ \n\ # Set *var = atoi(optarg)\n\ -variable PL_OPT_INT 0x0400\n\ +variable PL_OPT_INT [expr 0x0400]\n\ \n\ # Set *var = atof(optarg)\n\ -variable PL_OPT_FLOAT 0x0800\n\ +variable PL_OPT_FLOAT [expr 0x0800]\n\ \n\ # Set var = optarg\n\ -variable PL_OPT_STRING 0x1000\n\ +variable PL_OPT_STRING [expr 0x1000]\n\ \n\ # For backward compatibility\n\ -variable PL_PARSE_PARTIAL 0x0000\n\ +variable PL_PARSE_PARTIAL [expr 0x0000]\n\ \n\ # Process fully & exit if error\n\ -variable PL_PARSE_FULL 0x0001\n\ +variable PL_PARSE_FULL [expr 0x0001]\n\ \n\ # Don't issue messages\n\ -variable PL_PARSE_QUIET 0x0002\n\ +variable PL_PARSE_QUIET [expr 0x0002]\n\ \n\ # Don't delete options after\n\ -variable PL_PARSE_NODELETE 0x0004\n\ +variable PL_PARSE_NODELETE [expr 0x0004]\n\ \n\ # Show invisible options\n\ -variable PL_PARSE_SHOWALL 0x0008\n\ +variable PL_PARSE_SHOWALL [expr 0x0008]\n\ \n\ # Obsolete\n\ -variable PL_PARSE_OVERRIDE 0x0010\n\ +variable PL_PARSE_OVERRIDE [expr 0x0010]\n\ \n\ # Program name NOT in *argv[0]..\n\ -variable PL_PARSE_NOPROGRAM 0x0020\n\ +variable PL_PARSE_NOPROGRAM [expr 0x0020]\n\ \n\ # Set if leading dash NOT required\n\ -variable PL_PARSE_NODASH 0x0040\n\ +variable PL_PARSE_NODASH [expr 0x0040]\n\ \n\ # Skip over unrecognized args\n\ -variable PL_PARSE_SKIP 0x0080\n\ +variable PL_PARSE_SKIP [expr 0x0080]\n\ \n\ \n\ -variable PL_FCI_MARK 0x80000000\n\ +variable PL_FCI_MARK [expr 0x80000000]\n\ \n\ \n\ -variable PL_FCI_IMPOSSIBLE 0x00000000\n\ +variable PL_FCI_IMPOSSIBLE [expr 0x00000000]\n\ \n\ \n\ -variable PL_FCI_HEXDIGIT_MASK 0xf\n\ +variable PL_FCI_HEXDIGIT_MASK [expr 0xf]\n\ \n\ \n\ -variable PL_FCI_HEXPOWER_MASK 0x7\n\ +variable PL_FCI_HEXPOWER_MASK [expr 0x7]\n\ \n\ \n\ -variable PL_FCI_HEXPOWER_IMPOSSIBLE 0xf\n\ +variable PL_FCI_HEXPOWER_IMPOSSIBLE [expr 0xf]\n\ \n\ \n\ -variable PL_FCI_FAMILY 0x0\n\ +variable PL_FCI_FAMILY [expr 0x0]\n\ \n\ \n\ -variable PL_FCI_STYLE 0x1\n\ +variable PL_FCI_STYLE [expr 0x1]\n\ \n\ \n\ -variable PL_FCI_WEIGHT 0x2\n\ +variable PL_FCI_WEIGHT [expr 0x2]\n\ \n\ \n\ -variable PL_FCI_SANS 0x0\n\ +variable PL_FCI_SANS [expr 0x0]\n\ \n\ \n\ -variable PL_FCI_SERIF 0x1\n\ +variable PL_FCI_SERIF [expr 0x1]\n\ \n\ \n\ -variable PL_FCI_MONO 0x2\n\ +variable PL_FCI_MONO [expr 0x2]\n\ \n\ \n\ -variable PL_FCI_SCRIPT 0x3\n\ +variable PL_FCI_SCRIPT [expr 0x3]\n\ \n\ \n\ -variable PL_FCI_SYMBOL 0x4\n\ +variable PL_FCI_SYMBOL [expr 0x4]\n\ \n\ \n\ -variable PL_FCI_UPRIGHT 0x0\n\ +variable PL_FCI_UPRIGHT [expr 0x0]\n\ \n\ \n\ -variable PL_FCI_ITALIC 0x1\n\ +variable PL_FCI_ITALIC [expr 0x1]\n\ \n\ \n\ -variable PL_FCI_OBLIQUE 0x2\n\ +variable PL_FCI_OBLIQUE [expr 0x2]\n\ \n\ \n\ -variable PL_FCI_MEDIUM 0x0\n\ +variable PL_FCI_MEDIUM [expr 0x0]\n\ \n\ \n\ -variable PL_FCI_BOLD 0x1\n\ +variable PL_FCI_BOLD [expr 0x1]\n\ \n\ \n\ -variable PL_MAXKEY 16\n\ +variable PL_MAXKEY [expr 16]\n\ \n\ # Max number of windows/page tracked\n\ -variable PL_MAXWINDOWS 64\n\ +variable PL_MAXWINDOWS [expr 64]\n\ \n\ \n\ -variable PL_NOTSET -42\n\ +variable PL_NOTSET [expr -42]\n\ \n\ \n\ variable PL_PI 3.1415926535897932384\n\ \n\ \n\ -variable PLESC_DOUBLEBUFFERING_ENABLE 1\n\ +variable PLESC_DOUBLEBUFFERING_ENABLE [expr 1]\n\ \n\ \n\ -variable PLESC_DOUBLEBUFFERING_DISABLE 2\n\ +variable PLESC_DOUBLEBUFFERING_DISABLE [expr 2]\n\ \n\ \n\ -variable PLESC_DOUBLEBUFFERING_QUERY 3\n\ +variable PLESC_DOUBLEBUFFERING_QUERY [expr 3]\n\ \n\ \n\ -variable PL_BIN_DEFAULT 0x0\n\ +variable PL_BIN_DEFAULT [expr 0x0]\n\ \n\ \n\ -variable PL_BIN_CENTRED 0x1\n\ +variable PL_BIN_CENTRED [expr 0x1]\n\ \n\ \n\ -variable PL_BIN_NOEXPAND 0x2\n\ +variable PL_BIN_NOEXPAND [expr 0x2]\n\ \n\ \n\ -variable PL_BIN_NOEMPTY 0x4\n\ +variable PL_BIN_NOEMPTY [expr 0x4]\n\ \n\ # Bivariate Cubic Spline approximation\n\ -variable GRID_CSA 1\n\ +variable GRID_CSA [expr 1]\n\ \n\ # Delaunay Triangulation Linear Interpolation\n\ -variable GRID_DTLI 2\n\ +variable GRID_DTLI [expr 2]\n\ \n\ # Natural Neighbors Interpolation\n\ -variable GRID_NNI 3\n\ +variable GRID_NNI [expr 3]\n\ \n\ # Nearest Neighbors Inverse Distance Weighted\n\ -variable GRID_NNIDW 4\n\ +variable GRID_NNIDW [expr 4]\n\ \n\ # Nearest Neighbors Linear Interpolation\n\ -variable GRID_NNLI 5\n\ +variable GRID_NNLI [expr 5]\n\ \n\ # Nearest Neighbors Around Inverse Distance Weighted\n\ -variable GRID_NNAIDW 6\n\ +variable GRID_NNAIDW [expr 6]\n\ \n\ \n\ -variable PL_HIST_DEFAULT 0x00\n\ +variable PL_HIST_DEFAULT [expr 0x00]\n\ \n\ \n\ -variable PL_HIST_NOSCALING 0x01\n\ +variable PL_HIST_NOSCALING [expr 0x01]\n\ \n\ \n\ -variable PL_HIST_IGNORE_OUTLIERS 0x02\n\ +variable PL_HIST_IGNORE_OUTLIERS [expr 0x02]\n\ \n\ \n\ -variable PL_HIST_NOEXPAND 0x08\n\ +variable PL_HIST_NOEXPAND [expr 0x08]\n\ \n\ \n\ -variable PL_HIST_NOEMPTY 0x10\n\ +variable PL_HIST_NOEMPTY [expr 0x10]\n\ \n\ \n\ -variable PL_POSITION_LEFT 0x1\n\ +variable PL_POSITION_LEFT [expr 0x1]\n\ \n\ \n\ -variable PL_POSITION_RIGHT 0x2\n\ +variable PL_POSITION_RIGHT [expr 0x2]\n\ \n\ \n\ -variable PL_POSITION_TOP 0x4\n\ +variable PL_POSITION_TOP [expr 0x4]\n\ \n\ \n\ -variable PL_POSITION_BOTTOM 0x8\n\ +variable PL_POSITION_BOTTOM [expr 0x8]\n\ \n\ \n\ -variable PL_POSITION_INSIDE 0x10\n\ +variable PL_POSITION_INSIDE [expr 0x10]\n\ \n\ \n\ -variable PL_POSITION_OUTSIDE 0x20\n\ +variable PL_POSITION_OUTSIDE [expr 0x20]\n\ \n\ \n\ -variable PL_POSITION_VIEWPORT 0x40\n\ +variable PL_POSITION_VIEWPORT [expr 0x40]\n\ \n\ \n\ -variable PL_POSITION_SUBPAGE 0x80\n\ +variable PL_POSITION_SUBPAGE [expr 0x80]\n\ \n\ \n\ -variable PL_LEGEND_NONE 0x1\n\ +variable PL_LEGEND_NONE [expr 0x1]\n\ \n\ \n\ -variable PL_LEGEND_COLOR_BOX 0x2\n\ +variable PL_LEGEND_COLOR_BOX [expr 0x2]\n\ \n\ \n\ -variable PL_LEGEND_LINE 0x4\n\ +variable PL_LEGEND_LINE [expr 0x4]\n\ \n\ \n\ -variable PL_LEGEND_SYMBOL 0x8\n\ +variable PL_LEGEND_SYMBOL [expr 0x8]\n\ \n\ \n\ -variable PL_LEGEND_TEXT_LEFT 0x10\n\ +variable PL_LEGEND_TEXT_LEFT [expr 0x10]\n\ \n\ \n\ -variable PL_LEGEND_BACKGROUND 0x20\n\ +variable PL_LEGEND_BACKGROUND [expr 0x20]\n\ \n\ \n\ -variable PL_LEGEND_BOUNDING_BOX 0x40\n\ +variable PL_LEGEND_BOUNDING_BOX [expr 0x40]\n\ \n\ \n\ -variable PL_LEGEND_ROW_MAJOR 0x80\n\ +variable PL_LEGEND_ROW_MAJOR [expr 0x80]\n\ \n\ \n\ -variable PL_COLORBAR_LABEL_LEFT 0x1\n\ +variable PL_COLORBAR_LABEL_LEFT [expr 0x1]\n\ \n\ \n\ -variable PL_COLORBAR_LABEL_RIGHT 0x2\n\ +variable PL_COLORBAR_LABEL_RIGHT [expr 0x2]\n\ \n\ \n\ -variable PL_COLORBAR_LABEL_TOP 0x4\n\ +variable PL_COLORBAR_LABEL_TOP [expr 0x4]\n\ \n\ \n\ -variable PL_COLORBAR_LABEL_BOTTOM 0x8\n\ +variable PL_COLORBAR_LABEL_BOTTOM [expr 0x8]\n\ \n\ \n\ -variable PL_COLORBAR_IMAGE 0x10\n\ +variable PL_COLORBAR_IMAGE [expr 0x10]\n\ \n\ \n\ -variable PL_COLORBAR_SHADE 0x20\n\ +variable PL_COLORBAR_SHADE [expr 0x20]\n\ \n\ \n\ -variable PL_COLORBAR_GRADIENT 0x40\n\ +variable PL_COLORBAR_GRADIENT [expr 0x40]\n\ \n\ \n\ -variable PL_COLORBAR_CAP_NONE 0x80\n\ +variable PL_COLORBAR_CAP_NONE [expr 0x80]\n\ \n\ \n\ -variable PL_COLORBAR_CAP_LOW 0x100\n\ +variable PL_COLORBAR_CAP_LOW [expr 0x100]\n\ \n\ \n\ -variable PL_COLORBAR_CAP_HIGH 0x200\n\ +variable PL_COLORBAR_CAP_HIGH [expr 0x200]\n\ \n\ \n\ -variable PL_COLORBAR_SHADE_LABEL 0x400\n\ +variable PL_COLORBAR_SHADE_LABEL [expr 0x400]\n\ \n\ \n\ -variable PL_COLORBAR_ORIENT_RIGHT 0x800\n\ +variable PL_COLORBAR_ORIENT_RIGHT [expr 0x800]\n\ \n\ \n\ -variable PL_COLORBAR_ORIENT_TOP 0x1000\n\ +variable PL_COLORBAR_ORIENT_TOP [expr 0x1000]\n\ \n\ \n\ -variable PL_COLORBAR_ORIENT_LEFT 0x2000\n\ +variable PL_COLORBAR_ORIENT_LEFT [expr 0x2000]\n\ \n\ \n\ -variable PL_COLORBAR_ORIENT_BOTTOM 0x4000\n\ +variable PL_COLORBAR_ORIENT_BOTTOM [expr 0x4000]\n\ \n\ \n\ -variable PL_COLORBAR_BACKGROUND 0x8000\n\ +variable PL_COLORBAR_BACKGROUND [expr 0x8000]\n\ \n\ \n\ -variable PL_COLORBAR_BOUNDING_BOX 0x10000\n\ +variable PL_COLORBAR_BOUNDING_BOX [expr 0x10000]\n\ \n\ \n\ -variable PL_DRAWMODE_UNKNOWN 0x0\n\ +variable PL_DRAWMODE_UNKNOWN [expr 0x0]\n\ \n\ \n\ -variable PL_DRAWMODE_DEFAULT 0x1\n\ +variable PL_DRAWMODE_DEFAULT [expr 0x1]\n\ \n\ \n\ -variable PL_DRAWMODE_REPLACE 0x2\n\ +variable PL_DRAWMODE_REPLACE [expr 0x2]\n\ \n\ \n\ -variable PL_DRAWMODE_XOR 0x4\n\ +variable PL_DRAWMODE_XOR [expr 0x4]\n\ \n\ # draw lines parallel to the X axis\n\ -variable DRAW_LINEX 0x001\n\ +variable DRAW_LINEX [expr 0x001]\n\ \n\ # draw lines parallel to the Y axis\n\ -variable DRAW_LINEY 0x002\n\ +variable DRAW_LINEY [expr 0x002]\n\ \n\ # draw lines parallel to both the X and Y axis\n\ -variable DRAW_LINEXY 0x003\n\ +variable DRAW_LINEXY [expr 0x003]\n\ \n\ # draw the mesh with a color dependent of the magnitude\n\ -variable MAG_COLOR 0x004\n\ +variable MAG_COLOR [expr 0x004]\n\ \n\ # draw contour plot at bottom xy plane\n\ -variable BASE_CONT 0x008\n\ +variable BASE_CONT [expr 0x008]\n\ \n\ # draw contour plot at top xy plane\n\ -variable TOP_CONT 0x010\n\ +variable TOP_CONT [expr 0x010]\n\ \n\ # draw contour plot at surface\n\ -variable SURF_CONT 0x020\n\ +variable SURF_CONT [expr 0x020]\n\ \n\ # draw sides\n\ -variable DRAW_SIDES 0x040\n\ +variable DRAW_SIDES [expr 0x040]\n\ \n\ # draw outline for each square that makes up the surface\n\ -variable FACETED 0x080\n\ +variable FACETED [expr 0x080]\n\ \n\ # draw mesh\n\ -variable MESH 0x100\n\ +variable MESH [expr 0x100]\n\ }" ); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-13 19:27:20
|
Revision: 12691 http://sourceforge.net/p/plplot/code/12691 Author: airwin Date: 2013-11-13 19:27:17 +0000 (Wed, 13 Nov 2013) Log Message: ----------- For historical reasons ZEROW2B, ZEROW2D, ONEW2B, and ONEW2D were dropped from the fortran parameters, but since those are correctly #defined in plplot.h and not dropped by any other language (except tcl which is about to be similarly fixed) include those parameters. Modified Paths: -------------- trunk/bindings/f95/global_defines.sed trunk/bindings/f95/plplot_parameters.h Modified: trunk/bindings/f95/global_defines.sed =================================================================== --- trunk/bindings/f95/global_defines.sed 2013-11-13 12:15:17 UTC (rev 12690) +++ trunk/bindings/f95/global_defines.sed 2013-11-13 19:27:17 UTC (rev 12691) @@ -18,8 +18,6 @@ # Drop specific #defines from the file that are not available # because of specific #if statements. -/^#define ZEROW/ d -/^#define ONEW/ d /OBJECT_DATA/ d /^#define pltr_img/ d Modified: trunk/bindings/f95/plplot_parameters.h =================================================================== --- trunk/bindings/f95/plplot_parameters.h 2013-11-13 12:15:17 UTC (rev 12690) +++ trunk/bindings/f95/plplot_parameters.h 2013-11-13 19:27:17 UTC (rev 12691) @@ -50,6 +50,10 @@ integer, parameter :: PLTEXT_BACKCHAR = 3 ! back-char in the text stream integer, parameter :: PLTEXT_OVERLINE = 4 ! toggle overline in the text stream integer, parameter :: PLTEXT_UNDERLINE = 5 ! toggle underline in the text stream + integer, parameter :: ZEROW2B = 1 + integer, parameter :: ZEROW2D = 2 + integer, parameter :: ONEW2B = 3 + integer, parameter :: ONEW2D = 4 integer, parameter :: PLSWIN_DEVICE = 1 ! device coordinates integer, parameter :: PLSWIN_WORLD = 2 ! world coordinates integer, parameter :: PL_X_AXIS = 1 ! The x-axis This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arj...@us...> - 2013-11-13 12:15:21
|
Revision: 12690 http://sourceforge.net/p/plplot/code/12690 Author: arjenmarkus Date: 2013-11-13 12:15:17 +0000 (Wed, 13 Nov 2013) Log Message: ----------- Added a concise explanation of the CMake example - the full explanation appeared lower down the file. (In response to a question on the plplot-general list) Modified Paths: -------------- trunk/INSTALL Modified: trunk/INSTALL =================================================================== --- trunk/INSTALL 2013-11-13 09:10:07 UTC (rev 12689) +++ trunk/INSTALL 2013-11-13 12:15:17 UTC (rev 12690) @@ -9,7 +9,7 @@ gives good results on Unix, Linux, and Mac OS X and Cygwin, MinGW, MinGW/MSYS, and bare windows. -Building PLplot with our CMake-based build system +Building PLplot with our CMake-based build system ================================================= Our CMake-based build system has been made available as part of our @@ -34,7 +34,7 @@ ------------------------------------------------------------------------- Here is one particular example (which must be executed before the cmake -invocation discussed below). +invocation discussed below). export CMAKE_INCLUDE_PATH=/home/software/autotools/install/include:/home/software/cgmlib/cd1.3 export CMAKE_LIBRARY_PATH=/home/software/autotools/install/lib:/home/software/cgmlib/cd1.3 @@ -45,7 +45,7 @@ CMAKE_LIBRARY_PATH helps cmake to find the libltdl and libcd libraries in non-standard install locations; and PKG_CONFIG_PATH helps cmake to use the pkg-config command internally to find a libLASi pkg-config module file that -is installed in a non-standard location. +is installed in a non-standard location. In general, CMAKE_INCLUDE_PATH helps cmake find headers and other files that are installed in non-standard locations; CMAKE_LIBRARY_PATH helps cmake find @@ -61,7 +61,7 @@ -------------------------------------------------------------------------- Here is one particular example (which must be executed before the cmake -invocation discussed below). +invocation discussed below). export CC="gcc -O2" export CXX="g++ -O2" @@ -72,20 +72,30 @@ for gcc-related compilers for our build system which makes for fast builds, but slow execution. -cmake invocation +CMake invocation ---------------- -Here is one typical example. +Here is one typical example. mkdir build_dir cd build_dir -cmake -DCMAKE_INSTALL_PREFIX=/my/prefix \ -../plplot_cmake >& cmake.out +cmake -DCMAKE_INSTALL_PREFIX=/my/prefix ../plplot_cmake >& cmake.out +(Note: +- "build_dir" is the directory where you want to build the libraries. +- "/my/prefix" is the directory where you want to install the PLplot libraries + for actual use. If you leave the option -DCMAKE_INSTALL_PREFIX= out, a + default installation directory will be selected. This actual default directory + depends on the operating system you are using. +- "plplot_cmake" is the directory where all the source files are contained, + most notably the file "CMakeLists.txt", as that is the file that CMake will + start its build preparation from. +All of these directories can be given any name you like, of course.) + (CMake is capable of generating builds within the source tree, but we have emphasized a build with a separate build tree here because of its fundamental advantage that the source tree remains clean with no generated -files in it.) +files in it.) Check the cmake.out file for any configuration issues, especially WARNING messages which signal that a component of PLplot has been removed because @@ -95,7 +105,7 @@ http://www.miscdebris.net/plplot_wiki/index.php?title=CMake_options_for_PLplot) which can be set for cmake to personalize your build. Use the ccmake front end to cmake to obtain documentation of all these options. In the above case -we have specified a particular install prefix "/my/prefix". +we have specified a particular install prefix "/my/prefix". Note in the above example an initially empty build directory (arbitrarily) named build_dir is used to insure a clean start, and ../plplot_cmake is the This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |