summaryrefslogtreecommitdiffstats
path: root/tools/man2help2.tcl
diff options
context:
space:
mode:
authordavygrvy <davygrvy@pobox.com>2002-05-08 04:23:42 (GMT)
committerdavygrvy <davygrvy@pobox.com>2002-05-08 04:23:42 (GMT)
commitb4cfa282f901f999bd890e71c26f7373bacab74e (patch)
tree9ae16ce245aa1d55dbce58a0ebda30b4f9566ba2 /tools/man2help2.tcl
parent0fe16f67db4311850f0ffe0df7a95b94f43d5aa5 (diff)
downloadtcl-b4cfa282f901f999bd890e71c26f7373bacab74e.zip
tcl-b4cfa282f901f999bd890e71c26f7373bacab74e.tar.gz
tcl-b4cfa282f901f999bd890e71c26f7373bacab74e.tar.bz2
Improved handling of CS/CE fields. Use Courier New and indent better.
Changes from Peter Spjuth <peter.spjuth@space.se>.
Diffstat (limited to 'tools/man2help2.tcl')
-rw-r--r--tools/man2help2.tcl21
1 files changed, 14 insertions, 7 deletions
diff --git a/tools/man2help2.tcl b/tools/man2help2.tcl
index aef5f61..acf0d88 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.8 2002/03/28 21:45:24 davygrvy Exp $
+# RCS: @(#) $Id: man2help2.tcl,v 1.9 2002/05/08 04:23:42 davygrvy Exp $
#
# Global variables used by these scripts:
@@ -280,16 +280,20 @@ proc macro {name args} {
BS {}
BE {}
CE {
- decrNestingLevel
+ puts -nonewline $::file "\\f0\\fs20 "
set state(noFill) 0
set state(breakPending) 0
- newPara 0i
+ newPara ""
+ set state(leftIndent) [expr {$state(leftIndent) - $state(offset)}]
+ set state(sb) 80
}
CS {
# code section
- incrNestingLevel
set state(noFill) 1
- newPara 0i
+ newPara ""
+ set state(leftIndent) [expr {$state(leftIndent) + $state(offset)}]
+ set state(sb) 80
+ puts -nonewline $::file "\\f1\\fs18 "
}
DE {
set state(noFill) 0
@@ -903,8 +907,11 @@ proc newPara {leftIndent {firstIndent 0i}} {
if $state(paragraph) {
puts -nonewline $file "\\line\n"
}
- set state(leftIndent) [expr {$state(leftMargin) \
- + ($state(offset) * $state(nestingLevel)) +[getTwips $leftIndent]}]
+ if {$leftIndent != ""} {
+ set state(leftIndent) [expr {$state(leftMargin) \
+ + ($state(offset) * $state(nestingLevel)) \
+ + [getTwips $leftIndent]}]
+ }
set state(firstIndent) [getTwips $firstIndent]
set state(paragraphPending) 1
}