Error processing request

Parameters

CONTENT_LENGTH0
REQUEST_METHODGET
REQUEST_URI/revision/wiki%2Drunner?V=8
QUERY_STRINGV=8
CONTENT_TYPE
DOCUMENT_URI/revision/wiki-runner
DOCUMENT_ROOT/var/www/nikit/nikit/nginx/../docroot
SCGI1
SERVER_PROTOCOLHTTP/1.1
HTTPSon
REMOTE_ADDR172.70.178.15
REMOTE_PORT18946
SERVER_PORT4443
SERVER_NAMEwiki.tcl-lang.org
HTTP_HOSTwiki.tcl-lang.org
HTTP_CONNECTIONKeep-Alive
HTTP_ACCEPT_ENCODINGgzip, br
HTTP_X_FORWARDED_FOR18.119.143.4
HTTP_CF_RAY87feaa94886c631e-ORD
HTTP_X_FORWARDED_PROTOhttps
HTTP_CF_VISITOR{"scheme":"https"}
HTTP_ACCEPT*/*
HTTP_USER_AGENTMozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; [email protected])
HTTP_CF_CONNECTING_IP18.119.143.4
HTTP_CDN_LOOPcloudflare
HTTP_CF_IPCOUNTRYUS

Body


Error

Unknow state transition: LINE -> END

-code

1

-level

0

-errorstack

INNER {returnImm {Unknow state transition: LINE -> END} {}} CALL {my render_wikit wiki-runner \[Brian\ Theado\]\ -\ 28Sep04\ -\ I\ swiped\ the\ code\ from\ \[wiki-reaper\]\ and\ modified\ it\ to\ \nexecute\ the\ reaped\ code\ in\ a\ Tk-enabled\ safe\ interpreter\ instead\ of\ displaying\ the\ \nreaped\ code\ to\ stdout.\n\nOne\ nice\ improvement\ would\ be\ to\ change\ the\ code\ to\ use\ httpvfs\ combined\ with\ \nsomething\ like\ \[A\ collate/broadcast\ virtual\ filesystem\],\ so\ the\ page\ doesn't\ have\ to\ \nbe\ fetched\ each\ time\ it\ is\ to\ be\ executed.\n\nIt\ would\ also\ be\ nice\ to\ have\ a\ page\ or\ set\ of\ pages\ that\ listed\ the\ \nreapable/safe-interp\ runnable\ apps,\ so\ a\ clickable\ interface\ can\ be\ supplied\ by\ the\ \nprogram\ instead\ of\ having\ to\ look\ up\ page\ numbers.\n\nThe\ pages\ that\ will\ execute\ successfully\ will\ be\ a\ small\ subset\ of\ the\ reapable\ \npages,\ because\ much\ of\ the\ code\ on\ the\ wiki\ uses\ commands\ that\ are\ not\ available\ in\ \nthe\ safe\ interpreter.\ \ For\ some\ of\ these,\ maybe\ the\ code\ can\ be\ changed.\ \ For\ others,\ \nmaybe\ a\ wrapper\ can\ be\ created\ that\ is\ still\ safe\ and\ allows\ the\ program\ to\ execute\ \nwith\ reasonable\ functionality.\ \ One\ such\ wrapper\ for\ ''wm''\ is\ provided\ below\ because\ \nthe\ first\ several\ reapable\ pages\ I\ tried\ all\ used\ \[\[wm\ title\]\ to\ set\ their\ titles.\n\nI\ only\ tried\ a\ few\ pages\ and\ here\ are\ the\ results.\ \ I\ didn't\ investigate\ any\ of\ the\ \nproblems\ I\ encountered:\n\n\ \ \ *\ \[Car\ racing\ in\ Tcl\]\ (4364)\ -\ displays\ fine,\ but\ none\ of\ the\ bindings\ worked\ (focus\ issue?)\n\ \ \ *\ \[Morley's\ Miracle\]\ (8336)\ -\ works\ fine,\ except\ for\ the\ ''about''\ button\n\ \ \ *\ \[Colliding\ balls\]\ (8573)\ -\ works\n\ \ \ *\ \[Harmonic\ color\ wheel\]\ (12201)\ -\ doesn't\ work\ due\ to\ use\ of\ toplevel\ command\n\n----\n''\[escargo\]\ 29\ Sep\ 2004''\ -\ There's\ a\ long\ list\ of\ ''reapable''\ pages\ that\ has\ been\ncreated\ and\ maintained\ on\ the\ \[wish-reaper\]\ page.\n\n\ #!/bin/sh\n\ #\ -*-\ tcl\ -*-\ \\\n\ exec\ tclsh\ \$0\ \$\{1+\"\$@\"\}\n\n\ package\ require\ Tcl\ 8.3\n\ package\ require\ Tk\n\n\ if\ \{\[llength\ \$argv\]\ ==\ 0\}\ \{\n\ \ \ \ \ puts\ stderr\ \"usage:\ wiki-runner\ page\ ?page\ ...?\"\n\ \ \ \ \ exit\ 1\n\ \}\n\n\ if\ \{!\[catch\ \{\ package\ require\ nstcl-html\ \}\]\ &&\n\ \ \ \ \ !\[catch\ \{\ package\ require\ nstcl-http\ \}\]\}\ \{\n\ \ \ \ \ namespace\ import\ nstcl::*\n\ \}\ else\ \{\n\ \ \ \ \ package\ require\ http\n\n\ \ \ \ \ proc\ ns_geturl\ \{url\}\ \{\n\ \ \ \ \ \ \ \ \ set\ conn\ \[http::geturl\ \$url\]\n\ \ \ \ \ \ \ \ \ set\ html\ \[http::data\ \$conn\]\n\ \ \ \ \ \ \ \ \ http::cleanup\ \$conn\n\ \ \ \ \ \ \ \ \ return\ \$html\n\ \ \ \ \ \}\n\n\ \ \ \ \ proc\ ns_striphtml\ \{-tags_only\ html\}\ \{\n\ \ \ \ \ \ \ \ \ regsub\ -all\ --\ \{<\[^>\]+>\}\ \$html\ \"\"\ html\n\ \ \ \ \ \ \ \ \ return\ \$html\ \;#\ corrected\ a\ typo\ here\n\ \ \ \ \ \}\n\n\ \ \ \ \ proc\ ns_urlencode\ \{string\}\ \{\n\ \ \ \ \ \ \ \ \ set\ allowed_chars\ \ \{\[a-zA-Z0-9\]\}\n\ \ \ \ \ \ \ \ \ set\ encoded_string\ \"\"\n\n\ \ \ \ \ \ \ \ \ foreach\ char\ \[split\ \$string\ \"\"\]\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\[string\ match\ \$allowed_chars\ \$char\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ append\ encoded_string\ \$char\n\ \ \ \ \ \ \ \ \ \ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ scan\ \$char\ %c\ ascii\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ append\ encoded_string\ %\[format\ %02x\ \$ascii\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \ return\ \$encoded_string\n\ \ \ \ \ \}\n\ \}\n\n\ proc\ output\ \{data\}\ \{\n\ \ \ \ \ #\ we\ don't\ want\ to\ throw\ an\ error\ if\ stdout\ has\ been\ closed\n\ \ \ \ \ catch\ \{\ puts\ \$data\ \}\n\ \}\n\n\ #\ Save\ to\ a\ variable\ named\ output\ instead\ of\ displaying\ to\ stdout\n\ proc\ output\ data\ \{\n\ \ \ \ uplevel\ append\ output\ \[list\ \$data\\n\]\n\ \}\n\n\ proc\ reap\ \{page\}\ \{\n\ \ \ \ \ set\ url\ \ http://wiki.tcl.tk/\[ns_urlencode\ \$page\]\n\ \ \ \ \ set\ now\ \ \[clock\ format\ \[clock\ seconds\]\ -format\ \"%e\ %b\ %Y,\ %H:%M\"\ -gmt\ 1\]\n\ \ \ \ \ set\ html\ \[ns_geturl\ \$url\]\n\n\ \ \ \ \ #\ can't\ imagine\ why\ these\ characters\ would\ be\ in\ here,\ but\ just\ to\ be\ safe\n\ \ \ \ \ set\ html\ \[string\ map\ \[list\ \\x00\ \"\"\ \\x0d\ \"\"\]\ \$html\]\n\ \ \ \ \ set\ html\ \[string\ map\ \[list\ <pre>\ \\x00\ </pre>\ \\x0d\]\ \$html\]\n\n\ \ \ \ \ if\ \{!\[regexp\ -nocase\ \{<title>(\[^<\]*)</title>\}\ \$html\ =>\ title\]\}\ \{\n\ \ \ \ \ \ \ \ \ set\ title\ \"(no\ title!?)\"\n\ \ \ \ \ \}\n\n\ \ \ \ \ if\ \{!\[regexp\ -nocase\ \{<i>Updated\ on\ (\[^G\]+\ GMT)\}\ \$html\ =>\ updated\]\}\ \{\n\ \ \ \ \ \ \ \ \ set\ updated\ \"???\"\n\ \ \ \ \ \}\n\n\ \ \ \ \ output\ \"#####\"\n\ \ \ \ \ output\ \"#\"\n\ \ \ \ \ output\ \"#\ \\\"\$title\\\"\"\n\ \ \ \ \ output\ \"#\ \[string\ map\ \[list\ wiki.tcl.tk\]\ \$url\]\"\n\ \ \ \ \ output\ \"#\"\n\ \ \ \ \ output\ \"#\ Tcl\ code\ harvested\ on:\ \ \$now\ GMT\"\n\ \ \ \ \ output\ \"#\ Wiki\ page\ last\ updated:\ \$updated\"\n\ \ \ \ \ output\ \"#\"\n\ \ \ \ \ output\ \"#####\"\n\ \ \ \ \ output\ \\n\n\n\ \ \ \ \ set\ html\ \[ns_striphtml\ -tags_only\ \$html\]\n\n\ \ \ \ \ foreach\ chunk\ \[regexp\ -inline\ -all\ \{\\x00\[^\\x0d\]+\\x0d\}\ \$html\]\ \{\n\ \ \ \ \ \ \ \ \ set\ chunk\ \[string\ range\ \$chunk\ 1\ end-1\]\n\ \ \ \ \ \ \ \ \ set\ chunk\ \[string\ map\ \[list\ \"&quot\;\"\ \\x22\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \"&amp\;\"\ \ &\ \ \ \ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \"&lt\;\"\ \ \ <\ \ \ \ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \"&gt\;\"\ \ \ >\]\ \$chunk\]\n\n\ \ \ \ \ \ \ \ \ foreach\ line\ \[split\ \$chunk\ \\n\]\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\[string\ index\ \$line\ 0\]\ ==\ \"\ \"\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ line\ \[string\ range\ \$line\ 1\ end\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \ \ \ \ \ output\ \$line\n\ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \}\n\n\ \ \ \ \ output\ \\n\n\ \ \ \ \ output\ \"#\ EOF\"\n\ \ \ \ \ output\ \\n\n\ \ \ \ \ return\ \[list\ \$title\ \$output\]\n\ \}\n\ proc\ sandbox\ \{title\ code\}\ \{\n\ \ \ \ \ package\ require\ Tk\n\ \ \ \ \ wm\ withdraw\ .\n\ \ \ \ \ set\ interp\ \[safe::interpCreate\]\n\ \ \ \ \ safe::loadTk\ \$interp\n\n\ \ \ \ \ #\ Many\ programs\ will\ try\ to\ set\ their\ window\ title\ which\ isn't\ allowed\n\ \ \ \ \ #\ in\ a\ safe\ interpreter,\ so\ stub\ out\ the\ wm\ command\n\ \ \ \ \ \$interp\ eval\ \{proc\ wm\ args\ \{\}\}\n\ \ \ \ \ wm\ title\ .safe\$::safe::tkSafeId\ \$title\n\ \ \ \ \ \$interp\ eval\ \$code\ \n\ \}\n\ wm\ withdraw\ .\n\ catch\ \{console\ show\}\n\ foreach\ page\ \$argv\ \{\n\ \ \ \ \ puts\ \"Reaping\ page\ \$page\"\n\ \ \ \ \ eval\ sandbox\ \[reap\ \$page\]\n\ \}\n======\n\n----\n\n\[dizzy\]\ 17\ Nov\ 2006\ -\ Doesn't\ work\ for\ me,\ it\ breaks\ on\ the\ ''wm\ withdraw\ .''\ command\ because\ the\ Tk\ package\ hasn't\ been\ loaded\ yet.\ I\ have\ put\ a\ ''catch''\ around\ the\ ''wm''\ command\ and\ also\ added\ some\ code\ to\ exit\ the\ program\ when\ there\ are\ no\ applets\ left\ running:\n\n======\n\ catch\ \{wm\ withdraw\ .\}\n\ catch\ \{console\ show\}\n\ foreach\ page\ \$argv\ \{\n\ \ \ \ \ puts\ \"Reaping\ page\ \$page\"\n\ \ \ \ \ eval\ sandbox\ \[reap\ \$page\]\n\ \}\n\ proc\ shutdown\ \{\}\ \{\n\ \ \ \ \ if\ \{\[catch\ \{set\ children\ \[winfo\ children\ .\]\}\]\ ||\ \$children\ ==\ \{\}\}\ \{\n\ \ \ \ \ \ \ \ \ exit\n\ \ \ \ \ \}\n\ \ \ \ \ after\ 100\ shutdown\n\ \}\n\ shutdown\n======\n\n<<categories>>\ Application\ |\ Wikit regexp2} CALL {my render wiki-runner \[Brian\ Theado\]\ -\ 28Sep04\ -\ I\ swiped\ the\ code\ from\ \[wiki-reaper\]\ and\ modified\ it\ to\ \nexecute\ the\ reaped\ code\ in\ a\ Tk-enabled\ safe\ interpreter\ instead\ of\ displaying\ the\ \nreaped\ code\ to\ stdout.\n\nOne\ nice\ improvement\ would\ be\ to\ change\ the\ code\ to\ use\ httpvfs\ combined\ with\ \nsomething\ like\ \[A\ collate/broadcast\ virtual\ filesystem\],\ so\ the\ page\ doesn't\ have\ to\ \nbe\ fetched\ each\ time\ it\ is\ to\ be\ executed.\n\nIt\ would\ also\ be\ nice\ to\ have\ a\ page\ or\ set\ of\ pages\ that\ listed\ the\ \nreapable/safe-interp\ runnable\ apps,\ so\ a\ clickable\ interface\ can\ be\ supplied\ by\ the\ \nprogram\ instead\ of\ having\ to\ look\ up\ page\ numbers.\n\nThe\ pages\ that\ will\ execute\ successfully\ will\ be\ a\ small\ subset\ of\ the\ reapable\ \npages,\ because\ much\ of\ the\ code\ on\ the\ wiki\ uses\ commands\ that\ are\ not\ available\ in\ \nthe\ safe\ interpreter.\ \ For\ some\ of\ these,\ maybe\ the\ code\ can\ be\ changed.\ \ For\ others,\ \nmaybe\ a\ wrapper\ can\ be\ created\ that\ is\ still\ safe\ and\ allows\ the\ program\ to\ execute\ \nwith\ reasonable\ functionality.\ \ One\ such\ wrapper\ for\ ''wm''\ is\ provided\ below\ because\ \nthe\ first\ several\ reapable\ pages\ I\ tried\ all\ used\ \[\[wm\ title\]\ to\ set\ their\ titles.\n\nI\ only\ tried\ a\ few\ pages\ and\ here\ are\ the\ results.\ \ I\ didn't\ investigate\ any\ of\ the\ \nproblems\ I\ encountered:\n\n\ \ \ *\ \[Car\ racing\ in\ Tcl\]\ (4364)\ -\ displays\ fine,\ but\ none\ of\ the\ bindings\ worked\ (focus\ issue?)\n\ \ \ *\ \[Morley's\ Miracle\]\ (8336)\ -\ works\ fine,\ except\ for\ the\ ''about''\ button\n\ \ \ *\ \[Colliding\ balls\]\ (8573)\ -\ works\n\ \ \ *\ \[Harmonic\ color\ wheel\]\ (12201)\ -\ doesn't\ work\ due\ to\ use\ of\ toplevel\ command\n\n----\n''\[escargo\]\ 29\ Sep\ 2004''\ -\ There's\ a\ long\ list\ of\ ''reapable''\ pages\ that\ has\ been\ncreated\ and\ maintained\ on\ the\ \[wish-reaper\]\ page.\n\n\ #!/bin/sh\n\ #\ -*-\ tcl\ -*-\ \\\n\ exec\ tclsh\ \$0\ \$\{1+\"\$@\"\}\n\n\ package\ require\ Tcl\ 8.3\n\ package\ require\ Tk\n\n\ if\ \{\[llength\ \$argv\]\ ==\ 0\}\ \{\n\ \ \ \ \ puts\ stderr\ \"usage:\ wiki-runner\ page\ ?page\ ...?\"\n\ \ \ \ \ exit\ 1\n\ \}\n\n\ if\ \{!\[catch\ \{\ package\ require\ nstcl-html\ \}\]\ &&\n\ \ \ \ \ !\[catch\ \{\ package\ require\ nstcl-http\ \}\]\}\ \{\n\ \ \ \ \ namespace\ import\ nstcl::*\n\ \}\ else\ \{\n\ \ \ \ \ package\ require\ http\n\n\ \ \ \ \ proc\ ns_geturl\ \{url\}\ \{\n\ \ \ \ \ \ \ \ \ set\ conn\ \[http::geturl\ \$url\]\n\ \ \ \ \ \ \ \ \ set\ html\ \[http::data\ \$conn\]\n\ \ \ \ \ \ \ \ \ http::cleanup\ \$conn\n\ \ \ \ \ \ \ \ \ return\ \$html\n\ \ \ \ \ \}\n\n\ \ \ \ \ proc\ ns_striphtml\ \{-tags_only\ html\}\ \{\n\ \ \ \ \ \ \ \ \ regsub\ -all\ --\ \{<\[^>\]+>\}\ \$html\ \"\"\ html\n\ \ \ \ \ \ \ \ \ return\ \$html\ \;#\ corrected\ a\ typo\ here\n\ \ \ \ \ \}\n\n\ \ \ \ \ proc\ ns_urlencode\ \{string\}\ \{\n\ \ \ \ \ \ \ \ \ set\ allowed_chars\ \ \{\[a-zA-Z0-9\]\}\n\ \ \ \ \ \ \ \ \ set\ encoded_string\ \"\"\n\n\ \ \ \ \ \ \ \ \ foreach\ char\ \[split\ \$string\ \"\"\]\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\[string\ match\ \$allowed_chars\ \$char\]\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ append\ encoded_string\ \$char\n\ \ \ \ \ \ \ \ \ \ \ \ \ \}\ else\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ scan\ \$char\ %c\ ascii\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ append\ encoded_string\ %\[format\ %02x\ \$ascii\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \ return\ \$encoded_string\n\ \ \ \ \ \}\n\ \}\n\n\ proc\ output\ \{data\}\ \{\n\ \ \ \ \ #\ we\ don't\ want\ to\ throw\ an\ error\ if\ stdout\ has\ been\ closed\n\ \ \ \ \ catch\ \{\ puts\ \$data\ \}\n\ \}\n\n\ #\ Save\ to\ a\ variable\ named\ output\ instead\ of\ displaying\ to\ stdout\n\ proc\ output\ data\ \{\n\ \ \ \ uplevel\ append\ output\ \[list\ \$data\\n\]\n\ \}\n\n\ proc\ reap\ \{page\}\ \{\n\ \ \ \ \ set\ url\ \ http://wiki.tcl.tk/\[ns_urlencode\ \$page\]\n\ \ \ \ \ set\ now\ \ \[clock\ format\ \[clock\ seconds\]\ -format\ \"%e\ %b\ %Y,\ %H:%M\"\ -gmt\ 1\]\n\ \ \ \ \ set\ html\ \[ns_geturl\ \$url\]\n\n\ \ \ \ \ #\ can't\ imagine\ why\ these\ characters\ would\ be\ in\ here,\ but\ just\ to\ be\ safe\n\ \ \ \ \ set\ html\ \[string\ map\ \[list\ \\x00\ \"\"\ \\x0d\ \"\"\]\ \$html\]\n\ \ \ \ \ set\ html\ \[string\ map\ \[list\ <pre>\ \\x00\ </pre>\ \\x0d\]\ \$html\]\n\n\ \ \ \ \ if\ \{!\[regexp\ -nocase\ \{<title>(\[^<\]*)</title>\}\ \$html\ =>\ title\]\}\ \{\n\ \ \ \ \ \ \ \ \ set\ title\ \"(no\ title!?)\"\n\ \ \ \ \ \}\n\n\ \ \ \ \ if\ \{!\[regexp\ -nocase\ \{<i>Updated\ on\ (\[^G\]+\ GMT)\}\ \$html\ =>\ updated\]\}\ \{\n\ \ \ \ \ \ \ \ \ set\ updated\ \"???\"\n\ \ \ \ \ \}\n\n\ \ \ \ \ output\ \"#####\"\n\ \ \ \ \ output\ \"#\"\n\ \ \ \ \ output\ \"#\ \\\"\$title\\\"\"\n\ \ \ \ \ output\ \"#\ \[string\ map\ \[list\ wiki.tcl.tk\]\ \$url\]\"\n\ \ \ \ \ output\ \"#\"\n\ \ \ \ \ output\ \"#\ Tcl\ code\ harvested\ on:\ \ \$now\ GMT\"\n\ \ \ \ \ output\ \"#\ Wiki\ page\ last\ updated:\ \$updated\"\n\ \ \ \ \ output\ \"#\"\n\ \ \ \ \ output\ \"#####\"\n\ \ \ \ \ output\ \\n\n\n\ \ \ \ \ set\ html\ \[ns_striphtml\ -tags_only\ \$html\]\n\n\ \ \ \ \ foreach\ chunk\ \[regexp\ -inline\ -all\ \{\\x00\[^\\x0d\]+\\x0d\}\ \$html\]\ \{\n\ \ \ \ \ \ \ \ \ set\ chunk\ \[string\ range\ \$chunk\ 1\ end-1\]\n\ \ \ \ \ \ \ \ \ set\ chunk\ \[string\ map\ \[list\ \"&quot\;\"\ \\x22\ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \"&amp\;\"\ \ &\ \ \ \ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \"&lt\;\"\ \ \ <\ \ \ \ \\\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \"&gt\;\"\ \ \ >\]\ \$chunk\]\n\n\ \ \ \ \ \ \ \ \ foreach\ line\ \[split\ \$chunk\ \\n\]\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ if\ \{\[string\ index\ \$line\ 0\]\ ==\ \"\ \"\}\ \{\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ set\ line\ \[string\ range\ \$line\ 1\ end\]\n\ \ \ \ \ \ \ \ \ \ \ \ \ \}\n\n\ \ \ \ \ \ \ \ \ \ \ \ \ output\ \$line\n\ \ \ \ \ \ \ \ \ \}\n\ \ \ \ \ \}\n\n\ \ \ \ \ output\ \\n\n\ \ \ \ \ output\ \"#\ EOF\"\n\ \ \ \ \ output\ \\n\n\ \ \ \ \ return\ \[list\ \$title\ \$output\]\n\ \}\n\ proc\ sandbox\ \{title\ code\}\ \{\n\ \ \ \ \ package\ require\ Tk\n\ \ \ \ \ wm\ withdraw\ .\n\ \ \ \ \ set\ interp\ \[safe::interpCreate\]\n\ \ \ \ \ safe::loadTk\ \$interp\n\n\ \ \ \ \ #\ Many\ programs\ will\ try\ to\ set\ their\ window\ title\ which\ isn't\ allowed\n\ \ \ \ \ #\ in\ a\ safe\ interpreter,\ so\ stub\ out\ the\ wm\ command\n\ \ \ \ \ \$interp\ eval\ \{proc\ wm\ args\ \{\}\}\n\ \ \ \ \ wm\ title\ .safe\$::safe::tkSafeId\ \$title\n\ \ \ \ \ \$interp\ eval\ \$code\ \n\ \}\n\ wm\ withdraw\ .\n\ catch\ \{console\ show\}\n\ foreach\ page\ \$argv\ \{\n\ \ \ \ \ puts\ \"Reaping\ page\ \$page\"\n\ \ \ \ \ eval\ sandbox\ \[reap\ \$page\]\n\ \}\n======\n\n----\n\n\[dizzy\]\ 17\ Nov\ 2006\ -\ Doesn't\ work\ for\ me,\ it\ breaks\ on\ the\ ''wm\ withdraw\ .''\ command\ because\ the\ Tk\ package\ hasn't\ been\ loaded\ yet.\ I\ have\ put\ a\ ''catch''\ around\ the\ ''wm''\ command\ and\ also\ added\ some\ code\ to\ exit\ the\ program\ when\ there\ are\ no\ applets\ left\ running:\n\n======\n\ catch\ \{wm\ withdraw\ .\}\n\ catch\ \{console\ show\}\n\ foreach\ page\ \$argv\ \{\n\ \ \ \ \ puts\ \"Reaping\ page\ \$page\"\n\ \ \ \ \ eval\ sandbox\ \[reap\ \$page\]\n\ \}\n\ proc\ shutdown\ \{\}\ \{\n\ \ \ \ \ if\ \{\[catch\ \{set\ children\ \[winfo\ children\ .\]\}\]\ ||\ \$children\ ==\ \{\}\}\ \{\n\ \ \ \ \ \ \ \ \ exit\n\ \ \ \ \ \}\n\ \ \ \ \ after\ 100\ shutdown\n\ \}\n\ shutdown\n======\n\n<<categories>>\ Application\ |\ Wikit} CALL {my revision wiki-runner} CALL {::oo::Obj7254471 process revision/wiki%2Drunner} CALL {::oo::Obj7254469 process}

-errorcode

NONE

-errorinfo

Unknow state transition: LINE -> END
    while executing
"error $msg"
    (class "::Wiki" method "render_wikit" line 6)
    invoked from within
"my render_$default_markup $N $C $mkup_rendering_engine"
    (class "::Wiki" method "render" line 8)
    invoked from within
"my render $name $C"
    (class "::Wiki" method "revision" line 31)
    invoked from within
"my revision $page"
    (class "::Wiki" method "process" line 56)
    invoked from within
"$server process [string trim $uri /]"

-errorline

4