diff options
-rw-r--r-- | Makefile.in | 2 | ||||
-rw-r--r-- | Tcl_shipped.html | 163 | ||||
-rw-r--r-- | jim_tcl.txt | 2 | ||||
-rwxr-xr-x | make-index | 60 |
4 files changed, 222 insertions, 5 deletions
diff --git a/Makefile.in b/Makefile.in index 7d20574..43af85e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -90,7 +90,7 @@ endif $(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ $*.o $(SH_LIBJIM) $(LDLIBS) Tcl.html: jim_tcl.txt - asciidoc -o $@ -d manpage $^ || cp @SRCDIR@/Tcl_shipped.html Tcl.html + tclsh @SRCDIR@/make-index $^ | asciidoc -o $@ -d manpage - || cp @SRCDIR@/Tcl_shipped.html Tcl.html clean: rm -f *.o *.so lib*.a $(JIMSH) Tcl.html diff --git a/Tcl_shipped.html b/Tcl_shipped.html index 05dcc0f..0584083 100644 --- a/Tcl_shipped.html +++ b/Tcl_shipped.html @@ -2512,6 +2512,163 @@ arguments or groups of arguments may appear, in the same format as the preceding argument(s).</p></div>
<div class="sect2">
<h3 id="CommandIndex">Command Index</h3>
+<div class="tableblock">
+<table rules="none"
+width="100%"
+frame="void"
+cellspacing="0" cellpadding="4">
+<col width="12%" />
+<col width="12%" />
+<col width="12%" />
+<col width="12%" />
+<col width="12%" />
+<col width="12%" />
+<col width="12%" />
+<col width="12%" />
+<tbody>
+<tr>
+<td align="left" valign="top"><p class="table"><a href="#cmd_2">after</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_aio">aio</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_alarm">alarm</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_alias">alias</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_append">append</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_array">array</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_bio">bio</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_break">break</a></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table"><a href="#_case">case</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_catch">catch</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_cd">cd</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_clock">clock</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_close">close</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_collect">collect</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_concat">concat</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_continue">continue</a></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table"><a href="#_curry">curry</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_dict">dict</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_env">env</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_eof">eof</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_error">error</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_errorInfo">errorInfo</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_eval">eval</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#cmd_2">eventloop</a></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table"><a href="#_exec">exec</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_exit">exit</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_expr">expr</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_file">file</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_finalize">finalize</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_flush">flush</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_for">for</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_foreach">foreach</a></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table"><a href="#_format">format</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_getref">getref</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_gets">gets</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_glob">glob</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_global">global</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_if">if</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_incr">incr</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_info">info</a></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table"><a href="#_join">join</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_kill">kill</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_lambda">lambda</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_lappend">lappend</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_lassign">lassign</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_lindex">lindex</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_linsert">linsert</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_list">list</a></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table"><a href="#_llength">llength</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_lmap">lmap</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_load">load</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_local">local</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_lrange">lrange</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_lrepeat">lrepeat</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_lreplace">lreplace</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_lreverse">lreverse</a></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table"><a href="#_lsearch">lsearch</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_lset">lset</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_lsort">lsort</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_open">open</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#cmd_1">os.fork</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#cmd_1">os.gethostname</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#cmd_1">os.getids</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#cmd_1">os.uptime</a></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table"><a href="#cmd_1">os.wait</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_package">package</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_pid">pid</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#cmd_1">posix</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_proc">proc</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_puts">puts</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_pwd">pwd</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_rand">rand</a></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table"><a href="#_range">range</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_read">read</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_ref">ref</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_regexp">regexp</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_regsub">regsub</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_rename">rename</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_return">return</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_scan">scan</a></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table"><a href="#_seek">seek</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_set">set</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_setref">setref</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_signal">signal</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_sleep">sleep</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_socket">socket</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_source">source</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_split">split</a></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table"><a href="#_stackdump">stackdump</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_stacktrace">stacktrace</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_string">string</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_subst">subst</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_switch">switch</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_syslog">syslog</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_tailcall">tailcall</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_tell">tell</a></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table"><a href="#_throw">throw</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_time">time</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_try">try</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_unknown">unknown</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_unset">unset</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#cmd_2">update</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_uplevel">uplevel</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_upvar">upvar</a></p></td>
+</tr>
+<tr>
+<td align="left" valign="top"><p class="table"><a href="#cmd_2">vwait</a></p></td>
+<td align="left" valign="top"><p class="table"><a href="#_while">while</a></p></td>
+<td align="left" valign="top"><p class="table"></p></td>
+<td align="left" valign="top"><p class="table"></p></td>
+<td align="left" valign="top"><p class="table"></p></td>
+<td align="left" valign="top"><p class="table"></p></td>
+<td align="left" valign="top"><p class="table"></p></td>
+<td align="left" valign="top"><p class="table"></p></td>
+</tr>
+</tbody>
+</table>
+</div>
</div>
<div class="sect2">
<h3 id="_alarm">alarm</h3>
@@ -5795,7 +5952,7 @@ descriptors.</p></div> </dl></div>
</div>
<div class="sect2">
-<h3 id="_posix_os_fork_os_wait_os_gethostname_os_getids_os_uptime">posix: os.fork, os.wait, os.gethostname, os.getids, os.uptime</h3>
+<h3 id="cmd_1">posix: os.fork, os.wait, os.gethostname, os.getids, os.uptime</h3>
<div class="dlist"><dl>
<dt class="hdlist1">
<tt><strong>os.fork</strong></tt>
@@ -5991,7 +6148,7 @@ uid 1000 euid 1000 gid 100 egid 100</tt></pre> </dl></div>
</div>
<div class="sect2">
-<h3 id="_eventloop_after_vwait_update">eventloop: after, vwait, update</h3>
+<h3 id="cmd_2">eventloop: after, vwait, update</h3>
<div class="paragraph"><p>The following commands allow a script to be invoked when the given condition occurs.
If no script is given, returns the current script. If the given script is the empty, the
handler is removed.</p></div>
@@ -6458,7 +6615,7 @@ official policies, either expressed or implied, of the Jim Tcl Project.</tt></pr <div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
-Last updated 2010-11-03 16:14:30 EST
+Last updated 2010-11-03 16:26:31 EST
</div>
</div>
</body>
diff --git a/jim_tcl.txt b/jim_tcl.txt index dfe6b4c..cea5bf8 100644 --- a/jim_tcl.txt +++ b/jim_tcl.txt @@ -1347,7 +1347,7 @@ as the preceding argument(s). [[CommandIndex]] Command Index ~~~~~~~~~~~~~ -// @INSERTINDEX@ +@INSERTINDEX@ alarm ~~~~~ diff --git a/make-index b/make-index new file mode 100755 index 0000000..944d94e --- /dev/null +++ b/make-index @@ -0,0 +1,60 @@ +#!/usr/bin/env tclsh +# vim:se syn=tcl: + +lassign $argv filename +set f [open $filename] + +while {[gets $f buf] >= 0} { + if {$buf eq "@INSERTINDEX@"} { + break + } + puts $buf +} + +# Collect lines and commands +set lines {} +set commands {} +set c 0 + +while {[gets $f buf] >= 0} { + if {[string match "~~*" $buf]} { + if {[string match "*:*" $prev]} { + incr c + set target cmd_$c + set lines [linsert $lines end-1 "\[\[$target\]\]"] + } else { + set target _$prev + } + foreach cmd [split $prev ":,"] { + set cmd [string trim $cmd] + if {$cmd ne ""} { + lappend commands [list $cmd $target] + } + } + } + lappend lines $buf + set prev $buf +} +close $f + +# Output the index +puts {[frame="none",grid="none"]} +puts {|=========================} +set i 0 +foreach command [lsort $commands] { + foreach {cmd target} $command break + + puts -nonewline "|<<$target,$cmd>> " + incr i + if {$i % 8 == 0} { + puts "" + } +} +while {$i % 8 != 0} { + incr i + puts -nonewline "| " +} +puts "" +puts {|=========================} + +puts [join $lines \n] |