From: <no...@so...> - 2002-06-19 17:24:06
|
Patches item #557486, was opened at 2002-05-17 15:44 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=310894&aid=557486&group_id=10894 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Paul Gardner (paulgardner) Assigned to: Andreas Kupries (andreas_kupries) Summary: tcltk-man2html broken copyright links Initial Comment: 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.tcl Thu May 3 16:47:28 2001 +++ VRWtcl8.4a4/tools/tcltk-man2html.tcl Fri 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. ---------------------------------------------------------------------- >Comment By: Paul Gardner (paulgardner) Date: 2002-06-19 10:24 Message: Logged In: YES user_id=546567 Sorry about that. ---------------------------------------------------------------------- Comment By: Andreas Kupries (andreas_kupries) Date: 2002-06-17 13:10 Message: 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. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=310894&aid=557486&group_id=10894 |