tcltk-man2html broken copyright links
Closed / Accepted557486ffffffffffffffffffffffffffffffffffCreated 25 years agoUpdated 17 years ago
Descriptionplain2002-05-17 22:44:27
tools/tcltk-man2html.tcl generates links called
Copyright to a file copyright.htm that does not
exist. For example the bottom of:
http://tcl.activestate.com/man/tcl8.4/TclCmd/contents.htm
Also, the links in the Keywords/*.htm files point to
a copyright.htm file within their own directory,
rather than in the doc root like everyone else.
The following patch replaces all the occurences of
literal text with [Copyright], making proc Copyright
an easy place to alter the link. The default is the
word Copyright with no link.
The patch unfortunately also mixes in the one-line
<td> change I mentioned in a previous post. Sorry.
diff -u tcl8.4a4/tools/tcltk-man2html.tcl
VRWtcl8.4a4/tools/tcltk-man2html.tcl
--- tcl8.4a4/tools/tcltk-man2html.tclThu May 3
16:47:28 2001
+++ VRWtcl8.4a4/tools/tcltk-man2html.tclFri
May 17 13:27:41 2002
@@ -1269,6 +1269,14 @@
}
}
+proc Copyright {dir} {
+# Old-style, produces a broken link unless a
copyright.htm is created
+#return "<A
HREF=\"$dir/copyright.htm\">Copyright</A> ©"
+
+# New-style, no link.
+return "Copyright ©"
+}
+
##
## foreach of the man directories specified by args
## convert manpages into hypertext in the directory
@@ -1489,9 +1497,9 @@
}
man-puts <HR><PRE>
foreach copyright $manual(copyrights)
{
- man-puts "<A
HREF=\"../copyright.htm\">Copyright</A> ©
[lrange $copyright 2 end]"
+ man-puts "[Copyright ..] [lrange
$copyright 2 end]"
}
-man-puts "<A
HREF=\"../copyright.htm\">Copyright</A> ©
1995-1997 Roger E. Critchlow Jr.</PRE>"
+man-puts "[Copyright ..] 1995-1997
Roger E. Critchlow Jr.</PRE>"
set manual(wing-copyrights)
[merge-copyrights $manual(wing-copyrights)
$manual(copyrights)]
} elseif {[next-op-is .TH rest]} {
set manual($manual(name)-title)
"[lrange $rest 4 end] - [lindex $rest 0] manual page"
@@ -1505,9 +1513,9 @@
}
man-puts <HR><PRE>
foreach copyright $manual(copyrights)
{
- man-puts "<A
HREF=\"../copyright.htm\">Copyright</A> ©
[lrange $copyright 2 end]"
+ man-puts "[Copyright ..] [lrange
$copyright 2 end]"
}
-man-puts "<A
HREF=\"../copyright.htm\">Copyright</A> ©
1995-1997 Roger E. Critchlow Jr.</PRE>"
+man-puts "[Copyright ..] 1995-1997
Roger E. Critchlow Jr.</PRE>"
set manual(wing-copyrights)
[merge-copyrights $manual(wing-copyrights)
$manual(copyrights)]
} else {
manerror "no .HS or .TH record found"
@@ -1539,7 +1547,7 @@
}
set tail [file tail $tail]
append rows([expr {$n%$nrows}]) \
- "<td> <a
href=\"$tail.htm\">$name</a>"
+ "<td> <a
href=\"$tail.htm\">$name</a></td>"
incr n
}
puts $manual(wing-toc-fp) <table>
@@ -1553,9 +1561,9 @@
#
puts $manual(wing-toc-fp) "<HR><PRE>"
foreach copyright $manual(wing-copyrights) {
- puts $manual(wing-toc-fp) "<A
HREF=\"../copyright.htm\">Copyright</A> ©
[lrange $copyright 2 end]"
+ puts $manual(wing-toc-fp) "[Copyright ..]
[lrange $copyright 2 end]"
}
-puts $manual(wing-toc-fp) "<A
HREF=\"../copyright.htm\">Copyright</A> ©
1995-1997 Roger E. Critchlow Jr."
+puts $manual(wing-toc-fp) "[Copyright ..]
1995-1997 Roger E. Critchlow Jr."
puts $manual(wing-toc-fp)
"</PRE></BODY></HTML>"
close $manual(wing-toc-fp)
set manual(merge-copyrights)
[merge-copyrights $manual(merge-copyrights)
$manual(wing-copyrights)]
@@ -1597,9 +1605,9 @@
puts $afp "</DL><HR><PRE>"
# insert merged copyrights
foreach copyright $manual(merge-copyrights) {
- puts $afp "<A
HREF=\"copyright.htm\">Copyright</A> © [lrange
$copyright 2 end]"
+ puts $afp "[Copyright ..] [lrange
$copyright 2 end]"
}
-puts $afp "<A
HREF=\"copyright.htm\">Copyright</A> © 1995-1997
Roger E. Critchlow Jr."
+puts $afp "[Copyright ..] 1995-1997 Roger E.
Critchlow Jr."
puts $afp "</PRE></BODY></HTML>"
close $afp
}
@@ -1607,9 +1615,9 @@
# insert merged copyrights
foreach copyright $manual(merge-copyrights) {
-puts $keyfp "<A
HREF=\"copyright.htm\">Copyright</A> © [lrange
$copyright 2 end]"
+puts $keyfp "[Copyright ..] [lrange
$copyright 2 end]"
}
- puts $keyfp "<A
HREF=\"copyright.htm\">Copyright</A> © 1995-1997
Roger E. Critchlow Jr."
+ puts $keyfp "[Copyright ..] 1995-1997 Roger E.
Critchlow Jr."
puts $keyfp </PRE><HR></BODY></HTML>
close $keyfp
@@ -1620,9 +1628,9 @@
puts $manual(short-toc-fp) "</DL><HR><PRE>"
# insert merged copyrights
foreach copyright $manual(merge-copyrights) {
-puts $manual(short-toc-fp) "<A
HREF=\"copyright.htm\">Copyright</A> © [lrange
$copyright 2 end]"
+puts $manual(short-toc-fp) "[Copyright .]
[lrange $copyright 2 end]"
}
- puts $manual(short-toc-fp) "<A
HREF=\"copyright.htm\">Copyright</A> © 1995-1997
Roger E. Critchlow Jr."
+ puts $manual(short-toc-fp) "[Copyright .]
1995-1997 Roger E. Critchlow Jr."
puts $manual(short-toc-fp) "</PRE></BODY></HTML>"
close $manual(short-toc-fp)
I apologize for the length and would be happy to
provide a patched file if that would be more
convenient.
hobbs Ticket [557486ffff]: 1 change
[History diff]2002-05-25 04:11:57
andreas_kupriesplain2002-06-18 03:10:46
Logged In: YES user_id=75003 I would be more happy if I the patch would have been attached to this report instead of providing it inline. This solves the length problem, and makes the patch actually useable. In the current form extraction from the report will most likely result in an in-applicable patch. See below the comment entry box for the form items to upload and attach a file to this report.
paulgardnerplain2002-06-20 00:24:05
Logged In: YES user_id=546567 Sorry about that.
paulgardnerplain2002-06-20 00:24:06
File Added - 25408: tcltk-man2html_copyrightpatch.txt
dkf Ticket [557486ffff]: 1 change
[History diff]2008-12-08 18:11:07
dkfplain2009-06-15 16:42:37
allow_comments - 1 All useful bits now applied.
Log in (anonymous is fine) to add a comment.
Attachments:
- tcltk-man2html_copyrightpatch.txt [download] added by paulgardner on 2002-06-20 00:24:05. [details]