From: <and...@us...> - 2010-03-01 20:12:50
|
Revision: 10836 http://plplot.svn.sourceforge.net/plplot/?rev=10836&view=rev Author: andrewross Date: 2010-03-01 20:12:43 +0000 (Mon, 01 Mar 2010) Log Message: ----------- Fix handling of the auto_path list variable in tcl. This fixes plplot bug #2960318. Modified Paths: -------------- trunk/bindings/tcl/tclAPI.c Modified: trunk/bindings/tcl/tclAPI.c =================================================================== --- trunk/bindings/tcl/tclAPI.c 2010-03-01 20:07:25 UTC (rev 10835) +++ trunk/bindings/tcl/tclAPI.c 2010-03-01 20:12:43 UTC (rev 10836) @@ -651,7 +651,7 @@ #ifdef TCL_DIR Tcl_SetVar( interp, "dir", TCL_DIR, TCL_GLOBAL_ONLY ); - if ( tcl_cmd( interp, "set auto_path [list $dir $auto_path]" ) == TCL_ERROR ) + if ( tcl_cmd( interp, "set auto_path [linsert $auto_path 0 $dir]" ) == TCL_ERROR ) { return_code = TCL_ERROR; goto finish; @@ -669,7 +669,7 @@ { plGetName( dn, "tcl", "", &ptr ); Tcl_SetVar( interp, "dir", ptr, 0 ); - if ( tcl_cmd( interp, "set auto_path [list $dir $auto_path]" ) == TCL_ERROR ) + if ( tcl_cmd( interp, "set auto_path [linsert $auto_path 0 $dir]" ) == TCL_ERROR ) { return_code = TCL_ERROR; goto finish; @@ -688,7 +688,7 @@ { plGetName( dn, "", "", &ptr ); Tcl_SetVar( interp, "dir", ptr, 0 ); - if ( tcl_cmd( interp, "set auto_path [list $dir $auto_path]" ) == TCL_ERROR ) + if ( tcl_cmd( interp, "set auto_path [linsert $auto_path 0 $dir]" ) == TCL_ERROR ) { return_code = TCL_ERROR; goto finish; @@ -708,7 +708,7 @@ { plGetName( dn, "tcl", "", &ptr ); Tcl_SetVar( interp, "dir", ptr, 0 ); - if ( tcl_cmd( interp, "set auto_path [list $dir $auto_path]" ) == TCL_ERROR ) + if ( tcl_cmd( interp, "set auto_path [linsert $auto_path 0 $dir]" ) == TCL_ERROR ) { return_code = TCL_ERROR; goto finish; @@ -732,7 +732,7 @@ } } Tcl_SetVar( interp, "dir", buf, 0 ); - if ( tcl_cmd( interp, "set auto_path [list $dir $auto_path]" ) == TCL_ERROR ) + if ( tcl_cmd( interp, "set auto_path [linsert $auto_path 0 $dir]" ) == TCL_ERROR ) { return_code = TCL_ERROR; goto finish; @@ -741,7 +741,7 @@ if ( plInBuildTree() ) { Tcl_SetVar( interp, "dir", BUILD_DIR "/bindings/tk", TCL_GLOBAL_ONLY ); - if ( tcl_cmd( interp, "set auto_path [list $dir $auto_path]" ) == TCL_ERROR ) + if ( tcl_cmd( interp, "set auto_path [linsert $auto_path 0 $dir]" ) == TCL_ERROR ) { return_code = TCL_ERROR; goto finish; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |