static char cmd[] = "namespace eval ::nsf {\n" "namespace export next current\n" "namespace export alias configure finalize interp is my relation\n" "proc ::nsf::infoError msg {\n" "regsub -all \" \" $msg \"\" msg\n" "regsub -all \" \" $msg \"\" msg\n" "regsub {\\\"} $msg \"\\\"info \" msg\n" "error $msg \"\"}\n" "proc ::nsf::unsetExitHandler {} {\n" "proc ::nsf::__exitHandler {} {}}\n" "proc ::nsf::setExitHandler {newbody} {::proc ::nsf::__exitHandler {} $newbody}\n" "proc ::nsf::getExitHandler {} {::info body ::nsf::__exitHandler}\n" "::nsf::unsetExitHandler\n" "proc tmpdir {} {\n" "foreach e [list TMPDIR TEMP TMP] {\n" "if {[info exists ::env($e)] \\\n" "&& [file isdirectory $::env($e)] \\\n" "&& [file writable $::env($e)]} {\n" "return $::env($e)}}\n" "if {$::tcl_platform(platform) eq \"windows\"} {\n" "foreach d [list \"C:\\\\TEMP\" \"C:\\\\TMP\" \"\\\\TEMP\" \"\\\\TMP\"] {\n" "if {[file isdirectory $d] && [file writable $d]} {\n" "return $d}}}\n" "return /tmp}\n" "namespace export tmpdir\n" "if {![info exists ::env(HOME)]} {set ::env(HOME) /root}}\n" "";