[brlcad-commits] SF.net SVN: brlcad:[50624] brlcad/trunk/src/tclscripts/util/getopt.tcl
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <sta...@us...> - 2012-05-21 20:52:19
|
Revision: 50624 http://brlcad.svn.sourceforge.net/brlcad/?rev=50624&view=rev Author: starseeker Date: 2012-05-21 20:52:13 +0000 (Mon, 21 May 2012) Log Message: ----------- Allow negative numbers as values instead of treating them as flags. Modified Paths: -------------- brlcad/trunk/src/tclscripts/util/getopt.tcl Modified: brlcad/trunk/src/tclscripts/util/getopt.tcl =================================================================== --- brlcad/trunk/src/tclscripts/util/getopt.tcl 2012-05-21 20:37:32 UTC (rev 50623) +++ brlcad/trunk/src/tclscripts/util/getopt.tcl 2012-05-21 20:52:13 UTC (rev 50624) @@ -110,7 +110,9 @@ } proc getopt::isShortOpt {o} { - return [regexp {^-[a-zA-Z0-9]+} $o] + set is_short 0 + if {[regexp {^-[a-zA-Z0-9]+} $o] && ![regexp {^-[0-9]+} $o]} {set is_short 1} + return $is_short } proc getopt::isLongOpt {o} { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |