summaryrefslogtreecommitdiffstats
path: root/library/opt
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2003-03-19 21:57:29 (GMT)
committerdgp <dgp@users.sourceforge.net>2003-03-19 21:57:29 (GMT)
commitbb7105fe9e61473e34a6dfa06700dbc252afeb19 (patch)
tree442e8a70c6a7eb9cab94e31ce02f4e195e3956b3 /library/opt
parent2f7a25d9e6cc43c401cbb12b0a35adca9ba526ca (diff)
downloadtcl-bb7105fe9e61473e34a6dfa06700dbc252afeb19.zip
tcl-bb7105fe9e61473e34a6dfa06700dbc252afeb19.tar.gz
tcl-bb7105fe9e61473e34a6dfa06700dbc252afeb19.tar.bz2
* library/auto.tcl: Replaced [regexp] and [regsub] with
* library/history.tcl: [string map] where possible. Thanks * library/ldAout.tcl: to David Welton. [Bugs 667456,667558] * library/safe.tcl: Bumped to http 2.4.3, opt 0.4.5, and * library/http/http.tcl: tcltest 2.2.3. * library/http/pkgIndex.tcl: * library/opt/optparse.tcl: * library/opt/pkgIndex.tcl: * library/tcltest/tcltest.tcl: * library/tcltest/pkgIndex.tcl: * tools/genStubs.tcl: * tools/tcltk-man2html.tcl: * unix/mkLinks.tcl:
Diffstat (limited to 'library/opt')
-rw-r--r--library/opt/optparse.tcl14
-rw-r--r--library/opt/pkgIndex.tcl4
2 files changed, 9 insertions, 9 deletions
diff --git a/library/opt/optparse.tcl b/library/opt/optparse.tcl
index 8a86dfe..e01b7e8 100644
--- a/library/opt/optparse.tcl
+++ b/library/opt/optparse.tcl
@@ -8,12 +8,12 @@
# on it. If your code does rely on this package you
# may directly incorporate this code into your application.
#
-# RCS: @(#) $Id: optparse.tcl,v 1.8 2002/11/23 01:41:35 hobbs Exp $
+# RCS: @(#) $Id: optparse.tcl,v 1.9 2003/03/19 21:57:52 dgp Exp $
-package require Tcl 8
+package require Tcl 8.2
# When this version number changes, update the pkgIndex.tcl file
# and the install directory in the Makefiles.
-package provide opt 0.4.4
+package provide opt 0.4.5
namespace eval ::tcl {
@@ -811,15 +811,15 @@ proc ::tcl::OptCheckType {arg type {typeArgs ""}} {
}
}
- # Auto magic lasy type determination
+ # Auto magic lazy type determination
proc OptGuessType {arg} {
- if {[regexp -nocase {^(true|false)$} $arg]} {
+ if { $arg == "true" || $arg == "false" } {
return boolean
}
- if {[regexp {^(-+)?[0-9]+$} $arg]} {
+ if {[string is integer $arg]} {
return int
}
- if {![catch {expr {double($arg)}}]} {
+ if {[string is double $arg]} {
return float
}
return string
diff --git a/library/opt/pkgIndex.tcl b/library/opt/pkgIndex.tcl
index 252cab5..c5d3635 100644
--- a/library/opt/pkgIndex.tcl
+++ b/library/opt/pkgIndex.tcl
@@ -8,5 +8,5 @@
# script is sourced, the variable $dir must contain the
# full path name of this file's directory.
-if {![package vsatisfies [package provide Tcl] 8]} {return}
-package ifneeded opt 0.4.4 [list source [file join $dir optparse.tcl]]
+if {![package vsatisfies [package provide Tcl] 8.2]} {return}
+package ifneeded opt 0.4.5 [list source [file join $dir optparse.tcl]]