summaryrefslogtreecommitdiffstats
path: root/tools/man2help2.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'tools/man2help2.tcl')
-rw-r--r--tools/man2help2.tcl61
1 files changed, 47 insertions, 14 deletions
diff --git a/tools/man2help2.tcl b/tools/man2help2.tcl
index 62b5b2e..7cd020c 100644
--- a/tools/man2help2.tcl
+++ b/tools/man2help2.tcl
@@ -9,7 +9,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: man2help2.tcl,v 1.15 2004/07/07 12:08:43 dkf Exp $
+# RCS: @(#) $Id: man2help2.tcl,v 1.16 2007/10/26 14:32:16 dkf Exp $
#
# Global variables used by these scripts:
@@ -425,6 +425,21 @@ proc macro {name args} {
}
VE {}
VS {}
+ QW {
+ formattedText "``[lindex $args 0]''[lindex $args 1] "
+ }
+ MT {
+ text "``'' "
+ }
+ PQ {
+ formattedText \
+ "(``[lindex $args 0]''[lindex $args 1])[lindex $args 2] "
+ }
+ QR {
+ formattedText "``[lindex $args 0]"
+ dash
+ formattedText "[lindex $args 1]''[lindex $args 2] "
+ }
default {
puts stderr "Unknown macro: .$name [join $args " "]"
}
@@ -516,13 +531,12 @@ proc formattedText {text} {
dash
set text [string range $text [expr {$index+2}] end]
}
- | {
+ & - | {
set text [string range $text [expr {$index+2}] end]
}
- o {
- text "\\'"
- regexp {'([^']*)'(.*)} $text all ch text
- text $chars($ch)
+ ( {
+ char [string range $text $index [expr {$index+3}]]
+ set text [string range $text [expr {$index+4}] end]
}
default {
puts stderr "Unknown sequence: \\$c"
@@ -665,32 +679,51 @@ proc char {name} {
global file state
switch -exact $name {
- \\o {
+ {\o} {
set state(intl) 1
}
- \\\ {
+ {\ } {
textSetup
puts -nonewline $file " "
}
- \\0 {
+ {\0} {
textSetup
puts -nonewline $file " \\emspace "
}
- \\\\ {
+ {\\} - {\e} {
textSetup
puts -nonewline $file "\\\\"
}
- \\(+- {
+ {\(+-} {
textSetup
puts -nonewline $file "\\'b1 "
}
- \\% -
- \\| {
+ {\%} - {\|} {
}
- \\(bu {
+ {\(->} {
+ textSetup
+ puts -nonewline $file "->"
+ }
+ {\(bu} {
textSetup
puts -nonewline $file "\\bullet "
}
+ {\(co} {
+ textSetup
+ puts -nonewline $file "\\'a9 "
+ }
+ {\(mu} {
+ textSetup
+ puts -nonewline $file "\\'d7 "
+ }
+ {\(em} {
+ textSetup
+ puts -nonewline $file "-"
+ }
+ {\(fm} {
+ textSetup
+ puts -nonewline $file "\\'27 "
+ }
default {
puts stderr "Unknown character: $name"
}