diff -Nru tcllib-1.13-dfsg/apps/page tcllib-1.14-dfsg/apps/page --- tcllib-1.13-dfsg/apps/page 2011-01-25 05:38:02.000000000 +0000 +++ tcllib-1.14-dfsg/apps/page 2011-12-13 18:13:22.000000000 +0000 @@ -24,13 +24,14 @@ package provide page 1.0 +lappend auto_path [file join [lindex $tcl_pkgPath end] page] lappend auto_path [file join [file dirname [file dirname [file normalize [info script]]]] modules] #lappend auto_path [file join [file dirname [info script]] .. modules] #source [file join [file dirname [info script]] .. modules struct tree.tcl] # /= -# $Id: page,v 1.2 2007/03/28 17:49:44 andreas_kupries Exp $ +# $Id: page,v 1.3 2011/11/10 21:16:02 andreas_kupries Exp $ # \= # # PAGE - PArser GEnerator | GTT - General Text Transformation @@ -402,7 +403,7 @@ } proc ::page::Version {} { - puts stderr {$Id: page,v 1.2 2007/03/28 17:49:44 andreas_kupries Exp $} + puts stderr {$Id: page,v 1.3 2011/11/10 21:16:02 andreas_kupries Exp $} exit 1 } diff -Nru tcllib-1.13-dfsg/ChangeLog tcllib-1.14-dfsg/ChangeLog --- tcllib-1.13-dfsg/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,47 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + +2011-11-07 Andreas Kupries + + * sak.tcl (xcopy): Fixed bug a preventing the detection of files + in subdirectories; copied from the installer. + * sak.tcl (ipackages): Fixed bug (reuse of varname) which placed + packages into the wrong module. + +2011-05-31 Andreas Kupries + + * New module and package: oo::util. Right now only easy + referencing of instance methods for callbacks. + + * New module and package: lambda. Easy anonymous procedures for + Tcl 8.5+. + + * New module and package: try. Tcl 8.5+ forward compatibility + implementation of try/catch/finally (TIP 329). + +2011-04-21 Andreas Kupries + + * modules/struct/queue_c.tcl: Disabled the critcl debug settings used + * modules/pt/pt_rdengine_c.tcl: to work around bugs in critcl v2's + * modules/pt/pt_parse_peg_c.tcl: handling of C companion files. + * modules/pt/pt_cparam_config_critcl.tcl: + + * sak.tcl (__critcl): Fixed processing of -debug, added the + forgotten handling of its argument. Plus added handling of + option -target. + + * ./modules/sha1/sha256.h: Fixed the conditional definition of + uint64_t and uint32_t for aix and hpux machines. + +2011-04-06 Andreas Kupries + + * modules/valtype: New module: Validation types. snit validation + types for various classes of numbers (ISBN, EAN, ...) and + general check-digit algorithms (luhn(5), verhoeff, ...). + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/debian/changelog tcllib-1.14-dfsg/debian/changelog --- tcllib-1.13-dfsg/debian/changelog 2011-12-26 18:36:39.000000000 +0000 +++ tcllib-1.14-dfsg/debian/changelog 2011-12-26 18:36:40.000000000 +0000 @@ -1,3 +1,12 @@ +tcllib (1.14-dfsg-1) unstable; urgency=low + + * New upstream release with several new modules. + * Bumped standards version to 3.9.2. + * Added build-arch and build-indep rules to debian/rules. + * Fixed manpage section in a few manpages. + + -- Sergei Golovan Wed, 14 Dec 2011 23:18:12 +0400 + tcllib (1.13-dfsg-1) unstable; urgency=low * New upstream release with several new modules. diff -Nru tcllib-1.13-dfsg/debian/control tcllib-1.14-dfsg/debian/control --- tcllib-1.13-dfsg/debian/control 2011-12-26 18:36:39.000000000 +0000 +++ tcllib-1.14-dfsg/debian/control 2011-12-26 18:36:40.000000000 +0000 @@ -5,7 +5,7 @@ Uploaders: Chris Waters , Sergei Golovan Build-Depends: debhelper (>= 5.0.0), quilt Build-Depends-Indep: tcl-dev -Standards-Version: 3.9.1 +Standards-Version: 3.9.2 Homepage: http://tcl.activestate.com/software/tcllib/ Package: tcllib @@ -13,7 +13,7 @@ Priority: optional Architecture: all Depends: ${tclsh:Depends}, ${misc:Depends} -Description: the Standard Tcl Library +Description: Standard Tcl Library Tcllib, the standard Tcl library, is a collection of common utility functions and modules all written in high-level Tcl. . @@ -62,6 +62,7 @@ * javascript: Tcl shortcuts to create common javascript functions * jpeg: functions to query and modify JPEG images * json: JSON parser + * lambda: utility commands for anonymous procedures * ldap: LDAP client and extended object interface * log: functions to log messages with various facilities and levels * map: mapping utilities @@ -77,6 +78,7 @@ * nns: name service facility * nntp: Tcl functions for the NNTP protocol * ntp: functions for an NTP client + * ooutil: utility commands for TclOO * otp: RFC 2289 a one-time password system * page: parser generator * pki: RSA public key encryption @@ -111,10 +113,12 @@ * tiff: TIFF image manipulation * transfer: data transfer facilities * treeql: tree query language + * try: trap and process errors and exceptions * uev: user events * units: convert and manipulate quantities with units * uri: functions to generate and manipulate commonly-used URIs * uuid: generator of universally unique identifiers (UUID) + * valtype: validation types * virtchannel: reflected/virtual channel support * wip: word interpreter * yaml: YAML format encoder/decoder diff -Nru tcllib-1.13-dfsg/debian/rules tcllib-1.14-dfsg/debian/rules --- tcllib-1.13-dfsg/debian/rules 2011-12-26 18:36:39.000000000 +0000 +++ tcllib-1.14-dfsg/debian/rules 2011-12-26 18:36:40.000000000 +0000 @@ -23,7 +23,9 @@ touch patch-stamp # build mostly covers docs and such -build: build-stamp +build: build-arch build-indep +build-arch: build-stamp +build-indep: build-stamp build-stamp: patch-stamp dh_testdir ./configure --prefix=/usr --mandir=$(mandir) @@ -89,7 +91,7 @@ for f in *.n ; do \ sed -e'/\.so man.macros/ d' \ -e's/^\.TH "math::roman" 1\.0/.TH "math::roman" 3tcl 1.0/' \ - -e's/^\.TH \(.\+\) n /.TH \1 3tcl /' \ + -e's/^\.TH \(.\+\) [in] /.TH \1 3tcl /' \ -e's/send(n)/send(3tk)/g' \ -e's/(n)/(3tcl)/g' \ -e's/^\.RE\([^ ]\)/.RE\n\1/' \ @@ -149,18 +151,18 @@ source diff: @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false -VER=1.13 +VER=1.14 get-orig-source: CURDIR=`pwd` && \ TMPDIR=`mktemp -d /tmp/tcllib.XXXXXX` && \ cd $$TMPDIR && \ - wget -O - http://heanet.dl.sourceforge.net/sourceforge/tcllib/tcllib-$(VER).tar.gz | tar -zx && \ + wget -O - http://prdownloads.sourceforge.net/tcllib/tcllib-$(VER).tar.gz | tar -zx && \ for f in `grep -rl '^Network Working Group' *` ; do \ echo "REMOVING NON-FREE RFC $$f" ; rm -f $$f ; \ done && \ tar -zcf $$CURDIR/tcllib_$(VER)-dfsg.orig.tar.gz tcllib-$(VER) && \ rm -rf $$TMPDIR -.PHONY: patch unpatch clean-patched build clean binary-indep binary-arch binary install get-orig-source +.PHONY: patch unpatch clean-patched build build-indep build-arch clean binary-indep binary-arch binary install get-orig-source diff -Nru tcllib-1.13-dfsg/DESCRIPTION.txt tcllib-1.14-dfsg/DESCRIPTION.txt --- tcllib-1.13-dfsg/DESCRIPTION.txt 2011-01-25 05:38:08.000000000 +0000 +++ tcllib-1.14-dfsg/DESCRIPTION.txt 2011-12-13 18:13:30.000000000 +0000 @@ -4,7 +4,7 @@ Tcl packages that provide utility functions useful to a large collection of Tcl programmers. Rights: BSD -Version: 1.13 +Version: 1.14 URL: http://tcllib.sourceforge.net/ Architecture: tcl Contributor: @@ -13,7 +13,7 @@ Contributor: Arjen Markus Contributor: Benjamin Riefenstahl Contributor: Bob Techentin -Contributor: Brent Welch +Contributor: Brent Welch Contributor: Brett Schwarz Contributor: Colin McCormack Contributor: Dan Kuchler @@ -21,7 +21,7 @@ Contributor: Don Porter Contributor: Donal K. Fellows Contributor: Elchonon Edelson -Contributor: Eric Melski +Contributor: Eric Melski Contributor: Gerald Lester Contributor: Gerhard Reithofer Contributor: Jeff Hobbs @@ -35,13 +35,13 @@ Contributor: Marty Backe Contributor: Melissa Chawla Contributor: Michael Schlenker -Contributor: Miguel Sofer +Contributor: Miguel Sofer Contributor: Pat Thoyts Contributor: Peter MacDonald Contributor: Pierre David Contributor: Reinhard Max Contributor: Ross Mohn -Contributor: Sandeep Tamhankar +Contributor: Sandeep Tamhankar Contributor: Scott Redman Contributor: Scott Stanton Contributor: Steffen Traeger diff -Nru tcllib-1.13-dfsg/examples/tepam/tepam_demo.tcl tcllib-1.14-dfsg/examples/tepam/tepam_demo.tcl --- tcllib-1.13-dfsg/examples/tepam/tepam_demo.tcl 2011-01-25 05:38:02.000000000 +0000 +++ tcllib-1.14-dfsg/examples/tepam/tepam_demo.tcl 2011-12-13 18:13:22.000000000 +0000 @@ -1,6 +1,6 @@ -#!/bin/sh -# Evaluating the wish origin \ -exec `which wish` "$0" "$@" +#! /bin/sh +# the next line restarts with tclsh \ +exec tclsh "$0" ${1+"$@"} ########################################################################## # TEPAM - Tcl's Enhanced Procedure and Argument Manager ########################################################################## @@ -11,7 +11,7 @@ # # Copyright (C) 2009, 2010 Andreas Drollinger # -# RCS: @(#) $Id: tepam_demo.tcl,v 1.2 2011/01/21 16:00:49 droll Exp $ +# RCS: @(#) $Id: tepam_demo.tcl,v 1.3 2011/11/09 05:57:47 andreas_kupries Exp $ ########################################################################## # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. @@ -161,6 +161,7 @@ set OPT(slaveexit) "close" } # Search inside the *n.x envirement for TkCon ... + set TkConPath "" catch {set TkConPath [exec csh -f -c {which tkcon.tcl}]} # Search inide the Windows envirement for TkCon ... catch { @@ -183,7 +184,7 @@ } tkcon show } else { - if {$tcl_platform(platform)=={windows}} { + if {$::tcl_platform(platform)=={windows}} { console show } else { error "Cannot source tkcon.tcl." @@ -191,7 +192,7 @@ } } else { if {[catch {wm deiconify $::tkcon::PRIV(root)}]} { - if {$tcl_platform(platform)=={windows}} { + if {$::tcl_platform(platform)=={windows}} { console show } else { error "Cannot deiconify tkcon!" @@ -246,9 +247,14 @@ ########################################################################## # $RCSfile: tepam_demo.tcl,v $ - ($Name: $) -# $Id: tepam_demo.tcl,v 1.2 2011/01/21 16:00:49 droll Exp $ +# $Id: tepam_demo.tcl,v 1.3 2011/11/09 05:57:47 andreas_kupries Exp $ # Modifications: # $Log: tepam_demo.tcl,v $ +# Revision 1.3 2011/11/09 05:57:47 andreas_kupries +# +# * examples/tepam/tepam_demo.tcl [Bug 3425269]: Applied bug fixes +# for the demo script supplied by Stuart Cassoff. +# # Revision 1.2 2011/01/21 16:00:49 droll # * TEPAM version 0.2.0 # diff -Nru tcllib-1.13-dfsg/modules/aes/ChangeLog tcllib-1.14-dfsg/modules/aes/ChangeLog --- tcllib-1.13-dfsg/modules/aes/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/aes/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/amazon-s3/ChangeLog tcllib-1.14-dfsg/modules/amazon-s3/ChangeLog --- tcllib-1.13-dfsg/modules/amazon-s3/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/amazon-s3/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/asn/ChangeLog tcllib-1.14-dfsg/modules/asn/ChangeLog --- tcllib-1.13-dfsg/modules/asn/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/asn/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/base32/ChangeLog tcllib-1.14-dfsg/modules/base32/ChangeLog --- tcllib-1.13-dfsg/modules/base32/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/base32/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/base64/base64.test tcllib-1.14-dfsg/modules/base64/base64.test --- tcllib-1.13-dfsg/modules/base64/base64.test 2011-01-25 05:37:58.000000000 +0000 +++ tcllib-1.14-dfsg/modules/base64/base64.test 2011-12-13 18:13:24.000000000 +0000 @@ -7,7 +7,7 @@ # Copyright (c) 1998-2000 by Ajuba Solutions. # All rights reserved. # -# RCS: @(#) $Id: base64.test,v 1.16 2010/07/06 19:15:40 andreas_kupries Exp $ +# RCS: @(#) $Id: base64.test,v 1.17 2011/11/09 04:31:24 andreas_kupries Exp $ # ------------------------------------------------------------------------- @@ -26,8 +26,10 @@ if {[catch {package present Trf}]} { puts "> pure Tcl" + tcltest::testConstraint trf 0 } else { puts "> Trf based" + tcltest::testConstraint trf 1 } # ------------------------------------------------------------------------- @@ -149,7 +151,8 @@ string compare $x $y } 0 -test base64-4.0 {base64 -- sf bug 2976290} { +# For trf a known bug. +test base64-4.0 {base64 -- sf bug 2976290} {!trf} { list [catch { ::base64::decode s=GQMRAk5WXhsABh0NEx4RXBocBVgBHQMXHRgEFltMQENQXEFOExJVQ0RAQERUQ0dAEhYEExVIRRVVFENWKxMKABsPGBI6LRoYLhsEFhsXGFkXEwZXGQMIHg== } msg] $msg diff -Nru tcllib-1.13-dfsg/modules/base64/ChangeLog tcllib-1.14-dfsg/modules/base64/ChangeLog --- tcllib-1.13-dfsg/modules/base64/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/base64/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,14 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + +2011-11-08 Andreas Kupries + + * base64.test: [Bug 2976290]: Disable new test when Trf is + available. It actually performs a decoding. + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/bee/ChangeLog tcllib-1.14-dfsg/modules/bee/ChangeLog --- tcllib-1.13-dfsg/modules/bee/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/bee/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/bench/ChangeLog tcllib-1.14-dfsg/modules/bench/ChangeLog --- tcllib-1.13-dfsg/modules/bench/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/bench/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/bibtex/ChangeLog tcllib-1.14-dfsg/modules/bibtex/ChangeLog --- tcllib-1.13-dfsg/modules/bibtex/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/bibtex/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/blowfish/ChangeLog tcllib-1.14-dfsg/modules/blowfish/ChangeLog --- tcllib-1.13-dfsg/modules/blowfish/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/blowfish/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/cache/ChangeLog tcllib-1.14-dfsg/modules/cache/ChangeLog --- tcllib-1.13-dfsg/modules/cache/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/cache/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/calendar/ChangeLog tcllib-1.14-dfsg/modules/calendar/ChangeLog --- tcllib-1.13-dfsg/modules/calendar/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/calendar/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/cmdline/ChangeLog tcllib-1.14-dfsg/modules/cmdline/ChangeLog --- tcllib-1.13-dfsg/modules/cmdline/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/cmdline/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,17 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + +2011-02-23 Andreas Kupries + + * cmdline.man: [Bug 3189786]: Fixed mishandling of suffixes .arg + * cmdline.tcl: and .secret. The '.'s were not properly quoted, + * cmdline.test: allowing any character, thus mishandling options + * pkgIndex.tcl: like 'myarg' or 'mysecret'. Extended the testsuite. + Bumped version to 1.3.3. + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/cmdline/cmdline.man tcllib-1.14-dfsg/modules/cmdline/cmdline.man --- tcllib-1.13-dfsg/modules/cmdline/cmdline.man 2011-01-25 05:37:59.000000000 +0000 +++ tcllib-1.14-dfsg/modules/cmdline/cmdline.man 2011-12-13 18:13:22.000000000 +0000 @@ -1,11 +1,11 @@ -[manpage_begin cmdline n 1.3.2] +[manpage_begin cmdline n 1.3.3] [moddesc {Command line and option processing}] [titledesc {Procedures to process command lines and options.}] [category {Programming tools}] [keywords {cmdline processing} {argument processing} argv argv0] [keywords {command line processing}] [require Tcl 8.2] -[require cmdline [opt 1.3.2]] +[require cmdline [opt 1.3.3]] [description] This package provides commands to parse command lines and options. diff -Nru tcllib-1.13-dfsg/modules/cmdline/cmdline.tcl tcllib-1.14-dfsg/modules/cmdline/cmdline.tcl --- tcllib-1.13-dfsg/modules/cmdline/cmdline.tcl 2011-01-25 05:37:59.000000000 +0000 +++ tcllib-1.14-dfsg/modules/cmdline/cmdline.tcl 2011-12-13 18:13:22.000000000 +0000 @@ -6,15 +6,15 @@ # application name for use in command line errors. # # Copyright (c) 1998-2000 by Ajuba Solutions. -# Copyright (c) 2001-2006 by Andreas Kupries . +# Copyright (c) 2001-2011 by Andreas Kupries . # Copyright (c) 2003 by David N. Welton # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: cmdline.tcl,v 1.27 2010/09/08 20:24:29 andreas_kupries Exp $ +# RCS: @(#) $Id: cmdline.tcl,v 1.28 2011/02/23 17:41:52 andreas_kupries Exp $ package require Tcl 8.2 -package provide cmdline 1.3.2 +package provide cmdline 1.3.3 namespace eval ::cmdline { namespace export getArgv0 getopt getKnownOpt getfiles getoptions \ @@ -292,11 +292,11 @@ set opts {? help} foreach opt $optlist { set name [lindex $opt 0] - if {[regsub -- .secret$ $name {} name] == 1} { + if {[regsub -- {\.secret$} $name {} name] == 1} { # Need to hide this from the usage display and getopt } lappend opts $name - if {[regsub -- .arg$ $name {} name] == 1} { + if {[regsub -- {\.arg$} $name {} name] == 1} { # Set defaults for those that take values. @@ -327,11 +327,11 @@ foreach opt [concat $optlist \ {{- "Forcibly stop option processing"} {help "Print this message"} {? "Print this message"}}] { set name [lindex $opt 0] - if {[regsub -- .secret$ $name {} name] == 1} { + if {[regsub -- {\.secret$} $name {} name] == 1} { # Hidden option continue } - if {[regsub -- .arg$ $name {} name] == 1} { + if {[regsub -- {\.arg$} $name {} name] == 1} { set default [lindex $opt 1] set comment [lindex $opt 2] append str [format " %-20s %s <%s>\n" "-$name value" \ @@ -433,7 +433,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: cmdline.tcl,v 1.27 2010/09/08 20:24:29 andreas_kupries Exp $ +# RCS: @(#) $Id: cmdline.tcl,v 1.28 2011/02/23 17:41:52 andreas_kupries Exp $ namespace eval ::cmdline { namespace export typedGetopt typedGetoptions typedUsage diff -Nru tcllib-1.13-dfsg/modules/cmdline/cmdline.test tcllib-1.14-dfsg/modules/cmdline/cmdline.test --- tcllib-1.13-dfsg/modules/cmdline/cmdline.test 2011-01-25 05:37:59.000000000 +0000 +++ tcllib-1.14-dfsg/modules/cmdline/cmdline.test 2011-12-13 18:13:22.000000000 +0000 @@ -8,7 +8,7 @@ # Copyright (c) 1999 by Ajuba Solutions. # All rights reserved. # -# RCS: @(#) $Id: cmdline.test,v 1.17 2010/09/08 20:24:29 andreas_kupries Exp $ +# RCS: @(#) $Id: cmdline.test,v 1.18 2011/02/23 17:41:52 andreas_kupries Exp $ # ------------------------------------------------------------------------- @@ -172,6 +172,18 @@ -? Print this message " {}] +test cmdline-2.12 {cmdline::getoptions, bug 3189786} { + set argList {-help} + list [catch {cmdline::getoptions argList {myarg a} {testing}} msg] $msg \ + $argList +} [list 1 "[cmdline::getArgv0] testing + -myarg + -a + -- Forcibly stop option processing + -help Print this message + -? Print this message +" {}] + # cmdline::usage test cmdline-3.1 {cmdline::usage,hidden options} { @@ -196,6 +208,19 @@ -? Print this message " {}] + +test cmdline-3.3 {cmdline::usage, bug 3189786} { + set argList {-help} + list [catch {cmdline::getoptions argList {{mysecret blat} a}} msg] $msg \ + $argList +} [list 1 "[cmdline::getArgv0] options: + -mysecret blat + -a + -- Forcibly stop option processing + -help Print this message + -? Print this message +" {}] + # cmdline::getfiles # Run the script body in a slave process so we can collect stdout. diff -Nru tcllib-1.13-dfsg/modules/cmdline/pkgIndex.tcl tcllib-1.14-dfsg/modules/cmdline/pkgIndex.tcl --- tcllib-1.13-dfsg/modules/cmdline/pkgIndex.tcl 2011-01-25 05:37:59.000000000 +0000 +++ tcllib-1.14-dfsg/modules/cmdline/pkgIndex.tcl 2011-12-13 18:13:22.000000000 +0000 @@ -1,2 +1,2 @@ if {![package vsatisfies [package provide Tcl] 8.2]} {return} -package ifneeded cmdline 1.3.2 [list source [file join $dir cmdline.tcl]] +package ifneeded cmdline 1.3.3 [list source [file join $dir cmdline.tcl]] diff -Nru tcllib-1.13-dfsg/modules/comm/ChangeLog tcllib-1.14-dfsg/modules/comm/ChangeLog --- tcllib-1.13-dfsg/modules/comm/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/comm/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/control/ChangeLog tcllib-1.14-dfsg/modules/control/ChangeLog --- tcllib-1.13-dfsg/modules/control/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/control/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/coroutine/ChangeLog tcllib-1.14-dfsg/modules/coroutine/ChangeLog --- tcllib-1.13-dfsg/modules/coroutine/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/coroutine/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,21 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + +2011-04-18 Andreas Kupries + + * coroutine.tcl: [Bug 3252952]: Fixed clash between ::coroutine + * coroutine.man: builtin of Tcl 8.6, and the same-named ensemble + of the package. Moved package command ::coroutine to + ::coroutine::util. Bumped version to 1.1. + + * coro_auto.tcl: [Bug 3252952]: Updated user of package coroutine + * coro_auto.man: to the new command name. Bumped version to 1.1. + + * pkgIndex.tcl: Updated version numbers. + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/coroutine/coro_auto.man tcllib-1.14-dfsg/modules/coroutine/coro_auto.man --- tcllib-1.13-dfsg/modules/coroutine/coro_auto.man 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/coroutine/coro_auto.man 2011-12-13 18:13:24.000000000 +0000 @@ -1,14 +1,15 @@ [comment {-*- tcl -*- doctools manpage}] [manpage_begin coroutine::auto n 1] -[copyright {2010 Andreas Kupries }] +[copyright {2010-2011 Andreas Kupries }] [moddesc {Coroutine utilities}] [category Coroutine] [titledesc {}] [require Tcl 8.6] -[require coroutine::auto 1] -[require coroutine 1] +[require coroutine::auto 1.1] +[require coroutine 1.1] [description] [keywords coroutine global exit after vwait update gets read] +[keywords channel threads {green threads} events] The [package coroutine::auto] package provides no commands or other directly visible functionality. diff -Nru tcllib-1.13-dfsg/modules/coroutine/coro_auto.tcl tcllib-1.14-dfsg/modules/coroutine/coro_auto.tcl --- tcllib-1.13-dfsg/modules/coroutine/coro_auto.tcl 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/coroutine/coro_auto.tcl 2011-12-13 18:13:24.000000000 +0000 @@ -2,10 +2,10 @@ # # ## ### ##### ######## ############# # @@ Meta Begin -# Package coroutine::auto 1 +# Package coroutine::auto 1.1 # Meta platform tcl # Meta require {Tcl 8.6} -# Meta require coroutine +# Meta require {coroutine 1.1} # Meta license BSD # Meta as::author {Andreas Kupries} # Meta summary Coroutine Event and Channel Support @@ -17,9 +17,9 @@ # Meta description without changes. # @@ Meta End -# Copyright (c) 2009 Andreas Kupries +# Copyright (c) 2009-2011 Andreas Kupries -## $Id: coro_auto.tcl,v 1.1 2009/11/10 21:04:39 andreas_kupries Exp $ +## $Id: coro_auto.tcl,v 1.3 2011/11/17 08:00:45 andreas_kupries Exp $ # # ## ### ##### ######## ############# ## Requisites, and ensemble setup. @@ -29,41 +29,6 @@ namespace eval ::coroutine::auto {} # # ## ### ##### ######## ############# -## Internal. Setup. - -proc ::coroutine::auto::Init {} { - - # Replaces the builtin commands with coroutine-aware - # counterparts. We cannot use the coroutine commands - # directly, because the replacements have to use the saved builtin - # commands when called outside of a coroutine. And some (read, - # gets, update) even need full re-implementations, as they use the - # builtin command they replace themselves to implement their - # functionality. - - foreach cmd { - global - exit - after - vwait - update - } { - rename ::$cmd [namespace current]::core_$cmd - rename [namespace current]::wrap_$cmd ::$cmd - } - - foreach cmd { - gets - read - } { - rename ::tcl::chan::$cmd [namespace current]::core_$cmd - rename [namespace current]::wrap_$cmd ::tcl::chan::$cmd - } - - return -} - -# # ## ### ##### ######## ############# ## API implementations. Uses the coroutine commands where ## possible. @@ -72,7 +37,7 @@ tailcall [namespace current]::core_global {*}$args } - tailcall ::coroutine::global {*}$args + tailcall ::coroutine::util::global {*}$args } # - -- --- ----- -------- ------------- @@ -89,7 +54,7 @@ } # Inside of coroutine, and synchronous delay (args == ""). - tailcall ::coroutine::after $delay + tailcall ::coroutine::util::after $delay } # - -- --- ----- -------- ------------- @@ -99,7 +64,7 @@ tailcall [namespace current]::core_exit $status } - tailcall ::coroutine::exit $status + tailcall ::coroutine::util::exit $status } # - -- --- ----- -------- ------------- @@ -109,7 +74,7 @@ tailcall [namespace current]::core_vwait $varname } - tailcall ::coroutine::vwait $varname + tailcall ::coroutine::util::vwait $varname } # - -- --- ----- -------- ------------- @@ -308,7 +273,41 @@ } # # ## ### ##### ######## ############# +## Internal. Setup. + +::apply {{} { + # Replaces the builtin commands with coroutine-aware + # counterparts. We cannot use the coroutine commands directly, + # because the replacements have to use the saved builtin commands + # when called outside of a coroutine. And some (read, gets, + # update) even need full re-implementations, as they use the + # builtin command they replace themselves to implement their + # functionality. + + foreach cmd { + global + exit + after + vwait + update + } { + rename ::$cmd [namespace current]::core_$cmd + rename [namespace current]::wrap_$cmd ::$cmd + } + + foreach cmd { + gets + read + } { + rename ::tcl::chan::$cmd [namespace current]::core_$cmd + rename [namespace current]::wrap_$cmd ::tcl::chan::$cmd + } + + return +} ::coroutine::auto} + +# # ## ### ##### ######## ############# ## Ready -::coroutine::auto::Init -package provide coroutine::auto 1 + +package provide coroutine::auto 1.1 return diff -Nru tcllib-1.13-dfsg/modules/coroutine/coroutine.man tcllib-1.14-dfsg/modules/coroutine/coroutine.man --- tcllib-1.13-dfsg/modules/coroutine/coroutine.man 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/coroutine/coroutine.man 2011-12-13 18:13:24.000000000 +0000 @@ -1,13 +1,14 @@ [comment {-*- tcl -*- doctools manpage}] [manpage_begin coroutine n 1] -[copyright {2010 Andreas Kupries }] +[copyright {2010-2011 Andreas Kupries }] [moddesc {Coroutine utilities}] [category Coroutine] [titledesc {}] [require Tcl 8.6] -[require coroutine 1] +[require coroutine 1.1] [description] -[keywords coroutine chanel events] +[keywords coroutine channel events threads {green threads}] +[keywords global exit after vwait update gets read] The [package coroutine] package provides coroutine-aware implementations of various event- and channel related commands. It can @@ -41,40 +42,40 @@ [list_begin definitions] -[call [cmd {coroutine after}] [arg delay]] +[call [cmd {coroutine::util after}] [arg delay]] This command delays the coroutine invoking it by [arg delay] milliseconds. -[call [cmd {coroutine await}] [arg varname]...] +[call [cmd {coroutine::util await}] [arg varname]...] -This command is an extension form of the [cmd {coroutine vwait}] +This command is an extension form of the [cmd {coroutine::util vwait}] command (see below) which waits on a write to one of many named namespace variables. -[call [cmd {coroutine create}] [arg arg]...] +[call [cmd {coroutine::util create}] [arg arg]...] This command creates a new coroutine with an automatically assigned name and causes it to run the code specified by the arguments. -[call [cmd {coroutine exit}] [opt [arg status]]] +[call [cmd {coroutine::util exit}] [opt [arg status]]] This command exits the current coroutine, causing it to return [arg status]. If no status was specified the default [arg 0] is returned. -[call [cmd {coroutine gets}] [arg chan] [opt [arg varname]]] +[call [cmd {coroutine::util gets}] [arg chan] [opt [arg varname]]] This command reads a line from the channel [arg chan] and returns it either as its result, or, if a [arg varname] was specified, writes it to the named variable and returns the number of characters read. -[call [cmd {coroutine global}] [arg varname]...] +[call [cmd {coroutine::util global}] [arg varname]...] This command imports the named global variables of the coroutine into the current scope. From the technical point of view these variables @@ -83,20 +84,20 @@ can have their own set, independent of all others. -[call [cmd {coroutine read}] [option -nonewline] [arg chan] [opt [arg n]]] +[call [cmd {coroutine::util read}] [option -nonewline] [arg chan] [opt [arg n]]] This command reads [arg n] characters from the channel [arg chan] and returns them as its result. If [arg n] is not specified the command will read the channel until EOF is reached. -[call [cmd {coroutine update}] [opt [const idletasks]]] +[call [cmd {coroutine::util update}] [opt [const idletasks]]] This command causes the coroutine invoking it to run pending events or idle handlers before proceeding. -[call [cmd {coroutine vwait}] [arg varname]] +[call [cmd {coroutine::util vwait}] [arg varname]] This command causes the coroutine calling it to wait for a write to the named namespace variable [arg varname]. diff -Nru tcllib-1.13-dfsg/modules/coroutine/coroutine.pcx tcllib-1.14-dfsg/modules/coroutine/coroutine.pcx --- tcllib-1.13-dfsg/modules/coroutine/coroutine.pcx 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/coroutine/coroutine.pcx 2011-12-13 18:13:24.000000000 +0000 @@ -13,40 +13,40 @@ namespace eval ::coroutine {} -pcx::check 1 std ::coroutine::create \ +pcx::check 1 std ::coroutine::util::create \ {checkSimpleArgs 0 -1 { checkWord }} -pcx::check 1 std ::coroutine::global \ +pcx::check 1 std ::coroutine::util::global \ {checkSimpleArgs 0 -1 { checkVarDecl }} -pcx::check 1 std ::coroutine::after \ +pcx::check 1 std ::coroutine::util::after \ {checkSimpleArgs 1 1 { checkInt }} -pcx::check 1 std ::coroutine::exit \ +pcx::check 1 std ::coroutine::util::exit \ {checkSimpleArgs 0 1 { checkInt }} -pcx::check 1 std ::coroutine::vwait \ +pcx::check 1 std ::coroutine::util::vwait \ {checkSimpleArgs 1 1 { checkVarName }} -pcx::check 1 std ::coroutine::await \ +pcx::check 1 std ::coroutine::util::await \ {checkSimpleArgs 0 -1 { checkVarName }} -pcx::check 1 std ::coroutine::update \ +pcx::check 1 std ::coroutine::util::update \ {checkSimpleArgs 0 1 { {checkKeyword 0 {idletasks}} }} -pcx::check 1 std ::coroutine::gets \ +pcx::check 1 std ::coroutine::util::gets \ {checkSimpleArgs 1 2 { checkChannelID checkVarNameWrite }} -pcx::check 1 std ::coroutine::read \ +pcx::check 1 std ::coroutine::util::read \ {coreTcl::checkReadCmd 0} # Initialization via pcx::init. diff -Nru tcllib-1.13-dfsg/modules/coroutine/coroutine.tcl tcllib-1.14-dfsg/modules/coroutine/coroutine.tcl --- tcllib-1.13-dfsg/modules/coroutine/coroutine.tcl 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/coroutine/coroutine.tcl 2011-12-13 18:13:24.000000000 +0000 @@ -42,13 +42,13 @@ # Copyright (c) 2009 Neil Madden # Copyright (c) 2009 Peter Spjuth -## $Id: coroutine.tcl,v 1.1 2009/11/10 21:04:39 andreas_kupries Exp $ +## $Id: coroutine.tcl,v 1.2 2011/04/18 20:23:58 andreas_kupries Exp $ # # ## ### ##### ######## ############# ## Requisites, and ensemble setup. package require Tcl 8.6 -namespace eval ::coroutine { +namespace eval ::coroutine::util { namespace export \ create global after exit vwait update gets read await @@ -60,7 +60,7 @@ ## API. Spawn coroutines, automatic naming ## (like thread::create). -proc ::coroutine::create {args} { +proc ::coroutine::util::create {args} { ::coroutine [ID] {*}$args } @@ -80,7 +80,7 @@ # - -- --- ----- -------- ------------- -proc ::coroutine::global {args} { +proc ::coroutine::util::global {args} { # Frame #1 is the coroutine-specific stack frame at its # bottom. Variables there are out of view of the main code, and # can be made visible in the entire coroutine underneath. @@ -94,7 +94,7 @@ # - -- --- ----- -------- ------------- -proc ::coroutine::after {delay} { +proc ::coroutine::util::after {delay} { ::after $delay [info coroutine] yield return @@ -102,13 +102,13 @@ # - -- --- ----- -------- ------------- -proc ::coroutine::exit {{status 0}} { +proc ::coroutine::util::exit {{status 0}} { return -level [info level] $status } # - -- --- ----- -------- ------------- -proc ::coroutine::vwait {varname} { +proc ::coroutine::util::vwait {varname} { upvar 1 $varname var set callback [list [namespace current]::VWaitTrace [info coroutine]] @@ -131,14 +131,14 @@ return } -proc ::coroutine::VWaitTrace {coroutine args} { +proc ::coroutine::util::VWaitTrace {coroutine args} { $coroutine return } # - -- --- ----- -------- ------------- -proc ::coroutine::update {{what {}}} { +proc ::coroutine::util::update {{what {}}} { if {$what eq "idletasks"} { ::after idle [info coroutine] } elseif {$what ne {}} { @@ -153,7 +153,7 @@ # - -- --- ----- -------- ------------- -proc ::coroutine::gets {args} { +proc ::coroutine::util::gets {args} { # Process arguments. # Acceptable syntax: # * gets CHAN ?VARNAME? @@ -202,7 +202,7 @@ # - -- --- ----- -------- ------------- -proc ::coroutine::read {args} { +proc ::coroutine::util::read {args} { # Process arguments. # Acceptable syntax: # * read ?-nonewline ? CHAN @@ -312,7 +312,7 @@ ## result is the name of the variable which was written. ## This code mainly by Neil Madden. -proc ::coroutine::await args { +proc ::coroutine::util::await args { set callback [list [namespace current]::AWaitSignal [info coroutine]] # Step 1. Wait for a write to any of the variable, using a trace @@ -345,7 +345,7 @@ return $choice } -proc ::coroutine::AWaitSignal {coroutine var index op} { +proc ::coroutine::util::AWaitSignal {coroutine var index op} { if {$op ne "write"} { return } set fullvar $var if {$index ne ""} { append fullvar ($index) } @@ -355,7 +355,7 @@ # # ## ### ##### ######## ############# ## Internal (package specific) commands -proc ::coroutine::ID {} { +proc ::coroutine::util::ID {} { variable counter return [namespace current]::C[incr counter] } @@ -363,12 +363,12 @@ # # ## ### ##### ######## ############# ## Internal (package specific) state -namespace eval ::coroutine { +namespace eval ::coroutine::util { #checker exclude warnShadowVar variable counter 0 } # # ## ### ##### ######## ############# ## Ready -package provide coroutine 1 +package provide coroutine 1.1 return diff -Nru tcllib-1.13-dfsg/modules/coroutine/pkgIndex.tcl tcllib-1.14-dfsg/modules/coroutine/pkgIndex.tcl --- tcllib-1.13-dfsg/modules/coroutine/pkgIndex.tcl 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/coroutine/pkgIndex.tcl 2011-12-13 18:13:24.000000000 +0000 @@ -1,3 +1,3 @@ if {![package vsatisfies [package provide Tcl] 8.6]} {return} -package ifneeded coroutine 1 [list source [file join $dir coroutine.tcl]] -package ifneeded coroutine::auto 1 [list source [file join $dir coro_auto.tcl]] +package ifneeded coroutine 1.1 [list source [file join $dir coroutine.tcl]] +package ifneeded coroutine::auto 1.1 [list source [file join $dir coro_auto.tcl]] diff -Nru tcllib-1.13-dfsg/modules/counter/ChangeLog tcllib-1.14-dfsg/modules/counter/ChangeLog --- tcllib-1.13-dfsg/modules/counter/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/counter/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/crc/ChangeLog tcllib-1.14-dfsg/modules/crc/ChangeLog --- tcllib-1.13-dfsg/modules/crc/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/crc/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/csv/ChangeLog tcllib-1.14-dfsg/modules/csv/ChangeLog --- tcllib-1.13-dfsg/modules/csv/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/csv/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,22 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + +2011-11-22 Andreas Kupries + + * csv.tcl: [Bug 1724818]: Applied the patch supplied by Jeremy + * csv.man: Cowgar fixing the issue. Bumped + * csv.test: version to 0.7.3. Extended testsuite. + * pkgIndex.tcl: + +2011-04-11 Andreas Kupries + + * csv.man: [Bug 3281791]: Followup to fix for [Bug 3061815], fixed + forgotten change in the text after the examples. Thanks to + . + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/csv/csv.man tcllib-1.14-dfsg/modules/csv/csv.man --- tcllib-1.13-dfsg/modules/csv/csv.man 2011-01-25 05:37:58.000000000 +0000 +++ tcllib-1.14-dfsg/modules/csv/csv.man 2011-12-13 18:13:23.000000000 +0000 @@ -1,11 +1,11 @@ [comment {-*- tcl -*-}] -[manpage_begin csv n 0.7.2] -[copyright {2002-2009 Andreas Kupries }] +[manpage_begin csv n 0.7.3] +[copyright {2002-2011 Andreas Kupries }] [moddesc {CSV processing}] [titledesc {Procedures to handle CSV data.}] [category {Text processing}] [require Tcl 8.3] -[require csv [opt 0.7.2]] +[require csv [opt 0.7.3]] [description] [para] @@ -217,8 +217,8 @@ d) (the empty string) }] -instead. As can be seen only item (d) is different, now a " instead of -the empty string. +instead. As can be seen only item (d) is different, now the empty string +instead of a ". [section {BUGS, IDEAS, FEEDBACK}] diff -Nru tcllib-1.13-dfsg/modules/csv/csv.tcl tcllib-1.14-dfsg/modules/csv/csv.tcl --- tcllib-1.13-dfsg/modules/csv/csv.tcl 2011-01-25 05:37:58.000000000 +0000 +++ tcllib-1.14-dfsg/modules/csv/csv.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -3,15 +3,15 @@ # Tcl implementations of CSV reader and writer # # Copyright (c) 2001 by Jeffrey Hobbs -# Copyright (c) 2001-2008 by Andreas Kupries +# Copyright (c) 2001-2011 by Andreas Kupries # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: csv.tcl,v 1.27 2010/01/19 20:21:57 andreas_kupries Exp $ +# RCS: @(#) $Id: csv.tcl,v 1.28 2011/11/23 02:22:10 andreas_kupries Exp $ package require Tcl 8.3 -package provide csv 0.7.2 +package provide csv 0.7.3 namespace eval ::csv { namespace export join joinlist read2matrix read2queue report @@ -33,7 +33,7 @@ set out "" set sep {} foreach val $values { - if {[string match "*\[${delChar}$sepChar\]*" $val]} { + if {[string match "*\[${delChar}$sepChar\r\n\]*" $val]} { append out $sep${delChar}[string map [list $delChar ${delChar}${delChar}] $val]${delChar} } else { append out $sep${val} diff -Nru tcllib-1.13-dfsg/modules/csv/csv.test tcllib-1.14-dfsg/modules/csv/csv.test --- tcllib-1.13-dfsg/modules/csv/csv.test 2011-01-25 05:37:58.000000000 +0000 +++ tcllib-1.14-dfsg/modules/csv/csv.test 2011-12-13 18:13:23.000000000 +0000 @@ -4,10 +4,10 @@ # Sourcing this file into Tcl runs the tests and generates output for errors. # No output means no errors were found. # -# Copyright (c) 2001-2008 by Andreas Kupries +# Copyright (c) 2001-2011 by Andreas Kupries # All rights reserved. # -# RCS: @(#) $Id: csv.test,v 1.22 2010/01/19 20:21:57 andreas_kupries Exp $ +# RCS: @(#) $Id: csv.test,v 1.23 2011/11/23 02:22:10 andreas_kupries Exp $ # ------------------------------------------------------------------------- @@ -274,6 +274,9 @@ csv::join {123 123,521.2 {Mary says "Hello, I am Mary"}} , = } $str6_ +test csv-2.13-sf-1724818 {join, newlines in string, sf bug 1724818} { + csv::join {123 {John Doe} "123 Main St.\nSmalltown, OH 44444"} +} "123,John Doe,\"123 Main St.\nSmalltown, OH 44444\"" # Malformed inputs diff -Nru tcllib-1.13-dfsg/modules/csv/pkgIndex.tcl tcllib-1.14-dfsg/modules/csv/pkgIndex.tcl --- tcllib-1.13-dfsg/modules/csv/pkgIndex.tcl 2011-01-25 05:37:58.000000000 +0000 +++ tcllib-1.14-dfsg/modules/csv/pkgIndex.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -1,2 +1,2 @@ if {![package vsatisfies [package provide Tcl] 8.3]} {return} -package ifneeded csv 0.7.2 [list source [file join $dir csv.tcl]] +package ifneeded csv 0.7.3 [list source [file join $dir csv.tcl]] diff -Nru tcllib-1.13-dfsg/modules/des/ChangeLog tcllib-1.14-dfsg/modules/des/ChangeLog --- tcllib-1.13-dfsg/modules/des/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/des/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/devtools/ca.crt tcllib-1.14-dfsg/modules/devtools/ca.crt --- tcllib-1.13-dfsg/modules/devtools/ca.crt 2011-01-25 05:37:58.000000000 +0000 +++ tcllib-1.14-dfsg/modules/devtools/ca.crt 2011-12-13 18:13:23.000000000 +0000 @@ -1,18 +1,19 @@ -----BEGIN CERTIFICATE----- -MIIC0DCCAjmgAwIBAgIBADANBgkqhkiG9w0BAQQFADCBkzELMAkGA1UEBhMCQ0Ex -CzAJBgNVBAgTAkJDMRIwEAYDVQQHEwlWYW5jb3V2ZXIxDzANBgNVBAoTBlRjbGxp -YjELMAkGA1UECxMCQ0ExEjAQBgNVBAMTCVRjbGxpYiBDQTExMC8GCSqGSIb3DQEJ -ARYidGNsbGliLWRldmVsQGxpc3RzLnNvdXJjZWZvcmdlLm5ldDAeFw0wOTA0MDgy -MzAwNThaFw0xOTA0MDYyMzAwNThaMIGTMQswCQYDVQQGEwJDQTELMAkGA1UECBMC -QkMxEjAQBgNVBAcTCVZhbmNvdXZlcjEPMA0GA1UEChMGVGNsbGliMQswCQYDVQQL -EwJDQTESMBAGA1UEAxMJVGNsbGliIENBMTEwLwYJKoZIhvcNAQkBFiJ0Y2xsaWIt -ZGV2ZWxAbGlzdHMuc291cmNlZm9yZ2UubmV0MIGfMA0GCSqGSIb3DQEBAQUAA4GN -ADCBiQKBgQDTjueYUiAfJv5GvYHLk9zFUuULiNA//9upuyWGF8m0D59xvFIVNjef -PxFgs/N0gtdCpYjTkEKFfFqdINai8k2L6UWvIObEuXncT4nw8cVVnETZ9HC1JHii -Rce2sU0oiegsxJstPtpdN3kEfiDvj8DNf9G+u4MZAlKhFNgkeuMJHQIDAQABozIw -MDAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTKaSeFZLwMxjeljk7fD9XQ/rTf -HDANBgkqhkiG9w0BAQQFAAOBgQAsFSZ6XM8Dzf4HnJhY76goMn/5NJ2UhDc3WQ2C -5TBIYnoqbvok/DblrH0K+7HFcbny0s4dxSSFHzj8XkVx1PbR0nrENw6O/XY8FV8r -KYiArrO9mzZUq/kkLIE78tGDejx3w0oJvn28yDb+eYQE1crBA3Rkl8hSaN+1HETZ -w054KQ== +MIIDFDCCAn2gAwIBAgIJALvS+VMxTUfNMA0GCSqGSIb3DQEBBQUAMIGxMQswCQYD +VQQGEwJDQTEZMBcGA1UECBMQQnJpdGlzaCBDb2x1bWJpYTESMBAGA1UEBxMJVmFu +Y291dmVyMRUwEwYDVQQKEwx0Y2xsaWItZGV2ZWwxFTATBgNVBAsTDHRjbGxpYi1k +ZXZlbDESMBAGA1UEAxMJdGNsbGliIENBMTEwLwYJKoZIhvcNAQkBFiJ0Y2xsaWIt +ZGV2ZWxAbGlzdHMuc291cmNlZm9yZ2UubmV0MB4XDTExMTEwOTA0NTQwOVoXDTIx +MTEwNjA0NTQwOVowgbExCzAJBgNVBAYTAkNBMRkwFwYDVQQIExBCcml0aXNoIENv +bHVtYmlhMRIwEAYDVQQHEwlWYW5jb3V2ZXIxFTATBgNVBAoTDHRjbGxpYi1kZXZl +bDEVMBMGA1UECxMMdGNsbGliLWRldmVsMRIwEAYDVQQDEwl0Y2xsaWIgQ0ExMTAv +BgkqhkiG9w0BCQEWInRjbGxpYi1kZXZlbEBsaXN0cy5zb3VyY2Vmb3JnZS5uZXQw +gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAL9Z71NHdoHSe6vKYxP1JG/OpmW4 +Dbem0w2O/6n9ogvqH1eJyJahVuX8JEI1wop0uxTsQfNPsfxcKdV0Neigvv5p45q6 +QWniB/kGSJOUrR/h9Phx9GgBYeZTIe3TpoueHBSES0U1J5rveIMZoLzok6vgRXX0 +FexgKEyEERFWF1YTAgMBAAGjMjAwMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE +FJKb0nMMzUUPUcUZ02zvJ1yfQV7jMA0GCSqGSIb3DQEBBQUAA4GBAGV5l+0nDZMu +eWWQSH34wmyWUs6HiLF3txBwYw5E8XxD6EzibF1YnwZ4hUGdtyn7l1bt6CQ+Ifg/ +g5xabpzUvfzQid86W2MDFDYciYgwAQxqy4z/JQ6ALgalEs5+rjnd4YTaJS/Aci1J +zbjdUowzW21sysIgl5XgCcUaFjHdvavP -----END CERTIFICATE----- diff -Nru tcllib-1.13-dfsg/modules/devtools/ca.key tcllib-1.14-dfsg/modules/devtools/ca.key --- tcllib-1.13-dfsg/modules/devtools/ca.key 2011-01-25 05:37:58.000000000 +0000 +++ tcllib-1.14-dfsg/modules/devtools/ca.key 2011-12-13 18:13:23.000000000 +0000 @@ -1,18 +1,18 @@ -----BEGIN RSA PRIVATE KEY----- Proc-Type: 4,ENCRYPTED -DEK-Info: DES-EDE3-CBC,8FBCCB6E70CE5019 +DEK-Info: DES-EDE3-CBC,28DE93A2CCA112AF -VmPSxAwUNOf2hHlakqB8KRarXwJvVcajQzRl2arzkP5VfExoOYwTJHR00g4bAosQ -JZ29GSXN4nqfrA7l2CXW86ZzeAhHwDp7ZB0ZaARhYH7qQ1187H3/RccmM/cfeYsA -fnCAn2GvNkrBPuQu6xsaC8/2EK3sUJERqXQdXRY2yCVD8IBfGKn99J3XKjZbZxP4 -hMCFsv/gdwEWBwdpSXOtw6LkefBCOUS5VQ+PmVxHoUXJG/jy8b4KZFYL/xS06uPz -2sE7l5yXKRna959aO6em8h1f+81V+jiTEz6wJpSRV1UkBFmUWvxze8n6G7kpyanK -rQGF9V4RlWbcj4xjpSvzWR0DwbPT56rxvtRW14fG2SvRZEMJy51fDhxfvivX8cvq -u2jLgTneqhfxsVubWcuAyNEwSVMOKiP0IuaEhKgstJUN0M6WfoDRBvGfp60OHquT -dbR477p4cK6Xq0v07Y0y/KIoULZdyWgA4A7LaclVpvurl0mTASELacqr6g9YXpB7 -sOQBp0JAEleSBr14N9rN6HMz8mHO9aMJTXfVBkpW3+6IHk9+l/zQPZJjZD7isA7U -hLYVDVRDa5aBvAZ6cD1pKOWpGRvOznrmFossxFFWgPEs5RUm8w7a0z3wW2ja5boM -ch45je1NaN3jJlRgic60tfP43dcFBnV32SUNYfJ5AAgA7hKkXN6taJHvAt3YHyHq -we1NgNXC9adZimDrDh0c7h0+xuR/BfUotA67Z2Ocdcd9dL9/0Mv8WnHfu/KnV0AP -2wjy/p+zZGEdmzQ3ffSUTXsPm1GAPMYJh3c4qXMSKbqahiPdDq+5JQ== +K88RXSHCYMtr9iSKY561I66skRMTQC+0nCFq4rB22X9ltPdEq/LgJ/AQPAROEXDg +/ZmKcxGAEojqhjuSEffUESh0/jAImqLV3jagdWgBhYY0oFQN7eRUvJ+w0CDQzWn1 +7PavmQRFaGl7O8hd+XBzYxJiwFgIdt4WSNFzwywvNhE4tTvtVIAK32X3UmMJiXlZ +NCUGgxTRBuZlkv5VaWL/9pejvcjxu8ptnhhWbr+j9YrwA7NE6ByCfGxdoLxFxsF0 +jpDMa6iut0a3iljwG8x2xwrrRlymalcL2B0LgkS5wuupuV+U7qKTiie6bjcuzNbm +YSGIwZzb+nm16UK2BFL3LFAHT1yKeqT789YtTroqaMgr3UJUjBzmU0/3FLpWDVgt +eqQLnEWss7a4UatWZIu/4FDWXL6yXDjJjVXIj9K3e8u/ZU76jW02DirdsqUpHrBt +kccN5gH6lB4X/Fv8TSFeGANoMwtdQz34ftNsjGKjm533VsopgwaKNrgoE6Ja6rP6 +ZUx5QHz5na7u7ZofB6ygoxLqgmusp2OdOmcnw0NCGKPxfijKBA0S8Z7tfwPKMZ/2 +tv5EqaXztZcDPWSS1u3nwHi4DOJ15xae4Yh8H5v+u0Y07xnk/dcpt0GjjRExsmr2 +ARxKyDXiupVAJl8IK9q2CVPT69jfvKSrVUV9OflhEmXFfPuOvEfJxSLSJiQ4xikk +R1ZDKbMSnYBS5tEYkeTZxZpVYmnNLn9nvCjy499SQ5y0bXd1tG5Cve+ZMhzKCAc7 +wFPsWgIuZY/veewe1asBAKXgHmWOlhMc3RW73B3riEI= -----END RSA PRIVATE KEY----- diff -Nru tcllib-1.13-dfsg/modules/devtools/ChangeLog tcllib-1.14-dfsg/modules/devtools/ChangeLog --- tcllib-1.13-dfsg/modules/devtools/ChangeLog 2011-01-25 05:37:58.000000000 +0000 +++ tcllib-1.14-dfsg/modules/devtools/ChangeLog 2011-12-13 18:13:23.000000000 +0000 @@ -1,3 +1,25 @@ +2011-11-09 Andreas Kupries + + * testutilities.tcl: Fixed typos, one still breaking 'testsNeed'. + +2011-11-08 Andreas Kupries + + * testutilities.tcl: Fixed 'testsNeed' command to require the + needed package and abort properly when it is not found. + + * transmitter.crt: [Bug 3433470] Regenerated the certificates. + * transmitter.key: Expiry is Nov 2012. SimpleCA doesn't seem + * receiver.crt: to allow me to specify a longer period. :( + * receiver.key: Updated README. + * ca.crt: + * ca.key: + * README: + +2011-11-07 Andreas Kupries + + * testutilities.tcl: Added new constraint to identify core version + upto Tcl 8.5, but not higher. + 2011-01-20 Andreas Kupries * testutilities.tcl (useTcllibC): Account for the possibility of diff -Nru tcllib-1.13-dfsg/modules/devtools/README tcllib-1.14-dfsg/modules/devtools/README --- tcllib-1.13-dfsg/modules/devtools/README 2011-01-25 05:37:58.000000000 +0000 +++ tcllib-1.14-dfsg/modules/devtools/README 2011-12-13 18:13:23.000000000 +0000 @@ -14,9 +14,8 @@ even if the module and its code gets installed it won't be useable without jumping through some hoops. -The code is used in some of the tcllib testsuites. Well, one actually, -currently, "pop3". - +The code is used in some of the tcllib testsuites. +Currently: "comm", and "pop3". These certificates have been created with SimpleCA, see http://wiki.tcl.tk/11419 diff -Nru tcllib-1.13-dfsg/modules/devtools/receiver.crt tcllib-1.14-dfsg/modules/devtools/receiver.crt --- tcllib-1.13-dfsg/modules/devtools/receiver.crt 2011-01-25 05:37:58.000000000 +0000 +++ tcllib-1.14-dfsg/modules/devtools/receiver.crt 2011-12-13 18:13:23.000000000 +0000 @@ -1,19 +1,19 @@ -----BEGIN CERTIFICATE----- -MIIDGTCCAoKgAwIBAgICEAIwDQYJKoZIhvcNAQEEBQAwgZMxCzAJBgNVBAYTAkNB -MQswCQYDVQQIEwJCQzESMBAGA1UEBxMJVmFuY291dmVyMQ8wDQYDVQQKEwZUY2xs -aWIxCzAJBgNVBAsTAkNBMRIwEAYDVQQDEwlUY2xsaWIgQ0ExMTAvBgkqhkiG9w0B -CQEWInRjbGxpYi1kZXZlbEBsaXN0cy5zb3VyY2Vmb3JnZS5uZXQwHhcNMDkwNDA4 -MjMyMTQ3WhcNMTAwNDA4MjMyMTQ3WjCBpjELMAkGA1UEBhMCQ0ExCzAJBgNVBAgT -AkJDMRIwEAYDVQQHEwlWYW5jb3V2ZXIxDzANBgNVBAoTBlRjbGxpYjEfMB0GA1UE -CxMWVHJhbnNmZXIgRGVtbyBSZWNlaXZlcjERMA8GA1UEAxMIcmVjZWl2ZXIxMTAv -BgkqhkiG9w0BCQEWInRjbGxpYi1kZXZlbEBsaXN0cy5zb3VyY2Vmb3JnZS5uZXQw -gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAL9vjkiEPy1JSKigwq6hFRlL2fqc -mrsNBwG87CYVLa294JG3I6p3ndlsaTZf2NO7tvUmoeaJKZpunz6LCai4PNizzzqn -riVm+vuzm7NWAbo6X/HL32ZrMgAaVjYEfV+K+ShF/mQFhz2Q1JoaoscGXv0JpMka -FFRlrFTwvVe+2L8BAgMBAAGjZzBlMB8GA1UdIwQYMBaAFMppJ4VkvAzGN6WOTt8P -1dD+tN8cMDQGA1UdJQQtMCsGCCsGAQUFBwMBBggrBgEFBQcDAgYKKwYBBAGCNwoD -AwYJYIZIAYb4QgQBMAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQEEBQADgYEAI+VT -Qr2LvhhMfuoPRP2O/dY3iQbVekLniwJc5FIrtrTx/2Y9BzxJAYiBeSeDdO+Y1ZaI -AJXO3a9wT8Wj9tlp9g3tDjb1qKBpcDgDYHyY/JB2rkuFaUe95FFES0n+EmiEYkhG -JFal2lPiP9vwKyskRevg0hY4AHiu7tnbTOdF8II= +MIIDJzCCApCgAwIBAgICEAEwDQYJKoZIhvcNAQEEBQAwgbExCzAJBgNVBAYTAkNB +MRkwFwYDVQQIExBCcml0aXNoIENvbHVtYmlhMRIwEAYDVQQHEwlWYW5jb3V2ZXIx +FTATBgNVBAoTDHRjbGxpYi1kZXZlbDEVMBMGA1UECxMMdGNsbGliLWRldmVsMRIw +EAYDVQQDEwl0Y2xsaWIgQ0ExMTAvBgkqhkiG9w0BCQEWInRjbGxpYi1kZXZlbEBs +aXN0cy5zb3VyY2Vmb3JnZS5uZXQwHhcNMTExMTA5MDUwMzU3WhcNMTIxMTA4MDUw +MzU3WjCBljELMAkGA1UEBhMCQ0ExGTAXBgNVBAgTEEJyaXRpc2ggQ29sdW1iaWEx +EjAQBgNVBAcTCVZhbmNvdXZlcjEVMBMGA1UEChMMdGNsbGliLWRldmVsMRUwEwYD +VQQLEwx0Y2xsaWItZGV2ZWwxETAPBgNVBAMTCHJlY2VpdmVyMRcwFQYJKoZIhvcN +AQkBFghyZWNlaXZlcjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAt5fri/9h +FFKEQtIRX4bzot0WBlMjHm4v6nR0yMfMWp2J/Sf5qaDy/WXso7pyiM3lblIO+Y44 +TMuoq6eATxe/eJW2plu36b4sEgRJPN5cW33bccDSRz2yV4jLk/1DBAHUvi1pi1zb +ELr5t5A6LBngZM5AxT2hVCcfE1Lp9udA6DsCAwEAAaNnMGUwHwYDVR0jBBgwFoAU +kpvScwzNRQ9RxRnTbO8nXJ9BXuMwNAYDVR0lBC0wKwYIKwYBBQUHAwEGCCsGAQUF +BwMCBgorBgEEAYI3CgMDBglghkgBhvhCBAEwDAYDVR0TAQH/BAIwADANBgkqhkiG +9w0BAQQFAAOBgQAX8KuTvZSjZ5Kei+P5P/sJhZhXqExUidm8aR1yXyTC+VXiQXnP +wVkdlOyYoQlGOAQrbZrnuAfZzg+j1+I2DUZIRVjJj0Inbq2M8Z8Om7TSoCdUt06q +YyuH+YYANbHCu+LB1pvzaA3/xsms+KxQZuZhCgMqq+A/sukqsqDPUHRACg== -----END CERTIFICATE----- diff -Nru tcllib-1.13-dfsg/modules/devtools/receiver.key tcllib-1.14-dfsg/modules/devtools/receiver.key --- tcllib-1.13-dfsg/modules/devtools/receiver.key 2011-01-25 05:37:58.000000000 +0000 +++ tcllib-1.14-dfsg/modules/devtools/receiver.key 2011-12-13 18:13:23.000000000 +0000 @@ -1,15 +1,15 @@ -----BEGIN RSA PRIVATE KEY----- -MIICXAIBAAKBgQC/b45IhD8tSUiooMKuoRUZS9n6nJq7DQcBvOwmFS2tveCRtyOq -d53ZbGk2X9jTu7b1JqHmiSmabp8+iwmouDzYs886p64lZvr7s5uzVgG6Ol/xy99m -azIAGlY2BH1fivkoRf5kBYc9kNSaGqLHBl79CaTJGhRUZaxU8L1Xvti/AQIDAQAB -AoGADJbzjoVT+lB1fNGFvCJP1ugMH9Uov+Btc4nPJfoClQiFuk+HAvD26pOcn7zR -76rKr3io8RZYLBXWVzCho/zp02FxKf2BcB1Wnm2ZBZAo+yKRu7T/R0bcam+Ye3oP -JrEapCZ2T0262O/q15b932ad/n0J1D5vYoO6hzmp5TwtTVkCQQDgGAUpcabDp7Op -ujk2rvPpyr7LSZgGwYFUgE/94NMT1zB7+LpPcI/VuHgfMnaON8UIuQOZq2tO2iYl -le+6D3NvAkEA2rEvKEOGq3p/Q8QQ638+zFBmwLwKnMQMfiYFPIGoIQwJEUVZpGEf -XvByLXuTjv9bdia8Vrw/RGA0AlOLS8r8jwJAf0nllLbzzOszSFN5MDCMZ948Jei1 -rBC6T69awJC2FO0Eo0aTPZBogzN3N/FIGlxfVScSfnU6TN3pESxrsToZjQJBAI+f -6CmYV3yNAcHepYIUWojSkPkpRgr40n+StsOrH2E8x0O5eQr04iZ24XWvgBRc7pNl -EzIfhamBSQbyGTyYvk8CQE7MWEKNaBMpFwHjIF+7gYoeudd2hcPNv7gMAsDvXNu2 -ltbqMhSNjmfdXiAbztWAqQ0jTgfGGp/orYkbltbzbGg= +MIICXgIBAAKBgQC3l+uL/2EUUoRC0hFfhvOi3RYGUyMebi/qdHTIx8xanYn9J/mp +oPL9ZeyjunKIzeVuUg75jjhMy6irp4BPF794lbamW7fpviwSBEk83lxbfdtxwNJH +PbJXiMuT/UMEAdS+LWmLXNsQuvm3kDosGeBkzkDFPaFUJx8TUun250DoOwIDAQAB +AoGAGuPuhSfXkUFwy9S25LYAc2dMdYqxxyA+dmmuPUY+YTtX3bOANt8zF/hYy7Zg +VjdKFnmAZf71shHWV6YF/g+tZH1lDuu4DrybseLHu4fe4tC4b6D56gdILERM6ugw +OggquaWTJ/mEhmP/TPs9h12nhTkZ8tCNO0QPMS1ZL4BbuCECQQDo/b9J1CQY2ZU/ +YJGtpVemVRFtxaXh5nYa2FXtFsGhkUuVj1tgswDQGmY56XrlCXv8TsgilnKkcouY +wKwa9ugrAkEAyblY+yQqpuJbGYO3cTDE90E9YF6cr6qb8WYg/Zt93XTRV3o+J7iW +GqwWFwPXZGTmndry0xZM37Yf9/itg4doMQJBAKuHzOHUzfKBlfB/7yBxXxM1A8zW +O2cRnZfr927CVzHU31mvni2V+546IVK3guPGVMKPWaalLqfFMOL3zn1Xk9sCQQC6 +zUHiJ0a8DedQxFHOptvvH+IHaPXuEq6gJ/QrBZ/TwQbO3CvMurl975fxLiR7GpkY +2xV8di0wCUanagi8QVsxAkEAoYdBu3R7zh13K6I+GdXt37MhPnHmbRvrIvjGqd9/ +t3x0Gaw9//0GwTvzwMxCsOKsvUFTvEUspXW60/jVVQTBkA== -----END RSA PRIVATE KEY----- diff -Nru tcllib-1.13-dfsg/modules/devtools/testutilities.tcl tcllib-1.14-dfsg/modules/devtools/testutilities.tcl --- tcllib-1.13-dfsg/modules/devtools/testutilities.tcl 2011-01-25 05:37:58.000000000 +0000 +++ tcllib-1.14-dfsg/modules/devtools/testutilities.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -45,7 +45,7 @@ # testsuite. If the minimum is not met by the loaded package we # forcibly bail out of the testsuite calling the command. The # command has to be called after loading the utilities. The only - # command allowed to come before it is 'textNeedTcl' above. + # command allowed to come before it is 'testNeedTcl' above. # Note that this command will try to load a suitable version of # Tcltest if the package has not been loaded yet. @@ -77,7 +77,16 @@ # testsuite calling the command. The command has to be called # immediately after loading the utilities. - if {[package vsatisfies [package provide $name] $version]} return + if {[catch { + package require $name $version + }]} { + puts " Aborting the tests found in \"[file tail [info script]]\"" + puts " Requiring at least $name $version, package not found." + + return -code return + } + + if {[package vsatisfies [package present $name] $version]} return puts " Aborting the tests found in \"[file tail [info script]]\"" puts " Requiring at least $name $version, have [package present $name]." @@ -197,6 +206,9 @@ ::tcltest::testConstraint tcl8.4minus \ [expr {![package vsatisfies [package provide Tcl] 8.5]}] + ::tcltest::testConstraint tcl8.5minus \ + [expr {![package vsatisfies [package provide Tcl] 8.6]}] + # ### ### ### ######### ######### ######### ## Cross-version code for the generation of the error messages created ## by Tcl procedures when called with the wrong number of arguments, diff -Nru tcllib-1.13-dfsg/modules/devtools/transmitter.crt tcllib-1.14-dfsg/modules/devtools/transmitter.crt --- tcllib-1.13-dfsg/modules/devtools/transmitter.crt 2011-01-25 05:37:58.000000000 +0000 +++ tcllib-1.14-dfsg/modules/devtools/transmitter.crt 2011-12-13 18:13:23.000000000 +0000 @@ -1,19 +1,20 @@ -----BEGIN CERTIFICATE----- -MIIDHzCCAoigAwIBAgICEAAwDQYJKoZIhvcNAQEEBQAwgZMxCzAJBgNVBAYTAkNB -MQswCQYDVQQIEwJCQzESMBAGA1UEBxMJVmFuY291dmVyMQ8wDQYDVQQKEwZUY2xs -aWIxCzAJBgNVBAsTAkNBMRIwEAYDVQQDEwlUY2xsaWIgQ0ExMTAvBgkqhkiG9w0B -CQEWInRjbGxpYi1kZXZlbEBsaXN0cy5zb3VyY2Vmb3JnZS5uZXQwHhcNMDkwNDA4 -MjMwNDU4WhcNMTAwNDA4MjMwNDU4WjCBrDELMAkGA1UEBhMCQ0ExCzAJBgNVBAgT -AkJDMRIwEAYDVQQHEwlWYW5jb3V2ZXIxDzANBgNVBAoTBlRjbGxpYjEiMCAGA1UE -CxMZVHJhbnNmZXIgRGVtbyBUcmFuc21pdHRlcjEUMBIGA1UEAxMLdHJhbnNtaXR0 -ZXIxMTAvBgkqhkiG9w0BCQEWInRjbGxpYi1kZXZlbEBsaXN0cy5zb3VyY2Vmb3Jn -ZS5uZXQwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANQ+caWNSxm4zW9YlRGl -K9b/y78IhRZ6RmO7hr+5p7b6WdNR56FvpmDKR9eWus//9mRRnLOBiFKmn64r9jo5 -h5Bmm7Pwfs0THSOvcTua6khkXtaQh8/56a3M2c8B8YF7D6qV8AVENN7B1AuZdaUC -e2uPctaGT2KeysUxu0Jilt9hAgMBAAGjZzBlMB8GA1UdIwQYMBaAFMppJ4VkvAzG -N6WOTt8P1dD+tN8cMDQGA1UdJQQtMCsGCCsGAQUFBwMBBggrBgEFBQcDAgYKKwYB -BAGCNwoDAwYJYIZIAYb4QgQBMAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQEEBQAD -gYEAni1FgVSxnkh4Q2HSKgci3CtgFj5wGttkF5Zm7hjF+4OLuXBQBh3bm5u4SrFV -23xFnGOTVFBknQ8RRiEnIwOEnckcuQvoNuk3gbyrGoxEX0sEB+1WZzYePFr6qnZ2 -ts67kvO7PzFatH/5UjQ73kmkT2VHqY2FJ794tXxmriryUOw= +MIIDLTCCApagAwIBAgICEAIwDQYJKoZIhvcNAQEEBQAwgbExCzAJBgNVBAYTAkNB +MRkwFwYDVQQIExBCcml0aXNoIENvbHVtYmlhMRIwEAYDVQQHEwlWYW5jb3V2ZXIx +FTATBgNVBAoTDHRjbGxpYi1kZXZlbDEVMBMGA1UECxMMdGNsbGliLWRldmVsMRIw +EAYDVQQDEwl0Y2xsaWIgQ0ExMTAvBgkqhkiG9w0BCQEWInRjbGxpYi1kZXZlbEBs +aXN0cy5zb3VyY2Vmb3JnZS5uZXQwHhcNMTExMTA5MDUwODU0WhcNMTIxMTA4MDUw +ODU0WjCBnDELMAkGA1UEBhMCQ0ExGTAXBgNVBAgTEEJyaXRpc2ggQ29sdW1iaWEx +EjAQBgNVBAcTCVZhbmNvdXZlcjEVMBMGA1UEChMMdGNsbGliLWRldmVsMRUwEwYD +VQQLEwx0Y2xsaWItZGV2ZWwxFDASBgNVBAMTC3RyYW5zbWl0dGVyMRowGAYJKoZI +hvcNAQkBFgt0cmFuc21pdHRlcjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA +wr2eBXuOeu8X9DeTkeu/ENPybx1AdvhcuqSIt1zlQpw29gZthpBjLwLExrta9ue5 +l4PoMt3fm7Omz2tycJZGJdD/g/6704ABeRMFe8pojTL8bCxyjJ2X0fEUQG1DNIzn +BpT01mhOafWJJunC+sfPSOMfpHXnuRXJXxSPo8XTYeUCAwEAAaNnMGUwHwYDVR0j +BBgwFoAUkpvScwzNRQ9RxRnTbO8nXJ9BXuMwNAYDVR0lBC0wKwYIKwYBBQUHAwEG +CCsGAQUFBwMCBgorBgEEAYI3CgMDBglghkgBhvhCBAEwDAYDVR0TAQH/BAIwADAN +BgkqhkiG9w0BAQQFAAOBgQBfhrIKQS8YMVv9BWsh7eoofYrEvuiqWQMg2u1y//sH +RNrAKDPCKlnpmf1/nRwCWVVzFIFzfGs8WZPBpQhB/3Ff9Qw/aCJ65ShQxyRKvQ05 +dHpvV8Sta8jC0b82ceBGkZzhOmkrZoIWgwRy/AqxAks31zBkp+i6fX6vLE/e+FfL +rg== -----END CERTIFICATE----- diff -Nru tcllib-1.13-dfsg/modules/devtools/transmitter.key tcllib-1.14-dfsg/modules/devtools/transmitter.key --- tcllib-1.13-dfsg/modules/devtools/transmitter.key 2011-01-25 05:37:58.000000000 +0000 +++ tcllib-1.14-dfsg/modules/devtools/transmitter.key 2011-12-13 18:13:23.000000000 +0000 @@ -1,15 +1,15 @@ -----BEGIN RSA PRIVATE KEY----- -MIICWwIBAAKBgQDUPnGljUsZuM1vWJURpSvW/8u/CIUWekZju4a/uae2+lnTUeeh -b6ZgykfXlrrP//ZkUZyzgYhSpp+uK/Y6OYeQZpuz8H7NEx0jr3E7mupIZF7WkIfP -+emtzNnPAfGBew+qlfAFRDTewdQLmXWlAntrj3LWhk9insrFMbtCYpbfYQIDAQAB -AoGAElzMrEwLIVCRxX5ed0ZZAqLi18Y+7XDqwhopUFEZp4UFXHkLlzX3qQwXJxnN -U82LXaaJ7iXYy33K9uCqzuLHTZiE2LFFmPPZeF4AQ2Pyoe6Go6MMZsU2mT1H9ehZ -VbNVrATNdtKzC1jWeWHHKwzqiK8M9kXyAvXGeFfrDW3IaxkCQQD5x79JIpzTX9qE -ujlpc9YJOuTA3tkQfCB2Wiadalrt+ZoQ6gFi/8wqzgOmBwessw4yJf2ufBeqgrBY -ReCP779vAkEA2YdqwrU2xom2/sz6mTdVIwnXL9PddvTNATOSWHZDJVwqmEfcUi2q -esSNw4xgSeHBy+73O68hyYFTf/+pHzvmLwJASicCorOj2xyZws2GPcglwpe5UYjW -6A3xlTEuRY1NcVioZF0UDE/kTNDcRG3R2XNOw5SDu0kbvYMO1yXnhNOoAQJAHQvO -/qbR5JrY+5cFU1YnISGcQT+qD8tKYIGxZeyMtL1k1qapzbNZU0FRqK3i4ZqqlP+Y -tbiB63VAYBQUUh5ecwJAbxqE01ihcov1HXlY2cPXkrj9ssRULFsZ6zJK22PaEomI -exVu/dCOVaOv+FqMII7nh2G++VEOe1mapjbvxTYsHA== +MIICXgIBAAKBgQDCvZ4Fe4567xf0N5OR678Q0/JvHUB2+Fy6pIi3XOVCnDb2Bm2G +kGMvAsTGu1r257mXg+gy3d+bs6bPa3JwlkYl0P+D/rvTgAF5EwV7ymiNMvxsLHKM +nZfR8RRAbUM0jOcGlPTWaE5p9Ykm6cL6x89I4x+kdee5FclfFI+jxdNh5QIDAQAB +AoGBAKIkzTjVaomTH8e4qoc52alCP74ihfVIz7SboDXEBCNU/DIWogUDnYGb9Yle +n9uqjw3Hx4Lq1+7FQ2O6m9uAU8Bd+hlOk4gXcDrsLFxryrmGd3cDLbH6OSEjO8Dj +SRmPYQmpFEN37OU9kp3FjTmlCX0XuvGditbvswnSuXVyFlchAkEA8TSvGTSFaqvw +DQF8GqwKj7WhYD0VLY3K4Pb6uSD2+Q6D/mgo6EQPAjX1WBLRpt5PjpEZOIAQBVbX +RZI6x3nM/QJBAM6vW2OHQ6xPI5nnYMHV3cOjbr4+YmMqTaPOrhbCE0biRw/hhUUT +gyPkUEYnwnfuG1oVTOR7AEpYVeRu7dgl8QkCQQDBI5t1hk2yjbyo3WB/hvTp/9kZ +U6/qixhBrOI0bQX1hb8BbmwbF6wg7A3pmSARCwAPO3ZDfJ/XdqLnjWDNq2UNAkBy +GfTF2WLOuVHaIRYVbE/lNVBpzl7ah/wctnj9L18c/sZkSggcvkzjf6OhV0nQk66d +6KxuZkkewe2JEoRTk36hAkEAwCHS1FFC53Mrknxwa7nXK6kByYmbYq272PuB2Xgq +VcEUBRQQ3FbfOCYqxtFHvPOza1eTJVjyMCFVOOkk9nLGsQ== -----END RSA PRIVATE KEY----- diff -Nru tcllib-1.13-dfsg/modules/dns/ChangeLog tcllib-1.14-dfsg/modules/dns/ChangeLog --- tcllib-1.13-dfsg/modules/dns/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/dns/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/docstrip/ChangeLog tcllib-1.14-dfsg/modules/docstrip/ChangeLog --- tcllib-1.13-dfsg/modules/docstrip/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/docstrip/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/doctools/ChangeLog tcllib-1.14-dfsg/modules/doctools/ChangeLog --- tcllib-1.13-dfsg/modules/doctools/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/doctools/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,40 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + +2011-11-07 Andreas Kupries + + * tests/nroff/04: Updated the test outputs to match the changes + * tests/nroff/07: introduced by the last two commits, below. + * tests/nroff/08: + +2011-02-23 Andreas Kupries + + * mpformats/fmt.nroff: Moved the handling of the list nesting + * mpformats/_nroff.tcl: level a bit around to be consistent at + * checker.tcl: both begin and end. Fixed the long-standing + indentation bug where the rendered text got unindented after a + nested list or example. We simply had to start indented + paragraphs, via .IP after them, and for each paragraph in a list + element. This needed the consistent nesting level to correctly + know when to emit the commands. And while this may generate + empty paragraphs, these can be removed easily in the + post-processing. + * doctools.tcl: Bumped version to 1.4.13. + * doctools.man: + * pkgIndex.tcl: + +2011-02-23 Andreas Kupries + + * mpformats/_nroff.tcl (nr_ce): [Bug 3167244]: Added \n after .CE + to prevent misformatting when examples are used in a sentence + without placement on a separate line of input. + * doctools.tcl: Bumped version to 1.4.12. + * doctools.man: + * pkgIndex.tcl: + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/doctools/checker.tcl tcllib-1.14-dfsg/modules/doctools/checker.tcl --- tcllib-1.13-dfsg/modules/doctools/checker.tcl 2011-01-25 05:38:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/doctools/checker.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -387,8 +387,9 @@ if {[LOpen] && ![LItem]} {Error nolisthdr} set what [LMap $what] if {![LValid $what]} {Error invalidlist $what} + set res [fmt_list_begin $what $hint] LPush $what - fmt_list_begin $what $hint + return $res } proc list_end {} { Enter list_end diff -Nru tcllib-1.13-dfsg/modules/doctools/doctools.man tcllib-1.14-dfsg/modules/doctools/doctools.man --- tcllib-1.13-dfsg/modules/doctools/doctools.man 2011-01-25 05:38:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/doctools/doctools.man 2011-12-13 18:13:23.000000000 +0000 @@ -1,11 +1,11 @@ [comment {-*- tcl -*- doctools manpage}] -[manpage_begin doctools n 1.4.11] -[copyright {2003-2010 Andreas Kupries }] +[manpage_begin doctools n 1.4.13] +[copyright {2003-2011 Andreas Kupries }] [moddesc {Documentation tools}] [titledesc {doctools - Processing documents}] [category {Documentation tools}] [require Tcl 8.2] -[require doctools [opt 1.4.11]] +[require doctools [opt 1.4.13]] [description] This package provides a class for the creation of objects able to diff -Nru tcllib-1.13-dfsg/modules/doctools/doctools.tcl tcllib-1.14-dfsg/modules/doctools/doctools.tcl --- tcllib-1.13-dfsg/modules/doctools/doctools.tcl 2011-01-25 05:38:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/doctools/doctools.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -2,12 +2,12 @@ # # Implementation of doctools objects for Tcl. # -# Copyright (c) 2003-2010 Andreas Kupries +# Copyright (c) 2003-2011 Andreas Kupries # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: doctools.tcl,v 1.43 2010/11/24 04:14:43 andreas_kupries Exp $ +# RCS: @(#) $Id: doctools.tcl,v 1.45 2011/02/23 22:11:59 andreas_kupries Exp $ package require Tcl 8.2 package require textutil::expander @@ -1337,4 +1337,4 @@ catch {search [file join $here mpformats]} } -package provide doctools 1.4.11 +package provide doctools 1.4.13 diff -Nru tcllib-1.13-dfsg/modules/doctools/mpformats/fmt.nroff tcllib-1.14-dfsg/modules/doctools/mpformats/fmt.nroff --- tcllib-1.13-dfsg/modules/doctools/mpformats/fmt.nroff 2011-01-25 05:38:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/doctools/mpformats/fmt.nroff 2011-12-13 18:13:23.000000000 +0000 @@ -2,7 +2,7 @@ # # -- doctools NROFF formatting engine. # -# Copyright (c) 2001-2010 Andreas Kupries +# Copyright (c) 2001-2011 Andreas Kupries # # [expand] definitions to convert a tcl based manpage definition into # a manpage based upon *roff markup. Additional definition files allow @@ -103,18 +103,21 @@ proc fmt_section {name {id {}}} {return [nr_section $name]} proc fmt_subsection {name {id {}}} {return [nr_subsection $name]} -proc fmt_para {} {nr_p} +proc fmt_para {} { + if {[dt_lnesting]} { return [nr_item] } + nr_p +} c_pass 2 fmt_require {pkg {version {}}} NOP c_pass 1 fmt_require {pkg {version {}}} { if {$version != {}} {set version " $version"} - c_hold synopsis "package require [nr_bld]$pkg $version[nr_rst]\n[fmt_nl]" + c_hold synopsis "package require [nr_bld]$pkg $version[nr_rst]\n[nr_vspace]" } -c_pass 1 fmt_usage {cmd args} {c_hold synopsis "$cmd [join $args " "]\n[fmt_nl]"} +c_pass 1 fmt_usage {cmd args} {c_hold synopsis "$cmd [join $args " "]\n[nr_vspace]"} c_pass 2 fmt_usage {cmd args} NOP -c_pass 1 fmt_call {cmd args} {c_hold synopsis "$cmd [join $args " "]\n[fmt_nl]"} +c_pass 1 fmt_call {cmd args} {c_hold synopsis "$cmd [join $args " "]\n[nr_vspace]"} c_pass 2 fmt_call {cmd args} {return "[fmt_lst_item "$cmd [join $args " "]"]"} c_pass 1 fmt_description {id} NOP @@ -136,16 +139,14 @@ proc fmt_list_begin {what {hint {}}} { c_cinit - if {[dt_lnesting] > 1} { - return [nr_in] - } + if {[dt_lnesting]} { return [nr_in] } return {} } proc fmt_list_end {} { c_creset - if {[dt_lnesting] > 0} { - return [nr_out] + if {[dt_lnesting]} { + return [nr_out][nr_item] } else { return [nr_p] } @@ -183,8 +184,15 @@ ################################################################ -proc fmt_example_begin {} { return "\n[nr_cs]\n" } -proc fmt_example_end {} { nr_ce } +proc fmt_example_begin {} { + return [nr_cs]\n +} +proc fmt_example_end {} { + if {[dt_lnesting]} { + return [nr_ce][nr_item] + } + nr_ce +} proc fmt_example {code} { set lines [list "" [nr_cs]] foreach line [split $code "\n"] { @@ -200,8 +208,17 @@ proc fmt_emph {text} {underline $text} proc fmt_opt {text} {return ?$text?} -proc bold {text} {return [nr_bld]$text[nr_rst]} -proc underline {text} {return [nr_ul]$text[nr_rst]} +proc bold {text} { + # .B don't work in .TP (nr_blt) + if {1||[string match *\n* $text]} { + return [nr_bld]$text[nr_rst] + } else { + return [nr_bldt $text] + } +} +proc underline {text} { + return [nr_ul]$text[nr_rst] +} proc fmt_comment {text} { set res [list] diff -Nru tcllib-1.13-dfsg/modules/doctools/mpformats/_nroff.tcl tcllib-1.14-dfsg/modules/doctools/mpformats/_nroff.tcl --- tcllib-1.13-dfsg/modules/doctools/mpformats/_nroff.tcl 2011-01-25 05:38:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/doctools/mpformats/_nroff.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -16,6 +16,7 @@ proc nr_lp {} {return \n.LP} proc nr_ta {{text {}}} {return ".ta$text"} proc nr_bld {} {return \1\\fB} +proc nr_bldt {t} {return "\n.B $t\n"} proc nr_ul {} {return \1\\fI} proc nr_rst {} {return \1\\fR} proc nr_p {} {return \n.PP\n} @@ -34,8 +35,8 @@ proc nr_bolds {} {return \n.BS} proc nr_bolde {} {return \n.BE} proc nr_read {fn} {return [nroffMarkup [dt_read $fn]]} -proc nr_cs {} {return \n.CS} -proc nr_ce {} {return \n.CE} +proc nr_cs {} {return \n.CS\n} +proc nr_ce {} {return \n.CE\n} proc nr_section {name} { if {![regexp {[ ]} $name]} { @@ -152,7 +153,18 @@ } lappend lines $line } + + set lines [join $lines "\n"] + + # Remove superfluous .IP commands (empty paragraph). The first + # identity mapping is there to avoid smashing a man macro + # definition. + set lines [string map [list \ + \n.IP\n..\n \n.IP\n..\n \ + \n.IP\n. \n.] \ + $lines] + # Return the modified result buffer - return [string map $finalMap [join $lines "\n"]] + return [string map $finalMap $lines] } diff -Nru tcllib-1.13-dfsg/modules/doctools/pkgIndex.tcl tcllib-1.14-dfsg/modules/doctools/pkgIndex.tcl --- tcllib-1.13-dfsg/modules/doctools/pkgIndex.tcl 2011-01-25 05:38:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/doctools/pkgIndex.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -1,5 +1,5 @@ if {![package vsatisfies [package provide Tcl] 8.2]} {return} -package ifneeded doctools 1.4.11 [list source [file join $dir doctools.tcl]] +package ifneeded doctools 1.4.13 [list source [file join $dir doctools.tcl]] package ifneeded doctools::toc 1.1.3 [list source [file join $dir doctoc.tcl]] package ifneeded doctools::idx 1.0.4 [list source [file join $dir docidx.tcl]] package ifneeded doctools::cvs 1 [list source [file join $dir cvs.tcl]] diff -Nru tcllib-1.13-dfsg/modules/doctools/tests/nroff/04 tcllib-1.14-dfsg/modules/doctools/tests/nroff/04 --- tcllib-1.13-dfsg/modules/doctools/tests/nroff/04 2011-01-25 05:38:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/doctools/tests/nroff/04 2011-12-13 18:13:23.000000000 +0000 @@ -11,6 +11,7 @@ BEGINNE HIER .CS + Example Block More Lines .CE @@ -18,6 +19,7 @@ .PP .CS + Inlined Example \\ Next Line diff -Nru tcllib-1.13-dfsg/modules/doctools/tests/nroff/07 tcllib-1.14-dfsg/modules/doctools/tests/nroff/07 --- tcllib-1.13-dfsg/modules/doctools/tests/nroff/07 2011-01-25 05:38:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/doctools/tests/nroff/07 2011-12-13 18:13:23.000000000 +0000 @@ -28,10 +28,12 @@ roo gork .RE +.IP bb .IP [3] a .RE +.IP 22 .IP \(bu 3 diff -Nru tcllib-1.13-dfsg/modules/doctools/tests/nroff/08 tcllib-1.14-dfsg/modules/doctools/tests/nroff/08 --- tcllib-1.13-dfsg/modules/doctools/tests/nroff/08 2011-01-25 05:38:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/doctools/tests/nroff/08 2011-12-13 18:13:23.000000000 +0000 @@ -89,6 +89,7 @@ DESCRIPTION ::?Optional?:: .CS + THE ARGUMENT IS USED IN THIS AND/OR THAT MANNER diff -Nru tcllib-1.13-dfsg/modules/doctools2base/ChangeLog tcllib-1.14-dfsg/modules/doctools2base/ChangeLog --- tcllib-1.13-dfsg/modules/doctools2base/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/doctools2base/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/doctools2base/config.tcl tcllib-1.14-dfsg/modules/doctools2base/config.tcl --- tcllib-1.13-dfsg/modules/doctools2base/config.tcl 2011-01-25 05:37:59.000000000 +0000 +++ tcllib-1.14-dfsg/modules/doctools2base/config.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: config.tcl,v 1.1 2009/04/01 04:27:47 andreas_kupries Exp $ +# RCS: @(#) $Id: config.tcl,v 1.2 2011/11/17 08:00:45 andreas_kupries Exp $ # Each object manages a set of configuration variables. @@ -77,5 +77,5 @@ # ### ### ### ######### ######### ######### ## Ready -package provide doctools::config 0 +package provide doctools::config 0.1 return diff -Nru tcllib-1.13-dfsg/modules/doctools2idx/ChangeLog tcllib-1.14-dfsg/modules/doctools2idx/ChangeLog --- tcllib-1.13-dfsg/modules/doctools2idx/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/doctools2idx/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/doctools2idx/import.tcl tcllib-1.14-dfsg/modules/doctools2idx/import.tcl --- tcllib-1.13-dfsg/modules/doctools2idx/import.tcl 2011-01-25 05:38:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/doctools2idx/import.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: import.tcl,v 1.1 2009/04/01 04:28:37 andreas_kupries Exp $ +# RCS: @(#) $Id: import.tcl,v 1.2 2011/11/17 08:00:45 andreas_kupries Exp $ # Each object manages a set of plugins for the conversion of keyword # indices into some textual representation. I.e. this object manages @@ -187,5 +187,5 @@ # ### ### ### ######### ######### ######### ## Ready -package provide doctools::idx::import 0 +package provide doctools::idx::import 0.1 return diff -Nru tcllib-1.13-dfsg/modules/doctools2toc/ChangeLog tcllib-1.14-dfsg/modules/doctools2toc/ChangeLog --- tcllib-1.13-dfsg/modules/doctools2toc/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/doctools2toc/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/doctools2toc/import.tcl tcllib-1.14-dfsg/modules/doctools2toc/import.tcl --- tcllib-1.13-dfsg/modules/doctools2toc/import.tcl 2011-01-25 05:38:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/doctools2toc/import.tcl 2011-12-13 18:13:22.000000000 +0000 @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: import.tcl,v 1.2 2009/11/15 05:50:03 andreas_kupries Exp $ +# RCS: @(#) $Id: import.tcl,v 1.3 2011/11/17 08:00:45 andreas_kupries Exp $ # Each object manages a set of plugins for the conversion of keyword # indices into some textual representation. I.e. this object manages @@ -187,5 +187,5 @@ # ### ### ### ######### ######### ######### ## Ready -package provide doctools::toc::import 0 +package provide doctools::toc::import 0.1 return diff -Nru tcllib-1.13-dfsg/modules/exif/ChangeLog tcllib-1.14-dfsg/modules/exif/ChangeLog --- tcllib-1.13-dfsg/modules/exif/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/exif/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/fileutil/ChangeLog tcllib-1.14-dfsg/modules/fileutil/ChangeLog --- tcllib-1.13-dfsg/modules/fileutil/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/fileutil/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,18 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + +2011-12-02 Andreas Kupries + + * traverse.tcl: Mark directories as 'known' only if we decided + * traverse.man: to recurse into them. Otherwise a link to a + * pkgIndex.tcl: directory we choose to not follow may non- + deterministically prevent us from recursing into the original + directory, depending on the order we encounter them in. Bumped + package version to 0.4.2. + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/fileutil/pkgIndex.tcl tcllib-1.14-dfsg/modules/fileutil/pkgIndex.tcl --- tcllib-1.13-dfsg/modules/fileutil/pkgIndex.tcl 2011-01-25 05:37:59.000000000 +0000 +++ tcllib-1.14-dfsg/modules/fileutil/pkgIndex.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -2,7 +2,7 @@ package ifneeded fileutil 1.14.4 [list source [file join $dir fileutil.tcl]] if {![package vsatisfies [package provide Tcl] 8.3]} {return} -package ifneeded fileutil::traverse 0.4.1 [list source [file join $dir traverse.tcl]] +package ifneeded fileutil::traverse 0.4.2 [list source [file join $dir traverse.tcl]] if {![package vsatisfies [package provide Tcl] 8.4]} {return} package ifneeded fileutil::multi 0.1 [list source [file join $dir multi.tcl]] diff -Nru tcllib-1.13-dfsg/modules/fileutil/traverse.man tcllib-1.14-dfsg/modules/fileutil/traverse.man --- tcllib-1.13-dfsg/modules/fileutil/traverse.man 2011-01-25 05:37:59.000000000 +0000 +++ tcllib-1.14-dfsg/modules/fileutil/traverse.man 2011-12-13 18:13:23.000000000 +0000 @@ -1,10 +1,10 @@ [comment {-*- text -*- doctools manpage}] -[manpage_begin fileutil_traverse n 0.4.1] +[manpage_begin fileutil_traverse n 0.4.2] [moddesc {file utilities}] [titledesc {Iterative directory traversal}] [category {Programming tools}] [require Tcl 8.3] -[require fileutil::traverse [opt 0.4.1]] +[require fileutil::traverse [opt 0.4.2]] [require fileutil] [require control] [description] diff -Nru tcllib-1.13-dfsg/modules/fileutil/traverse.tcl tcllib-1.14-dfsg/modules/fileutil/traverse.tcl --- tcllib-1.13-dfsg/modules/fileutil/traverse.tcl 2011-01-25 05:37:59.000000000 +0000 +++ tcllib-1.14-dfsg/modules/fileutil/traverse.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: traverse.tcl,v 1.7 2009/02/10 18:11:07 andreas_kupries Exp $ +# RCS: @(#) $Id: traverse.tcl,v 1.8 2011/12/02 22:30:34 andreas_kupries Exp $ package require Tcl 8.3 @@ -208,9 +208,9 @@ set norm [fileutil::fullnormalize $f] if {[info exists _known($norm)]} continue - set _known($norm) . if {[Recurse $f]} { + set _known($norm) . lappend _pending $f } } @@ -415,4 +415,4 @@ # ### ### ### ######### ######### ######### ## Ready -package provide fileutil::traverse 0.4.1 +package provide fileutil::traverse 0.4.2 diff -Nru tcllib-1.13-dfsg/modules/ftp/ChangeLog tcllib-1.14-dfsg/modules/ftp/ChangeLog --- tcllib-1.13-dfsg/modules/ftp/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/ftp/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,35 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + +2011-08-09 Andreas Kupries + + * ftp.man: Bumped version to 2.4.11. + * ftp.tcl: + * pkgIndex.tcl: + + * ftp.tcl (::ftp::OpenActiveConn, ::ftp::OpenControlConn): + [Bug 3325112]: Accepted patch by Alexandre Ferrieux + reducing the number of reverse + DNS lookups. + +2011-04-18 Andreas Kupries + + * ftp.tcl (::ftp::__ftp_ls): [Bug 3288793]: Fixed ftp::List + variant used by Tkcon, to not only print the result, but + continue returning it as well, for non-interactive use. Thanks + to Pedro + + * ftp.tcl (::ftp::StateHandler): [Bug 3288977]: Fixed handling of + multi-line replies which are not strictly RFC 959. Thanks to + Shaun Zinck . This partially fixes + [Bug 2813069]. + + * pkgIndex.tcl: Bumped version to 2.4.10. + * ftp.man: + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/ftp/ftp.man tcllib-1.14-dfsg/modules/ftp/ftp.man --- tcllib-1.13-dfsg/modules/ftp/ftp.man 2011-01-25 05:37:59.000000000 +0000 +++ tcllib-1.14-dfsg/modules/ftp/ftp.man 2011-12-13 18:13:23.000000000 +0000 @@ -1,10 +1,10 @@ [comment {-*- tcl -*- doctools manpage}] -[manpage_begin ftp n 2.4.9] +[manpage_begin ftp n 2.4.11] [moddesc {ftp client}] [titledesc {Client-side tcl implementation of the ftp protocol}] [category Networking] [require Tcl 8.2] -[require ftp [opt 2.4.9]] +[require ftp [opt 2.4.11]] [description] diff -Nru tcllib-1.13-dfsg/modules/ftp/ftp.tcl tcllib-1.14-dfsg/modules/ftp/ftp.tcl --- tcllib-1.13-dfsg/modules/ftp/ftp.tcl 2011-01-25 05:37:59.000000000 +0000 +++ tcllib-1.14-dfsg/modules/ftp/ftp.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -13,7 +13,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: ftp.tcl,v 1.47 2008/08/05 20:34:32 andreas_kupries Exp $ +# RCS: @(#) $Id: ftp.tcl,v 1.50 2011/08/09 20:57:01 andreas_kupries Exp $ # # core ftp support: ftp::Open # ftp::Close @@ -274,6 +274,14 @@ # multi_line is not set if the bufline does not match the regexp, # I.e. this keeps the '-' which started this around until the # closing line does match and sets it to space. + } elseif {$number == -1 && [eof $sock]} { + # The reply indicated a multi-line reply, but the + # socket was closed and there were no more lines. + # In that case, keep the current return values. + + # This means the server isn't speaking strict rfc959. + # see section on multi-line replies + break } } @@ -2864,6 +2872,12 @@ return 0 } + # prepare local ip address for PORT command (convert pointed format + # to comma format) + + set ftp(LocalAddr) [lindex [fconfigure $ftp(CtrlSock) -sockname] 0] + set ftp(LocalAddr) [string map {. ,} $ftp(LocalAddr)] + # get a new local port address for data transfer and convert it to a format # which is useable by the PORT command @@ -2949,17 +2963,10 @@ fconfigure $ftp(CtrlSock) -buffering line -blocking $block -translation {auto crlf} fileevent $ftp(CtrlSock) readable [list [namespace current]::StateHandler $s $ftp(CtrlSock)] - # prepare local ip address for PORT command (convert pointed format - # to comma format) - - set ftp(LocalAddr) [lindex [fconfigure $ftp(CtrlSock) -sockname] 0] - set ftp(LocalAddr) [string map {. ,} $ftp(LocalAddr)] - # report ready message - set peer [fconfigure $ftp(CtrlSock) -peername] if { $VERBOSE } { - DisplayMsg $s "C: Connection from [lindex $peer 0]:[lindex $peer 2]" control + DisplayMsg $s "C: Connection to $ftp(RemoteHost):$ftp(Port)" control } return 1 @@ -2992,9 +2999,11 @@ # new ftp::List proc makes the output more readable proc ::ftp::__ftp_ls {args} { - foreach i [eval ::ftp::List_org $args] { + set rc [eval [linsert $args 0 ::ftp::List_org]] + foreach i $rc { puts $i } + return $rc } # rename the original ftp::List procedure @@ -3010,4 +3019,4 @@ # ================================================================== # At last, everything is fine, we can provide the package. -package provide ftp [lindex {Revision: 2.4.9} 1] +package provide ftp [lindex {Revision: 2.4.11} 1] diff -Nru tcllib-1.13-dfsg/modules/ftp/pkgIndex.tcl tcllib-1.14-dfsg/modules/ftp/pkgIndex.tcl --- tcllib-1.13-dfsg/modules/ftp/pkgIndex.tcl 2011-01-25 05:37:59.000000000 +0000 +++ tcllib-1.14-dfsg/modules/ftp/pkgIndex.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -1,3 +1,3 @@ if {![package vsatisfies [package provide Tcl] 8.2]} {return} -package ifneeded ftp 2.4.9 [list source [file join $dir ftp.tcl]] -package ifneeded ftp::geturl 0.2.1 [list source [file join $dir ftp_geturl.tcl]] +package ifneeded ftp 2.4.11 [list source [file join $dir ftp.tcl]] +package ifneeded ftp::geturl 0.2.1 [list source [file join $dir ftp_geturl.tcl]] diff -Nru tcllib-1.13-dfsg/modules/ftpd/ChangeLog tcllib-1.14-dfsg/modules/ftpd/ChangeLog --- tcllib-1.13-dfsg/modules/ftpd/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/ftpd/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,28 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + +2011-08-09 Andreas Kupries + + * ftpd.man: Bumped version to 1.2.6. + * ftpd.tcl: + * pkgIndex.tcl: + + * ftpd.tcl (::ftpd::command::CWD): [Bug 3312900]: Accepted patch + by Roy Keene, adding basic checks to the CWD command. + + * ftpd.tcl (::ftpd::command::RNTO, ::ftpd::command::RNFR): + [Bug 3312880, 3325229]: Fixed issues with the rename command + found by Roy Keene. + + * ftpd.tcl: [Bug 3357765]: Accepted patch by Roy Keene + fixing issues with the handling + of passive connections by the server, with modifications (Moved + the replicated checking code into a procedure shared by the + modified commands). + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/ftpd/ftpd.man tcllib-1.14-dfsg/modules/ftpd/ftpd.man --- tcllib-1.13-dfsg/modules/ftpd/ftpd.man 2011-01-25 05:38:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/ftpd/ftpd.man 2011-12-13 18:13:24.000000000 +0000 @@ -1,10 +1,10 @@ [comment {-*- tcl -*- doctools manpage}] -[manpage_begin ftpd n 1.2.5] +[manpage_begin ftpd n 1.2.6] [moddesc {Tcl FTP Server Package}] [titledesc {Tcl FTP server implementation}] [category Networking] [require Tcl 8.3] -[require ftpd [opt 1.2.5]] +[require ftpd [opt 1.2.6]] [description] The [package ftpd] package provides a simple Tcl-only server library diff -Nru tcllib-1.13-dfsg/modules/ftpd/ftpd.tcl tcllib-1.14-dfsg/modules/ftpd/ftpd.tcl --- tcllib-1.13-dfsg/modules/ftpd/ftpd.tcl 2011-01-25 05:38:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/ftpd/ftpd.tcl 2011-12-13 18:13:24.000000000 +0000 @@ -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: ftpd.tcl,v 1.30 2010/01/20 18:22:42 andreas_kupries Exp $ +# RCS: @(#) $Id: ftpd.tcl,v 1.34 2011/08/09 20:55:38 andreas_kupries Exp $ # # Define the ftpd package version 1.2.5 @@ -755,6 +755,7 @@ # if {![catch {::ftpd::Fs append $path $data(mode)} f]} { puts $sock "150 Copy Started ($data(mode))" + ::ftpd::PasvCheckAndWait $sock fcopy $data(sock2) $f -command [list ::ftpd::GetDone $sock $data(sock2) $f ""] } else { puts $sock "500 Copy Failed: $path $f" @@ -814,7 +815,14 @@ return } - set data(cwd) [file join $data(cwd) $relativepath] + set path [file join $data(cwd) $relativepath] + + if {[::ftpd::Fs exists $path]} { + puts $sock "550 not a directory" + return + } + + set data(cwd) $path puts $sock "250 CWD command successful." return } @@ -1229,6 +1237,7 @@ # if {![catch {::ftpd::Fs retr $path $data(mode)} f]} { puts $sock "150 Copy Started ($data(mode))" + ::ftpd::PasvCheckAndWait $sock fcopy $f $data(sock2) -command [list ::ftpd::GetDone $sock $data(sock2) $f ""] } else { puts $sock "500 Copy Failed: $path $f" @@ -1291,7 +1300,7 @@ set path [file join $data(cwd) [string trimleft $filename /]] - if {[file exists $path]} { + if {[::ftpd::Fs exists $path]} { if {[::ftpd::hasCallback authFileCmd]} { set cmd $::ftpd::cfg(authFileCmd) lappend cmd $data(user) $path write @@ -1348,7 +1357,7 @@ } - if {![catch {::ftpd::Fs rename $data(renameFrom) $path} msg]} { + if {![catch {::ftpd::Fs rename $data(renameFrom) $path $sock} msg]} { unset data(renameFrom) } else { unset data(renameFrom) @@ -1418,6 +1427,7 @@ # if {![catch {::ftpd::Fs store $path $data(mode)} f]} { puts $sock "150 Copy Started ($data(mode))" + ::ftpd::PasvCheckAndWait $sock fcopy $data(sock2) $f -command [list ::ftpd::GetDone $sock $data(sock2) $f ""] } else { puts $sock "500 Copy Failed: $path $f" @@ -1468,6 +1478,7 @@ # if {![catch {::ftpd::Fs store $file $data(mode)} f]} { puts $sock "150 Copy Started ($data(mode))" + ::ftpd::PasvCheckAndWait $sock fcopy $data(sock2) $f -command [list ::ftpd::GetDone $sock $data(sock2) $f $file] } else { puts $sock "500 Copy Failed: $path $f" @@ -1636,6 +1647,7 @@ set path [file join $data(cwd) $filename] + PasvCheckAndWait $sock Fs dlist $path $style $data(sock2) FinishData $sock @@ -1893,7 +1905,7 @@ puts $outchan "550 rename: No such file or directory." } file rename $path $newname - puts $sock "250 RNTO command successful." + puts $outchan "250 RNTO command successful." } rmdir { foreach {outchan} $args break @@ -1990,7 +2002,7 @@ # # Patched Mark O'Connor # -package provide ftpd 1.2.5 +package provide ftpd 1.2.6 ## @@ -2009,6 +2021,7 @@ lappend ans [expr {($port >> 8) & 0xff}] [expr {$port & 0xff}] set ans [join $ans {,}] puts $sock "227 Entering Passive Mode ($ans)." + set data(sock2) "" return } @@ -2029,11 +2042,21 @@ } ::ftpd::FinishData $sock - set data(sock2) $sock2 + set data(sock2) $sock2 ; # (*), see ::ftpd::PasvCheckAndWait fconfigure $data(sock2) -translation $data(mode) close $data(sock2a) set data(sock2a) "" return } +proc ::ftpd::PasvCheckAndWait {sock} { + upvar #0 ::ftpd::$sock data + + # Check if we are in passive mode, with the data connection not + # yet established. If so, wait for the data connection to be + # made. This vwait is unlocked by (*) in ::ftpd::PasvAccept above. + if {$data(sock2) != ""} return + vwait ::ftpd::${sock}(sock2) + return +} diff -Nru tcllib-1.13-dfsg/modules/ftpd/pkgIndex.tcl tcllib-1.14-dfsg/modules/ftpd/pkgIndex.tcl --- tcllib-1.13-dfsg/modules/ftpd/pkgIndex.tcl 2011-01-25 05:38:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/ftpd/pkgIndex.tcl 2011-12-13 18:13:24.000000000 +0000 @@ -1,2 +1,2 @@ if {![package vsatisfies [package provide Tcl] 8.3]} {return} -package ifneeded ftpd 1.2.5 [list source [file join $dir ftpd.tcl]] +package ifneeded ftpd 1.2.6 [list source [file join $dir ftpd.tcl]] diff -Nru tcllib-1.13-dfsg/modules/fumagic/ChangeLog tcllib-1.14-dfsg/modules/fumagic/ChangeLog --- tcllib-1.13-dfsg/modules/fumagic/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/fumagic/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/gpx/ChangeLog tcllib-1.14-dfsg/modules/gpx/ChangeLog --- tcllib-1.13-dfsg/modules/gpx/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/gpx/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/grammar_aycock/ChangeLog tcllib-1.14-dfsg/modules/grammar_aycock/ChangeLog --- tcllib-1.13-dfsg/modules/grammar_aycock/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/grammar_aycock/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/grammar_fa/ChangeLog tcllib-1.14-dfsg/modules/grammar_fa/ChangeLog --- tcllib-1.13-dfsg/modules/grammar_fa/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/grammar_fa/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/grammar_me/ChangeLog tcllib-1.14-dfsg/modules/grammar_me/ChangeLog --- tcllib-1.13-dfsg/modules/grammar_me/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/grammar_me/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/grammar_peg/ChangeLog tcllib-1.14-dfsg/modules/grammar_peg/ChangeLog --- tcllib-1.13-dfsg/modules/grammar_peg/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/grammar_peg/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,16 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + +2011-01-24 Andreas Kupries + + * peg_interp.tcl (::grammar::peg::interp::MatchExpr): + * peg_interp.man: [Bug 3163541] Fixed broken call to + * pkgIndex.tcl: ict_match_token, missing the token. Bumped to + version 0.1.1. + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/grammar_peg/peg_interp.man tcllib-1.14-dfsg/modules/grammar_peg/peg_interp.man --- tcllib-1.13-dfsg/modules/grammar_peg/peg_interp.man 2011-01-25 05:37:59.000000000 +0000 +++ tcllib-1.14-dfsg/modules/grammar_peg/peg_interp.man 2011-12-13 18:13:23.000000000 +0000 @@ -1,12 +1,12 @@ [comment {-*- tcl -*- doctools manpage}] -[manpage_begin grammar::peg::interp n 0.1] -[copyright {2005 Andreas Kupries }] +[manpage_begin grammar::peg::interp n 0.1.1] +[copyright {2005-2011 Andreas Kupries }] [moddesc {Grammar operations and usage}] [titledesc {Interpreter for parsing expression grammars}] [category {Grammars and finite automata}] [require Tcl 8.4] [require grammar::mengine [opt 0.1]] -[require grammar::peg::interp [opt 0.1]] +[require grammar::peg::interp [opt 0.1.1]] [description] [keywords grammar expression {push down automaton}] [keywords state {parsing expression} {parsing expression grammar}] diff -Nru tcllib-1.13-dfsg/modules/grammar_peg/peg_interp.tcl tcllib-1.14-dfsg/modules/grammar_peg/peg_interp.tcl --- tcllib-1.13-dfsg/modules/grammar_peg/peg_interp.tcl 2011-01-25 05:37:59.000000000 +0000 +++ tcllib-1.14-dfsg/modules/grammar_peg/peg_interp.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -113,7 +113,7 @@ ict_advance "Expected $ch (got EOF)" if {!$ok} return - ict_match_token "Expected $ch" + ict_match_token $ch "Expected $ch" if {$ok && ($mode eq "value")} {isv_terminal} } .. { @@ -347,4 +347,4 @@ # ### ### ### ######### ######### ######### ## Package Management -package provide grammar::peg::interp 0.1 +package provide grammar::peg::interp 0.1.1 diff -Nru tcllib-1.13-dfsg/modules/grammar_peg/pkgIndex.tcl tcllib-1.14-dfsg/modules/grammar_peg/pkgIndex.tcl --- tcllib-1.13-dfsg/modules/grammar_peg/pkgIndex.tcl 2011-01-25 05:37:59.000000000 +0000 +++ tcllib-1.14-dfsg/modules/grammar_peg/pkgIndex.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -1,2 +1,2 @@ -package ifneeded grammar::peg 0.1 [list source [file join $dir peg.tcl]] -package ifneeded grammar::peg::interp 0.1 [list source [file join $dir peg_interp.tcl]] +package ifneeded grammar::peg 0.1 [list source [file join $dir peg.tcl]] +package ifneeded grammar::peg::interp 0.1.1 [list source [file join $dir peg_interp.tcl]] diff -Nru tcllib-1.13-dfsg/modules/hook/ChangeLog tcllib-1.14-dfsg/modules/hook/ChangeLog --- tcllib-1.13-dfsg/modules/hook/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/hook/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,15 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + +2011-02-23 Andreas Kupries + + * hook.man: [Bug 3167244]: Moved examples to their own lines to + avoid placement of following text on the .CE lines, causing a + staircase effect. The doctools should be fixed as well. + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/hook/hook.man tcllib-1.14-dfsg/modules/hook/hook.man --- tcllib-1.13-dfsg/modules/hook/hook.man 2011-01-25 05:37:59.000000000 +0000 +++ tcllib-1.14-dfsg/modules/hook/hook.man 2011-12-13 18:13:23.000000000 +0000 @@ -155,8 +155,17 @@ [para] It is possible to call [cmd {hook bind}] to create or delete a binding to a [arg subject] and [arg hook] while in an observer binding for that same [arg subject] and [arg hook]. The following rules -determine what happens when [example {hook bind $s $h $o $binding}] is -called during the execution of [example {hook call $s $h}]: +determine what happens when + +[example { + hook bind $s $h $o $binding +}] + +is called during the execution of + +[example { + hook call $s $h +}] [list_begin enumerated] [enum] @@ -178,22 +187,35 @@ [list_begin enumerated] [enum] -If [var \$o]'s binding to [var \$s] and [var \$h] is deleted, and -[var \$o]'s binding has not yet been called during this execution of -[example {hook call $s $h}], it will not be called. (Note that it -might already have been called; and in all likelihood, it is probably -deleting itself.) +If [var \$o]s binding to [var \$s] and [var \$h] is deleted, and +[var \$o]s binding has not yet been called during this execution of + +[example { + hook call $s $h +}] + +it will not be called. (Note that it might already have been called; +and in all likelihood, it is probably deleting itself.) [enum] If [var \$o] changes the command prefix that's bound to [var \$s] and -[var \$h], and if [var \$o]'s binding has not yet been called during -this execution of [example {hook call $s $h}], the new binding will -be called when the time comes. (But again, it is probably [var \$o]'s -binding that is is making the change.) +[var \$h], and if [var \$o]s binding has not yet been called during +this execution of + +[example { + hook call $s $h +}] + +the new binding will be called when the time comes. (But again, it is +probably [var \$o]s binding that is is making the change.) [enum] If a new observer is bound to [var \$s] and [var \$h], its binding will -not be called until the next invocation of [example {hook call $s $h}]. +not be called until the next invocation of + +[example { + hook call $s $h +}] [list_end] @@ -259,9 +281,11 @@ [enum] If a subject [var \$s] is forgotten during a call to -[example {hook call $s $h}], then [cmd {hook call}] will return as -soon as the current binding returns. No further bindings will be -called. + +[example {hook call $s $h}] + +then [cmd {hook call}] will return as soon as the current binding +returns. No further bindings will be called. [list_end] @@ -328,7 +352,7 @@ hook bind ::model .view [list .view ModelUpdate] }] -When the [cmd ::model] calls the hook, the [widget .view]'s +When the [cmd ::model] calls the hook, the [widget .view]s ModelUpdate subcommand will be called. [para] diff -Nru tcllib-1.13-dfsg/modules/html/ChangeLog tcllib-1.14-dfsg/modules/html/ChangeLog --- tcllib-1.13-dfsg/modules/html/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/html/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/htmlparse/ChangeLog tcllib-1.14-dfsg/modules/htmlparse/ChangeLog --- tcllib-1.13-dfsg/modules/htmlparse/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/htmlparse/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/http/ChangeLog tcllib-1.14-dfsg/modules/http/ChangeLog --- tcllib-1.13-dfsg/modules/http/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/http/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/ident/ChangeLog tcllib-1.14-dfsg/modules/ident/ChangeLog --- tcllib-1.13-dfsg/modules/ident/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/ident/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/imap4/ChangeLog tcllib-1.14-dfsg/modules/imap4/ChangeLog --- tcllib-1.13-dfsg/modules/imap4/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/imap4/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/inifile/ChangeLog tcllib-1.14-dfsg/modules/inifile/ChangeLog --- tcllib-1.13-dfsg/modules/inifile/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/inifile/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,17 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + +2011-12-02 Andreas Kupries + + * ini.tcl: [Bug 3419727]: Fixed the creative writing issue + * ini.man: with what should be local variables of _loadfile + * pkgIndex.tcl: and _commit. Generally reworked to use the + 'variable' command to bring object state into scope. + Bumped version to 0.2.4 + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/inifile/ini.man tcllib-1.14-dfsg/modules/inifile/ini.man --- tcllib-1.13-dfsg/modules/inifile/ini.man 2011-01-25 05:37:58.000000000 +0000 +++ tcllib-1.14-dfsg/modules/inifile/ini.man 2011-12-13 18:13:23.000000000 +0000 @@ -1,10 +1,10 @@ [comment {-*- tcl -*- doctools manpage}] -[manpage_begin inifile n 0.2.3] +[manpage_begin inifile n 0.2.4] [moddesc {Parsing of Windows INI files}] [titledesc {Parsing of Windows INI files}] [category {Text processing}] [require Tcl 8.2] -[require inifile [opt 0.2.3]] +[require inifile [opt 0.2.4]] [description] This package provides an interface for easy manipulation of Windows INI files. diff -Nru tcllib-1.13-dfsg/modules/inifile/ini.tcl tcllib-1.14-dfsg/modules/inifile/ini.tcl --- tcllib-1.13-dfsg/modules/inifile/ini.tcl 2011-01-25 05:37:58.000000000 +0000 +++ tcllib-1.14-dfsg/modules/inifile/ini.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -3,13 +3,14 @@ # Querying and modifying old-style windows configuration files (.ini) # # Copyright (c) 2003-2007 Aaron Faupell +# Copyright (c) 2008-2011 Andreas Kupries # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: ini.tcl,v 1.15 2008/05/11 00:53:58 andreas_kupries Exp $ +# RCS: @(#) $Id: ini.tcl,v 1.16 2011/12/02 22:22:19 andreas_kupries Exp $ -package provide inifile 0.2.3 +package provide inifile 0.2.4 namespace eval ini { variable nexthandle 0 @@ -20,7 +21,7 @@ variable nexthandle if { ![regexp {^(w|r)\+?$} $mode] } { - error "$mode is not a valid access mode" + return -code error "$mode is not a valid access mode" } ::set fh ini$nexthandle @@ -48,40 +49,48 @@ proc ::ini::close {fh} { _valid_ns $fh - ::close [::set ::ini::${fh}::channel] + variable ::ini::${fh}::channel + ::close $channel namespace delete ::ini::$fh + return } # write all changes to disk proc ::ini::commit {fh} { _valid_ns $fh - namespace eval ::ini::$fh { - if { $mode == "r" } { - error "cannot write to read-only file" - } - ::close $channel - ::set channel [::open $file w] - ::set char $::ini::commentchar - #seek $channel 0 start - foreach sec [array names sections] { - if { [info exists comments($sec)] } { - puts $channel "$char [join $comments($sec) "\n$char "]\n" - } - puts $channel "\[$sec\]" - foreach key [lsort -dictionary [array names data [::ini::_globescape $sec]\000*]] { - ::set key [lindex [split $key \000] 1] - if {[info exists comments($sec\000$key)]} { - puts $channel "$char [join $comments($sec\000$key) "\n$char "]" - } - puts $channel "$key=$data($sec\000$key)" - } - puts $channel "" - } - catch { unset char sec key } - close $channel - ::set channel [::open $file r+] + + variable ::ini::${fh}::data + variable ::ini::${fh}::comments + variable ::ini::${fh}::sections + variable ::ini::${fh}::channel + variable ::ini::${fh}::file + variable ::ini::${fh}::mode + variable commentchar + + if { $mode == "r" } { + return -code error "cannot write to read-only file" } + ::close $channel + ::set channel [::open $file w] + ::set char $commentchar + #seek $channel 0 start + foreach sec [array names sections] { + if { [info exists comments($sec)] } { + puts $channel "$char [join $comments($sec) "\n$char "]\n" + } + puts $channel "\[$sec\]" + foreach key [lsort -dictionary [array names data [_globescape $sec]\000*]] { + ::set key [lindex [split $key \000] 1] + if {[info exists comments($sec\000$key)]} { + puts $channel "$char [join $comments($sec\000$key) "\n$char "]" + } + puts $channel "$key=$data($sec\000$key)" + } + puts $channel "" + } + close $channel + ::set channel [::open $file r+] return } @@ -89,42 +98,48 @@ # see open and revert for public commands proc ::ini::_loadfile {fh} { - namespace eval ::ini::$fh { - ::set cur {} - ::set com {} - set char $::ini::commentchar - seek $channel 0 start - - foreach line [split [read $channel] "\n"] { - if { [string match "$char*" $line] } { - lappend com [string trim [string range $line [string length $char] end]] - } elseif { [string match {\[*\]} $line] } { - ::set cur [string range $line 1 end-1] - if { $cur == "" } { continue } - ::set sections($cur) 1 - if { $com != "" } { - ::set comments($cur) $com - ::set com {} - } - } elseif { [string match {*=*} $line] } { - ::set line [split $line =] - ::set key [string trim [lindex $line 0]] - if { $key == "" || $cur == "" } { continue } - ::set value [string trim [join [lrange $line 1 end] =]] - if { [regexp "^(\".*\")\s+${char}(.*)$" $value -> 1 2] } { - set value $1 - lappend com $2 - } - ::set data($cur\000$key) $value - if { $com != "" } { - ::set comments($cur\000$key) $com - ::set com {} - } - } - } - unset char cur com - catch { unset line key value 1 2 } + variable ::ini::${fh}::data + variable ::ini::${fh}::comments + variable ::ini::${fh}::sections + variable ::ini::${fh}::channel + variable ::ini::${fh}::file + variable ::ini::${fh}::mode + variable commentchar + + ::set cur {} + ::set com {} + + ::set char $commentchar + seek $channel 0 start + + foreach line [split [read $channel] "\n"] { + if { [string match "$char*" $line] } { + lappend com [string trim [string range $line [string length $char] end]] + } elseif { [string match {\[*\]} $line] } { + ::set cur [string range $line 1 end-1] + if { $cur == "" } { continue } + ::set sections($cur) 1 + if { $com != "" } { + ::set comments($cur) $com + ::set com {} + } + } elseif { [string match {*=*} $line] } { + ::set line [split $line =] + ::set key [string trim [lindex $line 0]] + if { $key == "" || $cur == "" } { continue } + ::set value [string trim [join [lrange $line 1 end] =]] + if { [regexp "^(\".*\")\s+${char}(.*)$" $value -> 1 2] } { + ::set value $1 + lappend com $2 + } + ::set data($cur\000$key) $value + if { $com != "" } { + ::set comments($cur\000$key) $com + ::set com {} + } + } } + return } # internal command to escape glob special characters @@ -136,15 +151,19 @@ # internal command to check if a section or key is nonexistant proc ::ini::_exists {fh sec args} { - if { ![info exists ::ini::${fh}::sections($sec)] } { - error "no such section \"$sec\"" + variable ::ini::${fh}::sections + variable ::ini::${fh}::data + + if { ![info exists sections($sec)] } { + return -code error "no such section \"$sec\"" } if { [llength $args] > 0 } { ::set key [lindex $args 0] - if { ![info exists ::ini::${fh}::data($sec\000$key)] } { - error "can't read key \"$key\"" + if { ![info exists data($sec\000$key)] } { + return -code error "can't read key \"$key\"" } } + return } # internal command to check validity of a handle @@ -156,7 +175,7 @@ proc ::ini::_valid_ns {name} { variable ::ini::${name}::data if { ![info exists data] } { - error "$name is not an open INI file" + return -code error "$name is not an open INI file" } } } else { @@ -165,7 +184,7 @@ } proc ::ini::_valid_ns {name} { if { ![namespace exists ::ini::$name] } { - error "$name is not an open INI file" + return -code error "$name is not an open INI file" } } } @@ -187,17 +206,21 @@ proc ::ini::sections {fh} { _valid_ns $fh - return [array names ::ini::${fh}::sections] + variable ::ini::${fh}::sections + return [array names sections] } # return boolean indicating existance of section or key in section proc ::ini::exists {fh sec {key {}}} { _valid_ns $fh + variable ::ini::${fh}::sections + variable ::ini::${fh}::data + if { $key == "" } { - return [info exists ::ini::${fh}::sections($sec)] + return [info exists sections($sec)] } - return [info exists ::ini::${fh}::data($sec\000$key)] + return [info exists data($sec\000$key)] } # return all key names of section @@ -206,8 +229,10 @@ proc ::ini::keys {fh sec} { _valid_ns $fh _exists $fh $sec + variable ::ini::${fh}::data + ::set keys {} - foreach x [array names ::ini::${fh}::data [_globescape $sec]\000*] { + foreach x [array names data [_globescape $sec]\000*] { lappend keys [lindex [split $x \000] 1] } return $keys @@ -219,7 +244,8 @@ proc ::ini::get {fh sec} { _valid_ns $fh _exists $fh $sec - upvar 0 ::ini::${fh}::data data + variable ::ini::${fh}::data + ::set r {} foreach x [array names data [_globescape $sec]\000*] { lappend r [lindex [split $x \000] 1] $data($x) @@ -232,11 +258,13 @@ proc ::ini::value {fh sec key {default {}}} { _valid_ns $fh - if {$default != "" && ![info exists ::ini::${fh}::data($sec\000$key)]} { + variable ::ini::${fh}::data + + if {$default != "" && ![info exists data($sec\000$key)]} { return $default } _exists $fh $sec $key - return [::set ::ini::${fh}::data($sec\000$key)] + return [::set data($sec\000$key)] } # set the value of a key @@ -244,13 +272,16 @@ proc ::ini::set {fh sec key value} { _valid_ns $fh + variable ::ini::${fh}::sections + variable ::ini::${fh}::data + ::set sec [string trim $sec] ::set key [string trim $key] if { $sec == "" || $key == "" } { error "section or key may not be empty" } - ::set ::ini::${fh}::data($sec\000$key) $value - ::set ::ini::${fh}::sections($sec) 1 + ::set data($sec\000$key) $value + ::set sections($sec) 1 return $value } @@ -259,11 +290,14 @@ proc ::ini::delete {fh sec {key {}}} { _valid_ns $fh + variable ::ini::${fh}::sections + variable ::ini::${fh}::data + if { $key == "" } { - array unset ::ini::${fh}::data [_globescape $sec]\000* - array unset ::ini::${fh}::sections [_globescape $sec] + array unset data [_globescape $sec]\000* + array unset sections [_globescape $sec] } - catch {unset ::ini::${fh}::data($sec\000$key)} + catch {unset data($sec\000$key)} } # read and set comments for sections and keys @@ -271,7 +305,8 @@ proc ::ini::comment {fh sec key args} { _valid_ns $fh - upvar 0 ::ini::${fh}::comments comments + variable ::ini::${fh}::comments + ::set r $sec if { $key != "" } { append r \000$key } if { [llength $args] == 0 } { @@ -293,7 +328,8 @@ proc ::ini::filename {fh} { _valid_ns $fh - return [::set ::ini::${fh}::file] + variable ::ini::${fh}::file + return $file } # reload the file from disk losing all changes since the last commit diff -Nru tcllib-1.13-dfsg/modules/inifile/pkgIndex.tcl tcllib-1.14-dfsg/modules/inifile/pkgIndex.tcl --- tcllib-1.13-dfsg/modules/inifile/pkgIndex.tcl 2011-01-25 05:37:58.000000000 +0000 +++ tcllib-1.14-dfsg/modules/inifile/pkgIndex.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -1,2 +1,2 @@ if { ![package vsatisfies [package provide Tcl] 8.2] } { return } -package ifneeded inifile 0.2.3 [list source [file join $dir ini.tcl]] +package ifneeded inifile 0.2.4 [list source [file join $dir ini.tcl]] diff -Nru tcllib-1.13-dfsg/modules/interp/ChangeLog tcllib-1.14-dfsg/modules/interp/ChangeLog --- tcllib-1.13-dfsg/modules/interp/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/interp/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,16 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + +2011-11-07 Andreas Kupries + + * interp.tcl (::interp::createEmpty): Fixed problem with 8.6, + * interp.man: where the removal of the ::tcl namespace also kills + * pkgIndex.tcl: the 'namespace' command, as it is ensemblified. + Version bumped to 0.1.2. + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/interp/interp.tcl tcllib-1.14-dfsg/modules/interp/interp.tcl --- tcllib-1.13-dfsg/modules/interp/interp.tcl 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/interp/interp.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -6,7 +6,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: interp.tcl,v 1.3 2007/08/20 21:06:33 andreas_kupries Exp $ +# RCS: @(#) $Id: interp.tcl,v 1.5 2011/11/08 02:40:31 andreas_kupries Exp $ package require Tcl 8.3 @@ -50,7 +50,12 @@ } interp eval $i [list ::namespace delete ::tcl] - interp eval $i [list ::rename namespace {}] + catch { + # In 8.6 the removal of the ::tcl namespace killed the + # ensemblified namespace command already, so a deletion will + # fail. Easier to catch than being conditional. + interp eval $i [list ::rename namespace {}] + } interp eval $i [list ::rename rename {}] # Done. Result is ready. @@ -79,4 +84,4 @@ # ### ### ### ######### ######### ######### ## Ready to go -package provide interp 0.1.1 +package provide interp 0.1.2 diff -Nru tcllib-1.13-dfsg/modules/interp/pkgIndex.tcl tcllib-1.14-dfsg/modules/interp/pkgIndex.tcl --- tcllib-1.13-dfsg/modules/interp/pkgIndex.tcl 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/interp/pkgIndex.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -1,4 +1,4 @@ if {![package vsatisfies [package provide Tcl] 8.3]} return -package ifneeded interp 0.1.1 [list source [file join $dir interp.tcl]] +package ifneeded interp 0.1.2 [list source [file join $dir interp.tcl]] package ifneeded interp::delegate::proc 0.2 [list source [file join $dir deleg_proc.tcl]] package ifneeded interp::delegate::method 0.2 [list source [file join $dir deleg_method.tcl]] diff -Nru tcllib-1.13-dfsg/modules/interp/tcllib_interp.man tcllib-1.14-dfsg/modules/interp/tcllib_interp.man --- tcllib-1.13-dfsg/modules/interp/tcllib_interp.man 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/interp/tcllib_interp.man 2011-12-13 18:13:23.000000000 +0000 @@ -1,11 +1,11 @@ [comment {-*- tcl -*- doctools manpage}] -[manpage_begin interp n 0.1.1] +[manpage_begin interp n 0.1.2] [copyright {2006 Andreas Kupries }] [moddesc {Interpreter utilities}] [titledesc {Interp creation and aliasing}] [category {Programming tools}] [require Tcl 8.3] -[require interp [opt 0.1.1]] +[require interp [opt 0.1.2]] [description] [para] diff -Nru tcllib-1.13-dfsg/modules/irc/ChangeLog tcllib-1.14-dfsg/modules/irc/ChangeLog --- tcllib-1.13-dfsg/modules/irc/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/irc/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/javascript/ChangeLog tcllib-1.14-dfsg/modules/javascript/ChangeLog --- tcllib-1.13-dfsg/modules/javascript/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/javascript/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/jpeg/ChangeLog tcllib-1.14-dfsg/modules/jpeg/ChangeLog --- tcllib-1.13-dfsg/modules/jpeg/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/jpeg/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,17 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + +2011-05-06 Pat Thoyts + + * jpeg.tcl: Refactored the getExif function into two parts with + * pkgIndex.tcl: one that operates on a previously opened + * jpeg.man: channel. This means it can be used with other channel + * jpeg.test: implementations such as memchan or embedded + streams. Updated the documentation and version. + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/jpeg/jpeg.man tcllib-1.14-dfsg/modules/jpeg/jpeg.man --- tcllib-1.13-dfsg/modules/jpeg/jpeg.man 2011-01-25 05:37:59.000000000 +0000 +++ tcllib-1.14-dfsg/modules/jpeg/jpeg.man 2011-12-13 18:13:23.000000000 +0000 @@ -1,12 +1,13 @@ -[manpage_begin jpeg n 0.3.5] +[manpage_begin jpeg n 0.4.0] [copyright {2004-2005, Code: Aaron Faupell }] [copyright {2007, Code: Andreas Kupries }] [copyright {2004-2009, Doc: Andreas Kupries }] +[copyright {2011, Code: Pat Thoyts }] [moddesc {JPEG image manipulation}] [titledesc {JPEG querying and manipulation of meta data}] [category {File formats}] [require Tcl 8.2] -[require jpeg [opt 0.3.5]] +[require jpeg [opt 0.4.0]] [description] [para] @@ -78,6 +79,18 @@ Throws an error if [arg file] is not a JPEG image. +[call [cmd ::jpeg::getExifFromChannel] [arg channel] [opt [arg section]]] + +This command is as per [cmd ::jpeg::getExif] except that it uses a +previously opened channel. [arg channel] should be a seekable channel +and [arg section] is as described in the documentation of +[cmd ::jpeg::getExif] + +Note: the jpeg parser expects that the start of the channel is the +start of the image data. If working with an image embedded in a +container file format it may be necessary to read the jpeg data into +a temporary container: either a temporary file or a memory channel. + [call [cmd ::jpeg::formatExif] [arg keys]] Takes a list of key-value pairs as returned by [cmd getExif] and formats diff -Nru tcllib-1.13-dfsg/modules/jpeg/jpeg.tcl tcllib-1.14-dfsg/modules/jpeg/jpeg.tcl --- tcllib-1.13-dfsg/modules/jpeg/jpeg.tcl 2011-01-25 05:37:59.000000000 +0000 +++ tcllib-1.14-dfsg/modules/jpeg/jpeg.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: jpeg.tcl,v 1.18 2009/06/05 19:58:26 andreas_kupries Exp $ +# RCS: @(#) $Id: jpeg.tcl,v 1.19 2011/05/06 13:39:27 patthoyts Exp $ # ### ### ### ######### ######### ######### ## Requisites @@ -362,50 +362,54 @@ proc ::jpeg::getExif {file {type main}} { set fh [openJFIF $file] + set r [catch {getExifFromChannel $fh $type} err] + close $fh + return -code $r $err +} + +proc ::jpeg::getExifFromChannel {chan {type main}} { # foreach because file may have multiple e1 markers - foreach app1 [lsearch -inline -all [markers $fh] "e1 *"] { - seek $fh [lindex $app1 1] start + foreach app1 [lsearch -inline -all [markers $chan] "e1 *"] { + seek $chan [lindex $app1 1] start # check that this e1 is really an Exif segment - if {[read $fh 6] != "Exif\x00\x00"} continue + if {[read $chan 6] != "Exif\x00\x00"} continue # save offset because exif offsets are relative to this - set start [tell $fh] + set start [tell $chan] # next 2 bytes determine byte order - binary scan [read $fh 2] H4 byteOrder + binary scan [read $chan 2] H4 byteOrder if {$byteOrder == "4d4d"} { set byteOrder big } elseif {$byteOrder == "4949"} { set byteOrder little } else { - close $fh - return + return -code error "invalid byte order magic" } # the answer is 42, if we have our byte order correct - _scan $byteOrder [read $fh 6] si magic next - if {$magic != 42} { close $fh; return } + _scan $byteOrder [read $chan 6] si magic next + if {$magic != 42} { return -code error "invalid byte order"} - seek $fh [expr {$start + $next}] start + seek $chan [expr {$start + $next}] start if {$type != "thumbnail"} { if {$type != "main"} { return -code error "Bad type \"$type\", expected one of \"main\", or \"thumbnail\"" } - set data [_exif $fh $byteOrder $start] + set data [_exif $chan $byteOrder $start] } else { # number of entries in this exif block - _scan $byteOrder [read $fh 2] s num + _scan $byteOrder [read $chan 2] s num # each entry is 12 bytes - seek $fh [expr {$num * 12}] current + seek $chan [expr {$num * 12}] current # offset of next exif block (for thumbnail) - _scan $byteOrder [read $fh 4] i next - if {$next <= 0} { close $fh; return } + _scan $byteOrder [read $chan 4] i next + if {$next <= 0} { close $chan; return } # but its relative to start - seek $fh [expr {$start + $next}] start - set data [_exif $fh $byteOrder $start] + seek $chan [expr {$start + $next}] start + set data [_exif $chan $byteOrder $start] } - close $fh lappend data ExifOffset $start ExifByteOrder $byteOrder return $data } - close $fh + return } proc ::jpeg::removeExif {file} { @@ -1117,4 +1121,4 @@ # ### ### ### ######### ######### ######### ## Ready -package provide jpeg 0.3.5 +package provide jpeg 0.4.0 diff -Nru tcllib-1.13-dfsg/modules/jpeg/jpeg.test tcllib-1.14-dfsg/modules/jpeg/jpeg.test --- tcllib-1.13-dfsg/modules/jpeg/jpeg.test 2011-01-25 05:37:59.000000000 +0000 +++ tcllib-1.14-dfsg/modules/jpeg/jpeg.test 2011-12-13 18:13:23.000000000 +0000 @@ -4,7 +4,7 @@ # Copyright (c) 2008 by Andreas Kupries # All rights reserved. # -# JPEG: @(#) $Id: jpeg.test,v 1.1 2008/03/24 00:21:09 andreas_kupries Exp $ +# JPEG: @(#) $Id: jpeg.test,v 1.2 2011/05/06 13:39:27 patthoyts Exp $ # ------------------------------------------------------------------------- @@ -337,6 +337,23 @@ set msg } {Bad type "fufara", expected one of "main", or "thumbnail"} +test jpeg-29.3 {getExifFromChannel error, wrong#args, not enough} { + catch {::jpeg::getExifFromChannel} msg + set msg +} [tcltest::wrongNumArgs {::jpeg::getExifFromChannel} {chan ?type?} 0] + +test jpeg-29.4 {getExifFromChannel error, wrong#args, too many} { + catch {::jpeg::getExifFromChannel foo bar barf} msg + set msg +} [tcltest::tooManyArgs {::jpeg::getExifFromChannel} {chan ?type?}] + +test jpeg-29.5 {getExifFromChannel error, bad section type} { + set fd [::jpeg::openJFIF [localPath testimages/IMG_7950.JPG] r] + catch {::jpeg::getExifFromChannel $fd fufara} msg + close $fd + set msg +} {Bad type "fufara", expected one of "main", or "thumbnail"} + # ------------------------------------------------------------------------- proc fixupdata {dict} { diff -Nru tcllib-1.13-dfsg/modules/jpeg/pkgIndex.tcl tcllib-1.14-dfsg/modules/jpeg/pkgIndex.tcl --- tcllib-1.13-dfsg/modules/jpeg/pkgIndex.tcl 2011-01-25 05:37:59.000000000 +0000 +++ tcllib-1.14-dfsg/modules/jpeg/pkgIndex.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -1,2 +1,2 @@ if {![package vsatisfies [package provide Tcl] 8.2]} {return} -package ifneeded jpeg 0.3.5 [list source [file join $dir jpeg.tcl]] +package ifneeded jpeg 0.4.0 [list source [file join $dir jpeg.tcl]] diff -Nru tcllib-1.13-dfsg/modules/json/ChangeLog tcllib-1.14-dfsg/modules/json/ChangeLog --- tcllib-1.13-dfsg/modules/json/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/json/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,24 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + +2011-11-10 Andreas Kupries + + * json.tcl: [Bug 3426178]: Fixed bug in "list2json", + * json.test: reported by . + * json.man: Updated testsuite. Bumped version to 1.1.2. + * pkgIndex.tcl: + +2011-08-24 Andreas Kupries + + * json_write.man: + * json_write.test: + * json_write.tcl: [Bug 3396787]: Fixed missing argument to call of + * pkgIndex.tcl: [info level], breaking the argument checks. Bumped + version to 1.0.1 + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/json/json.man tcllib-1.14-dfsg/modules/json/json.man --- tcllib-1.13-dfsg/modules/json/json.man 2011-01-25 05:38:02.000000000 +0000 +++ tcllib-1.14-dfsg/modules/json/json.man 2011-12-13 18:13:23.000000000 +0000 @@ -1,11 +1,12 @@ [comment {-*- tcl -*- doctools manpage}] -[manpage_begin json n 1.1.1] -[copyright {2006 ActiveState Software Inc., 2009 Thomas Maeder, Glue Software Engineering AG}] +[manpage_begin json n 1.1.2] +[copyright {2006 ActiveState Software Inc.}] +[copyright {2009 Thomas Maeder, Glue Software Engineering AG}] [moddesc {JSON}] [titledesc {JSON parser}] [category {CGI programming}] [require Tcl 8.4] -[require json [opt 1.1.1]] +[require json [opt 1.1.2]] [keywords json javascript {data exchange} {exchange format}] [description] [para] diff -Nru tcllib-1.13-dfsg/modules/json/json.tcl tcllib-1.14-dfsg/modules/json/json.tcl --- tcllib-1.13-dfsg/modules/json/json.tcl 2011-01-25 05:38:02.000000000 +0000 +++ tcllib-1.14-dfsg/modules/json/json.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -6,14 +6,14 @@ # Total rework of the code published with version number 1.0 by # Thomas Maeder, Glue Software Engineering AG # -# $Id: json.tcl,v 1.6 2011/01/20 15:11:55 andreas_kupries Exp $ +# $Id: json.tcl,v 1.7 2011/11/10 21:05:58 andreas_kupries Exp $ # if {![package vsatisfies [package provide Tcl] 8.5]} { package require dict } -package provide json 1.1.1 +package provide json 1.1.2 namespace eval json { # Regular expression for tokenizing a JSON text (cf. http://json.org/) @@ -312,7 +312,7 @@ } proc json::list2json {listVal} { - return "\[$[join $listVal ,]\]" + return "\[[join $listVal ,]\]" } proc json::string2json {str} { diff -Nru tcllib-1.13-dfsg/modules/json/json.test tcllib-1.14-dfsg/modules/json/json.test --- tcllib-1.13-dfsg/modules/json/json.test 2011-01-25 05:38:02.000000000 +0000 +++ tcllib-1.14-dfsg/modules/json/json.test 2011-12-13 18:13:23.000000000 +0000 @@ -6,7 +6,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # ------------------------------------------------------------------------- -# RCS: @(#) $Id: json.test,v 1.7 2009/05/26 11:45:59 kanryu6 Exp $ +# RCS: @(#) $Id: json.test,v 1.8 2011/11/10 21:05:58 andreas_kupries Exp $ # ------------------------------------------------------------------------- @@ -15,7 +15,7 @@ devtools testutilities.tcl] testsNeedTcl [expr {[catch {package require dict}] ? "8.5" : "8.4"}] -testsNeedTcltest 1.0 +testsNeedTcltest 2.0 testing { useLocal json.tcl json @@ -186,17 +186,29 @@ set i 0 foreach name [array names JSON] { - test json-1.[incr i] "test JSON $name" { + test json-1.[incr i] "test JSON $name" -body { set res [json::json2dict $JSON($name)] if {[info exists DICTSORT($name)]} { return [string equal [dictsort3 $DICTSORT($name) $res] [dictsort3 $DICTSORT($name) $TCL($name)]] } else { return [string equal $res $TCL($name)] } - } 1 + } -result 1 } # ------------------------------------------------------------------------- +# More Tests +# ------------------------------------------------------------------------- + +test json-2.0 {list2json} -body { + json::list2json {{"a"} {"b"} {"c"}} +} -result {["a","b","c"]} + +test json-2.1 {string2json} -body { + json::string2json a +} -result {"a"} + +# ------------------------------------------------------------------------- catch {unset JSON} catch {unset TCL} catch {unset DICTSORT} diff -Nru tcllib-1.13-dfsg/modules/json/json_write.man tcllib-1.14-dfsg/modules/json/json_write.man --- tcllib-1.13-dfsg/modules/json/json_write.man 2011-01-25 05:38:02.000000000 +0000 +++ tcllib-1.14-dfsg/modules/json/json_write.man 2011-12-13 18:13:23.000000000 +0000 @@ -1,11 +1,11 @@ [comment {-*- tcl -*- doctools manpage}] -[manpage_begin json::write n 1.0] -[copyright {2009 Andreas Kupries }] +[manpage_begin json::write n 1.0.1] +[copyright {2009-2011 Andreas Kupries }] [moddesc {JSON}] [titledesc {JSON generation}] [category {CGI programming}] [require Tcl 8.5] -[require json::write [opt 1]] +[require json::write [opt 1.0.1]] [keywords json javascript {data exchange} {exchange format}] [description] [para] diff -Nru tcllib-1.13-dfsg/modules/json/json_write.pcx tcllib-1.14-dfsg/modules/json/json_write.pcx --- tcllib-1.13-dfsg/modules/json/json_write.pcx 2011-01-25 05:38:02.000000000 +0000 +++ tcllib-1.14-dfsg/modules/json/json_write.pcx 2011-12-13 18:13:23.000000000 +0000 @@ -35,7 +35,7 @@ checkWord }}}} } {}} -}} +} # Initialization via pcx::init. # Use a ::json::write::init procedure for non-standard initialization. diff -Nru tcllib-1.13-dfsg/modules/json/json_write.tcl tcllib-1.14-dfsg/modules/json/json_write.tcl --- tcllib-1.13-dfsg/modules/json/json_write.tcl 2011-01-25 05:38:02.000000000 +0000 +++ tcllib-1.14-dfsg/modules/json/json_write.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -2,12 +2,12 @@ # # Commands for the generation of JSON (Java Script Object Notation). # -# Copyright (c) 2009 Andreas Kupries +# Copyright (c) 2009-2011 Andreas Kupries # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: json_write.tcl,v 1.1 2009/11/25 04:41:01 andreas_kupries Exp $ +# RCS: @(#) $Id: json_write.tcl,v 1.2 2011/08/24 20:09:44 andreas_kupries Exp $ # ### ### ### ######### ######### ######### ## Requisites @@ -27,7 +27,7 @@ proc ::json::write::indented {{bool {}}} { variable indented - if {[llength [info level]] > 2} { + if {[llength [info level 0]] > 2} { return -code error {wrong # args: should be "json::write indented ?bool?"} } elseif {[llength [info level 0]] == 2} { if {![::string is boolean -strict $bool]} { @@ -45,7 +45,7 @@ proc ::json::write::aligned {{bool {}}} { variable aligned - if {[llength [info level]] > 2} { + if {[llength [info level 0]] > 2} { return -code error {wrong # args: should be "json::write aligned ?bool?"} } elseif {[llength [info level 0]] == 2} { if {![::string is boolean -strict $bool]} { @@ -181,5 +181,5 @@ # ### ### ### ######### ######### ######### ## Ready -package provide json::write 1 +package provide json::write 1.0.1 return diff -Nru tcllib-1.13-dfsg/modules/json/pkgIndex.tcl tcllib-1.14-dfsg/modules/json/pkgIndex.tcl --- tcllib-1.13-dfsg/modules/json/pkgIndex.tcl 2011-01-25 05:38:02.000000000 +0000 +++ tcllib-1.14-dfsg/modules/json/pkgIndex.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -1,7 +1,7 @@ # Tcl package index file, version 1.1 if {![package vsatisfies [package provide Tcl] 8.4]} {return} -package ifneeded json 1.1.1 [list source [file join $dir json.tcl]] +package ifneeded json 1.1.2 [list source [file join $dir json.tcl]] if {![package vsatisfies [package provide Tcl] 8.5]} {return} -package ifneeded json::write 1 [list source [file join $dir json_write.tcl]] +package ifneeded json::write 1.0.1 [list source [file join $dir json_write.tcl]] diff -Nru tcllib-1.13-dfsg/modules/lambda/ChangeLog tcllib-1.14-dfsg/modules/lambda/ChangeLog --- tcllib-1.13-dfsg/modules/lambda/ChangeLog 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/lambda/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -0,0 +1,10 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + +2011-05-31 Andreas Kupries + + * New module and package: lambda. Easy anonymous procedures for + Tcl 8.5+. diff -Nru tcllib-1.13-dfsg/modules/lambda/lambda.man tcllib-1.14-dfsg/modules/lambda/lambda.man --- tcllib-1.13-dfsg/modules/lambda/lambda.man 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/lambda/lambda.man 2011-12-13 18:13:23.000000000 +0000 @@ -0,0 +1,93 @@ +[comment {-*- tcl -*- doctools manpage}] +[manpage_begin lambda n 1] +[copyright {2011 Andreas Kupries, BSD licensed}] +[moddesc {Utility commands for anonymous procedures}] +[titledesc {Utility commands for anonymous procedures}] +[category Utility] +[require Tcl 8.5] +[require lambda [opt 1]] +[keywords lambda {anonymous procedure} callback {command prefix}] +[keywords {partial application} currying proc] +[see_also apply(n) proc(n)] +[description] +[para] + +This package provides two convenience commands to make the writing of +anonymous procedures, i.e. lambdas more [cmd proc]-like. Instead of, +for example, to write + +[example { + set f {::apply {{x} { + .... + }}} +}] + +with its deep nesting of braces, or + +[example { + set f [list ::apply {{x y} { + .... + }} $value_for_x] +}] + +with a list command to insert some of the arguments of a partial +application, just write + +[example { + set f [lambda {x} { + .... + }] +}] + +and + +[example { + set f [lambda {x y} { + .... + } $value_for_x] +}] + +[section {COMMANDS}] + +[list_begin definitions] +[comment {- - -- --- ----- -------- ------------- ---------------------}] +[call [cmd ::lambda] [arg arguments] [arg body] [opt [arg arg]...]] + +The command constructs an anonymous procedure from the list of +arguments, body script and (optional) predefined argument values and +returns a command prefix representing this anonymous procedure. + +[para] When invoked the [arg body] is run in a new procedure scope +just underneath the global scope, with the arguments set to the values +supplied at both construction and invokation time. + + +[comment {- - -- --- ----- -------- ------------- ---------------------}] +[call [cmd ::lambda@] [arg namespace] [arg arguments] [arg body] [opt [arg arg]...]] + +The command constructs an anonymous procedure from the namespace name, +list of arguments, body script and (optional) predefined argument +values and returns a command prefix representing this anonymous +procedure. + +[para] When invoked the [arg body] is run in a new procedure scope in +the [arg namespace], with the arguments set to the values supplied at +both construction and invokation time. + +[list_end] + +[section AUTHORS] +Andreas Kupries + +[section {BUGS, IDEAS, FEEDBACK}] + +This document, and the package it describes, will undoubtedly contain +bugs and other problems. + +Please report such in the category [emph lambda] of the +[uri {http://sourceforge.net/tracker/?group_id=12883} {Tcllib SF Trackers}]. + +Please also report any ideas for enhancements you may have for either +package and/or documentation. + +[manpage_end] diff -Nru tcllib-1.13-dfsg/modules/lambda/lambda.tcl tcllib-1.14-dfsg/modules/lambda/lambda.tcl --- tcllib-1.13-dfsg/modules/lambda/lambda.tcl 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/lambda/lambda.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -0,0 +1,43 @@ +# # ## ### ##### ######## ############# #################### +## -*- tcl -*- +## (C) 2011 Andreas Kupries, BSD licensed. + +# Two convenience commands to make the writing of anonymous +# procedures, i.e. lambdas more proc-like. Instead of, for example, to +# write +# +# set f {::apply {{x} { .... }}} +# +# with its deep nesting of braces, or (if we wish to curry (*)) +# +# set f [list ::apply {{x y} { .... }} $valueforx] +# +# with a list command to insert the arguments, just write +# +# set f [lambda {x} { .... }] +# and +# set f [lambda {x y} { .... } $valueforx] +# +# (*) Pre-supply arguments to the anon proc, making the lambda a +# partial application. + +# # ## ### ##### ######## ############# #################### +## Requisites + +package require Tcl 8.5 + +# # ## ### ##### ######## ############# ##################### +## Public API implementation + +proc lambda {arguments body args} { + return [list ::apply [list $arguments $body] {*}$args] +} + +proc lambda@ {ns arguments body args} { + return [list ::apply [list $arguments $body $ns] {*}$args] +} + +# # ## ### ##### ######## ############# #################### +## Ready +package provide lambda 1 + diff -Nru tcllib-1.13-dfsg/modules/lambda/pkgIndex.tcl tcllib-1.14-dfsg/modules/lambda/pkgIndex.tcl --- tcllib-1.13-dfsg/modules/lambda/pkgIndex.tcl 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/lambda/pkgIndex.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -0,0 +1,8 @@ +#checker -scope global exclude warnUndefinedVar +# var in question is 'dir'. +if {![package vsatisfies [package provide Tcl] 8.5]} { + # PRAGMA: returnok + return +} +# Utility wrapper around ::apply for easier writing. +package ifneeded lambda 1 [list source [file join $dir lambda.tcl]] diff -Nru tcllib-1.13-dfsg/modules/ldap/ChangeLog tcllib-1.14-dfsg/modules/ldap/ChangeLog --- tcllib-1.13-dfsg/modules/ldap/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/ldap/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/log/ChangeLog tcllib-1.14-dfsg/modules/log/ChangeLog --- tcllib-1.13-dfsg/modules/log/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/log/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/map/ChangeLog tcllib-1.14-dfsg/modules/map/ChangeLog --- tcllib-1.13-dfsg/modules/map/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/map/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,17 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + +2011-03-24 Andreas Kupries + + * map_slippy.man: Documented the three coordinate systems used. + * map_slippy.tcl: Extended the testsuite to cover all coordinate + * map_slippy.test: conversions. Fixed a number of problems (wrong + * pkgIndex.tcl: scaling, bad rounding) uncovered by this. Bumped + package version to 0.4. + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/map/map_slippy.man tcllib-1.14-dfsg/modules/map/map_slippy.man --- tcllib-1.13-dfsg/modules/map/map_slippy.man 2011-01-25 05:38:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/map/map_slippy.man 2011-12-13 18:13:22.000000000 +0000 @@ -1,10 +1,10 @@ [comment {-*- tcl -*- doctools manpage}] -[manpage_begin map::slippy n 0.3] +[manpage_begin map::slippy n 0.4] [moddesc {Mapping utilities}] [titledesc {Common code for slippy based map packages}] [require Tcl 8.4] [require Tk 8.4] -[require map::slippy [opt 0.3]] +[require map::slippy [opt 0.4]] [description] This package provides a number of methods doing things needed by all @@ -61,7 +61,18 @@ Converts a geographical location at a zoom level ([arg geo], a list containing zoom level, latitude, and longitude, in this order) to a tile identifier (list containing zoom level, row, and column) at that -level. +level. The tile identifier uses pure integer numbers for the tile +coordinates, for all geographic coordinates mapping to that tile. + + +[call [cmd ::map::slippy] [method {geo 2tile.float}] [arg geo]] + +Converts a geographical location at a zoom level ([arg geo], a list +containing zoom level, latitude, and longitude, in this order) to a +tile identifier (list containing zoom level, row, and column) at that +level. The tile identifier uses floating point numbers for the tile +coordinates, representing not only the tile the geographic coordinates +map to, but also the fractional location inside of that tile. [call [cmd ::map::slippy] [method {geo 2point}] [arg geo]] @@ -103,6 +114,69 @@ [list_end] +[section {Coordinate systems}] + +The commands of this package operate on three distinct coordinate +systems, which are explained below. + +[subsection Geographic] + +[term Geographic]al coordinates are represented by [term Latitude] and +[term Longitude], each of which is measured in degrees, as they are +essentially angles. + +[para] [const Zero] longitude is the [term {Greenwich meridian}], with +positive values going [term east], and negative values going +[term west], for a total range of +/- 180 degrees. Note that +180 and +-180 longitude are the same [term meridian], opposite to greenwich. + +[para] [const zero] latitude the [term Equator], with positive values +going [term north] and negative values going [term south]. While the +true range is +/- 90 degrees the projection used by the package +requires us to cap the range at +/- 85.05112877983284 degrees. This +means that north and south pole are not representable and not part of +any map. + + +[subsection Tiles] + +While [sectref Geographic]al coordinates of the previous section are +independent of zoom level the [term {tile coordinates}] are not. + +[para] Generally the integer part of tile coordinates represent the +row and column number of the tile in question, wheras the fractional +parts signal how far inside the tile the location in question is, with +pure integer coordinates (no fractional part) representing the upper +left corner of the tile. + +[para] The zero point of the map is at the upper left corner, +regardless of zoom level, with larger coordinates going right (east) +and down (south), and smaller coordinates going left (west) and up +(north). Again regardless of zxoom level. + +[para] Negative tile coordinates are not allowed. + +[para] At zoom level 0 the whole map is represented by a single, +putting the geographic zero at 1/2, 1/2 of tile coordinates, and the +range of tile coordinates as [lb]0...1[rb]. + +[para] To go from a zoom level N to the next deeper level N+1 each +tile of level N is split into its four quadrants, which then are the +tiles of level N+1. + +[para] This means that at zoom level N the map is sliced (horizontally +and vertically) into 2^N stripes, for a total of 4^N tiles, with tile +coordinates ranging from 0 to 2^N+1. + + +[subsection Pixels/Points] + +[term {pixel coordinates}], also called [term {point coordinates}] are +in essence [sectref Tiles {tile coordinates}] scaled by the size of +the image representing a tile. This tile size currently has a fixed +value, [const 256]. + + [section References] [list_begin enum] diff -Nru tcllib-1.13-dfsg/modules/map/map_slippy.tcl tcllib-1.14-dfsg/modules/map/map_slippy.tcl --- tcllib-1.13-dfsg/modules/map/map_slippy.tcl 2011-01-25 05:38:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/map/map_slippy.tcl 2011-12-13 18:13:22.000000000 +0000 @@ -87,6 +87,19 @@ return [list $zoom $row $col] } + typemethod {geo 2tile.float} {geo} { + ::variable degtorad + ::variable pi + foreach {zoom lat lon} $geo break + # lat, lon are in degrees. + # The missing sec() function is computed using the 1/cos equivalency. + set tiles [tiles $zoom] + set latrad [expr {$degtorad * $lat}] + set row [expr {(1 - (log(tan($latrad) + 1.0/cos($latrad)) / $pi)) / 2 * $tiles}] + set col [expr {(($lon + 180.0) / 360.0) * $tiles}] + return [list $zoom $row $col] + } + typemethod {geo 2point} {geo} { ::variable degtorad ::variable pi @@ -118,9 +131,9 @@ # upper left corner of the tile. To get the pixel # location of the center simply add 0.5 to the row/col # values. - set tiles [tiles $zoom] - set y [expr {$tiles * $row}] - set x [expr {$tiles * $col}] + #set tiles [tiles $zoom] + set y [expr {$ourtilesize * $row}] + set x [expr {$ourtilesize * $col}] return [list $zoom $y $x] } @@ -129,17 +142,17 @@ ::variable pi foreach {zoom y x} $point break set length [expr {$ourtilesize * [tiles $zoom]}] - set lat [expr {$radtodeg * (atan(sinh($pi * (1 - 2 * $y / $length))))}] - set lon [expr {$x / $length * 360.0 - 180.0}] + set lat [expr {$radtodeg * (atan(sinh($pi * (1 - 2 * double($y) / $length))))}] + set lon [expr {double($x) / $length * 360.0 - 180.0}] return [list $zoom $lat $lon] } typemethod {point 2tile} {point} { foreach {zoom y x} $point break - set tiles [tiles $zoom] - set row [expr {$y / $tiles}] - set col [expr {$x / $tiles}] - return [list $zoom $y $x] + #set tiles [tiles $zoom] + set row [expr {double($y) / $ourtilesize}] + set col [expr {double($x) / $ourtilesize}] + return [list $zoom $row $col] } proc tiles {level} { @@ -160,4 +173,4 @@ # ### ### ### ######### ######### ######### ## Ready -package provide map::slippy 0.3 +package provide map::slippy 0.4 diff -Nru tcllib-1.13-dfsg/modules/map/map_slippy.test tcllib-1.14-dfsg/modules/map/map_slippy.test --- tcllib-1.13-dfsg/modules/map/map_slippy.test 2011-01-25 05:38:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/map/map_slippy.test 2011-12-13 18:13:22.000000000 +0000 @@ -7,7 +7,7 @@ # Copyright (c) 2010 Andreas Kupries # All rights reserved. # -# RCS: @(#) $Id: map_slippy.test,v 1.1 2010/05/27 18:48:20 andreas_kupries Exp $ +# RCS: @(#) $Id: map_slippy.test,v 1.2 2011/03/24 20:33:34 andreas_kupries Exp $ # ------------------------------------------------------------------------- @@ -44,7 +44,7 @@ proc matchNumbers {expected actual} { set match 1 foreach a $actual e $expected { - if {abs($a-$e) > 0.1e-4} { + if {abs($a-$e) > 1e-4} { set match 0 break } @@ -59,5 +59,86 @@ # ------------------------------------------------------------------------- test map-slippy-7.0 {tile 2geo} -body { - eval 4digits [::map::slippy tile 2geo [list 11 504 775]] -} -result {11.0 67.0674 -43.7695} + ::map::slippy tile 2geo {11 504 775} +} -match 4digits -result {11.0 67.0674 -43.7695} + +# ------------------------------------------------------------------------- +# Converting between the three coordinate systems. +# ------------------------------------------------------------------------- + +foreach {n tile point geo tilei} { + 0 {0 0 0} {0 0 0} {0 85.0511287798 -180.0} {0 0 0} + 1 {0 1 1} {0 256 256} {0 -85.0511287798 180.0} {0 0 1} + 2 {0 0.5 0.5} {0 128 128} {0 0 0} {0 0 0} + 3 {1 0 0} {1 0 0} {1 85.0511287798 -180.0} {1 0 0} + 4 {1 1 1} {1 256 256} {1 0 0} {1 1 1} + 5 {1 0.5 0.5} {1 128 128} {1 66.5132604431 -90.0} {1 0 0} + 6 {1 2 2} {1 512 512} {1 -85.0511287798 180.0} {1 1 2} + 7 {1 1.5 1.5} {1 384 384} {1 -66.5132604431 90.0} {1 1 1} +} { + # The tilei results for .1/.6 are + # |0 0 1| instead of |0 1 1| + # |1 1 2| |1 2 2| + # due to round off. As a float is it shown as 1.0, internally it + # is actually 0.9999... + + test map-slippy-8.$n {tile -> point} -body { + ::map::slippy tile 2point $tile + } -match 4digits -result $point + + test map-slippy-9.$n {point -> tile} -body { + ::map::slippy point 2tile $point + } -match 4digits -result $tile + + test map-slippy-10.$n {point -> tile -> point} -body { + ::map::slippy tile 2point [::map::slippy point 2tile $point] + } -match 4digits -result $point + + test map-slippy-11.$n {tile -> point -> tile} -body { + ::map::slippy point 2tile [::map::slippy tile 2point $tile] + } -match 4digits -result $tile + + test map-slippy-12.$n {tile -> geo} -body { + ::map::slippy tile 2geo $tile + } -match 4digits -result $geo + + test map-slippy-13.$n {geo -> tile/float} -body { + ::map::slippy geo 2tile.float $geo + } -match 4digits -result $tile + + test map-slippy-13a.$n {geo -> tile} -body { + ::map::slippy geo 2tile $geo + } -match 4digits -result $tilei + + test map-slippy-14.$n {geo -> tile/float -> geo} -body { + ::map::slippy tile 2geo [::map::slippy geo 2tile.float $geo] + } -match 4digits -result $geo + + test map-slippy-15.$n {tile/float -> geo -> tile/float} -body { + ::map::slippy geo 2tile.float [::map::slippy tile 2geo $tile] + } -match 4digits -result $tile + + test map-slippy-16.$n {point -> geo} -body { + ::map::slippy point 2geo $point + } -match 4digits -result $geo + + test map-slippy-17.$n {geo -> point} -body { + ::map::slippy geo 2point $geo + } -match 4digits -result $point + + test map-slippy-18.$n {geo -> point -> geo} -body { + ::map::slippy point 2geo [::map::slippy geo 2point $geo] + } -match 4digits -result $geo + + test map-slippy-19.$n {point -> geo -> point} -body { + ::map::slippy geo 2point [::map::slippy point 2geo $point] + } -match 4digits -result $point +} + +# ------------------------------------------------------------------------- +testsuiteCleanup + +# Local variables: +# mode: tcl +# indent-tabs-mode: nil +# End: diff -Nru tcllib-1.13-dfsg/modules/map/pkgIndex.tcl tcllib-1.14-dfsg/modules/map/pkgIndex.tcl --- tcllib-1.13-dfsg/modules/map/pkgIndex.tcl 2011-01-25 05:38:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/map/pkgIndex.tcl 2011-12-13 18:13:22.000000000 +0000 @@ -1,5 +1,5 @@ if {![package vsatisfies [package provide Tcl] 8.4]} {return} -package ifneeded map::slippy 0.3 [list source [file join $dir map_slippy.tcl]] +package ifneeded map::slippy 0.4 [list source [file join $dir map_slippy.tcl]] package ifneeded map::slippy::fetcher 0.2 [list source [file join $dir map_slippy_fetcher.tcl]] package ifneeded map::slippy::cache 0.2 [list source [file join $dir map_slippy_cache.tcl]] diff -Nru tcllib-1.13-dfsg/modules/mapproj/ChangeLog tcllib-1.14-dfsg/modules/mapproj/ChangeLog --- tcllib-1.13-dfsg/modules/mapproj/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/mapproj/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/math/ChangeLog tcllib-1.14-dfsg/modules/math/ChangeLog --- tcllib-1.13-dfsg/modules/math/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/math/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,8 +1,37 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + +2011-11-09 Andreas Kupries + + * decimal.test: More fixes, now the test succeeds as + well. 'Simply' required the proper conversions for arguments and + results as most commands do not take regular numbers. + +2011-11-07 Andreas Kupries + + * decimal.test: Fixed the testsuite to be at least properly + executable, i.e. bad file names and broken Tcl syntax. The + single test still but that sahall be a problem for the actual + maintainer. + +2011-08-09 Andreas Kupries + + * decimal.man: [Bug 3383039]: Fixed syntax errors in the + documentation of math::decimal, reported by Thomas Perschak + + +2011-03-29 Andreas Kupries + + * linalg.man: Documentation tweak, added keyword 'matrix'. + 2011-01-24 Andreas Kupries * * Released and tagged Tcllib 1.13 ======================== - * + * 2011-01-12 Andreas Kupries diff -Nru tcllib-1.13-dfsg/modules/math/decimal.man tcllib-1.14-dfsg/modules/math/decimal.man --- tcllib-1.13-dfsg/modules/math/decimal.man 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/math/decimal.man 2011-12-13 18:13:23.000000000 +0000 @@ -0,0 +1,207 @@ +[comment {-*- tcl -*- doctools manpage}] +[manpage_begin ::Decimal n 1.0.2] +[copyright {2011 Mark Alston }] +[moddesc {Tcl Decimal Arithmetic Library}] +[titledesc {General decimal arithmetic}] +[category Mathematics] +[require Tcl [opt 8.5]] + +[description] +[para] +The decimal package provides decimal arithmetic support for both limited +precision floating point and arbitrary precision floating point. +Additionally, integer arithmetic is supported. +[para] +More information and the specifications on which this package depends can be +found on the general decimal arithmetic page at http://speleotrove.com/decimal + +This package provides for: +[list_begin itemized] +[item] +A new data type decimal which is represented as a list containing sign, +mantissa and exponent. +[item] +Arithmetic operations on those decimal numbers such as addition, subtraction, +multiplication, etc... + +[list_end] +[para] +Numbers are converted to decimal format using the operation ::Decimal::fromstr. +[para] +Numbers are converted back to string format using the operation +::Decimal::tostr. + +[para] + +[section "EXAMPLES"] +This section shows some simple examples. Since the purpose of this library +is to perform decimal math operations, examples may be the simplest way +to learn how to work with it and to see the difference between using this +package and sticking with expr. Consult the API section of +this man page for information about individual procedures. + +[para] +[example_begin] + package require decimal + + # Various operations on two numbers. + # We first convert them to decimal format. + set a [lb]::Decimal::fromstr 8.2[rb] + set b [lb]::Decimal::fromstr .2[rb] + + # Then we perform our operations. Here we multiply + set c [lb]::Decimal::* $a $b[rb] + + # Finally we convert back to string format for presentation to the user. + puts [lb]::Decimal::tostr $c[rb] ; # => will output 8.4 + + # Other examples + # + # Subtraction + set c [lb]::Decimal::- $a $b[rb] + puts [lb]::Decimal::tostr $c[rb] ; # => will output 8.0 + + # Why bother using this instead of simply expr? + puts [expr {8.2 + .2}] ; # => will output 8.399999999999999 + puts [expr {8.2 - .2}] ; # => will output 7.999999999999999 + # See http://speleotrove.com/decimal to learn more about why this happens. +[example_end] + + +[section "API"] +[list_begin definitions] + +[call [cmd ::Decimal::fromstr] [arg string]] +Convert [emph string] into a decimal. + +[call [cmd ::Decimal::tostr] [arg decimal]] +Convert [emph decimal] into a string representing the number in base 10. + +[call [cmd ::Decimal::setVariable] [arg variable] [arg setting]] +Sets the [emph variable] to [emph setting]. Valid variables are: +[list_begin itemized] +[item][arg rounding] - Method of rounding to use during rescale. Valid + methods are round_half_even, round_half_up, round_half_down, + round_down, round_up, round_floor, round_ceiling. +[item][arg precision] - Maximum number of digits allowed in mantissa. +[item][arg extended] - Set to 1 for extended mode. 0 for simplified mode. +[item][arg maxExponent] - Maximum value for the exponent. Defaults to 999. +[item][arg minExponent] - Minimum value for the exponent. Default to -998. +[list_end] +[call [cmd ::Decimal::add] [arg a] [arg b]] +[call [cmd ::Decimal::+] [arg a] [arg b]] +Return the sum of the two decimals [emph a] and [emph b]. + +[call [cmd ::Decimal::subtract] [arg a] [arg b]] +[call [cmd ::Decimal::-] [arg a] [arg b]] +Return the differnece of the two decimals [emph a] and [emph b]. + +[call [cmd ::Decimal::multiply] [arg a] [arg b]] +[call [cmd ::Decimal::*] [arg a] [arg b]] +Return the product of the two decimals [emph a] and [emph b]. + +[call [cmd ::Decimal::divide] [arg a] [arg b]] +[call [cmd ::Decimal::/] [arg a] [arg b]] +Return the quotient of the division between the two +decimals [emph a] and [emph b]. + +[call [cmd ::Decimal::divideint] [arg a] [arg b]] +Return a the integer portion of the quotient of the division between +decimals [emph a] and [emph b] + +[call [cmd ::Decimal::remainder] [arg a] [arg b]] +Return the remainder of the division between the two +decimals [emph a] and [emph b]. + +[call [cmd ::Decimal::abs] [arg decimal]] +Return the absolute value of the decimal. + +[call [cmd ::Decimal::compare] [arg a] [arg b]] +Compare the two decimals a and b, returning [emph 0] if [emph {a == b}], +[emph 1] if [emph {a > b}], and [emph -1] if [emph {a < b}]. + +[call [cmd ::Decimal::max] [arg a] [arg b]] +Compare the two decimals a and b, and return [emph a] if [emph {a >= b}], and [emph b] if [emph {a < b}]. + +[call [cmd ::Decimal::maxmag] [arg a] [arg b]] +Compare the two decimals a and b while ignoring their signs, and return [emph a] if [emph {abs(a) >= abs(b)}], and [emph b] if [emph {abs(a) < abs(b)}]. + +[call [cmd ::Decimal::min] [arg a] [arg b]] +Compare the two decimals a and b, and return [emph a] if [emph {a <= b}], and [emph b] if [emph {a > b}]. + +[call [cmd ::Decimal::minmag] [arg a] [arg b]] +Compare the two decimals a and b while ignoring their signs, and return [emph a] if [emph {abs(a) <= abs(b)}], and [emph b] if [emph {abs(a) > abs(b)}]. + +[call [cmd ::Decimal::plus] [arg a]] +Return the result from [emph {::Decimal::+ 0 $a}]. + +[call [cmd ::Decimal::minus] [arg a]] +Return the result from [emph {::Decimal::- 0 $a}]. + +[call [cmd ::Decimal::copynegate] [arg a]] +Returns [emph a] with the sign flipped. + +[call [cmd ::Decimal::copysign] [arg a] [arg b]] +Returns [emph a] with the sign set to the sign of the [emph b]. + +[call [cmd ::Decimal::is-signed] [arg decimal]] +Return the sign of the decimal. +The procedure returns 0 if the number is positive, 1 if it's negative. + +[call [cmd ::Decimal::is-zero] [arg decimal]] +Return true if [emph decimal] value is zero, otherwise false is returned. + +[call [cmd ::Decimal::is-NaN] [arg decimal]] +Return true if [emph decimal] value is NaN (not a number), otherwise false is returned. + +[call [cmd ::Decimal::is-infinite] [arg decimal]] +Return true if [emph decimal] value is Infinite, otherwise false is returned. + +[call [cmd ::Decimal::is-finite] [arg decimal]] +Return true if [emph decimal] value is finite, otherwise false is returned. + +[call [cmd ::Decimal::fma] [arg a] [arg b] [arg c]] +Return the result from first multiplying [emph a] by [emph b] and then adding [emph c]. Rescaling only occurs after completion of all operations. In this way the result may vary from that returned by performing the operations individually. + +[call [cmd ::Decimal::round_half_even] [arg decimal] [arg digits]] +Rounds [emph decimal] to [emph digits] number of decimal points with the following rules: Round to the nearest. If equidistant, round so the final digit is even. + +[call [cmd ::Decimal::round_half_up] [arg decimal] [arg digits]] +Rounds [emph decimal] to [emph digits] number of decimal points with the following rules: Round to the nearest. If equidistant, round up. + +[call [cmd ::Decimal::round_half_down] [arg decimal] [arg digits]] +Rounds [emph decimal] to [emph digits] number of decimal points with the following rules: Round to the nearest. If equidistant, round down. + +[call [cmd ::Decimal::round_down] [arg decimal] [arg digits]] +Rounds [emph decimal] to [emph digits] number of decimal points with the following rules: Round toward 0. (Truncate) + +[call [cmd ::Decimal::round_up] [arg decimal] [arg digits]] +Rounds [emph decimal] to [emph digits] number of decimal points with the following rules: Round away from 0 + +[call [cmd ::Decimal::round_floor] [arg decimal] [arg digits]] +Rounds [emph decimal] to [emph digits] number of decimal points with the following rules: Round toward -Infinity. + +[call [cmd ::Decimal::round_ceiling] [arg decimal] [arg digits]] +Rounds [emph decimal] to [emph digits] number of decimal points with the following rules: Round toward Infinity + +[call [cmd ::Decimal::round_05up] [arg decimal] [arg digits]] +Rounds [emph decimal] to [emph digits] number of decimal points with the following rules: Round zero or five away from 0. The same as round-up, except that rounding up only occurs if the digit to be rounded up is 0 or 5, and after overflow +the result is the same as for round-down. + +[list_end] +[para] + +[section {BUGS, IDEAS, FEEDBACK}] + +This document, and the package it describes, will undoubtedly contain +bugs and other problems. + +Please report such in the category [emph {Decimal}] of the +[uri {http://sourceforge.net/tracker/?group_id=12883} {Tcllib SF Trackers}]. + +Please also report any ideas for enhancements you may have for either +package and/or documentation. + + +[keywords tcl decimal math] +[manpage_end] diff -Nru tcllib-1.13-dfsg/modules/math/decimal.tcl tcllib-1.14-dfsg/modules/math/decimal.tcl --- tcllib-1.13-dfsg/modules/math/decimal.tcl 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/math/decimal.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -0,0 +1,1737 @@ +package require Tcl 8.5 +package provide math::decimal 1.0.2 +# +# Copyright 2011 Mark Alston. All rights reserved. +# +# Redistribution and use in source and binary forms, with or +# without modification, are permitted provided that the following +# conditions are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY Mark Alston ``AS IS'' AND ANY EXPRESS +# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL Mark Alston OR CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# +# decimal.tcl -- +# +# Tcl implementation of a General Decimal Arithmetic as defined +# by the IEEE 754 standard as given on http:://speleotrove.com/decimal +# +# Decimal numbers are defined as a list of sign mantissa exponent +# +# The following operations are current implemented: +# +# fromstr tostr -- for converting to and from decimal numbers. +# +# add subtract divide multiply abs compare -- basic operations +# max min plus minus copynegate copysign is-zero is-signed +# is-NaN is-infinite is-finite +# +# round_half_even round_half_up round_half_down -- rounding methods +# round_down round_up round_floor round_ceiling +# round_05up +# +# By setting the extended variable to 0 you get the behavior of the decimal +# subset arithmetic X3.274 as defined on +# http://speleotrove.com/decimal/dax3274.html#x3274 +# +# This package passes all tests in test suites: +# http://speleotrove.com/decimal/dectest.html +# and http://speleotrove.com/decimal/dectest0.html +# +# with the following exceptions: +# +# This version fails some tests that require setting the max +# or min exponent to force truncation or rounding. +# +# This version fails some tests which require the sign of zero to be set +# correctly during rounding +# +# This version cannot handle sNaN's (Not sure that they are of any use for +# tcl programmers anyway. +# +# If you find errors in this code please let me know at +# mark at beernut dot com +# +# Decimal -- +# Namespace for the decimal arithmetic procedures +# +namespace eval ::math::decimal { + variable precision 20 + variable maxExponent 999 + variable minExponent -998 + variable tinyExponent [expr {$minExponent - ($precision - 1)}] + variable rounding half_up + variable extended 1 + + # Some useful variables to set. + variable zero [list 0 0 0] + variable one [list 0 1 0] + variable ten [list 0 1 1] + variable onehundred [list 0 1 2] + variable minusone [list 1 1 0] + + namespace export tostr fromstr setVariable getVariable\ + add + subtract - divide / multiply * \ + divide-int remainder \ + fma fused-multiply-add \ + plus minus copynegate negate copysign \ + abs compare max min \ + is-zero is-signed is-NaN is-infinite is-finite \ + round_half_even round_half_up round_half_down \ + round_down round_up round_floor round_ceiling round_05up + +} + +# setVariable +# Set the desired variable +# +# Arguments: +# variable setting +# +# Result: +# None +# +proc ::math::decimal::setVariable {variable setting} { + variable rounding + variable precision + variable extended + variable maxExponent + variable minExponent + variable tinyExponent + + switch -nocase -- $variable { + rounding {set rounding $setting} + precision {set precision $setting} + extended {set extended $setting} + maxExponent {set maxExponent $setting} + minExponent { + set minExponent $setting + set tinyExponent [expr {$minExponent - ($precision - 1)}] + } + default {} + } +} + +# setVariable +# Set the desired variable +# +# Arguments: +# variable setting +# +# Result: +# None +# +proc ::math::decimal::getVariable {variable} { + variable rounding + variable precision + variable extended + variable maxExponent + variable minExponent + + switch -- $variable { + rounding {return $rounding} + precision {return $precision} + extended {return $extended} + maxExponent {return $maxExponent} + minExponent {return $minExponent} + default {} + } +} + +# add or + +# Add two numbers +# +# Arguments: +# a First operand +# b Second operand +# +# Result: +# Sum of both (rescaled) +# +proc ::math::decimal::add {a b {rescale 1}} { + return [+ $a $b $rescale] +} + +proc ::math::decimal::+ {a b {rescale 1}} { + variable extended + variable rounding + foreach {sa ma ea} $a {break} + foreach {sb mb eb} $b {break} + + if {!$extended} { + if {$ma == 0 } { + return $b + } + if {$mb == 0 } { + return $a + } + } + + if { $ma eq "NaN" || $mb eq "NaN" } { + return [list 0 "NaN" 0] + } + + if { $ma eq "Inf" || $mb eq "Inf" } { + if { $ma ne "Inf" } { + return $b + } elseif { $mb ne "Inf" } { + return $a + } elseif { $sb != $sa } { + return [list 0 "NaN" 0] + } else { + return $a + } + } + + if { $ea > $eb } { + set ma [expr {$ma * 10 ** ($ea-$eb)}] + set er $eb + } else { + set mb [expr {$mb * 10 ** ($eb-$ea)}] + set er $ea + } + if { $sa == $sb } { + # Both are either postive or negative + # Sign remains the same. + set mr [expr {$ma + $mb}] + set sr $sa + } else { + # one is negative and one is positive. + # Set sign to the same as the larger number + # and subract the smaller from the larger. + if { $ma > $mb } { + set sr $sa + set mr [expr {$ma - $mb}] + } elseif { $mb > $ma } { + set sr $sb + set mr [expr {$mb - $ma}] + } else { + if { $rounding == "floor" } { + set sr 1 + } else { + set sr 0 + } + set mr 0 + } + } + if { $rescale } { + return [Rescale [list $sr $mr $er]] + } else { + return [list $sr $mr $er] + } +} + +# copynegate -- +# Takes one operand and returns a copy with the sign inverted. +# In this implementation it works nearly the same as minus +# but is probably much faster. The main difference is that no +# rescaling is done. +# +# +# Arguments: +# a operand +# +# Result: +# a with sign flipped +# +proc ::math::decimal::negate { a } { + return [copynegate $a] +} + +proc ::math::decimal::copynegate { a } { + lset a 0 [expr {![lindex $a 0]}] + return $a +} + +# copysign -- +# Takes two operands and returns a copy of the first with the +# sign set to the sign of the second. +# +# +# Arguments: +# a operand +# b operand +# +# Result: +# b with a's sign +# +proc ::math::decimal::copysign { a b } { + lset a 0 [lindex $b 0] + return $a +} + +# minus -- +# subtract 0 $a +# +# Note: does not pass all tests on extended mode. +# +# Arguments: +# a operand +# +# Result: +# 0 - $a +# +proc ::math::decimal::minus { a } { + return [- [list 0 0 0] $a] +} + +# plus -- +# add 0 $a +# +# Note: does not pass all tests on extended mode. +# +# Arguments: +# a operand +# +# Result: +# 0 + $a +# +proc ::math::decimal::plus {a} { + return [+ [list 0 0 0] $a] +} + + + +# subtract or - +# Subtract two numbers (or unary minus) +# +# Arguments: +# a First operand +# b Second operand (optional) +# +# Result: +# Sum of both (rescaled) +# +proc ::math::decimal::subtract {a {b {}} {rescale 1}} { + return [- $a $b] +} + +proc ::math::decimal::- {a {b {}} {rescale 1}} { + variable extended + + if {!$extended} { + foreach {sa ma ea} $a {break} + foreach {sb mb eb} $b {break} + if {$ma == 0 } { + lset b 0 [expr {![lindex $b 0]}] + return $b + } + if {$mb == 0 } { + return $a + } + } + + if { $b == {} } { + lset a 0 [expr {![lindex $a 0]}] + return $a + } else { + lset b 0 [expr {![lindex $b 0]}] + return [+ $a $b $rescale] + } +} + + +# compare +# Compare two numbers. +# +# Arguments: +# a First operand +# b Second operand +# +# Result: +# 1 if a is larger than b +# 0 if a is equal to b +# -1 if a is smaller than b. +# +proc ::math::decimal::compare {a b} { + foreach {sa ma ea} $a {break} + foreach {sb mb eb} $b {break} + + if { $sa != $sb } { + if {$ma != 0 } { + set ma 1 + set ea 0 + } elseif { $mb != 0 } { + set mb 1 + set eb 0 + } else { + return 0 + } + } + if { $ma eq "Inf" && $mb eq "Inf" } { + if { $sa == $sb } { + return 0 + } elseif { $sa > $sb } { + return -1 + } else { + return 1 + } + } + + set comparison [- [list $sa $ma $ea] [list $sb $mb $eb] 0] + + if { [lindex $comparison 0] && [lindex $comparison 1] != 0 } { + return -1 + } elseif { [lindex $comparison 1] == 0 } { + return 0 + } else { + return 1 + } +} + +# min +# Return the smaller of two numbers +# +# Arguments: +# a First operand +# b Second operand +# +# Result: +# smaller of a or b +# +proc ::math::decimal::min {a b} { + foreach {sa ma ea} $a {break} + foreach {sb mb eb} $b {break} + + if { $sa != $sb } { + if {$ma != 0 } { + set ma 1 + set ea 0 + } elseif { $mb != 0 } { + set mb 1 + set eb 0 + } + } + if { $ma eq "Inf" && $mb eq "Inf" } { + if { $sa == $sb } { + return [list $sa "Inf" 0] + } else { + return [list 1 "Inf" 0] + } + } + + set comparison [compare [list $sa $ma $ea] [list $sb $mb $eb]] + + if { $comparison == 1 } { + return [Rescale $b] + } elseif { $comparison == -1 } { + return [Rescale $a] + } elseif { $sb != $sa } { + if { $sa } { + return [Rescale $a] + } else { + return [Rescale $b] + } + } elseif { $sb && $eb > $ea } { + # Both are negative and the same numerically. So return the one with the largest exponent. + return [Rescale $b] + } elseif { $sb } { + # Negative with $eb < $ea now. + return [Rescale $a] + } elseif { $ea > $eb } { + # Both are positive so return the one with the smaller + return [Rescale $b] + } else { + return [Rescale $a] + } +} + +# max +# Return the larger of two numbers +# +# Arguments: +# a First operand +# b Second operand +# +# Result: +# larger of a or b +# +proc ::math::decimal::max {a b} { + foreach {sa ma ea} $a {break} + foreach {sb mb eb} $b {break} + + if { $sa != $sb } { + if {$ma != 0 } { + set ma 1 + set ea 0 + } elseif { $mb != 0 } { + set mb 1 + set eb 0 + } + } + if { $ma eq "Inf" && $mb eq "Inf" } { + if { $sa == $sb } { + return [list $sa "Inf" 0] + } else { + return [list 0 "Inf" 0] + } + } + + set comparison [compare [list $sa $ma $ea] [list $sb $mb $eb]] + + if { $comparison == 1 } { + return [Rescale $a] + } elseif { $comparison == -1 } { + return [Rescale $b] + } elseif { $sb != $sa } { + if { $sa } { + return [Rescale $b] + } else { + return [Rescale $a] + } + } elseif { $sb && $eb > $ea } { + # Both are negative and the same numerically. So return the one with the smallest exponent. + return [Rescale $a] + } elseif { $sb } { + # Negative with $eb < $ea now. + return [Rescale $b] + } elseif { $ea > $eb } { + # Both are positive so return the one with the larger exponent + return [Rescale $a] + } else { + return [Rescale $b] + } +} + +# maxmag -- max-magnitude +# Return the larger of two numbers ignoring their signs. +# +# Arguments: +# a First operand +# b Second operand +# +# Result: +# larger of a or b ignoring their signs. +# +proc ::math::decimal::maxmag {a b} { + foreach {sa ma ea} $a {break} + foreach {sb mb eb} $b {break} + + + if { $ma eq "Inf" && $mb eq "Inf" } { + if { $sa == 0 || $sb == 0 } { + return [list 0 "Inf" 0] + } else { + return [list 1 "Inf" 0] + } + } + + set comparison [compare [list 0 $ma $ea] [list 0 $mb $eb]] + + if { $comparison == 1 } { + return [Rescale $a] + } elseif { $comparison == -1 } { + return [Rescale $b] + } elseif { $sb != $sa } { + if { $sa } { + return [Rescale $b] + } else { + return [Rescale $a] + } + } elseif { $sb && $eb > $ea } { + # Both are negative and the same numerically. So return the one with the smallest exponent. + return [Rescale $a] + } elseif { $sb } { + # Negative with $eb < $ea now. + return [Rescale $b] + } elseif { $ea > $eb } { + # Both are positive so return the one with the larger exponent + return [Rescale $a] + } else { + return [Rescale $b] + } +} + +# minmag -- min-magnitude +# Return the smaller of two numbers ignoring their signs. +# +# Arguments: +# a First operand +# b Second operand +# +# Result: +# smaller of a or b ignoring their signs. +# +proc ::math::decimal::minmag {a b} { + foreach {sa ma ea} $a {break} + foreach {sb mb eb} $b {break} + + if { $ma eq "Inf" && $mb eq "Inf" } { + if { $sa == 1 || $sb == 1 } { + return [list 1 "Inf" 0] + } else { + return [list 0 "Inf" 0] + } + } + + set comparison [compare [list 0 $ma $ea] [list 0 $mb $eb]] + + if { $comparison == 1 } { + return [Rescale $b] + } elseif { $comparison == -1 } { + return [Rescale $a] + } else { + # They compared the same so now we use a normal comparison including the signs. This is per the specs. + if { $sa > $sb } { + return [Rescale $a] + } elseif { $sb > $sa } { + return [Rescale $b] + } elseif { $sb && $eb > $ea } { + # Both are negative and the same numerically. So return the one with the largest exponent. + return [Rescale $b] + } elseif { $sb } { + # Negative with $eb < $ea now. + return [Rescale $a] + } elseif { $ea > $eb } { + return [Rescale $b] + } else { + return [Rescale $a] + } + } +} + +# fma - fused-multiply-add +# Takes three operands. Multiplies the first two and then adds the third. +# Only one rounding (Rescaling) takes place at the end instead of after +# both the multiplication and again after the addition. +# +# Arguments: +# a First operand +# b Second operand +# c Third operand +# +# Result: +# (a*b)+c +# +proc ::math::decimal::fused-multiply-add {a b c} { + return [fma $a $b $c] +} + +proc ::math::decimal::fma {a b c} { + return [+ $c [* $a $b 0]] +} + +# multiply or * +# Multiply two numbers +# +# Arguments: +# a First operand +# b Second operand +# +# Result: +# Product of both (rescaled) +# +proc ::math::decimal::multiply {a b {rescale 1}} { + return [* $a $b $rescale] +} + +proc ::math::decimal::* {a b {rescale 1}} { + foreach {sa ma ea} $a {break} + foreach {sb mb eb} $b {break} + + if { $ma eq "NaN" || $mb eq "NaN" } { + return [list 0 "NaN" 0] + } + + set sr [expr {$sa^$sb}] + + if { $ma eq "Inf" || $mb eq "Inf" } { + if { $ma == 0 || $mb == 0 } { + return [list 0 "NaN" 0] + } else { + return [list $sr "Inf" 0] + } + } + + set mr [expr {$ma * $mb}] + set er [expr {$ea + $eb}] + + + if { $rescale } { + return [Rescale [list $sr $mr $er]] + } else { + return [list $sr $mr $er] + } +} + +# divide or / +# Divide two numbers +# +# Arguments: +# a First operand +# b Second operand +# +# Result: +# Quotient of both (rescaled) +# +proc ::math::decimal::divide {a b {rescale 1}} { + return [/ $a $b] +} + +proc ::math::decimal::/ {a b {rescale 1}} { + variable precision + + foreach {sa ma ea} $a {break} + foreach {sb mb eb} $b {break} + + if { $ma eq "NaN" || $mb eq "NaN" } { + return [list 0 "NaN" 0] + } + + set sr [expr {$sa^$sb}] + + if { $ma eq "Inf" } { + if { $mb ne "Inf"} { + return [list $sr "Inf" 0] + } else { + return [list 0 "NaN" 0] + } + } + + if { $mb eq "Inf" } { + if { $ma ne "Inf"} { + return [list $sr 0 0] + } else { + return [list 0 "NaN" 0] + } + } + + if { $mb == 0 } { + if { $ma == 0 } { + return [list 0 "NaN" 0] + } else { + return [list $sr "Inf" 0] + } + } + set adjust 0 + set mr 0 + + + if { $ma == 0 } { + set er [expr {$ea - $eb}] + return [list $sr 0 $er] + } + if { $ma < $mb } { + while { $ma < $mb } { + set ma [expr {$ma * 10}] + incr adjust + } + } elseif { $ma >= $mb * 10 } { + while { $ma >= [expr {$mb * 10}] } { + set mb [expr {$mb * 10}] + incr adjust -1 + } + } + + while { 1 } { + while { $mb <= $ma } { + set ma [expr {$ma - $mb}] + incr mr + } + if { ( $ma == 0 && $adjust >= 0 ) || [string length $mr] > $precision + 1 } { + break + } else { + set ma [expr {$ma * 10}] + set mr [expr {$mr * 10}] + incr adjust + } + } + + set er [expr {$ea - ($eb + $adjust)}] + + if { $rescale } { + return [Rescale [list $sr $mr $er]] + } else { + return [list $sr $mr $er] + } +} + +# divideint -- Divide integer +# Divide a by b and return the integer part of the division. +# +# Basically, if we send a and b to the divideint (which returns i) +# and remainder function (which returns r) then the following is true: +# a = i*b + r +# +# Arguments: +# a First operand +# b Second operand +# +# +proc ::math::decimal::divideint { a b } { + foreach {sa ma ea} $a {break} + foreach {sb mb eb} $b {break} + set sr [expr {$sa^$sb}] + + + + if { $sr == 1 } { + set sign_string "-" + } else { + set sign_string "" + } + + if { ($ma eq "NaN" || $mb eq "NaN") || ($ma == 0 && $mb == 0 ) } { + return "NaN" + } + + if { $ma eq "Inf" || $mb eq "Inf" } { + if { $ma eq $mb } { + return "NaN" + } elseif { $mb eq "Inf" } { + return "${sign_string}0" + } else { + return "${sign_string}Inf" + } + } + + if { $mb == 0 } { + return "${sign_string}Inf" + } + if { $mb == "Inf" } { + return "${sign_string}0" + } + set adjust [expr {abs($ea - $eb)}] + if { $ea < $eb } { + set a_adjust 0 + set b_adjust $adjust + } elseif { $ea > $eb } { + set b_adjust 0 + set a_adjust $adjust + } else { + set a_adjust 0 + set b_adjust 0 + } + + set integer [expr {($ma*10**$a_adjust)/($mb*10**$b_adjust)}] + return $sign_string$integer +} + +# remainder -- Remainder from integer division. +# Divide a by b and return the remainder part of the division. +# +# Basically, if we send a and b to the divideint (which returns i) +# and remainder function (which returns r) then the following is true: +# a = i*b + r +# +# Arguments: +# a First operand +# b Second operand +# +# +proc ::math::decimal::remainder { a b } { + foreach {sa ma ea} $a {break} + foreach {sb mb eb} $b {break} + + if { $sa == 1 } { + set sign_string "-" + } else { + set sign_string "" + } + + if { ($ma eq "NaN" || $mb eq "NaN") || ($ma == 0 && $mb == 0 ) } { + if { $mb eq "NaN" && $mb ne $ma } { + if { $sb == 1 } { + set sign_string "-" + } else { + set sign_string "" + } + return "${sign_string}NaN" + } elseif { $ma eq "NaN" } { + return "${sign_string}NaN" + } else { + return "NaN" + } + } elseif { $mb == 0 } { + return "NaN" + } + + if { $ma eq "Inf" || $mb eq "Inf" } { + if { $ma eq $mb } { + return "NaN" + } elseif { $mb eq "Inf" } { + return [tostr $a] + } else { + return "NaN" + } + } + + if { $mb == 0 } { + return "${sign_string}Inf" + } + if { $mb == "Inf" } { + return "${sign_string}0" + } + + lset a 0 0 + lset b 0 0 + if { $mb == 0 } { + return "${sign_string}Inf" + } + if { $mb == "Inf" } { + return "${sign_string}0" + } + + set adjust [expr {abs($ea - $eb)}] + if { $ea < $eb } { + set a_adjust 0 + set b_adjust $adjust + } elseif { $ea > $eb } { + set b_adjust 0 + set a_adjust $adjust + } else { + set a_adjust 0 + set b_adjust 0 + } + + set integer [expr {($ma*10**$a_adjust)/($mb*10**$b_adjust)}] + + set remainder [tostr [- $a [* [fromstr $integer] $b 0]]] + return $sign_string$remainder +} + + +# abs -- +# Returns the Absolute Value of a number +# +# Arguments: +# Number in the form of {sign mantisse exponent} +# +# Result: +# Absolute value (as a list) +# + proc ::math::decimal::abs {a} { + lset a 0 0 + return [Rescale $a] + } + + +# Rescale -- +# Rescale the number (using proper rounding) +# +# Arguments: +# a Number in decimal format +# +# Result: +# Rescaled number +# +proc ::math::decimal::Rescale { a } { + + + + variable precision + variable rounding + variable maxExponent + variable minExponent + variable tinyExponent + + foreach {sign mantisse exponent} $a {break} + + set man_length [string length $mantisse] + + set adjusted_exponent [expr {$exponent + ($man_length -1)}] + + if { $adjusted_exponent < $tinyExponent } { + set mantisse [lindex [round_$rounding [list $sign $mantisse [expr {abs($tinyExponent) - abs($adjusted_exponent)}]] 0] 1] + return [list $sign $mantisse $tinyExponent] + } elseif { $adjusted_exponent > $maxExponent } { + if { $mantisse == 0 } { + return [list $sign 0 $maxExponent] + } else { + switch -- $rounding { + half_even - + half_up { return [list $sign "Inf" 0] } + down - + 05up { + return [list $sign [string repeat 9 $precision] $maxExponent] + } + ceiling { + if { $sign } { + return [list $sign [string repeat 9 $precision] $maxExponent] + } else { + return [list 0 "Inf" 0] + } + } + floor { + if { !$sign } { + return [list $sign [string repeat 9 $precision] $maxExponent] + } else { + return [list 1 "Inf" 0] + } + } + default { } + } + } + } + + if { $man_length <= $precision } { + return [list $sign $mantisse $exponent] + } + + set mantisse [lindex [round_$rounding [list $sign $mantisse [expr {$precision - $man_length}]] 0] 1] + set exponent [expr {$exponent + ($man_length - $precision)}] + + # it is possible now that our rounding gave us a new digit in our mantisse + # example rounding 999.9 to 1 digits with precision 3 will give us + # 1000 back. + # This can only happen by adding a zero on the end of our mantisse however. + # So we just chomp it off. + + set man_length_now [string length $mantisse] + if { $man_length_now > $precision } { + set mantisse [string range $mantisse 0 end-1] + incr exponent + # Check again to see if we have overflowed + # we change our test to >= because we have incremented exponent. + if { $adjusted_exponent >= $maxExponent } { + switch -- $rounding { + half_even - + half_up { return [list $sign "Inf" 0] } + down - + 05up { + return [list $sign [string repeat 9 $precision] $maxExponent] + } + ceiling { + if { $sign } { + return [list $sign [string repeat 9 $precision] $maxExponent] + } else { + return [list 0 "Inf" 0] + } + } + floor { + if { !$sign } { + return [list $sign [string repeat 9 $precision] $maxExponent] + } else { + return [list 1 "Inf" 0] + } + } + default { } + } + } + } + return [list $sign $mantisse $exponent] +} + +# tostr -- +# Convert number to string using appropriate method depending on extended +# attribute setting. +# +# Arguments: +# number Number to be converted +# +# Result: +# Number in the form of a string +# +proc ::math::decimal::tostr { number } { + variable extended + switch -- $extended { + 0 { return [tostr_numeric $number] } + 1 { return [tostr_scientific $number] } + } +} + +# tostr_scientific -- +# Convert number to string using scientific notation as called for in +# Decmath specifications. +# +# Arguments: +# number Number to be converted +# +# Result: +# Number in the form of a string +# +proc ::math::decimal::tostr_scientific {number} { + foreach {sign mantisse exponent} $number {break} + + if { $sign } { + set sign_string "-" + } else { + set sign_string "" + } + + if { $mantisse eq "NaN" } { + return "NaN" + } + if { $mantisse eq "Inf" } { + return ${sign_string}${mantisse} + } + + + set digits [string length $mantisse] + set adjusted_exponent [expr {$exponent + $digits - 1}] + + # Why -6? Go read the specs on the website mentioned in the header. + # They choose it, I'm using it. They actually list some good reasons though. + if { $exponent <= 0 && $adjusted_exponent >= -6 } { + if { $exponent == 0 } { + set string $mantisse + } else { + set exponent [expr {abs($exponent)}] + if { $digits > $exponent } { + set string [string range $mantisse 0 [expr {$digits-$exponent-1}]].[string range $mantisse [expr {$digits-$exponent}] end] + set exponent [expr {-$exponent}] + } else { + set string 0.[string repeat 0 [expr {$exponent-$digits}]]$mantisse + } + } + } elseif { $exponent <= 0 && $adjusted_exponent < -6 } { + if { $digits > 1 } { + + set string [string range $mantisse 0 0].[string range $mantisse 1 end] + + set exponent [expr {$exponent + $digits - 1}] + set string "${string}E${exponent}" + } else { + set string "${mantisse}E${exponent}" + } + } else { + if { $adjusted_exponent >= 0 } { + set adjusted_exponent "+$adjusted_exponent" + } + if { $digits > 1 } { + set string "[string range $mantisse 0 0].[string range $mantisse 1 end]E$adjusted_exponent" + } else { + set string "${mantisse}E$adjusted_exponent" + } + } + return $sign_string$string +} + +# tostr_numeric -- +# Convert number to string using the simplified number set conversion +# from the X3.274 subset of Decimal Arithmetic specifications. +# +# Arguments: +# number Number to be converted +# +# Result: +# Number in the form of a string +# +proc ::math::decimal::tostr_numeric {number} { + variable precision + foreach {sign mantisse exponent} $number {break} + + if { $sign } { + set sign_string "-" + } else { + set sign_string "" + } + + if { $mantisse eq "NaN" } { + return "NaN" + } + if { $mantisse eq "Inf" } { + return ${sign_string}${mantisse} + } + + set digits [string length $mantisse] + set adjusted_exponent [expr {$exponent + $digits - 1}] + + if { $mantisse == 0 } { + set string 0 + set sign_string "" + } elseif { $exponent <= 0 && $adjusted_exponent >= -6 } { + if { $exponent == 0 } { + set string $mantisse + } else { + set exponent [expr {abs($exponent)}] + if { $digits > $exponent } { + set string [string range $mantisse 0 [expr {$digits-$exponent-1}]] + set decimal_part [string range $mantisse [expr {$digits-$exponent}] end] + set string ${string}.${decimal_part} + set exponent [expr {-$exponent}] + } else { + set string 0.[string repeat 0 [expr {$exponent-$digits}]]$mantisse + } + } + } elseif { $exponent <= 0 && $adjusted_exponent < -6 } { + if { $digits > 1 } { + set string [string range $mantisse 0 0].[string range $mantisse 1 end] + set exponent [expr {$exponent + $digits - 1}] + set string "${string}E${exponent}" + } else { + set string "${mantisse}E${exponent}" + } + } else { + if { $adjusted_exponent >= 0 } { + set adjusted_exponent "+$adjusted_exponent" + } + if { $digits > 1 && $adjusted_exponent >= $precision } { + set string "[string range $mantisse 0 0].[string range $mantisse 1 end]E$adjusted_exponent" + } elseif { $digits + $exponent <= $precision } { + set string ${mantisse}[string repeat 0 [expr {$exponent}]] + } else { + set string "${mantisse}E$adjusted_exponent" + } + } + return $sign_string$string +} + +# fromstr -- +# Convert string to number +# +# Arguments: +# string String to be converted +# +# Result: +# Number in the form of {sign mantisse exponent} +# +proc ::math::decimal::fromstr {string} { + variable extended + + set string [string trim $string "'\""] + + if { [string range $string 0 0] == "-" } { + set sign 1 + set string [string trimleft $string -] + incr pos -1 + } else { + set sign 0 + } + + if { $string eq "Inf" || $string eq "NaN" } { + if {!$extended} { + # we don't allow these strings in the subset arithmetic. + # throw error. + error "Infinities and NaN's not allowed in simplified decimal arithmetic" + } else { + return [list $sign $string 0] + } + } + + set string [string trimleft $string "+-"] + set echeck [string first "E" [string toupper $string]] + set epart 0 + if { $echeck >= 0 } { + set epart [string range $string [expr {$echeck+1}] end] + set string [string range $string 0 [expr {$echeck -1}]] + } + + set pos [string first . $string] + + if { $pos < 0 } { + if { $string == 0 } { + set mantisse 0 + if { !$extended } { + set sign 0 + } + } else { + set mantisse $string + } + set exponent 0 + } else { + if { $string == "" } { + return [list 0 0 0] + } else { + #stripping the leading zeros here is required to avoid some octal issues. + #However, it causes us to fail some tests with numbers like 0.00 and 0.0 + #which test differently but we can't deal with now. + set mantisse [string trimleft [string map {. ""} $string] 0] + if { $mantisse == "" } { + set mantisse 0 + if {!$extended} { + set sign 0 + } + } + set fraction [string range $string [expr {$pos+1}] end] + set exponent [expr {-[string length $fraction]}] + } + } + set exponent [expr {$exponent + $epart}] + + if { $extended } { + return [list $sign $mantisse $exponent] + } else { + return [Rescale [list $sign $mantisse $exponent]] + } +} + +# ipart -- +# Return the integer part of a Decimal Number +# +# Arguments: +# Number in the form of {sign mantisse exponent} +# +# +# Result: +# Integer +# +proc ::math::decimal::ipart { a } { + + foreach {sa ma ea} $a {break} + + if { $ea == 0 } { + if { $sa } { + return -$ma + } else { + return $ma + } + } elseif { $ea > 0 } { + if { $sa } { + return [expr {-1 * $ma * 10**$ea}] + } else { + return [expr {$ma * 10**$ea}] + } + } else { + if { [string length $ma] <= abs($ea) } { + return 0 + } else { + if { $sa } { + set string_sign "-" + } else { + set string_sign "" + } + set ea [expr {abs($ea)}] + return "${string_sign}[string range $ma 0 end-$ea]" + } + } +} + +# round_05_up -- +# Round zero or five away from 0. +# The same as round-up, except that rounding up only occurs +# if the digit to be rounded up is 0 or 5, and after overflow +# the result is the same as for round-down. +# +# Bias: away from zero +# +# Arguments: +# Number in the form of {sign mantisse exponent} +# Number of decimal points to round to. +# +# Result: +# Number in the form of {sign mantisse exponent} +# +proc ::math::decimal::round_05up {a digits} { + foreach {sa ma ea} $a {break} + + if { -$ea== $digits } { + return $a + } elseif { $digits + $ea > 0 } { + set mantissa [expr { $ma * 10**($digits+$ea) }] + } else { + set round_exponent [expr {$digits + $ea}] + if { [string length $ma] <= $round_exponent } { + if { $ma != 0 } { + set mantissa 1 + } else { + set mantissa 0 + } + set exponent 0 + } else { + set integer_part [ipart [list 0 $ma $round_exponent]] + + if { [compare [list 0 $ma $round_exponent] [list 0 ${integer_part}0 -1]] == 0 } { + # We are rounding something with fractional part .0 + set mantissa $integer_part + } elseif { [string index $integer_part end] eq 0 || [string index $integer_part end] eq 5 } { + set mantissa [expr {$integer_part + 1}] + } else { + set mantissa $integer_part + } + set exponent [expr {-1 * $digits}] + } + } + return [list $sa $mantissa $exponent] +} + +# round_half_up -- +# +# Round to the nearest. If equidistant, round up. +# +# +# Bias: away from zero +# +# Arguments: +# Number in the form of {sign mantisse exponent} +# Number of decimal points to round to. +# +# Result: +# Number in the form of {sign mantisse exponent} +# +proc ::math::decimal::round_half_up {a digits} { + foreach {sa ma ea} $a {break} + + if { $digits + $ea == 0 } { + return $a + } elseif { $digits + $ea > 0 } { + set mantissa [expr {$ma *10 **($digits+$ea)}] + } else { + set round_exponent [expr {$digits + $ea}] + set integer_part [ipart [list 0 $ma $round_exponent]] + + switch -- [compare [list 0 $ma $round_exponent] [list 0 ${integer_part}5 -1]] { + 0 { + # We are rounding something with fractional part .5 + set mantissa [expr {$integer_part + 1}] + } + -1 { + set mantissa $integer_part + } + 1 { + set mantissa [expr {$integer_part + 1}] + } + + } + } + set exponent [expr {-1 * $digits}] + return [list $sa $mantissa $exponent] +} + +# round_half_even -- +# Round to the nearest. If equidistant, round so the final digit is even. +# Bias: none +# +# Arguments: +# Number in the form of {sign mantisse exponent} +# Number of decimal points to round to. +# +# Result: +# Number in the form of {sign mantisse exponent} +# +proc ::math::decimal::round_half_even {a digits} { + + foreach {sa ma ea} $a {break} + + if { $digits + $ea == 0 } { + return $a + } elseif { $digits + $ea > 0 } { + set mantissa [expr {$ma * 10**($digits+$ea)}] + } else { + set round_exponent [expr {$digits + $ea}] + set integer_part [ipart [list 0 $ma $round_exponent]] + + switch -- [compare [list 0 $ma $round_exponent] [list 0 ${integer_part}5 -1]] { + 0 { + # We are rounding something with fractional part .5 + if { $integer_part % 2 } { + # We are odd so round up + set mantissa [expr {$integer_part + 1}] + } else { + # We are even so round down + set mantissa $integer_part + } + } + -1 { + set mantissa $integer_part + } + 1 { + set mantissa [expr {$integer_part + 1}] + } + } + } + set exponent [expr {-1 * $digits}] + return [list $sa $mantissa $exponent] +} + +# round_half_down -- +# +# Round to the nearest. If equidistant, round down. +# +# Bias: towards zero +# +# Arguments: +# Number in the form of {sign mantisse exponent} +# Number of decimal points to round to. +# +# Result: +# Number in the form of {sign mantisse exponent} +# +proc ::math::decimal::round_half_down {a digits} { + foreach {sa ma ea} $a {break} + + if { $digits + $ea == 0 } { + return $a + } elseif { $digits + $ea > 0 } { + set mantissa [expr {$ma * 10**($digits+$ea)}] + } else { + set round_exponent [expr {$digits + $ea}] + set integer_part [ipart [list 0 $ma $round_exponent]] + switch -- [compare [list 0 $ma $round_exponent] [list 0 ${integer_part}5 -1]] { + 0 { + # We are rounding something with fractional part .5 + # The rule is to round half down. + set mantissa $integer_part + } + -1 { + set mantissa $integer_part + } + 1 { + set mantissa [expr {$integer_part + 1}] + } + } + } + set exponent [expr {-1 * $digits}] + return [list $sa $mantissa $exponent] +} + +# round_down -- +# +# Round toward 0. (Truncate) +# +# Bias: towards zero +# +# Arguments: +# Number in the form of {sign mantisse exponent} +# Number of decimal points to round to. +# +# Result: +# Number in the form of {sign mantisse exponent} +# +proc ::math::decimal::round_down {a digits} { + foreach {sa ma ea} $a {break} + + + if { -$ea== $digits } { + return $a + } elseif { $digits + $ea > 0 } { + set mantissa [expr { $ma * 10**($digits+$ea) }] + } else { + set round_exponent [expr {$digits + $ea}] + set mantissa [ipart [list 0 $ma $round_exponent]] + } + + set exponent [expr {-1 * $digits}] + return [list $sa $mantissa $exponent] +} + +# round_floor -- +# +# Round toward -Infinity. +# +# Bias: down toward -Inf. +# +# Arguments: +# Number in the form of {sign mantisse exponent} +# Number of decimal points to round to. +# +# Result: +# Number in the form of {sign mantisse exponent} +# +proc ::math::decimal::round_floor {a digits} { + foreach {sa ma ea} $a {break} + + if { -$ea== $digits } { + return $a + } elseif { $digits + $ea > 0 } { + set mantissa [expr { $ma * 10**($digits+$ea) }] + } else { + set round_exponent [expr {$digits + $ea}] + if { $ma == 0 } { + set mantissa 0 + } elseif { !$sa } { + set mantissa [ipart [list 0 $ma $round_exponent]] + } else { + set mantissa [expr {[ipart [list 0 $ma $round_exponent]] + 1}] + } + } + set exponent [expr {-1 * $digits}] + return [list $sa $mantissa $exponent] +} + +# round_up -- +# +# Round away from 0 +# +# Bias: away from 0 +# +# Arguments: +# Number in the form of {sign mantisse exponent} +# Number of decimal points to round to. +# +# Result: +# Number in the form of {sign mantisse exponent} +# +proc ::math::decimal::round_up {a digits} { + foreach {sa ma ea} $a {break} + + + if { -$ea== $digits } { + return $a + } elseif { $digits + $ea > 0 } { + set mantissa [expr { $ma * 10**($digits+$ea) }] + } else { + set round_exponent [expr {$digits + $ea}] + if { [string length $ma] <= $round_exponent } { + if { $ma != 0 } { + set mantissa 1 + } else { + set mantissa 0 + } + set exponent 0 + } else { + set integer_part [ipart [list 0 $ma $round_exponent]] + switch -- [compare [list 0 $ma $round_exponent] [list 0 ${integer_part}0 -1]] { + 0 { + # We are rounding something with fractional part .0 + set mantissa $integer_part + } + default { + set mantissa [expr {$integer_part + 1}] + } + } + set exponent [expr {-1 * $digits}] + } + } + return [list $sa $mantissa $exponent] +} + +# round_ceiling -- +# +# Round toward Infinity +# +# Bias: up toward Inf. +# +# Arguments: +# Number in the form of {sign mantisse exponent} +# Number of decimal points to round to. +# +# Result: +# Number in the form of {sign mantisse exponent} +# +proc ::math::decimal::round_ceiling {a digits} { + foreach {sa ma ea} $a {break} + if { -$ea== $digits } { + return $a + } elseif { $digits + $ea > 0 } { + set mantissa [expr { $ma * 10**($digits+$ea) }] + } else { + set round_exponent [expr {$digits + $ea}] + if { [string length $ma] <= $round_exponent } { + if { $ma != 0 } { + set mantissa 1 + } else { + set mantissa 0 + } + set exponent 0 + } else { + set integer_part [ipart [list 0 $ma $round_exponent]] + switch -- [compare [list 0 $ma $round_exponent] [list 0 ${integer_part}0 -1]] { + 0 { + # We are rounding something with fractional part .0 + set mantissa $integer_part + } + default { + if { $sa } { + set mantissa [expr {$integer_part}] + } else { + set mantissa [expr {$integer_part + 1}] + } + } + } + set exponent [expr {-1 * $digits}] + } + } + return [list $sa $mantissa $exponent] +} + +# is-finite +# +# Takes one operand and returns: 1 if neither Inf or Nan otherwise 0. +# +# +# Arguments: +# a - decimal number +# +# Returns: +# +proc ::math::decimal::is-finite { a } { + set mantissa [lindex $a 1] + if { $mantissa == "Inf" || $mantissa == "NaN" } { + return 0 + } else { + return 1 + } +} + +# is-infinite +# +# Takes one operand and returns: 1 if Inf otherwise 0. +# +# +# Arguments: +# a - decimal number +# +# Returns: +# +proc ::math::decimal::is-infinite { a } { + set mantissa [lindex $a 1] + if { $mantissa == "Inf" } { + return 1 + } else { + return 0 + } +} + +# is-NaN +# +# Takes one operand and returns: 1 if NaN otherwise 0. +# +# +# Arguments: +# a - decimal number +# +# Returns: +# +proc ::math::decimal::is-NaN { a } { + set mantissa [lindex $a 1] + if { $mantissa == "NaN" } { + return 1 + } else { + return 0 + } +} + +# is-signed +# +# Takes one operand and returns: 1 if sign is 1 (negative). +# +# +# Arguments: +# a - decimal number +# +# Returns: +# +proc ::math::decimal::is-signed { a } { + set sign [lindex $a 0] + if { $sign } { + return 1 + } else { + return 0 + } +} + +# is-zero +# +# Takes one operand and returns: 1 if operand is zero otherwise 0. +# +# +# Arguments: +# a - decimal number +# +# Returns: +# +proc ::math::decimal::is-zero { a } { + set mantisse [lindex $a 1] + if { $mantisse == 0 } { + return 1 + } else { + return 0 + } +} diff -Nru tcllib-1.13-dfsg/modules/math/decimal.test tcllib-1.14-dfsg/modules/math/decimal.test --- tcllib-1.13-dfsg/modules/math/decimal.test 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/math/decimal.test 2011-12-13 18:13:23.000000000 +0000 @@ -0,0 +1,45 @@ +# -*- tcl -*- +# Tests for decimal arithmetic package in math library -*- tcl -*- +# +# This file contains a collection of tests for one or more of the Tcllib +# procedures. Sourcing this file into Tcl runs the tests and +# generates output for errors. No output means no errors were found. +# +# $Id: decimal.test,v 1.3 2011/11/09 18:33:22 andreas_kupries Exp $ +# +# Copyright (c) 2011 by Mark Alston +# All rights reserved. +# + +# ------------------------------------------------------------------------- + +source [file join \ + [file dirname [file dirname [file join [pwd] [info script]]]] \ + devtools testutilities.tcl] + +testsNeedTcl 8.5 +testsNeedTcltest 2.1 + +support { + useLocal math.tcl math +} +testing { + useLocal decimal.tcl math::decimal +} + +# ------------------------------------------------------------------------- + +# +# Simple tests +# +test decimal-plus-1.1 "Sum of two numbers" { + math::decimal::tostr \ + [math::decimal::+ \ + [math::decimal::fromstr 1.0] \ + [math::decimal::fromstr 1.00]] +} 2.00 + +# ------------------------------------------------------------------------- + +# End of test cases +testsuiteCleanup diff -Nru tcllib-1.13-dfsg/modules/math/linalg.man tcllib-1.14-dfsg/modules/math/linalg.man --- tcllib-1.13-dfsg/modules/math/linalg.man 2011-01-25 05:37:58.000000000 +0000 +++ tcllib-1.14-dfsg/modules/math/linalg.man 2011-12-13 18:13:23.000000000 +0000 @@ -8,7 +8,8 @@ [category Mathematics] [require Tcl [opt 8.4]] [require math::linearalgebra [opt 1.1]] - +[keywords math {linear algebra} vectors matrices {least squares}] +[keywords matrix {linear equations}] [description] [para] This package offers both low-level procedures and high-level algorithms @@ -980,7 +981,4 @@ Please also report any ideas for enhancements you may have for either package and/or documentation. - - -[keywords math "linear algebra" vectors matrices "least squares" "linear equations"] [manpage_end] diff -Nru tcllib-1.13-dfsg/modules/math/pkgIndex.tcl tcllib-1.14-dfsg/modules/math/pkgIndex.tcl --- tcllib-1.13-dfsg/modules/math/pkgIndex.tcl 2011-01-25 05:37:58.000000000 +0000 +++ tcllib-1.14-dfsg/modules/math/pkgIndex.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -27,4 +27,5 @@ package ifneeded math::calculus::symdiff 1.0 [list source [file join $dir symdiff.tcl]] package ifneeded math::bigfloat 2.0.1 [list source [file join $dir bigfloat2.tcl]] package ifneeded math::numtheory 1.0 [list source [file join $dir numtheory.tcl]] +package ifneeded math::decimal 1.0.2 [list source [file join $dir decimal.tcl]] diff -Nru tcllib-1.13-dfsg/modules/md4/ChangeLog tcllib-1.14-dfsg/modules/md4/ChangeLog --- tcllib-1.13-dfsg/modules/md4/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/md4/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/md5/ChangeLog tcllib-1.14-dfsg/modules/md5/ChangeLog --- tcllib-1.13-dfsg/modules/md5/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/md5/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/md5crypt/ChangeLog tcllib-1.14-dfsg/modules/md5crypt/ChangeLog --- tcllib-1.13-dfsg/modules/md5crypt/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/md5crypt/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/mime/ChangeLog tcllib-1.14-dfsg/modules/mime/ChangeLog --- tcllib-1.13-dfsg/modules/mime/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/mime/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/multiplexer/ChangeLog tcllib-1.14-dfsg/modules/multiplexer/ChangeLog --- tcllib-1.13-dfsg/modules/multiplexer/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/multiplexer/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,20 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + +2011-11-10 Andreas Kupries + + * multiplexer.test: Re-merged the split test, and modified to + accept both possible results. 8.6 can return an ipv4 address + as well, depending on the OS configuration. + +2011-11-07 Andreas Kupries + + * multiplexer.test: Split a test with core version dependent + results into two, one per possible result. + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/multiplexer/multiplexer.test tcllib-1.14-dfsg/modules/multiplexer/multiplexer.test --- tcllib-1.13-dfsg/modules/multiplexer/multiplexer.test 2011-01-25 05:37:59.000000000 +0000 +++ tcllib-1.14-dfsg/modules/multiplexer/multiplexer.test 2011-12-13 18:13:23.000000000 +0000 @@ -7,7 +7,7 @@ # # Copyright (c) 2003 by David N. Welton . # -# $Id: multiplexer.test,v 1.9 2006/10/30 06:17:09 andreas_kupries Exp $ +# $Id: multiplexer.test,v 1.11 2011/11/14 18:49:27 andreas_kupries Exp $ # ------------------------------------------------------------------------- @@ -178,7 +178,11 @@ vwait ::forever vwait ::forever ${mp}::destroy - string match {127.*.*.* 127.*.*.*} $::forever + + expr { + [string match {127.*.*.* 127.*.*.*} $::forever] || + [string equal {::1 ::1} $::forever] + } } 1 proc DenyAccessFilter {chan clientaddress clientport} { diff -Nru tcllib-1.13-dfsg/modules/namespacex/ChangeLog tcllib-1.14-dfsg/modules/namespacex/ChangeLog --- tcllib-1.13-dfsg/modules/namespacex/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/namespacex/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/ncgi/ChangeLog tcllib-1.14-dfsg/modules/ncgi/ChangeLog --- tcllib-1.13-dfsg/modules/ncgi/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/ncgi/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/nmea/ChangeLog tcllib-1.14-dfsg/modules/nmea/ChangeLog --- tcllib-1.13-dfsg/modules/nmea/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/nmea/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/nns/ChangeLog tcllib-1.14-dfsg/modules/nns/ChangeLog --- tcllib-1.13-dfsg/modules/nns/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/nns/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/nntp/ChangeLog tcllib-1.14-dfsg/modules/nntp/ChangeLog --- tcllib-1.13-dfsg/modules/nntp/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/nntp/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/ntp/ChangeLog tcllib-1.14-dfsg/modules/ntp/ChangeLog --- tcllib-1.13-dfsg/modules/ntp/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/ntp/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/ooutil/ChangeLog tcllib-1.14-dfsg/modules/ooutil/ChangeLog --- tcllib-1.13-dfsg/modules/ooutil/ChangeLog 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/ooutil/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -0,0 +1,10 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + +2011-05-31 Andreas Kupries + + * New module and package: oo::util. Right now only easy + referencing of instance methods for callbacks. diff -Nru tcllib-1.13-dfsg/modules/ooutil/ooutil.man tcllib-1.14-dfsg/modules/ooutil/ooutil.man --- tcllib-1.13-dfsg/modules/ooutil/ooutil.man 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/ooutil/ooutil.man 2011-12-13 18:13:24.000000000 +0000 @@ -0,0 +1,50 @@ +[comment {-*- tcl -*- doctools manpage}] +[manpage_begin oo::util n 1] +[copyright {2011 Andreas Kupries, BSD licensed}] +[moddesc {Utility commands for TclOO}] +[titledesc {Utility commands for TclOO}] +[category Utility] +[require Tcl 8.5] +[require TclOO] +[require oo::util [opt 1]] +[keywords TclOO callback {my method} {command prefix} currying {method reference}] +[see_also snit(n)] +[description] +[para] + +This package provides a convenience command for the easy specification +of instance methods as callback commands, like timers, file events, Tk +bindings, etc. + +[section {COMMANDS}] + +[list_begin definitions] +[comment {- - -- --- ----- -------- ------------- ---------------------}] +[call [cmd mymethod] [arg method] [opt [arg arg]...]] + +This command is available within instance methods. It takes a method +name and, possibly, arguments for the method and returns a command +prefix which, when executed, will invoke the named method of the +object we are in, with the provided arguments, and any others supplied +at the time of actual invokation. + +[para] Note: The command is equivalent to and named after the command +provided by the OO package [package snit] for the same purpose. + +[list_end] + +[section AUTHORS] +Donal Fellows, Andreas Kupries + +[section {BUGS, IDEAS, FEEDBACK}] + +This document, and the package it describes, will undoubtedly contain +bugs and other problems. + +Please report such in the category [emph oo::util] of the +[uri {http://sourceforge.net/tracker/?group_id=12883} {Tcllib SF Trackers}]. + +Please also report any ideas for enhancements you may have for either +package and/or documentation. + +[manpage_end] diff -Nru tcllib-1.13-dfsg/modules/ooutil/ooutil.tcl tcllib-1.14-dfsg/modules/ooutil/ooutil.tcl --- tcllib-1.13-dfsg/modules/ooutil/ooutil.tcl 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/ooutil/ooutil.tcl 2011-12-13 18:13:24.000000000 +0000 @@ -0,0 +1,23 @@ +# # ## ### ##### ######## ############# #################### +## -*- tcl -*- +## (C) 2011 Andreas Kupries, BSD licensed. + +# # ## ### ##### ######## ############# #################### +## Requisites + +package require Tcl 8.5 +package require TclOO + +# # ## ### ##### ######## ############# ##################### +## Public API implementation + +# Easy callback support. +# http://wiki.tcl.tk/21595. v20, Donal Fellows +proc ::oo::Helpers::mymethod {method args} { + list [uplevel 1 {namespace which my}] $method {*}$args +} + +# # ## ### ##### ######## ############# #################### +## Ready + +package provide oo::util 1 diff -Nru tcllib-1.13-dfsg/modules/ooutil/pkgIndex.tcl tcllib-1.14-dfsg/modules/ooutil/pkgIndex.tcl --- tcllib-1.13-dfsg/modules/ooutil/pkgIndex.tcl 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/ooutil/pkgIndex.tcl 2011-12-13 18:13:24.000000000 +0000 @@ -0,0 +1,7 @@ +#checker -scope global exclude warnUndefinedVar +# var in question is 'dir'. +if {![package vsatisfies [package provide Tcl] 8.5]} { + # PRAGMA: returnok + return +} +package ifneeded oo::util 1 [list source [file join $dir ooutil.tcl]] diff -Nru tcllib-1.13-dfsg/modules/otp/ChangeLog tcllib-1.14-dfsg/modules/otp/ChangeLog --- tcllib-1.13-dfsg/modules/otp/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/otp/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/page/ChangeLog tcllib-1.14-dfsg/modules/page/ChangeLog --- tcllib-1.13-dfsg/modules/page/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/page/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,17 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + +2011-11-10 Andreas Kupries + + * support/installation/modules.tcl: [Bug 3425271], reported + * support/installation/actions.tcl: by Stuart Cassoff. Extended + * apps/page: the installer to install the .template files as + well. Extended auto_path in the application to find the standard + plugins in the installation. + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/pki/ChangeLog tcllib-1.14-dfsg/modules/pki/ChangeLog --- tcllib-1.13-dfsg/modules/pki/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pki/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,17 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + +2011-11-07 Andreas Kupries + + * MD5SUMS: Updated to version 0.2, by Roy Keene. + * pkgIndex.tcl: + * pki.man: + * pki.tcl: + * pki.test: + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/pki/MD5SUMS tcllib-1.14-dfsg/modules/pki/MD5SUMS --- tcllib-1.13-dfsg/modules/pki/MD5SUMS 2011-01-25 05:38:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pki/MD5SUMS 2011-12-13 18:13:22.000000000 +0000 @@ -1,9 +1,9 @@ 4f1b843679fdc1316db17880abb59bda CA.crt 938f67435bc706bde16fd13546e383ba CA.key -0997fcc06ef94771d2d9fd354e41ba16 pkgIndex.tcl -9753d571f301dc23dd298a7cc5375524 pki.man -a8387c9ba77575cdeaae969205d8f6fe pki.tcl -fb7a6fda37f5b91aad320f445f284971 pki.test +fdd6e52cb00a6bae4bf33e7e24bfe6de pkgIndex.tcl +29590d4308759fef77cdd6daa9ace484 pki.man +57dff2c55025e71d0ea245ca69eeec1d pki.tcl +b6a0f671c1626e4a09cf00667a3d5f44 pki.test ae95f5bd52e5d5626f45ce7881052127 test-v1.crt 3d51a1162f0f194ee33da9a9cc360468 test-v3.crt 2c6ed2add32955a8c1c3aa4927ca1aa9 test.csr diff -Nru tcllib-1.13-dfsg/modules/pki/pkgIndex.tcl tcllib-1.14-dfsg/modules/pki/pkgIndex.tcl --- tcllib-1.13-dfsg/modules/pki/pkgIndex.tcl 2011-01-25 05:38:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pki/pkgIndex.tcl 2011-12-13 18:13:22.000000000 +0000 @@ -1 +1 @@ -package ifneeded pki 0.1 [list source [file join $dir pki.tcl]] +package ifneeded pki 0.2 [list source [file join $dir pki.tcl]] diff -Nru tcllib-1.13-dfsg/modules/pki/pki.man tcllib-1.14-dfsg/modules/pki/pki.man --- tcllib-1.13-dfsg/modules/pki/pki.man 2011-01-25 05:38:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pki/pki.man 2011-12-13 18:13:22.000000000 +0000 @@ -1,11 +1,11 @@ [comment {-*- tcl -*- doctools manpage}] -[manpage_begin pki n 0.1] +[manpage_begin pki n 0.2] [copyright {2010, Roy Keene}] [moddesc {RSA public key encryption}] [titledesc {Implementation of the RSA public key cipher}] [category {Hashes, checksums, and encryption}] [require Tcl 8.5] -[require pki [opt 0.1]] +[require pki [opt 0.2]] [description] [para] @@ -223,7 +223,7 @@ The [arg encodePem] option specifies whether or not the result should be PEM encoded or DER encoded. A "true" value results in the result -being PEM encoded, while any other value results in the the result +being PEM encoded, while any other value 9results in the the result being DER encoded. DER encoding is the default. The [arg algo] argument specifies the hashing algorithm we should use diff -Nru tcllib-1.13-dfsg/modules/pki/pki.tcl tcllib-1.14-dfsg/modules/pki/pki.tcl --- tcllib-1.13-dfsg/modules/pki/pki.tcl 2011-01-25 05:38:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pki/pki.tcl 2011-12-13 18:13:22.000000000 +0000 @@ -9,8 +9,11 @@ ## Requisites package require Tcl 8.5 -package require asn -package require base64 + +## Versions of asn lower than 0.8.4 are known to have defects +package require asn 0.8.4 + +## Further dependencies package require des package require math::bignum package require md5 2 @@ -18,48 +21,6 @@ package require sha256 # # ## ### ##### ######## ############# -## -# Workaround bug# 3039090 -# - -proc ::asn::asnGetBigInteger {data_var bignum_var} { - # require math::bignum only if it is used - package require math::bignum - - # Tag is 0x02. We expect that the length of the integer is coded with - # maximal efficiency, i.e. without a prefix 0x81 prefix. If a prefix - # is used this decoder will fail. - - upvar $data_var data $bignum_var bignum - - asnGetByte data tag - - if {$tag != 0x02} { - return -code error \ - [format "Expected Integer (0x02), but got %02x" $tag] - } - - asnGetLength data len - asnGetBytes data $len integerBytes - - binary scan [string index $integerBytes 0] H* hex_head - set head [expr 0x$hex_head] - set replacement_head [expr {$head & 0x7f}] - set integerBytes [string replace $integerBytes 0 0 [format %c $replacement_head]] - - binary scan $integerBytes H* hex - - set bignum [math::bignum::fromstr $hex 16] - - if {($head >> 7) && 1} { - set bigsub [math::bignum::pow [::math::bignum::fromstr 2] [::math::bignum::fromstr [expr {($len * 8) - 1}]]] - set bignum [math::bignum::sub $bignum $bigsub] - } - - return $bignum -} - -# # ## ### ##### ######## ############# ## Requisites namespace eval ::pki { @@ -219,6 +180,7 @@ 2.5.29.19 id-ce-basicConstraints 2.5.29.20 id-ce-cRLNumber 2.5.29.32 id-ce-certificatePolicies + 2.5.29.33 id-ce-cRLDistributionPoints 2.5.29.35 id-ce-authorityKeyIdentifier } @@ -412,6 +374,12 @@ set exponent $key($exponent_ent) set mod $key(n) + ## RSA requires that the input be no larger than the key + set input_len_bits [expr {[string length $input] * 8}] + if {$key(l) < $input_len_bits} { + return -code error "Message length exceeds key length" + } + binary scan $input H* input_num set input_num "0x${input_num}" @@ -638,7 +606,7 @@ } "raw" { set header "" - binary scan $input H* hash + set hash $input } default { return -code error "Invalid algorithm selected, must be one of: md5, sha1, sha256, raw" @@ -651,7 +619,7 @@ set padded [::pki::_pad_pkcs $plaintext $key(l) 1] - return [::pki::encrypt -binary -nopad -priv $padded $keylist] + return [::pki::encrypt -binary -nopad -priv -- $padded $keylist] } # Verify known-plaintext with signature @@ -659,7 +627,7 @@ package require asn if {[catch { - set plaintext [::pki::decrypt -binary -unpad -pub $signedmessage $keylist] + set plaintext [::pki::decrypt -binary -unpad -pub -- $signedmessage $keylist] }]} { return false } @@ -774,8 +742,6 @@ } proc ::pki::_parse_pem {pem begin end {password ""}} { - ::pki::_parse_init - # Unencode a PEM-encoded object set testpem [split $pem \n] set pem_startidx [lsearch -exact $testpem $begin] @@ -874,8 +840,6 @@ } proc ::pki::pkcs::parse_key {key {password ""}} { - ::pki::_parse_init - array set parsed_key [::pki::_parse_pem $key "-----BEGIN RSA PRIVATE KEY-----" "-----END RSA PRIVATE KEY-----" $password] set key_seq $parsed_key(data) @@ -902,7 +866,7 @@ ::asn::asnGetSet dn dn_parts ::asn::asnGetSequence dn_parts curr_part ::asn::asnGetObjectIdentifier curr_part label - ::asn::asnGetPrintableString curr_part value + ::asn::asnGetString curr_part value set label [::pki::_oid_number_to_name $label] lappend ret $label $value @@ -964,16 +928,14 @@ } proc ::pki::x509::_utctime_to_native {utctime} { - return [clock scan $utctime -format {%y%m%d%H%M%SZ} -gmt 1] + return [clock scan $utctime -format {%y%m%d%H%M%SZ} -gmt true] } proc ::pki::x509::_native_to_utctime {time} { - return [clock format $time -format {%y%m%d%H%M%SZ} -gmt 1] + return [clock format $time -format {%y%m%d%H%M%SZ} -gmt true] } proc ::pki::x509::parse_cert {cert} { - ::pki::_parse_init - array set parsed_cert [::pki::_parse_pem $cert "-----BEGIN CERTIFICATE-----" "-----END CERTIFICATE-----"] set cert_seq $parsed_cert(data) @@ -1044,7 +1006,12 @@ switch -- $ext_oid { id-ce-basicConstraints { ::asn::asnGetSequence ext_value_seq ext_value_bin - ::asn::asnGetBoolean ext_value_bin allowCA + + if {$ext_value_bin != ""} { + ::asn::asnGetBoolean ext_value_bin allowCA + } else { + set allowCA "false" + } if {$ext_value_bin != ""} { ::asn::asnGetInteger ext_value_bin caDepth @@ -1657,8 +1624,6 @@ proc ::pki::rsa::generate {bitlength {exponent 0x10001}} { set e $exponent - set retkey(e) $exponent - set retkey(l) $bitlength # Step 1. Pick 2 numbers that when multiplied together will give a number with the appropriate length set componentbitlen [expr {$bitlength / 2}] @@ -1696,7 +1661,20 @@ set p [expr {$p & $bitmask}] set q [expr {$q & $bitmask}] - # Step 2. Convert the numbers into prime numbers + # Step 2. Verify that "p" and "q" are useful + ## Step 2.a. Verify that they are not too close + ### Where "too close" is defined as 2*n^(1/4) + set quadroot_of_n [expr {isqrt(isqrt($p * $q))}] + set min_distance [expr {2 * $quadroot_of_n}] + set distance [expr {abs($p - $q)}] + + if {$distance < $min_distance} { + #### Try again. + + return [::pki::rsa::generate $bitlength $exponent] + } + + # Step 3. Convert the numbers into prime numbers if {$p % 2 == 0} { incr p -1 } @@ -1711,24 +1689,37 @@ incr q -2 } - # Step 3. Compute N by multiplying P and Q + # Step 4. Compute N by multiplying P and Q set n [expr {$p * $q}] set retkey(n) $n - # Step 4. Compute D ... - set retkey(d) [::pki::rsa::_generate_private $p $q $e $bitlength] + # Step 5. Compute D ... + ## Step 5.a. Generate D + set d [::pki::rsa::_generate_private $p $q $e $bitlength] + set retkey(d) $d + + ## Step 5.b. Verify D is large enough + ### Verify that D is greater than (1/3)*n^(1/4) + set quadroot_of_n [expr {isqrt(isqrt($n))}] + set min_d [expr {$quadroot_of_n / 3}] + if {$d < $min_d} { + #### Try again. - # puts "P = [format 0x%llx $p] [::pki::_bits $p]" - # puts "Q = [format 0x%llx $q] [::pki::_bits $q]" - # puts "N = [format 0x%llx $n] [::pki::_bits $n]" - # puts "D = [format 0x%llx $d] [::pki::_bits $d]" + return [::pki::rsa::generate $bitlength $exponent] + } + # Step 6. Encode key information set retkey(type) rsa + set retkey(e) $e + set retkey(l) $bitlength return [array get retkey] } +## Initialize parsing routines, which may load additional packages (base64) +::pki::_parse_init + # # ## ### ##### ######## ############# ## Ready -package provide pki 0.1 +package provide pki 0.2 diff -Nru tcllib-1.13-dfsg/modules/pki/pki.test tcllib-1.14-dfsg/modules/pki/pki.test --- tcllib-1.13-dfsg/modules/pki/pki.test 2011-01-25 05:38:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pki/pki.test 2011-12-13 18:13:22.000000000 +0000 @@ -3,7 +3,7 @@ # the test-values are taken from: # ?? # -# $Id: pki.test,v 1.1 2010/10/08 19:25:33 andreas_kupries Exp $ +# $Id: pki.test,v 1.2 2011/11/08 03:27:06 andreas_kupries Exp $ # ------------------------------------------------------------------------- @@ -318,8 +318,8 @@ set keylist [array get key] unset password privkey pubkey key } -body { - set ciphertext [::pki::encrypt -binary -pub $data $keylist] - set plaintext [::pki::decrypt -binary -priv $ciphertext $keylist] + set ciphertext [::pki::encrypt -binary -pub -- $data $keylist] + set plaintext [::pki::decrypt -binary -priv -- $ciphertext $keylist] } -cleanup { unset -nocomplain data ciphertext plaintext } -result {This is a test} @@ -341,8 +341,8 @@ set keylist [array get key] unset password privkey pubkey key } -body { - set ciphertext [::pki::encrypt -binary -priv $data $keylist] - set plaintext [::pki::decrypt -binary -pub $ciphertext $keylist] + set ciphertext [::pki::encrypt -binary -priv -- $data $keylist] + set plaintext [::pki::decrypt -binary -pub -- $ciphertext $keylist] } -cleanup { unset -nocomplain data ciphertext plaintext } -result {This is a test} @@ -357,8 +357,8 @@ test rsa-crypt-roundtrip-2.0.$keylen "encrypt, decrypt pub/priv for keylen $keylen" -body { set plain "Pub/priv test" - set cipher [::pki::encrypt -binary -pub $plain $key] - set uncipher [::pki::decrypt -binary -priv $cipher $key] + set cipher [::pki::encrypt -binary -pub -- $plain $key] + set uncipher [::pki::decrypt -binary -priv -- $cipher $key] string equal $plain $uncipher } -cleanup { @@ -367,8 +367,8 @@ test rsa-crypt-roundtrip-2.1.$keylen "encrypt, decrypt priv/pub for keylen $keylen" -body { set plain "Priv/pub test" - set cipher [::pki::encrypt -binary -priv $plain $key] - set uncipher [::pki::decrypt -binary -pub $cipher $key] + set cipher [::pki::encrypt -binary -priv -- $plain $key] + set uncipher [::pki::decrypt -binary -pub -- $cipher $key] string equal $plain $uncipher } -cleanup { diff -Nru tcllib-1.13-dfsg/modules/pluginmgr/ChangeLog tcllib-1.14-dfsg/modules/pluginmgr/ChangeLog --- tcllib-1.13-dfsg/modules/pluginmgr/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pluginmgr/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/png/ChangeLog tcllib-1.14-dfsg/modules/png/ChangeLog --- tcllib-1.13-dfsg/modules/png/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/png/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/pop3/ChangeLog tcllib-1.14-dfsg/modules/pop3/ChangeLog --- tcllib-1.13-dfsg/modules/pop3/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pop3/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,22 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + +2011-11-08 Andreas Kupries + + * pop3.test (pop3-7.0): Updated for additional configure options + returned by peek, plus same change to the socket handle handling + as for pop3-0.8, see below. + +2011-11-07 Andreas Kupries + + * pop3.test (pop3-0.8): Modified the test case matching a bit to + handle the fact that under 8.6 a socket channel handle may + contain hex data after the general prefix, instead of just + digits. + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/pop3/pop3.man tcllib-1.14-dfsg/modules/pop3/pop3.man --- tcllib-1.13-dfsg/modules/pop3/pop3.man 2011-01-25 05:38:02.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pop3/pop3.man 2011-12-13 18:13:23.000000000 +0000 @@ -94,7 +94,7 @@ Query the server for the status of the mail spool. The status is returned as a list containing two elements, the first is the number of email messages on the server and the second is the size (in octets, 8 -byte blocks) of the entire mail spool. +bit blocks) of the entire mail spool. [call [cmd ::pop3::last] [arg chan]] diff -Nru tcllib-1.13-dfsg/modules/pop3/pop3.test tcllib-1.14-dfsg/modules/pop3/pop3.test --- tcllib-1.13-dfsg/modules/pop3/pop3.test 2011-01-25 05:38:02.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pop3/pop3.test 2011-12-13 18:13:23.000000000 +0000 @@ -8,7 +8,7 @@ # Copyright (c) 2002-2006 by Andreas Kupries # All rights reserved. # -# RCS: @(#) $Id: pop3.test,v 1.28 2011/01/25 02:23:30 andreas_kupries Exp $ +# RCS: @(#) $Id: pop3.test,v 1.30 2011/11/09 05:27:10 andreas_kupries Exp $ # ------------------------------------------------------------------------- @@ -288,12 +288,12 @@ set psock [pop3::open localhost ak smash [dialog::listener]] close $psock dialog::waitdone - regsub -all {[0-9]} $psock {} msg + set msg [string match sock* $psock] # status data is retained if the connection is not closed through # the prescribed api command. lappend msg [peek $psock] set msg -} {sock {limit 11 msex 0 retr_mode retr socketcmd ::socket stls 0 tls-callback {}}} +} {1 {limit 11 msex 0 retr_mode retr socketcmd ::socket stls 0 tls-callback {}}} test pop3-0.9 {outside close} { dialog::dialog_set loginStatusOk @@ -598,12 +598,12 @@ set psock [pop3::open -socketcmd tls::socket localhost ak smash [dialog::listener]] close $psock dialog::waitdone - regsub -all {[0-9]} $psock {} msg + set msg [string match sock* $psock] # status data is retained if the connection is not closed through # the prescribed api command. lappend msg [peek $psock] set msg -} {sock {limit 11 msex 0 retr_mode retr socketcmd tls::socket}} +} {1 {limit 11 msex 0 retr_mode retr socketcmd tls::socket stls 0 tls-callback {}}} # ---------------------------------------------------------------------- # ---------------------------------------------------------------------- diff -Nru tcllib-1.13-dfsg/modules/pop3d/ChangeLog tcllib-1.14-dfsg/modules/pop3d/ChangeLog --- tcllib-1.13-dfsg/modules/pop3d/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pop3d/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,19 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + +2011-11-10 Andreas Kupries + + * pop3d.test: Another update to accept both 127.x.x.x and ::1 as + possible result. The OS configuration may cause return of the + former even for 8.6+. + +2011-11-07 Andreas Kupries + + * pop3d.test: Updated the tests to handle Tcl 8.6+ IPv6 changes. + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/pop3d/pop3d.test tcllib-1.14-dfsg/modules/pop3d/pop3d.test --- tcllib-1.13-dfsg/modules/pop3d/pop3d.test 2011-01-25 05:37:59.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pop3d/pop3d.test 2011-12-13 18:13:23.000000000 +0000 @@ -8,7 +8,7 @@ # Copyright (c) 2002 by Andreas Kupries # All rights reserved. # -# RCS: @(#) $Id: pop3d.test,v 1.22 2009/09/29 07:07:15 andreas_kupries Exp $ +# RCS: @(#) $Id: pop3d.test,v 1.24 2011/11/14 22:33:48 andreas_kupries Exp $ # ------------------------------------------------------------------------- @@ -341,7 +341,7 @@ # ---------------------------------------------------------------------- -test pop3-srv-4.0 {connection introspection} { +test pop3-srv-4.0.0 {connection introspection} { newsrv dialog::dialog_set { dialog::crlf. ; # Network EOL setting @@ -351,10 +351,12 @@ set res [talk resonly] delsrv - string match {deleted {} id <==@%%> logon {} msg 0 name {} remotehost 127.*.*.* remoteport {} server 1 size 0 state auth storage {}} $res + expr { + [string match {deleted {} id <==@%%> logon {} msg 0 name {} remotehost 127.*.*.* remoteport {} server 1 size 0 state auth storage {}} $res] || + [string match {deleted {} id <==@%%> logon {} msg 0 name {} remotehost ::1 remoteport {} server 1 size 0 state auth storage {}} $res] + } } 1 - test pop3-srv-5.0 {initial contact, greeting} { newsrv dialog::dialog_set { @@ -369,7 +371,6 @@ string match {+OK %% tcllib/pop3d-* ready <==@%%>} $res } 1 - test pop3-srv-6.0 {unknown command} { newsrv dialog::dialog_set { @@ -390,14 +391,15 @@ # Database of possible responses and server states. array set cstate { - 0 {deleted {} id <==@%%> logon user msg 0 name foo remotehost 127.*.*.* remoteport {} server 1 size 0 state auth storage {}} - 1 {deleted {} id <==@%%> logon {} msg 0 name {} remotehost 127.*.*.* remoteport {} server 1 size 0 state auth storage {}} + 0 {deleted {} id <==@%%> logon user msg 0 name foo remotehost @ADDR remoteport {} server 1 size 0 state auth storage {}} + 1 {deleted {} id <==@%%> logon {} msg 0 name {} remotehost @ADDR remoteport {} server 1 size 0 state auth storage {}} 2 {} - 3 {deleted {} id <==@%%> logon {} msg 0 name foo remotehost 127.*.*.* remoteport {} server 1 size 0 state auth storage {}} - 4 {deleted {} id <==@%%> logon {} msg 3 name ak remotehost 127.*.*.* remoteport {} server 1 size 3 state trans storage usr0} - 5 {deleted {} id <==@%%> logon {} msg 0 name ak remotehost 127.*.*.* remoteport {} server 1 size 0 state auth storage {}} - 6 {deleted 1 id <==@%%> logon {} msg 3 name ak remotehost 127.*.*.* remoteport {} server 1 size 3 state trans storage usr0} + 3 {deleted {} id <==@%%> logon {} msg 0 name foo remotehost @ADDR remoteport {} server 1 size 0 state auth storage {}} + 4 {deleted {} id <==@%%> logon {} msg 3 name ak remotehost @ADDR remoteport {} server 1 size 3 state trans storage usr0} + 5 {deleted {} id <==@%%> logon {} msg 0 name ak remotehost @ADDR remoteport {} server 1 size 0 state auth storage {}} + 6 {deleted 1 id <==@%%> logon {} msg 3 name ak remotehost @ADDR remoteport {} server 1 size 3 state trans storage usr0} } + array set log { 0 {+OK please send PASS command} 1 {+OK %% tcllib/pop3d-* shutting down} @@ -417,6 +419,7 @@ 15 {+OK 3 messages 1 1 2 1 3 1} 16 {+OK 0 messages} 17 {+OK Capability list follows} + 18 {{+OK message 1 deleted} 1 1} } # ====================================================================== @@ -426,6 +429,15 @@ # Not permitted: PASS, STAT, DELE, RETR, TOP, RSET, LIST, NOOP # +proc Match {l c res} { + global log cstate + foreach addr {127.*.*.* ::1} { + set cs [string map [list @ADDR $addr] $cstate($c)] + if {[string match [list $log($l) $cs] $res]} { return 1 } + } + return 0 +} + foreach {n cmd lidx cidx} { 0 {USER foo} 0 0 1 {APOP foo bar} 3 3 @@ -452,7 +464,7 @@ set res [talk trace+res] delfsrv - string match [list $log($lidx) $cstate($cidx)] $res + Match $lidx $cidx $res } 1 } @@ -473,7 +485,7 @@ set res [talk trace+res] delfsrv - string match [list $log(4) $cstate(0)] $res + Match 4 0 $res } 1 test pop3-srv-7.2 {auth, APOP/USER} { @@ -494,7 +506,7 @@ set res [talk trace+res] delfsrv - string match [list $log(5) $cstate(4)] $res + Match 5 4 $res } 1 # ---------------------------------------------------------------------- @@ -518,7 +530,7 @@ set res [talk trace+res] delfsrv - string match [list $log($lidx) $cstate($cidx)] $res + Match $lidx $cidx $res } 1 test pop3-srv-7.4.$n {APOP} { @@ -539,7 +551,7 @@ set res [talk trace+res] delfsrv - string match [list $log($lidx) $cstate($cidx)] $res + Match $lidx $cidx $res } 1 } @@ -578,7 +590,7 @@ set res [talk trace+res] delfsrv - string match [list $log($lidx) $cstate($cidx)] $res + Match $lidx $cidx $res } 1 } @@ -607,7 +619,7 @@ set res [talk trace+res] delfsrv - string match [list $log($lidx) $cstate($cidx)] $res + Match $lidx $cidx $res } 1 } @@ -626,7 +638,7 @@ set res [talk trace+res] delfsrv - string match [list $log(13) $cstate(6)] $res + Match 13 6 $res } 1 @@ -650,10 +662,10 @@ } set res [talk trace+res] - lappend res [file exists [file join __dbox__ usr0 10]] + set has [file exists [file join __dbox__ usr0 10]] delfsrv - string match [list [list $log(9) 1 1] $cstate(6) 1] $res -} 1 + list [Match 18 6 $res] $has +} {1 1} test pop3-srv-7.8 {DELE, complete} { newfsrv @@ -703,7 +715,7 @@ set res [talk trace+res] delfsrv - string match [list $log($lidx) $cstate($cidx)] $res + Match $lidx $cidx $res } 1 } diff -Nru tcllib-1.13-dfsg/modules/profiler/ChangeLog tcllib-1.14-dfsg/modules/profiler/ChangeLog --- tcllib-1.13-dfsg/modules/profiler/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/profiler/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/pt/ChangeLog tcllib-1.14-dfsg/modules/pt/ChangeLog --- tcllib-1.13-dfsg/modules/pt/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,84 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + +2011-11-09 Andreas Kupries + + * rde_critcl/util.c: Fix build warning, get a strlen declaration. + * rde_critcl/param.c: Fix bug in TRACE output. + * rde_critcl/p.c: Tweaked TRACE output for clarity. + * rde_critcl/ot.c: Fix the actual issue, a missing string rep for + a Tcl_Obj literal getting interned. + * pt_rdengine.tcl: Bumped package version to 1.0.2 + * pt_rdengine.man: + * pkgIndex.tcl + + * tests/data/ok/peg_param-critcl/0_basic_arithmetic: Updated the + * tests/data/ok/peg_param-critcl/10_notahead: test data to match + * tests/data/ok/peg_param-critcl/1_functions: the code change + * tests/data/ok/peg_param-critcl/2_fun_arithmetic: (in param.c) + * tests/data/ok/peg_param-critcl/3_peg_itself: above. + * tests/data/ok/peg_param-critcl/4_choice: + * tests/data/ok/peg_param-critcl/5_sequence: + * tests/data/ok/peg_param-critcl/6_optional: + * tests/data/ok/peg_param-critcl/7_kleene: + * tests/data/ok/peg_param-critcl/8_pkleene: + * tests/data/ok/peg_param-critcl/9_ahead: + +2011-11-07 Andreas Kupries + + * tests/data/ok/peg_tclparam-tcloo/0_basic_arithmetic: Updated the + * tests/data/ok/peg_tclparam-tcloo/10_notahead: test data to match + * tests/data/ok/peg_tclparam-tcloo/1_functions: the [2011-06-06] + * tests/data/ok/peg_tclparam-tcloo/2_fun_arithmetic: change. + * tests/data/ok/peg_tclparam-tcloo/3_peg_itself: + * tests/data/ok/peg_tclparam-tcloo/4_choice: + * tests/data/ok/peg_tclparam-tcloo/5_sequence: + * tests/data/ok/peg_tclparam-tcloo/6_optional: + * tests/data/ok/peg_tclparam-tcloo/7_kleene: + * tests/data/ok/peg_tclparam-tcloo/8_pkleene: + * tests/data/ok/peg_tclparam-tcloo/9_ahead: + + * tests/data/ok/peg_param-critcl/0_basic_arithmetic: Updated the + * tests/data/ok/peg_param-critcl/10_notahead: test data to match + * tests/data/ok/peg_param-critcl/1_functions: an unrecorded code + * tests/data/ok/peg_param-critcl/2_fun_arithmetic: change. + * tests/data/ok/peg_param-critcl/3_peg_itself: + * tests/data/ok/peg_param-critcl/4_choice: + * tests/data/ok/peg_param-critcl/5_sequence: + * tests/data/ok/peg_param-critcl/6_optional: + * tests/data/ok/peg_param-critcl/7_kleene: + * tests/data/ok/peg_param-critcl/8_pkleene: + * tests/data/ok/peg_param-critcl/9_ahead: + +2011-09-08 Andreas Kupries + + * include/expr_pe.inc: Fixed the example to be a proper expression + * include/expr_pe_serial.inc: grammar, with the correct operator + * include/expr_peg.inc: precedences. Thanks to Lars Hellstrom. + * include/expr_serial.inc: + +2011-06-06 Andreas Kupries + + * pt_tclparam_config_tcloo.tcl: Fixed typo, OO is TclOO. + * pkgIndex.tcl: Bumped version to 1.0.2. + +2011-02-16 Andreas Kupries + + * include/format/options_tclparam_oo.inc: Documented option -package, and + * include/format/options_tclparam_snit.inc: the new cross -class/-package + * pkgIndex.tcl: resolution. Implemented resolution of missing -package + * pt_pgen.tcl: and -class through each other. Bumped version to 1.0.1. + * pt_pgen.man: + +2011-01-25 Andreas Kupries + + * include/example/expr_ptgenb.inc: Fixed a typo in the example, + * include/example/full_app.inc: and dropped continuation lines + to prevent missformatting in the formatted docs. + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/pt/include/example/expr_peg.inc tcllib-1.14-dfsg/modules/pt/include/example/expr_peg.inc --- tcllib-1.13-dfsg/modules/pt/include/example/expr_peg.inc 2011-01-25 05:38:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/include/example/expr_peg.inc 2011-12-13 18:13:24.000000000 +0000 @@ -1,12 +1,12 @@ [example { PEG calculator (Expression) - Digit <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9' ; - Sign <- '-' / '+' ; - Number <- Sign? Digit+ ; - Expression <- '(' Expression ')' / (Factor (MulOp Factor)*) ; - MulOp <- '*' / '/' ; - Factor <- Term (AddOp Term)* ; - AddOp <- '+'/'-' ; - Term <- Number ; + Digit <- '0'/'1'/'2'/'3'/'4'/'5'/'6'/'7'/'8'/'9' ; + Sign <- '-' / '+' ; + Number <- Sign? Digit+ ; + Expression <- Term (AddOp Term)* ; + MulOp <- '*' / '/' ; + Term <- Factor (MulOp Factor)* ; + AddOp <- '+'/'-' ; + Factor <- '(' Expression ')' / Number ; END; }] diff -Nru tcllib-1.13-dfsg/modules/pt/include/example/expr_pe.inc tcllib-1.14-dfsg/modules/pt/include/example/expr_pe.inc --- tcllib-1.13-dfsg/modules/pt/include/example/expr_pe.inc 2011-01-25 05:38:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/include/example/expr_pe.inc 2011-12-13 18:13:24.000000000 +0000 @@ -1,4 +1,3 @@ [example { - Expression <- '(' Expression ')' - / Factor (MulOp Factor)* + Expression <- Term (AddOp Term)* }] diff -Nru tcllib-1.13-dfsg/modules/pt/include/example/expr_pe_serial.inc tcllib-1.14-dfsg/modules/pt/include/example/expr_pe_serial.inc --- tcllib-1.13-dfsg/modules/pt/include/example/expr_pe_serial.inc 2011-01-25 05:38:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/include/example/expr_pe_serial.inc 2011-12-13 18:13:24.000000000 +0000 @@ -1,3 +1,3 @@ [example { - {/ {x {t (} {n Expression} {t )}} {x {n Factor} {* {x {n MulOp} {n Factor}}}}} + {x {n Term} {* {x {n AddOp} {n Term}}}} }] diff -Nru tcllib-1.13-dfsg/modules/pt/include/example/expr_ptgenb.inc tcllib-1.14-dfsg/modules/pt/include/example/expr_ptgenb.inc --- tcllib-1.13-dfsg/modules/pt/include/example/expr_ptgenb.inc 2011-01-25 05:38:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/include/example/expr_ptgenb.inc 2011-12-13 18:13:24.000000000 +0000 @@ -5,12 +5,7 @@ lassign $argv name set grammar [fileutil::cat $name.peg] -set plass [pt::pgen - peg $gr \ - snit \ - -class $name \ - -file $name.peg \ - -name $name] +set pclass [pt::pgen peg $gr snit -class $name -file $name.peg -name $name] fileutil::writeFile $name.tcl $pclass exit 0 }] diff -Nru tcllib-1.13-dfsg/modules/pt/include/example/expr_serial.inc tcllib-1.14-dfsg/modules/pt/include/example/expr_serial.inc --- tcllib-1.13-dfsg/modules/pt/include/example/expr_serial.inc 2011-01-25 05:38:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/include/example/expr_serial.inc 2011-12-13 18:13:24.000000000 +0000 @@ -1,14 +1,14 @@ [example { pt::grammar::peg { rules { - AddOp {is {/ {t -} {t +}} mode value} - Digit {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}} mode value} - Expression {is {/ {x {t (} {n Expression} {t )}} {x {n Factor} {* {x {n MulOp} {n Factor}}}}} mode value} - Factor {is {x {n Term} {* {x {n AddOp} {n Term}}}} mode value} - MulOp {is {/ {t *} {t /}} mode value} - Number {is {x {? {n Sign}} {+ {n Digit}}} mode value} - Sign {is {/ {t -} {t +}} mode value} - Term {is {n Number} mode value} + AddOp {is {/ {t -} {t +}} mode value} + Digit {is {/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}} mode value} + Expression {is {x {n Term} {* {x {n AddOp} {n Term}}}} mode value} + Factor {is {/ {x {t (} {n Expression} {t )}} {n Number}} mode value} + MulOp {is {/ {t *} {t /}} mode value} + Number {is {x {? {n Sign}} {+ {n Digit}}} mode value} + Sign {is {/ {t -} {t +}} mode value} + Term {is {x {n Factor} {* {x {n MulOp} {n Factor}}}} mode value} } start {n Expression} } diff -Nru tcllib-1.13-dfsg/modules/pt/include/example/full_app.inc tcllib-1.14-dfsg/modules/pt/include/example/full_app.inc --- tcllib-1.13-dfsg/modules/pt/include/example/full_app.inc 2011-01-25 05:38:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/include/example/full_app.inc 2011-12-13 18:13:24.000000000 +0000 @@ -1,9 +1,5 @@ via [example { -pt generate \ - snit calculator.tcl \ - -class calculator \ - -name calculator \ - peg calculator.peg +pt generate snit calculator.tcl -class calculator -name calculator peg calculator.peg }] diff -Nru tcllib-1.13-dfsg/modules/pt/include/format/options_tclparam_oo.inc tcllib-1.14-dfsg/modules/pt/include/format/options_tclparam_oo.inc --- tcllib-1.13-dfsg/modules/pt/include/format/options_tclparam_oo.inc 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/include/format/options_tclparam_oo.inc 2011-12-13 18:13:24.000000000 +0000 @@ -2,12 +2,24 @@ [list_begin options] [include options_std.inc] +[comment {================================================================================}] [opt_def -class string] The value of this option is the name of the class to generate, without leading colons. Note, it serves double-duty as the name of the package -to generate too. +to generate too, if option [option -package] is not specified, see below. -The default value is [const CLASS]. +The default value is [const CLASS], applying if neither option +[option -class] nor [option -package] were specified. + +[comment {================================================================================}] +[opt_def -package string] + +The value of this option is the name of the package to generate, without +leading colons. Note, it serves double-duty as the name of the class +to generate too, if option [option -class] is not specified, see above. + +The default value is [const PACKAGE], applying if neither option +[option -package] nor [option -class] were specified. [list_end] diff -Nru tcllib-1.13-dfsg/modules/pt/include/format/options_tclparam_snit.inc tcllib-1.14-dfsg/modules/pt/include/format/options_tclparam_snit.inc --- tcllib-1.13-dfsg/modules/pt/include/format/options_tclparam_snit.inc 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/include/format/options_tclparam_snit.inc 2011-12-13 18:13:24.000000000 +0000 @@ -2,12 +2,24 @@ [list_begin options] [include options_std.inc] +[comment {================================================================================}] [opt_def -class string] The value of this option is the name of the class to generate, without leading colons. Note, it serves double-duty as the name of the package -to generate too. +to generate too, if option [option -package] is not specified, see below. -The default value is [const CLASS]. +The default value is [const CLASS], applying if neither option +[option -class] nor [option -package] were specified. + +[comment {================================================================================}] +[opt_def -package string] + +The value of this option is the name of the package to generate, without +leading colons. Note, it serves double-duty as the name of the class +to generate too, if option [option -class] is not specified, see above. + +The default value is [const PACKAGE], applying if neither option +[option -package] nor [option -class] were specified. [list_end] diff -Nru tcllib-1.13-dfsg/modules/pt/pkgIndex.tcl tcllib-1.14-dfsg/modules/pt/pkgIndex.tcl --- tcllib-1.13-dfsg/modules/pt/pkgIndex.tcl 2011-01-25 05:38:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/pkgIndex.tcl 2011-12-13 18:13:24.000000000 +0000 @@ -32,6 +32,7 @@ # Import plugins, connecting manager to the core conversion packages. package ifneeded pt::peg::import::json 1 [list source [file join $dir pt_peg_import_json.tcl]] +package ifneeded pt::peg::import::peg 1 [list source [file join $dir pt_peg_import_peg.tcl]] # Export core functionality: Conversion from PEG to a specific format. package ifneeded pt::peg::to::container 1 [list source [file join $dir pt_peg_to_container.tcl]] @@ -46,7 +47,7 @@ package ifneeded pt::peg::from::peg 1 [list source [file join $dir pt_peg_from_peg.tcl]] # PARAM runtime. -package ifneeded pt::rde 1.0.1 [list source [file join $dir pt_rdengine.tcl]] +package ifneeded pt::rde 1.0.2 [list source [file join $dir pt_rdengine.tcl]] # PEG grammar specification, as CONTAINER package ifneeded pt::peg::container::peg 1 [list source [file join $dir pt_peg_container_peg.tcl]] @@ -54,7 +55,7 @@ # */PARAM support (canned configurations). package ifneeded pt::cparam::configuration::critcl 1.0.1 [list source [file join $dir pt_cparam_config_critcl.tcl]] package ifneeded pt::tclparam::configuration::snit 1.0.1 [list source [file join $dir pt_tclparam_config_snit.tcl]] -package ifneeded pt::tclparam::configuration::tcloo 1.0.1 [list source [file join $dir pt_tclparam_config_tcloo.tcl]] +package ifneeded pt::tclparam::configuration::tcloo 1.0.2 [list source [file join $dir pt_tclparam_config_tcloo.tcl]] # Parser generator core. -package ifneeded pt::pgen 1 [list source [file join $dir pt_pgen.tcl]] +package ifneeded pt::pgen 1.0.1 [list source [file join $dir pt_pgen.tcl]] diff -Nru tcllib-1.13-dfsg/modules/pt/pt_cparam_config_critcl.tcl tcllib-1.14-dfsg/modules/pt/pt_cparam_config_critcl.tcl --- tcllib-1.13-dfsg/modules/pt/pt_cparam_config_critcl.tcl 2011-01-25 05:38:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/pt_cparam_config_critcl.tcl 2011-12-13 18:13:24.000000000 +0000 @@ -94,8 +94,8 @@ ## Supporting code for the main command. catch { - critcl::cheaders -g - critcl::debug memory symbols + #critcl::cheaders -g + #critcl::debug memory symbols } # # ## ### ###### ######## ############# diff -Nru tcllib-1.13-dfsg/modules/pt/pt_parse_peg_c.tcl tcllib-1.14-dfsg/modules/pt/pt_parse_peg_c.tcl --- tcllib-1.13-dfsg/modules/pt/pt_parse_peg_c.tcl 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/pt_parse_peg_c.tcl 2011-12-13 18:13:24.000000000 +0000 @@ -30,8 +30,8 @@ ## Supporting code for the main command. catch { - critcl::cheaders -g - critcl::debug memory symbols + #critcl::cheaders -g + #critcl::debug memory symbols } # # ## ### ###### ######## ############# diff -Nru tcllib-1.13-dfsg/modules/pt/pt_pgen.man tcllib-1.14-dfsg/modules/pt/pt_pgen.man --- tcllib-1.13-dfsg/modules/pt/pt_pgen.man 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/pt_pgen.man 2011-12-13 18:13:24.000000000 +0000 @@ -1,8 +1,8 @@ [comment {-*- text -*- doctools manpage}] -[manpage_begin pt::pgen n 1] +[manpage_begin pt::pgen n 1.0.1] [include include/module.inc] [titledesc {Parser Generator}] -[require pt::pgen [opt 1]] +[require pt::pgen [opt 1.0.1]] [description] [include include/ref_intro.inc] diff -Nru tcllib-1.13-dfsg/modules/pt/pt_pgen.tcl tcllib-1.14-dfsg/modules/pt/pt_pgen.tcl --- tcllib-1.13-dfsg/modules/pt/pt_pgen.tcl 2011-01-25 05:38:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/pt_pgen.tcl 2011-12-13 18:13:24.000000000 +0000 @@ -86,6 +86,7 @@ proc ::pt::pgen::Write::snit {args} { # args = (option value)... grammar pt::peg::to::tclparam configure {*}[Package [Class [lrange $args 0 end-1]]] + ClassPackageDefaults pt::tclparam::configuration::snit def \ $class $package \ @@ -97,6 +98,7 @@ proc ::pt::pgen::Write::oo {args} { # args = (option value)... grammar pt::peg::to::tclparam configure {*}[Package [Class [lrange $args 0 end-1]]] + ClassPackageDefaults pt::tclparam::configuration::tcloo def \ $class $package \ @@ -127,9 +129,27 @@ # ### ### ### ######### ######### ######### ## Internals: Special option handling handling. +proc ::pt::pgen::Write::ClassPackageDefaults {} { + upvar 1 class class + upvar 1 package package + + # Initialize undefined class and package names from each other, + # i.e. from whichever of the two was specified, or fallback to + # hardwired defaults if neither was specified. + + if {[info exists class] && ![info exists package]} { + set package $class + } elseif {[info exists package] && ![info exists class]} { + set class $package + } elseif {![info exists package] && ![info exists class]} { + set class CLASS + set package PACKAGE + } + return +} + proc ::pt::pgen::Write::Class {optiondict} { upvar 1 class class - set class CLASS set res {} foreach {option value} $optiondict { if {$option eq "-class"} { @@ -143,7 +163,6 @@ proc ::pt::pgen::Write::Package {optiondict} { upvar 1 package package - set package PACKAGE set res {} foreach {option value} $optiondict { if {$option eq "-package"} { @@ -158,4 +177,4 @@ # ### ### ### ######### ######### ######### ## Package Management -package provide pt::pgen 1 +package provide pt::pgen 1.0.1 diff -Nru tcllib-1.13-dfsg/modules/pt/pt_rdengine_c.tcl tcllib-1.14-dfsg/modules/pt/pt_rdengine_c.tcl --- tcllib-1.13-dfsg/modules/pt/pt_rdengine_c.tcl 2011-01-25 05:38:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/pt_rdengine_c.tcl 2011-12-13 18:13:24.000000000 +0000 @@ -29,8 +29,8 @@ ## Supporting code for the main command. catch { - critcl::cheaders -g - critcl::debug memory symbols + #critcl::cheaders -g + #critcl::debug memory symbols } critcl::cheaders rde_critcl/*.h diff -Nru tcllib-1.13-dfsg/modules/pt/pt_rdengine.man tcllib-1.14-dfsg/modules/pt/pt_rdengine.man --- tcllib-1.13-dfsg/modules/pt/pt_rdengine.man 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/pt_rdengine.man 2011-12-13 18:13:24.000000000 +0000 @@ -1,8 +1,8 @@ [comment {-*- text -*- doctools manpage}] -[manpage_begin pt::rde n 1.0.1] +[manpage_begin pt::rde n 1.0.2] [include include/module.inc] [titledesc {Parsing Runtime Support, PARAM based}] -[require pt::rde [opt 1.0.1]] +[require pt::rde [opt 1.0.2]] [require snit] [require struct::stack 1.4] [require pt::ast 1.1] diff -Nru tcllib-1.13-dfsg/modules/pt/pt_rdengine_oo.tcl tcllib-1.14-dfsg/modules/pt/pt_rdengine_oo.tcl --- tcllib-1.13-dfsg/modules/pt/pt_rdengine_oo.tcl 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/pt_rdengine_oo.tcl 2011-12-13 18:13:24.000000000 +0000 @@ -551,5 +551,5 @@ # # ## ### ##### ######## ############# ##################### ## Ready -package provide pt::rde 1 +package provide pt::rde 1.0.2 return diff -Nru tcllib-1.13-dfsg/modules/pt/pt_rdengine.tcl tcllib-1.14-dfsg/modules/pt/pt_rdengine.tcl --- tcllib-1.13-dfsg/modules/pt/pt_rdengine.tcl 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/pt_rdengine.tcl 2011-12-13 18:13:24.000000000 +0000 @@ -184,4 +184,4 @@ namespace export rde } -package provide pt::rde 1.0.1 +package provide pt::rde 1.0.2 diff -Nru tcllib-1.13-dfsg/modules/pt/pt_tclparam_config_tcloo.tcl tcllib-1.14-dfsg/modules/pt/pt_tclparam_config_tcloo.tcl --- tcllib-1.13-dfsg/modules/pt/pt_tclparam_config_tcloo.tcl 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/pt_tclparam_config_tcloo.tcl 2011-12-13 18:13:24.000000000 +0000 @@ -62,7 +62,7 @@ ## Requirements package require Tcl 8.5 - package require OO + package require TclOO package require pt::rde::oo ; # OO-based implementation of the # PARAM virtual machine # underlying the Tcl/PARAM code @@ -117,5 +117,5 @@ # # ## ### ##### ######## ############# ##################### ## Ready -package provide pt::tclparam::configuration::tcloo 1.0.1 +package provide pt::tclparam::configuration::tcloo 1.0.2 return diff -Nru tcllib-1.13-dfsg/modules/pt/rde_critcl/ot.c tcllib-1.14-dfsg/modules/pt/rde_critcl/ot.c --- tcllib-1.13-dfsg/modules/pt/rde_critcl/ot.c 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/rde_critcl/ot.c 2011-12-13 18:13:24.000000000 +0000 @@ -52,9 +52,13 @@ TRACE (("INTERNALIZE")); /* - * Drop any previous internal rep. + * Drop any previous internal rep. But generate the string rep first, if + * it is missing. */ + if (!obj->bytes) { + Tcl_GetString (obj); + } if (obj->typePtr != NULL && obj->typePtr->freeIntRepProc != NULL) { obj->typePtr->freeIntRepProc(obj); } diff -Nru tcllib-1.13-dfsg/modules/pt/rde_critcl/param.c tcllib-1.14-dfsg/modules/pt/rde_critcl/param.c --- tcllib-1.13-dfsg/modules/pt/rde_critcl/param.c 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/rde_critcl/param.c 2011-12-13 18:13:24.000000000 +0000 @@ -515,7 +515,7 @@ TRACE (("RDE_PARAM %p",p)); ASSERT(p->SV,"Unable to push undefined semantic value"); - TRACE (("rde_param_i_ast_value_push %p => (%p)/%d", p, p->SV, )); + TRACE (("rde_param_i_ast_value_push %p => (%p)", p, p->SV)); TRACE (("SV = (%p rc%d '%s')", p->SV, p->SV->refCount, Tcl_GetString (p->SV))); rde_stack_push (p->ast, p->SV); diff -Nru tcllib-1.13-dfsg/modules/pt/rde_critcl/p.c tcllib-1.14-dfsg/modules/pt/rde_critcl/p.c --- tcllib-1.13-dfsg/modules/pt/rde_critcl/p.c 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/rde_critcl/p.c 2011-12-13 18:13:24.000000000 +0000 @@ -122,7 +122,7 @@ hPtr = Tcl_FindHashEntry (&p->str, literal); if (hPtr) { res = (int) Tcl_GetHashValue (hPtr); - RETURN("%d",res); + RETURN("CACHED %d",res); } hPtr = Tcl_CreateHashEntry(&p->str, literal, &isnew); @@ -152,7 +152,7 @@ TRACE (("UPDATE ENGINE")); rde_param_update_strings (p->p, p->numstr, p->string); - RETURN("%d",res); + RETURN("NEW %d",res); } /* .................................................. */ diff -Nru tcllib-1.13-dfsg/modules/pt/rde_critcl/util.c tcllib-1.14-dfsg/modules/pt/rde_critcl/util.c --- tcllib-1.13-dfsg/modules/pt/rde_critcl/util.c 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/rde_critcl/util.c 2011-12-13 18:13:24.000000000 +0000 @@ -3,6 +3,7 @@ * == pt::rde (critcl) - Data Structures - PARAM architectural state. */ +#include #include /* Allocation utilities */ /* diff -Nru tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/0_basic_arithmetic tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/0_basic_arithmetic --- tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/0_basic_arithmetic 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/0_basic_arithmetic 2011-12-13 18:13:24.000000000 +0000 @@ -30,8 +30,8 @@ ## Supporting code for the main command. catch { - critcl::cheaders -g - critcl::debug memory symbols + #critcl::cheaders -g + #critcl::debug memory symbols } # # ## ### ###### ######## ############# @@ -803,7 +803,7 @@ ENTER ("rde_param_i_ast_value_push"); TRACE (("RDE_PARAM %p",p)); ASSERT(p->SV,"Unable to push undefined semantic value"); - TRACE (("rde_param_i_ast_value_push %p => (%p)/%d", p, p->SV, )); + TRACE (("rde_param_i_ast_value_push %p => (%p)", p, p->SV)); TRACE (("SV = (%p rc%d '%s')", p->SV, p->SV->refCount, Tcl_GetString (p->SV))); rde_stack_push (p->ast, p->SV); Tcl_IncrRefCount (p->SV); diff -Nru tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/10_notahead tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/10_notahead --- tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/10_notahead 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/10_notahead 2011-12-13 18:13:24.000000000 +0000 @@ -30,8 +30,8 @@ ## Supporting code for the main command. catch { - critcl::cheaders -g - critcl::debug memory symbols + #critcl::cheaders -g + #critcl::debug memory symbols } # # ## ### ###### ######## ############# @@ -803,7 +803,7 @@ ENTER ("rde_param_i_ast_value_push"); TRACE (("RDE_PARAM %p",p)); ASSERT(p->SV,"Unable to push undefined semantic value"); - TRACE (("rde_param_i_ast_value_push %p => (%p)/%d", p, p->SV, )); + TRACE (("rde_param_i_ast_value_push %p => (%p)", p, p->SV)); TRACE (("SV = (%p rc%d '%s')", p->SV, p->SV->refCount, Tcl_GetString (p->SV))); rde_stack_push (p->ast, p->SV); Tcl_IncrRefCount (p->SV); diff -Nru tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/1_functions tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/1_functions --- tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/1_functions 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/1_functions 2011-12-13 18:13:24.000000000 +0000 @@ -30,8 +30,8 @@ ## Supporting code for the main command. catch { - critcl::cheaders -g - critcl::debug memory symbols + #critcl::cheaders -g + #critcl::debug memory symbols } # # ## ### ###### ######## ############# @@ -803,7 +803,7 @@ ENTER ("rde_param_i_ast_value_push"); TRACE (("RDE_PARAM %p",p)); ASSERT(p->SV,"Unable to push undefined semantic value"); - TRACE (("rde_param_i_ast_value_push %p => (%p)/%d", p, p->SV, )); + TRACE (("rde_param_i_ast_value_push %p => (%p)", p, p->SV)); TRACE (("SV = (%p rc%d '%s')", p->SV, p->SV->refCount, Tcl_GetString (p->SV))); rde_stack_push (p->ast, p->SV); Tcl_IncrRefCount (p->SV); diff -Nru tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/2_fun_arithmetic tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/2_fun_arithmetic --- tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/2_fun_arithmetic 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/2_fun_arithmetic 2011-12-13 18:13:24.000000000 +0000 @@ -30,8 +30,8 @@ ## Supporting code for the main command. catch { - critcl::cheaders -g - critcl::debug memory symbols + #critcl::cheaders -g + #critcl::debug memory symbols } # # ## ### ###### ######## ############# @@ -803,7 +803,7 @@ ENTER ("rde_param_i_ast_value_push"); TRACE (("RDE_PARAM %p",p)); ASSERT(p->SV,"Unable to push undefined semantic value"); - TRACE (("rde_param_i_ast_value_push %p => (%p)/%d", p, p->SV, )); + TRACE (("rde_param_i_ast_value_push %p => (%p)", p, p->SV)); TRACE (("SV = (%p rc%d '%s')", p->SV, p->SV->refCount, Tcl_GetString (p->SV))); rde_stack_push (p->ast, p->SV); Tcl_IncrRefCount (p->SV); diff -Nru tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/3_peg_itself tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/3_peg_itself --- tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/3_peg_itself 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/3_peg_itself 2011-12-13 18:13:24.000000000 +0000 @@ -30,8 +30,8 @@ ## Supporting code for the main command. catch { - critcl::cheaders -g - critcl::debug memory symbols + #critcl::cheaders -g + #critcl::debug memory symbols } # # ## ### ###### ######## ############# @@ -803,7 +803,7 @@ ENTER ("rde_param_i_ast_value_push"); TRACE (("RDE_PARAM %p",p)); ASSERT(p->SV,"Unable to push undefined semantic value"); - TRACE (("rde_param_i_ast_value_push %p => (%p)/%d", p, p->SV, )); + TRACE (("rde_param_i_ast_value_push %p => (%p)", p, p->SV)); TRACE (("SV = (%p rc%d '%s')", p->SV, p->SV->refCount, Tcl_GetString (p->SV))); rde_stack_push (p->ast, p->SV); Tcl_IncrRefCount (p->SV); diff -Nru tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/4_choice tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/4_choice --- tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/4_choice 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/4_choice 2011-12-13 18:13:24.000000000 +0000 @@ -30,8 +30,8 @@ ## Supporting code for the main command. catch { - critcl::cheaders -g - critcl::debug memory symbols + #critcl::cheaders -g + #critcl::debug memory symbols } # # ## ### ###### ######## ############# @@ -803,7 +803,7 @@ ENTER ("rde_param_i_ast_value_push"); TRACE (("RDE_PARAM %p",p)); ASSERT(p->SV,"Unable to push undefined semantic value"); - TRACE (("rde_param_i_ast_value_push %p => (%p)/%d", p, p->SV, )); + TRACE (("rde_param_i_ast_value_push %p => (%p)", p, p->SV)); TRACE (("SV = (%p rc%d '%s')", p->SV, p->SV->refCount, Tcl_GetString (p->SV))); rde_stack_push (p->ast, p->SV); Tcl_IncrRefCount (p->SV); diff -Nru tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/5_sequence tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/5_sequence --- tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/5_sequence 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/5_sequence 2011-12-13 18:13:24.000000000 +0000 @@ -30,8 +30,8 @@ ## Supporting code for the main command. catch { - critcl::cheaders -g - critcl::debug memory symbols + #critcl::cheaders -g + #critcl::debug memory symbols } # # ## ### ###### ######## ############# @@ -803,7 +803,7 @@ ENTER ("rde_param_i_ast_value_push"); TRACE (("RDE_PARAM %p",p)); ASSERT(p->SV,"Unable to push undefined semantic value"); - TRACE (("rde_param_i_ast_value_push %p => (%p)/%d", p, p->SV, )); + TRACE (("rde_param_i_ast_value_push %p => (%p)", p, p->SV)); TRACE (("SV = (%p rc%d '%s')", p->SV, p->SV->refCount, Tcl_GetString (p->SV))); rde_stack_push (p->ast, p->SV); Tcl_IncrRefCount (p->SV); diff -Nru tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/6_optional tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/6_optional --- tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/6_optional 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/6_optional 2011-12-13 18:13:24.000000000 +0000 @@ -30,8 +30,8 @@ ## Supporting code for the main command. catch { - critcl::cheaders -g - critcl::debug memory symbols + #critcl::cheaders -g + #critcl::debug memory symbols } # # ## ### ###### ######## ############# @@ -803,7 +803,7 @@ ENTER ("rde_param_i_ast_value_push"); TRACE (("RDE_PARAM %p",p)); ASSERT(p->SV,"Unable to push undefined semantic value"); - TRACE (("rde_param_i_ast_value_push %p => (%p)/%d", p, p->SV, )); + TRACE (("rde_param_i_ast_value_push %p => (%p)", p, p->SV)); TRACE (("SV = (%p rc%d '%s')", p->SV, p->SV->refCount, Tcl_GetString (p->SV))); rde_stack_push (p->ast, p->SV); Tcl_IncrRefCount (p->SV); diff -Nru tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/7_kleene tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/7_kleene --- tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/7_kleene 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/7_kleene 2011-12-13 18:13:24.000000000 +0000 @@ -30,8 +30,8 @@ ## Supporting code for the main command. catch { - critcl::cheaders -g - critcl::debug memory symbols + #critcl::cheaders -g + #critcl::debug memory symbols } # # ## ### ###### ######## ############# @@ -803,7 +803,7 @@ ENTER ("rde_param_i_ast_value_push"); TRACE (("RDE_PARAM %p",p)); ASSERT(p->SV,"Unable to push undefined semantic value"); - TRACE (("rde_param_i_ast_value_push %p => (%p)/%d", p, p->SV, )); + TRACE (("rde_param_i_ast_value_push %p => (%p)", p, p->SV)); TRACE (("SV = (%p rc%d '%s')", p->SV, p->SV->refCount, Tcl_GetString (p->SV))); rde_stack_push (p->ast, p->SV); Tcl_IncrRefCount (p->SV); diff -Nru tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/8_pkleene tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/8_pkleene --- tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/8_pkleene 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/8_pkleene 2011-12-13 18:13:24.000000000 +0000 @@ -30,8 +30,8 @@ ## Supporting code for the main command. catch { - critcl::cheaders -g - critcl::debug memory symbols + #critcl::cheaders -g + #critcl::debug memory symbols } # # ## ### ###### ######## ############# @@ -803,7 +803,7 @@ ENTER ("rde_param_i_ast_value_push"); TRACE (("RDE_PARAM %p",p)); ASSERT(p->SV,"Unable to push undefined semantic value"); - TRACE (("rde_param_i_ast_value_push %p => (%p)/%d", p, p->SV, )); + TRACE (("rde_param_i_ast_value_push %p => (%p)", p, p->SV)); TRACE (("SV = (%p rc%d '%s')", p->SV, p->SV->refCount, Tcl_GetString (p->SV))); rde_stack_push (p->ast, p->SV); Tcl_IncrRefCount (p->SV); diff -Nru tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/9_ahead tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/9_ahead --- tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/9_ahead 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_cparam-critcl/9_ahead 2011-12-13 18:13:24.000000000 +0000 @@ -30,8 +30,8 @@ ## Supporting code for the main command. catch { - critcl::cheaders -g - critcl::debug memory symbols + #critcl::cheaders -g + #critcl::debug memory symbols } # # ## ### ###### ######## ############# @@ -803,7 +803,7 @@ ENTER ("rde_param_i_ast_value_push"); TRACE (("RDE_PARAM %p",p)); ASSERT(p->SV,"Unable to push undefined semantic value"); - TRACE (("rde_param_i_ast_value_push %p => (%p)/%d", p, p->SV, )); + TRACE (("rde_param_i_ast_value_push %p => (%p)", p, p->SV)); TRACE (("SV = (%p rc%d '%s')", p->SV, p->SV->refCount, Tcl_GetString (p->SV))); rde_stack_push (p->ast, p->SV); Tcl_IncrRefCount (p->SV); diff -Nru tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/0_basic_arithmetic tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/0_basic_arithmetic --- tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/0_basic_arithmetic 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/0_basic_arithmetic 2011-12-13 18:13:24.000000000 +0000 @@ -12,7 +12,7 @@ ## Requirements package require Tcl 8.5 -package require OO +package require TclOO package require pt::rde::oo ; # OO-based implementation of the # PARAM virtual machine # underlying the Tcl/PARAM code diff -Nru tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/10_notahead tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/10_notahead --- tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/10_notahead 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/10_notahead 2011-12-13 18:13:24.000000000 +0000 @@ -12,7 +12,7 @@ ## Requirements package require Tcl 8.5 -package require OO +package require TclOO package require pt::rde::oo ; # OO-based implementation of the # PARAM virtual machine # underlying the Tcl/PARAM code diff -Nru tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/1_functions tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/1_functions --- tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/1_functions 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/1_functions 2011-12-13 18:13:24.000000000 +0000 @@ -12,7 +12,7 @@ ## Requirements package require Tcl 8.5 -package require OO +package require TclOO package require pt::rde::oo ; # OO-based implementation of the # PARAM virtual machine # underlying the Tcl/PARAM code diff -Nru tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/2_fun_arithmetic tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/2_fun_arithmetic --- tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/2_fun_arithmetic 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/2_fun_arithmetic 2011-12-13 18:13:24.000000000 +0000 @@ -12,7 +12,7 @@ ## Requirements package require Tcl 8.5 -package require OO +package require TclOO package require pt::rde::oo ; # OO-based implementation of the # PARAM virtual machine # underlying the Tcl/PARAM code diff -Nru tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/3_peg_itself tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/3_peg_itself --- tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/3_peg_itself 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/3_peg_itself 2011-12-13 18:13:24.000000000 +0000 @@ -12,7 +12,7 @@ ## Requirements package require Tcl 8.5 -package require OO +package require TclOO package require pt::rde::oo ; # OO-based implementation of the # PARAM virtual machine # underlying the Tcl/PARAM code diff -Nru tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/4_choice tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/4_choice --- tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/4_choice 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/4_choice 2011-12-13 18:13:24.000000000 +0000 @@ -12,7 +12,7 @@ ## Requirements package require Tcl 8.5 -package require OO +package require TclOO package require pt::rde::oo ; # OO-based implementation of the # PARAM virtual machine # underlying the Tcl/PARAM code diff -Nru tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/5_sequence tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/5_sequence --- tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/5_sequence 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/5_sequence 2011-12-13 18:13:24.000000000 +0000 @@ -12,7 +12,7 @@ ## Requirements package require Tcl 8.5 -package require OO +package require TclOO package require pt::rde::oo ; # OO-based implementation of the # PARAM virtual machine # underlying the Tcl/PARAM code diff -Nru tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/6_optional tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/6_optional --- tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/6_optional 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/6_optional 2011-12-13 18:13:24.000000000 +0000 @@ -12,7 +12,7 @@ ## Requirements package require Tcl 8.5 -package require OO +package require TclOO package require pt::rde::oo ; # OO-based implementation of the # PARAM virtual machine # underlying the Tcl/PARAM code diff -Nru tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/7_kleene tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/7_kleene --- tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/7_kleene 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/7_kleene 2011-12-13 18:13:24.000000000 +0000 @@ -12,7 +12,7 @@ ## Requirements package require Tcl 8.5 -package require OO +package require TclOO package require pt::rde::oo ; # OO-based implementation of the # PARAM virtual machine # underlying the Tcl/PARAM code diff -Nru tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/8_pkleene tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/8_pkleene --- tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/8_pkleene 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/8_pkleene 2011-12-13 18:13:24.000000000 +0000 @@ -12,7 +12,7 @@ ## Requirements package require Tcl 8.5 -package require OO +package require TclOO package require pt::rde::oo ; # OO-based implementation of the # PARAM virtual machine # underlying the Tcl/PARAM code diff -Nru tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/9_ahead tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/9_ahead --- tcllib-1.13-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/9_ahead 2011-01-25 05:38:01.000000000 +0000 +++ tcllib-1.14-dfsg/modules/pt/tests/data/ok/peg_tclparam-tcloo/9_ahead 2011-12-13 18:13:24.000000000 +0000 @@ -12,7 +12,7 @@ ## Requirements package require Tcl 8.5 -package require OO +package require TclOO package require pt::rde::oo ; # OO-based implementation of the # PARAM virtual machine # underlying the Tcl/PARAM code diff -Nru tcllib-1.13-dfsg/modules/rc4/ChangeLog tcllib-1.14-dfsg/modules/rc4/ChangeLog --- tcllib-1.13-dfsg/modules/rc4/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/rc4/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/rcs/ChangeLog tcllib-1.14-dfsg/modules/rcs/ChangeLog --- tcllib-1.13-dfsg/modules/rcs/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/rcs/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/report/ChangeLog tcllib-1.14-dfsg/modules/report/ChangeLog --- tcllib-1.13-dfsg/modules/report/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/report/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/rest/ChangeLog tcllib-1.14-dfsg/modules/rest/ChangeLog --- tcllib-1.13-dfsg/modules/rest/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/rest/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/rest/pkgIndex.tcl tcllib-1.14-dfsg/modules/rest/pkgIndex.tcl --- tcllib-1.13-dfsg/modules/rest/pkgIndex.tcl 2011-01-25 05:38:02.000000000 +0000 +++ tcllib-1.14-dfsg/modules/rest/pkgIndex.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -1,2 +1,2 @@ if {![package vsatisfies [package provide Tcl] 8.5]} {return} -package ifneeded rest 1.0.0 [list source [file join $dir rest.tcl]] +package ifneeded rest 1.0 [list source [file join $dir rest.tcl]] diff -Nru tcllib-1.13-dfsg/modules/ripemd/ChangeLog tcllib-1.14-dfsg/modules/ripemd/ChangeLog --- tcllib-1.13-dfsg/modules/ripemd/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/ripemd/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/sasl/ChangeLog tcllib-1.14-dfsg/modules/sasl/ChangeLog --- tcllib-1.13-dfsg/modules/sasl/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/sasl/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/sha1/ChangeLog tcllib-1.14-dfsg/modules/sha1/ChangeLog --- tcllib-1.13-dfsg/modules/sha1/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/sha1/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/sha1/sha256.h tcllib-1.14-dfsg/modules/sha1/sha256.h --- tcllib-1.13-dfsg/modules/sha1/sha256.h 2011-01-25 05:37:58.000000000 +0000 +++ tcllib-1.14-dfsg/modules/sha1/sha256.h 2011-12-13 18:13:22.000000000 +0000 @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: sha256.h,v 1.3 2009/10/27 20:15:39 andreas_kupries Exp $ + * $Id: sha256.h,v 1.4 2011/04/21 17:51:55 andreas_kupries Exp $ */ #ifndef _SHA256_H @@ -44,11 +44,11 @@ #ifdef _MSC_VER typedef unsigned __int64 uint64_t; -#elif !(defined(__hpux) && defined(__ia64)) +#elif !(defined(__hpux) || defined(_AIX)) typedef unsigned long long uint64_t; #endif -#if !(defined(__hpux) && defined(__ia64)) +#if !(defined(__hpux)) typedef unsigned int uint32_t; typedef unsigned char uint8_t; #endif diff -Nru tcllib-1.13-dfsg/modules/simulation/ChangeLog tcllib-1.14-dfsg/modules/simulation/ChangeLog --- tcllib-1.13-dfsg/modules/simulation/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/simulation/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,8 +1,33 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + +2011-06-17 Arjen Markus + * random.tcl: [Bug 3316478]: solve a few more bugs in the PRNG procedures + * random.test: added to get at least (very) basic confidence in the PRNG procedures + * pkgIndex.tcl: bumped version to 0.3 for "random" + +2011-06-16 Arjen Markus + + * random.tcl: [Bug 3316478]: prng_Block was renamed to prng_Blocke - typo fixed; superfluous parenthesis removed + * pkgIndex.tcl: bumped version to 0.2 for "random" + + +2011-06-15 Arjen Markus + + * simulation_random.man: [Bug 3316476]: Documentation of prng_Block was wrong wrt the result + * random.tcl: [Bug 3316478]: prng_Rectangle was overwritten by implementation of prng_Block + because the name was wrong + * random.tcl: [Bug 3316505]: fix in prng_chSquared + (all three reported by Andreas Kupries) + 2011-01-24 Andreas Kupries * * Released and tagged Tcllib 1.13 ======================== - * + * 2009-12-11 Andreas Kupries @@ -13,19 +38,19 @@ * * Released and tagged Tcllib 1.12 ======================== - * + * 2008-12-12 Andreas Kupries * * Released and tagged Tcllib 1.11.1 ======================== - * + * 2008-10-16 Andreas Kupries * * Released and tagged Tcllib 1.11 ======================== - * + * 2008-03-14 Andreas Kupries diff -Nru tcllib-1.13-dfsg/modules/simulation/pkgIndex.tcl tcllib-1.14-dfsg/modules/simulation/pkgIndex.tcl --- tcllib-1.13-dfsg/modules/simulation/pkgIndex.tcl 2011-01-25 05:37:58.000000000 +0000 +++ tcllib-1.14-dfsg/modules/simulation/pkgIndex.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -1,3 +1,3 @@ -package ifneeded simulation::random 0.1 [list source [file join $dir random.tcl]] +package ifneeded simulation::random 0.3 [list source [file join $dir random.tcl]] package ifneeded simulation::montecarlo 0.1 [list source [file join $dir montecarlo.tcl]] package ifneeded simulation::annealing 0.2 [list source [file join $dir annealing.tcl]] diff -Nru tcllib-1.13-dfsg/modules/simulation/random.tcl tcllib-1.14-dfsg/modules/simulation/random.tcl --- tcllib-1.13-dfsg/modules/simulation/random.tcl 2011-01-25 05:37:58.000000000 +0000 +++ tcllib-1.14-dfsg/modules/simulation/random.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -18,7 +18,7 @@ # Several formulae and algorithms come from "Monte Carlo Simulation" # by C. Mooney (Sage Publications, 1997) # -# RCS: @(#) $Id: random.tcl,v 1.1 2008/01/24 05:45:46 arjenmarkus Exp $ +# RCS: @(#) $Id: random.tcl,v 1.4 2011/06/17 06:40:14 arjenmarkus Exp $ #------------------------------------------------------------------------------ package require Tcl 8.4 @@ -239,7 +239,7 @@ proc $name {} [string map [list MIN $min F $f] \ { - return [expr {MIN + log( -log(1.0-rand() ) / F}] + return [expr {MIN + log( -log(1.0-rand()) ) / F}] }] return $name @@ -270,7 +270,7 @@ set rad [expr {sqrt(-log(rand()))}] set phi [expr {2.0*$pi*rand()}] set r [expr {$rad*cos($phi)}] - set y [expr {$r*$r}] + set y [expr {$y+$r*$r}] } return [expr {($y-DF)/sqrt(2.0*DF)}] }] @@ -298,7 +298,7 @@ proc $name {} [string map [list RAD $rad] \ { variable pi - set rad [expr {RAD*sqrt((rand())}] + set rad [expr {RAD*sqrt(rand())}] set phi [expr {2.0*$pi*rand()}] set x [expr {$rad*cos($phi)}] set y [expr {$rad*sin($phi)}] @@ -328,7 +328,7 @@ proc $name {} [string map [list RAD $rad] \ { variable pi - set rad [expr {RAD*pow((rand(),0.333333333333)}] + set rad [expr {RAD*pow(rand(),0.333333333333)}] set phi [expr {2.0*$pi*rand()}] set theta [expr {acos(2.0*rand()-1.0)}] set x [expr {$rad*cos($phi)*cos($theta)}] @@ -414,7 +414,7 @@ # Name of a procedure that returns the x-, y- and z-coordinates of # such a random point # -proc ::simulation::random::prng_Rectangle {length width depth} { +proc ::simulation::random::prng_Block {length width depth} { variable count incr count @@ -434,7 +434,7 @@ # Announce the package # -package provide simulation::random 0.1 +package provide simulation::random 0.3 # main -- diff -Nru tcllib-1.13-dfsg/modules/simulation/random.test tcllib-1.14-dfsg/modules/simulation/random.test --- tcllib-1.13-dfsg/modules/simulation/random.test 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/simulation/random.test 2011-12-13 18:13:23.000000000 +0000 @@ -0,0 +1,239 @@ +## -*- tcl -*- +# Tests for the PRNG procedures -*- tcl -*- +# +# This file contains a collection of tests for one or more of the Tcllib +# procedures. Sourcing this file into Tcl runs the tests and +# generates output for errors. No output means no errors were found. +# +# $Id: random.test,v 1.1 2011/06/17 06:40:14 arjenmarkus Exp $ +# +# Copyright (c) 2011 by Arjen Markus +# All rights reserved. +# +# ------------------------------------------------------------------------- + +source [file join \ + [file dirname [file dirname [file join [pwd] [info script]]]] \ + devtools testutilities.tcl] + +testsNeedTcl 8.4 +testsNeedTcltest 2.1 + +#support { +# useLocal random.tcl simulation::random +#} +testing { + useLocal random.tcl simulation::random +} + +# ------------------------------------------------------------------------- + +# +# As the values were given with four digits, an absolute +# error is most appropriate +# +proc matchNumbers {expected actual} { + set match 1 + foreach a $actual e $expected { + if {abs($a-$e) > 0.1e-4} { + set match 0 + break + } + } + return $match +} + +customMatch numbers matchNumbers + +# ------------------------------------------------------------------------- + +test "Bernoulli-1.0" "Bernoulli generator with p=0" \ + -body { + set p [::simulation::random::prng_Bernoulli 0.0] + set count 0 + for {set i 0} {$i < 1000} {incr i} { + set rnd [$p] + if { $rnd > 0.0 } { + incr count + } + } + set count +} -result 0 + +test "Bernoulli-1.1" "Bernoulli generator with p=1" \ + -body { + set p [::simulation::random::prng_Bernoulli 1.0] + set count 0 + for {set i 0} {$i < 1000} {incr i} { + set rnd [$p] + if { $rnd > 0.0 } { + incr count + } + } + set count +} -result 1000 + +test "Uniform-1.0" "Uniform generator with number between -1.0 and 1.0" \ + -body { + set p [::simulation::random::prng_Uniform -1.0 1.0] + set nearminus1 0 + set nearplus1 0 + set outside 0 + for {set i 0} {$i < 1000} {incr i} { + set rnd [$p] + if { $rnd > 0.9 } { + incr nearplus1 + } + if { $rnd < -0.9 } { + incr nearminus1 + } + if { $rnd < -1.0 || $rnd > 1.0 } { + incr outside + } + } + + # + # It is very unlikely that all 1000 numbers stay within the range -0.9 -- 0.9 + # + set result [expr {$nearplus1 > 0 && $nearminus1 > 0 && $outside == 0}] +} -result 1 + +test "Exponential-1.0" "Exponential generator with minimum -1.0 and mean 1" \ + -body { + set p [::simulation::random::prng_Exponential -1.0 1.0] + set outside 0 + set mean 0.0 + for {set i 0} {$i < 1000} {incr i} { + set rnd [$p] + if { $rnd < -1.0 } { + incr outside + } + set mean [expr {$mean + $rnd}] + } + set mean [expr {$mean / 1000.0}] + + # + # We use a rough estimate for the deviation in the mean + # + set result [expr {$outside == 0 && abs($mean - 1.0) < 0.5}] +} -result 1 + +test "Discrete-1.0" "Discrete generator with numbers 0, 1, 2 and 3" \ + -body { + set p [::simulation::random::prng_Discrete 4] + set outside 0 + for {set i 0} {$i < 1000} {incr i} { + set rnd [$p] + switch -- $rnd { + 0 - 1 - 2 - 3 { + # Nothing to do + } + default { + incr outside + } + } + } + set result [expr {$outside == 0}] +} -result 1 + +test "Poisson-1.0" "Poisson generator with mean 10" \ + -body { + set p [::simulation::random::prng_Poisson 10] + set noninteger 0 + set mean 0.0 + for {set i 0} {$i < 1000} {incr i} { + set rnd [$p] + if { ![string is integer -strict $rnd] } { + incr noninteger + } + set mean [expr {$mean + $rnd}] + } + set mean [expr {$mean / 1000.0}] + + # + # We use a rough estimate for the deviation in the mean + # + set result [expr {$noninteger == 0 && abs($mean - 10.0) < 0.5}] +} -result 1 + +test "Normal-1.0" "Normal generator with mean 1 and standard deviation 1" \ + -body { + set p [::simulation::random::prng_Normal 1 1] + set mean 0.0 + set stdev 0.0 + for {set i 0} {$i < 1000} {incr i} { + set rnd [$p] + set mean [expr {$mean + $rnd}] + set stdev [expr {$stdev + $rnd * $rnd}] + } + set mean [expr {$mean / 1000.0}] + set stdev [expr {sqrt($stdev / 1000.0)}] + + # + # We use a rough estimate for the deviation in the mean and stdev + # Main effect of test: is the procedure syntactically correct? + # + set result [expr {abs($mean - 1.0) < 0.5 && abs($stdev - 1.0) < 0.5}] +} -result 1 + +# +# TODO: These tests merely check that the generated procedure "works" +# +test "Pareto-1.0" "Pareto generator with minimum 1 and steepness 2" \ + -body { + set p [::simulation::random::prng_Pareto 1 2] + set rnd [$p] + set result 1 +} -result 1 + +test "Gumbel-1.0" "Gumbel generator with minimum 1 and scale factor 3" \ + -body { + set p [::simulation::random::prng_Gumbel 1 3] + set rnd [$p] + set result 1 +} -result 1 + +test "ChiSquared-1.0" "chi-squared generator with 4 degrees of freedom" \ + -body { + set p [::simulation::random::prng_chiSquared 4] + set rnd [$p] + set result 1 +} -result 1 + +test "Disk-1.0" "disk generator with radius 2" \ + -body { + set p [::simulation::random::prng_Disk 2] + set rnd [$p] + set result [llength $rnd] +} -result 2 + +test "Ball-1.0" "ball generator with radius 2" \ + -body { + set p [::simulation::random::prng_Ball 2] + set rnd [$p] + set result [llength $rnd] +} -result 3 + +test "Sphere-1.0" "sphere generator with radius 2.5" \ + -body { + set p [::simulation::random::prng_Sphere 2.5] + set rnd [$p] + set result [llength $rnd] +} -result 3 + +test "Rectangle-1.0" "rectangle generator with sides 10 and 0.1" \ + -body { + set p [::simulation::random::prng_Rectangle 10 0.1] + set rnd [$p] + set result [llength $rnd] +} -result 2 + +test "Block-1.0" "block generator with sides 10, 0.1 and 2.5" \ + -body { + set p [::simulation::random::prng_Block 10 0.1 2.5] + set rnd [$p] + set result [llength $rnd] +} -result 3 + +# End of test cases +testsuiteCleanup diff -Nru tcllib-1.13-dfsg/modules/simulation/simulation_random.man tcllib-1.14-dfsg/modules/simulation/simulation_random.man --- tcllib-1.13-dfsg/modules/simulation/simulation_random.man 2011-01-25 05:37:58.000000000 +0000 +++ tcllib-1.14-dfsg/modules/simulation/simulation_random.man 2011-12-13 18:13:23.000000000 +0000 @@ -201,7 +201,7 @@ [call [cmd ::simulation::random::prng_Block] [arg length] [arg width] [arg depth]] -Create a command (PRNG) that generates (x,y)-coordinates for points +Create a command (PRNG) that generates (x,y,z)-coordinates for points uniformly spread over a block [list_begin arguments] diff -Nru tcllib-1.13-dfsg/modules/smtpd/ChangeLog tcllib-1.14-dfsg/modules/smtpd/ChangeLog --- tcllib-1.13-dfsg/modules/smtpd/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/smtpd/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,15 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + +2011-04-11 Andreas Kupries + + * smtpd.man: [RFE 3247765]: Added option to configure the + * smtpd.tcl: smtpd greeting/banner. Bumped to version 1.5 + * pkgIndex.tcl + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/smtpd/pkgIndex.tcl tcllib-1.14-dfsg/modules/smtpd/pkgIndex.tcl --- tcllib-1.13-dfsg/modules/smtpd/pkgIndex.tcl 2011-01-25 05:37:59.000000000 +0000 +++ tcllib-1.14-dfsg/modules/smtpd/pkgIndex.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -9,4 +9,4 @@ # full path name of this file's directory. if {![package vsatisfies [package provide Tcl] 8.3]} {return} -package ifneeded smtpd 1.4.0 [list source [file join $dir smtpd.tcl]] +package ifneeded smtpd 1.5 [list source [file join $dir smtpd.tcl]] diff -Nru tcllib-1.13-dfsg/modules/smtpd/smtpd.man tcllib-1.14-dfsg/modules/smtpd/smtpd.man --- tcllib-1.13-dfsg/modules/smtpd/smtpd.man 2011-01-25 05:37:59.000000000 +0000 +++ tcllib-1.14-dfsg/modules/smtpd/smtpd.man 2011-12-13 18:13:23.000000000 +0000 @@ -1,11 +1,11 @@ [comment {-*- tcl -*- doctools manpage}] -[manpage_begin smtpd n 1.4] +[manpage_begin smtpd n 1.5] [copyright {Pat Thoyts }] [moddesc {Tcl SMTP Server Package}] [titledesc {Tcl SMTP server implementation}] [category Networking] [require Tcl 8.3] -[require smtpd [opt 1.4]] +[require smtpd [opt 1.5]] [description] [para] @@ -110,6 +110,12 @@ [list_begin definitions] +[def "[option -banner] [arg text]"] + +Text of a custom banner message. The default banner is "tcllib smtpd 1.5". +Note that changing the banner does not affect the bracketing text +in the full greeting, printing status 220, server-address, and timestamp. + [def "[option -validate_host] [arg proc]"] Callback to authenticate new connections based on the ip-address of diff -Nru tcllib-1.13-dfsg/modules/smtpd/smtpd.tcl tcllib-1.14-dfsg/modules/smtpd/smtpd.tcl --- tcllib-1.13-dfsg/modules/smtpd/smtpd.tcl 2011-01-25 05:37:59.000000000 +0000 +++ tcllib-1.14-dfsg/modules/smtpd/smtpd.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -18,8 +18,8 @@ # @mdgen EXCLUDE: clients/mail-test.tcl namespace eval ::smtpd { - variable rcsid {$Id: smtpd.tcl,v 1.20 2005/12/09 18:27:17 andreas_kupries Exp $} - variable version 1.4.0 + variable rcsid {$Id: smtpd.tcl,v 1.22 2011/11/17 08:00:45 andreas_kupries Exp $} + variable version 1.5 variable stopped namespace export start stop configure @@ -50,6 +50,7 @@ usetls 0 tlsopts {} } + set options(banner) "tcllib smtpd $version" } variable tlsopts {-cadir -cafile -certfile -cipher -command -keyfile -password -request -require -ssl2 -ssl3 -tls1} @@ -141,6 +142,7 @@ -validate_host {set options(validate_host) [Pop args 1]} -validate_sender {set options(validate_sender) [Pop args 1]} -validate_recipient {set options(validate_recipient) [Pop args 1]} + -banner {set options(banner) [Pop args 1]} -usetls { set usetls [Pop args 1] if {$usetls && ![catch {package require tls}]} { @@ -251,7 +253,7 @@ if {$accepted} { # Accept the connection Log notice "connect from $client_addr:$client_port on $channel" - Puts $channel "220 $options(serveraddr) tcllib smtpd $version; [timestamp]" + Puts $channel "220 $options(serveraddr) $options(banner); [timestamp]" } return diff -Nru tcllib-1.13-dfsg/modules/snit/ChangeLog tcllib-1.14-dfsg/modules/snit/ChangeLog --- tcllib-1.13-dfsg/modules/snit/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/snit/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/soundex/ChangeLog tcllib-1.14-dfsg/modules/soundex/ChangeLog --- tcllib-1.13-dfsg/modules/soundex/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/soundex/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/stooop/ChangeLog tcllib-1.14-dfsg/modules/stooop/ChangeLog --- tcllib-1.13-dfsg/modules/stooop/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/stooop/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/stringprep/ChangeLog tcllib-1.14-dfsg/modules/stringprep/ChangeLog --- tcllib-1.13-dfsg/modules/stringprep/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/stringprep/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/struct/ChangeLog tcllib-1.14-dfsg/modules/struct/ChangeLog --- tcllib-1.13-dfsg/modules/struct/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/struct/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,14 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + +2011-09-17 Michael Schlenker + + * list.tcl: [Bug 3308051]: Fixed noncommutative equal check + * list.test: + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/struct/list.tcl tcllib-1.14-dfsg/modules/struct/list.tcl --- tcllib-1.13-dfsg/modules/struct/list.tcl 2011-01-25 05:37:58.000000000 +0000 +++ tcllib-1.14-dfsg/modules/struct/list.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -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: list.tcl,v 1.26 2010/10/05 21:47:25 andreas_kupries Exp $ +# RCS: @(#) $Id: list.tcl,v 1.27 2011/09/17 14:35:36 mic42 Exp $ # #---------------------------------------------------------------------- @@ -942,7 +942,7 @@ # Author of this command is "Richard Suchenwirth" if {[::llength $a] != [::llength $b]} {return 0} - if {[::lindex $a 0] == $a} {return [string equal $a $b]} + if {[::lindex $a 0] == $a && [::lindex $b 0] == $b} {return [string equal $a $b]} foreach i $a j $b {if {![Lequal $i $j]} {return 0}} return 1 } @@ -1825,4 +1825,4 @@ namespace import -force list::list namespace export list } -package provide struct::list 1.8 +package provide struct::list 1.8.1 diff -Nru tcllib-1.13-dfsg/modules/struct/list.test tcllib-1.14-dfsg/modules/struct/list.test --- tcllib-1.13-dfsg/modules/struct/list.test 2011-01-25 05:37:58.000000000 +0000 +++ tcllib-1.14-dfsg/modules/struct/list.test 2011-12-13 18:13:23.000000000 +0000 @@ -6,7 +6,7 @@ # # Copyright (c) 2003 by Kevin B. Kenny. All rights reserved. # -# RCS: @(#) $Id: list.test,v 1.31 2010/10/05 21:47:25 andreas_kupries Exp $ +# RCS: @(#) $Id: list.test,v 1.32 2011/09/17 14:35:36 mic42 Exp $ # ------------------------------------------------------------------------- @@ -717,6 +717,32 @@ equal {{0 2 3} 1} {{0 2 3} 1} } 1 +test equal-4.5 {equal command} { + equal [list [list a]] {{a}} +} 1 + +test equal-4.6 {equal command} { + equal {{a}} [list [list a]] +} 1 + +test equal-4.7 {equal command} { + set a {{a}} + set b [list [list a]] + expr {[equal $a $b] == [equal $b $a]} +} 1 + +test equal-4.8 {equal command} { + set a {{a b}} + set b [list [list a b]] + expr {[equal $a $b] == [equal $b $a]} +} 1 + +test equal-4.9 {equal command} { + set a {{a} {b}} + set b [list [list a] [list b]] + expr {[equal $a $b] == [equal $b $a]} +} 1 + #---------------------------------------------------------------------- interp alias {} delete {} ::struct::list::list delete diff -Nru tcllib-1.13-dfsg/modules/struct/pkgIndex.tcl tcllib-1.14-dfsg/modules/struct/pkgIndex.tcl --- tcllib-1.13-dfsg/modules/struct/pkgIndex.tcl 2011-01-25 05:37:58.000000000 +0000 +++ tcllib-1.14-dfsg/modules/struct/pkgIndex.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -18,6 +18,6 @@ package ifneeded struct::matrix 1.2.1 [list source [file join $dir matrix1.tcl]] if {![package vsatisfies [package provide Tcl] 8.4]} {return} -package ifneeded struct::list 1.8 [list source [file join $dir list.tcl]] +package ifneeded struct::list 1.8.1 [list source [file join $dir list.tcl]] package ifneeded struct::graph 2.4 [list source [file join $dir graph.tcl]] package ifneeded struct::graph::op 0.11.3 [list source [file join $dir graphops.tcl]] diff -Nru tcllib-1.13-dfsg/modules/struct/queue_c.tcl tcllib-1.14-dfsg/modules/struct/queue_c.tcl --- tcllib-1.13-dfsg/modules/struct/queue_c.tcl 2011-01-25 05:37:58.000000000 +0000 +++ tcllib-1.14-dfsg/modules/struct/queue_c.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -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: queue_c.tcl,v 1.1 2008/07/02 23:35:07 andreas_kupries Exp $ +# RCS: @(#) $Id: queue_c.tcl,v 1.2 2011/04/21 17:51:55 andreas_kupries Exp $ package require critcl # @sak notprovided struct_queuec @@ -19,11 +19,6 @@ namespace eval ::struct { # Supporting code for the main command. - catch { - critcl::cheaders -g - critcl::debug memory symbols - } - critcl::cheaders queue/*.h critcl::csources queue/*.c diff -Nru tcllib-1.13-dfsg/modules/tar/ChangeLog tcllib-1.14-dfsg/modules/tar/ChangeLog --- tcllib-1.13-dfsg/modules/tar/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/tar/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/tepam/adbox_all.test tcllib-1.14-dfsg/modules/tepam/adbox_all.test --- tcllib-1.13-dfsg/modules/tepam/adbox_all.test 2011-01-25 05:37:59.000000000 +0000 +++ tcllib-1.14-dfsg/modules/tepam/adbox_all.test 2011-12-13 18:13:23.000000000 +0000 @@ -1,3 +1,4 @@ +# -*- tcl -*- ########################################################################## # TEPAM - Tcl's Enhanced Procedure and Argument Manager ########################################################################## @@ -9,7 +10,7 @@ # # Copyright (C) 2009, 2010 Andreas Drollinger # -# RCS: @(#) $Id: adbox_all.test,v 1.1 2010/02/11 21:50:55 droll Exp $ +# RCS: @(#) $Id: adbox_all.test,v 1.2 2011/11/09 05:43:30 andreas_kupries Exp $ ########################################################################## # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. @@ -21,13 +22,13 @@ testsNeedTcl 8.3 testsNeedTcltest 1.0 +testsNeed Tk 8.3 catch {namespace delete ::tepam} testing { useLocal tepam.tcl tepam } -package require Tk tepam::GuiEnvironmentInit ######## Check all major functionalities of the argument dialogbox in conjunction with all widgets ######## @@ -135,9 +136,15 @@ ########################################################################## # $RCSfile: adbox_all.test,v $ - ($Name: $) -# $Id: adbox_all.test,v 1.1 2010/02/11 21:50:55 droll Exp $ +# $Id: adbox_all.test,v 1.2 2011/11/09 05:43:30 andreas_kupries Exp $ # Modifications: # $Log: adbox_all.test,v $ +# Revision 1.2 2011/11/09 05:43:30 andreas_kupries +# +# * adbox_all.test: [Bug 3422990]: Fixed these test files to +# * adbox_widgets.test: properly register their need for Tk +# * proc_interactive.test: and not execute without it. +# # Revision 1.1 2010/02/11 21:50:55 droll # TEPAM module checkin # diff -Nru tcllib-1.13-dfsg/modules/tepam/adbox_widgets.test tcllib-1.14-dfsg/modules/tepam/adbox_widgets.test --- tcllib-1.13-dfsg/modules/tepam/adbox_widgets.test 2011-01-25 05:37:59.000000000 +0000 +++ tcllib-1.14-dfsg/modules/tepam/adbox_widgets.test 2011-12-13 18:13:23.000000000 +0000 @@ -1,3 +1,4 @@ +# -*- tcl -*- ########################################################################## # TEPAM - Tcl's Enhanced Procedure and Argument Manager ########################################################################## @@ -8,7 +9,7 @@ # # Copyright (C) 2009, 2010 Andreas Drollinger # -# RCS: @(#) $Id: adbox_widgets.test,v 1.1 2010/02/11 21:50:55 droll Exp $ +# RCS: @(#) $Id: adbox_widgets.test,v 1.2 2011/11/09 05:43:30 andreas_kupries Exp $ ########################################################################## # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. @@ -20,13 +21,13 @@ testsNeedTcl 8.3 testsNeedTcltest 1.0 +testsNeed Tk 8.3 catch {namespace delete ::tepam} testing { useLocal tepam.tcl tepam } -package require Tk tepam::GuiEnvironmentInit ######## Entry ######## @@ -407,9 +408,15 @@ ########################################################################## # $RCSfile: adbox_widgets.test,v $ - ($Name: $) -# $Id: adbox_widgets.test,v 1.1 2010/02/11 21:50:55 droll Exp $ +# $Id: adbox_widgets.test,v 1.2 2011/11/09 05:43:30 andreas_kupries Exp $ # Modifications: # $Log: adbox_widgets.test,v $ +# Revision 1.2 2011/11/09 05:43:30 andreas_kupries +# +# * adbox_all.test: [Bug 3422990]: Fixed these test files to +# * adbox_widgets.test: properly register their need for Tk +# * proc_interactive.test: and not execute without it. +# # Revision 1.1 2010/02/11 21:50:55 droll # TEPAM module checkin # diff -Nru tcllib-1.13-dfsg/modules/tepam/ChangeLog tcllib-1.14-dfsg/modules/tepam/ChangeLog --- tcllib-1.13-dfsg/modules/tepam/ChangeLog 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/tepam/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -0,0 +1,14 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + +2011-11-08 Andreas Kupries + + * examples/tepam/tepam_demo.tcl [Bug 3425269]: Applied bug fixes + for the demo script supplied by Stuart Cassoff. + + * adbox_all.test: [Bug 3422990]: Fixed these test files to + * adbox_widgets.test: properly register their need for Tk + * proc_interactive.test: and not execute without it. diff -Nru tcllib-1.13-dfsg/modules/tepam/proc_interactive.test tcllib-1.14-dfsg/modules/tepam/proc_interactive.test --- tcllib-1.13-dfsg/modules/tepam/proc_interactive.test 2011-01-25 05:37:59.000000000 +0000 +++ tcllib-1.14-dfsg/modules/tepam/proc_interactive.test 2011-12-13 18:13:23.000000000 +0000 @@ -1,3 +1,4 @@ +# -*- tcl -*- ########################################################################## # TEPAM - Tcl's Enhanced Procedure and Argument Manager ########################################################################## @@ -9,7 +10,7 @@ # # Copyright (C) 2009, 2010 Andreas Drollinger # -# RCS: @(#) $Id: proc_interactive.test,v 1.1 2010/02/11 21:50:55 droll Exp $ +# RCS: @(#) $Id: proc_interactive.test,v 1.2 2011/11/09 05:43:30 andreas_kupries Exp $ ########################################################################## # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. @@ -21,6 +22,7 @@ testsNeedTcl 8.3 testsNeedTcltest 1.0 +testsNeed Tk 8.3 catch {namespace delete ::tepam} testing { @@ -28,7 +30,6 @@ } namespace import tepam::* -package require Tk ######## Check the default values ######## @@ -387,9 +388,15 @@ ########################################################################## # $RCSfile: proc_interactive.test,v $ - ($Name: $) -# $Id: proc_interactive.test,v 1.1 2010/02/11 21:50:55 droll Exp $ +# $Id: proc_interactive.test,v 1.2 2011/11/09 05:43:30 andreas_kupries Exp $ # Modifications: # $Log: proc_interactive.test,v $ +# Revision 1.2 2011/11/09 05:43:30 andreas_kupries +# +# * adbox_all.test: [Bug 3422990]: Fixed these test files to +# * adbox_widgets.test: properly register their need for Tk +# * proc_interactive.test: and not execute without it. +# # Revision 1.1 2010/02/11 21:50:55 droll # TEPAM module checkin # diff -Nru tcllib-1.13-dfsg/modules/term/ansi/ctrlunix.tcl tcllib-1.14-dfsg/modules/term/ansi/ctrlunix.tcl --- tcllib-1.13-dfsg/modules/term/ansi/ctrlunix.tcl 2011-01-25 05:37:59.000000000 +0000 +++ tcllib-1.14-dfsg/modules/term/ansi/ctrlunix.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -59,6 +59,11 @@ variable tput [auto_execok tput] variable stty [auto_execok stty] + if {($stty eq "/usr/ucb/stty") && + ($::tcl_platform(os) eq "SunOS")} { + set stty /usr/bin/stty + } + if {($tput eq "") || ($stty eq "")} { return -code error \ "The external requirements for the \ @@ -80,7 +85,7 @@ # ### ### ### ######### ######### ######### ## Ready -package provide term::ansi::ctrl::unix 0.1 +package provide term::ansi::ctrl::unix 0.1.1 ## # ### ### ### ######### ######### ######### diff -Nru tcllib-1.13-dfsg/modules/term/ansi_ctrlu.man tcllib-1.14-dfsg/modules/term/ansi_ctrlu.man --- tcllib-1.13-dfsg/modules/term/ansi_ctrlu.man 2011-01-25 05:37:59.000000000 +0000 +++ tcllib-1.14-dfsg/modules/term/ansi_ctrlu.man 2011-12-13 18:13:23.000000000 +0000 @@ -1,11 +1,11 @@ [comment {-*- tcl -*- doctools manpage}] -[manpage_begin term::ansi::ctrl::unix n 0.1] -[copyright {2006 Andreas Kupries }] +[manpage_begin term::ansi::ctrl::unix n 0.1.1] +[copyright {2006-2011 Andreas Kupries }] [moddesc {Terminal control}] [titledesc {Control operations and queries}] [category {Terminal control}] [require Tcl 8.4] -[require term::ansi::ctrl::unix [opt 0.1]] +[require term::ansi::ctrl::unix [opt 0.1.1]] [description] [emph {WARNING}]: This package is unix-specific and depends on the diff -Nru tcllib-1.13-dfsg/modules/term/ChangeLog tcllib-1.14-dfsg/modules/term/ChangeLog --- tcllib-1.13-dfsg/modules/term/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/term/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,15 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + +2011-05-20 Andreas Kupries + + * ansi/ctrlunix.tcl (::term::ansi::ctrl::unix::INIT): Modified to + explictly avoid Solaris' /usr/ucb/stty. Its command line syntax + does not fit our expecations. Bumped version to 0.1.1 + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/term/pkgIndex.tcl tcllib-1.14-dfsg/modules/term/pkgIndex.tcl --- tcllib-1.13-dfsg/modules/term/pkgIndex.tcl 2011-01-25 05:37:59.000000000 +0000 +++ tcllib-1.14-dfsg/modules/term/pkgIndex.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -4,7 +4,7 @@ package ifneeded term::ansi::code::attr 0.1 [list source [file join $dir ansi/code/attr.tcl]] package ifneeded term::ansi::code::ctrl 0.1.1 [list source [file join $dir ansi/code/ctrl.tcl]] package ifneeded term::ansi::code::macros 0.1 [list source [file join $dir ansi/code/macros.tcl]] -package ifneeded term::ansi::ctrl::unix 0.1 [list source [file join $dir ansi/ctrlunix.tcl]] +package ifneeded term::ansi::ctrl::unix 0.1.1 [list source [file join $dir ansi/ctrlunix.tcl]] package ifneeded term::ansi::send 0.1 [list source [file join $dir ansi/send.tcl]] package ifneeded term::interact::menu 0.1 [list source [file join $dir imenu.tcl]] package ifneeded term::interact::pager 0.1 [list source [file join $dir ipager.tcl]] diff -Nru tcllib-1.13-dfsg/modules/textutil/adjust.man tcllib-1.14-dfsg/modules/textutil/adjust.man --- tcllib-1.13-dfsg/modules/textutil/adjust.man 2011-01-25 05:37:59.000000000 +0000 +++ tcllib-1.14-dfsg/modules/textutil/adjust.man 2011-12-13 18:13:23.000000000 +0000 @@ -1,9 +1,9 @@ -[manpage_begin textutil::adjust n 0.7] +[manpage_begin textutil::adjust n 0.7.1] [moddesc {Text and string utilities, macro processing}] [titledesc {Procedures to adjust, indent, and undent paragraphs}] [category {Text processing}] [require Tcl 8.2] -[require textutil::adjust [opt 0.7]] +[require textutil::adjust [opt 0.7.1]] [description] The package [package textutil::adjust] provides commands that manipulate diff -Nru tcllib-1.13-dfsg/modules/textutil/adjust.tcl tcllib-1.14-dfsg/modules/textutil/adjust.tcl --- tcllib-1.13-dfsg/modules/textutil/adjust.tcl 2011-01-25 05:37:59.000000000 +0000 +++ tcllib-1.14-dfsg/modules/textutil/adjust.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: adjust.tcl,v 1.15 2006/04/21 04:42:27 andreas_kupries Exp $ +# RCS: @(#) $Id: adjust.tcl,v 1.16 2011/12/13 18:12:56 andreas_kupries Exp $ # ### ### ### ######### ######### ######### ## Requirements @@ -719,7 +719,7 @@ if {[string length $lcp] == 0} {return $text} - regexp {^([ ]*)} $lcp -> lcp + regexp "^(\[\t \]*)" $lcp -> lcp if {[string length $lcp] == 0} {return $text} @@ -755,4 +755,4 @@ # ### ### ### ######### ######### ######### ## Ready -package provide textutil::adjust 0.7 +package provide textutil::adjust 0.7.1 diff -Nru tcllib-1.13-dfsg/modules/textutil/ChangeLog tcllib-1.14-dfsg/modules/textutil/ChangeLog --- tcllib-1.13-dfsg/modules/textutil/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/textutil/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,15 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + +2011-12-13 Andreas Kupries + + * adjust.tcl (::textutil::adjust::undent): Fixed whitespace regexp + * adjust.man: which lost the tab character. Rewritten to make it + * pkgIndex.tcl: less likely to happen again. Bumped to 0.7.1. + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/textutil/pkgIndex.tcl tcllib-1.14-dfsg/modules/textutil/pkgIndex.tcl --- tcllib-1.13-dfsg/modules/textutil/pkgIndex.tcl 2011-01-25 05:37:59.000000000 +0000 +++ tcllib-1.14-dfsg/modules/textutil/pkgIndex.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -3,7 +3,7 @@ return } package ifneeded textutil 0.7.1 [list source [file join $dir textutil.tcl]] -package ifneeded textutil::adjust 0.7 [list source [file join $dir adjust.tcl]] +package ifneeded textutil::adjust 0.7.1 [list source [file join $dir adjust.tcl]] package ifneeded textutil::split 0.7 [list source [file join $dir split.tcl]] package ifneeded textutil::trim 0.7 [list source [file join $dir trim.tcl]] package ifneeded textutil::tabify 0.7 [list source [file join $dir tabify.tcl]] diff -Nru tcllib-1.13-dfsg/modules/tie/ChangeLog tcllib-1.14-dfsg/modules/tie/ChangeLog --- tcllib-1.13-dfsg/modules/tie/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/tie/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/tiff/ChangeLog tcllib-1.14-dfsg/modules/tiff/ChangeLog --- tcllib-1.13-dfsg/modules/tiff/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/tiff/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/transfer/ChangeLog tcllib-1.14-dfsg/modules/transfer/ChangeLog --- tcllib-1.13-dfsg/modules/transfer/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/transfer/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/treeql/ChangeLog tcllib-1.14-dfsg/modules/treeql/ChangeLog --- tcllib-1.13-dfsg/modules/treeql/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/treeql/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/try/ChangeLog tcllib-1.14-dfsg/modules/try/ChangeLog --- tcllib-1.13-dfsg/modules/try/ChangeLog 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/try/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -0,0 +1,10 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + +2011-05-31 Andreas Kupries + + * New module and package: try. Tcl 8.5+ forward compatibility + implementation of try/catch/finally (TIP 329). diff -Nru tcllib-1.13-dfsg/modules/try/pkgIndex.tcl tcllib-1.14-dfsg/modules/try/pkgIndex.tcl --- tcllib-1.13-dfsg/modules/try/pkgIndex.tcl 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/try/pkgIndex.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -0,0 +1,9 @@ +#checker -scope global exclude warnUndefinedVar +# var in question is 'dir'. +if {![package vsatisfies [package provide Tcl] 8.5]} { + # PRAGMA: returnok + return +} +# The package below is a backward compatible implementation of +# try/catch/finally, for use by Tcl 8.5 only. On 8.6 it does nothing. +package ifneeded try 1 [list source [file join $dir try.tcl]] diff -Nru tcllib-1.13-dfsg/modules/try/try.man tcllib-1.14-dfsg/modules/try/try.man --- tcllib-1.13-dfsg/modules/try/try.man 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/try/try.man 2011-12-13 18:13:23.000000000 +0000 @@ -0,0 +1,126 @@ +[comment {-*- tcl -*- doctools manpage}] +[manpage_begin try n 1] +[copyright {2008 Donal K. Fellows, BSD licensed}] +[moddesc {Forward compatibility implementation of [try]}] +[titledesc {try - Trap and process errors and exceptions}] +[category Utility] +[require Tcl 8.5] +[require try [opt 1]] +[keywords cleanup error exception final {resource management}] +[see_also catch(n) error(n) return(n) throw(n)] +[description] +[para] + +This package provides a forward-compatibility implementation of Tcl +8.6's try/finally command (TIP 329), for Tcl 8.5. The code was +directly pulled from Tcl 8.6 revision ?, when try/finally was +implemented as Tcl procedure instead of in C. + + +[list_begin definitions] +[comment {- - -- --- ----- -------- ------------- ---------------------}] +[call [cmd ::try] [arg body] [opt [arg handler...]] [opt "[method finally] [arg script]"]] + +This command executes the script [arg body] and, depending on what the +outcome of that script is (normal exit, error, or some other +exceptional result), runs a handler script to deal with the case. Once +that has all happened, if the [method finally] clause is present, the +[arg script] it includes will be run and the result of the handler (or +the [arg body] if no handler matched) is allowed to continue to +propagate. Note that the [method finally] clause is processed even if +an error occurs and irrespective of which, if any, [arg handler] is +used. + +[para] The [arg handler] clauses are each expressed as several words, +and must have one of the following forms: + +[list_begin definitions] +[def "[method on] [arg {code variableList script}]"] + +This clause matches if the evaluation of [arg body] completed with the +exception code [arg code]. The [arg code] may be expressed as an +integer or one of the following literal words: + +[const ok], [const error], [const return], [const break], or +[const continue]. Those literals correspond to the integers 0 through +4 respectively. + +[def "[method trap] [arg {pattern variableList script}]"] + +This clause matches if the evaluation of [arg body] resulted in an +error and the prefix of the [option -errorcode] from the interpreter's +status dictionary is equal to the [arg pattern]. The number of prefix +words taken from the [option -errorcode] is equal to the list-length +of [arg pattern], and inter-word spaces are normalized in both the +[option -errorcode] and [arg pattern] before comparison. + +[para] The [arg variableList] word in each [arg handler] is always +interpreted as a list of variable names. If the first word of the list +is present and non-empty, it names a variable into which the result of +the evaluation of [arg body] (from the main [cmd try]) will be placed; +this will contain the human-readable form of any errors. If the second +word of the list is present and non-empty, it names a variable into +which the options dictionary of the interpreter at the moment of +completion of execution of [arg body] will be placed. + +[para] The [arg script] word of each [arg handler] is also always +interpreted the same: as a Tcl script to evaluate if the clause is +matched. If [arg script] is a literal [const -] and the [arg handler] +is not the last one, the [arg script] of the following [arg handler] +is invoked instead (just like with the [cmd switch] command). + +[para] Note that [arg handler] clauses are matched against in order, +and that the first matching one is always selected. + +At most one [arg handler] clause will selected. + +As a consequence, an [method {on error}] will mask any subsequent +[method trap] in the [cmd try]. Also note that [method {on error}] is +equivalent to [method {trap {}}]. + +[para] If an exception (i.e. any non-[const ok] result) occurs during +the evaluation of either the [arg handler] or the [method finally] +clause, the original exception's status dictionary will be added to +the new exception's status dictionary under the [option -during] key. + +[list_end] +[list_end] + +[section EXAMPLES] + +Ensure that a file is closed no matter what: + +[para][example_begin] +set f [lb]open /some/file/name a[rb] +[cmd try] { + puts \$f "some message" + # ... +} [cmd finally] { + close \$f +} +[example_end] + + +[para] Handle different reasons for a file to not be openable for reading: +[para][example_begin] +[cmd try] { + set f [lb]open /some/file/name[rb] +} [method trap] {POSIX EISDIR} {} { + puts "failed to open /some/file/name: it's a directory" +} [method trap] {POSIX ENOENT} {} { + puts "failed to open /some/file/name: it doesn't exist" +} +[example_end] + +[section {BUGS, IDEAS, FEEDBACK}] + +This document, and the package it describes, will undoubtedly contain +bugs and other problems. + +Please report such in the category [emph try] of the +[uri {http://sourceforge.net/tracker/?group_id=12883} {Tcllib SF Trackers}]. + +Please also report any ideas for enhancements you may have for either +package and/or documentation. + +[manpage_end] diff -Nru tcllib-1.13-dfsg/modules/try/try.tcl tcllib-1.14-dfsg/modules/try/try.tcl --- tcllib-1.13-dfsg/modules/try/try.tcl 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/try/try.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -0,0 +1,205 @@ +# # ## ### ##### ######## ############# #################### +## -*- tcl -*- +## (C) 2008-2011 Donal K. Fellows, Andreas Kupries, BSD licensed. + +# The code here is a forward-compatibility implementation of Tcl 8.6's +# try/finally command (TIP 329), for Tcl 8.5. It was directly pulled +# from Tcl 8.6 revision ?, when try/finally was implemented as Tcl +# procedure instead of in C. + +# It makes use of the following Tcl 8.5 features: +# lassign, dict, {*}. + +# # ## ### ##### ######## ############# #################### + +package provide try 1 +package require Tcl 8.5 +# Do nothing if the "try" command exists already (8.6 and higher). +if {[llength [info commands try]]} return + +# # ## ### ##### ######## ############# #################### + +namespace eval ::tcl::control { + # These are not local, since this allows us to [uplevel] a [catch] rather + # than [catch] the [uplevel]ing of something, resulting in a cleaner + # -errorinfo: + variable em {} + variable opts {} + + variable magicCodes { ok 0 error 1 return 2 break 3 continue 4 } + + namespace export try + + # ::tcl::control::try -- + # + # Advanced error handling construct. + # + # Arguments: + # See try(n) for details + proc try {args} { + variable magicCodes + + # ----- Parse arguments ----- + + set trybody [lindex $args 0] + set finallybody {} + set handlers [list] + set i 1 + + while {$i < [llength $args]} { + switch -- [lindex $args $i] { + "on" { + incr i + set code [lindex $args $i] + if {[dict exists $magicCodes $code]} { + set code [dict get $magicCodes $code] + } elseif {![string is integer -strict $code]} { + set msgPart [join [dict keys $magicCodes] {", "}] + error "bad code '[lindex $args $i]': must be\ + integer or \"$msgPart\"" + } + lappend handlers [lrange $args $i $i] \ + [format %d $code] {} {*}[lrange $args $i+1 $i+2] + incr i 3 + } + "trap" { + incr i + if {![string is list [lindex $args $i]]} { + error "bad prefix '[lindex $args $i]':\ + must be a list" + } + lappend handlers [lrange $args $i $i] 1 \ + {*}[lrange $args $i $i+2] + incr i 3 + } + "finally" { + incr i + set finallybody [lindex $args $i] + incr i + break + } + default { + error "bad handler '[lindex $args $i]': must be\ + \"on code varlist body\", or\ + \"trap prefix varlist body\"" + } + } + } + + if {($i != [llength $args]) || ([lindex $handlers end] eq "-")} { + error "wrong # args: should be\ + \"try body ?handler ...? ?finally body?\"" + } + + # ----- Execute 'try' body ----- + + variable em + variable opts + set EMVAR [namespace which -variable em] + set OPTVAR [namespace which -variable opts] + set code [uplevel 1 [list ::catch $trybody $EMVAR $OPTVAR]] + + if {$code == 1} { + set line [dict get $opts -errorline] + dict append opts -errorinfo \ + "\n (\"[lindex [info level 0] 0]\" body line $line)" + } + + # Keep track of the original error message & options + set _em $em + set _opts $opts + + # ----- Find and execute handler ----- + + set errorcode {} + if {[dict exists $opts -errorcode]} { + set errorcode [dict get $opts -errorcode] + } + set found false + foreach {descrip oncode pattern varlist body} $handlers { + if {!$found} { + if { + ($code != $oncode) || ([lrange $pattern 0 end] ne + [lrange $errorcode 0 [llength $pattern]-1] ) + } then { + continue + } + } + set found true + if {$body eq "-"} { + continue + } + + # Handler found ... + + # Assign trybody results into variables + lassign $varlist resultsVarName optionsVarName + if {[llength $varlist] >= 1} { + upvar 1 $resultsVarName resultsvar + set resultsvar $em + } + if {[llength $varlist] >= 2} { + upvar 1 $optionsVarName optsvar + set optsvar $opts + } + + # Execute the handler + set code [uplevel 1 [list ::catch $body $EMVAR $OPTVAR]] + + if {$code == 1} { + set line [dict get $opts -errorline] + dict append opts -errorinfo \ + "\n (\"[lindex [info level 0] 0] ... $descrip\"\ + body line $line)" + # On error chain to original outcome + dict set opts -during $_opts + } + + # Handler result replaces the original result (whether success or + # failure); capture context of original exception for reference. + set _em $em + set _opts $opts + + # Handler has been executed - stop looking for more + break + } + + # No catch handler found -- error falls through to caller + # OR catch handler executed -- result falls through to caller + + # ----- If we have a finally block then execute it ----- + + if {$finallybody ne {}} { + set code [uplevel 1 [list ::catch $finallybody $EMVAR $OPTVAR]] + + # Finally result takes precedence except on success + + if {$code == 1} { + set line [dict get $opts -errorline] + dict append opts -errorinfo \ + "\n (\"[lindex [info level 0] 0] ... finally\"\ + body line $line)" + # On error chain to original outcome + dict set opts -during $_opts + } + if {$code != 0} { + set _em $em + set _opts $opts + } + + # Otherwise our result is not affected + } + + # Propagate the error or the result of the executed catch body to the + # caller. + dict incr _opts -level + return -options $_opts $_em + } +} + +# # ## ### ##### ######## ############# #################### + +namespace import ::tcl::control::try + +# # ## ### ##### ######## ############# #################### +## Ready diff -Nru tcllib-1.13-dfsg/modules/uev/ChangeLog tcllib-1.14-dfsg/modules/uev/ChangeLog --- tcllib-1.13-dfsg/modules/uev/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/uev/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/units/ChangeLog tcllib-1.14-dfsg/modules/units/ChangeLog --- tcllib-1.13-dfsg/modules/units/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/units/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/uri/ChangeLog tcllib-1.14-dfsg/modules/uri/ChangeLog --- tcllib-1.13-dfsg/modules/uri/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/uri/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,16 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + +2011-03-22 Andreas Kupries + + * pkgIndex.tcl: [Bug #3235340]: Provide empty string as default + * uri.man: value for the fragment in an http url. Ensure that + * uri.tcl: a fragment after a query is properly split off, and + * uri.test: joined. Extended testsuite. Bumped to version 1.2.2. + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/uri/pkgIndex.tcl tcllib-1.14-dfsg/modules/uri/pkgIndex.tcl --- tcllib-1.13-dfsg/modules/uri/pkgIndex.tcl 2011-01-25 05:37:59.000000000 +0000 +++ tcllib-1.14-dfsg/modules/uri/pkgIndex.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -2,5 +2,5 @@ # FRINK: nocheck return } -package ifneeded uri 1.2.1 [list source [file join $dir uri.tcl]] +package ifneeded uri 1.2.2 [list source [file join $dir uri.tcl]] package ifneeded uri::urn 1.0.2 [list source [file join $dir urn-scheme.tcl]] diff -Nru tcllib-1.13-dfsg/modules/uri/uri.man tcllib-1.14-dfsg/modules/uri/uri.man --- tcllib-1.13-dfsg/modules/uri/uri.man 2011-01-25 05:37:59.000000000 +0000 +++ tcllib-1.14-dfsg/modules/uri/uri.man 2011-12-13 18:13:22.000000000 +0000 @@ -1,9 +1,9 @@ -[manpage_begin uri n 1.2.1] +[manpage_begin uri n 1.2.2] [moddesc {Tcl Uniform Resource Identifier Management}] [titledesc {URI utilities}] [category Networking] [require Tcl 8.2] -[require uri [opt 1.2.1]] +[require uri [opt 1.2.2]] [description] This package contains two parts. First it provides regular expressions diff -Nru tcllib-1.13-dfsg/modules/uri/uri.tcl tcllib-1.14-dfsg/modules/uri/uri.tcl --- tcllib-1.13-dfsg/modules/uri/uri.tcl 2011-01-25 05:37:59.000000000 +0000 +++ tcllib-1.14-dfsg/modules/uri/uri.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -11,7 +11,7 @@ # TODO: # Handle www-url-encoding details # -# CVS: $Id: uri.tcl,v 1.35 2007/01/11 19:35:23 andreas_kupries Exp $ +# CVS: $Id: uri.tcl,v 1.36 2011/03/23 04:39:54 andreas_kupries Exp $ package require Tcl 8.2 @@ -288,11 +288,26 @@ upvar #0 [namespace current]::http::search search upvar #0 [namespace current]::http::segment segment - array set parts {host {} port {} path {} query {}} + array set parts {host {} port {} path {} query {} fragment {}} set searchPattern "\\?(${search})\$" set fragmentPattern "#(${segment})\$" + # slash off possible fragment. + + # NOTE: This must be done before the query, because a fragment can + # follow a query, and slashing off the query first will take the + # fragment with it. Bug #3235340. + + if {[regexp -indices -- $fragmentPattern $url match fragment]} { + set from [lindex $fragment 0] + set to [lindex $fragment 1] + + set parts(fragment) [string range $url $from $to] + + set url [string replace $url [lindex $match 0] end] + } + # slash off possible query. the 'search' regexp, while official, # is not good enough. We have apparently lots of urls in the wild # which contain unquoted urls with queries in a query. The RE @@ -306,17 +321,6 @@ set url [string replace $url $pos end] } - # slash off possible fragment - - if {[regexp -indices -- $fragmentPattern $url match fragment]} { - set from [lindex $fragment 0] - set to [lindex $fragment 1] - - set parts(fragment) [string range $url $from $to] - - set url [string replace $url [lindex $match 0] end] - } - if {[string match "//*" $url]} { set url [string range $url 2 end] @@ -337,7 +341,7 @@ } proc ::uri::JoinHttpInner {scheme defport args} { - array set components {host {} path {} query {}} + array set components {host {} path {} query {} fragment {}} set components(port) $defport array set components $args @@ -353,13 +357,13 @@ regsub -- {^/} $components(path) {} components(path) - if { [info exists components(fragment)] && $components(fragment) != "" } { + if { $components(fragment) != "" } { set components(fragment) "#$components(fragment)" } else { set components(fragment) "" } - return $scheme://$components(host)$port/$components(path)$components(fragment)$query + return $scheme://$components(host)$port/$components(path)$query$components(fragment) } proc ::uri::SplitFile {url} { @@ -1031,4 +1035,4 @@ variable url "ldap:$schemepart" } -package provide uri 1.2.1 +package provide uri 1.2.2 diff -Nru tcllib-1.13-dfsg/modules/uri/uri.test tcllib-1.14-dfsg/modules/uri/uri.test --- tcllib-1.13-dfsg/modules/uri/uri.test 2011-01-25 05:37:59.000000000 +0000 +++ tcllib-1.14-dfsg/modules/uri/uri.test 2011-12-13 18:13:23.000000000 +0000 @@ -6,7 +6,7 @@ # # Copyright (c) 2000 by Zveno Pty Ltd. # -# RCS: @(#) $Id: uri.test,v 1.24 2007/01/11 19:35:23 andreas_kupries Exp $ +# RCS: @(#) $Id: uri.test,v 1.25 2011/03/23 04:39:54 andreas_kupries Exp $ # ------------------------------------------------------------------------- @@ -26,23 +26,23 @@ test uri-1.0 {uri::split - http w/- nested query} { dictsort [uri::split http://test.net/path/path2?query=url?otherquery] -} {host test.net path path/path2 port {} pwd {} query query=url?otherquery scheme http user {}} +} {fragment {} host test.net path path/path2 port {} pwd {} query query=url?otherquery scheme http user {}} test uri-1.1 {uri::split - http w/- query} { dictsort [uri::split http://test.net/path/path2?query] -} {host test.net path path/path2 port {} pwd {} query query scheme http user {}} +} {fragment {} host test.net path path/path2 port {} pwd {} query query scheme http user {}} test uri-1.2 {uri::split - https w/- query} { dictsort [uri::split https://test.net/path/path2?query] -} {host test.net path path/path2 port {} pwd {} query query scheme https user {}} +} {fragment {} host test.net path path/path2 port {} pwd {} query query scheme https user {}} test uri-1.3 {uri::split - http w/- port} { dictsort [uri::split http://test.net:8080] -} {host test.net path {} port 8080 pwd {} query {} scheme http user {}} +} {fragment {} host test.net path {} port 8080 pwd {} query {} scheme http user {}} test uri-1.4 {uri::split - https w/- port} { dictsort [uri::split https://test.net:8888] -} {host test.net path {} port 8888 pwd {} query {} scheme https user {}} +} {fragment {} host test.net path {} port 8888 pwd {} query {} scheme https user {}} test uri-1.5 {uri::split - ftp} { dictsort [uri::split ftp://ftp.test.net/path/to/resource] @@ -460,7 +460,17 @@ test uri-9.0 {uri::split bug #936064, user information} { dictsort [uri::split http://foo:bar@baz.com:80/bla/] -} {host baz.com path bla/ port 80 pwd bar query {} scheme http user foo} +} {fragment {} host baz.com path bla/ port 80 pwd bar query {} scheme http user foo} + +# ------------------------------------------------------------------------- + +test uri-10.0 {uri::split bug #3235340, fragments after queries} { + dictsort [uri::split http://baz.com/foo?bar=baz#quux] +} {fragment quux host baz.com path foo port {} pwd {} query bar=baz scheme http user {}} + +test uri-10.1 {uri::join bug #3235340, fragments after queries} { + uri::join fragment quux host baz.com path foo port {} pwd {} query bar=baz scheme http user {} +} {http://baz.com/foo?bar=baz#quux} # ------------------------------------------------------------------------- diff -Nru tcllib-1.13-dfsg/modules/uuid/ChangeLog tcllib-1.14-dfsg/modules/uuid/ChangeLog --- tcllib-1.13-dfsg/modules/uuid/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/uuid/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/valtype/cc_amex.man tcllib-1.14-dfsg/modules/valtype/cc_amex.man --- tcllib-1.13-dfsg/modules/valtype/cc_amex.man 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/cc_amex.man 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,13 @@ +[vset PACKAGE creditcard::amex] +[vset VERSION 1] +[vset A an] +[vset NAME {AMEX creditcard number}] +[vset NAMEX {American Expresss creditcard number}] +[vset CODE {CREDITCARD AMEX}] +[vset OK ....] +[vset BAD ....] +[vset KEYWORDS k_amex] +[vset REQUIRE r_luhn] +[vset METHODS null] +[vset CODES c_lenpfx] +[include include/vtype.inc] diff -Nru tcllib-1.13-dfsg/modules/valtype/cc_amex.tcl tcllib-1.14-dfsg/modules/valtype/cc_amex.tcl --- tcllib-1.13-dfsg/modules/valtype/cc_amex.tcl 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/cc_amex.tcl 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,68 @@ +# # ## ### ##### ######## ############# ###################### +## Verify AMEX credit card number +# +## Reference +## http://wiki.cdyne.com/wiki/index.php?title=Credit_Card_Verification + +# # ## ### ##### ######## ############# ###################### + +# The code below implements the interface of a snit validation type, +# making it directly usable with snit's -type option in option +# specifications. + +# # ## ### ##### ######## ############# ###################### +## Requisites + +package require Tcl 8.5 +package require snit +package require valtype::luhn +package require valtype::common + +# # ## ### ##### ######## ############# ###################### +## Implementation + +namespace eval ::valtype::creditcard::amex { + namespace import ::valtype::common::* +} + +snit::type ::valtype::creditcard::amex { + #------------------------------------------------------------------- + # Type Methods + + typemethod validate {value} { + if {[string length $value] != 15} { + badlength {CREDITCARD AMEX} 15 "CREDITCARD AMEX number" + } elseif {[string range $value 0 1] ni {34 37}} { + badprefix {CREDITCARD AMEX} {34 37} "CREDITCARD AMEX number" + } + + return [valtype::luhn validate $value {CREDITCARD AMEX}] + } + + typemethod checkdigit {value} { + if {[string length $value] != 14} { + badlength {CREDITCARD AMEX} 14 "CREDITCARD AMEX number without checkdigit" + } elseif {[string range $value 0 1] ni {34 37}} { + badprefix {CREDITCARD AMEX} {34 37} "CREDITCARD AMEX number without checkdigit" + } + + return [valtype::luhn checkdigit $value {CREDITCARD AMEX}] + } + + #------------------------------------------------------------------- + # Constructor + + # None needed; no options + + #------------------------------------------------------------------- + # Public Methods + + method validate {value} { + $type validate $value + } +} + +# # ## ### ##### ######## ############# ###################### +## Ready + +package provide valtype::creditcard::amex 1 diff -Nru tcllib-1.13-dfsg/modules/valtype/cc_amex.test tcllib-1.14-dfsg/modules/valtype/cc_amex.test --- tcllib-1.13-dfsg/modules/valtype/cc_amex.test 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/cc_amex.test 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,126 @@ +# ------------------------------------------------------------------------- +# cc_amex.test -*- tcl -*- +# (C) 2011 Andreas Kupries. BSD licensed. +# +# NOTE: All "creditcard" numbers in this file have been created by +# randomly hitting the number pad. They are not real. +# ------------------------------------------------------------------------- + +source [file join \ + [file dirname [file dirname [file join [pwd] [info script]]]] \ + devtools testutilities.tcl] + +testsNeedTcl 8.5 +testsNeedTcltest 2.0 + +support { + use snit/snit2.tcl snit ;# snit v2 fixed, due Tcl 8.5 + useLocal valtype.tcl valtype::common + useLocal luhn.tcl valtype::luhn +} +testing { + useLocal cc_amex.tcl valtype::creditcard::amex +} + +# ------------------------------------------------------------------------- + +test valtype-creditcard-amex-1.0 {creditcard amex validation wrong\#args} -body { + valtype::creditcard::amex validate +} -returnCodes error \ + -result {wrong # args: should be "valtype::creditcard::amex validate value"} + +test valtype-creditcard-amex-1.1 {creditcard amex validation wrong\#args} -body { + valtype::creditcard::amex validate A B +} -returnCodes error \ + -result {wrong # args: should be "valtype::creditcard::amex validate value"} + +# ------------------------------------------------------------------------- + +test valtype-creditcard-amex-2.0 {creditcard amex validation failure, bad char} -body { + valtype::creditcard::amex validate 34A345627491046 +} -returnCodes error \ + -result {Not a CREDITCARD AMEX number, expected only digits} + +foreach {n in} { + 1 03064061545 + 2 97803064 +} { + test valtype-creditcard-amex-2.1.$n {creditcard amex validation failure, bad length} -body { + valtype::creditcard::amex validate $in + } -returnCodes error \ + -result {Not a CREDITCARD AMEX number, incorrect length, expected 15 characters} +} + +foreach {n in} { + 1 340123456789012 + 2 344321098765432 + 3 379927398717559 + 4 371234567812345 +} { + test valtype-creditcard-amex-2.2.$n {creditcard amex validation failure, bad check} -body { + valtype::creditcard::amex validate $in + } -returnCodes error \ + -result {Not a CREDITCARD AMEX number, the check digit is incorrect} +} + +foreach {n in} { + 1 977289045892557 + 2 828529847584756 +} { + test valtype-creditcard-amex-2.3.$n {creditcard amex validation failure, bad prefix} -body { + valtype::creditcard::amex validate $in + } -returnCodes error \ + -result {Not a CREDITCARD AMEX number, incorrect prefix, expected one of 34, or 37} +} + + +test valtype-creditcard-amex-3.0 {creditcard amex checkdigit wrong\#args} -body { + valtype::creditcard::amex checkdigit +} -returnCodes error \ + -result {wrong # args: should be "valtype::creditcard::amex checkdigit value"} + +test valtype-creditcard-amex-3.1 {creditcard amex checkdigit wrong\#args} -body { + valtype::creditcard::amex checkdigit A B +} -returnCodes error \ + -result {wrong # args: should be "valtype::creditcard::amex checkdigit value"} + +# ------------------------------------------------------------------------- + +test valtype-creditcard-amex-5.0 {creditcard amex checkdigit calculation failure, bad char} -body { + valtype::creditcard::amex checkdigit 34A01234567894 +} -returnCodes error \ + -result {Not a CREDITCARD AMEX number, expected only digits} + +test valtype-creditcad-amex-5.1 {creditcard amex checkdigit calculation failure, bad length} -body { + valtype::creditcard::amex checkdigit 401234 +} -returnCodes error \ + -result {Not a CREDITCARD AMEX number without checkdigit, incorrect length, expected 14 characters} + +test valtype-creditcad-amex-5.2 {creditcard amex checkdigit calculation failure, bad length} -body { + valtype::creditcard::amex checkdigit 01234567890124 +} -returnCodes error \ + -result {Not a CREDITCARD AMEX number without checkdigit, incorrect prefix, expected one of 34, or 37} + +foreach {n in check} { + 1 34012345678901 4 + 2 34109876543210 1 + 3 37992739871753 5 + 4 37123456781234 8 +} { + test valtype-creditcard-amex-4.$n {creditcard amex validation} -body { + valtype::creditcard::amex validate $in$check + } -result $in$check + + test valtype-creditcard-amex-6.$n {creditcard amex checkdigit} -body { + valtype::creditcard::amex checkdigit $in + } -result $check +} + +# ------------------------------------------------------------------------- +testsuiteCleanup +return + +# Local Variables: +# mode: tcl +# indent-tabs-mode: nil +# End: diff -Nru tcllib-1.13-dfsg/modules/valtype/cc_discover.man tcllib-1.14-dfsg/modules/valtype/cc_discover.man --- tcllib-1.13-dfsg/modules/valtype/cc_discover.man 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/cc_discover.man 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,13 @@ +[vset PACKAGE creditcard::discover] +[vset VERSION 1] +[vset A a] +[vset NAME {Discover creditcard number}] +[vset NAMEX {Discover creditcard number}] +[vset CODE {CREDITCARD DISCOVER}] +[vset OK ....] +[vset BAD ....] +[vset KEYWORDS k_discover] +[vset REQUIRE r_luhn] +[vset METHODS null] +[vset CODES c_lenpfx] +[include include/vtype.inc] diff -Nru tcllib-1.13-dfsg/modules/valtype/cc_discover.tcl tcllib-1.14-dfsg/modules/valtype/cc_discover.tcl --- tcllib-1.13-dfsg/modules/valtype/cc_discover.tcl 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/cc_discover.tcl 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,70 @@ +# # ## ### ##### ######## ############# ###################### +## Verify DISCOVER credit card number +# +## Reference +## http://wiki.cdyne.com/wiki/index.php?title=Credit_Card_Verification + +# # ## ### ##### ######## ############# ###################### + +# The code below implements the interface of a snit validation type, +# making it directly usable with snit's -type option in option +# specifications. + +# # ## ### ##### ######## ############# ###################### +## Requisites + +package require Tcl 8.5 +package require snit +package require valtype::luhn +package require valtype::common + +namespace eval ::valtype::creditcard::discover { + namespace import ::valtype::common::* +} + +# # ## ### ##### ######## ############# ###################### +## Implementation + +snit::type ::valtype::creditcard::discover { + #------------------------------------------------------------------- + # Type Methods + + typemethod validate {value} { + if {[string length $value] != 16} { + badlength {CREDITCARD DISCOVER} 16 "CREDITCARD DISCOVER number" + } elseif {![string match 6011* $value] && + ![string match 65* $value]} { + badprefix {CREDITCARD DISCOVER} {6011 65} "CREDITCARD DISCOVER number" + } + + return [valtype::luhn validate $value {CREDITCARD DISCOVER}] + } + + typemethod checkdigit {value} { + if {[string length $value] != 15} { + badlength {CREDITCARD DISCOVER} 15 "CREDITCARD DISCOVER number without checkdigit" + } elseif {![string match 6011* $value] && + ![string match 65* $value]} { + badprefix {CREDITCARD DISCOVER} {6011 65} "CREDITCARD DISCOVER number without checkdigit" + } + + return [valtype::luhn checkdigit $value {CREDITCARD DISCOVER}] + } + + #------------------------------------------------------------------- + # Constructor + + # None needed; no options + + #------------------------------------------------------------------- + # Public Methods + + method validate {value} { + $type validate $value + } +} + +# # ## ### ##### ######## ############# ###################### +## Ready + +package provide valtype::creditcard::discover 1 diff -Nru tcllib-1.13-dfsg/modules/valtype/cc_discover.test tcllib-1.14-dfsg/modules/valtype/cc_discover.test --- tcllib-1.13-dfsg/modules/valtype/cc_discover.test 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/cc_discover.test 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,126 @@ +# ------------------------------------------------------------------------- +# cc_discover.test -*- tcl -*- +# (C) 2011 Andreas Kupries. BSD licensed. +# +# NOTE: All "creditcard" numbers in this file have been created by +# randomly hitting the number pad. They are not real. +# ------------------------------------------------------------------------- + +source [file join \ + [file dirname [file dirname [file join [pwd] [info script]]]] \ + devtools testutilities.tcl] + +testsNeedTcl 8.5 +testsNeedTcltest 2.0 + +support { + use snit/snit2.tcl snit ;# snit v2 fixed, due Tcl 8.5 + useLocal valtype.tcl valtype::common + useLocal luhn.tcl valtype::luhn +} +testing { + useLocal cc_discover.tcl valtype::creditcard::discover +} + +# ------------------------------------------------------------------------- + +test valtype-creditcard-discover-1.0 {creditcard discover validation wrong\#args} -body { + valtype::creditcard::discover validate +} -returnCodes error \ + -result {wrong # args: should be "valtype::creditcard::discover validate value"} + +test valtype-creditcard-discover-1.1 {creditcard discover validation wrong\#args} -body { + valtype::creditcard::discover validate A B +} -returnCodes error \ + -result {wrong # args: should be "valtype::creditcard::discover validate value"} + +# ------------------------------------------------------------------------- + +test valtype-creditcard-discover-2.0 {creditcard discover validation failure, bad char} -body { + valtype::creditcard::discover validate 65A3456274910463 +} -returnCodes error \ + -result {Not a CREDITCARD DISCOVER number, expected only digits} + +foreach {n in} { + 1 03064061545 + 2 97803064 +} { + test valtype-creditcard-discover-2.1.$n {creditcard discover validation failure, bad length} -body { + valtype::creditcard::discover validate $in + } -returnCodes error \ + -result {Not a CREDITCARD DISCOVER number, incorrect length, expected 16 characters} +} + +foreach {n in} { + 1 6011234567890124 + 2 6543210987654325 + 3 6011273987175596 + 4 6512345678123457 +} { + test valtype-creditcard-discover-2.2.$n {creditcard discover validation failure, bad check} -body { + valtype::creditcard::discover validate $in + } -returnCodes error \ + -result {Not a CREDITCARD DISCOVER number, the check digit is incorrect} +} + +foreach {n in} { + 1 9772890458925574 + 2 8285298475847568 +} { + test valtype-creditcard-discover-2.3.$n {creditcard discover validation failure, bad prefix} -body { + valtype::creditcard::discover validate $in + } -returnCodes error \ + -result {Not a CREDITCARD DISCOVER number, incorrect prefix, expected one of 6011, or 65} +} + + +test valtype-creditcard-discover-3.0 {creditcard discover checkdigit wrong\#args} -body { + valtype::creditcard::discover checkdigit +} -returnCodes error \ + -result {wrong # args: should be "valtype::creditcard::discover checkdigit value"} + +test valtype-creditcard-discover-3.1 {creditcard discover checkdigit wrong\#args} -body { + valtype::creditcard::discover checkdigit A B +} -returnCodes error \ + -result {wrong # args: should be "valtype::creditcard::discover checkdigit value"} + +# ------------------------------------------------------------------------- + +test valtype-creditcard-discover-5.0 {creditcard discover checkdigit calculation failure, bad char} -body { + valtype::creditcard::discover checkdigit 65A012345678942 +} -returnCodes error \ + -result {Not a CREDITCARD DISCOVER number, expected only digits} + +test valtype-creditcad-discover-5.1 {creditcard discover checkdigit calculation failure, bad length} -body { + valtype::creditcard::discover checkdigit 401234 +} -returnCodes error \ + -result {Not a CREDITCARD DISCOVER number without checkdigit, incorrect length, expected 15 characters} + +test valtype-creditcad-discover-5.2 {creditcard discover checkdigit calculation failure, bad length} -body { + valtype::creditcard::discover checkdigit 012345678901245 +} -returnCodes error \ + -result {Not a CREDITCARD DISCOVER number without checkdigit, incorrect prefix, expected one of 6011, or 65} + +foreach {n in check} { + 1 650123456789012 0 + 2 601198765432100 1 + 3 659927398717534 3 + 4 601134567812348 3 +} { + test valtype-creditcard-discover-4.$n {creditcard discover validation} -body { + valtype::creditcard::discover validate $in$check + } -result $in$check + + test valtype-creditcard-discover-6.$n {creditcard discover checkdigit} -body { + valtype::creditcard::discover checkdigit $in + } -result $check +} + +# ------------------------------------------------------------------------- +testsuiteCleanup +return + +# Local Variables: +# mode: tcl +# indent-tabs-mode: nil +# End: diff -Nru tcllib-1.13-dfsg/modules/valtype/cc_mastercard.man tcllib-1.14-dfsg/modules/valtype/cc_mastercard.man --- tcllib-1.13-dfsg/modules/valtype/cc_mastercard.man 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/cc_mastercard.man 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,13 @@ +[vset PACKAGE creditcard::mastercard] +[vset VERSION 1] +[vset A a] +[vset NAME {Mastercard creditcard number}] +[vset NAMEX {Mastercard creditcard number}] +[vset CODE {CREDITCARD MASTERCARD}] +[vset OK ....] +[vset BAD ....] +[vset KEYWORDS k_mastercard] +[vset REQUIRE r_luhn] +[vset METHODS null] +[vset CODES c_lenpfx] +[include include/vtype.inc] diff -Nru tcllib-1.13-dfsg/modules/valtype/cc_mastercard.tcl tcllib-1.14-dfsg/modules/valtype/cc_mastercard.tcl --- tcllib-1.13-dfsg/modules/valtype/cc_mastercard.tcl 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/cc_mastercard.tcl 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,68 @@ +# # ## ### ##### ######## ############# ###################### +## Verify MASTERCARD MASTERCARD credit card number +# +## Reference +## http://wiki.cdyne.com/wiki/index.php?title=Credit_Card_Verification + +# # ## ### ##### ######## ############# ###################### + +# The code below implements the interface of a snit validation type, +# making it directly usable with snit's -type option in option +# specifications. + +# # ## ### ##### ######## ############# ###################### +## Requisites + +package require Tcl 8.5 +package require snit +package require valtype::luhn +package require valtype::common + +# # ## ### ##### ######## ############# ###################### +## Implementation + +namespace eval ::valtype::creditcard::mastercard { + namespace import ::valtype::common::* +} + +snit::type ::valtype::creditcard::mastercard { + #------------------------------------------------------------------- + # Type Methods + + typemethod validate {value} { + if {[string length $value] != 16} { + badlength {CREDITCARD MASTERCARD} 16 "CREDITCARD MASTERCARD number" + } elseif {[string index $value 0] ne "5"} { + badprefix {CREDITCARD MASTERCARD} 5 "CREDITCARD MASTERCARD number" + } + + return [valtype::luhn validate $value {CREDITCARD MASTERCARD}] + } + + typemethod checkdigit {value} { + if {[string length $value] != 15} { + badlength {CREDITCARD MASTERCARD} 15 "CREDITCARD MASTERCARD number without checkdigit" + } elseif {[string index $value 0] ne "5"} { + badprefix {CREDITCARD MASTERCARD} 5 "CREDITCARD MASTERCARD number without checkdigit" + } + + return [valtype::luhn checkdigit $value {CREDITCARD MASTERCARD}] + } + + #------------------------------------------------------------------- + # Constructor + + # None needed; no options + + #------------------------------------------------------------------- + # Public Methods + + method validate {value} { + $type validate $value + } +} + +# # ## ### ##### ######## ############# ###################### +## Ready + +package provide valtype::creditcard::mastercard 1 diff -Nru tcllib-1.13-dfsg/modules/valtype/cc_mastercard.test tcllib-1.14-dfsg/modules/valtype/cc_mastercard.test --- tcllib-1.13-dfsg/modules/valtype/cc_mastercard.test 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/cc_mastercard.test 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,126 @@ +# ------------------------------------------------------------------------- +# cc_mastercard.test -*- tcl -*- +# (C) 2011 Andreas Kupries. BSD licensed. +# +# NOTE: All "creditcard" numbers in this file have been created by +# randomly hitting the number pad. They are not real. +# ------------------------------------------------------------------------- + +source [file join \ + [file dirname [file dirname [file join [pwd] [info script]]]] \ + devtools testutilities.tcl] + +testsNeedTcl 8.5 +testsNeedTcltest 2.0 + +support { + use snit/snit2.tcl snit ;# snit v2 fixed, due Tcl 8.5 + useLocal valtype.tcl valtype::common + useLocal luhn.tcl valtype::luhn +} +testing { + useLocal cc_mastercard.tcl valtype::creditcard::mastercard +} + +# ------------------------------------------------------------------------- + +test valtype-creditcard-mastercard-1.0 {creditcard mastercard validation wrong\#args} -body { + valtype::creditcard::mastercard validate +} -returnCodes error \ + -result {wrong # args: should be "valtype::creditcard::mastercard validate value"} + +test valtype-creditcard-mastercard-1.1 {creditcard mastercard validation wrong\#args} -body { + valtype::creditcard::mastercard validate A B +} -returnCodes error \ + -result {wrong # args: should be "valtype::creditcard::mastercard validate value"} + +# ------------------------------------------------------------------------- + +test valtype-creditcard-mastercard-2.0 {creditcard mastercard validation failure, bad char} -body { + valtype::creditcard::mastercard validate 54A3456274910467 +} -returnCodes error \ + -result {Not a CREDITCARD MASTERCARD number, expected only digits} + +foreach {n in} { + 1 03064061545 + 2 97803064 +} { + test valtype-creditcard-mastercard-2.1.$n {creditcard mastercard validation failure, bad length} -body { + valtype::creditcard::mastercard validate $in + } -returnCodes error \ + -result {Not a CREDITCARD MASTERCARD number, incorrect length, expected 16 characters} +} + +foreach {n in} { + 1 5340123456789012 + 2 5344321098765432 + 3 5379927398717557 + 4 5371234567812345 +} { + test valtype-creditcard-mastercard-2.2.$n {creditcard mastercard validation failure, bad check} -body { + valtype::creditcard::mastercard validate $in + } -returnCodes error \ + -result {Not a CREDITCARD MASTERCARD number, the check digit is incorrect} +} + +foreach {n in} { + 1 9772890458925573 + 2 8285298475847569 +} { + test valtype-creditcard-mastercard-2.3.$n {creditcard mastercard validation failure, bad prefix} -body { + valtype::creditcard::mastercard validate $in + } -returnCodes error \ + -result {Not a CREDITCARD MASTERCARD number, incorrect prefix, expected 5} +} + + +test valtype-creditcard-mastercard-3.0 {creditcard mastercard checkdigit wrong\#args} -body { + valtype::creditcard::mastercard checkdigit +} -returnCodes error \ + -result {wrong # args: should be "valtype::creditcard::mastercard checkdigit value"} + +test valtype-creditcard-mastercard-3.1 {creditcard mastercard checkdigit wrong\#args} -body { + valtype::creditcard::mastercard checkdigit A B +} -returnCodes error \ + -result {wrong # args: should be "valtype::creditcard::mastercard checkdigit value"} + +# ------------------------------------------------------------------------- + +test valtype-creditcard-mastercard-5.0 {creditcard mastercard checkdigit calculation failure, bad char} -body { + valtype::creditcard::mastercard checkdigit 54A012345678940 +} -returnCodes error \ + -result {Not a CREDITCARD MASTERCARD number, expected only digits} + +test valtype-creditcad-mastercard-5.1 {creditcard mastercard checkdigit calculation failure, bad length} -body { + valtype::creditcard::mastercard checkdigit 401234 +} -returnCodes error \ + -result {Not a CREDITCARD MASTERCARD number without checkdigit, incorrect length, expected 15 characters} + +test valtype-creditcad-mastercard-5.2 {creditcard mastercard checkdigit calculation failure, bad length} -body { + valtype::creditcard::mastercard checkdigit 012345678901245 +} -returnCodes error \ + -result {Not a CREDITCARD MASTERCARD number without checkdigit, incorrect prefix, expected 5} + +foreach {n in check} { + 1 534012345678901 3 + 2 534109876543210 0 + 3 537992739871753 4 + 4 537123456781234 7 +} { + test valtype-creditcard-mastercard-4.$n {creditcard mastercard validation} -body { + valtype::creditcard::mastercard validate $in$check + } -result $in$check + + test valtype-creditcard-mastercard-6.$n {creditcard mastercard checkdigit} -body { + valtype::creditcard::mastercard checkdigit $in + } -result $check +} + +# ------------------------------------------------------------------------- +testsuiteCleanup +return + +# Local Variables: +# mode: tcl +# indent-tabs-mode: nil +# End: diff -Nru tcllib-1.13-dfsg/modules/valtype/cc_visa.man tcllib-1.14-dfsg/modules/valtype/cc_visa.man --- tcllib-1.13-dfsg/modules/valtype/cc_visa.man 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/cc_visa.man 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,13 @@ +[vset PACKAGE creditcard::visa] +[vset VERSION 1] +[vset A a] +[vset NAME {VISA creditcard number}] +[vset NAMEX {VISA creditcard number}] +[vset CODE {CREDITCARD VISA}] +[vset OK ....] +[vset BAD ....] +[vset KEYWORDS k_visa] +[vset REQUIRE r_luhn] +[vset METHODS null] +[vset CODES c_lenpfx] +[include include/vtype.inc] diff -Nru tcllib-1.13-dfsg/modules/valtype/cc_visa.tcl tcllib-1.14-dfsg/modules/valtype/cc_visa.tcl --- tcllib-1.13-dfsg/modules/valtype/cc_visa.tcl 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/cc_visa.tcl 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,69 @@ +# # ## ### ##### ######## ############# ###################### +## Verify VISA credit card number +# +## Reference +## http://wiki.cdyne.com/wiki/index.php?title=Credit_Card_Verification +## http://www.beachnet.com/~hstiles/cardtype.html + +# # ## ### ##### ######## ############# ###################### + +# The code below implements the interface of a snit validation type, +# making it directly usable with snit's -type option in option +# specifications. + +# # ## ### ##### ######## ############# ###################### +## Requisites + +package require Tcl 8.5 +package require snit +package require valtype::luhn +package require valtype::common + +# # ## ### ##### ######## ############# ###################### +## Implementation + +namespace eval ::valtype::creditcard::visa { + namespace import ::valtype::common::* +} + +snit::type ::valtype::creditcard::visa { + #------------------------------------------------------------------- + # Type Methods + + typemethod validate {value} { + if {[string length $value] ni {13 16}} { + badlength {CREDITCARD VISA} {13 16} "CREDITCARD VISA number" + } elseif {[string index $value 0] ne "4"} { + badprefix {CREDITCARD VISA} 4 "CREDITCARD VISA number" + } + + return [valtype::luhn validate $value {CREDITCARD VISA}] + } + + typemethod checkdigit {value} { + if {[string length $value] ni {12 15}} { + badlength {CREDITCARD VISA} {12 15} "CREDITCARD VISA number without checkdigit" + } elseif {[string index $value 0] ne "4"} { + badprefix {CREDITCARD VISA} 4 "CREDITCARD VISA number without checkdigit" + } + + return [valtype::luhn checkdigit $value {CREDITCARD VISA}] + } + + #------------------------------------------------------------------- + # Constructor + + # None needed; no options + + #------------------------------------------------------------------- + # Public Methods + + method validate {value} { + $type validate $value + } +} + +# # ## ### ##### ######## ############# ###################### +## Ready + +package provide valtype::creditcard::visa 1 diff -Nru tcllib-1.13-dfsg/modules/valtype/cc_visa.test tcllib-1.14-dfsg/modules/valtype/cc_visa.test --- tcllib-1.13-dfsg/modules/valtype/cc_visa.test 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/cc_visa.test 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,130 @@ +# ------------------------------------------------------------------------- +# cc_visa.test -*- tcl -*- +# (C) 2011 Andreas Kupries. BSD licensed. +# +# NOTE: All "creditcard" numbers in this file have been created by +# randomly hitting the number pad. They are not real. +# ------------------------------------------------------------------------- + +source [file join \ + [file dirname [file dirname [file join [pwd] [info script]]]] \ + devtools testutilities.tcl] + +testsNeedTcl 8.5 +testsNeedTcltest 2.0 + +support { + use snit/snit2.tcl snit ;# snit v2 fixed, due Tcl 8.5 + useLocal valtype.tcl valtype::common + useLocal luhn.tcl valtype::luhn +} +testing { + useLocal cc_visa.tcl valtype::creditcard::visa +} + +# ------------------------------------------------------------------------- + +test valtype-creditcard-visa-1.0 {creditcard visa validation wrong\#args} -body { + valtype::creditcard::visa validate +} -returnCodes error \ + -result {wrong # args: should be "valtype::creditcard::visa validate value"} + +test valtype-creditcard-visa-1.1 {creditcard visa validation wrong\#args} -body { + valtype::creditcard::visa validate A B +} -returnCodes error \ + -result {wrong # args: should be "valtype::creditcard::visa validate value"} + +# ------------------------------------------------------------------------- + +test valtype-creditcard-visa-2.0 {creditcard visa validation failure, bad char} -body { + valtype::creditcard::visa validate 4A34562749104 +} -returnCodes error \ + -result {Not a CREDITCARD VISA number, expected only digits} + +foreach {n in} { + 1 030640615 + 2 978030640615 +} { + test valtype-creditcard-visa-2.1.$n {creditcard visa validation failure, bad length} -body { + valtype::creditcard::visa validate $in + } -returnCodes error \ + -result {Not a CREDITCARD VISA number, incorrect length, expected one of 13, or 16 characters} +} + +foreach {n in} { + 1 4012345678901 + 2 4109876543210 + 3 4992739871755 + 4 4123456781234 + 5 4012345678901234 + 6 4432109876543210 + 7 4992739871755987 + 8 4123456781234567 +} { + test valtype-creditcard-visa-2.2.$n {creditcard visa validation failure, bad check} -body { + valtype::creditcard::visa validate $in + } -returnCodes error \ + -result {Not a CREDITCARD VISA number, the check digit is incorrect} +} + +foreach {n in} { + 1 9772890458925 + 2 8285298475847568 +} { + test valtype-creditcard-visa-2.3.$n {creditcard visa validation failure, bad prefix} -body { + valtype::creditcard::visa validate $in + } -returnCodes error \ + -result {Not a CREDITCARD VISA number, incorrect prefix, expected 4} +} + + +test valtype-creditcard-visa-3.0 {creditcard visa checkdigit wrong\#args} -body { + valtype::creditcard::visa checkdigit +} -returnCodes error \ + -result {wrong # args: should be "valtype::creditcard::visa checkdigit value"} + +test valtype-creditcard-visa-3.1 {creditcard visa checkdigit wrong\#args} -body { + valtype::creditcard::visa checkdigit A B +} -returnCodes error \ + -result {wrong # args: should be "valtype::creditcard::visa checkdigit value"} + +# ------------------------------------------------------------------------- + +test valtype-creditcard-visa-5.0 {creditcard visa checkdigit calculation failure, bad char} -body { + valtype::creditcard::visa checkdigit 4A0123456789 +} -returnCodes error \ + -result {Not a CREDITCARD VISA number, expected only digits} + +test valtype-creditcad-visa-5.1 {creditcard visa checkdigit calculation failure, bad length} -body { + valtype::creditcard::visa checkdigit 401234 +} -returnCodes error \ + -result {Not a CREDITCARD VISA number without checkdigit, incorrect length, expected one of 12, or 15 characters} + +test valtype-creditcad-visa-5.2 {creditcard visa checkdigit calculation failure, bad length} -body { + valtype::creditcard::visa checkdigit 012345678901234 +} -returnCodes error \ + -result {Not a CREDITCARD VISA number without checkdigit, incorrect prefix, expected 4} + +foreach {n in check} { + 1 401234567890 9 + 2 410987654321 1 + 3 499273987175 8 + 4 412345678123 2 +} { + test valtype-creditcard-visa-4.$n {creditcard visa validation} -body { + valtype::creditcard::visa validate $in$check + } -result $in$check + + test valtype-creditcard-visa-6.$n {creditcard visa checkdigit} -body { + valtype::creditcard::visa checkdigit $in + } -result $check +} + +# ------------------------------------------------------------------------- +testsuiteCleanup +return + +# Local Variables: +# mode: tcl +# indent-tabs-mode: nil +# End: diff -Nru tcllib-1.13-dfsg/modules/valtype/ChangeLog tcllib-1.14-dfsg/modules/valtype/ChangeLog --- tcllib-1.13-dfsg/modules/valtype/ChangeLog 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -0,0 +1,29 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + +2011-11-16 Andreas Kupries + + * iban.tcl: Extended checks to be country specific, added + * iban.test: reference @ wikipedia, added testsuite. + +2011-11-14 Andreas Kupries + + * iban.man: New package, validation type for International Bank + * iban.tcl: Account Numbers (IBAN). Provided by Max Jarek + * include/k_iban.inc: . + * pkgIndex.tcl: + + * include/k_amex.inc: Extended keywords. + * include/k_discover.inc: + * include/k_mastercard.inc: + * include/k_visa.inc: + +2011-04-06 Andreas Kupries + + * New module: Validation types. snit validation types for various + classes of numbers (ISBN, EAN, ...) and general check-digit + algorithms (luhn(5), verhoeff, ...). + diff -Nru tcllib-1.13-dfsg/modules/valtype/ean13.man tcllib-1.14-dfsg/modules/valtype/ean13.man --- tcllib-1.13-dfsg/modules/valtype/ean13.man 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/ean13.man 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,13 @@ +[vset PACKAGE gs1::ean13] +[vset VERSION 1] +[vset A an] +[vset NAME EAN13] +[vset NAMEX EAN13] +[vset CODE EAN13] +[vset OK ....] +[vset BAD ....] +[vset KEYWORDS k_ean13] +[vset REQUIRE null] +[vset METHODS null] +[vset CODES c_length] +[include include/vtype.inc] diff -Nru tcllib-1.13-dfsg/modules/valtype/ean13.tcl tcllib-1.14-dfsg/modules/valtype/ean13.tcl --- tcllib-1.13-dfsg/modules/valtype/ean13.tcl 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/ean13.tcl 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,99 @@ +# # ## ### ##### ######## ############# ###################### +## Validation of EAN13 numbers. +## EAN = European Article Number +## now International Article Number, without changing the acronym. +# +# References +# http://www.cut-the-knot.org/Curriculum/Arithmetic/EAN13.shtml +# http://www.barcodeisland.com/ean13.phtml +# http://en.wikipedia.org/wiki/EAN-13 + +# # ## ### ##### ######## ############# ###################### + +# The code below implements the interface of a snit validation type, +# making it directly usable with snit's -type option in option +# specifications. + +# # ## ### ##### ######## ############# ###################### +## Requisites + +package require Tcl 8.5 +package require snit +package require valtype::common + +# # ## ### ##### ######## ############# ###################### +## Implementation + +namespace eval ::valtype::gs1::ean13 { + namespace import ::valtype::common::* +} + +snit::type ::valtype::gs1::ean13 { + #------------------------------------------------------------------- + # Type Methods + + typemethod validate {value} { + if {![regexp {^[0-9]+[Xx]?$} $value]} { + badchar EAN13 "EAN13 number, expected only digits, and possibly 'X' or 'x' as checkdigit" + } elseif {[string length $value] != 13} { + badlength EAN13 13 "EAN13 number" + } + + # FUTURE: Check that the first 3 digits are a valid GS1 + # FUTURE: country code (numeric). See also the ISO 3166-1 + # FUTURE: country codes. Same purpose, different codings (alpha2 + # FUTURE: alpha3, numeric3). + + set sum [Sum $value] + if {($sum % 10) != 0} { + badcheck EAN13 "EAN13 number" + } + + return $value + } + + typemethod checkdigit {value} { + if {![regexp {^[0-9]+[Xx]?$} $value]} { + badchar EAN13 "EAN13 number (without checkdigit), expected only digits" + } elseif {[string length $value] != 12} { + badlength EAN13 12 "EAN13 number (without checkdigit)" + } + + set c [expr {10 - ([Sum $value] % 10)}] + if {$c == 10} { set c 0 } + + return $c + } + + proc Sum {value} { + # i| 0 1 2 3 4 5 6 7 8 9 + # *3| 0 3 6 9 12 15 18 21 24 27 + + set sum 0 + set flip 1 + foreach d [string map {x 10 X 10} [split $value {}]] { + incr sum [lindex { + {0 1 2 3 4 5 6 7 8 9 10} + {0 3 6 9 12 15 18 21 24 27 30} + } [expr {[incr flip] & 1}] $d] + } + return $sum + } + + #------------------------------------------------------------------- + # Constructor + + # None needed; no options + + #------------------------------------------------------------------- + # Public Methods + + method validate {value} { + $type validate $value + } +} + +# # ## ### ##### ######## ############# ###################### +## Ready + +package provide valtype::gs1::ean13 1 diff -Nru tcllib-1.13-dfsg/modules/valtype/ean13.test tcllib-1.14-dfsg/modules/valtype/ean13.test --- tcllib-1.13-dfsg/modules/valtype/ean13.test 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/ean13.test 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,122 @@ +# ------------------------------------------------------------------------- +# ean13.test -*- tcl -*- +# (C) 2011 Andreas Kupries. BSD licensed. +# ------------------------------------------------------------------------- + +source [file join \ + [file dirname [file dirname [file join [pwd] [info script]]]] \ + devtools testutilities.tcl] + +testsNeedTcl 8.5 +testsNeedTcltest 2.0 + +support { + use snit/snit2.tcl snit ;# snit v2 fixed, due Tcl 8.5 + useLocal valtype.tcl valtype::common +} +testing { + useLocal ean13.tcl valtype::gs1::ean13 +} + +# ------------------------------------------------------------------------- + +test valtype-ean13-1.0 {ean13 validation wrong\#args} -body { + valtype::gs1::ean13 validate +} -returnCodes error \ + -result {wrong # args: should be "valtype::gs1::ean13 validate value"} + +test valtype-ean13-1.1 {ean13 validation wrong\#args} -body { + valtype::gs1::ean13 validate A B +} -returnCodes error \ + -result {wrong # args: should be "valtype::gs1::ean13 validate value"} + +# ------------------------------------------------------------------------- + +test valtype-ean13-2.0 {ean13 validation failure, bad char} -body { + valtype::gs1::ean13 validate A +} -returnCodes error \ + -result {Not an EAN13 number, expected only digits, and possibly 'X' or 'x' as checkdigit} + +foreach {n in} { + 1 978030640615 +} { + test valtype-ean13-2.1.$n {ean13 validation failure, bad length} -body { + valtype::gs1::ean13 validate $in + } -returnCodes error \ + -result {Not an EAN13 number, incorrect length, expected 13 characters} +} + +foreach {n in} { + 1 978030640615x +} { + test valtype-ean13-2.2.$n {ean13 validation failure, bad check} -body { + valtype::gs1::ean13 validate $in + } -returnCodes error \ + -result {Not an EAN13 number, the check digit is incorrect} +} + +if 0 { + ## FUTURE: Validate EAN country code in the number. + foreach {n in} { + 1 9774444444444 + } { + test valtype-ean13-2.3.$n {ean13 validation failure, bad prefix} -body { + valtype::gs1::ean13 validate $in + } -returnCodes error \ + -result {Not an EAN13 number, incorrect prefix, expected one of 978, or 979} + } +} + +test valtype-ean13-3.0 {ean13 checkdigit wrong\#args} -body { + valtype::gs1::ean13 checkdigit +} -returnCodes error \ + -result {wrong # args: should be "valtype::gs1::ean13 checkdigit value"} + +test valtype-ean13-3.1 {ean13 checkdigit wrong\#args} -body { + valtype::gs1::ean13 checkdigit A B +} -returnCodes error \ + -result {wrong # args: should be "valtype::gs1::ean13 checkdigit value"} + +# ------------------------------------------------------------------------- + +test valtype-ean13-5.0 {ean13 checkdigit calculation failure, bad char} -body { + valtype::gs1::ean13 checkdigit A +} -returnCodes error \ + -result {Not an EAN13 number (without checkdigit), expected only digits} + +test valtype-ean13-5.1 {ean13 checkdigit calculation failure, bad length} -body { + valtype::gs1::ean13 checkdigit 01234 +} -returnCodes error \ + -result {Not an EAN13 number (without checkdigit), incorrect length, expected 12 characters} + +if 0 { + ## FUTURE: Validate EAN country codes in the number. + test valtype-ean13-5.2 {ean13 checkdigit calculation failure, bad char} -body { + valtype::gs1::ean13 checkdigit 977444444444 + } -returnCodes error \ + -result {Not an EAN13 number (without checkdigit), incorrect prefix, expected one of 978, or 979} +} + +foreach {n in check} { + 1 978030640615 7 + 2 005717402011 2 + 3 005717402010 5 + 4 005717420121 4 +} { + test valtype-ean13-4.$n {ean13 validation} -body { + valtype::gs1::ean13 validate $in$check + } -result $in$check + + test valtype-ean13-6.$n {ean13 checkdigit} -body { + valtype::gs1::ean13 checkdigit $in + } -result $check +} + +# ------------------------------------------------------------------------- +testsuiteCleanup +return + +# Local Variables: +# mode: tcl +# indent-tabs-mode: nil +# End: diff -Nru tcllib-1.13-dfsg/modules/valtype/iban.man tcllib-1.14-dfsg/modules/valtype/iban.man --- tcllib-1.13-dfsg/modules/valtype/iban.man 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/iban.man 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,13 @@ +[vset PACKAGE iban] +[vset VERSION 1] +[vset A an] +[vset NAME IBAN] +[vset NAMEX {International Bank Account Number}] +[vset CODE IBAN] +[vset OK ....] +[vset BAD ....] +[vset KEYWORDS k_iban] +[vset REQUIRE null] +[vset METHODS null] +[vset CODES null] +[include include/vtype.inc] diff -Nru tcllib-1.13-dfsg/modules/valtype/iban.tcl tcllib-1.14-dfsg/modules/valtype/iban.tcl --- tcllib-1.13-dfsg/modules/valtype/iban.tcl 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/iban.tcl 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,91 @@ +# # ## ### ##### ######## ############# ###################### +## Validation of IBAN numbers. +# +# Reference: +# http://en.wikipedia.org/wiki/International_Bank_Account_Number +# +# # ## ### ##### ######## ############# ###################### + +# The code below implements the interface of a snit validation type, +# making it directly usable with snit's -type option in option +# specifications. + +# # ## ### ##### ######## ############# ###################### +## Requisites + +package require Tcl 8.5 +package require snit +package require valtype::common + +# # ## ### ##### ######## ############# ###################### +## Implementation + +namespace eval ::valtype::iban { + namespace import ::valtype::common::* +} + +snit::type ::valtype::iban { + #------------------------------------------------------------------- + # Type Methods + + typevariable cclen -array { + AL 28 AD 24 AT 20 BH 22 BE 16 BA 20 BG 22 CR 21 HR 21 CY 28 CZ 24 DK 18 FO 18 GL 18 DO 28 EE 20 FI 18 + FR 27 GF 27 GP 27 MQ 27 RE 27 PF 27 TF 27 YT 27 NC 27 PM 27 WF 27 GE 22 DE 22 GI 23 GR 27 HU 28 + IS 26 IE 22 IL 23 IT 27 KZ 20 KW 30 LV 21 LB 28 LI 21 LT 20 LU 20 MK 19 MT 31 MR 27 MU 30 MC 27 + ME 22 NL 18 NO 15 PL 28 PT 25 RO 24 SM 27 SA 24 RS 22 SK 24 SI 19 ES 24 SE 24 CH 21 TN 24 TR 26 + AE 23 GB 22 + } + + typevariable charmap { + A 10 B 11 C 12 D 13 E 14 F 15 G 16 H 17 I 18 J 19 K 20 L 21 M 22 + N 23 O 24 P 25 Q 26 R 27 S 28 T 29 U 30 V 31 W 32 X 33 Y 34 Z 35 + } + + typemethod cclen {cc} { + return $cclen($cc) + } + + typemethod validate {value} { + set value [string toupper $value] + + if {![regexp {^[A-Z]{2}[0-9A-Z]+$} $value]} { + badchar IBAN "IBAN number, expected country code followed by alphanumerics" + } + + set country [string range $value 0 1] + + if {![info exists cclen($country)]} { + badprefix IBAN "" "IBAN number, unknown country code" + } + if {[string length $value] != $cclen($country)} { + badlength IBAN $cclen($country) "IBAN number" + } + + set number [string range $value 4 end][string range $value 0 3] + set number [string map $charmap $number] + set number [string trimleft $number 0] + + if {($number % 97) != 1} { + badcheck IBAN "IBAN number" + } + + return $value + } + + #------------------------------------------------------------------- + # Constructor + + # None needed; no options + + #------------------------------------------------------------------- + # Public Methods + + method validate {value} { + $type validate $value + } +} + +# # ## ### ##### ######## ############# ###################### +## Ready + +package provide valtype::iban 1 diff -Nru tcllib-1.13-dfsg/modules/valtype/iban.test tcllib-1.14-dfsg/modules/valtype/iban.test --- tcllib-1.13-dfsg/modules/valtype/iban.test 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/iban.test 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,159 @@ +# ------------------------------------------------------------------------- +# iban.test -*- tcl -*- +# (C) 2011 Andreas Kupries. BSD licensed. +# (C) 2011 Max Jarek +# ------------------------------------------------------------------------- + +source [file join \ + [file dirname [file dirname [file join [pwd] [info script]]]] \ + devtools testutilities.tcl] + +testsNeedTcl 8.5 +testsNeedTcltest 2.0 + +support { + use snit/snit2.tcl snit ;# snit v2 fixed, due Tcl 8.5 + useLocal valtype.tcl valtype::common +} +testing { + useLocal iban.tcl valtype::iban +} + +# ------------------------------------------------------------------------- + +test valtype-iban-1.0 {iban validation wrong\#args} -body { + valtype::iban validate +} -returnCodes error \ + -result {wrong # args: should be "valtype::iban validate value"} + +test valtype-iban-1.1 {iban validation wrong\#args} -body { + valtype::iban validate A B C +} -returnCodes error \ + -result {wrong # args: should be "valtype::iban validate value"} + +# ------------------------------------------------------------------------- + +set n 0 +foreach iban { + AD1200012030200359100100 + AE070331234567890123456 + AL47212110090000000235698741 + AT611904300234573201 + BA391290079401028494 + BE68539007547034 + BG80BNBG96611020345678 + BH67BMAG00001299123456 + CH9300762011623852957 + CY17002001280000001200527600 + CZ6508000000192000145399 + DE89370400440532013000 + DK5000400440116243 + DO28BAGR00000001212453611324 + EE382200221020145685 + ES9121000418450200051332 + FI2112345600000785 + FO6264600001631634 + FR1420041010050500013M02606 + GB29NWBK60161331926819 + GE29NB0000000101904917 + GI75NWBK000000007099453 + GL8964710001000206 + GR1601101250000000012300695 + HR1210010051863000160 + HU42117730161111101800000000 + IE29AIBK93115212345678 + IL620108000000099999999 + IS140159260076545510730339 + IT60X0542811101000000123456 + KW81CBKU0000000000001234560101 + KZ86125KZT5004100100 + LB62099900000001001901229114 + LI21088100002324013AA + LT121000011101001000 + LU280019400644750000 + LV80BANK0000435195001 + MC5811222000010123456789030 + ME25505000012345678951 + MK07250120000058984 + MR1300020001010000123456753 + MT84MALT011000012345MTLCAST001S + MU17BOMM0101101030300200000MUR + NL91ABNA0417164300 + NO9386011117947 + PL27114020040000300201355387 + PT50000201231234567890154 + RO49AAAA1B31007593840000 + RS35260005601001611379 + SA0380000000608010167519 + SE4550000000058398257466 + SI56191000000123438 + SK3112000000198742637541 + SM86U0322509800000000270100 + TN5914207207100707129648 + TR330006100519786457841326 + PL26105014451000002276470461 + PL67114020040000310200082366 + FR7611008000010004126302470 + FR1420041010050500013M02606 + GB29NWBK60161331926819 + IT60X0542811101000000123456 +} { + set cc [string range $iban 0 1] + set len [valtype::iban cclen $cc] + set badchar [string map {0 - 9 -} $iban] + set short [string range $iban 0 end-1] + set long ${iban}45 + + # Flip two digits to generate a bad number, try check digits + # first, then across border of check digits to bban. + set check [string range $iban 0 1][string index $iban 3][string index $iban 2][string range $iban 4 end] + if {$check eq $iban} { + set check [string range $iban 0 2][string index $iban 4][string index $iban 3][string range $iban 5 end] + } + + test valtype-iban-2.0.$n "iban validation failure, bad char, $badchar" -body { + valtype::iban validate $badchar + } -returnCodes error \ + -result {Not an IBAN number, expected country code followed by alphanumerics} + + test valtype-iban-2.1.$n "iban validation failure, bad length, $short" -body { + valtype::iban validate $short + } -returnCodes error \ + -result "Not an IBAN number, incorrect length, expected $len characters" + + test valtype-iban-2.2.$n "iban validation failure, bad length, $long" -body { + valtype::iban validate $long + } -returnCodes error \ + -result "Not an IBAN number, incorrect length, expected $len characters" + + test valtype-iban-3.$n "iban validation failure, bad check, $iban, $check" -body { + valtype::iban validate $check + } -returnCodes error \ + -result {Not an IBAN number, the check digit is incorrect} + + test valtype-iban-4.$n "iban validation, $iban" -body { + valtype::iban validate $iban + } -result $iban + + incr n +} + +set n 0 +foreach iban { + PL78102030170000270200618694 +} { + test valtype-iban-5.$n "iban validation failure, bad check, $iban" -body { + valtype::iban validate $iban + } -returnCodes error \ + -result {Not an IBAN number, the check digit is incorrect} + incr n +} + +# ------------------------------------------------------------------------- +testsuiteCleanup +return + +# Local Variables: +# mode: tcl +# indent-tabs-mode: nil +# End: diff -Nru tcllib-1.13-dfsg/modules/valtype/imei.man tcllib-1.14-dfsg/modules/valtype/imei.man --- tcllib-1.13-dfsg/modules/valtype/imei.man 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/imei.man 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,13 @@ +[vset PACKAGE imei] +[vset VERSION 1] +[vset A an] +[vset NAME IMEI] +[vset NAMEX {International Mobile Equipment Identity (IMEI) number}] +[vset CODE IMEI] +[vset OK ....] +[vset BAD ....] +[vset KEYWORDS k_imei] +[vset REQUIRE r_luhn] +[vset METHODS null] +[vset CODES c_length] +[include include/vtype.inc] diff -Nru tcllib-1.13-dfsg/modules/valtype/imei.tcl tcllib-1.14-dfsg/modules/valtype/imei.tcl --- tcllib-1.13-dfsg/modules/valtype/imei.tcl 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/imei.tcl 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,66 @@ +# # ## ### ##### ######## ############# ###################### +## IMEI (International Mobile Equipment Identity) +## References +## http://en.wikipedia.org/wiki/IMEI +## http://www.3gpp.org/ftp/Specs/html-info/23003.htm +## Short notes +## 14-digit number + check digit. +## Embeds information on origin, model, and serial number of the device. +## Passes Luhn test as is. + +# # ## ### ##### ######## ############# ###################### + +# The code below implements the interface of a snit validation type, +# making it directly usable with snit's -type option in option +# specifications. + +# # ## ### ##### ######## ############# ###################### +## Requisites + +package require Tcl 8.5 +package require snit +package require valtype::luhn +package require valtype::common + +# # ## ### ##### ######## ############# ###################### +## Implementation + +namespace eval ::valtype::imei { + namespace import ::valtype::common::* +} + +snit::type ::valtype::imei { + #------------------------------------------------------------------- + # Type Methods + + typemethod validate {value} { + if {[string length $value] != 15} { + badlength IMEI 15 "IMEI number" + } + return [valtype::luhn validate $value IMEI] + } + + typemethod checkdigit {value} { + if {[string length $value] != 14} { + badlength IMEI 14 "IMEI number (without checkdigit)" + } + return [valtype::luhn checkdigit $value IMEI] + } + + #------------------------------------------------------------------- + # Constructor + + # None needed; no options + + #------------------------------------------------------------------- + # Public Methods + + method validate {value} { + $type validate $value + } +} + +# # ## ### ##### ######## ############# ###################### +## Ready + +package provide valtype::imei 1 diff -Nru tcllib-1.13-dfsg/modules/valtype/imei.test tcllib-1.14-dfsg/modules/valtype/imei.test --- tcllib-1.13-dfsg/modules/valtype/imei.test 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/imei.test 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,85 @@ +# ------------------------------------------------------------------------- +# imei.test -*- tcl -*- +# (C) 2011 Andreas Kupries. BSD licensed. +# ------------------------------------------------------------------------- + +source [file join \ + [file dirname [file dirname [file join [pwd] [info script]]]] \ + devtools testutilities.tcl] + +testsNeedTcl 8.5 +testsNeedTcltest 2.0 + +support { + use snit/snit2.tcl snit ;# snit v2 fixed, due Tcl 8.5 + useLocal valtype.tcl valtype::common + useLocal luhn.tcl valtype::luhn +} +testing { + useLocal imei.tcl valtype::imei +} + +# ------------------------------------------------------------------------- + +test valtype-imei-1.0 {imei validation wrong\#args} -body { + valtype::imei validate +} -returnCodes error \ + -result {wrong # args: should be "valtype::imei validate value"} + +test valtype-imei-1.1 {imei validation wrong\#args} -body { + valtype::imei validate A B C +} -returnCodes error \ + -result {wrong # args: should be "valtype::imei validate value"} + +# ------------------------------------------------------------------------- + +test valtype-imei-2.0 {imei validation failure, bad char} -body { + valtype::imei validate ABCDEFGHIJKLMNO +} -returnCodes error \ + -result {Not an IMEI number, expected only digits} + +test valtype-imei-2.1 {imei validation failure, bad length} -body { + valtype::imei validate 32 +} -returnCodes error \ + -result {Not an IMEI number, incorrect length, expected 15 characters} + +foreach {n in} { + 1 000000000000001 + 2 100000000000000 + 3 000000000000010 + 4 012345678901230 + 5 321098765432100 +} { + test valtype-imei-3.1 {imei validation failure, bad check} -body { + valtype::imei validate $in + } -returnCodes error \ + -result {Not an IMEI number, the check digit is incorrect} +} + +# ------------------------------------------------------------------------- + +foreach {n in check} { + 1 00000000000000 0 + 2 10000000000000 9 + 3 00000000000001 8 + 4 01234567890123 7 + 5 32109876543210 5 +} { + test valtype-imei-4.$n {imei validation} -body { + valtype::imei validate $in$check + } -result $in$check + + test valtype-imei-6.$n {imei checkdigit} -body { + # IMEI = luhn check of 15-digit number (incl. check digit) + valtype::luhn checkdigit $in + } -result $check +} + +# ------------------------------------------------------------------------- +testsuiteCleanup +return + +# Local Variables: +# mode: tcl +# indent-tabs-mode: nil +# End: diff -Nru tcllib-1.13-dfsg/modules/valtype/include/c_length.inc tcllib-1.14-dfsg/modules/valtype/include/c_length.inc --- tcllib-1.13-dfsg/modules/valtype/include/c_length.inc 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/include/c_length.inc 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,3 @@ +[def "INVALID [vset CODE] LENGTH"] + +The input value is of the wrong length to be [vset A] [vset NAME]. diff -Nru tcllib-1.13-dfsg/modules/valtype/include/c_lenpfx.inc tcllib-1.14-dfsg/modules/valtype/include/c_lenpfx.inc --- tcllib-1.13-dfsg/modules/valtype/include/c_lenpfx.inc 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/include/c_lenpfx.inc 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,6 @@ +[include c_length.inc] + +[def "INVALID [vset CODE] PREFIX"] + +The input value does not start with the magic value(s) required for it +to be [vset A] [vset NAME]. diff -Nru tcllib-1.13-dfsg/modules/valtype/include/errorcodes.inc tcllib-1.14-dfsg/modules/valtype/include/errorcodes.inc --- tcllib-1.13-dfsg/modules/valtype/include/errorcodes.inc 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/include/errorcodes.inc 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,31 @@ + + +The validation type in this package is able to + + + + +INVALID <> CHAR - Unexpected, incorrect character in input for <> type of thing. +INVALID <> CHECK-DIGIT - Validation of the check digit in the input failed for <> type of thing. +INVALID <> LENGTH - Unexpected, incorrect length of the input for <> type of thing. +INVALID <> PREFIX - Unexpected, incorrect prefix characters in the input for <> type of thing. + +<> currently in + + LUHN - Unadorned luhn check digit + LUHN5 - Unadorned luhn 10+5 check digit + VERHOEFF - Unadorned verhoeff check digit + IMEI - International Mobile Equipment Identity + 14 digit number + luhn check digit. + USNPI - US National Provider Identifier (Medicare) + ISBN - International Standard Book Number (-10 and -13 variants) + (ISBN13 is a subset of EAN13) + EAN13 - International Article Number + + CREDITCARD VISA - VISA creditcard number. + CREDITCARD AMEX - AMerican EXpress creditcard number. + CREDITCARD DISCOVER - Discovery creditcard number + CREDITCARD MASTERCARD - MasterCard creditcard number + +// not yet full there + EAN8 - Ditto, a reduced form using only 8 characters diff -Nru tcllib-1.13-dfsg/modules/valtype/include/k_amex.inc tcllib-1.14-dfsg/modules/valtype/include/k_amex.inc --- tcllib-1.13-dfsg/modules/valtype/include/k_amex.inc 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/include/k_amex.inc 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,4 @@ +[keywords {credit card} bank finance] +[keywords {card for credit}] +[keywords AMEX] +[keywords {American Express}] diff -Nru tcllib-1.13-dfsg/modules/valtype/include/k_discover.inc tcllib-1.14-dfsg/modules/valtype/include/k_discover.inc --- tcllib-1.13-dfsg/modules/valtype/include/k_discover.inc 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/include/k_discover.inc 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,4 @@ +[keywords {credit card} bank finance] +[keywords {card for credit}] +[keywords Discover] + diff -Nru tcllib-1.13-dfsg/modules/valtype/include/k_ean13.inc tcllib-1.14-dfsg/modules/valtype/include/k_ean13.inc --- tcllib-1.13-dfsg/modules/valtype/include/k_ean13.inc 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/include/k_ean13.inc 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,2 @@ +[keywords EAN13 {International Article Number}] +[keywords EAN {European Article Number}] diff -Nru tcllib-1.13-dfsg/modules/valtype/include/k_iban.inc tcllib-1.14-dfsg/modules/valtype/include/k_iban.inc --- tcllib-1.13-dfsg/modules/valtype/include/k_iban.inc 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/include/k_iban.inc 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,2 @@ +[keywords IBAN bank finance] +[keywords {International Bank Account Number}] diff -Nru tcllib-1.13-dfsg/modules/valtype/include/k_imei.inc tcllib-1.14-dfsg/modules/valtype/include/k_imei.inc --- tcllib-1.13-dfsg/modules/valtype/include/k_imei.inc 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/include/k_imei.inc 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,3 @@ +[keywords IMEI] +[keywords {International Mobile Equipment Identity}] +[keywords phone {mobile phone} cell-phone] diff -Nru tcllib-1.13-dfsg/modules/valtype/include/k_isbn.inc tcllib-1.14-dfsg/modules/valtype/include/k_isbn.inc --- tcllib-1.13-dfsg/modules/valtype/include/k_isbn.inc 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/include/k_isbn.inc 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,3 @@ +[keywords ISBN {International Standard Book Number} {Book Number}] +[keywords EAN13 {International Article Number}] +[keywords EAN {European Article Number}] diff -Nru tcllib-1.13-dfsg/modules/valtype/include/k_luhn5.inc tcllib-1.14-dfsg/modules/valtype/include/k_luhn5.inc --- tcllib-1.13-dfsg/modules/valtype/include/k_luhn5.inc 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/include/k_luhn5.inc 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1 @@ +[keywords luhn luhn-5] diff -Nru tcllib-1.13-dfsg/modules/valtype/include/k_luhn.inc tcllib-1.14-dfsg/modules/valtype/include/k_luhn.inc --- tcllib-1.13-dfsg/modules/valtype/include/k_luhn.inc 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/include/k_luhn.inc 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1 @@ +[keywords luhn] diff -Nru tcllib-1.13-dfsg/modules/valtype/include/k_mastercard.inc tcllib-1.14-dfsg/modules/valtype/include/k_mastercard.inc --- tcllib-1.13-dfsg/modules/valtype/include/k_mastercard.inc 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/include/k_mastercard.inc 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,4 @@ +[keywords {credit card} bank finance] +[keywords {card for credit}] +[keywords MasterCard] + diff -Nru tcllib-1.13-dfsg/modules/valtype/include/k_usnpi.inc tcllib-1.14-dfsg/modules/valtype/include/k_usnpi.inc --- tcllib-1.13-dfsg/modules/valtype/include/k_usnpi.inc 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/include/k_usnpi.inc 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,2 @@ +[keywords US-NPI NPI medicare] +[keywords {National Provider Identifier}] diff -Nru tcllib-1.13-dfsg/modules/valtype/include/k_verhoeff.inc tcllib-1.14-dfsg/modules/valtype/include/k_verhoeff.inc --- tcllib-1.13-dfsg/modules/valtype/include/k_verhoeff.inc 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/include/k_verhoeff.inc 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1 @@ +[keywords verhoeff] diff -Nru tcllib-1.13-dfsg/modules/valtype/include/k_visa.inc tcllib-1.14-dfsg/modules/valtype/include/k_visa.inc --- tcllib-1.13-dfsg/modules/valtype/include/k_visa.inc 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/include/k_visa.inc 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,4 @@ +[keywords {credit card} bank finance] +[keywords {card for credit}] +[keywords VISA] + diff -Nru tcllib-1.13-dfsg/modules/valtype/include/m_isbn.inc tcllib-1.14-dfsg/modules/valtype/include/m_isbn.inc --- tcllib-1.13-dfsg/modules/valtype/include/m_isbn.inc 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/include/m_isbn.inc 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,8 @@ +[call [cmd valtype::[vset PACKAGE]] [method 13of] [arg value]] + +This method expects an old-style 10-digit ISBN and returns the +canonical modern 13-digit ISBN. + +This is used by [method validate] to canonicalize the input, so that +all parts of the system after the validation can expect to work with +modern 13-digit ISBNs. diff -Nru tcllib-1.13-dfsg/modules/valtype/include/r_luhn.inc tcllib-1.14-dfsg/modules/valtype/include/r_luhn.inc --- tcllib-1.13-dfsg/modules/valtype/include/r_luhn.inc 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/include/r_luhn.inc 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1 @@ +[require valtype::luhn] diff -Nru tcllib-1.13-dfsg/modules/valtype/include/vtype.inc tcllib-1.14-dfsg/modules/valtype/include/vtype.inc --- tcllib-1.13-dfsg/modules/valtype/include/vtype.inc 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/include/vtype.inc 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,102 @@ +[comment {-*- tcl -*- --- !doctools ---}] +[manpage_begin valtype::[vset PACKAGE] n [vset VERSION]] +[copyright {2011 Andreas Kupries }] +[titledesc "Validation for [vset NAME]"] +[moddesc {Validation types}] +[category {Validation, Type checking}] +[keywords Validation Checking Testing {Type checking}] +[keywords {Value checking} isA] +[include [vset KEYWORDS].inc] +[require Tcl 8.5] +[require snit 2] +[require valtype::common] +[include [vset REQUIRE].inc] +[require valtype::[vset PACKAGE] [opt [vset VERSION]]] +[description] + +This package implements a snit validation type for [vset A] [vset NAME]. + +[para] + +A validation type is an object that can be used to validate Tcl values +of a particular kind. For example, [cmd snit::integer], a validation +type defined by the [package snit] package is used to validate that a +Tcl value is an integer. + +[para] + +Every validation type has a [method validate] method which is used to +do the validation. This method must take a single argument, the value +to be validated; further, it must do nothing if the value is valid, +but throw an error if the value is invalid: + +[example_begin] + valtype::[vset PACKAGE] validate [vset OK] ;# Does nothing + valtype::[vset PACKAGE] validate [vset BAD] ;# Throws an error (bad [vset NAMEX]). +[example_end] + +[para] + +The [method validate] method will always return the validated value on +success, and throw the [cmd -errorcode] INVALID on error, possibly +with additional elements which provide more details about the problem. + +[section API] + +The API provided by this package satisfies the specification +of snit validation types found in the documentation of +[manpage {Snit's Not Incr Tcl}]. + +[list_begin definitions] + +[call [cmd valtype::[vset PACKAGE]] [method validate] [arg value]] + +This method validates the [arg value] and returns it, possibly in a +canonical form, if it passes. If the value does not pass the +validation an error is thrown. + +[call [cmd valtype::[vset PACKAGE]] [method checkdigit] [arg value]] + +This method computes a check digit for the [arg value]. Before doing +so it is validated, except for a checkdigit. If the value does not +pass the validation no check digit is calculated and an error is +thrown instead. + +[include [vset METHODS].inc] +[list_end] + + +[section {Error Codes}] + +As said in the package description, the errors thrown by the commands +of this package in response to input validation failures use the +[cmd -errorcode] INVALID to distinguish themselves from package +internal errors. + +[para] To provide more detailed information about why the validation +failed the [cmd -errorCode] goes actually beyond that. + +First, it will contain a code detailing the type itself. Here this is +[const [vset CODE]]. This is then followed by values detailing the +reason for the failure. The full set of [cmd -errorCode]s which can +be thrown by this package are: + +[list_begin definitions] +[def "INVALID [vset CODE] CHARACTER"] + +The input value contained one or more bad characters, i.e. characters +which must not occur in the input for it to be [vset A] [vset NAME]. + +[def "INVALID [vset CODE] CHECK-DIGIT"] + +The check digit of the input value is wrong. This usually signals a +data-entry error, with digits transposed, forgotten, etc. Of course, +th input may be an outright fake too. + + +[include [vset CODES].inc] +[list_end] + +[vset CATEGORY valtype] +[include ../../doctools2base/include/feedback.inc] +[manpage_end] diff -Nru tcllib-1.13-dfsg/modules/valtype/isbn.man tcllib-1.14-dfsg/modules/valtype/isbn.man --- tcllib-1.13-dfsg/modules/valtype/isbn.man 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/isbn.man 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,13 @@ +[vset PACKAGE isbn] +[vset VERSION 1] +[vset A an] +[vset NAME ISBN] +[vset NAMEX ISBN] +[vset CODE ISBN] +[vset OK ....] +[vset BAD ....] +[vset KEYWORDS k_isbn] +[vset REQUIRE null] +[vset METHODS m_isbn] +[vset CODES c_length] +[include include/vtype.inc] diff -Nru tcllib-1.13-dfsg/modules/valtype/isbn.tcl tcllib-1.14-dfsg/modules/valtype/isbn.tcl --- tcllib-1.13-dfsg/modules/valtype/isbn.tcl 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/isbn.tcl 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,176 @@ +# # ## ### ##### ######## ############# ###################### +## Validation of ISBN numbers. +# +## ISBN-10 and -13 numbers are handled. The later are issued since +## Jan 1, 2007. ISBN-10 numbers indicate books issued before that date. +## I.e. Books after the date do not have ISBN-10 numbers any longer. +## Books with an ISBN-10 have a canconical ISBN-13 equivalent +## number. See method '13of'. + +## Note that ISBN-13 numbers are essentially EAN-13 numbers with +## country codes 'Bookland' and 'Musicland', i.e. 978 and 979. +# +# References +# http://www.augustana.ab.ca/~mohrj/algorithms/checkdigit.html +# http://en.wikipedia.org/wiki/International_Standard_Book_Number + +# # ## ### ##### ######## ############# ###################### + +# The code below implements the interface of a snit validation type, +# making it directly usable with snit's -type option in option +# specifications. + +# The result of the validation is always a proper isbn13 code, even if +# the input was isbn10. In this manner inputs are normalized to the +# canonical format. + +# # ## ### ##### ######## ############# ###################### +## Requisites + +package require Tcl 8.5 +package require snit +package require valtype::common + +# # ## ### ##### ######## ############# ###################### +## Implementation + +namespace eval ::valtype::isbn { + namespace import ::valtype::common::* +} + +snit::type ::valtype::isbn { + #------------------------------------------------------------------- + # Type Methods + + typemethod validate {value} { + if {![regexp {^[0-9]+[Xx]?$} $value]} { + badchar ISBN "ISBN number, expected only digits, and possibly 'X' or 'x' as checkdigit" + } + + switch -exact -- [string length $value] { + 10 { + set sum 0 + foreach \ + d [string map {x 10 X 10} [lreverse [split $value {}]]] \ + w {1 2 3 4 5 6 7 8 9 10} { + incr sum [expr {$d * $w}] + } + if {($sum % 11) != 0} { + badcheck ISBN "ISBN number" + } + + # Normalize isbn10 to its isbn13 equivalent. + + set n 978[string range $value 0 end-1] + return $n[$type checkdigit $n] + } + 13 { + if {![string match 978* $value] && + ![string match 979* $value]} { + badprefix ISBN {978 979} "ISBN number" + } + + set sum [Sum $value] + if {($sum % 10) != 0} { + badcheck ISBN "ISBN number" + } + } + default { + badlength ISBN {10 13} "ISBN number" + } + } + + return $value + } + + typemethod checkdigit {value} { + if {![regexp {^[0-9]+[Xx]?$} $value]} { + badchar ISBN "ISBN number (without checkdigit), expected only digits" + } + + switch -exact -- [string length $value] { + 9 { + set sum 0 + foreach \ + d [lreverse [split $value {}]] \ + w {2 3 4 5 6 7 8 9 10} { + incr sum [expr {$d * $w}] + } + + set c [expr {11 - ($sum % 11)}] + if {$c == 11} { set c 0 } + if {$c == 10} { set c X } + } + 12 { + if {![string match 978* $value] && + ![string match 979* $value]} { + badprefix ISBN {978 979} "ISBN number (without checkdigit)" + } + + set c [expr {10 - ([Sum $value] % 10)}] + if {$c == 10} { set c 0 } + } + default { + badlength ISBN {9 12} "ISBN number (without checkdigit)" + } + } + + return $c + } + + # Convert isbn10 to isbn13. + + # Note that isbn13 numbers are valid ean13 codes with 'country + # code' 978, aka 'bookland'. As space has run out the country code + # 979 'Musicland' (see ISMN) is repurposed and phased in. This + # however does not affect the conversion of isbn10 numbers, their + # equivalents are all in the 978 region. + + typemethod 13of {value} { + if {![regexp {^[0-9]+[Xx]?$} $value]} { + badchar ISBN "ISBN-10 number, expected only digits, and possibly 'X' or 'x' as checkdigit" + } elseif {[string length $value] != 10} { + badlength ISBN 10 "ISBN-10 number" + } + + # Strip the -10 check digit, prefix the remainder with the + # bookland country code and recalculate the check digit, via + # -13. + + set n 978[string range $value 0 end-1] + return $n[$type checkdigit $n] + } + + # NOTE: Same as EAN13 + proc Sum {value} { + # i| 0 1 2 3 4 5 6 7 8 9 + # *3| 0 3 6 9 12 15 18 21 24 27 + + set sum 0 + set flip 1 + foreach d [string map {x 10 X 10} [split $value {}]] { + incr sum [lindex { + {0 1 2 3 4 5 6 7 8 9 10} + {0 3 6 9 12 15 18 21 24 27 30} + } [expr {[incr flip] & 1}] $d] + } + return $sum + } + + #------------------------------------------------------------------- + # Constructor + + # None needed; no options + + #------------------------------------------------------------------- + # Public Methods + + method validate {value} { + $type validate $value + } +} + +# # ## ### ##### ######## ############# ###################### +## Ready + +package provide valtype::isbn 1 diff -Nru tcllib-1.13-dfsg/modules/valtype/isbn.test tcllib-1.14-dfsg/modules/valtype/isbn.test --- tcllib-1.13-dfsg/modules/valtype/isbn.test 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/isbn.test 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,127 @@ +# ------------------------------------------------------------------------- +# isbn.test -*- tcl -*- +# (C) 2011 Andreas Kupries. BSD licensed. +# ------------------------------------------------------------------------- + +source [file join \ + [file dirname [file dirname [file join [pwd] [info script]]]] \ + devtools testutilities.tcl] + +testsNeedTcl 8.5 +testsNeedTcltest 2.0 + +support { + use snit/snit2.tcl snit ;# snit v2 fixed, due Tcl 8.5 + useLocal valtype.tcl valtype::common +} +testing { + useLocal isbn.tcl valtype::isbn +} + +# ------------------------------------------------------------------------- + +test valtype-isbn-1.0 {isbn validation wrong\#args} -body { + valtype::isbn validate +} -returnCodes error \ + -result {wrong # args: should be "valtype::isbn validate value"} + +test valtype-isbn-1.1 {isbn validation wrong\#args} -body { + valtype::isbn validate A B +} -returnCodes error \ + -result {wrong # args: should be "valtype::isbn validate value"} + +# ------------------------------------------------------------------------- + +test valtype-isbn-2.0 {isbn validation failure, bad char} -body { + valtype::isbn validate A +} -returnCodes error \ + -result {Not an ISBN number, expected only digits, and possibly 'X' or 'x' as checkdigit} + +foreach {n in} { + 1 030640615 + 2 978030640615 +} { + test valtype-isbn-2.1.$n {isbn validation failure, bad length} -body { + valtype::isbn validate $in + } -returnCodes error \ + -result {Not an ISBN number, incorrect length, expected one of 10, or 13 characters} +} + +foreach {n in} { + 1 0306406150 + 2 978030640615x +} { + test valtype-isbn-2.2.$n {isbn validation failure, bad check} -body { + valtype::isbn validate $in + } -returnCodes error \ + -result {Not an ISBN number, the check digit is incorrect} +} + +foreach {n in} { + 1 9774444444444 +} { + test valtype-isbn-2.3.$n {isbn validation failure, bad prefix} -body { + valtype::isbn validate $in + } -returnCodes error \ + -result {Not an ISBN number, incorrect prefix, expected one of 978, or 979} +} + +test valtype-isbn-3.0 {isbn checkdigit wrong\#args} -body { + valtype::isbn checkdigit +} -returnCodes error \ + -result {wrong # args: should be "valtype::isbn checkdigit value"} + +test valtype-isbn-3.1 {isbn checkdigit wrong\#args} -body { + valtype::isbn checkdigit A B +} -returnCodes error \ + -result {wrong # args: should be "valtype::isbn checkdigit value"} + +# ------------------------------------------------------------------------- + +test valtype-isbn-5.0 {isbn checkdigit calculation failure, bad char} -body { + valtype::isbn checkdigit A +} -returnCodes error \ + -result {Not an ISBN number (without checkdigit), expected only digits} + +test valtype-isbn-5.1 {isbn checkdigit calculation failure, bad length} -body { + valtype::isbn checkdigit 01234 +} -returnCodes error \ + -result {Not an ISBN number (without checkdigit), incorrect length, expected one of 9, or 12 characters} + + +test valtype-isbn-5.2 {isbn checkdigit calculation failure, bad char} -body { + valtype::isbn checkdigit 977444444444 +} -returnCodes error \ + -result {Not an ISBN number (without checkdigit), incorrect prefix, expected one of 978, or 979} + +foreach {n in check out} { + 1 030640615 2 9780306406157 + 2 978030640615 7 9780306406157 +} { + test valtype-isbn-4.$n {isbn validation} -body { + valtype::isbn validate $in$check + } -result $out + + test valtype-isbn-6.$n {isbn checkdigit} -body { + valtype::isbn checkdigit $in + } -result $check +} + +# ------------------------------------------------------------------------- + +foreach {n in out} { + 1 0306406152 9780306406157 +} { + test valtype-isbn-7.$n {isbn transformation isbn10 to isbn13} -body { + valtype::isbn 13of $in + } -result $out +} + +# ------------------------------------------------------------------------- +testsuiteCleanup +return + +# Local Variables: +# mode: tcl +# indent-tabs-mode: nil +# End: diff -Nru tcllib-1.13-dfsg/modules/valtype/luhn5.man tcllib-1.14-dfsg/modules/valtype/luhn5.man --- tcllib-1.13-dfsg/modules/valtype/luhn5.man 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/luhn5.man 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,13 @@ +[vset PACKAGE luhn5] +[vset VERSION 1] +[vset A a] +[vset NAME {plain number with a LUHN5 checkdigit}] +[vset NAMEX {luhn5 checkdigit}] +[vset CODE LUHN5] +[vset OK ....] +[vset BAD ....] +[vset KEYWORDS k_luhn5] +[vset REQUIRE null] +[vset METHODS null] +[vset CODES null] +[include include/vtype.inc] diff -Nru tcllib-1.13-dfsg/modules/valtype/luhn5.tcl tcllib-1.14-dfsg/modules/valtype/luhn5.tcl --- tcllib-1.13-dfsg/modules/valtype/luhn5.tcl 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/luhn5.tcl 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,140 @@ +# # ## ### ##### ######## ############# ###################### +## Luhn test of numbers - 10+5 variant +## From Rosetta Code +## http://rosettacode.org/wiki/Luhn_test#Tcl +## Author Donal K. Fellows +## See also +## http://en.wikipedia.org/wiki/Luhn_algorithm +## ISO/IEC 7812-1 +## http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=39698 +## US Patent 2,950,048 (Aug 23, 1960): expired. +## http://www.google.com/patents?q=2950048 +## Public Domain. +# +# The 10+5 variant of the Luhn test is used by some credit card +# companies to distinguish valid credit card numbers from what could +# be a random selection of digits. +# +# Those companies using credit card numbers that can be validated by +# the Luhn test have numbers that pass the following test: +## +# 1. Reverse the order of the digits in the number. +# +# 2. Take the first, third, ... and every other odd digit in the +# reversed digits and sum them to form the partial sum s1 +# +# 3. Taking the second, fourth ... and every other even digit in the +# reversed digits: +# +# a. Multiply each digit by two and sum the digits if the answer +# is greater than nine to form partial sums for the even digits +# b. Sum the partial sums of the even digits to form s2 +# +# Note that the steps above induce a simple permutation on digits +# 0-9 which can be handled through a lookup table instead of doing +# the doubling and summing explicitly. +# +# 4. If s1 + s2 ends in zero or five then the original number is in +# the form of a valid credit card number as verified by the Luhn test. + +# 3.a/3.b lookup table +# i|0 1 2 3 4 5 6 7 8 9 +# *2|0 2 4 6 8 10 12 14 16 18 +# sum|0 2 4 6 8 1 3 5 7 9 (butterfly) + +# # ## ### ##### ######## ############# ###################### + +# The code below implements the interface of a snit validation type, +# making it directly usable with snit's -type option in option +# specifications. + +# # ## ### ##### ######## ############# ###################### +## Requisites + +package require Tcl 8.5 +package require snit +package require valtype::common + +# # ## ### ##### ######## ############# ###################### +## Implementation + +namespace eval ::valtype::luhn5 { + namespace import ::valtype::common::* +} + +snit::type ::valtype::luhn5 { + #------------------------------------------------------------------- + # Type Methods + + typemethod validate {value {code LUHN5}} { + if {[regexp {[^0-9]} $value]} { + badchar $code "$code number, expected only digits" + } + + # Luhn test. + + set sum [Sum $value 1] + if {($sum % 10) ni {0 5}} { + badcheck $code "$code number" + } + return $value + } + + typemethod checkdigit0 {value {code LUHN5}} { + if {[regexp {[^0-9]} $value]} { + badchar LUHN "$code number, expected only digits" + } + + # Compute the luhn5 checkdigit 0 % 10. + + set c [expr {10 - ([Sum $value 0] % 10)}] + if {$c == 10} { set c 0 } + return $c + } + + typemethod checkdigit5 {value {code LUHN5}} { + if {[regexp {[^0-9]} $value]} { + badchar LUHN "$code number, expected only digits" + } + + # Compute the luhn5 checkdigit 5 % 10 (the alternate). + set c [expr {10 - (([Sum $value 0] + 5) % 10)}] + if {$c == 10} { set c 0 } + return $c + } + + proc Sum {value flip} { + # Check digit computation starts with flip == 0! + # + # In the validation (see above) the check-digit is the last + # digit, and flip initialized to 1. The next-to-last digit is + # our last here and processed with the bit flipped. Hence our + # different, pre-flipped, starting point. + + set sum 0 + foreach ch [lreverse [split $value {}]] { + incr sum [lindex { + {0 1 2 3 4 5 6 7 8 9} + {0 2 4 6 8 1 3 5 7 9} + } [expr {[incr flip] & 1}] $ch] + } + return $sum + } + + #------------------------------------------------------------------- + # Constructor + + # None needed; no options + + #------------------------------------------------------------------- + # Public Methods + + method validate {value} { + $type validate $value + } +} + +# # ## ### ##### ######## ############# ###################### +## Ready + +package provide valtype::luhn5 1 diff -Nru tcllib-1.13-dfsg/modules/valtype/luhn5.test tcllib-1.14-dfsg/modules/valtype/luhn5.test --- tcllib-1.13-dfsg/modules/valtype/luhn5.test 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/luhn5.test 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,115 @@ +# ------------------------------------------------------------------------- +# luhn5.test -*- tcl -*- +# (C) 2011 Andreas Kupries. BSD licensed. +# ------------------------------------------------------------------------- + +source [file join \ + [file dirname [file dirname [file join [pwd] [info script]]]] \ + devtools testutilities.tcl] + +testsNeedTcl 8.5 +testsNeedTcltest 2.0 + +support { + use snit/snit2.tcl snit ;# snit v2 fixed, due Tcl 8.5 + useLocal valtype.tcl valtype::common +} +testing { + useLocal luhn5.tcl valtype::luhn5 +} + +# ------------------------------------------------------------------------- + +test valtype-luhn5-1.0 {luhn5 validation wrong\#args} -body { + valtype::luhn5 validate +} -returnCodes error \ + -result {wrong # args: should be "valtype::luhn5 validate value ?code?"} + +test valtype-luhn5-1.1 {luhn5 validation wrong\#args} -body { + valtype::luhn5 validate A B C +} -returnCodes error \ + -result {wrong # args: should be "valtype::luhn5 validate value ?code?"} + +# ------------------------------------------------------------------------- + +test valtype-luhn5-2.0 {luhn5 validation failure, bad char} -body { + valtype::luhn5 validate A +} -returnCodes error \ + -result {Not a LUHN5 number, expected only digits} + +foreach {n in} { + 1 49999999 + 2 37 + 3 49927398717 + 4 1234567812345678 +} { + test valtype-luhn5-2.1.$n {luhn5 validation failure, bad check} -body { + valtype::luhn5 validate $in + } -returnCodes error \ + -result {Not a LUHN5 number, the check digit is incorrect} +} + +test valtype-luhn5-3.0 {luhn5 checkdigit wrong\#args} -body { + valtype::luhn5 checkdigit0 +} -returnCodes error \ + -result {wrong # args: should be "valtype::luhn5 checkdigit0 value ?code?"} + +test valtype-luhn5-3.1 {luhn5 checkdigit wrong\#args} -body { + valtype::luhn5 checkdigit0 A B C +} -returnCodes error \ + -result {wrong # args: should be "valtype::luhn5 checkdigit0 value ?code?"} + +test valtype-luhn5-3.2 {luhn5 checkdigit wrong\#args} -body { + valtype::luhn5 checkdigit5 +} -returnCodes error \ + -result {wrong # args: should be "valtype::luhn5 checkdigit5 value ?code?"} + +test valtype-luhn5-3.3 {luhn5 checkdigit wrong\#args} -body { + valtype::luhn5 checkdigit5 A B C +} -returnCodes error \ + -result {wrong # args: should be "valtype::luhn5 checkdigit5 value ?code?"} + +# ------------------------------------------------------------------------- + +test valtype-luhn5-5.0 {luhn5 checkdigit calculation failure, bad char} -body { + valtype::luhn5 checkdigit0 A +} -returnCodes error \ + -result {Not a LUHN5 number, expected only digits} + +test valtype-luhn5-5.1 {luhn5 checkdigit calculation failure, bad char} -body { + valtype::luhn5 checkdigit5 A +} -returnCodes error \ + -result {Not a LUHN5 number, expected only digits} + +foreach {n in check0 check5} { + 1 4999999 8 3 + 2 3 4 9 + 3 35 6 1 + 4 4992739871 6 1 + 5 123456781234567 0 5 +} { + test valtype-luhn5-4.$n.10 {luhn5 validation 0 % 10} -body { + valtype::luhn5 validate $in$check0 + } -result $in$check0 + + test valtype-luhn5-4.$n.5 {luhn5 validation 5 % 10} -body { + valtype::luhn5 validate $in$check5 + } -result $in$check5 + + test valtype-luhn5-6.$n.10 {luhn5 checkdigit 0 % 10} -body { + valtype::luhn5 checkdigit0 $in + } -result $check0 + + test valtype-luhn5-6.$n.5 {luhn5 checkdigit 5 % 10} -body { + valtype::luhn5 checkdigit5 $in + } -result $check5 +} + +# ------------------------------------------------------------------------- +testsuiteCleanup +return + +# Local Variables: +# mode: tcl +# indent-tabs-mode: nil +# End: diff -Nru tcllib-1.13-dfsg/modules/valtype/luhn.man tcllib-1.14-dfsg/modules/valtype/luhn.man --- tcllib-1.13-dfsg/modules/valtype/luhn.man 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/luhn.man 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,13 @@ +[vset PACKAGE luhn] +[vset VERSION 1] +[vset A a] +[vset NAME {plain number with a LUHN checkdigit}] +[vset NAMEX {luhn checkdigit}] +[vset CODE LUHN] +[vset OK ....] +[vset BAD ....] +[vset KEYWORDS k_luhn] +[vset REQUIRE null] +[vset METHODS null] +[vset CODES null] +[include include/vtype.inc] diff -Nru tcllib-1.13-dfsg/modules/valtype/luhn.tcl tcllib-1.14-dfsg/modules/valtype/luhn.tcl --- tcllib-1.13-dfsg/modules/valtype/luhn.tcl 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/luhn.tcl 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,128 @@ +# # ## ### ##### ######## ############# ###################### +## Luhn test of numbers +## From Rosetta Code +## http://rosettacode.org/wiki/Luhn_test#Tcl +## Author Donal K. Fellows +## See also +## http://en.wikipedia.org/wiki/Luhn_algorithm +## ISO/IEC 7812-1 +## http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=39698 +## US Patent 2,950,048 (Aug 23, 1960): expired. +## http://www.google.com/patents?q=2950048 +## Public Domain. +# +# The Luhn test is used by some credit card companies to distinguish +# valid credit card numbers from what could be a random selection of +# digits. +# +# Those companies using credit card numbers that can be validated by +# the Luhn test have numbers that pass the following test: +## +# 1. Reverse the order of the digits in the number. +# +# 2. Take the first, third, ... and every other odd digit in the +# reversed digits and sum them to form the partial sum s1 +# +# 3. Taking the second, fourth ... and every other even digit in the +# reversed digits: +# +# a. Multiply each digit by two and sum the digits if the answer +# is greater than nine to form partial sums for the even digits +# b. Sum the partial sums of the even digits to form s2 +# +# Note that the steps above induce a simple permutation on digits +# 0-9 which can be handled through a lookup table instead of doing +# the doubling and summing explicitly. +# +# 4. If s1 + s2 ends in zero then the original number is in the form +# of a valid credit card number as verified by the Luhn test. + +# 3.a/3.b lookup table +# i|0 1 2 3 4 5 6 7 8 9 +# *2|0 2 4 6 8 10 12 14 16 18 +# sum|0 2 4 6 8 1 3 5 7 9 (butterfly) + +# # ## ### ##### ######## ############# ###################### + +# The code below implements the interface of a snit validation type, +# making it directly usable with snit's -type option in option +# specifications. + +# # ## ### ##### ######## ############# ###################### +## Requisites + +package require Tcl 8.5 +package require snit +package require valtype::common + +# # ## ### ##### ######## ############# ###################### +## Implementation + +namespace eval ::valtype::luhn { + namespace import ::valtype::common::* +} + +snit::type ::valtype::luhn { + #------------------------------------------------------------------- + # Type Methods + + typemethod validate {value {code LUHN}} { + if {[regexp {[^0-9]} $value]} { + badchar $code "$code number, expected only digits" + } + + # Luhn test. 8.5 required for lreverse. + + set sum [Sum $value 1] + if {($sum % 10) != 0} { + badcheck $code "$code number" + } + return $value + } + + typemethod checkdigit {value {code LUHN}} { + if {[regexp {[^0-9]} $value]} { + badchar LUHN "$code number, expected only digits" + } + + set c [expr {10 - ([Sum $value 0] % 10)}] + if {$c == 10} { set c 0 } + return $c + } + + proc Sum {value flip} { + # 8.5 required for lreverse. + # Check digit computation starts with flip == 0! + # + # In the validation (see above) the check-digit is the last + # digit, and flip initialized to 1. The next-to-last digit is + # our last here and processed with the bit flipped. Hence our + # different, pre-flipped, starting point. + + set sum 0 + foreach ch [lreverse [split $value {}]] { + incr sum [lindex { + {0 1 2 3 4 5 6 7 8 9} + {0 2 4 6 8 1 3 5 7 9} + } [expr {[incr flip] & 1}] $ch] + } + return $sum + } + + #------------------------------------------------------------------- + # Constructor + + # None needed; no options + + #------------------------------------------------------------------- + # Public Methods + + method validate {value} { + $type validate $value + } +} + +# # ## ### ##### ######## ############# ###################### +## Ready + +package provide valtype::luhn 1 diff -Nru tcllib-1.13-dfsg/modules/valtype/luhn.test tcllib-1.14-dfsg/modules/valtype/luhn.test --- tcllib-1.13-dfsg/modules/valtype/luhn.test 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/luhn.test 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,92 @@ +# ------------------------------------------------------------------------- +# luhn.test -*- tcl -*- +# (C) 2011 Andreas Kupries. BSD licensed. +# ------------------------------------------------------------------------- + +source [file join \ + [file dirname [file dirname [file join [pwd] [info script]]]] \ + devtools testutilities.tcl] + +testsNeedTcl 8.5 +testsNeedTcltest 2.0 + +support { + use snit/snit2.tcl snit ;# snit v2 fixed, due Tcl 8.5 + useLocal valtype.tcl valtype::common +} +testing { + useLocal luhn.tcl valtype::luhn +} + +# ------------------------------------------------------------------------- + +test valtype-luhn-1.0 {luhn validation wrong\#args} -body { + valtype::luhn validate +} -returnCodes error \ + -result {wrong # args: should be "valtype::luhn validate value ?code?"} + +test valtype-luhn-1.1 {luhn validation wrong\#args} -body { + valtype::luhn validate A B C +} -returnCodes error \ + -result {wrong # args: should be "valtype::luhn validate value ?code?"} + +# ------------------------------------------------------------------------- + +test valtype-luhn-2.0 {luhn validation failure, bad char} -body { + valtype::luhn validate A +} -returnCodes error \ + -result {Not a LUHN number, expected only digits} + +foreach {n in} { + 1 49999999 + 2 37 + 3 49927398717 + 4 1234567812345678 +} { + test valtype-luhn-2.1.$n {luhn validation failure, bad check} -body { + valtype::luhn validate $in + } -returnCodes error \ + -result {Not a LUHN number, the check digit is incorrect} +} + +test valtype-luhn-3.0 {luhn checkdigit wrong\#args} -body { + valtype::luhn checkdigit +} -returnCodes error \ + -result {wrong # args: should be "valtype::luhn checkdigit value ?code?"} + +test valtype-luhn-3.1 {luhn checkdigit wrong\#args} -body { + valtype::luhn checkdigit A B C +} -returnCodes error \ + -result {wrong # args: should be "valtype::luhn checkdigit value ?code?"} + +# ------------------------------------------------------------------------- + +test valtype-luhn-5.0 {luhn checkdigit calculation failure, bad char} -body { + valtype::luhn checkdigit A +} -returnCodes error \ + -result {Not a LUHN number, expected only digits} + +foreach {n in check} { + 1 4999999 8 + 2 3 4 + 3 35 6 + 4 4992739871 6 + 5 123456781234567 0 +} { + test valtype-luhn-4.$n {luhn validation} -body { + valtype::luhn validate $in$check + } -result $in$check + + test valtype-luhn-6.$n {luhn checkdigit} -body { + valtype::luhn checkdigit $in + } -result $check +} + +# ------------------------------------------------------------------------- +testsuiteCleanup +return + +# Local Variables: +# mode: tcl +# indent-tabs-mode: nil +# End: diff -Nru tcllib-1.13-dfsg/modules/valtype/pkgIndex.tcl tcllib-1.14-dfsg/modules/valtype/pkgIndex.tcl --- tcllib-1.13-dfsg/modules/valtype/pkgIndex.tcl 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/pkgIndex.tcl 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,13 @@ +package ifneeded valtype::common 1 [list source [file join $dir valtype.tcl]] +package ifneeded valtype::creditcard::amex 1 [list source [file join $dir cc_amex.tcl]] +package ifneeded valtype::creditcard::discover 1 [list source [file join $dir cc_discover.tcl]] +package ifneeded valtype::creditcard::mastercard 1 [list source [file join $dir cc_mastercard.tcl]] +package ifneeded valtype::creditcard::visa 1 [list source [file join $dir cc_visa.tcl]] +package ifneeded valtype::gs1::ean13 1 [list source [file join $dir ean13.tcl]] +package ifneeded valtype::imei 1 [list source [file join $dir imei.tcl]] +package ifneeded valtype::isbn 1 [list source [file join $dir isbn.tcl]] +package ifneeded valtype::luhn 1 [list source [file join $dir luhn.tcl]] +package ifneeded valtype::luhn5 1 [list source [file join $dir luhn5.tcl]] +package ifneeded valtype::usnpi 1 [list source [file join $dir usnpi.tcl]] +package ifneeded valtype::verhoeff 1 [list source [file join $dir verhoeff.tcl]] +package ifneeded valtype::iban 1 [list source [file join $dir iban.tcl]] diff -Nru tcllib-1.13-dfsg/modules/valtype/usnpi.man tcllib-1.14-dfsg/modules/valtype/usnpi.man --- tcllib-1.13-dfsg/modules/valtype/usnpi.man 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/usnpi.man 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,13 @@ +[vset PACKAGE usnpi] +[vset VERSION 1] +[vset A an] +[vset NAME USNPI] +[vset NAMEX {US National Provider Identifier (US-NPI) number}] +[vset CODE USNPI] +[vset OK ....] +[vset BAD ....] +[vset KEYWORDS k_usnpi] +[vset REQUIRE r_luhn] +[vset METHODS null] +[vset CODES c_length] +[include include/vtype.inc] diff -Nru tcllib-1.13-dfsg/modules/valtype/usnpi.tcl tcllib-1.14-dfsg/modules/valtype/usnpi.tcl --- tcllib-1.13-dfsg/modules/valtype/usnpi.tcl 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/usnpi.tcl 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,65 @@ +# # ## ### ##### ######## ############# ###################### +## US NPI (National Provider Identifier) for Medicare services. +## Reference +## http://en.wikipedia.org/wiki/National_Provider_Identifier +## Short notes +## 10-digit number. No embedded information. +## Passes Luhn test when prefixed with '80480'. + +# # ## ### ##### ######## ############# ###################### + +# The code below implements the interface of a snit validation type, +# making it directly usable with snit's -type option in option +# specifications. + +# # ## ### ##### ######## ############# ###################### +## Requisites + +package require Tcl 8.5 +package require snit +package require valtype::luhn +package require valtype::common + +# # ## ### ##### ######## ############# ###################### +## Implementation + +namespace eval ::valtype::usnpi { + namespace import ::valtype::common::* +} + +snit::type ::valtype::usnpi { + #------------------------------------------------------------------- + # Type Methods + + typemethod validate {value} { + if {[string length $value] != 10} { + badlength US-NPI 10 "US-NPI number" + } + valtype::luhn validate 80480$value US-NPI + return $value + } + + typemethod checkdigit {value} { + if {[string length $value] != 9} { + badlength US-NPI 9 "US-NPI number (without checkdigit)" + } + return [valtype::luhn checkdigit 80480$value US-NPI] + } + + #------------------------------------------------------------------- + # Constructor + + # None needed; no options + + #------------------------------------------------------------------- + # Public Methods + + method validate {value} { + $type validate $value + } +} + +# # ## ### ##### ######## ############# ###################### +## Ready + +package provide valtype::usnpi 1 diff -Nru tcllib-1.13-dfsg/modules/valtype/usnpi.test tcllib-1.14-dfsg/modules/valtype/usnpi.test --- tcllib-1.13-dfsg/modules/valtype/usnpi.test 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/usnpi.test 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,102 @@ +# ------------------------------------------------------------------------- +# usnpi.test -*- tcl -*- +# (C) 2011 Andreas Kupries. BSD licensed. +# ------------------------------------------------------------------------- + +source [file join \ + [file dirname [file dirname [file join [pwd] [info script]]]] \ + devtools testutilities.tcl] + +testsNeedTcl 8.5 +testsNeedTcltest 2.0 + +support { + use snit/snit2.tcl snit ;# snit v2 fixed, due Tcl 8.5 + useLocal valtype.tcl valtype::common + useLocal luhn.tcl valtype::luhn +} +testing { + useLocal usnpi.tcl valtype::usnpi +} + +# ------------------------------------------------------------------------- + +test valtype-usnpi-1.0 {usnpi validation wrong\#args} -body { + valtype::usnpi validate +} -returnCodes error \ + -result {wrong # args: should be "valtype::usnpi validate value"} + +test valtype-usnpi-1.1 {usnpi validation wrong\#args} -body { + valtype::usnpi validate A B +} -returnCodes error \ + -result {wrong # args: should be "valtype::usnpi validate value"} + +# ------------------------------------------------------------------------- + +test valtype-usnpi-2.0 {usnpi validation failure, bad char} -body { + valtype::usnpi validate A000000000 +} -returnCodes error \ + -result {Not an US-NPI number, expected only digits} + +test valtype-usnpi-2.1 {usnpi validation failure, bad char} -body { + valtype::usnpi validate 32 +} -returnCodes error \ + -result {Not an US-NPI number, incorrect length, expected 10 characters} + +foreach {n in} { + 1 4999999932 + 2 3747589238 + 3 4992739871 + 4 0123456789 +} { + test valtype-usnpi-2.2.$n {usnpi validation failure, bad check} -body { + valtype::usnpi validate $in + } -returnCodes error \ + -result {Not an US-NPI number, the check digit is incorrect} +} + +test valtype-usnpi-3.0 {usnpi checkdigit wrong\#args} -body { + valtype::usnpi checkdigit +} -returnCodes error \ + -result {wrong # args: should be "valtype::usnpi checkdigit value"} + +test valtype-usnpi-3.1 {usnpi checkdigit wrong\#args} -body { + valtype::usnpi checkdigit A B +} -returnCodes error \ + -result {wrong # args: should be "valtype::usnpi checkdigit value"} + +# ------------------------------------------------------------------------- + +test valtype-usnpi-5.0 {usnpi checkdigit calculation failure, bad char} -body { + valtype::usnpi checkdigit A00000000 +} -returnCodes error \ + -result {Not an US-NPI number, expected only digits} + +test valtype-usnpi-5.1 {usnpi validation failure, bad char} -body { + valtype::usnpi checkdigit 32 +} -returnCodes error \ + -result {Not an US-NPI number (without checkdigit), incorrect length, expected 9 characters} + +foreach {n in check} { + 1 499999993 4 + 2 374758923 7 + 3 499273987 3 + 4 012345678 3 +} { + test valtype-usnpi-4.$n {usnpi validation} -body { + valtype::usnpi validate $in$check + } -result $in$check + + test valtype-usnpi-6.$n {usnpi checkdigit} -body { + valtype::usnpi checkdigit $in + } -result $check +} + +# ------------------------------------------------------------------------- +testsuiteCleanup +return + +# Local Variables: +# mode: tcl +# indent-tabs-mode: nil +# End: diff -Nru tcllib-1.13-dfsg/modules/valtype/valtype_common.man tcllib-1.14-dfsg/modules/valtype/valtype_common.man --- tcllib-1.13-dfsg/modules/valtype/valtype_common.man 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/valtype_common.man 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,108 @@ +[comment {-*- tcl -*- --- !doctools ---}] +[manpage_begin valtype::common n 1] +[copyright {2011 Andreas Kupries }] +[titledesc "Validation, common code"] +[moddesc {Validation types}] +[category {Validation, Type checking}] +[keywords Validation Checking Testing {Type checking}] +[keywords {Value checking} isA] +[require Tcl 8.5] +[require valtype::common [opt 1]] +[description] + +This package implements a number of common commands used by the +validation types in this module. These commands essentially +encapsulate the throwing of validation errors, ensuring that a proper +[cmd -errorcode] is used. See section [sectref {Error Codes}]. + +[section API] + +[list_begin definitions] +[comment {==================================================================}] +[call [cmd valtype::common::reject] [arg code] [arg text]] + +The core command of this package it throws an [const INVALID] error +with the specified [arg text]. The first argument is a list of codes +extending the [const INVALID] with detail information. + +[comment {==================================================================}] +[call [cmd valtype::common::badchar] [arg code] [opt [arg text]]] + +This command throws an [const {INVALID CHAR}] error with the specified +[arg text]. The first argument is a list of codes providing +details. These are inserted between the codes [const INVALID] and +[const CHARACTER]. + +[comment {==================================================================}] +[call [cmd valtype::common::badcheck] [arg code] [opt [arg text]]] + +This command throws an [const {INVALID CHECK-DIGIT}] error with the +specified [arg text], if any, extended by the standard text "the check +digit is incorrect". The first argument is a list of codes providing +details. These are inserted between the codes [const INVALID] and +[const CHECK_DIGIT]. + +[comment {==================================================================}] +[call [cmd valtype::common::badlength] [arg code] [arg lengths] [opt [arg text]]] + +This command throws an [const {INVALID LENGTH}] error with the +specified [arg text], if any, extended by the standard text "incorrect +length, expected ... character(s)". The first argument is a list of +codes providing details. + +These are inserted between the codes [const INVALID] and +[const LENGTH]. The argument [arg lengths] is a list of the input +lengths which had been expected, i.e. these are the valid lengths. + +[comment {==================================================================}] +[call [cmd valtype::common::badprefix] [arg code] [arg prefixes] [opt [arg text]]] + +This command throws an [const {INVALID PREFIX}] error with the +specified [arg text], if any, extended by the standard text "incorrect +prefix, expected ...". The first argument is a list of codes providing +details. + +These are inserted between the codes [const INVALID] and +[const PREFIX]. The argument [arg prefixes] is a list of the input +prefixes which had been expected, i.e. these are the valid prefixes. + +[list_end] + +[section {Error Codes}] + +The errors thrown by the commands of this package all use the +[cmd -errorcode] [const INVALID] to distinguish the input validation +failures they represent from package internal errors. + +[para] To provide more detailed information about why the validation +failed the [cmd -errorCode] goes actually beyond that. + +First, it will contain a code detailing the type itself. This is +supplied by the caller. This is then followed by values detailing the +reason for the failure. The full set of [cmd -errorCode]s which can be +thrown by this package are shown below, with [const <>] a placeholder +for both the caller-supplied type-information, the type description. + +[vset CODE [const <>]] +[vset A a] +[vset NAME [const <>]] +[list_begin definitions] +[def "INVALID [vset CODE] CHARACTER"] + +The input value contained one or more bad characters, i.e. characters +which must not occur in the input for it to be [vset A] [vset NAME]. + +[def "INVALID [vset CODE] CHECK-DIGIT"] + +The check digit of the input value is wrong. This usually signals a +data-entry error, with digits transposed, forgotten, etc. Of course, +th input may be an outright fake too. + + +[include include/c_lenpfx.inc] +[list_end] + + +[vset CATEGORY valtype] +[include ../doctools2base/include/feedback.inc] +[manpage_end] diff -Nru tcllib-1.13-dfsg/modules/valtype/valtype_common.pcx tcllib-1.14-dfsg/modules/valtype/valtype_common.pcx --- tcllib-1.13-dfsg/modules/valtype/valtype_common.pcx 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/valtype_common.pcx 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,44 @@ +# -*- tcl -*- +# Syntax of the commands provided by package valtype::common. +# +# For use by TclDevKit's static syntax checker (v4.1+). +# See http://www.activestate.com/solutions/tcl/ +# See http://aspn.activestate.com/ASPN/docs/Tcl_Dev_Kit/4.0/Checker.html#pcx_api +# for the specification of the format of the code in this file. +# + +package require pcx +pcx::register valtype::common +pcx::tcldep 1 needs tcl 8.5 + +pcx::check 1 std ::valtype::common::reject \ + {checkSimpleArgs 2 2 { + checkList + checkWord + }} +pcx::check 1 std ::valtype::common::badchar \ + {checkSimpleArgs 1 2 { + checkList + checkWord + }} +pcx::check 1 std ::valtype::common::badcheck \ + {checkSimpleArgs 1 2 { + checkList + checkWord + }} +pcx::check 1 std ::valtype::common::badlength \ + {checkSimpleArgs 2 3 { + checkList + checkList + checkWord + }} +pcx::check 1 std ::valtype::common::badprefix \ + {checkSimpleArgs 2 3 { + checkList + checkList + checkWord + }} + +# Initialization via pcx::init. +# Use a ::XXX::init procedure for non-standard initialization. +pcx::complete diff -Nru tcllib-1.13-dfsg/modules/valtype/valtype_creditcard_amex.pcx tcllib-1.14-dfsg/modules/valtype/valtype_creditcard_amex.pcx --- tcllib-1.13-dfsg/modules/valtype/valtype_creditcard_amex.pcx 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/valtype_creditcard_amex.pcx 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,27 @@ +# -*- tcl -*- +# Syntax of the commands provided by package valtype::creditcard::amex. +# +# For use by TclDevKit's static syntax checker (v4.1+). +# See http://www.activestate.com/solutions/tcl/ +# See http://aspn.activestate.com/ASPN/docs/Tcl_Dev_Kit/4.0/Checker.html#pcx_api +# for the specification of the format of the code in this file. +# + +package require pcx +pcx::register valtype::creditcard::amex +pcx::tcldep 1 needs tcl 8.5 + +pcx::check 1 std ::valtype::creditcard::amex \ + {checkSimpleArgs 1 -1 { + {checkOption { + {validate {checkSimpleArgs 1 1 { + checkWord + }}} + {checkdigit {checkSimpleArgs 1 1 { + checkWord + }}} + } {}}}} + +# Initialization via pcx::init. +# Use a ::XXX::init procedure for non-standard initialization. +pcx::complete diff -Nru tcllib-1.13-dfsg/modules/valtype/valtype_creditcard_discover.pcx tcllib-1.14-dfsg/modules/valtype/valtype_creditcard_discover.pcx --- tcllib-1.13-dfsg/modules/valtype/valtype_creditcard_discover.pcx 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/valtype_creditcard_discover.pcx 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,27 @@ +# -*- tcl -*- +# Syntax of the commands provided by package valtype::creditcard::discover. +# +# For use by TclDevKit's static syntax checker (v4.1+). +# See http://www.activestate.com/solutions/tcl/ +# See http://aspn.activestate.com/ASPN/docs/Tcl_Dev_Kit/4.0/Checker.html#pcx_api +# for the specification of the format of the code in this file. +# + +package require pcx +pcx::register valtype::creditcard::discover +pcx::tcldep 1 needs tcl 8.5 + +pcx::check 1 std ::valtype::creditcard::discover \ + {checkSimpleArgs 1 -1 { + {checkOption { + {validate {checkSimpleArgs 1 1 { + checkWord + }}} + {checkdigit {checkSimpleArgs 1 1 { + checkWord + }}} + } {}}}} + +# Initialization via pcx::init. +# Use a ::XXX::init procedure for non-standard initialization. +pcx::complete diff -Nru tcllib-1.13-dfsg/modules/valtype/valtype_creditcard_mastercard.pcx tcllib-1.14-dfsg/modules/valtype/valtype_creditcard_mastercard.pcx --- tcllib-1.13-dfsg/modules/valtype/valtype_creditcard_mastercard.pcx 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/valtype_creditcard_mastercard.pcx 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,27 @@ +# -*- tcl -*- +# Syntax of the commands provided by package valtype::creditcard::mastercard. +# +# For use by TclDevKit's static syntax checker (v4.1+). +# See http://www.activestate.com/solutions/tcl/ +# See http://aspn.activestate.com/ASPN/docs/Tcl_Dev_Kit/4.0/Checker.html#pcx_api +# for the specification of the format of the code in this file. +# + +package require pcx +pcx::register valtype::creditcard::mastercard +pcx::tcldep 1 needs tcl 8.5 + +pcx::check 1 std ::valtype::creditcard::mastercard \ + {checkSimpleArgs 1 -1 { + {checkOption { + {validate {checkSimpleArgs 1 1 { + checkWord + }}} + {checkdigit {checkSimpleArgs 1 1 { + checkWord + }}} + } {}}}} + +# Initialization via pcx::init. +# Use a ::XXX::init procedure for non-standard initialization. +pcx::complete diff -Nru tcllib-1.13-dfsg/modules/valtype/valtype_creditcard_visa.pcx tcllib-1.14-dfsg/modules/valtype/valtype_creditcard_visa.pcx --- tcllib-1.13-dfsg/modules/valtype/valtype_creditcard_visa.pcx 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/valtype_creditcard_visa.pcx 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,27 @@ +# -*- tcl -*- +# Syntax of the commands provided by package valtype::creditcard::visa. +# +# For use by TclDevKit's static syntax checker (v4.1+). +# See http://www.activestate.com/solutions/tcl/ +# See http://aspn.activestate.com/ASPN/docs/Tcl_Dev_Kit/4.0/Checker.html#pcx_api +# for the specification of the format of the code in this file. +# + +package require pcx +pcx::register valtype::creditcard::visa +pcx::tcldep 1 needs tcl 8.5 + +pcx::check 1 std ::valtype::creditcard::visa \ + {checkSimpleArgs 1 -1 { + {checkOption { + {validate {checkSimpleArgs 1 1 { + checkWord + }}} + {checkdigit {checkSimpleArgs 1 1 { + checkWord + }}} + } {}}}} + +# Initialization via pcx::init. +# Use a ::XXX::init procedure for non-standard initialization. +pcx::complete diff -Nru tcllib-1.13-dfsg/modules/valtype/valtype_gs1_ean13.pcx tcllib-1.14-dfsg/modules/valtype/valtype_gs1_ean13.pcx --- tcllib-1.13-dfsg/modules/valtype/valtype_gs1_ean13.pcx 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/valtype_gs1_ean13.pcx 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,27 @@ +# -*- tcl -*- +# Syntax of the commands provided by package valtype::gs1::ean13. +# +# For use by TclDevKit's static syntax checker (v4.1+). +# See http://www.activestate.com/solutions/tcl/ +# See http://aspn.activestate.com/ASPN/docs/Tcl_Dev_Kit/4.0/Checker.html#pcx_api +# for the specification of the format of the code in this file. +# + +package require pcx +pcx::register valtype::gs1::ean13 +pcx::tcldep 1 needs tcl 8.5 + +pcx::check 1 std ::valtype::gs1::ean13 \ + {checkSimpleArgs 1 -1 { + {checkOption { + {validate {checkSimpleArgs 1 1 { + checkWord + }}} + {checkdigit {checkSimpleArgs 1 1 { + checkWord + }}} + } {}}}} + +# Initialization via pcx::init. +# Use a ::XXX::init procedure for non-standard initialization. +pcx::complete diff -Nru tcllib-1.13-dfsg/modules/valtype/valtype_imei.pcx tcllib-1.14-dfsg/modules/valtype/valtype_imei.pcx --- tcllib-1.13-dfsg/modules/valtype/valtype_imei.pcx 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/valtype_imei.pcx 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,27 @@ +# -*- tcl -*- +# Syntax of the commands provided by package valtype::imei. +# +# For use by TclDevKit's static syntax checker (v4.1+). +# See http://www.activestate.com/solutions/tcl/ +# See http://aspn.activestate.com/ASPN/docs/Tcl_Dev_Kit/4.0/Checker.html#pcx_api +# for the specification of the format of the code in this file. +# + +package require pcx +pcx::register valtype::imei +pcx::tcldep 1 needs tcl 8.5 + +pcx::check 1 std ::valtype::imei \ + {checkSimpleArgs 1 -1 { + {checkOption { + {validate {checkSimpleArgs 1 1 { + checkWord + }}} + {checkdigit {checkSimpleArgs 1 1 { + checkWord + }}} + } {}}}} + +# Initialization via pcx::init. +# Use a ::XXX::init procedure for non-standard initialization. +pcx::complete diff -Nru tcllib-1.13-dfsg/modules/valtype/valtype_isbn.pcx tcllib-1.14-dfsg/modules/valtype/valtype_isbn.pcx --- tcllib-1.13-dfsg/modules/valtype/valtype_isbn.pcx 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/valtype_isbn.pcx 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,30 @@ +# -*- tcl -*- +# Syntax of the commands provided by package valtype::isbn. +# +# For use by TclDevKit's static syntax checker (v4.1+). +# See http://www.activestate.com/solutions/tcl/ +# See http://aspn.activestate.com/ASPN/docs/Tcl_Dev_Kit/4.0/Checker.html#pcx_api +# for the specification of the format of the code in this file. +# + +package require pcx +pcx::register valtype::isbn +pcx::tcldep 1 needs tcl 8.5 + +pcx::check 1 std ::valtype::isbn \ + {checkSimpleArgs 1 -1 { + {checkOption { + {validate {checkSimpleArgs 1 1 { + checkWord + }}} + {checkdigit {checkSimpleArgs 1 1 { + checkWord + }}} + {13of {checkSimpleArgs 1 1 { + checkWord + }}} + } {}}}} + +# Initialization via pcx::init. +# Use a ::XXX::init procedure for non-standard initialization. +pcx::complete diff -Nru tcllib-1.13-dfsg/modules/valtype/valtype_luhn5.pcx tcllib-1.14-dfsg/modules/valtype/valtype_luhn5.pcx --- tcllib-1.13-dfsg/modules/valtype/valtype_luhn5.pcx 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/valtype_luhn5.pcx 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,29 @@ +# -*- tcl -*- +# Syntax of the commands provided by package valtype::luhn5. +# +# For use by TclDevKit's static syntax checker (v4.1+). +# See http://www.activestate.com/solutions/tcl/ +# See http://aspn.activestate.com/ASPN/docs/Tcl_Dev_Kit/4.0/Checker.html#pcx_api +# for the specification of the format of the code in this file. +# + +package require pcx +pcx::register valtype::luhn5 +pcx::tcldep 1 needs tcl 8.5 + +pcx::check 1 std ::valtype::luhn5 \ + {checkSimpleArgs 1 -1 { + {checkOption { + {validate {checkSimpleArgs 1 2 { + checkWord + checkList + }}} + {checkdigit {checkSimpleArgs 1 2 { + checkWord + checkList + }}} + } {}}}} + +# Initialization via pcx::init. +# Use a ::XXX::init procedure for non-standard initialization. +pcx::complete diff -Nru tcllib-1.13-dfsg/modules/valtype/valtype_luhn.pcx tcllib-1.14-dfsg/modules/valtype/valtype_luhn.pcx --- tcllib-1.13-dfsg/modules/valtype/valtype_luhn.pcx 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/valtype_luhn.pcx 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,29 @@ +# -*- tcl -*- +# Syntax of the commands provided by package valtype::luhn. +# +# For use by TclDevKit's static syntax checker (v4.1+). +# See http://www.activestate.com/solutions/tcl/ +# See http://aspn.activestate.com/ASPN/docs/Tcl_Dev_Kit/4.0/Checker.html#pcx_api +# for the specification of the format of the code in this file. +# + +package require pcx +pcx::register valtype::luhn +pcx::tcldep 1 needs tcl 8.5 + +pcx::check 1 std ::valtype::luhn \ + {checkSimpleArgs 1 -1 { + {checkOption { + {validate {checkSimpleArgs 1 2 { + checkWord + checkList + }}} + {checkdigit {checkSimpleArgs 1 2 { + checkWord + checkList + }}} + } {}}}} + +# Initialization via pcx::init. +# Use a ::XXX::init procedure for non-standard initialization. +pcx::complete diff -Nru tcllib-1.13-dfsg/modules/valtype/valtype.tcl tcllib-1.14-dfsg/modules/valtype/valtype.tcl --- tcllib-1.13-dfsg/modules/valtype/valtype.tcl 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/valtype.tcl 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,77 @@ +# # ## ### ##### ######## ############# ###################### +## (C) 2011 Andreas Kupries. BSD licensed. +# +## Common helper commands for the validation types in this +## module. + +# # ## ### ##### ######## ############# ###################### + +# # ## ### ##### ######## ############# ###################### +## Requisites + +package require Tcl 8.5 +namespace eval ::valtype::common {} + +# # ## ### ##### ######## ############# ###################### +## Implementation + +proc ::valtype::common::reject {code text} { + if {[string match {[aeiouAEIOU]*} $text]} { + set prefix "Not an " + } else { + set prefix "Not a " + } + + return -code error \ + -errorcode [list INVALID {*}$code] \ + $prefix$text +} + +proc ::valtype::common::badchar {code {text {}}} { + reject [list {*}$code CHAR] $text +} + +proc ::valtype::common::badcheck {code {text {}}} { + if {$text ne {}} { append text ", " } + append text "the check digit is incorrect" + reject [list {*}$code CHECK-DIGIT] $text +} + +proc ::valtype::common::badlength {code lengths {text {}}} { + set ln [llength $lengths] + if {$text ne {}} { append text ", " } + append text "incorrect length" + if {$ln} { + if {$ln == 1} { + append text ", expected [lindex $lengths 0] characters" + } else { + append text ", expected one of [linsert [join $lengths {, }] end-1 or] characters" + } + } + reject [list {*}$code LENGTH] $text +} + +proc ::valtype::common::badprefix {code prefixes {text {}}} { + set ln [llength $prefixes] + if {$text ne {}} { append text ", " } + append text "incorrect prefix" + if {$ln} { + if {$ln == 1} { + append text ", expected [lindex $prefixes 0]" + } else { + append text ", expected one of [linsert [join $prefixes {, }] end-1 or]" + } + } + reject [list {*}$code PREFIX] $text +} + +# # ## ### ##### ######## ############# ###################### + +namespace eval ::valtype::common { + namespace export reject badchar badcheck badlength badprefix +} + +# # ## ### ##### ######## ############# ###################### +## Ready + +package provide valtype::common 1 diff -Nru tcllib-1.13-dfsg/modules/valtype/valtype_usnpi.pcx tcllib-1.14-dfsg/modules/valtype/valtype_usnpi.pcx --- tcllib-1.13-dfsg/modules/valtype/valtype_usnpi.pcx 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/valtype_usnpi.pcx 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,27 @@ +# -*- tcl -*- +# Syntax of the commands provided by package valtype::usnpi. +# +# For use by TclDevKit's static syntax checker (v4.1+). +# See http://www.activestate.com/solutions/tcl/ +# See http://aspn.activestate.com/ASPN/docs/Tcl_Dev_Kit/4.0/Checker.html#pcx_api +# for the specification of the format of the code in this file. +# + +package require pcx +pcx::register valtype::usnpi +pcx::tcldep 1 needs tcl 8.5 + +pcx::check 1 std ::valtype::usnpi \ + {checkSimpleArgs 1 -1 { + {checkOption { + {validate {checkSimpleArgs 1 1 { + checkWord + }}} + {checkdigit {checkSimpleArgs 1 1 { + checkWord + }}} + } {}}}} + +# Initialization via pcx::init. +# Use a ::XXX::init procedure for non-standard initialization. +pcx::complete diff -Nru tcllib-1.13-dfsg/modules/valtype/valtype_verhoeff.pcx tcllib-1.14-dfsg/modules/valtype/valtype_verhoeff.pcx --- tcllib-1.13-dfsg/modules/valtype/valtype_verhoeff.pcx 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/valtype_verhoeff.pcx 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,29 @@ +# -*- tcl -*- +# Syntax of the commands provided by package valtype::verhoeff. +# +# For use by TclDevKit's static syntax checker (v4.1+). +# See http://www.activestate.com/solutions/tcl/ +# See http://aspn.activestate.com/ASPN/docs/Tcl_Dev_Kit/4.0/Checker.html#pcx_api +# for the specification of the format of the code in this file. +# + +package require pcx +pcx::register valtype::verhoeff +pcx::tcldep 1 needs tcl 8.5 + +pcx::check 1 std ::valtype::verhoeff \ + {checkSimpleArgs 1 -1 { + {checkOption { + {validate {checkSimpleArgs 1 2 { + checkWord + checkList + }}} + {checkdigit {checkSimpleArgs 1 2 { + checkWord + checkList + }}} + } {}}}} + +# Initialization via pcx::init. +# Use a ::XXX::init procedure for non-standard initialization. +pcx::complete diff -Nru tcllib-1.13-dfsg/modules/valtype/verhoeff.man tcllib-1.14-dfsg/modules/valtype/verhoeff.man --- tcllib-1.13-dfsg/modules/valtype/verhoeff.man 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/verhoeff.man 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,13 @@ +[vset PACKAGE verhoeff] +[vset VERSION 1] +[vset A a] +[vset NAME {plain number with a VERHOEFF checkdigit}] +[vset NAMEX {verhoeff checkdigit}] +[vset CODE VERHOEFF] +[vset OK ....] +[vset BAD ....] +[vset KEYWORDS k_verhoeff] +[vset REQUIRE null] +[vset METHODS null] +[vset CODES null] +[include include/vtype.inc] diff -Nru tcllib-1.13-dfsg/modules/valtype/verhoeff.tcl tcllib-1.14-dfsg/modules/valtype/verhoeff.tcl --- tcllib-1.13-dfsg/modules/valtype/verhoeff.tcl 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/verhoeff.tcl 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,128 @@ +# # ## ### ##### ######## ############# ###################### +## Verhoeff test of numbers +# +# The Verhoeff test is similar to the Luhn test to compute and verify +# check digits of identifier numbers, albeit quite a bit stronger, +# i.e. detecting more possible keying errors. +# +# References +# + +# # ## ### ##### ######## ############# ###################### + +# The code below implements the interface of a snit validation type, +# making it directly usable with snit's -type option in option +# specifications. + +# # ## ### ##### ######## ############# ###################### +## Requisites + +package require Tcl 8.5 +package require snit +package require valtype::common + +# # ## ### ##### ######## ############# ###################### +## Implementation + +namespace eval ::valtype::verhoeff { + namespace import ::valtype::common::* +} + +snit::type ::valtype::verhoeff { + #------------------------------------------------------------------- + # Type Methods + + typemethod validate {value {code VERHOEFF}} { + if {[regexp {[^0-9]} $value]} { + badchar $code "$code number, expected only digits" + } + + # Verhoeff test. + + set sum [Sum $value 0] + if {$sum != 0} { + badcheck $code "$code number" + } + return $value + } + + typemethod checkdigit {value {code VERHOEFF}} { + if {[regexp {[^0-9]} $value]} { + badchar $code "$code number, expected only digits" + } + + # Compute the verhoeff checkdigit. First sum the digits as + # usual. Note that we start with position 1, as the check + # digit will go into position 0. + + #return [INVERS [Sum $value 1]] + return [lindex $ourinv [Sum $value 1]] + } + + proc Sum {value step} { + # 8.5 required for lreverse. + # + # Compute the verhoeff checkdigit. First sum the digits as + # usual. Note that we start with position 1 for checkdigit + # calculation, as the check digit will go into position 0. + + set sum 0 + foreach ch [lreverse [split $value {}]] { + #set sum [OP $sum [F step $ch]] + # inlined below: + set sum [lindex $ourop $sum [lindex $ourf $step $ch]] + incr step ; if {$step == 8} { set step 0} + } + return $sum + } + + #------------------------------------------------------------------- + # Constructor + + # None needed; no options + + #------------------------------------------------------------------- + # Public Methods + + method validate {value} { + $type validate $value + } + + #------------------------------------------------------------------- + # Operations in D5, and the helper permutations F^k, k in {0,...,7}. + + #proc OP {a b} { return [lindex $ourop $a $b] } + #proc INVERS {a} { return [lindex $ourinv $a] } + #proc F {k x} { return [lindex $ourf $k $x] } + + typevariable ourop { + {0 1 2 3 4 5 6 7 8 9} + {1 2 3 4 0 6 7 8 9 5} + {2 3 4 0 1 7 8 9 5 6} + {3 4 0 1 2 8 9 5 6 7} + {4 0 1 2 3 9 5 6 7 8} + {5 9 8 7 6 0 4 3 2 1} + {6 5 9 8 7 1 0 4 3 2} + {7 6 5 9 8 2 1 0 4 3} + {8 7 6 5 9 3 2 1 0 4} + {9 8 7 6 5 4 3 2 1 0} + } + + typevariable ourinv {0 4 3 2 1 5 6 7 8 9} + + typevariable ourf { + {0 1 2 3 4 5 6 7 8 9} + {1 5 7 6 2 8 3 0 9 4} + {5 8 0 3 7 9 6 1 4 2} + {8 9 1 6 0 4 3 5 2 7} + {9 4 5 3 1 2 6 8 7 0} + {4 2 8 6 5 7 3 9 0 1} + {2 7 9 3 8 0 6 4 1 5} + {7 0 4 6 9 1 3 2 5 8} + } +} + +# # ## ### ##### ######## ############# ###################### +## Ready + +package provide valtype::verhoeff 1 diff -Nru tcllib-1.13-dfsg/modules/valtype/verhoeff.test tcllib-1.14-dfsg/modules/valtype/verhoeff.test --- tcllib-1.13-dfsg/modules/valtype/verhoeff.test 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/valtype/verhoeff.test 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,92 @@ +# ------------------------------------------------------------------------- +# verhoeff.test -*- tcl -*- +# (C) 2011 Andreas Kupries. BSD licensed. +# ------------------------------------------------------------------------- + +source [file join \ + [file dirname [file dirname [file join [pwd] [info script]]]] \ + devtools testutilities.tcl] + +testsNeedTcl 8.5 +testsNeedTcltest 2.0 + +support { + use snit/snit2.tcl snit ;# snit v2 fixed, due Tcl 8.5 + useLocal valtype.tcl valtype::common +} +testing { + useLocal verhoeff.tcl valtype::verhoeff +} + +# ------------------------------------------------------------------------- + +test valtype-verhoeff-1.0 {verhoeff validation wrong\#args} -body { + valtype::verhoeff validate +} -returnCodes error \ + -result {wrong # args: should be "valtype::verhoeff validate value ?code?"} + +test valtype-verhoeff-1.1 {verhoeff validation wrong\#args} -body { + valtype::verhoeff validate A B C +} -returnCodes error \ + -result {wrong # args: should be "valtype::verhoeff validate value ?code?"} + +# ------------------------------------------------------------------------- + +test valtype-verhoeff-2.0 {verhoeff validation failure, bad char} -body { + valtype::verhoeff validate A +} -returnCodes error \ + -result {Not a VERHOEFF number, expected only digits} + +foreach {n in} { + 1 49999999 + 2 37 + 3 49927398717 + 4 1234567812345678 +} { + test valtype-verhoeff-2.1 {verhoeff validation failure, bad check} -body { + valtype::verhoeff validate $in + } -returnCodes error \ + -result {Not a VERHOEFF number, the check digit is incorrect} +} + +test valtype-verhoeff-3.0 {verhoeff checkdigit wrong\#args} -body { + valtype::verhoeff checkdigit +} -returnCodes error \ + -result {wrong # args: should be "valtype::verhoeff checkdigit value ?code?"} + +test valtype-verhoeff-3.1 {verhoeff checkdigit wrong\#args} -body { + valtype::verhoeff checkdigit A B C +} -returnCodes error \ + -result {wrong # args: should be "valtype::verhoeff checkdigit value ?code?"} + +# ------------------------------------------------------------------------- + +test valtype-verhoeff-5.0 {verhoeff checkdigit calculation failure, bad char} -body { + valtype::verhoeff checkdigit A +} -returnCodes error \ + -result {Not a VERHOEFF number, expected only digits} + +foreach {n in check} { + 1 4999999 6 + 2 3 6 + 3 35 5 + 4 4992739871 3 + 5 123456781234567 5 +} { + test valtype-verhoeff-4.$n {verhoeff validation} -body { + valtype::verhoeff validate $in$check + } -result $in$check + + test valtype-verhoeff-6.$n {verhoeff checkdigit} -body { + valtype::verhoeff checkdigit $in + } -result $check +} + +# ------------------------------------------------------------------------- +testsuiteCleanup +return + +# Local Variables: +# mode: tcl +# indent-tabs-mode: nil +# End: diff -Nru tcllib-1.13-dfsg/modules/virtchannel_base/cat.man tcllib-1.14-dfsg/modules/virtchannel_base/cat.man --- tcllib-1.13-dfsg/modules/virtchannel_base/cat.man 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/virtchannel_base/cat.man 2011-12-13 18:13:23.000000000 +0000 @@ -0,0 +1,55 @@ +[comment {-*- tcl -*- doctools manpage}] +[manpage_begin tcl::chan::cat n 1] +[copyright {2011 Andreas Kupries }] +[moddesc {Reflected/virtual channel support}] +[category Channels] +[titledesc {Concatenation channel}] +[require Tcl 8.5] +[require TclOO] +[require tcl::chan::core [opt 1]] +[require tcl::chan::cat [opt 1]] +[description] +[para] + +The [package tcl::chan::cat] package provides a command creating +concatenation channels. These are non-seekable channels owning a list +of subordinate channels whose contents they return in order, until all +are exhausted. In this manner the cahnnel is the concatentation of the +contents of all the sub-ordinate channels. + +[para] Note that the created channels take ownership of the channels +they were constructed with. Whenever they have exhausted one of their +channel it will be closed. Similarly, closing the cat channel will +close all the sub-ordinates it still has. + +[para] The internal [package TclOO] class implementing the channel +handler is a sub-class of the [package tcl::chan::core] framework. + +[para] Event handling is delegated to the currently active sub-channel. + +[section API] + +[list_begin definitions] + +[call [cmd ::tcl::chan::cat] [arg chan]...] + +This command creates the concatenation channel using all the provided +channels, and returns its handle. + +[list_end] + + +[section {BUGS, IDEAS, FEEDBACK}] + +This document, and the package it describes, will undoubtedly contain +bugs and other problems. + +Please report such in the category [emph virtchannel] of the +[uri {http://sourceforge.net/tracker/?group_id=12883} {Tcllib SF Trackers}]. + +Please also report any ideas for enhancements you may have for either +package and/or documentation. + + +[keywords {virtual channel} {reflected channel} {concatenation channel} {tip 219}] +[manpage_end] diff -Nru tcllib-1.13-dfsg/modules/virtchannel_base/cat.tcl tcllib-1.14-dfsg/modules/virtchannel_base/cat.tcl --- tcllib-1.13-dfsg/modules/virtchannel_base/cat.tcl 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/virtchannel_base/cat.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -0,0 +1,137 @@ +# -*- tcl -*- +# # ## ### ##### ######## ############# +# (C) 2011 Andreas Kupries + +# Facade concatenating the contents of the channels it was constructed +# with. Owns the sub-ordinate channels and closes them on exhaustion and/or +# when closed itself. + +# @@ Meta Begin +# Package tcl::chan::cat 1.0.1 +# Meta as::author {Andreas Kupries} +# Meta as::copyright 2011 +# Meta as::license BSD +# Meta description Facade concatenating the contents of the channels it +# Meta description was constructed with. Owns the sub-ordinate channels +# Meta description and closes them on exhaustion and/or when closed itself. +# Meta platform tcl +# Meta require TclOO +# Meta require tcl::chan::core +# Meta require {Tcl 8.5} +# @@ Meta End + +# # ## ### ##### ######## ############# + +package require Tcl 8.5 +package require TclOO +package require tcl::chan::core + +# # ## ### ##### ######## ############# + +namespace eval ::tcl::chan {} + +proc ::tcl::chan::cat {args} { + return [::chan create {read} [cat::implementation new {*}$args]] +} + +oo::class create ::tcl::chan::cat::implementation { + superclass ::tcl::chan::core ; # -> initialize, finalize. + + # We are not using the standard event handling class, because here + # it will not be timer-driven. We propagate anything related to + # events to catin and catout instead and let them handle things. + + constructor {args} { + set channels $args + # Disable encoding and translation processing in the wrapped channels. + # This will happen in our generic layer instead. + foreach c $channels { + fconfigure $c -translation binary + fconfigure $c -translation binary + } + set delay 10 + set watching 0 + return + } + + destructor { + foreach c $channels { + ::close $c + } + return + } + + variable channels timer delay watching + + method watch {c requestmask} { + if {"read" in $requestmask} { + # Activate event handling. Either drive an eof home via + # timers, or activate things in the foremost sub-ordinate. + + set watching 1 + if {![llength $channels]} { + set timer [after $delay \ + [namespace code [list my Post $c]]] + } else { + set c [lindex $channels 0] + fileevent readable $c [list chan postevent $c read] + } + } else { + # Stop events. Kill timer, or disable in the foremost + # sub-ordinate. + + set watching 0 + if {![llength $channels]} { + catch { after cancel $timer } + } else { + fileevent readable [lindex $channels 0] {} + } + } + return + } + + method read {c n} { + if {![llength $channels]} { + # Actually should be EOF signal. + return {} + } + + set buf {} + while {([string length buf] < $n) && + [llength $channels]} { + set in [lindex $channels 0] + append buf [::read $in $n] + + if {[eof $in]} { + close $in + set channels [lrange $channels 1 end] + + # The close above also killed any fileevent handling + # we might have attached to this channel. We may have + # to update the settings (i.e. move to next channel, + # or to timer-based, to drive the eof home). + + if {$watching} { + my watch $c read + } + } + } + + if {$buf eq {}} { + return -code error EAGAIN + } + + return $buf + } + + method Post {c} { + set timer [after $delay \ + [namespace code [list my Post $c]]] + chan postevent $c read + return + } +} + +# # ## ### ##### ######## ############# +package provide tcl::chan::cat 1.0.1 +return diff -Nru tcllib-1.13-dfsg/modules/virtchannel_base/ChangeLog tcllib-1.14-dfsg/modules/virtchannel_base/ChangeLog --- tcllib-1.13-dfsg/modules/virtchannel_base/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/virtchannel_base/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,50 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + +2011-08-09 Andreas Kupries + + * memchan.tcl: Fixed missing initialization of 'content' instance + variable. Bumped to version 1.0.2. + + * variable.tcl: Fixed missing invokation of superclass + constructor. Fixed missing initialization of linked 'content' + variable, if not existing. Fixed missing import of linked + variable into the event handling. Bumped to version 1.0.2. + + * cat.tcl: Removed bogus invokation of superclass constructor, + there is no such. Bumped to version 1.0.1. + + * facade.tcl: Added missing logger requirements, dropped bogus + call to superclass constructor. Bumped to version 1.0.1. + + * std.tcl: Fixed command scoping issues, and dropped bogus call to + superclass constructor. Bumped to version 1.0.1. + +2011-05-31 Andreas Kupries + + * cat.man: New base channels. Concatenation of channels, + * cat.tcl: standard channel combining stdin and stdout, + * facade.man: and a facade for wrapping around other + * facade.tcl: channels. + * std.man: + * std.tcl: + * pkgIndex.tcl: + +2011-02-21 Andreas Kupries + + * pkgIndex.tcl: Removed the superfluous [list] command in the + ifneeded script. + +2011-02-16 Andreas Kupries + + * memchan.tcl: Fixed constructor chaining, added the missing + * pkgIndex.tcl: 'next'. The bug prevented proper initialization + * string.tcl: of the event core. All versions bumped to 1.0.1 + * variable.tcl: + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/virtchannel_base/facade.man tcllib-1.14-dfsg/modules/virtchannel_base/facade.man --- tcllib-1.13-dfsg/modules/virtchannel_base/facade.man 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/virtchannel_base/facade.man 2011-12-13 18:13:23.000000000 +0000 @@ -0,0 +1,80 @@ +[comment {-*- tcl -*- doctools manpage}] +[manpage_begin tcl::chan::facade n 1] +[copyright {2011 Andreas Kupries }] +[moddesc {Reflected/virtual channel support}] +[category Channels] +[titledesc {Facade channel}] +[require Tcl 8.5] +[require TclOO] +[require logger] +[require tcl::chan::core [opt 1]] +[require tcl::chan::facade [opt 1]] +[description] +[para] + +The [package tcl::chan::facade] package provides a command creating +facades to other channels. These are channels which own a single +subordinate channel and delegate all operations to. + +[para] The main use for facades is the debugging of actions on a +channel. While most of the information could be tracked by a virtual +channel transformation it does not have access to the event-related +operation, and furthermore they are only available in Tcl 8.6. + +[para] Therefore this channel, usable with Tcl 8.5, and having access +to everything going on for a channel. + +[para] The intercepted actions on channel are logged through package +[package logger]. + +[para] Beyond that facades provide the following additional channel +configuration options: + +[list_begin options] +[opt_def -self] +The TclOO object handling the facade. + +[opt_def -fd] +The handle of the subordinate, i.e. wrapped channel. + +[opt_def -used] +The last time the wrapped channel was read from or written to by +the facade, as per [cmd {clock milliseconds}]. A value of [const 0] +indicates that the subordinate channel was not accessed at all, yet. + +[opt_def -created] +The time the facade was created, as per [cmd {clock milliseconds}]. + +[opt_def -user] +A free-form value identifying the user of the facade and its +wrapped channel. + +[list_end] + +Of these only option [option -user] is writable. + +[section API] + +[list_begin definitions] + +[call [cmd ::tcl::chan::facade] [arg chan]] + +This command creates the facade channel around the provided +channel [arg chan], and returns its handle. + +[list_end] + +[section {BUGS, IDEAS, FEEDBACK}] + +This document, and the package it describes, will undoubtedly contain +bugs and other problems. + +Please report such in the category [emph virtchannel] of the +[uri {http://sourceforge.net/tracker/?group_id=12883} {Tcllib SF Trackers}]. + +Please also report any ideas for enhancements you may have for either +package and/or documentation. + + +[keywords {virtual channel} {reflected channel} {concatenation channel} {tip 219}] +[manpage_end] diff -Nru tcllib-1.13-dfsg/modules/virtchannel_base/facade.tcl tcllib-1.14-dfsg/modules/virtchannel_base/facade.tcl --- tcllib-1.13-dfsg/modules/virtchannel_base/facade.tcl 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/virtchannel_base/facade.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -0,0 +1,234 @@ +# -*- tcl -*- +# # ## ### ##### ######## ############# +# (C) 2011 Andreas Kupries + +# Facade wrapping around some other channel. All operations on the +# facade are delegated to the wrapped channel. This makes it useful +# for debugging of Tcl's activity on a channel. While a transform can +# be used for that as well it does not have access to some things of +# the base-channel, i.e. all the event managment is not visible to it, +# whereas the facade has access to even this. + +# @@ Meta Begin +# Package tcl::chan::facade 1.0.1 +# Meta as::author {Colin McCormack} +# Meta as::author {Andreas Kupries} +# Meta as::copyright 2011 +# Meta as::license BSD +# Meta description Facade wrapping around some other channel. All +# Meta description operations on the facade are delegated to the +# Meta description wrapped channel. This makes it useful for debugging +# Meta description of Tcl's activity on a channel. While a transform +# Meta description can be used for that as well it does not have +# Meta description access to some things of the base-channel, i.e. all +# Meta description the event managment is not visible to it, whereas +# Meta description the facade has access to even this. +# Meta platform tcl +# Meta require TclOO +# Meta require tcl::chan::core +# Meta require {Tcl 8.5} +# @@ Meta End + +# # ## ### ##### ######## ############# +## TODO document the special options of the facade +## TODO log integration. +## TODO document that facada takes ownership of the channel. + +package require Tcl 8.5 +package require TclOO +package require logger +package require tcl::chan::core + +# # ## ### ##### ######## ############# + +namespace eval ::tcl::chan {} + +logger::initNamespace ::tcl::chan::facade +proc ::tcl::chan::facade {args} { + return [::chan create {read} [facade::implementation new {*}$args]] +} + +# # ## ### ##### ######## ############# + +oo::class create ::tcl::chan::facade::implementation { + superclass ::tcl::chan::core ; # -> initialize, finalize. + + # # ## ### ##### ######## ############# + + # We are not using the standard event handling class, because here + # it will not be timer-driven. We propagate anything related to + # events to the wrapped channel instead and let it handle things. + + constructor {thechan} { + # Access to the log(ger) commands. + namespace path [list {*}[namespace path] ::tcl::chan::facade] + + set chan $thechan + + # set some configuration data + set created [clock milliseconds] + set used 0 + set user "" ;# user data - freeform + + # validate args + if {$chan eq [self]} { + return -code error "recursive chan! No good." + } elseif {$chan eq ""} { + return -code error "Needs a chan argument" + } + + set blocking [::chan configure $chan -blocking] + return + } + + destructor { + log::debug {[self] destroyed} + if {[catch { ::chan close $chan } e o]} { + log::debug {failed to close $chan [self] because "$e" ($o)} + } + return + } + + variable chan used user created blocking + + method initialize {myself mode} { + log::debug {$myself initialize $chan $mode} + log::debug {$chan configured: ([::chan configure $chan])} + return [next $chan $mode] + } + + method finalize {myself} { + log::debug {$myself finalize $chan} + catch {::chan close $chan} + catch {next $myself} + catch {my destroy} + return + } + + method blocking {myself mode} { + if {[catch { + ::chan configure $chan -blocking $mode + set blocking $mode + } e o]} { + log::debug {$myself blocking $chan $mode -> error $e ($o)} + } else { + log::debug {$myself blocking $chan $mode -> $e} + } + return + } + + method watch {myself requestmask} { + log::debug {$myself watch $chan $requestmask} + + if {"read" in $requestmask} { + fileevent readable $chan [my Callback Readable $myself] + } else { + fileevent readable $chan {} + } + + if {"write" in $requestmask} { + fileevent writable $chan [my Callback Writable $myself] + } else { + fileevent writable $chan {} + } + return + } + + method read {myself n} { + log::debug {$myself read $chan begin eof: [::chan eof $chan], blocked: [::chan blocked $chan]} + set used [clock milliseconds] + + if {[catch { + set data [::chan read $chan $n] + } e o]} { + log::error {$myself read $chan $n -> error $e ($o)} + } else { + log::debug {$myself read $chan $n -> [string length $data] bytes: [string map {\n \\n} "'[string range $data 0 20]...[string range $data end-20 end]"]'} + log::debug {$myself read $chan eof = [::chan eof $chan]} + log::debug {$myself read $chan blocked = [::chan blocked $chan]} + log::debug {$chan configured: ([::chan configure $chan])} + + set gone [catch {chan eof $chan} eof] + if { + ($data eq {}) && + !$gone && !$eof && !$blocking + } { + log::error {$myself EAGAIN} + return -code error EAGAIN + } + } + + log::debug {$myself read $chan result: [string length $data] bytes} + return $data + } + + method write {myself data} { + log::debug {$myself write $chan [string length $data] / [::chan pending output $chan] / [::chan pending output $myself]} + set used [clock milliseconds] + ::chan puts -nonewline $chan $data + return [string length $data] + } + + method configure {myself option value} { + log::debug {[self] configure $myself $option -> $value} + + if {$option eq "-user"} { + set user $value + return + } + + ::chan configure $fd $option $value + return + } + + method cget {myself option} { + switch -- $option { + -self { return [self] } + -fd { return $chan } + -used { return $used } + -created { return $created } + -user { return $user } + default { + return [::chan configure $chan $option] + } + } + } + + method cgetall {myself} { + set result [::chan configure $chan] + lappend result \ + -self [self] \ + -fd $chan \ + -used $used \ + -created $created \ + -user $user + + log::debug {[self] cgetall $myself -> $result} + return $result + } + + # # ## ### ##### ######## ############# + + # Internals. Methods. Event generation. + method Readable {myself} { + log::debug {$myself readable $chan - [::chan pending input $chan]} + ::chan postevent $myself read + return + } + + method Writable {myself} { + log::debug {$myself writable $chan - [::chan pending output $chan]} + ::chan postevent $myself write + return + } + + method Callback {method args} { + list [uplevel 1 {namespace which my}] $method {*}$args + } + + # # ## ### ##### ######## ############# +} + +# # ## ### ##### ######## ############# +package provide tcl::chan::facade 1.0.1 +return diff -Nru tcllib-1.13-dfsg/modules/virtchannel_base/memchan.tcl tcllib-1.14-dfsg/modules/virtchannel_base/memchan.tcl --- tcllib-1.13-dfsg/modules/virtchannel_base/memchan.tcl 2011-01-25 05:38:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/virtchannel_base/memchan.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -7,7 +7,7 @@ # bytes. # @@ Meta Begin -# Package tcl::chan::memchan 1 +# Package tcl::chan::memchan 1.0.2 # Meta as::author {Andreas Kupries} # Meta as::copyright 2009 # Meta as::license BSD @@ -48,7 +48,9 @@ superclass ::tcl::chan::events ; # -> initialize, finalize, watch constructor {} { + set content {} set at 0 + next } method initialize {args} { @@ -161,5 +163,5 @@ } # # ## ### ##### ######## ############# -package provide tcl::chan::memchan 1 +package provide tcl::chan::memchan 1.0.2 return diff -Nru tcllib-1.13-dfsg/modules/virtchannel_base/pkgIndex.tcl tcllib-1.14-dfsg/modules/virtchannel_base/pkgIndex.tcl --- tcllib-1.13-dfsg/modules/virtchannel_base/pkgIndex.tcl 2011-01-25 05:38:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/virtchannel_base/pkgIndex.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -1,14 +1,17 @@ if {![package vsatisfies [package provide Tcl] 8.5]} {return} -package ifneeded tcl::chan::fifo 1 [list source [list [file join $dir fifo.tcl]]] -package ifneeded tcl::chan::fifo2 1 [list source [list [file join $dir fifo2.tcl]]] -package ifneeded tcl::chan::halfpipe 1 [list source [list [file join $dir halfpipe.tcl]]] -package ifneeded tcl::chan::memchan 1 [list source [list [file join $dir memchan.tcl]]] -package ifneeded tcl::chan::null 1 [list source [list [file join $dir null.tcl]]] -package ifneeded tcl::chan::nullzero 1 [list source [list [file join $dir nullzero.tcl]]] -package ifneeded tcl::chan::random 1 [list source [list [file join $dir random.tcl]]] -package ifneeded tcl::chan::string 1 [list source [list [file join $dir string.tcl]]] -package ifneeded tcl::chan::textwindow 1 [list source [list [file join $dir textwindow.tcl]]] -package ifneeded tcl::chan::variable 1 [list source [list [file join $dir variable.tcl]]] -package ifneeded tcl::chan::zero 1 [list source [list [file join $dir zero.tcl]]] -package ifneeded tcl::randomseed 1 [list source [list [file join $dir randseed.tcl]]] +package ifneeded tcl::chan::cat 1.0.1 [list source [file join $dir cat.tcl]] +package ifneeded tcl::chan::facade 1.0.1 [list source [file join $dir facade.tcl]] +package ifneeded tcl::chan::fifo 1 [list source [file join $dir fifo.tcl]] +package ifneeded tcl::chan::fifo2 1 [list source [file join $dir fifo2.tcl]] +package ifneeded tcl::chan::halfpipe 1 [list source [file join $dir halfpipe.tcl]] +package ifneeded tcl::chan::memchan 1.0.2 [list source [file join $dir memchan.tcl]] +package ifneeded tcl::chan::null 1 [list source [file join $dir null.tcl]] +package ifneeded tcl::chan::nullzero 1 [list source [file join $dir nullzero.tcl]] +package ifneeded tcl::chan::random 1 [list source [file join $dir random.tcl]] +package ifneeded tcl::chan::std 1.0.1 [list source [file join $dir std.tcl]] +package ifneeded tcl::chan::string 1.0.1 [list source [file join $dir string.tcl]] +package ifneeded tcl::chan::textwindow 1 [list source [file join $dir textwindow.tcl]] +package ifneeded tcl::chan::variable 1.0.2 [list source [file join $dir variable.tcl]] +package ifneeded tcl::chan::zero 1 [list source [file join $dir zero.tcl]] +package ifneeded tcl::randomseed 1 [list source [file join $dir randseed.tcl]] diff -Nru tcllib-1.13-dfsg/modules/virtchannel_base/std.man tcllib-1.14-dfsg/modules/virtchannel_base/std.man --- tcllib-1.13-dfsg/modules/virtchannel_base/std.man 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/virtchannel_base/std.man 2011-12-13 18:13:23.000000000 +0000 @@ -0,0 +1,49 @@ +[comment {-*- tcl -*- doctools manpage}] +[manpage_begin tcl::chan::std n 1] +[copyright {2011 Andreas Kupries }] +[moddesc {Reflected/virtual channel support}] +[category Channels] +[titledesc {Standard I/O, unification of stdin and stdout}] +[require Tcl 8.5] +[require TclOO] +[require tcl::chan::core [opt 1]] +[require tcl::chan::std [opt 1]] +[description] +[para] + +The [package tcl::chan::std] package provides a command creating +a standard channel which unifies stdin and stdout into a single +read- and writable channel. The result is not seek-able, like +the original standard channels. + +[para] The internal [package TclOO] class implementing the channel +handler is a sub-class of the [package tcl::chan::core] framework. + +[section API] + +[list_begin definitions] + +[call [cmd ::tcl::chan::std]] + +This command creates the std channel and returns its handle. + +[para] The channel is created only once, on the first call, and all +future calls simply return this handle. + +[list_end] + + +[section {BUGS, IDEAS, FEEDBACK}] + +This document, and the package it describes, will undoubtedly contain +bugs and other problems. + +Please report such in the category [emph virtchannel] of the +[uri {http://sourceforge.net/tracker/?group_id=12883} {Tcllib SF Trackers}]. + +Please also report any ideas for enhancements you may have for either +package and/or documentation. + + +[keywords {virtual channel} {reflected channel} stdin stdout {standard io} {tip 219}] +[manpage_end] diff -Nru tcllib-1.13-dfsg/modules/virtchannel_base/std.tcl tcllib-1.14-dfsg/modules/virtchannel_base/std.tcl --- tcllib-1.13-dfsg/modules/virtchannel_base/std.tcl 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/virtchannel_base/std.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -0,0 +1,97 @@ +# -*- tcl -*- +# # ## ### ##### ######## ############# +# (C) 2011 Andreas Kupries + +# Facade wrapping the separate channels for stdin and stdout into a +# single read/write channel for all regular standard i/o. Not +# seekable. Fileevent handling is propagated to the regular channels +# the facade wrapped about. Only one instance of the class is +# ever created. + +# @@ Meta Begin +# Package tcl::chan::std 1.0.1 +# Meta as::author {Andreas Kupries} +# Meta as::copyright 2011 +# Meta as::license BSD +# Meta description Facade wrapping the separate channels for stdin +# Meta description and stdout into a single read/write channel for +# Meta description all regular standard i/o. Not seekable. Only one +# Meta description instance of the class is ever created. +# Meta platform tcl +# Meta require TclOO +# Meta require tcl::chan::core +# Meta require {Tcl 8.5} +# @@ Meta End + +# # ## ### ##### ######## ############# + +package require Tcl 8.5 +package require TclOO +package require tcl::chan::core + +# # ## ### ##### ######## ############# + +namespace eval ::tcl::chan {} + +proc ::tcl::chan::std {} { + ::variable std + if {$std eq {}} { + set std [::chan create {read write} [std::implementation new]] + } + return $std +} + +oo::class create ::tcl::chan::std::implementation { + superclass ::tcl::chan::core ; # -> initialize, finalize. + + # We are not using the standard event handling class, because here + # it will not be timer-driven. We propagate anything related to + # events to stdin and stdout instead and let them handle things. + + constructor {} { + # Disable encoding and translation processing in the wrapped channels. + # This will happen in our generic layer instead. + fconfigure stdin -translation binary + fconfigure stdout -translation binary + return + } + + method watch {c requestmask} { + + if {"read" in $requestmask} { + fileevent readable stdin [list chan postevent $c read] + } else { + fileevent readable stdin {} + } + + if {"write" in $requestmask} { + fileevent readable stdin [list chan postevent $c write] + } else { + fileevent readable stdout {} + } + + return + } + + method read {c n} { + # Read is redirected to stdin. + return [::read stdin $n] + } + + method write {c newbytes} { + # Write is redirected to stdout. + puts -nonewline stdout $newbytes + flush stdout + return [string length $newbytes] + } +} + +# # ## ### ##### ######## ############# + +namespace eval ::tcl::chan { + ::variable std {} +} + +# # ## ### ##### ######## ############# +package provide tcl::chan::std 1.0.1 +return diff -Nru tcllib-1.13-dfsg/modules/virtchannel_base/string.tcl tcllib-1.14-dfsg/modules/virtchannel_base/string.tcl --- tcllib-1.13-dfsg/modules/virtchannel_base/string.tcl 2011-01-25 05:38:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/virtchannel_base/string.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -43,6 +43,7 @@ constructor {thecontent} { set content $thecontent set at 0 + next } method initialize {args} { @@ -118,5 +119,5 @@ } # # ## ### ##### ######## ############# -package provide tcl::chan::string 1 +package provide tcl::chan::string 1.0.1 return diff -Nru tcllib-1.13-dfsg/modules/virtchannel_base/variable.tcl tcllib-1.14-dfsg/modules/virtchannel_base/variable.tcl --- tcllib-1.13-dfsg/modules/virtchannel_base/variable.tcl 2011-01-25 05:38:00.000000000 +0000 +++ tcllib-1.14-dfsg/modules/virtchannel_base/variable.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -3,7 +3,7 @@ # (C) 2009 Andreas Kupries # @@ Meta Begin -# Package tcl::chan::variable 1 +# Package tcl::chan::variable 1.0.2 # Meta as::author {Andreas Kupries} # Meta as::copyright 2009 # Meta as::license BSD @@ -46,6 +46,12 @@ constructor {thevarname} { set varname $thevarname set at 0 + + upvar #0 $varname content + if {![info exists content]} { + set content {} + } + next } method initialize {args} { @@ -161,6 +167,8 @@ } method Events {} { + upvar #0 $varname content + if {$at >= [string length $content]} { my disallow read } else { @@ -170,5 +178,5 @@ } # # ## ### ##### ######## ############# -package provide tcl::chan::variable 1 +package provide tcl::chan::variable 1.0.2 return diff -Nru tcllib-1.13-dfsg/modules/virtchannel_core/ChangeLog tcllib-1.14-dfsg/modules/virtchannel_core/ChangeLog --- tcllib-1.13-dfsg/modules/virtchannel_core/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/virtchannel_core/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,14 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + +2011-02-21 Andreas Kupries + + * pkgIndex.tcl: Removed the superfluous [list] command in the + ifneeded script. + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/virtchannel_core/pkgIndex.tcl tcllib-1.14-dfsg/modules/virtchannel_core/pkgIndex.tcl --- tcllib-1.13-dfsg/modules/virtchannel_core/pkgIndex.tcl 2011-01-25 05:37:59.000000000 +0000 +++ tcllib-1.14-dfsg/modules/virtchannel_core/pkgIndex.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -1,8 +1,8 @@ if {![package vsatisfies [package provide Tcl] 8.5]} {return} -package ifneeded tcl::chan::core 1 [list source [list [file join $dir core.tcl]]] -package ifneeded tcl::chan::events 1 [list source [list [file join $dir events.tcl]]] +package ifneeded tcl::chan::core 1 [list source [file join $dir core.tcl]] +package ifneeded tcl::chan::events 1 [list source [file join $dir events.tcl]] if {![package vsatisfies [package provide Tcl] 8.6]} {return} -package ifneeded tcl::transform::core 1 [list source [list [file join $dir transformcore.tcl]]] +package ifneeded tcl::transform::core 1 [list source [file join $dir transformcore.tcl]] diff -Nru tcllib-1.13-dfsg/modules/virtchannel_transform/ChangeLog tcllib-1.14-dfsg/modules/virtchannel_transform/ChangeLog --- tcllib-1.13-dfsg/modules/virtchannel_transform/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/virtchannel_transform/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,14 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + +2011-02-21 Andreas Kupries + + * pkgIndex.tcl: Removed the superfluous [list] command in the + ifneeded script. + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/virtchannel_transform/pkgIndex.tcl tcllib-1.14-dfsg/modules/virtchannel_transform/pkgIndex.tcl --- tcllib-1.13-dfsg/modules/virtchannel_transform/pkgIndex.tcl 2011-01-25 05:37:59.000000000 +0000 +++ tcllib-1.14-dfsg/modules/virtchannel_transform/pkgIndex.tcl 2011-12-13 18:13:23.000000000 +0000 @@ -1,14 +1,14 @@ if {![package vsatisfies [package provide Tcl] 8.6]} {return} -package ifneeded tcl::transform::adler32 1 [list source [list [file join $dir adler32.tcl]]] -package ifneeded tcl::transform::base64 1 [list source [list [file join $dir base64.tcl]]] -package ifneeded tcl::transform::counter 1 [list source [list [file join $dir counter.tcl]]] -package ifneeded tcl::transform::crc32 1 [list source [list [file join $dir crc32.tcl]]] -package ifneeded tcl::transform::hex 1 [list source [list [file join $dir hex.tcl]]] -package ifneeded tcl::transform::identity 1 [list source [list [file join $dir identity.tcl]]] -package ifneeded tcl::transform::limitsize 1 [list source [list [file join $dir limitsize.tcl]]] -package ifneeded tcl::transform::observe 1 [list source [list [file join $dir observe.tcl]]] -package ifneeded tcl::transform::otp 1 [list source [list [file join $dir otp.tcl]]] -package ifneeded tcl::transform::rot 1 [list source [list [file join $dir rot.tcl]]] -package ifneeded tcl::transform::spacer 1 [list source [list [file join $dir spacer.tcl]]] -package ifneeded tcl::transform::zlib 1 [list source [list [file join $dir zlib.tcl]]] +package ifneeded tcl::transform::adler32 1 [list source [file join $dir adler32.tcl]] +package ifneeded tcl::transform::base64 1 [list source [file join $dir base64.tcl]] +package ifneeded tcl::transform::counter 1 [list source [file join $dir counter.tcl]] +package ifneeded tcl::transform::crc32 1 [list source [file join $dir crc32.tcl]] +package ifneeded tcl::transform::hex 1 [list source [file join $dir hex.tcl]] +package ifneeded tcl::transform::identity 1 [list source [file join $dir identity.tcl]] +package ifneeded tcl::transform::limitsize 1 [list source [file join $dir limitsize.tcl]] +package ifneeded tcl::transform::observe 1 [list source [file join $dir observe.tcl]] +package ifneeded tcl::transform::otp 1 [list source [file join $dir otp.tcl]] +package ifneeded tcl::transform::rot 1 [list source [file join $dir rot.tcl]] +package ifneeded tcl::transform::spacer 1 [list source [file join $dir spacer.tcl]] +package ifneeded tcl::transform::zlib 1 [list source [file join $dir zlib.tcl]] diff -Nru tcllib-1.13-dfsg/modules/wip/ChangeLog tcllib-1.14-dfsg/modules/wip/ChangeLog --- tcllib-1.13-dfsg/modules/wip/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/wip/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/yaml/ChangeLog tcllib-1.14-dfsg/modules/yaml/ChangeLog --- tcllib-1.13-dfsg/modules/yaml/ChangeLog 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/modules/yaml/ChangeLog 2011-12-13 18:13:30.000000000 +0000 @@ -1,3 +1,9 @@ +2011-12-13 Andreas Kupries + + * + * Released and tagged Tcllib 1.14 ======================== + * + 2011-01-24 Andreas Kupries * diff -Nru tcllib-1.13-dfsg/modules/yaml/CHANGES tcllib-1.14-dfsg/modules/yaml/CHANGES --- tcllib-1.13-dfsg/modules/yaml/CHANGES 2011-01-25 05:37:58.000000000 +0000 +++ tcllib-1.14-dfsg/modules/yaml/CHANGES 2011-12-13 18:13:22.000000000 +0000 @@ -6,7 +6,7 @@ # --- title: YAML parser for Tcl. -version: 0.3.5 +version: 0.3.6 authors: - KATO Kanryu: kanryu6@users.sourceforge.net license: tcllib's BSD-style license @@ -14,6 +14,11 @@ changes: + 0.3.6: + - 2011-08-23 + - fixed for empty block/floating sub node. to see + - https://sourceforge.net/tracker/?func=detail&atid=112883&aid=3396656&group_id=12883 + - https://sourceforge.net/tracker/?func=detail&atid=112883&aid=3396661&group_id=12883 0.3.5: - 2009-05-24 - To read uninitialized yaml::data(current), when there is not empty line diff -Nru tcllib-1.13-dfsg/modules/yaml/huddle.tcl tcllib-1.14-dfsg/modules/yaml/huddle.tcl --- tcllib-1.13-dfsg/modules/yaml/huddle.tcl 2011-01-25 05:37:58.000000000 +0000 +++ tcllib-1.14-dfsg/modules/yaml/huddle.tcl 2011-12-13 18:13:22.000000000 +0000 @@ -1,6 +1,6 @@ # huddle.tcl (working title) # -# huddle.tcl 0.1.5 __HUDDLE_TCL_DATETIME__ KATO Kanryu(kanryu6@users.sourceforge.net) +# huddle.tcl 0.1.5 2011-08-23 14:46:47 KATO Kanryu(kanryu6@users.sourceforge.net) # # It is published with the terms of tcllib's BSD-style license. # See the file named license.terms. @@ -363,6 +363,7 @@ } strip { foreach {src nop} $args break + set result {} foreach {val} $src { lappend result [strip $val] } @@ -564,5 +565,4 @@ } -#source entry.tcl diff -Nru tcllib-1.13-dfsg/modules/yaml/huddle.test tcllib-1.14-dfsg/modules/yaml/huddle.test --- tcllib-1.13-dfsg/modules/yaml/huddle.test 2011-01-25 05:37:58.000000000 +0000 +++ tcllib-1.14-dfsg/modules/yaml/huddle.test 2011-12-13 18:13:22.000000000 +0000 @@ -134,6 +134,10 @@ huddle type $folding 0 1 3 } -result {string} +test huddle-2.11 "test of huddle list" -body { + huddle strip {HUDDLE {L {{s a} {L {}} {s c}}}} +} -result {a {} c} + #test huddle-3.1 "test of huddle jsondump" {[info tclversion] >= 8.5} { # # build a huddle container from normal tcl's container(multi rank dict/list) # proc huddle_build {data} { diff -Nru tcllib-1.13-dfsg/modules/yaml/pkgIndex.tcl tcllib-1.14-dfsg/modules/yaml/pkgIndex.tcl --- tcllib-1.13-dfsg/modules/yaml/pkgIndex.tcl 2011-01-25 05:37:58.000000000 +0000 +++ tcllib-1.14-dfsg/modules/yaml/pkgIndex.tcl 2011-12-13 18:13:22.000000000 +0000 @@ -8,5 +8,5 @@ # script is sourced, the variable $dir must contain the # full path name of this file's directory. -package ifneeded yaml 0.3.5 [list source [file join $dir yaml.tcl]] +package ifneeded yaml 0.3.6 [list source [file join $dir yaml.tcl]] package ifneeded huddle 0.1.5 [list source [file join $dir huddle.tcl]] diff -Nru tcllib-1.13-dfsg/modules/yaml/rb.test tcllib-1.14-dfsg/modules/yaml/rb.test --- tcllib-1.13-dfsg/modules/yaml/rb.test 2011-01-25 05:37:58.000000000 +0000 +++ tcllib-1.14-dfsg/modules/yaml/rb.test 2011-12-13 18:13:22.000000000 +0000 @@ -11,7 +11,6 @@ namespace import ::tcltest::* puts [source huddle.tcl] puts [source yaml.tcl] - } else { # all.tcl source [file join \ diff -Nru tcllib-1.13-dfsg/modules/yaml/yaml.man tcllib-1.14-dfsg/modules/yaml/yaml.man --- tcllib-1.13-dfsg/modules/yaml/yaml.man 2011-01-25 05:37:58.000000000 +0000 +++ tcllib-1.14-dfsg/modules/yaml/yaml.man 2011-12-13 18:13:22.000000000 +0000 @@ -1,10 +1,10 @@ [comment {-*- tcl -*- doctools manpage}] -[manpage_begin yaml n 0.3.5] +[manpage_begin yaml n 0.3.6] [copyright {2008 KATO Kanryu }] [moddesc {YAML processing}] [titledesc {YAML Format Encoder/Decoder}] [require Tcl 8.4] -[require yaml [opt 0.3.5]] +[require yaml [opt 0.3.6]] [description] [para] diff -Nru tcllib-1.13-dfsg/modules/yaml/yaml.tcl tcllib-1.14-dfsg/modules/yaml/yaml.tcl --- tcllib-1.13-dfsg/modules/yaml/yaml.tcl 2011-01-25 05:37:58.000000000 +0000 +++ tcllib-1.14-dfsg/modules/yaml/yaml.tcl 2011-12-13 18:13:22.000000000 +0000 @@ -3,7 +3,7 @@ # # See http://www.yaml.org/spec/1.1/ # -# yaml.tcl,v 0.3.5 2009-05-24 11:52:34 KATO Kanryu(kanryu6@users.sourceforge.net) +# yaml.tcl,v 0.3.6 2011-08-23 15:06:25 KATO Kanryu(kanryu6@users.sourceforge.net) # # It is published with the terms of tcllib's BSD-style license. # See the file named license.terms. @@ -16,7 +16,7 @@ package require dict } -package provide yaml 0.3.5 +package provide yaml 0.3.6 package require cmdline package require huddle @@ -253,8 +253,10 @@ } proc ::yaml::_composePlain {value} { - if {[huddle type $value] ne "plain"} {return $value} - set value [huddle strip $value] + if {$value ne ""} { + if {[huddle type $value] ne "plain"} {return $value} + set value [huddle strip $value] + } set pair [_toType $value] return [eval huddle wrap $pair] } diff -Nru tcllib-1.13-dfsg/modules/yaml/yaml.test tcllib-1.14-dfsg/modules/yaml/yaml.test --- tcllib-1.13-dfsg/modules/yaml/yaml.test 2011-01-25 05:37:58.000000000 +0000 +++ tcllib-1.14-dfsg/modules/yaml/yaml.test 2011-12-13 18:13:22.000000000 +0000 @@ -9,10 +9,12 @@ if {[lsearch [namespace children] ::tcltest] == -1} { # single test set selfrun 1 +# lappend auto_path [pwd] + set auto_path [linsert $auto_path 0 [pwd]] package require tcltest namespace import ::tcltest::* - puts [source huddle.tcl] - puts [source yaml.tcl] + puts [package require yaml] + } else { # all.tcl source [file join \ @@ -507,6 +509,22 @@ dictsort2 [yaml::yaml2dict $maps] {d d} } -result [dictsort2 {bar {sport baseball name steve fruit apple}} {d d}] +test yaml-6.6 "block mapping, with empty" -body { + set maps {foo: +some: value +} + dictsort2 [yaml::yaml2dict $maps] {d} +} -result [dictsort2 {foo {} some value} {d}] + +test yaml-6.7 "block mapping, with empty sequence" -body { + set maps {foo: [] +some: value +} + dictsort2 [yaml::yaml2dict $maps] {d} +} -result [dictsort2 {foo {} some value} {d}] + + + # -------------- diff -Nru tcllib-1.13-dfsg/sak.tcl tcllib-1.14-dfsg/sak.tcl --- tcllib-1.13-dfsg/sak.tcl 2011-01-25 05:38:02.000000000 +0000 +++ tcllib-1.14-dfsg/sak.tcl 2011-12-13 18:13:24.000000000 +0000 @@ -186,9 +186,9 @@ # We have multiple versions of the same package. We # remember all versions. - foreach {vlist m} $p($n) break + foreach {vlist mx} $p($n) break lappend vlist $v - set p($n) [list [lsort -uniq -dict $vlist] $m] + set p($n) [list [lsort -uniq -dict $vlist] $mx] } } close $f @@ -481,21 +481,36 @@ } proc xcopy {src dest recurse {pattern *}} { - foreach file [glob [file join $src $pattern]] { - set base [file tail $file] - set sub [file join $dest $base] - if {0 == [string compare CVS $base]} {continue} - if {[file isdirectory $file]} then { - if {$recurse} { - xcopy $file $sub $recurse $pattern + if {[string equal $pattern *] || !$recurse} { + foreach file [glob [file join $src $pattern]] { + set base [file tail $file] + set sub [file join $dest $base] + if {0 == [string compare CVS $base]} {continue} + if {[file isdirectory $file]} then { + if {$recurse} { + xcopy $file $sub $recurse $pattern + } + } else { + xcopyfile $file $sub } - } else { - xcopyfile $file $sub - } + } + } else { + foreach file [glob [file join $src *]] { + set base [file tail $file] + set sub [file join $dest $base] + if {[string equal CVS $base]} {continue} + if {[file isdirectory $file]} then { + if {$recurse} { + xcopy $file $sub $recurse $pattern + } + } else { + if {![string match $pattern $base]} {continue} + xcopyfile $file $sub + } + } } } - proc xxcopy {src dest recurse {pattern *}} { global package_name @@ -1177,7 +1192,7 @@ # Look for 'Released and tagged' within # the first four lines of the file. If # not present assume that the line is - # deeper down, indicatating that the module + # deeper down, indicating that the module # has been modified since the last release. set f [open $cl r] @@ -1195,7 +1210,6 @@ } close $f } - return $modified } @@ -1724,8 +1738,15 @@ # -debug and -clean only work with critcl >= v04 switch -exact -- $option { -keep { append flags " -keep" } - -debug { append flags " -debug" } + -debug { + append flags " -debug [lindex $argv 1]" + set argv [lreplace $argv 0 0] + } -clean { append flags " -clean" } + -target { + append flags " -target [lindex $argv 1]" + set argv [lreplace $argv 0 0] + } -- { set argv [lreplace $argv 0 0]; break } default { break } } diff -Nru tcllib-1.13-dfsg/support/installation/actions.tcl tcllib-1.14-dfsg/support/installation/actions.tcl --- tcllib-1.13-dfsg/support/installation/actions.tcl 2011-01-25 05:37:58.000000000 +0000 +++ tcllib-1.14-dfsg/support/installation/actions.tcl 2011-12-13 18:13:22.000000000 +0000 @@ -68,6 +68,16 @@ return } +proc _trt {module libdir} { + global distribution + + _tcr $module $libdir + xcopy \ + [file join $distribution modules $module] \ + [file join $libdir $module] \ + 0 *.template + return +} proc _manfile {f format ext docdir} { global distribution argv argc argv0 config diff -Nru tcllib-1.13-dfsg/support/installation/modules.tcl tcllib-1.14-dfsg/support/installation/modules.tcl --- tcllib-1.13-dfsg/support/installation/modules.tcl 2011-01-25 05:37:58.000000000 +0000 +++ tcllib-1.14-dfsg/support/installation/modules.tcl 2011-12-13 18:13:22.000000000 +0000 @@ -34,7 +34,6 @@ Exclude exif # name pkg doc example -Module pki _tcl _man _null Module aes _tcl _man _null Module amazon-s3 _tcl _man _null Module asn _tcl _man _null @@ -82,6 +81,7 @@ Module javascript _tcl _man _null Module jpeg _tcl _man _null Module json _tcl _man _null +Module lambda _tcl _man _null Module ldap _tcl _man _exa Module log _msg _man {_exax logger} Module map _tcl _man _null @@ -98,8 +98,10 @@ Module nns _tcl _man _null Module nntp _tcl _man _exa Module ntp _tcl _man _exa +Module ooutil _tcl _man _null Module otp _tcl _man _null -Module page _tcr _man _null +Module page _trt _man _null +Module pki _tcl _man _null Module pluginmgr _tcl _man _null Module png _tcl _man _null Module pop3 _tcl _man _null @@ -128,10 +130,12 @@ Module tiff _tcl _man _null Module transfer _tcl _man _null Module treeql _tcl _man _null +Module try _tcl _man _null Module uev _tcl _man _null Module units _tcl _man _null Module uri _tcl _man _null Module uuid _tcl _man _null +Module valtype _tcl _null _null Module virtchannel_base _tcl _null _null Module virtchannel_core _tcl _null _null Module virtchannel_transform _tcl _null _null diff -Nru tcllib-1.13-dfsg/support/installation/version.tcl tcllib-1.14-dfsg/support/installation/version.tcl --- tcllib-1.13-dfsg/support/installation/version.tcl 2011-01-25 05:38:03.000000000 +0000 +++ tcllib-1.14-dfsg/support/installation/version.tcl 2011-12-13 18:13:24.000000000 +0000 @@ -1,4 +1,4 @@ -package_version 1.13 +package_version 1.14 package_name tcllib dist_exclude config diff -Nru tcllib-1.13-dfsg/support/releases/history/README-1.14.txt tcllib-1.14-dfsg/support/releases/history/README-1.14.txt --- tcllib-1.13-dfsg/support/releases/history/README-1.14.txt 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/support/releases/history/README-1.14.txt 2011-12-13 18:13:29.000000000 +0000 @@ -0,0 +1,219 @@ +Overview +======== + + 21 new packages in 7 modules + 30 changed packages in 24 modules + 8 internally changed packages in 8 modules + 328 unchanged packages in 89 modules + 393 packages, total in 107 modules, total + +New in tcllib 1.14 +================== + + Module Package New Version Comments + ------------------ --------------------------------- ------------- ---------- + lambda lambda 1 + math math::decimal 1.0.2 T + ooutil oo::util 1 + pt pt::peg::import::peg 1 + try try 1 + ------------------ --------------------------------- ------------- ---------- + valtype valtype::common 1 + valtype::creditcard::amex 1 + valtype::creditcard::discover 1 + valtype::creditcard::mastercard 1 + valtype::creditcard::visa 1 + valtype::gs1::ean13 1 + valtype::iban 1 + valtype::imei 1 + valtype::isbn 1 + valtype::luhn 1 + valtype::luhn5 1 + valtype::usnpi 1 + valtype::verhoeff 1 + ------------------ --------------------------------- ------------- ---------- + virtchannel_base tcl::chan::cat 1.0.1 + tcl::chan::facade 1.0.1 + tcl::chan::std 1.0.1 + ------------------ --------------------------------- ------------- ---------- + +Changes from tcllib 1.13 to 1.14 +================================ + + tcllib 1.13 tcllib 1.14 + Module Package Old Version New Version Comments + ------------------ ------------------------------------ ------------- ------------- ---------- + cmdline cmdline 1.3.2 1.3.3 B T + ------------------ ------------------------------------ ------------- ------------- ---------- + coroutine coroutine 1 1.1 B + coroutine::auto 1 1.1 B + ------------------ ------------------------------------ ------------- ------------- ---------- + csv csv 0.7.2 0.7.3 B D T + doctools doctools 1.4.11 1.4.13 B T + fileutil fileutil::traverse 0.4.1 0.4.2 B + ftp ftp 2.4.9 2.4.11 B + ftpd ftpd 1.2.5 1.2.6 B + grammar_peg grammar::peg::interp 0.1 0.1.1 B + inifile inifile 0.2.3 0.2.4 B + interp interp 0.1.1 0.1.2 B + jpeg jpeg 0.3.5 0.4.0 I D + ------------------ ------------------------------------ ------------- ------------- ---------- + json json 1.1.1 1.1.2 B T + json::write 1 1.0.1 B + ------------------ ------------------------------------ ------------- ------------- ---------- + map map::slippy 0.3 0.4 B D T + pki pki 0.1 0.2 B T + ------------------ ------------------------------------ ------------- ------------- ---------- + pt pt::pgen 1 1.0.1 B + pt::rde 1.0.1 1.0.2 B T + pt::tclparam::configuration::tcloo 1.0.1 1.0.2 B T + ------------------ ------------------------------------ ------------- ------------- ---------- + rest rest 1.0.0 1.0 --- + simulation simulation::random 0.1 0.3 B D + smtpd smtpd 1.4.0 1.5 EF + struct struct::list 1.8 1.8.1 B + term term::ansi::ctrl::unix 0.1 0.1.1 B + textutil textutil::adjust 0.7 0.7.1 B + uri uri 1.2.1 1.2.2 B + ------------------ ------------------------------------ ------------- ------------- ---------- + virtchannel_base tcl::chan::memchan 1 1.0.2 B + tcl::chan::string 1 1.0.1 B + tcl::chan::variable 1 1.0.2 B + ------------------ ------------------------------------ ------------- ------------- ---------- + yaml yaml 0.3.5 0.3.6 B + ------------------ ------------------------------------ ------------- ------------- ---------- + +Invisible changes (documentation, testsuites) +============================================= + + tcllib 1.13 tcllib 1.14 + Module Package Old Version New Version Comments + ------------- ----------------------------------- ------------- ------------- ---------- + base64 base64 2.4.2 2.4.2 T + hook hook 0.1 0.1 D + math math::linearalgebra 1.1.4 1.1.4 D + multiplexer multiplexer 0.2 0.2 T + pop3 pop3 1.8 1.8 T + pop3d pop3d 1.1.0 1.1.0 T + pt pt::cparam::configuration::critcl 1.0.1 1.0.1 T + tepam tepam 0.2.0 0.2.0 T + ------------- ----------------------------------- ------------- ------------- ---------- + +Unchanged +========= + + aes, ascii85, asn, autoproxy, base32, base32::core, base32::hex, + bee, bench, bench::in, bench::out::csv, bench::out::text, + bibtex, blowfish, cache::async, calendar, char, cksum, comm, + configuration, control, counter, crc16, crc32, des, dns, + docstrip, docstrip::util, doctools::changelog, doctools::config, + doctools::cvs, doctools::html, doctools::html::cssdefaults, + doctools::idx, doctools::idx, doctools::idx::export, + doctools::idx::export::docidx, doctools::idx::export::html, + doctools::idx::export::json, doctools::idx::export::nroff, + doctools::idx::export::text, doctools::idx::export::wiki, + doctools::idx::import, doctools::idx::import::docidx, + doctools::idx::import::json, doctools::idx::parse, + doctools::idx::structure, doctools::msgcat, + doctools::msgcat::idx::c, doctools::msgcat::idx::de, + doctools::msgcat::idx::en, doctools::msgcat::idx::fr, + doctools::msgcat::toc::c, doctools::msgcat::toc::de, + doctools::msgcat::toc::en, doctools::msgcat::toc::fr, + doctools::nroff::man_macros, doctools::paths, + doctools::tcl::parse, doctools::text, doctools::toc, + doctools::toc, doctools::toc::export, + doctools::toc::export::doctoc, doctools::toc::export::html, + doctools::toc::export::json, doctools::toc::export::nroff, + doctools::toc::export::text, doctools::toc::export::wiki, + doctools::toc::import, doctools::toc::import::doctoc, + doctools::toc::import::json, doctools::toc::parse, + doctools::toc::structure, exif, fileutil, + fileutil::magic::cfront, fileutil::magic::cgen, + fileutil::magic::filetype, fileutil::magic::mimetype, + fileutil::magic::rt, fileutil::multi, fileutil::multi::op, + ftp::geturl, gpx, grammar::aycock, grammar::aycock::debug, + grammar::aycock::runtime, grammar::fa, grammar::fa::dacceptor, + grammar::fa::dexec, grammar::fa::op, grammar::me::cpu, + grammar::me::cpu::core, grammar::me::cpu::gasm, + grammar::me::tcl, grammar::me::util, grammar::peg, html, + htmlparse, huddle, ident, imap4, interp::delegate::method, + interp::delegate::proc, ip, irc, javascript, ldap, ldapx, log, + logger, logger::appender, logger::utils, map::slippy::cache, + map::slippy::fetcher, mapproj, math, math::bigfloat, + math::bignum, math::calculus, math::calculus::symdiff, + math::complexnumbers, math::constants, math::fourier, + math::fuzzy, math::geometry, math::interpolate, + math::machineparameters, math::numtheory, math::optimize, + math::polynomials, math::rationalfunctions, math::roman, + math::special, math::statistics, md4, md5, md5crypt, mime, + nameserv, nameserv::auto, nameserv::common, nameserv::server, + namespacex, ncgi, nmea, nntp, otp, page::analysis::peg::emodes, + page::analysis::peg::minimize, page::analysis::peg::reachable, + page::analysis::peg::realizable, page::compiler::peg::mecpu, + page::config::peg, page::gen::peg::canon, page::gen::peg::cpkg, + page::gen::peg::hb, page::gen::peg::me, page::gen::peg::mecpu, + page::gen::peg::ser, page::gen::tree::text, page::parse::lemon, + page::parse::peg, page::parse::peghb, page::parse::pegser, + page::pluginmgr, page::reader::hb, page::reader::lemon, + page::reader::peg, page::reader::ser, page::reader::treeser, + page::transform::mecpu, page::transform::reachable, + page::transform::realizable, page::util::flow, + page::util::norm::lemon, page::util::norm::peg, page::util::peg, + page::util::quote, page::writer::hb, page::writer::identity, + page::writer::me, page::writer::mecpu, page::writer::null, + page::writer::peg, page::writer::ser, page::writer::tpc, + page::writer::tree, paths, picoirc, pluginmgr, png, pop3d::dbox, + pop3d::udb, profiler, pt::ast, pt::parse::peg, pt::pe, + pt::pe::op, pt::peg, pt::peg::container, + pt::peg::container::peg, pt::peg::export, + pt::peg::export::container, pt::peg::export::json, + pt::peg::export::peg, pt::peg::from::json, pt::peg::from::peg, + pt::peg::import, pt::peg::import::json, pt::peg::interp, + pt::peg::op, pt::peg::to::container, pt::peg::to::cparam, + pt::peg::to::json, pt::peg::to::param, pt::peg::to::peg, + pt::peg::to::tclparam, pt::tclparam::configuration::snit, rc4, + rcs, report, resolv, ripemd128, ripemd160, S3, SASL, SASL::NTLM, + SASL::XGoogleToken, sha1, sha256, simulation::annealing, + simulation::montecarlo, smtp, snit, soundex, spf, stooop, + stringprep, stringprep::data, struct, struct::disjointset, + struct::graph, struct::graph::op, struct::matrix, struct::pool, + struct::prioqueue, struct::queue, struct::record, struct::set, + struct::skiplist, struct::stack, struct::tree, sum, switched, + tar, tcl::chan::core, tcl::chan::events, tcl::chan::fifo, + tcl::chan::fifo2, tcl::chan::halfpipe, tcl::chan::null, + tcl::chan::nullzero, tcl::chan::random, tcl::chan::textwindow, + tcl::chan::zero, tcl::randomseed, tcl::transform::adler32, + tcl::transform::base64, tcl::transform::core, + tcl::transform::counter, tcl::transform::crc32, + tcl::transform::hex, tcl::transform::identity, + tcl::transform::limitsize, tcl::transform::observe, + tcl::transform::otp, tcl::transform::rot, + tcl::transform::spacer, tcl::transform::zlib, tclDES, tclDESjr, + term, term::ansi::code, term::ansi::code::attr, + term::ansi::code::ctrl, term::ansi::code::macros, + term::ansi::send, term::interact::menu, term::interact::pager, + term::receive, term::receive::bind, term::send, text::write, + textutil, textutil::expander, textutil::repeat, textutil::split, + textutil::string, textutil::tabify, textutil::trim, tie, + tie::std::array, tie::std::dsource, tie::std::file, + tie::std::growfile, tie::std::log, tie::std::rarray, tiff, time, + transfer::connect, transfer::copy, transfer::copy::queue, + transfer::data::destination, transfer::data::source, + transfer::receiver, transfer::transmitter, treeql, uevent, + uevent::onidle, unicode, unicode::data, units, uri::urn, + uuencode, uuid, wip, xsxp, yencode + +Legend Change Details Comments + ------ ------- --------- + Major API: ** incompatible ** API changes. + + Minor EF : Extended functionality, API. + I : Major rewrite, but no API change + + Patch B : Bug fixes. + EX : New examples. + P : Performance enhancement. + + None T : Testsuite changes. + D : Documentation updates. + diff -Nru tcllib-1.13-dfsg/support/releases/PACKAGES tcllib-1.14-dfsg/support/releases/PACKAGES --- tcllib-1.13-dfsg/support/releases/PACKAGES 2011-01-25 05:38:07.000000000 +0000 +++ tcllib-1.14-dfsg/support/releases/PACKAGES 2011-12-13 18:13:30.000000000 +0000 @@ -1,4 +1,4 @@ -@@ RELEASE 1.13 +@@ RELEASE 1.14 S3 1.0.0 SASL 1.3.2 @@ -23,21 +23,21 @@ calendar 0.2 char 1 cksum 1.1.3 -cmdline 1.3.2 +cmdline 1.3.3 comm 4.6.2 configuration 1 control 0.1.3 -coroutine 1 -coroutine::auto 1 +coroutine 1.1 +coroutine::auto 1.1 counter 2.0.4 crc16 1.1.1 crc32 1.3.1 -csv 0.7.2 +csv 0.7.3 des 1.1.0 dns 1.3.3 docstrip 1.2 docstrip::util 1.3 -doctools 1.4.11 +doctools 1.4.13 doctools::changelog 1 doctools::config 0.1 doctools::cvs 1 @@ -93,10 +93,10 @@ fileutil::magic::rt 1.0 fileutil::multi 0.1 fileutil::multi::op 0.5.3 -fileutil::traverse 0.4.1 -ftp 2.4.9 +fileutil::traverse 0.4.2 +ftp 2.4.11 ftp::geturl 0.2.1 -ftpd 1.2.5 +ftpd 1.2.6 gpx 1 grammar::aycock 1.0 grammar::aycock::debug 1.0 @@ -111,30 +111,31 @@ grammar::me::tcl 0.1 grammar::me::util 0.1 grammar::peg 0.1 -grammar::peg::interp 0.1 +grammar::peg::interp 0.1.1 hook 0.1 html 1.4 htmlparse 1.2 huddle 0.1.5 ident 0.42 imap4 0.3 -inifile 0.2.3 -interp 0.1.1 +inifile 0.2.4 +interp 0.1.2 interp::delegate::method 0.2 interp::delegate::proc 0.2 ip 1.2 irc 0.6.1 javascript 1.0.2 -jpeg 0.3.5 -json 1.1.1 -json::write 1 +jpeg 0.4.0 +json 1.1.2 +json::write 1.0.1 +lambda 1 ldap 1.8 ldapx 1.0 log 1.3 logger 0.9 logger::appender 1.3 logger::utils 1.3 -map::slippy 0.3 +map::slippy 0.4 map::slippy::cache 0.2 map::slippy::fetcher 0.2 mapproj 1.0 @@ -146,6 +147,7 @@ math::calculus::symdiff 1.0 math::complexnumbers 1.0.2 math::constants 1.0.1 +math::decimal 1.0.2 math::fourier 1.0.2 math::fuzzy 0.2.1 math::geometry 1.1.2 @@ -173,6 +175,7 @@ ncgi 1.3.2 nmea 1.0.0 nntp 0.2.1 +oo::util 1 otp 1.0.0 page::analysis::peg::emodes 0.1 page::analysis::peg::minimize 0.1 @@ -216,7 +219,7 @@ page::writer::tree 0.1 paths 1 picoirc 0.5.1 -pki 0.1 +pki 0.2 pluginmgr 0.3 png 0.1.2 pop3 1.8 @@ -240,6 +243,7 @@ pt::peg::from::peg 1 pt::peg::import 1 pt::peg::import::json 1 +pt::peg::import::peg 1 pt::peg::interp 1 pt::peg::op 1 pt::peg::to::container 1 @@ -248,15 +252,15 @@ pt::peg::to::param 1 pt::peg::to::peg 1 pt::peg::to::tclparam 1 -pt::pgen 1 -pt::rde 1.0.1 +pt::pgen 1.0.1 +pt::rde 1.0.2 pt::tclparam::configuration::snit 1.0.1 -pt::tclparam::configuration::tcloo 1.0.1 +pt::tclparam::configuration::tcloo 1.0.2 rc4 1.1.0 rcs 0.1 report 0.3.1 resolv 1.0.3 -rest 1.0.0 +rest 1.0 ripemd128 1.0.4 ripemd160 1.0.4 sha1 1.1.0 @@ -264,9 +268,9 @@ sha256 1.0.3 simulation::annealing 0.2 simulation::montecarlo 0.1 -simulation::random 0.1 +simulation::random 0.3 smtp 1.4.5 -smtpd 1.4.0 +smtpd 1.5 snit 1.4.2 snit 2.3.2 soundex 1.0 @@ -280,7 +284,7 @@ struct::graph 1.2.1 struct::graph 2.4 struct::graph::op 0.11.3 -struct::list 1.8 +struct::list 1.8.1 struct::matrix 1.2.1 struct::matrix 2.0.2 struct::pool 1.2.1 @@ -295,18 +299,21 @@ sum 1.1.0 switched 2.2.1 tar 0.7 +tcl::chan::cat 1.0.1 tcl::chan::core 1 tcl::chan::events 1 +tcl::chan::facade 1.0.1 tcl::chan::fifo 1 tcl::chan::fifo2 1 tcl::chan::halfpipe 1 -tcl::chan::memchan 1 +tcl::chan::memchan 1.0.2 tcl::chan::null 1 tcl::chan::nullzero 1 tcl::chan::random 1 -tcl::chan::string 1 +tcl::chan::std 1.0.1 +tcl::chan::string 1.0.1 tcl::chan::textwindow 1 -tcl::chan::variable 1 +tcl::chan::variable 1.0.2 tcl::chan::zero 1 tcl::randomseed 1 tcl::transform::adler32 1 @@ -330,7 +337,7 @@ term::ansi::code::attr 0.1 term::ansi::code::ctrl 0.1.1 term::ansi::code::macros 0.1 -term::ansi::ctrl::unix 0.1 +term::ansi::ctrl::unix 0.1.1 term::ansi::send 0.1 term::interact::menu 0.1 term::interact::pager 0.1 @@ -339,7 +346,7 @@ term::send 0.1 text::write 1 textutil 0.7.1 -textutil::adjust 0.7 +textutil::adjust 0.7.1 textutil::expander 1.3.1 textutil::repeat 0.7 textutil::split 0.7 @@ -363,17 +370,31 @@ transfer::receiver 0.2 transfer::transmitter 0.2 treeql 1.3.1 +try 1 uevent 0.2 uevent::onidle 0.1 unicode 1.0.0 unicode::data 1.0.0 units 2.1.1 -uri 1.2.1 +uri 1.2.2 uri::urn 1.0.2 uuencode 1.1.5 uuid 1.0.1 +valtype::common 1 +valtype::creditcard::amex 1 +valtype::creditcard::discover 1 +valtype::creditcard::mastercard 1 +valtype::creditcard::visa 1 +valtype::gs1::ean13 1 +valtype::iban 1 +valtype::imei 1 +valtype::isbn 1 +valtype::luhn 1 +valtype::luhn5 1 +valtype::usnpi 1 +valtype::verhoeff 1 wip 1.2 wip 2.2 xsxp 1.0 -yaml 0.3.5 +yaml 0.3.6 yencode 1.1.3 diff -Nru tcllib-1.13-dfsg/support/releases/PACKAGES.LAST tcllib-1.14-dfsg/support/releases/PACKAGES.LAST --- tcllib-1.13-dfsg/support/releases/PACKAGES.LAST 2011-01-25 05:37:58.000000000 +0000 +++ tcllib-1.14-dfsg/support/releases/PACKAGES.LAST 2011-12-13 18:13:22.000000000 +0000 @@ -1,335 +1,379 @@ -@@ RELEASE 1.12 +@@ RELEASE 1.13 -S3 1.0.0 -SASL 1.3.2 -SASL::NTLM 1.1.1 -SASL::XGoogleToken 1.0.1 -aes 1.0.1 -asn 0.8.3 -autoproxy 1.5.1 -base32 0.1 -base32::core 0.1 -base32::hex 0.1 -base64 2.4.1 -bee 0.1 -bench 0.4 -bench::in 0.1 -bench::out::csv 0.1.2 -bench::out::text 0.1.2 -bibtex 0.5 -blowfish 1.0.4 -cache::async 0.3 -calendar 0.2 -cksum 1.1.3 -cmdline 1.3.1 -comm 4.6.1 -control 0.1.3 -coroutine 1 -coroutine::auto 1 -counter 2.0.4 -crc16 1.1.1 -crc32 1.3.1 -csv 0.7.1 -des 1.1.0 -dns 1.3.3 -docstrip 1.2 -docstrip::util 1.2 -doctools 1.4.3 -doctools::changelog 1 -doctools::config 0.1 -doctools::cvs 1 -doctools::html 0.1 -doctools::html::cssdefaults 0.1 -doctools::idx 1.0.3 -doctools::idx 2 -doctools::idx::export 0.1 -doctools::idx::export::docidx 0.1 -doctools::idx::export::html 0.2 -doctools::idx::export::json 0.1 -doctools::idx::export::nroff 0.3 -doctools::idx::export::text 0.2 -doctools::idx::export::wiki 0.2 -doctools::idx::import 0.1 -doctools::idx::import::docidx 0.1 -doctools::idx::import::json 0.1 -doctools::idx::parse 0.1 -doctools::idx::structure 0.1 -doctools::msgcat 0.1 -doctools::msgcat::idx::c 0.1 -doctools::msgcat::idx::de 0.1 -doctools::msgcat::idx::en 0.1 -doctools::msgcat::idx::fr 0.1 -doctools::msgcat::toc::c 0.1 -doctools::msgcat::toc::de 0.1 -doctools::msgcat::toc::en 0.1 -doctools::msgcat::toc::fr 0.1 -doctools::nroff::man_macros 0.1 -doctools::paths 0.1 -doctools::tcl::parse 0.1 -doctools::text 0.1 -doctools::toc 1.1.2 -doctools::toc 2 -doctools::toc::export 0.1 -doctools::toc::export::doctoc 0.1 -doctools::toc::export::html 0.1 -doctools::toc::export::json 0.1 -doctools::toc::export::nroff 0.2 -doctools::toc::export::text 0.1 -doctools::toc::export::wiki 0.1 -doctools::toc::import 0.1 -doctools::toc::import::doctoc 0.1 -doctools::toc::import::json 0.1 -doctools::toc::parse 0.1 -doctools::toc::structure 0.1 -exif 1.1.2 -fileutil 1.14.2 -fileutil::magic::cfront 1.0 -fileutil::magic::cgen 1.0 -fileutil::magic::filetype 1.0.2 -fileutil::magic::mimetype 1.0.2 -fileutil::magic::rt 1.0 -fileutil::multi 0.1 -fileutil::multi::op 0.5.3 -fileutil::traverse 0.4.1 -ftp 2.4.9 -ftp::geturl 0.2.1 -ftpd 1.2.4 -grammar::fa 0.4 -grammar::fa::dacceptor 0.1.1 -grammar::fa::dexec 0.2 -grammar::fa::op 0.4.1 -grammar::me::cpu 0.2 -grammar::me::cpu::core 0.2 -grammar::me::cpu::gasm 0.1 -grammar::me::tcl 0.1 -grammar::me::util 0.1 -grammar::peg 0.1 -grammar::peg::interp 0.1 -html 1.4 -htmlparse 1.2 -huddle 0.1.4 -ident 0.42 -inifile 0.2.3 -interp 0.1.1 -interp::delegate::method 0.2 -interp::delegate::proc 0.2 -ip 1.1.3 -irc 0.6.1 -javascript 1.0.2 -jpeg 0.3.5 -json 1.0.1 -json::write 1 -ldap 1.8 -ldapx 1.0 -log 1.3 -logger 0.9 -logger::appender 1.3 -logger::utils 1.3 -map::slippy 0.2 -map::slippy::cache 0.2 -map::slippy::fetcher 0.2 -mapproj 1.0 -math 1.2.5 -math::bigfloat 1.2.2 -math::bigfloat 2.0.1 -math::bignum 3.1.1 -math::calculus 0.7.1 -math::complexnumbers 1.0.2 -math::constants 1.0.1 -math::fourier 1.0.2 -math::fuzzy 0.2 -math::geometry 1.0.4 -math::interpolate 1.0.3 -math::linearalgebra 1.1.3 -math::machineparameters 0.1 -math::optimize 1.0 -math::polynomials 1.0.1 -math::rationalfunctions 1.0.1 -math::roman 1.0 -math::special 0.2.2 -math::statistics 0.6.3 -md4 1.0.5 -md5 1.4.4 -md5 2.0.7 -md5crypt 1.1.0 -mime 1.5.4 -multiplexer 0.2 -nameserv 0.4.2 -nameserv::auto 0.3 -nameserv::common 0.1 -nameserv::server 0.3.2 -ncgi 1.3.2 -nmea 1.0.0 -nntp 0.2.1 -otp 1.0.0 -page::analysis::peg::emodes 0.1 -page::analysis::peg::minimize 0.1 -page::analysis::peg::reachable 0.1 -page::analysis::peg::realizable 0.1 -page::compiler::peg::mecpu 0.1.1 -page::config::peg 0.1 -page::gen::peg::canon 0.1 -page::gen::peg::cpkg 0.1 -page::gen::peg::hb 0.1 -page::gen::peg::me 0.1 -page::gen::peg::mecpu 0.1 -page::gen::peg::ser 0.1 -page::gen::tree::text 0.1 -page::parse::lemon 0.1 -page::parse::peg 0.1 -page::parse::peghb 0.1 -page::parse::pegser 0.1 -page::pluginmgr 0.2 -page::reader::hb 0.1 -page::reader::lemon 0.1 -page::reader::peg 0.1 -page::reader::ser 0.1 -page::reader::treeser 0.1 -page::transform::mecpu 0.1 -page::transform::reachable 0.1 -page::transform::realizable 0.1 -page::util::flow 0.1 -page::util::norm::lemon 0.1 -page::util::norm::peg 0.1 -page::util::peg 0.1 -page::util::quote 0.1 -page::writer::hb 0.1 -page::writer::identity 0.1 -page::writer::me 0.1 -page::writer::mecpu 0.1.1 -page::writer::null 0.1 -page::writer::peg 0.1 -page::writer::ser 0.1 -page::writer::tpc 0.1 -page::writer::tree 0.1 -picoirc 0.5.1 -pluginmgr 0.3 -png 0.1.2 -pop3 1.7 -pop3d 1.1.0 -pop3d::dbox 1.0.2 -pop3d::udb 1.1 -profiler 0.3 -rc4 1.1.0 -rcs 0.1 -report 0.3.1 -resolv 1.0.3 -rest 1.0.0 -ripemd128 1.0.4 -ripemd160 1.0.4 -sha1 1.1.0 -sha1 2.0.3 -sha256 1.0.2 -simulation::annealing 0.2 -simulation::montecarlo 0.1 -simulation::random 0.1 -smtp 1.4.5 -smtpd 1.4.0 -snit 1.4.1 -snit 2.3.1 -soundex 1.0 -spf 1.1.1 -stooop 4.4.1 -stringprep 1.0.1 -stringprep::data 1.0.1 -struct 1.4 -struct 2.1 -struct::disjointset 1.0 -struct::graph 1.2.1 -struct::graph 2.4 -struct::graph::op 0.11.3 -struct::list 1.7 -struct::matrix 1.2.1 -struct::matrix 2.0.2 -struct::pool 1.2.1 -struct::prioqueue 1.4 -struct::queue 1.4.1 -struct::record 1.2.1 -struct::set 2.2.3 -struct::skiplist 1.3 -struct::stack 1.4 -struct::tree 1.2.2 -struct::tree 2.1.2 -sum 1.1.0 -switched 2.2.1 -tar 0.6 -tcl::chan::core 1 -tcl::chan::events 1 -tcl::chan::fifo 1 -tcl::chan::fifo2 1 -tcl::chan::halfpipe 1 -tcl::chan::memchan 1 -tcl::chan::null 1 -tcl::chan::nullzero 1 -tcl::chan::random 1 -tcl::chan::string 1 -tcl::chan::textwindow 1 -tcl::chan::variable 1 -tcl::chan::zero 1 -tcl::randomseed 1 -tcl::transform::adler32 1 -tcl::transform::base64 1 -tcl::transform::core 1 -tcl::transform::counter 1 -tcl::transform::crc32 1 -tcl::transform::hex 1 -tcl::transform::identity 1 -tcl::transform::limitsize 1 -tcl::transform::observe 1 -tcl::transform::otp 1 -tcl::transform::rot 1 -tcl::transform::spacer 1 -tcl::transform::zlib 1 -tclDES 1.0.0 -tclDESjr 1.0.0 -term 0.1 -term::ansi::code 0.1 -term::ansi::code::attr 0.1 -term::ansi::code::ctrl 0.1.1 -term::ansi::code::macros 0.1 -term::ansi::ctrl::unix 0.1 -term::ansi::send 0.1 -term::interact::menu 0.1 -term::interact::pager 0.1 -term::receive 0.1 -term::receive::bind 0.1 -term::send 0.1 -textutil 0.7.1 -textutil::adjust 0.7 -textutil::expander 1.3.1 -textutil::repeat 0.7 -textutil::split 0.7 -textutil::string 0.7.1 -textutil::tabify 0.7 -textutil::trim 0.7 -tie 1.1 -tie::std::array 1.0 -tie::std::dsource 1.0 -tie::std::file 1.0.4 -tie::std::growfile 1.0 -tie::std::log 1.0 -tie::std::rarray 1.0 -tiff 0.2.1 -time 1.2.1 -transfer::connect 0.2 -transfer::copy 0.3 -transfer::copy::queue 0.1 -transfer::data::destination 0.2 -transfer::data::source 0.2 -transfer::receiver 0.2 -transfer::transmitter 0.2 -treeql 1.3.1 -uevent 0.2 -uevent::onidle 0.1 -unicode 1.0.0 -unicode::data 1.0.0 -units 2.1 -uri 1.2.1 -uri::urn 1.0.2 -uuencode 1.1.5 -uuid 1.0.1 -wip 1.1.2 -wip 2.1.2 -xsxp 1.0 -yaml 0.3.5 -yencode 1.1.3 +S3 1.0.0 +SASL 1.3.2 +SASL::NTLM 1.1.1 +SASL::XGoogleToken 1.0.1 +aes 1.0.2 +ascii85 1.0 +asn 0.8.4 +autoproxy 1.5.1 +base32 0.1 +base32::core 0.1 +base32::hex 0.1 +base64 2.4.2 +bee 0.1 +bench 0.4 +bench::in 0.1 +bench::out::csv 0.1.2 +bench::out::text 0.1.2 +bibtex 0.5 +blowfish 1.0.4 +cache::async 0.3 +calendar 0.2 +char 1 +cksum 1.1.3 +cmdline 1.3.2 +comm 4.6.2 +configuration 1 +control 0.1.3 +coroutine 1 +coroutine::auto 1 +counter 2.0.4 +crc16 1.1.1 +crc32 1.3.1 +csv 0.7.2 +des 1.1.0 +dns 1.3.3 +docstrip 1.2 +docstrip::util 1.3 +doctools 1.4.11 +doctools::changelog 1 +doctools::config 0.1 +doctools::cvs 1 +doctools::html 0.1 +doctools::html::cssdefaults 0.1 +doctools::idx 1.0.4 +doctools::idx 2 +doctools::idx::export 0.1 +doctools::idx::export::docidx 0.1 +doctools::idx::export::html 0.2 +doctools::idx::export::json 0.1 +doctools::idx::export::nroff 0.3 +doctools::idx::export::text 0.2 +doctools::idx::export::wiki 0.2 +doctools::idx::import 0.1 +doctools::idx::import::docidx 0.1 +doctools::idx::import::json 0.1 +doctools::idx::parse 0.1 +doctools::idx::structure 0.1 +doctools::msgcat 0.1 +doctools::msgcat::idx::c 0.1 +doctools::msgcat::idx::de 0.1 +doctools::msgcat::idx::en 0.1 +doctools::msgcat::idx::fr 0.1 +doctools::msgcat::toc::c 0.1 +doctools::msgcat::toc::de 0.1 +doctools::msgcat::toc::en 0.1 +doctools::msgcat::toc::fr 0.1 +doctools::nroff::man_macros 0.1 +doctools::paths 0.1 +doctools::tcl::parse 0.1 +doctools::text 0.1 +doctools::toc 1.1.3 +doctools::toc 2 +doctools::toc::export 0.1 +doctools::toc::export::doctoc 0.1 +doctools::toc::export::html 0.1 +doctools::toc::export::json 0.1 +doctools::toc::export::nroff 0.2 +doctools::toc::export::text 0.1 +doctools::toc::export::wiki 0.1 +doctools::toc::import 0.1 +doctools::toc::import::doctoc 0.1 +doctools::toc::import::json 0.1 +doctools::toc::parse 0.1 +doctools::toc::structure 0.1 +exif 1.1.2 +fileutil 1.14.4 +fileutil::magic::cfront 1.0 +fileutil::magic::cgen 1.0 +fileutil::magic::filetype 1.0.2 +fileutil::magic::mimetype 1.0.2 +fileutil::magic::rt 1.0 +fileutil::multi 0.1 +fileutil::multi::op 0.5.3 +fileutil::traverse 0.4.1 +ftp 2.4.9 +ftp::geturl 0.2.1 +ftpd 1.2.5 +gpx 1 +grammar::aycock 1.0 +grammar::aycock::debug 1.0 +grammar::aycock::runtime 1.0 +grammar::fa 0.4 +grammar::fa::dacceptor 0.1.1 +grammar::fa::dexec 0.2 +grammar::fa::op 0.4.1 +grammar::me::cpu 0.2 +grammar::me::cpu::core 0.2 +grammar::me::cpu::gasm 0.1 +grammar::me::tcl 0.1 +grammar::me::util 0.1 +grammar::peg 0.1 +grammar::peg::interp 0.1 +hook 0.1 +html 1.4 +htmlparse 1.2 +huddle 0.1.5 +ident 0.42 +imap4 0.3 +inifile 0.2.3 +interp 0.1.1 +interp::delegate::method 0.2 +interp::delegate::proc 0.2 +ip 1.2 +irc 0.6.1 +javascript 1.0.2 +jpeg 0.3.5 +json 1.1.1 +json::write 1 +ldap 1.8 +ldapx 1.0 +log 1.3 +logger 0.9 +logger::appender 1.3 +logger::utils 1.3 +map::slippy 0.3 +map::slippy::cache 0.2 +map::slippy::fetcher 0.2 +mapproj 1.0 +math 1.2.5 +math::bigfloat 1.2.2 +math::bigfloat 2.0.1 +math::bignum 3.1.1 +math::calculus 0.7.1 +math::calculus::symdiff 1.0 +math::complexnumbers 1.0.2 +math::constants 1.0.1 +math::fourier 1.0.2 +math::fuzzy 0.2.1 +math::geometry 1.1.2 +math::interpolate 1.0.3 +math::linearalgebra 1.1.4 +math::machineparameters 0.1 +math::numtheory 1.0 +math::optimize 1.0 +math::polynomials 1.0.1 +math::rationalfunctions 1.0.1 +math::roman 1.0 +math::special 0.2.2 +math::statistics 0.7.0 +md4 1.0.5 +md5 1.4.4 +md5 2.0.7 +md5crypt 1.1.0 +mime 1.5.4 +multiplexer 0.2 +nameserv 0.4.2 +nameserv::auto 0.3 +nameserv::common 0.1 +nameserv::server 0.3.2 +namespacex 0.1 +ncgi 1.3.2 +nmea 1.0.0 +nntp 0.2.1 +otp 1.0.0 +page::analysis::peg::emodes 0.1 +page::analysis::peg::minimize 0.1 +page::analysis::peg::reachable 0.1 +page::analysis::peg::realizable 0.1 +page::compiler::peg::mecpu 0.1.1 +page::config::peg 0.1 +page::gen::peg::canon 0.1 +page::gen::peg::cpkg 0.1 +page::gen::peg::hb 0.1 +page::gen::peg::me 0.1 +page::gen::peg::mecpu 0.1 +page::gen::peg::ser 0.1 +page::gen::tree::text 0.1 +page::parse::lemon 0.1 +page::parse::peg 0.1 +page::parse::peghb 0.1 +page::parse::pegser 0.1 +page::pluginmgr 0.2 +page::reader::hb 0.1 +page::reader::lemon 0.1 +page::reader::peg 0.1 +page::reader::ser 0.1 +page::reader::treeser 0.1 +page::transform::mecpu 0.1 +page::transform::reachable 0.1 +page::transform::realizable 0.1 +page::util::flow 0.1 +page::util::norm::lemon 0.1 +page::util::norm::peg 0.1 +page::util::peg 0.1 +page::util::quote 0.1 +page::writer::hb 0.1 +page::writer::identity 0.1 +page::writer::me 0.1 +page::writer::mecpu 0.1.1 +page::writer::null 0.1 +page::writer::peg 0.1 +page::writer::ser 0.1 +page::writer::tpc 0.1 +page::writer::tree 0.1 +paths 1 +picoirc 0.5.1 +pki 0.1 +pluginmgr 0.3 +png 0.1.2 +pop3 1.8 +pop3d 1.1.0 +pop3d::dbox 1.0.2 +pop3d::udb 1.1 +profiler 0.3 +pt::ast 1.1 +pt::cparam::configuration::critcl 1.0.1 +pt::parse::peg 1 +pt::pe 1 +pt::pe::op 1 +pt::peg 1 +pt::peg::container 1 +pt::peg::container::peg 1 +pt::peg::export 1 +pt::peg::export::container 1 +pt::peg::export::json 1 +pt::peg::export::peg 1 +pt::peg::from::json 1 +pt::peg::from::peg 1 +pt::peg::import 1 +pt::peg::import::json 1 +pt::peg::interp 1 +pt::peg::op 1 +pt::peg::to::container 1 +pt::peg::to::cparam 1.0.1 +pt::peg::to::json 1 +pt::peg::to::param 1 +pt::peg::to::peg 1 +pt::peg::to::tclparam 1 +pt::pgen 1 +pt::rde 1.0.1 +pt::tclparam::configuration::snit 1.0.1 +pt::tclparam::configuration::tcloo 1.0.1 +rc4 1.1.0 +rcs 0.1 +report 0.3.1 +resolv 1.0.3 +rest 1.0.0 +ripemd128 1.0.4 +ripemd160 1.0.4 +sha1 1.1.0 +sha1 2.0.3 +sha256 1.0.3 +simulation::annealing 0.2 +simulation::montecarlo 0.1 +simulation::random 0.1 +smtp 1.4.5 +smtpd 1.4.0 +snit 1.4.2 +snit 2.3.2 +soundex 1.0 +spf 1.1.1 +stooop 4.4.1 +stringprep 1.0.1 +stringprep::data 1.0.1 +struct 1.4 +struct 2.1 +struct::disjointset 1.0 +struct::graph 1.2.1 +struct::graph 2.4 +struct::graph::op 0.11.3 +struct::list 1.8 +struct::matrix 1.2.1 +struct::matrix 2.0.2 +struct::pool 1.2.1 +struct::prioqueue 1.4 +struct::queue 1.4.2 +struct::record 1.2.1 +struct::set 2.2.3 +struct::skiplist 1.3 +struct::stack 1.5.1 +struct::tree 1.2.2 +struct::tree 2.1.2 +sum 1.1.0 +switched 2.2.1 +tar 0.7 +tcl::chan::core 1 +tcl::chan::events 1 +tcl::chan::fifo 1 +tcl::chan::fifo2 1 +tcl::chan::halfpipe 1 +tcl::chan::memchan 1 +tcl::chan::null 1 +tcl::chan::nullzero 1 +tcl::chan::random 1 +tcl::chan::string 1 +tcl::chan::textwindow 1 +tcl::chan::variable 1 +tcl::chan::zero 1 +tcl::randomseed 1 +tcl::transform::adler32 1 +tcl::transform::base64 1 +tcl::transform::core 1 +tcl::transform::counter 1 +tcl::transform::crc32 1 +tcl::transform::hex 1 +tcl::transform::identity 1 +tcl::transform::limitsize 1 +tcl::transform::observe 1 +tcl::transform::otp 1 +tcl::transform::rot 1 +tcl::transform::spacer 1 +tcl::transform::zlib 1 +tclDES 1.0.0 +tclDESjr 1.0.0 +tepam 0.2.0 +term 0.1 +term::ansi::code 0.1 +term::ansi::code::attr 0.1 +term::ansi::code::ctrl 0.1.1 +term::ansi::code::macros 0.1 +term::ansi::ctrl::unix 0.1 +term::ansi::send 0.1 +term::interact::menu 0.1 +term::interact::pager 0.1 +term::receive 0.1 +term::receive::bind 0.1 +term::send 0.1 +text::write 1 +textutil 0.7.1 +textutil::adjust 0.7 +textutil::expander 1.3.1 +textutil::repeat 0.7 +textutil::split 0.7 +textutil::string 0.7.1 +textutil::tabify 0.7 +textutil::trim 0.7 +tie 1.1 +tie::std::array 1.0 +tie::std::dsource 1.0 +tie::std::file 1.0.4 +tie::std::growfile 1.0 +tie::std::log 1.0 +tie::std::rarray 1.0 +tiff 0.2.1 +time 1.2.1 +transfer::connect 0.2 +transfer::copy 0.3 +transfer::copy::queue 0.1 +transfer::data::destination 0.2 +transfer::data::source 0.2 +transfer::receiver 0.2 +transfer::transmitter 0.2 +treeql 1.3.1 +uevent 0.2 +uevent::onidle 0.1 +unicode 1.0.0 +unicode::data 1.0.0 +units 2.1.1 +uri 1.2.1 +uri::urn 1.0.2 +uuencode 1.1.5 +uuid 1.0.1 +wip 1.2 +wip 2.2 +xsxp 1.0 +yaml 0.3.5 +yencode 1.1.3 diff -Nru tcllib-1.13-dfsg/tcllib.spec tcllib-1.14-dfsg/tcllib.spec --- tcllib-1.13-dfsg/tcllib.spec 2011-01-25 05:38:08.000000000 +0000 +++ tcllib-1.14-dfsg/tcllib.spec 2011-12-13 18:13:30.000000000 +0000 @@ -1,6 +1,6 @@ # $Id: package_rpm.txt,v 1.1 2006/07/01 03:16:57 andreas_kupries Exp $ -%define version 1.13 +%define version 1.14 %define directory /usr Summary: The standard Tcl library diff -Nru tcllib-1.13-dfsg/tcllib.tap tcllib-1.14-dfsg/tcllib.tap --- tcllib-1.13-dfsg/tcllib.tap 2011-01-25 05:39:00.000000000 +0000 +++ tcllib-1.14-dfsg/tcllib.tap 2011-12-13 18:13:54.000000000 +0000 @@ -2,11 +2,11 @@ fmtver 2.0 fmttool {TclDevKit TclApp PackageDefinition} 2.5 -## Saved at : Mon Jan 24 09:38:56 PM PST 2011 +## Saved at : Tue Dec 13 10:13:49 PST 2011 ## By : aku ## ## Generated by "sak.tcl tap" -## of tcllib 1.13 +## of tcllib 1.14 ######## ##### @@ -17,12 +17,11 @@ # ############### # Complete bundle -Package {tcllib 1.13} +Package {tcllib 1.14} Base @TAP_DIR@ Platform * Desc {Tcllib: Bundle of all packages} Path pkgIndex.tcl -Path pki Path aes Path amazon-s3 Path asn @@ -70,6 +69,7 @@ Path javascript Path jpeg Path json +Path lambda Path ldap Path log Path map @@ -86,8 +86,10 @@ Path nns Path nntp Path ntp +Path ooutil Path otp Path page +Path pki Path pluginmgr Path png Path pop3 @@ -116,10 +118,12 @@ Path tiff Path transfer Path treeql +Path try Path uev Path units Path uri Path uuid +Path valtype Path virtchannel_base Path virtchannel_core Path virtchannel_transform @@ -127,21 +131,6 @@ Path yaml # ############ -# Module "pki" -# [1] | "pki" (0.1) -# -------+ - -Package {pki 0.1} -Platform * -Desc {Implementation of the RSA public key cipher} -Base @TAP_DIR@/pki -Path pkgIndex.tcl -Path pki.tcl - -# -# ############ - -# ############ # Module "aes" # [1] | "aes" (1.0.2) # -------+ @@ -298,8 +287,8 @@ # ############## # Module "bench" -# [1] | "bench" (0.4) -# [2] | "bench::out::csv" (0.1.2) +# [1] | "bench::out::csv" (0.1.2) +# [2] | "bench" (0.4) # [3] | "bench::out::text" (0.1.2) # [4] | "bench::in" (0.1) # -------+ @@ -316,15 +305,15 @@ Path libbench.tcl Path pkgIndex.tcl -Package {bench 0.4} +Package {bench::out::csv 0.1.2} See __bench Platform * -Desc {bench - Processing benchmark suites} +Desc {bench::out::csv - Formatting benchmark results as CSV} -Package {bench::out::csv 0.1.2} +Package {bench 0.4} See __bench Platform * -Desc {bench::out::csv - Formatting benchmark results as CSV} +Desc {bench - Processing benchmark suites} Package {bench::out::text 0.1.2} See __bench @@ -403,10 +392,10 @@ # ################ # Module "cmdline" -# [1] | "cmdline" (1.3.2) +# [1] | "cmdline" (1.3.3) # -------+ -Package {cmdline 1.3.2} +Package {cmdline 1.3.3} Platform * Desc {Procedures to process command lines and options.} Base @TAP_DIR@/cmdline @@ -438,7 +427,7 @@ Package {control 0.1.3} Platform * -Desc {Procedures for control flow structures.} +Desc {Iterative directory traversal} Base @TAP_DIR@/control Path ascaller.tcl Path assert.tcl @@ -453,8 +442,8 @@ # ################## # Module "coroutine" -# [1] | "coroutine" (1) -# [2] | "coroutine::auto" (1) +# [1] | "coroutine" (1.1) +# [2] | "coroutine::auto" (1.1) # -------+ Package {__coroutine 0.0} @@ -466,12 +455,12 @@ Path coroutine.tcl Path pkgIndex.tcl -Package {coroutine 1} +Package {coroutine 1.1} See __coroutine Platform * Desc {Tcllib package} -Package {coroutine::auto 1} +Package {coroutine::auto 1.1} See __coroutine Platform * Desc {Tcllib package} @@ -496,8 +485,8 @@ # ############ # Module "crc" -# [1] | "sum" (1.1.0) -# [2] | "crc32" (1.3.1) +# [1] | "crc32" (1.3.1) +# [2] | "sum" (1.1.0) # [3] | "crc16" (1.1.1) # [4] | "cksum" (1.1.3) # -------+ @@ -514,15 +503,15 @@ Path pkgIndex.tcl Path sum.tcl -Package {sum 1.1.0} +Package {crc32 1.3.1} See __crc Platform * -Desc {Calculate a sum(1) compatible checksum} +Desc {Perform a 32bit Cyclic Redundancy Check} -Package {crc32 1.3.1} +Package {sum 1.1.0} See __crc Platform * -Desc {Perform a 32bit Cyclic Redundancy Check} +Desc {Calculate a sum(1) compatible checksum} Package {crc16 1.1.1} See __crc @@ -539,10 +528,10 @@ # ############ # Module "csv" -# [1] | "csv" (0.7.2) +# [1] | "csv" (0.7.3) # -------+ -Package {csv 0.7.2} +Package {csv 0.7.3} Platform * Desc {Procedures to handle CSV data.} Base @TAP_DIR@/csv @@ -555,8 +544,8 @@ # ############ # Module "des" # [1] | "des" (1.1.0) -# [2] | "tclDES" (1.0.0) -# [3] | "tclDESjr" (1.0.0) +# [2] | "tclDESjr" (1.0.0) +# [3] | "tclDES" (1.0.0) # -------+ Package {__des 0.0} @@ -574,12 +563,12 @@ Platform * Desc {Implementation of the DES and triple-DES ciphers} -Package {tclDES 1.0.0} +Package {tclDESjr 1.0.0} See __des Platform * Desc {Tcllib package} -Package {tclDESjr 1.0.0} +Package {tclDES 1.0.0} See __des Platform * Desc {Tcllib package} @@ -664,9 +653,9 @@ # Module "doctools" # [1] | "doctools::idx" (1.0.4) # [2] | "doctools::toc" (1.1.3) -# [3] | "doctools::cvs" (1) -# [4] | "doctools" (1.4.11) -# [5] | "doctools::changelog" (1) +# [3] | "doctools" (1.4.13) +# [4] | "doctools::changelog" (1) +# [5] | "doctools::cvs" (1) # -------+ Package {__doctools 0.0} @@ -729,12 +718,7 @@ Platform * Desc {doctoc - Processing tables of contents} -Package {doctools::cvs 1} -See __doctools -Platform * -Desc {Processing text in 'cvs log' format} - -Package {doctools 1.4.11} +Package {doctools 1.4.13} See __doctools Platform * Desc {doctools - Processing documents} @@ -744,18 +728,23 @@ Platform * Desc {Processing text in Emacs ChangeLog format} +Package {doctools::cvs 1} +See __doctools +Platform * +Desc {Processing text in 'cvs log' format} + # # ################# # ###################### # Module "doctools2base" -# [1] | "doctools::text" (0.1) -# [2] | "doctools::html" (0.1) -# [3] | "doctools::tcl::parse" (0.1) -# [4] | "doctools::html::cssdefaults" (0.1) -# [5] | "doctools::config" (0) -# [6] | "doctools::nroff::man_macros" (0.1) -# [7] | "doctools::msgcat" (0.1) +# [1] | "doctools::html" (0.1) +# [2] | "doctools::text" (0.1) +# [3] | "doctools::config" (0.1) +# [4] | "doctools::tcl::parse" (0.1) +# [5] | "doctools::html::cssdefaults" (0.1) +# [6] | "doctools::msgcat" (0.1) +# [7] | "doctools::nroff::man_macros" (0.1) # [8] | "doctools::paths" (0.1) # -------+ @@ -774,12 +763,17 @@ Path tcl_parse.tcl Path text.tcl +Package {doctools::html 0.1} +See __doctools2base +Platform * +Desc {Tcllib package} + Package {doctools::text 0.1} See __doctools2base Platform * Desc {Tcllib package} -Package {doctools::html 0.1} +Package {doctools::config 0.1} See __doctools2base Platform * Desc {Tcllib package} @@ -794,21 +788,16 @@ Platform * Desc {Default CSS style for HTML export plugins} -Package {doctools::config 0} +Package {doctools::msgcat 0.1} See __doctools2base Platform * -Desc {Tcllib package} +Desc {Message catalog management for the various document parsers} Package {doctools::nroff::man_macros 0.1} See __doctools2base Platform * Desc {Default CSS style for NROFF export plugins} -Package {doctools::msgcat 0.1} -See __doctools2base -Platform * -Desc {Message catalog management for the various document parsers} - Package {doctools::paths 0.1} See __doctools2base Platform * @@ -819,23 +808,23 @@ # ##################### # Module "doctools2idx" -# [1] | "doctools::idx::structure" (0.1) -# [2] | "doctools::idx::export::nroff" (0.3) +# [1] | "doctools::idx::export::nroff" (0.3) +# [2] | "doctools::idx::structure" (0.1) # [3] | "doctools::idx::import::json" (0.1) # [4] | "doctools::idx::import::docidx" (0.1) # [5] | "doctools::idx::export" (0.1) -# [6] | "doctools::idx::export::html" (0.2) -# [7] | "doctools::idx::parse" (0.1) -# [8] | "doctools::msgcat::idx::fr" (0.1) -# [9] | "doctools::msgcat::idx::de" (0.1) -# [10] | "doctools::idx" (2) +# [6] | "doctools::idx::parse" (0.1) +# [7] | "doctools::msgcat::idx::fr" (0.1) +# [8] | "doctools::idx::export::html" (0.2) +# [9] | "doctools::idx" (2) +# [10] | "doctools::msgcat::idx::de" (0.1) # [11] | "doctools::msgcat::idx::en" (0.1) # [12] | "doctools::msgcat::idx::c" (0.1) # [13] | "doctools::idx::export::json" (0.1) # [14] | "doctools::idx::export::docidx" (0.1) # [15] | "doctools::idx::export::wiki" (0.2) # [16] | "doctools::idx::export::text" (0.2) -# [17] | "doctools::idx::import" (0) +# [17] | "doctools::idx::import" (0.1) # -------+ Package {__doctools2idx 0.0} @@ -862,15 +851,15 @@ Path pkgIndex.tcl Path structure.tcl -Package {doctools::idx::structure 0.1} +Package {doctools::idx::export::nroff 0.3} See __doctools2idx Platform * -Desc {Docidx serialization utilities} +Desc {nroff export plugin} -Package {doctools::idx::export::nroff 0.3} +Package {doctools::idx::structure 0.1} See __doctools2idx Platform * -Desc {nroff export plugin} +Desc {Docidx serialization utilities} Package {doctools::idx::import::json 0.1} See __doctools2idx @@ -887,11 +876,6 @@ Platform * Desc {Exporting keyword indices} -Package {doctools::idx::export::html 0.2} -See __doctools2idx -Platform * -Desc {HTML export plugin} - Package {doctools::idx::parse 0.1} See __doctools2idx Platform * @@ -902,16 +886,21 @@ Platform * Desc {Message catalog for the docidx parser (FR)} -Package {doctools::msgcat::idx::de 0.1} +Package {doctools::idx::export::html 0.2} See __doctools2idx Platform * -Desc {Message catalog for the docidx parser (DE)} +Desc {HTML export plugin} Package {doctools::idx 2} See __doctools2idx Platform * Desc {docidx - Processing indices} +Package {doctools::msgcat::idx::de 0.1} +See __doctools2idx +Platform * +Desc {Message catalog for the docidx parser (DE)} + Package {doctools::msgcat::idx::en 0.1} See __doctools2idx Platform * @@ -942,7 +931,7 @@ Platform * Desc {plain text export plugin} -Package {doctools::idx::import 0} +Package {doctools::idx::import 0.1} See __doctools2idx Platform * Desc {Importing keyword indices} @@ -954,22 +943,22 @@ # Module "doctools2toc" # [1] | "doctools::msgcat::toc::fr" (0.1) # [2] | "doctools::toc::export::html" (0.1) -# [3] | "doctools::msgcat::toc::de" (0.1) -# [4] | "doctools::toc" (2) +# [3] | "doctools::toc" (2) +# [4] | "doctools::msgcat::toc::de" (0.1) # [5] | "doctools::msgcat::toc::en" (0.1) # [6] | "doctools::toc::export::json" (0.1) -# [7] | "doctools::toc::structure" (0.1) -# [8] | "doctools::toc::export::nroff" (0.2) +# [7] | "doctools::toc::export::nroff" (0.2) +# [8] | "doctools::toc::structure" (0.1) # [9] | "doctools::toc::export::wiki" (0.1) -# [10] | "doctools::toc::export::text" (0.1) -# [11] | "doctools::toc::import::doctoc" (0.1) -# [12] | "doctools::toc::import" (0) -# [13] | "doctools::toc::parse" (0.1) +# [10] | "doctools::toc::import::doctoc" (0.1) +# [11] | "doctools::toc::export::text" (0.1) +# [12] | "doctools::toc::parse" (0.1) +# [13] | "doctools::toc::import" (0.1) # [14] | "doctools::msgcat::toc::c" (0.1) # [15] | "dict" (1) # [16] | "doctools::toc::import::json" (0.1) -# [17] | "doctools::toc::export" (0.1) -# [18] | "doctools::toc::export::doctoc" (0.1) +# [17] | "doctools::toc::export::doctoc" (0.1) +# [18] | "doctools::toc::export" (0.1) # -------+ Package {__doctools2toc 0.0} @@ -1006,27 +995,22 @@ Platform * Desc {Tcllib package} -Package {doctools::msgcat::toc::de 0.1} -See __doctools2toc -Platform * -Desc {Tcllib package} - Package {doctools::toc 2} See __doctools2toc Platform * Desc {doctoc - Processing tables of contents} -Package {doctools::msgcat::toc::en 0.1} +Package {doctools::msgcat::toc::de 0.1} See __doctools2toc Platform * Desc {Tcllib package} -Package {doctools::toc::export::json 0.1} +Package {doctools::msgcat::toc::en 0.1} See __doctools2toc Platform * Desc {Tcllib package} -Package {doctools::toc::structure 0.1} +Package {doctools::toc::export::json 0.1} See __doctools2toc Platform * Desc {Tcllib package} @@ -1036,12 +1020,12 @@ Platform * Desc {Tcllib package} -Package {doctools::toc::export::wiki 0.1} +Package {doctools::toc::structure 0.1} See __doctools2toc Platform * Desc {Tcllib package} -Package {doctools::toc::export::text 0.1} +Package {doctools::toc::export::wiki 0.1} See __doctools2toc Platform * Desc {Tcllib package} @@ -1051,7 +1035,7 @@ Platform * Desc {doctoc import plugin} -Package {doctools::toc::import 0} +Package {doctools::toc::export::text 0.1} See __doctools2toc Platform * Desc {Tcllib package} @@ -1061,22 +1045,22 @@ Platform * Desc {Tcllib package} -Package {doctools::msgcat::toc::c 0.1} +Package {doctools::toc::import 0.1} See __doctools2toc Platform * Desc {Tcllib package} -Package {dict 1} +Package {doctools::msgcat::toc::c 0.1} See __doctools2toc Platform * Desc {Tcllib package} -Package {doctools::toc::import::json 0.1} +Package {dict 1} See __doctools2toc Platform * Desc {Tcllib package} -Package {doctools::toc::export 0.1} +Package {doctools::toc::import::json 0.1} See __doctools2toc Platform * Desc {Tcllib package} @@ -1086,6 +1070,11 @@ Platform * Desc {doctoc export plugin} +Package {doctools::toc::export 0.1} +See __doctools2toc +Platform * +Desc {Tcllib package} + # # ##################### @@ -1108,13 +1097,13 @@ # Module "fileutil" # [1] | "fileutil::multi::op" (0.5.3) # [2] | "fileutil::multi" (0.1) -# [3] | "fileutil" (1.14.4) -# [4] | "fileutil::traverse" (0.4.1) +# [3] | "fileutil::traverse" (0.4.2) +# [4] | "fileutil" (1.14.4) # -------+ Package {__fileutil 0.0} Platform * -Desc {file utilities, Parser generator tools} +Desc {file utilities} Hidden Base @TAP_DIR@/fileutil Path fileutil.tcl @@ -1133,15 +1122,15 @@ Platform * Desc {Multi-file operation, scatter/gather, standard object} -Package {fileutil 1.14.4} +Package {fileutil::traverse 0.4.2} See __fileutil Platform * -Desc {page plugin manager} +Desc {Iterative directory traversal} -Package {fileutil::traverse 0.4.1} +Package {fileutil 1.14.4} See __fileutil Platform * -Desc {Iterative directory traversal} +Desc {Procedures implementing some file utilities} # # ################# @@ -1149,7 +1138,7 @@ # ############ # Module "ftp" # [1] | "ftp::geturl" (0.2.1) -# [2] | "ftp" (2.4.9) +# [2] | "ftp" (2.4.11) # -------+ Package {__ftp 0.0} @@ -1166,7 +1155,7 @@ Platform * Desc {Uri handler for ftp urls} -Package {ftp 2.4.9} +Package {ftp 2.4.11} See __ftp Platform * Desc {Client-side tcl implementation of the ftp protocol} @@ -1176,10 +1165,10 @@ # ############# # Module "ftpd" -# [1] | "ftpd" (1.2.5) +# [1] | "ftpd" (1.2.6) # -------+ -Package {ftpd 1.2.5} +Package {ftpd 1.2.6} Platform * Desc {Tcl FTP server implementation} Base @TAP_DIR@/ftpd @@ -1292,8 +1281,8 @@ # Module "grammar_fa" # [1] | "grammar::fa::op" (0.4.1) # [2] | "grammar::fa" (0.4) -# [3] | "grammar::fa::dacceptor" (0.1.1) -# [4] | "grammar::fa::dexec" (0.2) +# [3] | "grammar::fa::dexec" (0.2) +# [4] | "grammar::fa::dacceptor" (0.1.1) # -------+ Package {__grammar_fa 0.0} @@ -1317,15 +1306,15 @@ Platform * Desc {Create and manipulate finite automatons} -Package {grammar::fa::dacceptor 0.1.1} +Package {grammar::fa::dexec 0.2} See __grammar_fa Platform * -Desc {Create and use deterministic acceptors} +Desc {Execute deterministic finite automatons} -Package {grammar::fa::dexec 0.2} +Package {grammar::fa::dacceptor 0.1.1} See __grammar_fa Platform * -Desc {Execute deterministic finite automatons} +Desc {Create and use deterministic acceptors} # # ################### @@ -1333,8 +1322,8 @@ # ################### # Module "grammar_me" # [1] | "grammar::me::tcl" (0.1) -# [2] | "grammar::me::cpu" (0.2) -# [3] | "grammar::me::cpu::gasm" (0.1) +# [2] | "grammar::me::cpu::gasm" (0.1) +# [3] | "grammar::me::cpu" (0.2) # [4] | "grammar::me::cpu::core" (0.2) # [5] | "grammar::me::util" (0.1) # -------+ @@ -1356,15 +1345,15 @@ Platform * Desc {Virtual machine implementation I for parsing token streams} -Package {grammar::me::cpu 0.2} +Package {grammar::me::cpu::gasm 0.1} See __grammar_me Platform * -Desc {Virtual machine implementation II for parsing token streams} +Desc {ME assembler} -Package {grammar::me::cpu::gasm 0.1} +Package {grammar::me::cpu 0.2} See __grammar_me Platform * -Desc {ME assembler} +Desc {Virtual machine implementation II for parsing token streams} Package {grammar::me::cpu::core 0.2} See __grammar_me @@ -1381,7 +1370,7 @@ # #################### # Module "grammar_peg" -# [1] | "grammar::peg::interp" (0.1) +# [1] | "grammar::peg::interp" (0.1.1) # [2] | "grammar::peg" (0.1) # -------+ @@ -1394,7 +1383,7 @@ Path peg_interp.tcl Path pkgIndex.tcl -Package {grammar::peg::interp 0.1} +Package {grammar::peg::interp 0.1.1} See __grammar_peg Platform * Desc {Interpreter for parsing expression grammars} @@ -1499,10 +1488,10 @@ # ################ # Module "inifile" -# [1] | "inifile" (0.2.3) +# [1] | "inifile" (0.2.4) # -------+ -Package {inifile 0.2.3} +Package {inifile 0.2.4} Platform * Desc {Parsing of Windows INI files} Base @TAP_DIR@/inifile @@ -1516,7 +1505,7 @@ # Module "interp" # [1] | "interp::delegate::proc" (0.2) # [2] | "interp::delegate::method" (0.2) -# [3] | "interp" (0.1.1) +# [3] | "interp" (0.1.2) # -------+ Package {__interp 0.0} @@ -1539,7 +1528,7 @@ Platform * Desc {Creation of comm delegates (snit methods)} -Package {interp 0.1.1} +Package {interp 0.1.2} See __interp Platform * Desc {Interp creation and aliasing} @@ -1592,10 +1581,10 @@ # ############# # Module "jpeg" -# [1] | "jpeg" (0.3.5) +# [1] | "jpeg" (0.4.0) # -------+ -Package {jpeg 0.3.5} +Package {jpeg 0.4.0} Platform * Desc {JPEG querying and manipulation of meta data} Base @TAP_DIR@/jpeg @@ -1607,8 +1596,8 @@ # ############# # Module "json" -# [1] | "json::write" (1) -# [2] | "json" (1.1.1) +# [1] | "json::write" (1.0.1) +# [2] | "json" (1.1.2) # -------+ Package {__json 0.0} @@ -1620,12 +1609,12 @@ Path json_write.tcl Path pkgIndex.tcl -Package {json::write 1} +Package {json::write 1.0.1} See __json Platform * Desc {JSON generation} -Package {json 1.1.1} +Package {json 1.1.2} See __json Platform * Desc {JSON parser} @@ -1633,10 +1622,25 @@ # # ############# +# ############### +# Module "lambda" +# [1] | "lambda" (1) +# -------+ + +Package {lambda 1} +Platform * +Desc {Utility commands for anonymous procedures} +Base @TAP_DIR@/lambda +Path lambda.tcl +Path pkgIndex.tcl + +# +# ############### + # ############# # Module "ldap" -# [1] | "ldap" (1.8) -# [2] | "ldapx" (1.0) +# [1] | "ldapx" (1.0) +# [2] | "ldap" (1.8) # -------+ Package {__ldap 0.0} @@ -1648,15 +1652,15 @@ Path ldapx.tcl Path pkgIndex.tcl -Package {ldap 1.8} +Package {ldapx 1.0} See __ldap Platform * -Desc {LDAP client} +Desc {LDAP extended object interface} -Package {ldapx 1.0} +Package {ldap 1.8} See __ldap Platform * -Desc {LDAP extended object interface} +Desc {LDAP client} # # ############# @@ -1707,7 +1711,7 @@ # ############ # Module "map" # [1] | "map::slippy::fetcher" (0.2) -# [2] | "map::slippy" (0.3) +# [2] | "map::slippy" (0.4) # [3] | "map::slippy::cache" (0.2) # -------+ @@ -1726,7 +1730,7 @@ Platform * Desc {Accessing a server providing tiles for slippy-based maps} -Package {map::slippy 0.3} +Package {map::slippy 0.4} See __map Platform * Desc {Common code for slippy based map packages} @@ -1756,27 +1760,28 @@ # ############# # Module "math" -# [1] | "math::statistics" (0.7.0) -# [2] | "math::rationalfunctions" (1.0.1) -# [3] | "math::numtheory" (1.0) -# [4] | "math" (1.2.5) -# [5] | "math::fourier" (1.0.2) -# [6] | "math::complexnumbers" (1.0.2) +# [1] | "math::numtheory" (1.0) +# [2] | "math::statistics" (0.7.0) +# [3] | "math::rationalfunctions" (1.0.1) +# [4] | "math::fourier" (1.0.2) +# [5] | "math::complexnumbers" (1.0.2) +# [6] | "math" (1.2.5) # [7] | "math::roman" (1.0) # [8] | "math::interpolate" (1.0.3) # [9] | "math::fuzzy" (0.2.1) # [10] | "math::linearalgebra" (1.1.4) # [11] | "math::special" (0.2.2) # [12] | "math::optimize" (1.0) -# [13] | "math::calculus::symdiff" (1.0) -# [14] | "math::bignum" (3.1.1) -# [15] | "math::calculus" (0.7.1) -# [16] | "math::geometry" (1.1.2) +# [13] | "math::bignum" (3.1.1) +# [14] | "math::calculus::symdiff" (1.0) +# [15] | "math::geometry" (1.1.2) +# [16] | "math::calculus" (0.7.1) # [17] | "math::constants" (1.0.1) # [18] | "math::polynomials" (1.0.1) -# [19] | "math::bigfloat" (1.2.2) -# [20] | "math::bigfloat" (2.0.1) -# [21] | "math::machineparameters" (0.1) +# [19] | "math::decimal" (1.0.2) +# [20] | "math::bigfloat" (1.2.2) +# [21] | "math::bigfloat" (2.0.1) +# [22] | "math::machineparameters" (0.1) # -------+ Package {__math 0.0} @@ -1792,6 +1797,7 @@ Path classic_polyns.tcl Path combinatorics.tcl Path constants.tcl +Path decimal.tcl Path elliptic.tcl Path exponential.tcl Path fourier.tcl @@ -1819,6 +1825,11 @@ Path symdiff.tcl Path tclIndex +Package {math::numtheory 1.0} +See __math +Platform * +Desc {Number Theory} + Package {math::statistics 0.7.0} See __math Platform * @@ -1829,16 +1840,6 @@ Platform * Desc {Polynomial functions} -Package {math::numtheory 1.0} -See __math -Platform * -Desc {Number Theory} - -Package {math 1.2.5} -See __math -Platform * -Desc {Combinatorial functions in the Tcl Math Library} - Package {math::fourier 1.0.2} See __math Platform * @@ -1849,6 +1850,11 @@ Platform * Desc {Straightforward complex number package} +Package {math 1.2.5} +See __math +Platform * +Desc {Combinatorial functions in the Tcl Math Library} + Package {math::roman 1.0} See __math Platform * @@ -1879,26 +1885,26 @@ Platform * Desc {Optimisation routines} -Package {math::calculus::symdiff 1.0} -See __math -Platform * -Desc {Tcllib package} - Package {math::bignum 3.1.1} See __math Platform * Desc {Arbitrary precision integer numbers} -Package {math::calculus 0.7.1} +Package {math::calculus::symdiff 1.0} See __math Platform * -Desc {Integration and ordinary differential equations} +Desc {Tcllib package} Package {math::geometry 1.1.2} See __math Platform * Desc {Geometrical computations} +Package {math::calculus 0.7.1} +See __math +Platform * +Desc {Integration and ordinary differential equations} + Package {math::constants 1.0.1} See __math Platform * @@ -1909,6 +1915,11 @@ Platform * Desc {Polynomial functions} +Package {math::decimal 1.0.2} +See __math +Platform * +Desc {Tcllib package} + Package {math::bigfloat 1.2.2} See __math Platform * @@ -1990,8 +2001,8 @@ # ############# # Module "mime" -# [1] | "smtp" (1.4.5) -# [2] | "mime" (1.5.4) +# [1] | "mime" (1.5.4) +# [2] | "smtp" (1.4.5) # -------+ Package {__mime 0.0} @@ -2003,15 +2014,15 @@ Path pkgIndex.tcl Path smtp.tcl -Package {smtp 1.4.5} +Package {mime 1.5.4} See __mime Platform * -Desc {Client-side tcl implementation of the smtp protocol} +Desc {Manipulation of MIME body parts} -Package {mime 1.5.4} +Package {smtp 1.4.5} See __mime Platform * -Desc {Manipulation of MIME body parts} +Desc {Client-side tcl implementation of the smtp protocol} # # ############# @@ -2148,6 +2159,21 @@ # # ############ +# ############### +# Module "ooutil" +# [1] | "oo::util" (1) +# -------+ + +Package {oo::util 1} +Platform * +Desc {Utility commands for TclOO} +Base @TAP_DIR@/ooutil +Path ooutil.tcl +Path pkgIndex.tcl + +# +# ############### + # ############ # Module "otp" # [1] | "otp" (1.0.0) @@ -2165,28 +2191,47 @@ # ############# # Module "page" -# [1] | "page::gen::peg::me" (0.1) -# [2] | "page::gen::peg::hb" (0.1) -# [3] | "page::gen::peg::mecpu" (0.1) -# [4] | "page::gen::peg::ser" (0.1) -# [5] | "page::compiler::peg::mecpu" (0.1.1) -# [6] | "page::analysis::peg::minimize" (0.1) -# [7] | "page::analysis::peg::realizable" (0.1) -# [8] | "page::parse::peg" (0.1) -# [9] | "page::analysis::peg::emodes" (0.1) -# [10] | "page::pluginmgr" (0.2) -# [11] | "page::parse::pegser" (0.1) -# [12] | "page::util::norm::peg" (0.1) -# [13] | "page::util::peg" (0.1) -# [14] | "page::analysis::peg::reachable" (0.1) -# [15] | "page::gen::tree::text" (0.1) -# [16] | "page::util::quote" (0.1) -# [17] | "page::util::flow" (0.1) -# [18] | "page::parse::lemon" (0.1) -# [19] | "page::gen::peg::cpkg" (0.1) -# [20] | "page::util::norm::lemon" (0.1) -# [21] | "page::parse::peghb" (0.1) -# [22] | "page::gen::peg::canon" (0.1) +# [1] | "page::gen::peg::ser" (0.1) +# [2] | "page::gen::peg::mecpu" (0.1) +# [3] | "page::gen::peg::hb" (0.1) +# [4] | "page::gen::peg::me" (0.1) +# [5] | "page::reader::ser" (0.1) +# [6] | "page::compiler::peg::mecpu" (0.1.1) +# [7] | "page::analysis::peg::minimize" (0.1) +# [8] | "page::analysis::peg::realizable" (0.1) +# [9] | "page::writer::mecpu" (0.1.1) +# [10] | "page::reader::peg" (0.1) +# [11] | "page::writer::ser" (0.1) +# [12] | "page::transform::realizable" (0.1) +# [13] | "page::parse::peg" (0.1) +# [14] | "page::analysis::peg::emodes" (0.1) +# [15] | "page::writer::peg" (0.1) +# [16] | "page::parse::pegser" (0.1) +# [17] | "page::pluginmgr" (0.2) +# [18] | "page::util::peg" (0.1) +# [19] | "page::util::norm::peg" (0.1) +# [20] | "page::analysis::peg::reachable" (0.1) +# [21] | "page::transform::reachable" (0.1) +# [22] | "page::gen::tree::text" (0.1) +# [23] | "page::util::quote" (0.1) +# [24] | "page::writer::tpc" (0.1) +# [25] | "@PKG@" (0.1) +# [26] | "page::reader::treeser" (0.1) +# [27] | "page::reader::hb" (0.1) +# [28] | "page::writer::tree" (0.1) +# [29] | "page::transform::mecpu" (0.1) +# [30] | "page::reader::lemon" (0.1) +# [31] | "page::parse::lemon" (0.1) +# [32] | "page::util::flow" (0.1) +# [33] | "page::gen::peg::cpkg" (0.1) +# [34] | "page::writer::identity" (0.1) +# [35] | "page::writer::me" (0.1) +# [36] | "page::writer::hb" (0.1) +# [37] | "page::writer::null" (0.1) +# [38] | "page::gen::peg::canon" (0.1) +# [39] | "page::parse::peghb" (0.1) +# [40] | "page::util::norm::lemon" (0.1) +# [41] | "page::config::peg" (0.1) # -------+ Package {__page 0.0} @@ -2203,7 +2248,9 @@ Path gen_peg_cpkg.tcl Path gen_peg_hb.tcl Path gen_peg_me.tcl +Path gen_peg_me.template Path gen_peg_mecpu.tcl +Path gen_peg_mecpu.template Path gen_peg_ser.tcl Path gen_tree_text.tcl Path parse_lemon.tcl @@ -2213,13 +2260,37 @@ Path peg_grammar.tcl Path pkgIndex.tcl Path pluginmgr.tcl +Path plugins/config_peg.tcl +Path plugins/pkgIndex.tcl +Path plugins/reader_hb.tcl +Path plugins/reader_lemon.tcl +Path plugins/reader_peg.tcl +Path plugins/reader_ser.tcl +Path plugins/reader_treeser.tcl +Path plugins/transform_mecpu.tcl +Path plugins/transform_reachable.tcl +Path plugins/transform_realizable.tcl +Path plugins/writer_hb.tcl +Path plugins/writer_identity.tcl +Path plugins/writer_me.tcl +Path plugins/writer_mecpu.tcl +Path plugins/writer_null.tcl +Path plugins/writer_peg.tcl +Path plugins/writer_ser.tcl +Path plugins/writer_tpc.tcl +Path plugins/writer_tree.tcl Path util_flow.tcl Path util_norm_lemon.tcl Path util_norm_peg.tcl Path util_peg.tcl Path util_quote.tcl -Package {page::gen::peg::me 0.1} +Package {page::gen::peg::ser 0.1} +See __page +Platform * +Desc {Tcllib package} + +Package {page::gen::peg::mecpu 0.1} See __page Platform * Desc {Tcllib package} @@ -2229,12 +2300,12 @@ Platform * Desc {Tcllib package} -Package {page::gen::peg::mecpu 0.1} +Package {page::gen::peg::me 0.1} See __page Platform * Desc {Tcllib package} -Package {page::gen::peg::ser 0.1} +Package {page::reader::ser 0.1} See __page Platform * Desc {Tcllib package} @@ -2254,6 +2325,26 @@ Platform * Desc {Tcllib package} +Package {page::writer::mecpu 0.1.1} +See __page +Platform * +Desc {Tcllib package} + +Package {page::reader::peg 0.1} +See __page +Platform * +Desc {Tcllib package} + +Package {page::writer::ser 0.1} +See __page +Platform * +Desc {Tcllib package} + +Package {page::transform::realizable 0.1} +See __page +Platform * +Desc {Tcllib package} + Package {page::parse::peg 0.1} See __page Platform * @@ -2264,31 +2355,41 @@ Platform * Desc {Tcllib package} -Package {page::pluginmgr 0.2} +Package {page::writer::peg 0.1} See __page Platform * -Desc {page plugin manager} +Desc {Tcllib package} Package {page::parse::pegser 0.1} See __page Platform * Desc {Tcllib package} -Package {page::util::norm::peg 0.1} +Package {page::pluginmgr 0.2} See __page Platform * -Desc {Tcllib package} +Desc {page plugin manager} Package {page::util::peg 0.1} See __page Platform * Desc {page PEG transformation utilities} +Package {page::util::norm::peg 0.1} +See __page +Platform * +Desc {Tcllib package} + Package {page::analysis::peg::reachable 0.1} See __page Platform * Desc {Tcllib package} +Package {page::transform::reachable 0.1} +See __page +Platform * +Desc {Tcllib package} + Package {page::gen::tree::text 0.1} See __page Platform * @@ -2299,38 +2400,113 @@ Platform * Desc {page character quoting utilities} -Package {page::util::flow 0.1} +Package {page::writer::tpc 0.1} See __page Platform * -Desc {page dataflow/treewalker utility} +Desc {Tcllib package} -Package {page::parse::lemon 0.1} +Package {@PKG@ 0.1} See __page Platform * Desc {Tcllib package} -Package {page::gen::peg::cpkg 0.1} +Package {page::reader::treeser 0.1} See __page Platform * Desc {Tcllib package} -Package {page::util::norm::lemon 0.1} +Package {page::reader::hb 0.1} See __page Platform * Desc {Tcllib package} -Package {page::parse::peghb 0.1} +Package {page::writer::tree 0.1} See __page Platform * Desc {Tcllib package} -Package {page::gen::peg::canon 0.1} +Package {page::transform::mecpu 0.1} See __page Platform * Desc {Tcllib package} -# -# ############# +Package {page::reader::lemon 0.1} +See __page +Platform * +Desc {Tcllib package} + +Package {page::parse::lemon 0.1} +See __page +Platform * +Desc {Tcllib package} + +Package {page::util::flow 0.1} +See __page +Platform * +Desc {page dataflow/treewalker utility} + +Package {page::gen::peg::cpkg 0.1} +See __page +Platform * +Desc {Tcllib package} + +Package {page::writer::identity 0.1} +See __page +Platform * +Desc {Tcllib package} + +Package {page::writer::me 0.1} +See __page +Platform * +Desc {Tcllib package} + +Package {page::writer::hb 0.1} +See __page +Platform * +Desc {Tcllib package} + +Package {page::writer::null 0.1} +See __page +Platform * +Desc {Tcllib package} + +Package {page::gen::peg::canon 0.1} +See __page +Platform * +Desc {Tcllib package} + +Package {page::parse::peghb 0.1} +See __page +Platform * +Desc {Tcllib package} + +Package {page::util::norm::lemon 0.1} +See __page +Platform * +Desc {Tcllib package} + +Package {page::config::peg 0.1} +See __page +Platform * +Desc {Tcllib package} + +# +# ############# + +# ############ +# Module "pki" +# [1] | "pki" (0.2) +# -------+ + +Package {pki 0.2} +Platform * +Desc {Implementation of the RSA public key cipher} +Base @TAP_DIR@/pki +Path pkgIndex.tcl +Path pki.tcl + +# +# ############ # ################## # Module "pluginmgr" @@ -2429,42 +2605,41 @@ # ########### # Module "pt" -# [1] | "configuration" (1) +# [1] | "pt::rde::critcl" (1) # [2] | "pt::peg::to::param" (1) -# [3] | "pt::rde::critcl" (1) +# [3] | "configuration" (1) # [4] | "pt::peg::export::json" (1) -# [5] | "pt::tclparam::configuration::snit" (1.0.1) -# [6] | "pt::peg::from::json" (1) -# [7] | "pt::peg::export::peg" (1) -# [8] | "pt::parse::peg" (1) -# [9] | "pt::peg::import::peg" (1) -# [10] | "pt::peg::to::cparam" (1.0.1) -# [11] | "pt::rde" (1) -# [12] | "pt::rde" (1.0.1) -# [13] | "pt::peg::to::peg" (1) -# [14] | "pt::peg::import" (1) -# [15] | "pt::peg::from::peg" (1) -# [16] | "pt::tclparam::configuration::tcloo" (1.0.1) +# [5] | "pt::peg::from::json" (1) +# [6] | "pt::peg::export::peg" (1) +# [7] | "pt::tclparam::configuration::snit" (1.0.1) +# [8] | "pt::peg::to::cparam" (1.0.1) +# [9] | "pt::rde" (1.0.2) +# [10] | "pt::peg::import" (1) +# [11] | "pt::parse::peg" (1) +# [12] | "pt::peg::to::peg" (1) +# [13] | "pt::peg::import::peg" (1) +# [14] | "pt::peg::from::peg" (1) +# [15] | "pt::cparam::configuration::critcl" (1.0.1) +# [16] | "pt::tclparam::configuration::tcloo" (1.0.2) # [17] | "pt::parse::peg_tcl" (1) -# [18] | "pt::cparam::configuration::critcl" (1.0.1) -# [19] | "pt::peg::op" (1) +# [18] | "pt::peg::op" (1) +# [19] | "pt::ast" (1.1) # [20] | "paths" (1) -# [21] | "pt::ast" (1.1) -# [22] | "pt::pe::op" (1) -# [23] | "pt::peg::import::json" (1) +# [21] | "pt::pe::op" (1) +# [22] | "pt::peg::import::json" (1) +# [23] | "pt::peg::to::json" (1) # [24] | "pt::peg::export::container" (1) -# [25] | "pt::peg::to::json" (1) +# [25] | "pt::pgen" (1.0.1) # [26] | "pt::peg::interp" (1) -# [27] | "pt::peg::to::container" (1) -# [28] | "pt::pgen" (1) -# [29] | "pt::peg::export" (1) -# [30] | "pt::peg::container::peg" (1) -# [31] | "pt::peg::to::tclparam" (1) -# [32] | "pt::peg::container" (1) +# [27] | "pt::peg::export" (1) +# [28] | "pt::peg::to::container" (1) +# [29] | "pt::peg::to::tclparam" (1) +# [30] | "pt::peg::container" (1) +# [31] | "pt::peg::container::peg" (1) +# [32] | "text::write" (1) # [33] | "pt::peg" (1) -# [34] | "text::write" (1) -# [35] | "pt::pe" (1) -# [36] | "char" (1) +# [34] | "pt::pe" (1) +# [35] | "char" (1) # -------+ Package {__pt 0.0} @@ -2512,7 +2687,7 @@ Path pt_tclparam_config_tcloo.tcl Path text_write.tcl -Package {configuration 1} +Package {pt::rde::critcl 1} See __pt Platform * Desc {Tcllib package} @@ -2522,7 +2697,7 @@ Platform * Desc {PEG Conversion. Write PARAM format} -Package {pt::rde::critcl 1} +Package {configuration 1} See __pt Platform * Desc {Tcllib package} @@ -2532,11 +2707,6 @@ Platform * Desc {PEG Export Plugin. Write JSON format} -Package {pt::tclparam::configuration::snit 1.0.1} -See __pt -Platform * -Desc {Tcl/PARAM, Canned configuration, Snit} - Package {pt::peg::from::json 1} See __pt Platform * @@ -2547,75 +2717,75 @@ Platform * Desc {PEG Export Plugin. Write PEG format} -Package {pt::parse::peg 1} -See __pt -Platform * -Desc {Tcllib package} - -Package {pt::peg::import::peg 1} +Package {pt::tclparam::configuration::snit 1.0.1} See __pt Platform * -Desc {PEG Import Plugin. Read PEG format} +Desc {Tcl/PARAM, Canned configuration, Snit} Package {pt::peg::to::cparam 1.0.1} See __pt Platform * Desc {PEG Conversion. Write CPARAM format} -Package {pt::rde 1} +Package {pt::rde 1.0.2} See __pt Platform * Desc {Parsing Runtime Support, PARAM based} -Package {pt::rde 1.0.1} +Package {pt::peg::import 1} See __pt Platform * -Desc {Parsing Runtime Support, PARAM based} +Desc {PEG Import} + +Package {pt::parse::peg 1} +See __pt +Platform * +Desc {Tcllib package} Package {pt::peg::to::peg 1} See __pt Platform * Desc {PEG Conversion. Write PEG format} -Package {pt::peg::import 1} +Package {pt::peg::import::peg 1} See __pt Platform * -Desc {PEG Import} +Desc {PEG Import Plugin. Read PEG format} Package {pt::peg::from::peg 1} See __pt Platform * Desc {PEG Conversion. Read PEG format} -Package {pt::tclparam::configuration::tcloo 1.0.1} +Package {pt::cparam::configuration::critcl 1.0.1} See __pt Platform * -Desc {Tcl/PARAM, Canned configuration, Tcloo} +Desc {C/PARAM, Canned configuration, Critcl} -Package {pt::parse::peg_tcl 1} +Package {pt::tclparam::configuration::tcloo 1.0.2} See __pt Platform * -Desc {Tcllib package} +Desc {Tcl/PARAM, Canned configuration, Tcloo} -Package {pt::cparam::configuration::critcl 1.0.1} +Package {pt::parse::peg_tcl 1} See __pt Platform * -Desc {C/PARAM, Canned configuration, Critcl} +Desc {Tcllib package} Package {pt::peg::op 1} See __pt Platform * Desc {Tcllib package} -Package {paths 1} +Package {pt::ast 1.1} See __pt Platform * -Desc {Tcllib package} +Desc {Abstract Syntax Tree Serialization} -Package {pt::ast 1.1} +Package {paths 1} See __pt Platform * -Desc {Abstract Syntax Tree Serialization} +Desc {Tcllib package} Package {pt::pe::op 1} See __pt @@ -2627,40 +2797,35 @@ Platform * Desc {PEG Import Plugin. Read JSON format} -Package {pt::peg::export::container 1} -See __pt -Platform * -Desc {PEG Export Plugin. Write CONTAINER format} - Package {pt::peg::to::json 1} See __pt Platform * Desc {PEG Conversion. Write JSON format} -Package {pt::peg::interp 1} +Package {pt::peg::export::container 1} See __pt Platform * -Desc {Interpreter for parsing expression grammars} +Desc {PEG Export Plugin. Write CONTAINER format} -Package {pt::peg::to::container 1} +Package {pt::pgen 1.0.1} See __pt Platform * -Desc {PEG Conversion. Write CONTAINER format} +Desc {Parser Generator} -Package {pt::pgen 1} +Package {pt::peg::interp 1} See __pt Platform * -Desc {Parser Generator} +Desc {Interpreter for parsing expression grammars} Package {pt::peg::export 1} See __pt Platform * Desc {PEG Export} -Package {pt::peg::container::peg 1} +Package {pt::peg::to::container 1} See __pt Platform * -Desc {PEG Storage. Canned PEG grammar specification} +Desc {PEG Conversion. Write CONTAINER format} Package {pt::peg::to::tclparam 1} See __pt @@ -2672,16 +2837,21 @@ Platform * Desc {PEG Storage} -Package {pt::peg 1} +Package {pt::peg::container::peg 1} See __pt Platform * -Desc {Parsing Expression Grammar Serialization} +Desc {PEG Storage. Canned PEG grammar specification} Package {text::write 1} See __pt Platform * Desc {Tcllib package} +Package {pt::peg 1} +See __pt +Platform * +Desc {Parsing Expression Grammar Serialization} + Package {pt::pe 1} See __pt Platform * @@ -2758,8 +2928,8 @@ # ############### # Module "ripemd" -# [1] | "ripemd128" (1.0.4) -# [2] | "ripemd160" (1.0.4) +# [1] | "ripemd160" (1.0.4) +# [2] | "ripemd128" (1.0.4) # -------+ Package {__ripemd 0.0} @@ -2771,15 +2941,15 @@ Path ripemd128.tcl Path ripemd160.tcl -Package {ripemd128 1.0.4} +Package {ripemd160 1.0.4} See __ripemd Platform * -Desc {RIPEMD-128 Message-Digest Algorithm} +Desc {RIPEMD-160 Message-Digest Algorithm} -Package {ripemd160 1.0.4} +Package {ripemd128 1.0.4} See __ripemd Platform * -Desc {RIPEMD-160 Message-Digest Algorithm} +Desc {RIPEMD-128 Message-Digest Algorithm} # # ############### @@ -2859,7 +3029,7 @@ # ################### # Module "simulation" # [1] | "simulation::montecarlo" (0.1) -# [2] | "simulation::random" (0.1) +# [2] | "simulation::random" (0.3) # [3] | "simulation::annealing" (0.2) # -------+ @@ -2878,7 +3048,7 @@ Platform * Desc {Monte Carlo simulations} -Package {simulation::random 0.1} +Package {simulation::random 0.3} See __simulation Platform * Desc {Pseudo-random number generators} @@ -2893,10 +3063,10 @@ # ############## # Module "smtpd" -# [1] | "smtpd" (1.4.0) +# [1] | "smtpd" (1.5) # -------+ -Package {smtpd 1.4.0} +Package {smtpd 1.5} Platform * Desc {Tcl SMTP server implementation} Base @TAP_DIR@/smtpd @@ -2914,7 +3084,7 @@ Package {__snit 0.0} Platform * -Desc {Interpreter utilities} +Desc {Parser generator tools} Hidden Base @TAP_DIR@/snit Path main1.tcl @@ -2929,12 +3099,12 @@ Package {snit 1.4.2} See __snit Platform * -Desc {Creation of comm delegates (snit methods)} +Desc {page PEG transformation utilities} Package {snit 2.3.2} See __snit Platform * -Desc {Creation of comm delegates (snit methods)} +Desc {page PEG transformation utilities} # # ############# @@ -3034,14 +3204,14 @@ # [4] | "struct::graph" (1.2.1) # [5] | "struct::graph" (2.4) # [6] | "struct::skiplist" (1.3) -# [7] | "struct" (1.4) -# [8] | "struct" (2.1) -# [9] | "struct::set" (2.2.3) +# [7] | "struct::set" (2.2.3) +# [8] | "struct" (1.4) +# [9] | "struct" (2.1) # [10] | "struct::queue" (1.4.2) # [11] | "struct::prioqueue" (1.4) # [12] | "struct::disjointset" (1.0) # [13] | "struct::pool" (1.2.1) -# [14] | "struct::list" (1.8) +# [14] | "struct::list" (1.8.1) # [15] | "struct::graph::op" (0.11.3) # [16] | "struct::matrix" (1.2.1) # [17] | "struct::matrix" (2.0.2) @@ -3115,20 +3285,20 @@ Platform * Desc {Create and manipulate skiplists} -Package {struct 1.4} +Package {struct::set 2.2.3} See __struct Platform * -Desc {Tcllib package} +Desc {Procedures for manipulating sets} -Package {struct 2.1} +Package {struct 1.4} See __struct Platform * Desc {Tcllib package} -Package {struct::set 2.2.3} +Package {struct 2.1} See __struct Platform * -Desc {Procedures for manipulating sets} +Desc {Tcllib package} Package {struct::queue 1.4.2} See __struct @@ -3150,7 +3320,7 @@ Platform * Desc {Create and manipulate pool objects (of discrete items)} -Package {struct::list 1.8} +Package {struct::list 1.8.1} See __struct Platform * Desc {Procedures for manipulating lists} @@ -3200,7 +3370,7 @@ Package {tepam 0.2.0} Platform * -Desc {TEPAM argument_dialogbox, reference manual} +Desc {TEPAM procedure, reference manual} Base @TAP_DIR@/tepam Path pkgIndex.tcl Path tepam.tcl @@ -3211,11 +3381,17 @@ # ############# # Module "term" # [1] | "term::receive::bind" (0.1) -# [2] | "term" (0.1) -# [3] | "term::interact::pager" (0.1) -# [4] | "term::send" (0.1) -# [5] | "term::interact::menu" (0.1) -# [6] | "term::receive" (0.1) +# [2] | "term::ansi::ctrl::unix" (0.1.1) +# [3] | "term::ansi::code::attr" (0.1) +# [4] | "term::interact::menu" (0.1) +# [5] | "term" (0.1) +# [6] | "term::interact::pager" (0.1) +# [7] | "term::ansi::send" (0.1) +# [8] | "term::ansi::code" (0.1) +# [9] | "term::send" (0.1) +# [10] | "term::receive" (0.1) +# [11] | "term::ansi::code::macros" (0.1) +# [12] | "term::ansi::code::ctrl" (0.1.1) # -------+ Package {__term 0.0} @@ -3223,6 +3399,12 @@ Desc {Terminal control} Hidden Base @TAP_DIR@/term +Path ansi/code.tcl +Path ansi/code/attr.tcl +Path ansi/code/ctrl.tcl +Path ansi/code/macros.tcl +Path ansi/ctrlunix.tcl +Path ansi/send.tcl Path bind.tcl Path imenu.tcl Path ipager.tcl @@ -3236,6 +3418,21 @@ Platform * Desc {Keyboard dispatch from terminals} +Package {term::ansi::ctrl::unix 0.1.1} +See __term +Platform * +Desc {Control operations and queries} + +Package {term::ansi::code::attr 0.1} +See __term +Platform * +Desc {ANSI attribute sequences} + +Package {term::interact::menu 0.1} +See __term +Platform * +Desc {Terminal widget, menu} + Package {term 0.1} See __term Platform * @@ -3246,21 +3443,36 @@ Platform * Desc {Terminal widget, paging} -Package {term::send 0.1} +Package {term::ansi::send 0.1} See __term Platform * -Desc {General output to terminals} +Desc {Output of ANSI control sequences to terminals} -Package {term::interact::menu 0.1} +Package {term::ansi::code 0.1} See __term Platform * -Desc {Terminal widget, menu} +Desc {Helper for control sequences} + +Package {term::send 0.1} +See __term +Platform * +Desc {General output to terminals} Package {term::receive 0.1} See __term Platform * Desc {General input from terminals} +Package {term::ansi::code::macros 0.1} +See __term +Platform * +Desc {Macro sequences} + +Package {term::ansi::code::ctrl 0.1.1} +See __term +Platform * +Desc {ANSI control sequences} + # # ############# @@ -3268,12 +3480,12 @@ # Module "textutil" # [1] | "textutil::repeat" (0.7) # [2] | "textutil::expander" (1.3.1) -# [3] | "textutil::adjust" (0.7) -# [4] | "textutil::string" (0.7.1) +# [3] | "textutil::string" (0.7.1) +# [4] | "textutil::adjust" (0.7.1) # [5] | "textutil::tabify" (0.7) -# [6] | "textutil" (0.7.1) -# [7] | "textutil::trim" (0.7) -# [8] | "textutil::split" (0.7) +# [6] | "textutil::trim" (0.7) +# [7] | "textutil::split" (0.7) +# [8] | "textutil" (0.7.1) # -------+ Package {__textutil 0.0} @@ -3304,25 +3516,20 @@ Platform * Desc {Procedures to process templates and expand text.} -Package {textutil::adjust 0.7} -See __textutil -Platform * -Desc {Procedures to adjust, indent, and undent paragraphs} - Package {textutil::string 0.7.1} See __textutil Platform * Desc {Procedures to manipulate texts and strings.} -Package {textutil::tabify 0.7} +Package {textutil::adjust 0.7.1} See __textutil Platform * -Desc {Procedures to (un)tabify strings} +Desc {Procedures to adjust, indent, and undent paragraphs} -Package {textutil 0.7.1} +Package {textutil::tabify 0.7} See __textutil Platform * -Desc {Procedures to manipulate texts and strings.} +Desc {Procedures to (un)tabify strings} Package {textutil::trim 0.7} See __textutil @@ -3334,6 +3541,11 @@ Platform * Desc {Procedures to split texts} +Package {textutil 0.7.1} +See __textutil +Platform * +Desc {Procedures to manipulate texts and strings.} + # # ################# @@ -3342,9 +3554,9 @@ # [1] | "tie::std::array" (1.0) # [2] | "tie::std::growfile" (1.0) # [3] | "tie::std::file" (1.0.4) -# [4] | "tie::std::rarray" (1.0) +# [4] | "tie::std::dsource" (1.0) # [5] | "tie" (1.1) -# [6] | "tie::std::dsource" (1.0) +# [6] | "tie::std::rarray" (1.0) # [7] | "tie::std::log" (1.0) # -------+ @@ -3377,7 +3589,7 @@ Platform * Desc {Array persistence, standard data sources} -Package {tie::std::rarray 1.0} +Package {tie::std::dsource 1.0} See __tie Platform * Desc {Array persistence, standard data sources} @@ -3387,7 +3599,7 @@ Platform * Desc {Array persistence} -Package {tie::std::dsource 1.0} +Package {tie::std::rarray 1.0} See __tie Platform * Desc {Array persistence, standard data sources} @@ -3419,8 +3631,8 @@ # Module "transfer" # [1] | "transfer::copy" (0.3) # [2] | "transfer::data::source" (0.2) -# [3] | "transfer::data::destination" (0.2) -# [4] | "transfer::copy::queue" (0.1) +# [3] | "transfer::copy::queue" (0.1) +# [4] | "transfer::data::destination" (0.2) # [5] | "transfer::receiver" (0.2) # [6] | "transfer::transmitter" (0.2) # [7] | "transfer::connect" (0.2) @@ -3450,15 +3662,15 @@ Platform * Desc {Data source} -Package {transfer::data::destination 0.2} +Package {transfer::copy::queue 0.1} See __transfer Platform * -Desc {Data destination} +Desc {Queued transfers} -Package {transfer::copy::queue 0.1} +Package {transfer::data::destination 0.2} See __transfer Platform * -Desc {Queued transfers} +Desc {Data destination} Package {transfer::receiver 0.2} See __transfer @@ -3496,6 +3708,21 @@ # ############### # ############ +# Module "try" +# [1] | "try" (1) +# -------+ + +Package {try 1} +Platform * +Desc {try - Trap and process errors and exceptions} +Base @TAP_DIR@/try +Path pkgIndex.tcl +Path try.tcl + +# +# ############ + +# ############ # Module "uev" # [1] | "uevent::onidle" (0.1) # [2] | "uevent" (0.2) @@ -3540,7 +3767,7 @@ # ############ # Module "uri" -# [1] | "uri" (1.2.1) +# [1] | "uri" (1.2.2) # [2] | "uri::urn" (1.0.2) # -------+ @@ -3553,7 +3780,7 @@ Path uri.tcl Path urn-scheme.tcl -Package {uri 1.2.1} +Package {uri 1.2.2} See __uri Platform * Desc {URI utilities} @@ -3581,20 +3808,128 @@ # # ############# +# ################ +# Module "valtype" +# [1] | "valtype::creditcard::mastercard" (1) +# [2] | "valtype::usnpi" (1) +# [3] | "valtype::creditcard::discover" (1) +# [4] | "valtype::common" (1) +# [5] | "valtype::isbn" (1) +# [6] | "valtype::imei" (1) +# [7] | "valtype::creditcard::amex" (1) +# [8] | "valtype::creditcard::visa" (1) +# [9] | "valtype::gs1::ean13" (1) +# [10] | "valtype::luhn" (1) +# [11] | "valtype::iban" (1) +# [12] | "valtype::luhn5" (1) +# [13] | "valtype::verhoeff" (1) +# -------+ + +Package {__valtype 0.0} +Platform * +Desc {Validation types} +Hidden +Base @TAP_DIR@/valtype +Path cc_amex.tcl +Path cc_discover.tcl +Path cc_mastercard.tcl +Path cc_visa.tcl +Path ean13.tcl +Path iban.tcl +Path imei.tcl +Path isbn.tcl +Path luhn.tcl +Path luhn5.tcl +Path pkgIndex.tcl +Path usnpi.tcl +Path valtype.tcl +Path verhoeff.tcl + +Package {valtype::creditcard::mastercard 1} +See __valtype +Platform * +Desc {Validation for Mastercard creditcard number} + +Package {valtype::usnpi 1} +See __valtype +Platform * +Desc {Validation for USNPI} + +Package {valtype::creditcard::discover 1} +See __valtype +Platform * +Desc {Validation for Discover creditcard number} + +Package {valtype::common 1} +See __valtype +Platform * +Desc {Validation, common code} + +Package {valtype::isbn 1} +See __valtype +Platform * +Desc {Validation for ISBN} + +Package {valtype::imei 1} +See __valtype +Platform * +Desc {Validation for IMEI} + +Package {valtype::creditcard::amex 1} +See __valtype +Platform * +Desc {Validation for AMEX creditcard number} + +Package {valtype::creditcard::visa 1} +See __valtype +Platform * +Desc {Validation for VISA creditcard number} + +Package {valtype::gs1::ean13 1} +See __valtype +Platform * +Desc {Validation for EAN13} + +Package {valtype::luhn 1} +See __valtype +Platform * +Desc {Validation for plain number with a LUHN checkdigit} + +Package {valtype::iban 1} +See __valtype +Platform * +Desc {Validation for IBAN} + +Package {valtype::luhn5 1} +See __valtype +Platform * +Desc {Validation for plain number with a LUHN5 checkdigit} + +Package {valtype::verhoeff 1} +See __valtype +Platform * +Desc {Validation for plain number with a VERHOEFF checkdigit} + +# +# ################ + # ######################### # Module "virtchannel_base" -# [1] | "tcl::chan::fifo" (1) -# [2] | "tcl::chan::random" (1) -# [3] | "tcl::chan::memchan" (1) -# [4] | "tcl::chan::halfpipe" (1) -# [5] | "tcl::chan::nullzero" (1) -# [6] | "tcl::chan::null" (1) -# [7] | "tcl::randomseed" (1) -# [8] | "tcl::chan::textwindow" (1) -# [9] | "tcl::chan::variable" (1) -# [10] | "tcl::chan::fifo2" (1) -# [11] | "tcl::chan::string" (1) -# [12] | "tcl::chan::zero" (1) +# [1] | "tcl::chan::std" (1.0.1) +# [2] | "tcl::chan::fifo" (1) +# [3] | "tcl::chan::cat" (1.0.1) +# [4] | "tcl::chan::random" (1) +# [5] | "tcl::chan::halfpipe" (1) +# [6] | "tcl::chan::memchan" (1.0.2) +# [7] | "tcl::chan::nullzero" (1) +# [8] | "tcl::chan::null" (1) +# [9] | "tcl::chan::facade" (1.0.1) +# [10] | "tcl::randomseed" (1) +# [11] | "tcl::chan::textwindow" (1) +# [12] | "tcl::chan::variable" (1.0.2) +# [13] | "tcl::chan::fifo2" (1) +# [14] | "tcl::chan::string" (1.0.1) +# [15] | "tcl::chan::zero" (1) # -------+ Package {__virtchannel_base 0.0} @@ -3602,6 +3937,8 @@ Desc {Reflected/virtual channel support} Hidden Base @TAP_DIR@/virtchannel_base +Path cat.tcl +Path facade.tcl Path fifo.tcl Path fifo2.tcl Path halfpipe.tcl @@ -3611,31 +3948,42 @@ Path pkgIndex.tcl Path random.tcl Path randseed.tcl +Path std.tcl Path string.tcl Path textwindow.tcl Path variable.tcl Path zero.tcl +Package {tcl::chan::std 1.0.1} +See __virtchannel_base +Platform * +Desc {Standard I/O, unification of stdin and stdout} + Package {tcl::chan::fifo 1} See __virtchannel_base Platform * Desc {In-memory fifo channel} -Package {tcl::chan::random 1} +Package {tcl::chan::cat 1.0.1} See __virtchannel_base Platform * -Desc {Random channel} +Desc {Concatenation channel} -Package {tcl::chan::memchan 1} +Package {tcl::chan::random 1} See __virtchannel_base Platform * -Desc {In-memory channel} +Desc {Random channel} Package {tcl::chan::halfpipe 1} See __virtchannel_base Platform * Desc {In-memory channel, half of a fifo2} +Package {tcl::chan::memchan 1.0.2} +See __virtchannel_base +Platform * +Desc {In-memory channel} + Package {tcl::chan::nullzero 1} See __virtchannel_base Platform * @@ -3646,6 +3994,11 @@ Platform * Desc {Null channel} +Package {tcl::chan::facade 1.0.1} +See __virtchannel_base +Platform * +Desc {Facade channel} + Package {tcl::randomseed 1} See __virtchannel_base Platform * @@ -3656,7 +4009,7 @@ Platform * Desc {Textwindow channel} -Package {tcl::chan::variable 1} +Package {tcl::chan::variable 1.0.2} See __virtchannel_base Platform * Desc {In-memory channel using variable for storage} @@ -3666,7 +4019,7 @@ Platform * Desc {In-memory interconnected fifo channels} -Package {tcl::chan::string 1} +Package {tcl::chan::string 1.0.1} See __virtchannel_base Platform * Desc {Read-only in-memory channel} @@ -3717,14 +4070,14 @@ # ############################## # Module "virtchannel_transform" # [1] | "tcl::transform::zlib" (1) -# [2] | "tcl::transform::limitsize" (1) -# [3] | "tcl::transform::identity" (1) +# [2] | "tcl::transform::identity" (1) +# [3] | "tcl::transform::limitsize" (1) # [4] | "tcl::transform::otp" (1) # [5] | "tcl::transform::base64" (1) # [6] | "tcl::transform::crc32" (1) # [7] | "tcl::transform::rot" (1) -# [8] | "tcl::transform::hex" (1) -# [9] | "tcl::transform::adler32" (1) +# [8] | "tcl::transform::adler32" (1) +# [9] | "tcl::transform::hex" (1) # [10] | "tcl::transform::spacer" (1) # [11] | "tcl::transform::observe" (1) # [12] | "tcl::transform::counter" (1) @@ -3754,15 +4107,15 @@ Platform * Desc {zlib (de)compression} -Package {tcl::transform::limitsize 1} +Package {tcl::transform::identity 1} See __virtchannel_transform Platform * -Desc {limiting input} +Desc {Identity transformation} -Package {tcl::transform::identity 1} +Package {tcl::transform::limitsize 1} See __virtchannel_transform Platform * -Desc {Identity transformation} +Desc {limiting input} Package {tcl::transform::otp 1} See __virtchannel_transform @@ -3784,15 +4137,15 @@ Platform * Desc {rot-encryption} -Package {tcl::transform::hex 1} +Package {tcl::transform::adler32 1} See __virtchannel_transform Platform * -Desc {Hexadecimal encoding transformation} +Desc {Adler32 transformation} -Package {tcl::transform::adler32 1} +Package {tcl::transform::hex 1} See __virtchannel_transform Platform * -Desc {Adler32 transformation} +Desc {Hexadecimal encoding transformation} Package {tcl::transform::spacer 1} See __virtchannel_transform @@ -3843,7 +4196,7 @@ # ############# # Module "yaml" # [1] | "huddle" (0.1.5) -# [2] | "yaml" (0.3.5) +# [2] | "yaml" (0.3.6) # -------+ Package {__yaml 0.0} @@ -3860,7 +4213,7 @@ Platform * Desc {Create and manipulate huddle object} -Package {yaml 0.3.5} +Package {yaml 0.3.6} See __yaml Platform * Desc {YAML Format Encoder/Decoder} diff -Nru tcllib-1.13-dfsg/tcllib.yml tcllib-1.14-dfsg/tcllib.yml --- tcllib-1.13-dfsg/tcllib.yml 2011-01-25 05:39:00.000000000 +0000 +++ tcllib-1.14-dfsg/tcllib.yml 2011-12-13 18:13:54.000000000 +0000 @@ -1,5 +1,5 @@ dist_id: tcllib -version: 1.13 +version: 1.14 language: tcl description: | This package is intended to be a collection of Tcl packages that provide @@ -17,4 +17,4 @@ - Library/Math license: BSD owner_id: AndreasKupries -wrapped_content: tcllib-1.13/ +wrapped_content: tcllib-1.14/ diff -Nru tcllib-1.13-dfsg/X.log tcllib-1.14-dfsg/X.log --- tcllib-1.13-dfsg/X.log 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/X.log 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,1261 @@ +============================================================ + +@@ Host hephaistos +@@ Platform Linux-2.6.38-13-generic-x86_64 +@@ CWD /home/aku/Projects/Tcllib/0.Releases/1.14/Base +@@ Shell /home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.4/Install/Regular/bin/tclsh8.4 +@@ Tcl 8.4.19 +@@ MatchTests * +@@ SkipFiles l.*.test +@@ MatchFiles *.test +@@ Start 1323799911 +@@ Module textutil +@@ Testsuite modules/textutil/adjust.test +@@ StartFile 1323799911 +- tcllib::testutils 1.2 +- textutil::repeat 0.7 +- textutil::string 0.7.1 +* textutil::adjust 0.7.1 +---- adjust-0.1 start +++++ adjust-0.1 PASSED +---- adjust-0.2 start +++++ adjust-0.2 PASSED +---- adjust-0.3 start +++++ adjust-0.3 PASSED +---- adjust-0.4 start +++++ adjust-0.4 PASSED +---- adjust-0.5 start +++++ adjust-0.5 PASSED +---- adjust-0.6 start +++++ adjust-0.6 PASSED +---- adjust-0.7 start +++++ adjust-0.7 PASSED +---- adjust-0.8 start +++++ adjust-0.8 PASSED +---- adjust-1.1 start +++++ adjust-1.1 PASSED +---- adjust-1.2 start +++++ adjust-1.2 PASSED +---- adjust-1.3 start +++++ adjust-1.3 PASSED +---- adjust-1.4 start +++++ adjust-1.4 PASSED +---- adjust-1.5 start +++++ adjust-1.5 PASSED +---- adjust-2.1 start +++++ adjust-2.1 PASSED +---- adjust-2.2 start +++++ adjust-2.2 PASSED +---- adjust-2.3 start +++++ adjust-2.3 PASSED +---- adjust-2.4 start +++++ adjust-2.4 PASSED +---- adjust-2.5 start +++++ adjust-2.5 PASSED +---- adjust-2.6 start +++++ adjust-2.6 PASSED +---- adjust-2.7 start +++++ adjust-2.7 PASSED +---- adjust-2.8 start +++++ adjust-2.8 PASSED +---- indent-1.0 start +++++ indent-1.0 PASSED +---- indent-1.1 start +++++ indent-1.1 PASSED +---- indent-1.2 start +++++ indent-1.2 PASSED +---- indent-1.3 start +++++ indent-1.3 PASSED +---- indent-1.4 start +++++ indent-1.4 PASSED +---- indent-1.5 start +++++ indent-1.5 PASSED +---- indent-1.6 start +++++ indent-1.6 PASSED +---- indent-1.7 start +++++ indent-1.7 PASSED +---- undent-1.0 start +++++ undent-1.0 PASSED +---- undent-1.1 start +++++ undent-1.1 PASSED +---- undent-1.2 start +++++ undent-1.2 PASSED +---- undent-1.3 start +++++ undent-1.3 PASSED +@@ EndFile 1323799912 +@@ Testsuite modules/textutil/adjust_hyph.test +@@ StartFile 1323799912 +- tcllib::testutils 1.2 +- textutil::string 0.7.1 +- textutil::repeat 0.7 +* textutil::adjust 0.7.1 +---- adjust-tex-1.0 start +++++ adjust-tex-1.0 PASSED +---- adjust-tex-1.1 start +++++ adjust-tex-1.1 PASSED +---- adjust-tex-1.2 start +++++ adjust-tex-1.2 PASSED +---- adjust-tex-sf-860753 start +++++ adjust-tex-sf-860753 PASSED +@@ EndFile 1323799912 +@@ Testsuite modules/textutil/expander.test +@@ StartFile 1323799912 +- tcllib::testutils 1.2 +* textutil::expander 1.3.1 +---- expander-1.1 start +++++ expander-1.1 PASSED +---- expander-1.2 start +++++ expander-1.2 PASSED +---- expander-1.3 start +++++ expander-1.3 PASSED +---- expander-1.4 start +++++ expander-1.4 PASSED +---- expander-1.5 start +++++ expander-1.5 PASSED +---- expander-1.6 start +++++ expander-1.6 PASSED +---- expander-1.7 start +++++ expander-1.7 PASSED +---- expander-1.8 start +++++ expander-1.8 PASSED +---- expander-1.9 start +++++ expander-1.9 PASSED +---- expander-2.1 start +++++ expander-2.1 PASSED +---- expander-2.2 start +++++ expander-2.2 PASSED +---- expander-2.3 start +++++ expander-2.3 PASSED +---- expander-2.4 start +++++ expander-2.4 PASSED +---- expander-2.5 start +++++ expander-2.5 PASSED +---- expander-2.6 start +++++ expander-2.6 PASSED +---- expander-2.7 start +++++ expander-2.7 PASSED +---- expander-2.8 start +++++ expander-2.8 PASSED +---- expander-2.9 start +++++ expander-2.9 PASSED +---- expander-2.10 start +++++ expander-2.10 PASSED +---- expander-3.1 start +++++ expander-3.1 PASSED +---- expander-3.2 start +++++ expander-3.2 PASSED +---- expander-3.3 start +++++ expander-3.3 PASSED +---- expander-3.4 start +++++ expander-3.4 PASSED +---- expander-3.5 start +++++ expander-3.5 PASSED +---- expander-3.6 start +++++ expander-3.6 PASSED +---- expander-3.7 start +++++ expander-3.7 PASSED +---- expander-3.8 start +++++ expander-3.8 PASSED +---- expander-3.9 start +++++ expander-3.9 PASSED +---- expander-3.10 start +++++ expander-3.10 PASSED +---- expander-3.11 start +++++ expander-3.11 PASSED +---- expander-3.12 start +++++ expander-3.12 PASSED +---- expander-3.13 start +++++ expander-3.13 PASSED +---- expander-4.1 start +++++ expander-4.1 PASSED +---- expander-4.2 start +++++ expander-4.2 PASSED +---- expander-4.3 start +++++ expander-4.3 PASSED +---- expander-4.4 start +++++ expander-4.4 PASSED +---- expander-4.5 start +++++ expander-4.5 PASSED +---- expander-5.1 start +++++ expander-5.1 PASSED +---- expander-6.1 start +++++ expander-6.1 PASSED +@@ EndFile 1323799912 +@@ Testsuite modules/textutil/repeat.test +@@ StartFile 1323799912 +- tcllib::testutils 1.2 +* textutil::repeat 0.7 +---- rep-0.1 start +++++ rep-0.1 PASSED +---- rep-0.2 start +++++ rep-0.2 PASSED +---- rep-0.3 start +++++ rep-0.3 PASSED +---- rep-0.4 start +++++ rep-0.4 PASSED +---- rep-0.5 start +++++ rep-0.5 PASSED +---- rep-0.6 start +++++ rep-0.6 PASSED +---- rep-0.7 start +++++ rep-0.7 PASSED +---- rep-0.8 start +++++ rep-0.8 PASSED +@@ EndFile 1323799912 +@@ Testsuite modules/textutil/split.test +@@ StartFile 1323799912 +- tcllib::testutils 1.2 +* textutil::split 0.7 +---- splitn-0.1 start +++++ splitn-0.1 PASSED +---- splitn-0.2 start +++++ splitn-0.2 PASSED +---- splitn-0.3 start +++++ splitn-0.3 PASSED +---- splitn-1.1 start +++++ splitn-1.1 PASSED +---- splitn-1.2 start +++++ splitn-1.2 PASSED +---- splitn-1.3 start +++++ splitn-1.3 PASSED +---- splitn-2.1 start +++++ splitn-2.1 PASSED +---- splitx-0.1 start +++++ splitx-0.1 PASSED +---- splitx-0.2 start +++++ splitx-0.2 PASSED +---- splitx-0.3 start +++++ splitx-0.3 PASSED +---- splitx-0.4 start +++++ splitx-0.4 PASSED +---- splitx-0.5 start +++++ splitx-0.5 PASSED +---- splitx-1.1 start +++++ splitx-1.1 PASSED +---- splitx-1.2 start +++++ splitx-1.2 PASSED +---- splitx-2.1 start +++++ splitx-2.1 PASSED +---- splitx-2.2 start +++++ splitx-2.2 PASSED +---- splitx-3.1 start +++++ splitx-3.1 PASSED +---- splitx-3.2 start +++++ splitx-3.2 PASSED +---- splitx-3.3 start +++++ splitx-3.3 PASSED +---- splitx-3.4 start +++++ splitx-3.4 PASSED +---- splitx-3.5 start +++++ splitx-3.5 PASSED +---- splitx-3.6 start +++++ splitx-3.6 PASSED +---- splitx-4.0 start +++++ splitx-4.0 PASSED +---- splitx-4.1 start +++++ splitx-4.1 PASSED +---- splitx-4.2 start +++++ splitx-4.2 PASSED +---- splitx-5.0 start +++++ splitx-5.0 PASSED +@@ EndFile 1323799912 +@@ Testsuite modules/textutil/tabify.test +@@ StartFile 1323799912 +- tcllib::testutils 1.2 +- textutil::repeat 0.7 +* textutil::tabify 0.7 +---- tabify-0.1 start +++++ tabify-0.1 PASSED +---- tabify-0.2 start +++++ tabify-0.2 PASSED +---- tabify-0.3 start +++++ tabify-0.3 PASSED +---- tabify-1.1 start +++++ tabify-1.1 PASSED +---- tabify-1.2 start +++++ tabify-1.2 PASSED +---- tabify-1.3 start +++++ tabify-1.3 PASSED +---- tabify-2.1 start +++++ tabify-2.1 PASSED +---- tabify-2.2 start +++++ tabify-2.2 PASSED +---- tabify-2.3 start +++++ tabify-2.3 PASSED +---- tabify-2.4 start +++++ tabify-2.4 PASSED +---- tabify-2.5 start +++++ tabify-2.5 PASSED +---- tabify-2.6 start +++++ tabify-2.6 PASSED +---- tabify-2.7 start +++++ tabify-2.7 PASSED +---- tabify-2.8 start +++++ tabify-2.8 PASSED +---- tabify-2.9 start +++++ tabify-2.9 PASSED +---- tabify-2.10 start +++++ tabify-2.10 PASSED +---- tabify-3.1 start +++++ tabify-3.1 PASSED +---- tabify-3.2 start +++++ tabify-3.2 PASSED +---- tabify-3.3 start +++++ tabify-3.3 PASSED +---- tabify-3.4 start +++++ tabify-3.4 PASSED +---- tabify-3.5 start +++++ tabify-3.5 PASSED +---- tabify-3.6 start +++++ tabify-3.6 PASSED +---- tabify-3.7 start +++++ tabify-3.7 PASSED +---- tabify-4.1 start +++++ tabify-4.1 PASSED +---- tabify-4.2 start +++++ tabify-4.2 PASSED +---- tabify-4.3 start +++++ tabify-4.3 PASSED +---- tabify-4.4 start +++++ tabify-4.4 PASSED +@@ EndFile 1323799912 +@@ Testsuite modules/textutil/textutil.test +@@ StartFile 1323799912 +- tcllib::testutils 1.2 +- textutil::string 0.7.1 +- textutil::repeat 0.7 +- textutil::adjust 0.7.1 +- textutil::split 0.7 +- textutil::tabify 0.7 +- textutil::trim 0.7 +* textutil 0.7.1 +---- textutil-1.0 start +++++ textutil-1.0 PASSED +---- textutil-1.1 start +++++ textutil-1.1 PASSED +---- textutil-1.2 start +++++ textutil-1.2 PASSED +---- textutil-1.3 start +++++ textutil-1.3 PASSED +---- textutil-2.0 start +++++ textutil-2.0 PASSED +---- textutil-2.1 start +++++ textutil-2.1 PASSED +---- textutil-2.2 start +++++ textutil-2.2 PASSED +---- textutil-3.0 start +++++ textutil-3.0 PASSED +---- textutil-3.1 start +++++ textutil-3.1 PASSED +---- textutil-3.2 start +++++ textutil-3.2 PASSED +---- textutil-4.0 start +++++ textutil-4.0 PASSED +---- textutil-4.1 start +++++ textutil-4.1 PASSED +---- textutil-4.2 start +++++ textutil-4.2 PASSED +---- textutil-4.3 start +++++ textutil-4.3 PASSED +---- textutil-5.0 start +++++ textutil-5.0 PASSED +---- textutil-5.1 start +++++ textutil-5.1 PASSED +---- textutil-5.2 start +++++ textutil-5.2 PASSED +---- textutil-5.3 start +++++ textutil-5.3 PASSED +---- textutil-6.0 start +++++ textutil-6.0 PASSED +---- textutil-6.1 start +++++ textutil-6.1 PASSED +---- textutil-6.2 start +++++ textutil-6.2 PASSED +---- textutil-6.3 start +++++ textutil-6.3 PASSED +---- textutil-6.4 start +++++ textutil-6.4 PASSED +---- textutil-6.5 start +++++ textutil-6.5 PASSED +@@ EndFile 1323799912 +@@ Testsuite modules/textutil/trim.test +@@ StartFile 1323799912 +- tcllib::testutils 1.2 +* textutil::trim 0.7 +---- trim-0.1 start +++++ trim-0.1 PASSED +---- trim-0.2 start +++++ trim-0.2 PASSED +---- trim-0.3 start +++++ trim-0.3 PASSED +---- trim-0.4 start +++++ trim-0.4 PASSED +---- trim-1.1 start +++++ trim-1.1 PASSED +---- trim-1.2 start +++++ trim-1.2 PASSED +---- trim-1.3 start +++++ trim-1.3 PASSED +---- trim-1.4 start +++++ trim-1.4 PASSED +---- trim-2.1 start +++++ trim-2.1 PASSED +---- trim-2.2 start +++++ trim-2.2 PASSED +---- trim-2.3 start +++++ trim-2.3 PASSED +---- trim-2.4 start +++++ trim-2.4 PASSED +---- trim-3.1 start +++++ trim-3.1 PASSED +---- trim-3.2 start +++++ trim-3.2 PASSED +---- trim-3.3 start +++++ trim-3.3 PASSED +@@ EndFile 1323799912 + +@@ End 1323799912 +all.tcl: Total 161 Passed 161 Skipped 0 Failed 0 +Sourced 4 Test Files. +============================================================ + +@@ Host hephaistos +@@ Platform Linux-2.6.38-13-generic-x86_64 +@@ CWD /home/aku/Projects/Tcllib/0.Releases/1.14/Base +@@ Shell /home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.5/Install/Regular/bin/tclsh8.5 +@@ Tcl 8.5.10 +@@ MatchTests * +@@ SkipFiles l.*.test +@@ MatchFiles *.test +@@ Start 1323799912 +@@ Module textutil +@@ Testsuite modules/textutil/adjust.test +@@ StartFile 1323799912 +- tcllib::testutils 1.2 +- textutil::repeat 0.7 +- textutil::string 0.7.1 +* textutil::adjust 0.7.1 +---- adjust-0.1 start +++++ adjust-0.1 PASSED +---- adjust-0.2 start +++++ adjust-0.2 PASSED +---- adjust-0.3 start +++++ adjust-0.3 PASSED +---- adjust-0.4 start +++++ adjust-0.4 PASSED +---- adjust-0.5 start +++++ adjust-0.5 PASSED +---- adjust-0.6 start +++++ adjust-0.6 PASSED +---- adjust-0.7 start +++++ adjust-0.7 PASSED +---- adjust-0.8 start +++++ adjust-0.8 PASSED +---- adjust-1.1 start +++++ adjust-1.1 PASSED +---- adjust-1.2 start +++++ adjust-1.2 PASSED +---- adjust-1.3 start +++++ adjust-1.3 PASSED +---- adjust-1.4 start +++++ adjust-1.4 PASSED +---- adjust-1.5 start +++++ adjust-1.5 PASSED +---- adjust-2.1 start +++++ adjust-2.1 PASSED +---- adjust-2.2 start +++++ adjust-2.2 PASSED +---- adjust-2.3 start +++++ adjust-2.3 PASSED +---- adjust-2.4 start +++++ adjust-2.4 PASSED +---- adjust-2.5 start +++++ adjust-2.5 PASSED +---- adjust-2.6 start +++++ adjust-2.6 PASSED +---- adjust-2.7 start +++++ adjust-2.7 PASSED +---- adjust-2.8 start +++++ adjust-2.8 PASSED +---- indent-1.0 start +++++ indent-1.0 PASSED +---- indent-1.1 start +++++ indent-1.1 PASSED +---- indent-1.2 start +++++ indent-1.2 PASSED +---- indent-1.3 start +++++ indent-1.3 PASSED +---- indent-1.4 start +++++ indent-1.4 PASSED +---- indent-1.5 start +++++ indent-1.5 PASSED +---- indent-1.6 start +++++ indent-1.6 PASSED +---- indent-1.7 start +++++ indent-1.7 PASSED +---- undent-1.0 start +++++ undent-1.0 PASSED +---- undent-1.1 start +++++ undent-1.1 PASSED +---- undent-1.2 start +++++ undent-1.2 PASSED +---- undent-1.3 start +++++ undent-1.3 PASSED +@@ EndFile 1323799912 +@@ Testsuite modules/textutil/adjust_hyph.test +@@ StartFile 1323799912 +- tcllib::testutils 1.2 +- textutil::string 0.7.1 +- textutil::repeat 0.7 +* textutil::adjust 0.7.1 +---- adjust-tex-1.0 start +++++ adjust-tex-1.0 PASSED +---- adjust-tex-1.1 start +++++ adjust-tex-1.1 PASSED +---- adjust-tex-1.2 start +++++ adjust-tex-1.2 PASSED +---- adjust-tex-sf-860753 start +++++ adjust-tex-sf-860753 PASSED +@@ EndFile 1323799912 +@@ Testsuite modules/textutil/expander.test +@@ StartFile 1323799912 +- tcllib::testutils 1.2 +* textutil::expander 1.3.1 +---- expander-1.1 start +++++ expander-1.1 PASSED +---- expander-1.2 start +++++ expander-1.2 PASSED +---- expander-1.3 start +++++ expander-1.3 PASSED +---- expander-1.4 start +++++ expander-1.4 PASSED +---- expander-1.5 start +++++ expander-1.5 PASSED +---- expander-1.6 start +++++ expander-1.6 PASSED +---- expander-1.7 start +++++ expander-1.7 PASSED +---- expander-1.8 start +++++ expander-1.8 PASSED +---- expander-1.9 start +++++ expander-1.9 PASSED +---- expander-2.1 start +++++ expander-2.1 PASSED +---- expander-2.2 start +++++ expander-2.2 PASSED +---- expander-2.3 start +++++ expander-2.3 PASSED +---- expander-2.4 start +++++ expander-2.4 PASSED +---- expander-2.5 start +++++ expander-2.5 PASSED +---- expander-2.6 start +++++ expander-2.6 PASSED +---- expander-2.7 start +++++ expander-2.7 PASSED +---- expander-2.8 start +++++ expander-2.8 PASSED +---- expander-2.9 start +++++ expander-2.9 PASSED +---- expander-2.10 start +++++ expander-2.10 PASSED +---- expander-3.1 start +++++ expander-3.1 PASSED +---- expander-3.2 start +++++ expander-3.2 PASSED +---- expander-3.3 start +++++ expander-3.3 PASSED +---- expander-3.4 start +++++ expander-3.4 PASSED +---- expander-3.5 start +++++ expander-3.5 PASSED +---- expander-3.6 start +++++ expander-3.6 PASSED +---- expander-3.7 start +++++ expander-3.7 PASSED +---- expander-3.8 start +++++ expander-3.8 PASSED +---- expander-3.9 start +++++ expander-3.9 PASSED +---- expander-3.10 start +++++ expander-3.10 PASSED +---- expander-3.11 start +++++ expander-3.11 PASSED +---- expander-3.12 start +++++ expander-3.12 PASSED +---- expander-3.13 start +++++ expander-3.13 PASSED +---- expander-4.1 start +++++ expander-4.1 PASSED +---- expander-4.2 start +++++ expander-4.2 PASSED +---- expander-4.3 start +++++ expander-4.3 PASSED +---- expander-4.4 start +++++ expander-4.4 PASSED +---- expander-4.5 start +++++ expander-4.5 PASSED +---- expander-5.1 start +++++ expander-5.1 PASSED +---- expander-6.1 start +++++ expander-6.1 PASSED +@@ EndFile 1323799912 +@@ Testsuite modules/textutil/repeat.test +@@ StartFile 1323799912 +- tcllib::testutils 1.2 +* textutil::repeat 0.7 +---- rep-0.1 start +++++ rep-0.1 PASSED +---- rep-0.2 start +++++ rep-0.2 PASSED +---- rep-0.3 start +++++ rep-0.3 PASSED +---- rep-0.4 start +++++ rep-0.4 PASSED +---- rep-0.5 start +++++ rep-0.5 PASSED +---- rep-0.6 start +++++ rep-0.6 PASSED +---- rep-0.7 start +++++ rep-0.7 PASSED +---- rep-0.8 start +++++ rep-0.8 PASSED +@@ EndFile 1323799912 +@@ Testsuite modules/textutil/split.test +@@ StartFile 1323799912 +- tcllib::testutils 1.2 +* textutil::split 0.7 +---- splitn-0.1 start +++++ splitn-0.1 PASSED +---- splitn-0.2 start +++++ splitn-0.2 PASSED +---- splitn-0.3 start +++++ splitn-0.3 PASSED +---- splitn-1.1 start +++++ splitn-1.1 PASSED +---- splitn-1.2 start +++++ splitn-1.2 PASSED +---- splitn-1.3 start +++++ splitn-1.3 PASSED +---- splitn-2.1 start +++++ splitn-2.1 PASSED +---- splitx-0.1 start +++++ splitx-0.1 PASSED +---- splitx-0.2 start +++++ splitx-0.2 PASSED +---- splitx-0.3 start +++++ splitx-0.3 PASSED +---- splitx-0.4 start +++++ splitx-0.4 PASSED +---- splitx-0.5 start +++++ splitx-0.5 PASSED +---- splitx-1.1 start +++++ splitx-1.1 PASSED +---- splitx-1.2 start +++++ splitx-1.2 PASSED +---- splitx-2.1 start +++++ splitx-2.1 PASSED +---- splitx-2.2 start +++++ splitx-2.2 PASSED +---- splitx-3.1 start +++++ splitx-3.1 PASSED +---- splitx-3.2 start +++++ splitx-3.2 PASSED +---- splitx-3.3 start +++++ splitx-3.3 PASSED +---- splitx-3.4 start +++++ splitx-3.4 PASSED +---- splitx-3.5 start +++++ splitx-3.5 PASSED +---- splitx-3.6 start +++++ splitx-3.6 PASSED +---- splitx-4.0 start +++++ splitx-4.0 PASSED +---- splitx-4.1 start +++++ splitx-4.1 PASSED +---- splitx-4.2 start +++++ splitx-4.2 PASSED +---- splitx-5.0 start +++++ splitx-5.0 PASSED +@@ EndFile 1323799912 +@@ Testsuite modules/textutil/tabify.test +@@ StartFile 1323799912 +- tcllib::testutils 1.2 +- textutil::repeat 0.7 +* textutil::tabify 0.7 +---- tabify-0.1 start +++++ tabify-0.1 PASSED +---- tabify-0.2 start +++++ tabify-0.2 PASSED +---- tabify-0.3 start +++++ tabify-0.3 PASSED +---- tabify-1.1 start +++++ tabify-1.1 PASSED +---- tabify-1.2 start +++++ tabify-1.2 PASSED +---- tabify-1.3 start +++++ tabify-1.3 PASSED +---- tabify-2.1 start +++++ tabify-2.1 PASSED +---- tabify-2.2 start +++++ tabify-2.2 PASSED +---- tabify-2.3 start +++++ tabify-2.3 PASSED +---- tabify-2.4 start +++++ tabify-2.4 PASSED +---- tabify-2.5 start +++++ tabify-2.5 PASSED +---- tabify-2.6 start +++++ tabify-2.6 PASSED +---- tabify-2.7 start +++++ tabify-2.7 PASSED +---- tabify-2.8 start +++++ tabify-2.8 PASSED +---- tabify-2.9 start +++++ tabify-2.9 PASSED +---- tabify-2.10 start +++++ tabify-2.10 PASSED +---- tabify-3.1 start +++++ tabify-3.1 PASSED +---- tabify-3.2 start +++++ tabify-3.2 PASSED +---- tabify-3.3 start +++++ tabify-3.3 PASSED +---- tabify-3.4 start +++++ tabify-3.4 PASSED +---- tabify-3.5 start +++++ tabify-3.5 PASSED +---- tabify-3.6 start +++++ tabify-3.6 PASSED +---- tabify-3.7 start +++++ tabify-3.7 PASSED +---- tabify-4.1 start +++++ tabify-4.1 PASSED +---- tabify-4.2 start +++++ tabify-4.2 PASSED +---- tabify-4.3 start +++++ tabify-4.3 PASSED +---- tabify-4.4 start +++++ tabify-4.4 PASSED +@@ EndFile 1323799912 +@@ Testsuite modules/textutil/textutil.test +@@ StartFile 1323799912 +- tcllib::testutils 1.2 +- textutil::string 0.7.1 +- textutil::repeat 0.7 +- textutil::adjust 0.7.1 +- textutil::split 0.7 +- textutil::tabify 0.7 +- textutil::trim 0.7 +* textutil 0.7.1 +---- textutil-1.0 start +++++ textutil-1.0 PASSED +---- textutil-1.1 start +++++ textutil-1.1 PASSED +---- textutil-1.2 start +++++ textutil-1.2 PASSED +---- textutil-1.3 start +++++ textutil-1.3 PASSED +---- textutil-2.0 start +++++ textutil-2.0 PASSED +---- textutil-2.1 start +++++ textutil-2.1 PASSED +---- textutil-2.2 start +++++ textutil-2.2 PASSED +---- textutil-3.0 start +++++ textutil-3.0 PASSED +---- textutil-3.1 start +++++ textutil-3.1 PASSED +---- textutil-3.2 start +++++ textutil-3.2 PASSED +---- textutil-4.0 start +++++ textutil-4.0 PASSED +---- textutil-4.1 start +++++ textutil-4.1 PASSED +---- textutil-4.2 start +++++ textutil-4.2 PASSED +---- textutil-4.3 start +++++ textutil-4.3 PASSED +---- textutil-5.0 start +++++ textutil-5.0 PASSED +---- textutil-5.1 start +++++ textutil-5.1 PASSED +---- textutil-5.2 start +++++ textutil-5.2 PASSED +---- textutil-5.3 start +++++ textutil-5.3 PASSED +---- textutil-6.0 start +++++ textutil-6.0 PASSED +---- textutil-6.1 start +++++ textutil-6.1 PASSED +---- textutil-6.2 start +++++ textutil-6.2 PASSED +---- textutil-6.3 start +++++ textutil-6.3 PASSED +---- textutil-6.4 start +++++ textutil-6.4 PASSED +---- textutil-6.5 start +++++ textutil-6.5 PASSED +@@ EndFile 1323799912 +@@ Testsuite modules/textutil/trim.test +@@ StartFile 1323799912 +- tcllib::testutils 1.2 +* textutil::trim 0.7 +---- trim-0.1 start +++++ trim-0.1 PASSED +---- trim-0.2 start +++++ trim-0.2 PASSED +---- trim-0.3 start +++++ trim-0.3 PASSED +---- trim-0.4 start +++++ trim-0.4 PASSED +---- trim-1.1 start +++++ trim-1.1 PASSED +---- trim-1.2 start +++++ trim-1.2 PASSED +---- trim-1.3 start +++++ trim-1.3 PASSED +---- trim-1.4 start +++++ trim-1.4 PASSED +---- trim-2.1 start +++++ trim-2.1 PASSED +---- trim-2.2 start +++++ trim-2.2 PASSED +---- trim-2.3 start +++++ trim-2.3 PASSED +---- trim-2.4 start +++++ trim-2.4 PASSED +---- trim-3.1 start +++++ trim-3.1 PASSED +---- trim-3.2 start +++++ trim-3.2 PASSED +---- trim-3.3 start +++++ trim-3.3 PASSED +@@ EndFile 1323799912 + +@@ End 1323799912 +all.tcl: Total 161 Passed 161 Skipped 0 Failed 0 +Sourced 4 Test Files. +============================================================ + +@@ Host hephaistos +@@ Platform Linux-2.6.38-13-generic-x86_64 +@@ CWD /home/aku/Projects/Tcllib/0.Releases/1.14/Base +@@ Shell /home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.6/Install/Regular/bin/tclsh8.6 +@@ Tcl 8.6b2 +@@ MatchTests * +@@ SkipFiles l.*.test +@@ MatchFiles *.test +@@ Start 1323799912 +@@ Module textutil +@@ Testsuite modules/textutil/adjust.test +@@ StartFile 1323799912 +- tcllib::testutils 1.2 +- textutil::repeat 0.7 +- textutil::string 0.7.1 +* textutil::adjust 0.7.1 +---- adjust-0.1 start +++++ adjust-0.1 PASSED +---- adjust-0.2 start +++++ adjust-0.2 PASSED +---- adjust-0.3 start +++++ adjust-0.3 PASSED +---- adjust-0.4 start +++++ adjust-0.4 PASSED +---- adjust-0.5 start +++++ adjust-0.5 PASSED +---- adjust-0.6 start +++++ adjust-0.6 PASSED +---- adjust-0.7 start +++++ adjust-0.7 PASSED +---- adjust-0.8 start +++++ adjust-0.8 PASSED +---- adjust-1.1 start +++++ adjust-1.1 PASSED +---- adjust-1.2 start +++++ adjust-1.2 PASSED +---- adjust-1.3 start +++++ adjust-1.3 PASSED +---- adjust-1.4 start +++++ adjust-1.4 PASSED +---- adjust-1.5 start +++++ adjust-1.5 PASSED +---- adjust-2.1 start +++++ adjust-2.1 PASSED +---- adjust-2.2 start +++++ adjust-2.2 PASSED +---- adjust-2.3 start +++++ adjust-2.3 PASSED +---- adjust-2.4 start +++++ adjust-2.4 PASSED +---- adjust-2.5 start +++++ adjust-2.5 PASSED +---- adjust-2.6 start +++++ adjust-2.6 PASSED +---- adjust-2.7 start +++++ adjust-2.7 PASSED +---- adjust-2.8 start +++++ adjust-2.8 PASSED +---- indent-1.0 start +++++ indent-1.0 PASSED +---- indent-1.1 start +++++ indent-1.1 PASSED +---- indent-1.2 start +++++ indent-1.2 PASSED +---- indent-1.3 start +++++ indent-1.3 PASSED +---- indent-1.4 start +++++ indent-1.4 PASSED +---- indent-1.5 start +++++ indent-1.5 PASSED +---- indent-1.6 start +++++ indent-1.6 PASSED +---- indent-1.7 start +++++ indent-1.7 PASSED +---- undent-1.0 start +++++ undent-1.0 PASSED +---- undent-1.1 start +++++ undent-1.1 PASSED +---- undent-1.2 start +++++ undent-1.2 PASSED +---- undent-1.3 start +++++ undent-1.3 PASSED +@@ EndFile 1323799912 +@@ Testsuite modules/textutil/adjust_hyph.test +@@ StartFile 1323799912 +- tcllib::testutils 1.2 +- textutil::string 0.7.1 +- textutil::repeat 0.7 +* textutil::adjust 0.7.1 +---- adjust-tex-1.0 start +++++ adjust-tex-1.0 PASSED +---- adjust-tex-1.1 start +++++ adjust-tex-1.1 PASSED +---- adjust-tex-1.2 start +++++ adjust-tex-1.2 PASSED +---- adjust-tex-sf-860753 start +++++ adjust-tex-sf-860753 PASSED +@@ EndFile 1323799913 +@@ Testsuite modules/textutil/expander.test +@@ StartFile 1323799913 +- tcllib::testutils 1.2 +* textutil::expander 1.3.1 +---- expander-1.1 start +++++ expander-1.1 PASSED +---- expander-1.2 start +++++ expander-1.2 PASSED +---- expander-1.3 start +++++ expander-1.3 PASSED +---- expander-1.4 start +++++ expander-1.4 PASSED +---- expander-1.5 start +++++ expander-1.5 PASSED +---- expander-1.6 start +++++ expander-1.6 PASSED +---- expander-1.7 start +++++ expander-1.7 PASSED +---- expander-1.8 start +++++ expander-1.8 PASSED +---- expander-1.9 start +++++ expander-1.9 PASSED +---- expander-2.1 start +++++ expander-2.1 PASSED +---- expander-2.2 start +++++ expander-2.2 PASSED +---- expander-2.3 start +++++ expander-2.3 PASSED +---- expander-2.4 start +++++ expander-2.4 PASSED +---- expander-2.5 start +++++ expander-2.5 PASSED +---- expander-2.6 start +++++ expander-2.6 PASSED +---- expander-2.7 start +++++ expander-2.7 PASSED +---- expander-2.8 start +++++ expander-2.8 PASSED +---- expander-2.9 start +++++ expander-2.9 PASSED +---- expander-2.10 start +++++ expander-2.10 PASSED +---- expander-3.1 start +++++ expander-3.1 PASSED +---- expander-3.2 start +++++ expander-3.2 PASSED +---- expander-3.3 start +++++ expander-3.3 PASSED +---- expander-3.4 start +++++ expander-3.4 PASSED +---- expander-3.5 start +++++ expander-3.5 PASSED +---- expander-3.6 start +++++ expander-3.6 PASSED +---- expander-3.7 start +++++ expander-3.7 PASSED +---- expander-3.8 start +++++ expander-3.8 PASSED +---- expander-3.9 start +++++ expander-3.9 PASSED +---- expander-3.10 start +++++ expander-3.10 PASSED +---- expander-3.11 start +++++ expander-3.11 PASSED +---- expander-3.12 start +++++ expander-3.12 PASSED +---- expander-3.13 start +++++ expander-3.13 PASSED +---- expander-4.1 start +++++ expander-4.1 PASSED +---- expander-4.2 start +++++ expander-4.2 PASSED +---- expander-4.3 start +++++ expander-4.3 PASSED +---- expander-4.4 start +++++ expander-4.4 PASSED +---- expander-4.5 start +++++ expander-4.5 PASSED +---- expander-5.1 start +++++ expander-5.1 PASSED +---- expander-6.1 start +++++ expander-6.1 PASSED +@@ EndFile 1323799913 +@@ Testsuite modules/textutil/repeat.test +@@ StartFile 1323799913 +- tcllib::testutils 1.2 +* textutil::repeat 0.7 +---- rep-0.1 start +++++ rep-0.1 PASSED +---- rep-0.2 start +++++ rep-0.2 PASSED +---- rep-0.3 start +++++ rep-0.3 PASSED +---- rep-0.4 start +++++ rep-0.4 PASSED +---- rep-0.5 start +++++ rep-0.5 PASSED +---- rep-0.6 start +++++ rep-0.6 PASSED +---- rep-0.7 start +++++ rep-0.7 PASSED +---- rep-0.8 start +++++ rep-0.8 PASSED +@@ EndFile 1323799913 +@@ Testsuite modules/textutil/split.test +@@ StartFile 1323799913 +- tcllib::testutils 1.2 +* textutil::split 0.7 +---- splitn-0.1 start +++++ splitn-0.1 PASSED +---- splitn-0.2 start +++++ splitn-0.2 PASSED +---- splitn-0.3 start +++++ splitn-0.3 PASSED +---- splitn-1.1 start +++++ splitn-1.1 PASSED +---- splitn-1.2 start +++++ splitn-1.2 PASSED +---- splitn-1.3 start +++++ splitn-1.3 PASSED +---- splitn-2.1 start +++++ splitn-2.1 PASSED +---- splitx-0.1 start +++++ splitx-0.1 PASSED +---- splitx-0.2 start +++++ splitx-0.2 PASSED +---- splitx-0.3 start +++++ splitx-0.3 PASSED +---- splitx-0.4 start +++++ splitx-0.4 PASSED +---- splitx-0.5 start +++++ splitx-0.5 PASSED +---- splitx-1.1 start +++++ splitx-1.1 PASSED +---- splitx-1.2 start +++++ splitx-1.2 PASSED +---- splitx-2.1 start +++++ splitx-2.1 PASSED +---- splitx-2.2 start +++++ splitx-2.2 PASSED +---- splitx-3.1 start +++++ splitx-3.1 PASSED +---- splitx-3.2 start +++++ splitx-3.2 PASSED +---- splitx-3.3 start +++++ splitx-3.3 PASSED +---- splitx-3.4 start +++++ splitx-3.4 PASSED +---- splitx-3.5 start +++++ splitx-3.5 PASSED +---- splitx-3.6 start +++++ splitx-3.6 PASSED +---- splitx-4.0 start +++++ splitx-4.0 PASSED +---- splitx-4.1 start +++++ splitx-4.1 PASSED +---- splitx-4.2 start +++++ splitx-4.2 PASSED +---- splitx-5.0 start +++++ splitx-5.0 PASSED +@@ EndFile 1323799913 +@@ Testsuite modules/textutil/tabify.test +@@ StartFile 1323799913 +- tcllib::testutils 1.2 +- textutil::repeat 0.7 +* textutil::tabify 0.7 +---- tabify-0.1 start +++++ tabify-0.1 PASSED +---- tabify-0.2 start +++++ tabify-0.2 PASSED +---- tabify-0.3 start +++++ tabify-0.3 PASSED +---- tabify-1.1 start +++++ tabify-1.1 PASSED +---- tabify-1.2 start +++++ tabify-1.2 PASSED +---- tabify-1.3 start +++++ tabify-1.3 PASSED +---- tabify-2.1 start +++++ tabify-2.1 PASSED +---- tabify-2.2 start +++++ tabify-2.2 PASSED +---- tabify-2.3 start +++++ tabify-2.3 PASSED +---- tabify-2.4 start +++++ tabify-2.4 PASSED +---- tabify-2.5 start +++++ tabify-2.5 PASSED +---- tabify-2.6 start +++++ tabify-2.6 PASSED +---- tabify-2.7 start +++++ tabify-2.7 PASSED +---- tabify-2.8 start +++++ tabify-2.8 PASSED +---- tabify-2.9 start +++++ tabify-2.9 PASSED +---- tabify-2.10 start +++++ tabify-2.10 PASSED +---- tabify-3.1 start +++++ tabify-3.1 PASSED +---- tabify-3.2 start +++++ tabify-3.2 PASSED +---- tabify-3.3 start +++++ tabify-3.3 PASSED +---- tabify-3.4 start +++++ tabify-3.4 PASSED +---- tabify-3.5 start +++++ tabify-3.5 PASSED +---- tabify-3.6 start +++++ tabify-3.6 PASSED +---- tabify-3.7 start +++++ tabify-3.7 PASSED +---- tabify-4.1 start +++++ tabify-4.1 PASSED +---- tabify-4.2 start +++++ tabify-4.2 PASSED +---- tabify-4.3 start +++++ tabify-4.3 PASSED +---- tabify-4.4 start +++++ tabify-4.4 PASSED +@@ EndFile 1323799913 +@@ Testsuite modules/textutil/textutil.test +@@ StartFile 1323799913 +- tcllib::testutils 1.2 +- textutil::string 0.7.1 +- textutil::repeat 0.7 +- textutil::adjust 0.7.1 +- textutil::split 0.7 +- textutil::tabify 0.7 +- textutil::trim 0.7 +* textutil 0.7.1 +---- textutil-1.0 start +++++ textutil-1.0 PASSED +---- textutil-1.1 start +++++ textutil-1.1 PASSED +---- textutil-1.2 start +++++ textutil-1.2 PASSED +---- textutil-1.3 start +++++ textutil-1.3 PASSED +---- textutil-2.0 start +++++ textutil-2.0 PASSED +---- textutil-2.1 start +++++ textutil-2.1 PASSED +---- textutil-2.2 start +++++ textutil-2.2 PASSED +---- textutil-3.0 start +++++ textutil-3.0 PASSED +---- textutil-3.1 start +++++ textutil-3.1 PASSED +---- textutil-3.2 start +++++ textutil-3.2 PASSED +---- textutil-4.0 start +++++ textutil-4.0 PASSED +---- textutil-4.1 start +++++ textutil-4.1 PASSED +---- textutil-4.2 start +++++ textutil-4.2 PASSED +---- textutil-4.3 start +++++ textutil-4.3 PASSED +---- textutil-5.0 start +++++ textutil-5.0 PASSED +---- textutil-5.1 start +++++ textutil-5.1 PASSED +---- textutil-5.2 start +++++ textutil-5.2 PASSED +---- textutil-5.3 start +++++ textutil-5.3 PASSED +---- textutil-6.0 start +++++ textutil-6.0 PASSED +---- textutil-6.1 start +++++ textutil-6.1 PASSED +---- textutil-6.2 start +++++ textutil-6.2 PASSED +---- textutil-6.3 start +++++ textutil-6.3 PASSED +---- textutil-6.4 start +++++ textutil-6.4 PASSED +---- textutil-6.5 start +++++ textutil-6.5 PASSED +@@ EndFile 1323799913 +@@ Testsuite modules/textutil/trim.test +@@ StartFile 1323799913 +- tcllib::testutils 1.2 +* textutil::trim 0.7 +---- trim-0.1 start +++++ trim-0.1 PASSED +---- trim-0.2 start +++++ trim-0.2 PASSED +---- trim-0.3 start +++++ trim-0.3 PASSED +---- trim-0.4 start +++++ trim-0.4 PASSED +---- trim-1.1 start +++++ trim-1.1 PASSED +---- trim-1.2 start +++++ trim-1.2 PASSED +---- trim-1.3 start +++++ trim-1.3 PASSED +---- trim-1.4 start +++++ trim-1.4 PASSED +---- trim-2.1 start +++++ trim-2.1 PASSED +---- trim-2.2 start +++++ trim-2.2 PASSED +---- trim-2.3 start +++++ trim-2.3 PASSED +---- trim-2.4 start +++++ trim-2.4 PASSED +---- trim-3.1 start +++++ trim-3.1 PASSED +---- trim-3.2 start +++++ trim-3.2 PASSED +---- trim-3.3 start +++++ trim-3.3 PASSED +@@ EndFile 1323799913 + +@@ End 1323799913 +all.tcl: Total 161 Passed 161 Skipped 0 Failed 0 +Sourced 4 Test Files. +Passed 483 of 483 +Skipped 0 of 483 +Failed 0 of 483 +#Errors 0 diff -Nru tcllib-1.13-dfsg/X.summary tcllib-1.14-dfsg/X.summary --- tcllib-1.13-dfsg/X.summary 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/X.summary 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,33 @@ + Starting ... + [8.4.19] textutil ~~ T 161 P 161 S 0 F 0 + [8.5.10] textutil ~~ T 161 P 161 S 0 F 0 + [8.6b2] textutil ~~ T 161 P 161 S 0 F 0 + +Timings... +Shell Module Testsuite Tests Seconds uSec/Test +===== ====== ========= ===== ======= ========= +/home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.6/Install/Regular/bin/tclsh8.6 textutil adjust_hyph.test 4 1 250000 +/home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.4/Install/Regular/bin/tclsh8.4 textutil adjust.test 33 1 30303 +/home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.4/Install/Regular/bin/tclsh8.4 textutil expander.test 39 0 0 +/home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.4/Install/Regular/bin/tclsh8.4 textutil split.test 26 0 0 +/home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.4/Install/Regular/bin/tclsh8.4 textutil tabify.test 27 0 0 +/home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.4/Install/Regular/bin/tclsh8.4 textutil textutil.test 24 0 0 +/home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.5/Install/Regular/bin/tclsh8.5 textutil adjust.test 33 0 0 +/home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.6/Install/Regular/bin/tclsh8.6 textutil adjust.test 33 0 0 +/home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.5/Install/Regular/bin/tclsh8.5 textutil adjust_hyph.test 4 0 0 +/home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.5/Install/Regular/bin/tclsh8.5 textutil expander.test 39 0 0 +/home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.5/Install/Regular/bin/tclsh8.5 textutil repeat.test 8 0 0 +/home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.5/Install/Regular/bin/tclsh8.5 textutil split.test 26 0 0 +/home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.5/Install/Regular/bin/tclsh8.5 textutil tabify.test 27 0 0 +/home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.5/Install/Regular/bin/tclsh8.5 textutil textutil.test 24 0 0 +/home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.5/Install/Regular/bin/tclsh8.5 textutil trim.test 15 0 0 +/home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.4/Install/Regular/bin/tclsh8.4 textutil trim.test 15 0 0 +/home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.4/Install/Regular/bin/tclsh8.4 textutil repeat.test 8 0 0 +/home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.6/Install/Regular/bin/tclsh8.6 textutil expander.test 39 0 0 +/home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.6/Install/Regular/bin/tclsh8.6 textutil repeat.test 8 0 0 +/home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.6/Install/Regular/bin/tclsh8.6 textutil split.test 26 0 0 +/home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.6/Install/Regular/bin/tclsh8.6 textutil tabify.test 27 0 0 +/home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.6/Install/Regular/bin/tclsh8.6 textutil textutil.test 24 0 0 +/home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.6/Install/Regular/bin/tclsh8.6 textutil trim.test 15 0 0 +/home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.4/Install/Regular/bin/tclsh8.4 textutil adjust_hyph.test 4 0 0 +===== ====== ========= ===== ======= ========= diff -Nru tcllib-1.13-dfsg/X.timings tcllib-1.14-dfsg/X.timings --- tcllib-1.13-dfsg/X.timings 1970-01-01 00:00:00.000000000 +0000 +++ tcllib-1.14-dfsg/X.timings 2011-12-13 18:13:22.000000000 +0000 @@ -0,0 +1,24 @@ +TIME /home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.4/Install/Regular/bin/tclsh8.4 textutil adjust.test 33 1 30303 +TIME /home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.4/Install/Regular/bin/tclsh8.4 textutil adjust_hyph.test 4 0 0 +TIME /home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.4/Install/Regular/bin/tclsh8.4 textutil expander.test 39 0 0 +TIME /home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.4/Install/Regular/bin/tclsh8.4 textutil repeat.test 8 0 0 +TIME /home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.4/Install/Regular/bin/tclsh8.4 textutil split.test 26 0 0 +TIME /home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.4/Install/Regular/bin/tclsh8.4 textutil tabify.test 27 0 0 +TIME /home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.4/Install/Regular/bin/tclsh8.4 textutil textutil.test 24 0 0 +TIME /home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.4/Install/Regular/bin/tclsh8.4 textutil trim.test 15 0 0 +TIME /home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.5/Install/Regular/bin/tclsh8.5 textutil adjust.test 33 0 0 +TIME /home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.5/Install/Regular/bin/tclsh8.5 textutil adjust_hyph.test 4 0 0 +TIME /home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.5/Install/Regular/bin/tclsh8.5 textutil expander.test 39 0 0 +TIME /home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.5/Install/Regular/bin/tclsh8.5 textutil repeat.test 8 0 0 +TIME /home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.5/Install/Regular/bin/tclsh8.5 textutil split.test 26 0 0 +TIME /home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.5/Install/Regular/bin/tclsh8.5 textutil tabify.test 27 0 0 +TIME /home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.5/Install/Regular/bin/tclsh8.5 textutil textutil.test 24 0 0 +TIME /home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.5/Install/Regular/bin/tclsh8.5 textutil trim.test 15 0 0 +TIME /home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.6/Install/Regular/bin/tclsh8.6 textutil adjust.test 33 0 0 +TIME /home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.6/Install/Regular/bin/tclsh8.6 textutil adjust_hyph.test 4 1 250000 +TIME /home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.6/Install/Regular/bin/tclsh8.6 textutil expander.test 39 0 0 +TIME /home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.6/Install/Regular/bin/tclsh8.6 textutil repeat.test 8 0 0 +TIME /home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.6/Install/Regular/bin/tclsh8.6 textutil split.test 26 0 0 +TIME /home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.6/Install/Regular/bin/tclsh8.6 textutil tabify.test 27 0 0 +TIME /home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.6/Install/Regular/bin/tclsh8.6 textutil textutil.test 24 0 0 +TIME /home/aku/Projects/Tcllib/0.Releases/1.14/Base/../../../Test8.6/Install/Regular/bin/tclsh8.6 textutil trim.test 15 0 0