summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2010-01-14 11:45:09 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2010-01-14 11:45:09 (GMT)
commit36a7dc586ff228596fec6afc4130c203b2b3c6d0 (patch)
tree3c44e2565bf98ac8422bd2f52d1a9bcc7d4e0de6 /tools
parentcb4fb6d90a6d89a85e94d2907016d54a8280ae26 (diff)
downloadtcl-36a7dc586ff228596fec6afc4130c203b2b3c6d0.zip
tcl-36a7dc586ff228596fec6afc4130c203b2b3c6d0.tar.gz
tcl-36a7dc586ff228596fec6afc4130c203b2b3c6d0.tar.bz2
Add link remapping capability.
Diffstat (limited to 'tools')
-rw-r--r--tools/tcltk-man2html-utils.tcl16
-rwxr-xr-xtools/tcltk-man2html.tcl8
2 files changed, 17 insertions, 7 deletions
diff --git a/tools/tcltk-man2html-utils.tcl b/tools/tcltk-man2html-utils.tcl
index 9ed16d3..0291a4f 100644
--- a/tools/tcltk-man2html-utils.tcl
+++ b/tools/tcltk-man2html-utils.tcl
@@ -6,7 +6,7 @@
## Copyright (c) 1995-1997 Roger E. Critchlow Jr
## Copyright (c) 2004-2010 Donal K. Fellows
##
-## CVS: $Id: tcltk-man2html-utils.tcl,v 1.4 2010/01/13 17:09:53 dkf Exp $
+## CVS: $Id: tcltk-man2html-utils.tcl,v 1.5 2010/01/14 11:45:09 dkf Exp $
set ::manual(report-level) 1
@@ -611,7 +611,7 @@ proc output-name {line} {
## build a cross-reference link if appropriate
##
proc cross-reference {ref} {
- global manual
+ global manual remap_link_target
global ensemble_commands exclude_refs_map exclude_when_followed_by_map
set lref [string tolower $ref]
if {[string match "Tcl_*" $ref] || [string match "Tk_*" $ref]} {
@@ -625,6 +625,12 @@ proc cross-reference {ref} {
return "<A HREF=\"#$manual($manual(name)-id-$ref)\">$ref</A>"
}
##
+ ## apply a link remapping if available
+ ##
+ if {[info exists remap_link_target($lref)]} {
+ set lref $remap_link_target($lref)
+ }
+ ##
## nothing to reference
##
if {![info exists manual(name-$lref)]} {
@@ -635,10 +641,8 @@ proc cross-reference {ref} {
return "<A HREF=\"../$manual(name-$name).htm\">$ref</A>"
}
}
- if {$lref in {stdin stdout stderr end}} {
- # no good place to send these
- # tcl tokens?
- # also end
+ if {$lref in {end}} {
+ # no good place to send this tcl token?
}
return $ref
}
diff --git a/tools/tcltk-man2html.tcl b/tools/tcltk-man2html.tcl
index 9fc1228..87a0e89 100755
--- a/tools/tcltk-man2html.tcl
+++ b/tools/tcltk-man2html.tcl
@@ -18,7 +18,7 @@ package require Tcl 8.6
# Copyright (c) 1995-1997 Roger E. Critchlow Jr
# Copyright (c) 2004-2010 Donal K. Fellows
#
-# CVS: $Id: tcltk-man2html.tcl,v 1.40 2010/01/13 17:09:53 dkf Exp $
+# CVS: $Id: tcltk-man2html.tcl,v 1.41 2010/01/14 11:45:11 dkf Exp $
set Version "0.40"
@@ -797,6 +797,11 @@ set ensemble_commands {
clipboard console grab grid image option pack place selection tk tkwait
winfo wm
}
+array set remap_link_target {
+ stdin Tcl_GetStdChannel
+ stdout Tcl_GetStdChannel
+ stderr Tcl_GetStdChannel
+}
array set exclude_refs_map {
history.n {exec}
canvas.n {bitmap text}
@@ -807,6 +812,7 @@ array set exclude_refs_map {
radiobutton.n {image}
scrollbar.n {set}
selection.n {string}
+ tcltest.n {error}
tkvars.n {tk}
}
array set exclude_when_followed_by_map {