/* Generated by mk_predefined.tcl */
static char predefined_part1[] =
"# -*- 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::get $object $rel]\n"
"uplevel [list ::nsf::relation::set $object $rel [linsert $oldSetting 0 $classes]]} else {\n"
"uplevel [list ::nsf::relation::set $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"
"::nsf::method::provide volatile {::nsf::method::alias volatile ::nsf::methods::object::volatile}\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::parameter::syntax(::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"
"namespace eval ::nsf::debug {}\n"
"proc ::nsf::debug::call {level objectInfo methodInfo arglist} {\n"
"nsf::log Debug \"call($level) - $objectInfo $methodInfo $arglist\"}\n"
"proc ::nsf::debug::exit {level objectInfo methodInfo result usec} {\n"
"nsf::log Debug \"exit($level) - $objectInfo $methodInfo $usec usec -> $result\"}\n"
"proc ::nsf::deprecated {what oldCmd newCmd} {\n"
"set msg \"*** $what $oldCmd is deprecated.\"\n"
"if {$newCmd ne \"\"} {append msg \" use $newCmd instead.\"}\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"
"";
static char predefined_part2[] =
"# -*- Tcl -*-\n"
"namespace eval ::nsf {\n"
"namespace eval ::nsf::parameter {}\n"
"proc ::nsf::parameter::filter {defs pattern} {\n"
"set result {}\n"
"foreach def $defs {\n"
"if {[string match $pattern [::nsf::parameter::info name $def]]} {\n"
"lappend result $def}}\n"
"return $result}\n"
"set ::nsf::parameter::syntax(::nsf::xotclnext) \"?--noArgs? ?/arg .../?\"\n"
"set ::nsf::parameter::syntax(::nsf::__unset_unknown_args) \"\"\n"
"set ::nsf::parameter::syntax(::nsf::exithandler) \"?get?|?set /cmds/?|?unset?\"\n"
"if {[info commands ::nsf::pkgconfig] ne \"\"} {\n"
"foreach c {version commit patchLevel} {\n"
"set ::nsf::$c [::nsf::pkgconfig get $c]}\n"
"foreach c {development memcount memtrace profile dtrace assertions} {\n"
"set ::nsf::config($c) [::nsf::pkgconfig get $c]}\n"
"unset -nocomplain c}}\n"
"";