Overview
| Artifact ID: | 4e33cd249503f527fd40b5bc58ab24bff0bda9fe |
|---|---|
| Ticket: | 557486ffffffffffffffffffffffffffffffffff
tcltk-man2html broken copyright links |
| User & Date: | paulgardner on 2002-05-17 22:44:27 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
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. - foundin changed to: "None"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "paulgardner"
- subsystem changed to: "None"
- title changed to: "tcltk-man2html broken copyright links"
- type changed to: "Patch"