diff options
author | mistachkin <mistachkin@noemail.net> | 2008-10-02 19:01:29 (GMT) |
---|---|---|
committer | mistachkin <mistachkin@noemail.net> | 2008-10-02 19:01:29 (GMT) |
commit | f1c40934de6ab1e5b79f9fc9afe6d614c482f43f (patch) | |
tree | 7c5087b839c039d878ec1e8c5a0022ae0953534a /tools/man2help2.tcl | |
parent | d1a7d952c1f40bcc54e327a796133cfcc3a84e96 (diff) | |
download | tcl-f1c40934de6ab1e5b79f9fc9afe6d614c482f43f.zip tcl-f1c40934de6ab1e5b79f9fc9afe6d614c482f43f.tar.gz tcl-f1c40934de6ab1e5b79f9fc9afe6d614c482f43f.tar.bz2 |
Fixes for [Bug 1934272, 2072891]
FossilOrigin-Name: c2fdf161b8fdcea0633458ea959f41b11cf50f77
Diffstat (limited to 'tools/man2help2.tcl')
-rw-r--r-- | tools/man2help2.tcl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/man2help2.tcl b/tools/man2help2.tcl index 7791add..20e86af 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.18 2008/06/13 05:45:15 mistachkin Exp $ +# RCS: @(#) $Id: man2help2.tcl,v 1.19 2008/10/02 19:01: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}] |