diff options
| author | donal.k.fellows@manchester.ac.uk <dkf> | 2007-10-24 14:44:07 (GMT) |
|---|---|---|
| committer | donal.k.fellows@manchester.ac.uk <dkf> | 2007-10-24 14:44:07 (GMT) |
| commit | 64d034f46207745c493b090b6d898691ad288dbc (patch) | |
| tree | 999ad2b823f8fa6a890e4868e0b00f0e38e835c8 /tools/man2html2.tcl | |
| parent | 3d7d8b714eb9d1f0f60f96fbbcc264bcb44905d2 (diff) | |
| download | tcl-64d034f46207745c493b090b6d898691ad288dbc.zip tcl-64d034f46207745c493b090b6d898691ad288dbc.tar.gz tcl-64d034f46207745c493b090b6d898691ad288dbc.tar.bz2 | |
Allow new options to be rendered as HTML.
Diffstat (limited to 'tools/man2html2.tcl')
| -rw-r--r-- | tools/man2html2.tcl | 41 |
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 " "]" } |
