summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJoe Mistachkin <joe@mistachkin.com>2008-10-02 19:01:30 (GMT)
committerJoe Mistachkin <joe@mistachkin.com>2008-10-02 19:01:30 (GMT)
commit430612c9b1d9221b032c2c2dabbfed4a10570b50 (patch)
tree7c5087b839c039d878ec1e8c5a0022ae0953534a /tools
parentff1f43598ccc3d0a157e9bd32a7f48ecacf42331 (diff)
downloadtcl-430612c9b1d9221b032c2c2dabbfed4a10570b50.zip
tcl-430612c9b1d9221b032c2c2dabbfed4a10570b50.tar.gz
tcl-430612c9b1d9221b032c2c2dabbfed4a10570b50.tar.bz2
Fixes for [Bug 1934272, 2072891]
Diffstat (limited to 'tools')
-rw-r--r--tools/man2help2.tcl8
-rw-r--r--tools/man2tcl.c4
2 files changed, 8 insertions, 4 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}]
diff --git a/tools/man2tcl.c b/tools/man2tcl.c
index 6622a5b..7940325 100644
--- a/tools/man2tcl.c
+++ b/tools/man2tcl.c
@@ -15,7 +15,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: man2tcl.c,v 1.14 2008/06/13 05:45:15 mistachkin Exp $
+ * RCS: @(#) $Id: man2tcl.c,v 1.15 2008/10/02 19:01:30 mistachkin Exp $
*/
static char sccsid[] = "@(#) man2tcl.c 1.3 95/08/12 17:34:08";
@@ -96,7 +96,7 @@ main(
char **argv) /* Values of command-line arguments. */
{
FILE *f;
-#define MAX_LINE_SIZE 1000
+#define MAX_LINE_SIZE 4000
char line[MAX_LINE_SIZE];
char *p;