summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2007-10-24 14:44:07 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2007-10-24 14:44:07 (GMT)
commitff1b50a4021b13cb6e539e212ac3b704fb0de6c5 (patch)
tree999ad2b823f8fa6a890e4868e0b00f0e38e835c8 /tools
parentf78fd9556a52ef9c7737df64e1d37f1ab5ba9746 (diff)
downloadtcl-ff1b50a4021b13cb6e539e212ac3b704fb0de6c5.zip
tcl-ff1b50a4021b13cb6e539e212ac3b704fb0de6c5.tar.gz
tcl-ff1b50a4021b13cb6e539e212ac3b704fb0de6c5.tar.bz2
Allow new options to be rendered as HTML.
Diffstat (limited to 'tools')
-rw-r--r--tools/man2html2.tcl41
1 files changed, 39 insertions, 2 deletions
diff --git a/tools/man2html2.tcl b/tools/man2html2.tcl
index c000e21..243649e 100644
--- a/tools/man2html2.tcl
+++ b/tools/man2html2.tcl
@@ -6,7 +6,7 @@
#
# Copyright (c) 1996 by Sun Microsystems, Inc.
#
-# $Id: man2html2.tcl,v 1.10 2007/10/17 17:33:51 dkf Exp $
+# $Id: man2html2.tcl,v 1.11 2007/10/24 14:44:08 dkf Exp $
#
package require Tcl 8.4
@@ -308,7 +308,11 @@ proc macro {name args} {
font B
set temp $textState
set textState REF
- text options
+ if {[llength $args] > 0} {
+ text [lindex $args 0]
+ } else {
+ text options
+ }
set textState $temp
font R
text " manual entry for detailed descriptions of the above options."
@@ -374,6 +378,39 @@ proc macro {name args} {
# }
# puts -nonewline $file "<FONT COLOR=\"GREEN\">"
}
+ QW {
+ puts -nonewline $file "&\#147;"
+ text [lindex $args 0]
+ puts -nonewline $file "&\#148;"
+ if {[llength $args] > 1} {
+ text [lindex $args 1]
+ }
+ }
+ PQ {
+ puts -nonewline $file "(&\#147;"
+ text [lindex $args 0]
+ puts -nonewline $file "&\#148;"
+ if {[llength $args] > 1} {
+ text [lindex $args 1]
+ }
+ puts -nonewline $file ")"
+ if {[llength $args] > 2} {
+ text [lindex $args 2]
+ }
+ }
+ QR {
+ puts -nonewline $file "&\#147;"
+ text [lindex $args 0]
+ puts -nonewline $file "&\#148;&\#150;&\#147;"
+ text [lindex $args 1]
+ puts -nonewline $file "&\#148;"
+ if {[llength $args] > 2} {
+ text [lindex $args 2]
+ }
+ }
+ MT {
+ puts -nonewline $file "&\#147;&\#148;"
+ }
default {
puts stderr "Unknown macro: .$name [join $args " "]"
}