# man2html-fixindex.tcl # # Updates the index file generated by tix-man2html.tcl # in a format more suitable for Tix # # This program is dependent on the specific HTML format # generated by ./tix-man2html.tcl. # # $Id: man2html-fixindex.tcl,v 1.1 2001/01/22 08:18:35 ioilam Exp $ set root [lindex $argv 0] set file [file join $root contents.htm] set fd [open $file RDONLY] set data [read $fd] close $fd # # Remove the link about Tix Commands # regsub "
$name\n append html
\n append html {} set tab_height [expr ([llength $list] + $tab_width - 1) / $tab_width] for {set i 0} {$i < $tab_height} {incr i} { append html {} for {set j 0} {$j < $tab_width} {incr j} { set idx [expr ($j * $tab_height) + $i] append html } append html } append html
if {$idx < [llength $list]} { set page [lindex $list $idx] append html "$page" } else { append html "" } append html
append html
\n append html \n return $html } # # Add Tix commands to the page with better categorization. # append tixdata {
Introduction to the Tix Library
} append tixdata [section {Tix Standard Widgets} TixCmd $std] append tixdata [section {Tix Mega Widgets} TixCmd $mega] append tixdata [section {Tix Image Types} TixCmd $img] append tixdata [section {Tix Core Commands} TixCmd $other] append tixdata [section {Tix User Programs} UserCmd $progs] regsub $data $tixdata data set fd [open $file {WRONLY TRUNC CREAT}] puts -nonewline $fd $data close $fd