Update MASTER_SITES (old one is unavailable); adjust checksum and patch

for the tarball re-rolled by the new maintainer.

Discussion is in progress with maintainer regarding the newer 1.1
version, which is currently missing man-pages.

Prompted by:	pointyhat	(kris)
This commit is contained in:
Mikhail Teterin 2005-02-14 18:15:23 +00:00
parent 7100dc35e1
commit 81c6aea2fd
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=128820
3 changed files with 14 additions and 30 deletions

View file

@ -7,10 +7,10 @@
PORTNAME= tclGetOpts
PORTVERSION= 1.0
CATEGORIES= devel tcl80 tcl82
MASTER_SITES= ftp://ftp.neosoft.com/languages/tcl/alcatel/code/ \
http://www.neosoft.com/tcl/ftparchive/alcatel/code/
CATEGORIES= devel tcl80 tcl82 tcl83 tcl84
MASTER_SITES= http://www.waxandwane.com/toolbox/tclGetOpts/
DISTNAME= ${PORTNAME}
EXTRACT_SUFX= ${PORTVERSION}.tar.gz
MAINTAINER= mi@aldan.algebra.com
COMMENT= Pure TCL code for command line options parsing

View file

@ -1,2 +1,2 @@
MD5 (tclGetOpts.tar.gz) = f0a701007a5374980c97a5306ce62141
SIZE (tclGetOpts.tar.gz) = 8675
MD5 (tclGetOpts1.0.tar.gz) = 4de7119ffbe9b97bc09800fc210c17e3
SIZE (tclGetOpts1.0.tar.gz) = 8901

View file

@ -1,4 +1,4 @@
--- foxTypedOpts.tcl.orig Sat Feb 19 19:46:50 1994
--- foxTypedOpts.tcl Sat Feb 19 19:46:50 1994
+++ foxTypedOpts.tcl Thu Mar 18 16:15:13 1999
@@ -80,9 +80,8 @@
# typedopts several times with different <arg-list>s without losing the
@ -32,7 +32,7 @@
return 0
}
}
@@ -315,54 +312,52 @@
@@ -320,32 +317,28 @@
"floats" -
"strings" {
if { [ llength $optlist ] } then {
@ -55,14 +55,13 @@
if { ! [ llength $optlist ] } then {
- puts stderr "typedopts: No arguments given to type $type"
- return ""
- }
- if { ! [ string length [ set subtype [ parseOption $optlist ]]] } then {
- return ""
+ return -code error "typedopts: No arguments given to type $type"
}
+ if [catch {parseOption $optlist} subtype] {
- if { ! [ string length [ set subtype [ parseOption $optlist ]]] } then {
- return ""
+ if {[catch {parseOption $optlist} subtype]} then {
+ return -code error $subtype
+ }
}
return [ concat [ string index $type 0 ] $subtype ]
}
default {
@ -72,11 +71,7 @@
}
}
}
+}
+
+proc typedopts { args } {
set doinit 1
@@ -354,6 +347,5 @@
if { [ llength $args ] < 5 } then {
- puts stderr "typedopts: bad number of arguments."
@ -84,23 +79,12 @@
+ return -code error "typedopts: bad number of arguments."
}
- set args [ extract $args arglist optlist optret argret restret ]
+ set args [ foxOpts::extract $args arglist optlist optret argret restret ]
while { [ llength $args ] } {
- set opt [ shift args ]
- switch -exact [ findabbr { -noinitialize } $opt ] {
+ set opt [ foxOpts::shift args ]
+ switch -exact [ foxOpts::findabbr { -noinitialize } $opt ] {
-noinitialize {
set doinit 0
@@ -367,6 +359,5 @@
}
default {
- puts stderr "typedopts: bad option \"$opt\": should be -noinitialize or --"
- return -1
+ return -code error \
+ "typedopts: bad option \"$opt\": should be -noinitialize or --"
}
+ return -code error "typedopts: bad option \"$opt\": should be -noinitialize or --"
}
}
@@ -380,16 +375,15 @@