Index: openacs-4/packages/acs-tcl/tcl/tcl-documentation-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/tcl-documentation-procs.tcl,v diff -u -r1.30.2.8 -r1.30.2.9 --- openacs-4/packages/acs-tcl/tcl/tcl-documentation-procs.tcl 26 Jul 2014 12:33:25 -0000 1.30.2.8 +++ openacs-4/packages/acs-tcl/tcl/tcl-documentation-procs.tcl 29 Jul 2014 10:55:06 -0000 1.30.2.9 @@ -1506,10 +1506,12 @@ @author Lars Pind (lars@pinds.com) @creation-date 25 July 2000 } { - # first simple a quick check avoiding the slow regexp + + # First simple a quick check avoiding the slow regexp if {[string is integer -strict $value]} { return 1 } + if { [regexp {^(-)?(0*)([1-9][0-9]*|0)$} $value match sign zeros value] } { # Trim the value for any leading zeros set value $sign$value @@ -1529,6 +1531,13 @@ @author Lars Pind (lars@pinds.com) @creation-date 25 July 2000 } { + + # First simple a quick check avoiding the slow regexp + if {[string is integer -strict $value]} { + return [expr {$value >= 0}] + } + + # Check with leading zeros, but no "-" allowed, so it must be positive if { [regexp {^(0*)([1-9][0-9]*|0)$} $value match zeros value] } { if {[string is integer -strict $value]} { return 1