summaryrefslogtreecommitdiffstats
path: root/tools/man2help2.tcl
diff options
context:
space:
mode:
authorJoe Mistachkin <joe@mistachkin.com>2008-10-02 18:56:30 (GMT)
committerJoe Mistachkin <joe@mistachkin.com>2008-10-02 18:56:30 (GMT)
commit6baa5b8d5a6b70470cad4964945c2027b381011f (patch)
treec053bfea326d04e1cd71e9ae0950c5b88d75777a /tools/man2help2.tcl
parentff519c460e7cc2818e6c0fdaa9469f6de154659b (diff)
downloadtcl-6baa5b8d5a6b70470cad4964945c2027b381011f.zip
tcl-6baa5b8d5a6b70470cad4964945c2027b381011f.tar.gz
tcl-6baa5b8d5a6b70470cad4964945c2027b381011f.tar.bz2
Fixes for [Bug 1934200, 1934272]
Diffstat (limited to 'tools/man2help2.tcl')
-rw-r--r--tools/man2help2.tcl10
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/man2help2.tcl b/tools/man2help2.tcl
index ff8a520..bff9d8f 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.17 2007/12/13 15:28:40 dgp Exp $
+# RCS: @(#) $Id: man2help2.tcl,v 1.17.2.1 2008/10/02 18:56:30 mistachkin Exp $
#
# Global variables used by these scripts:
@@ -600,7 +600,7 @@ proc setTabs {tabList} {
set relativeTo [expr {$state(leftMargin) \
+ ($state(offset) * $state(nestingLevel))}]
}
- if {[regexp {^\w'(.*)'u$} $arg -> submatch]} {
+ if {[regexp {^\\w'([^']*)'u$} $arg -> submatch]} {
# Magic factor!
set distance [expr {[string length $submatch] * 86.4}]
} else {
@@ -976,6 +976,10 @@ proc getTwips {arg} {
puts stderr "bad distance \"$arg\""
return 0
}
+ if {[string length $units] > 1} {
+ puts stderr "additional characters after unit \"$arg\""
+ set units [string index $units 0]
+ }
switch -- $units {
c {
set distance [expr {$distance * 567}]
@@ -985,7 +989,7 @@ proc getTwips {arg} {
}
default {
puts stderr "bad units in distance \"$arg\""
- continue
+ return 0
}
}
return $distance