File: log2html.tcl

package info (click to toggle)
floater 1.4.15-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 3,268 kB
  • ctags: 1,888
  • sloc: ansic: 14,477; sh: 2,916; tcl: 891; makefile: 94; csh: 6
file content (22 lines) | stat: -rw-r--r-- 536 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
proc includecmd {filename} {
    set f [open $filename r]
    while {[gets $f s] >= 0} {puts $s}
    close $f
}

proc c {name} {
    return "<tt><a href=ref.html#$name>$name</a></tt>"
}

proc include {filename} {
    if {[string index $filename 0] != "|"} {puts <pre>}
    set ext .txt
    if {[string index $filename 0] != "|"} {set filename gtext$filename$ext}
    puts "<!-- including $filename -->"
    includecmd $filename
    if {[string index $filename 0] != "|"} {puts </pre>}
}

proc command args {
    puts "<tt>$args</tt>"
}