/* Generated by mk_predefined.tcl */ static char cmd[] = "# -*- Tcl -*-\n" "namespace eval ::nsf {\n" "namespace export \\\n" "next current self configure finalize interp is my relation dispatch\n" "namespace eval ::nsf::method::create {namespace export alias}\n" "proc ::nsf::method::provide {require_name definition {script \"\"}} {\n" "set ::nsf::methodIndex($require_name) [list definition $definition script $script]}\n" "proc ::nsf::method::require {object name {per_object 0}} {\n" "set key ::nsf::methodIndex($name)\n" "if {[info exists $key]} {\n" "array set \"\" [set $key]\n" "if {$(script) ne \"\"} {\n" "eval $(script)}\n" "if {$per_object} {\n" "set cmd [linsert $(definition) 1 -per-object]\n" "return [eval [linsert $cmd 1 $object]]} else {\n" "return [eval [linsert $(definition) 1 $object]]}} else {\n" "error \"cannot require method $name for $object, method unknown\"}}\n" "::proc strip_proc_name {name} {\n" "if {[string match ::nsf::procs::* $name]} {\n" "return [string range $name 12 end]} elseif {[string match nsf::procs::* $name]} {\n" "return [string range $name 12 end]} else {\n" "return $name}}\n" "::nsf::proc ::nsf::mixin {object -per-object:switch classes} {\n" "set rel [expr {${per-object} ? \"object-mixin\" : \"class-mixin\"}]\n" "if {[lindex $classes 0] ne \"\"} {\n" "set oldSetting [::nsf::relation $object $rel]\n" "uplevel [list ::nsf::relation $object $rel [linsert $oldSetting 0 $classes]]} else {\n" "uplevel [list ::nsf::relation $object $rel \"\"]}}\n" "::nsf::method::provide autoname {::nsf::method::alias autoname ::nsf::methods::object::autoname}\n" "::nsf::method::provide exists {::nsf::method::alias exists ::nsf::methods::object::exists}\n" "proc ::nsf::object::unknown {name} {\n" "foreach {key handler} [array get ::nsf::object::unknown] {\n" "set result [uplevel [list {*}$handler $name]]\n" "if {$result ne \"\"} {\n" "return $result}}\n" "return \"\"}\n" "namespace eval ::nsf::object::unknown {\n" "proc add {key handler} {set ::nsf::object::unknown($key) $handler}\n" "proc get {key} {return $::nsf::object::unknown($key)}\n" "proc delete {key} {array unset ::nsf::object::unknown($key)}\n" "proc keys {} {array names ::nsf::object::unknown}}\n" "namespace eval ::nsf::argument {}\n" "proc ::nsf::argument::unknown {args} {\n" "return \"\"}\n" "proc ::nsf::exithandler {args} {\n" "lassign $args op value\n" "switch $op {\n" "set {::proc ::nsf::__exithandler {} $value}\n" "get {::info body ::nsf::__exithandler}\n" "unset {proc ::nsf::__exithandler args {;}}\n" "default {error \"syntax: ::nsf::exithandler $::nsf::parametersyntax(::nsf::exithandler)\"}}}\n" "::nsf::exithandler unset\n" "if {[info command ::ns_log] ne \"\"} {\n" "proc ::nsf::log {level msg} {\n" "if {[info command ::ns_log] ne \"\"} {\n" "::ns_log $level \"nsf: $msg\"} else {\n" "puts stderr \"$level: $msg\"}}} else {\n" "proc ::nsf::log {level msg} {\n" "puts stderr \"$level: $msg\"}}\n" "proc ::nsf::deprecated {what oldCmd newCmd} {\n" "set msg \"**\\n** The $what $oldCmd is deprecated.\"\n" "if {$newCmd ne \"\"} {append msg \" use $newCmd instead.\"}\n" "append msg \"\\n**\\n\"\n" "nsf::log Warning $msg}\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" "proc ::nsf::parameter::filter {defs pattern} {\n" "set result {}\n" "foreach def $defs {\n" "if {[string match $pattern [::nsf::parameter::get name $def]]} {\n" "lappend result $def}}\n" "return $result}\n" "set ::nsf::parametersyntax(::nsf::xotclnext) \"?--noArgs? ?/arg .../?\"\n" "set ::nsf::parametersyntax(::nsf::__unset_unknown_args) \"\"\n" "set ::nsf::parametersyntax(::nsf::exithandler) \"?get?|?set /cmds/?|?unset?\"}\n" "";