diff options
Diffstat (limited to 'doc/make-index')
-rwxr-xr-x | doc/make-index | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/doc/make-index b/doc/make-index deleted file mode 100755 index 1f216a0..0000000 --- a/doc/make-index +++ /dev/null @@ -1,55 +0,0 @@ -# vim:se syn=tcl: - -while {[gets stdin buf] >= 0} { - if {$buf eq "@INSERTINDEX@"} { - break - } - puts $buf -} - -# Collect lines and commands -set lines {} -set commands {} -set c 0 - -while {[gets stdin 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 -} - -# 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] |