summaryrefslogtreecommitdiffstats
path: root/tools/tcltk-man2html.tcl
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2013-10-28 09:23:30 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2013-10-28 09:23:30 (GMT)
commitc6fdd0f07eb9197e59da6170e89c7beafd0a43e0 (patch)
tree6986da77d87e610d1d5786b4687a77bd84925bf6 /tools/tcltk-man2html.tcl
parent2fb0507a00743b52c4e5d679639bfb6cbc8b69b6 (diff)
downloadtcl-c6fdd0f07eb9197e59da6170e89c7beafd0a43e0.zip
tcl-c6fdd0f07eb9197e59da6170e89c7beafd0a43e0.tar.gz
tcl-c6fdd0f07eb9197e59da6170e89c7beafd0a43e0.tar.bz2
[01b77111e5]: Small fixes relating to this bug. In particular, the package name
mapping was not being distributed, and there were some small problems with what the mappings were and how they were applied. Also prevented external URLs from ending with a '.'; that's vanishingly rare...
Diffstat (limited to 'tools/tcltk-man2html.tcl')
-rwxr-xr-xtools/tcltk-man2html.tcl9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/tcltk-man2html.tcl b/tools/tcltk-man2html.tcl
index f392bce..89e8e5c 100755
--- a/tools/tcltk-man2html.tcl
+++ b/tools/tcltk-man2html.tcl
@@ -470,6 +470,7 @@ proc plus-pkgs {type args} {
continue
}
}
+ set dir [string trimright $dir "0123456789-."]
switch $type {
n {
set title "$name Package Commands"
@@ -647,10 +648,12 @@ try {
append appdir "$tkdir"
}
+ apply {{} {
+ global packageBuildList tcltkdir tcldir build_tcl
# When building docs for Tcl, try to build docs for bundled packages too
set packageBuildList {}
- if {$build_tcl} {
+ if {$build_tcl} {
set pkgsDir [file join $tcltkdir $tcldir pkgs]
set subdirs [glob -nocomplain -types d -tails -directory $pkgsDir *]
@@ -693,7 +696,8 @@ try {
foreach line [split [read $f] \n] {
if {[string trim $line] eq ""} continue
if {[string match #* $line]} continue
- lappend packageDirNameMap {*}$line
+ lassign $line dir name
+ lappend packageDirNameMap $dir $name
}
} finally {
close $f
@@ -714,6 +718,7 @@ try {
lset packageBuildList $idx+1 [dict get $packageDirNameMap $n]
}
}
+ }}
#
# Invoke the scraper/converter engine.