Index: README.releasemgr ================================================================== --- README.releasemgr +++ README.releasemgr @@ -21,45 +21,22 @@ Basics ------ < Flesh this out > - sak.tcl validate - sak.tcl test run - sak.tcl review - sak.tcl readme - sak.tcl localdoc - sak.tcl release (change to include rpmspec+gentip55+yml) + sak.tcl < Tasks, and how to perform them > - Making a release (candidate) branch. - Readying the release in the branch. - Make the release official, merging the branch back. -Uploading and releasing files +Uploading and releasing files to SourceForge -------------------------------------------- -(1) Create a proper fossil event for the release, via - - http://core.tcl.tk/tcllib/eventedit - - See existing events (*) for a template - - (Ad *) http://core.tcl.tk/tcllib/event/dac0ddcd2e990234143196b4dc438fe01e7b9817 - -(2) Update the following web locations - - (a) Home page: http://core.tcl.tk/tcllib/home - (b) Downloads: http://core.tcl.tk/tcllib/wiki?name=Downloads - (c) Past Releases: http://core.tcl.tk/tcllib/wiki?name=Past+Releases - - Admin access to the fossil repository required - - (d) http://www.tcl.tk/home/release.txt - (e) http://www.tcl.tk/software/tcllib/*.tml - - ssh access to tcl.activestate.com - aka www.tcl.tk - required. - - (f) http://wiki.tcl.tk/1246 +The main form to upload files is + + https://frs.sourceforge.net/webupload + +This is WebDAV. + +The place to manage the releases the files are for is + + https://sourceforge.net/project/admin/editpackages.php?group_id=12883 Index: embedded/man/files/modules/crc/sum.n ================================================================== --- embedded/man/files/modules/crc/sum.n +++ embedded/man/files/modules/crc/sum.n @@ -1,10 +1,10 @@ '\" '\" Generated from file 'sum\&.man' by tcllib/doctools with format 'nroff' '\" Copyright (c) 2002, Pat Thoyts '\" -.TH "sum" n 1\&.1\&.1 tcllib "Cyclic Redundancy Checks" +.TH "sum" n 1\&.1\&.0 tcllib "Cyclic Redundancy Checks" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. @@ -274,11 +274,11 @@ .SH NAME sum \- Calculate a sum(1) compatible checksum .SH SYNOPSIS package require \fBTcl 8\&.2\fR .sp -package require \fBsum ?1\&.1\&.1?\fR +package require \fBsum ?1\&.1\&.0?\fR .sp \fB::crc::sum\fR ?\fI-bsd\fR | \fI-sysv\fR? ?\fI-format fmt\fR? ?\fI-chunksize size\fR? [ \fI-filename file\fR | \fI-channel chan\fR | \fIstring\fR ] .sp .BE .SH DESCRIPTION Index: embedded/man/files/modules/debug/debug.n ================================================================== --- embedded/man/files/modules/debug/debug.n +++ embedded/man/files/modules/debug/debug.n @@ -313,11 +313,11 @@ independently settable levels of interest (an integer, higher is more detailed)\&. .SH API .TP \fBdebug\&.\fBtag\fR\fR \fImessage\fR ?\fIlevel\fR? -For each known tag the package creates a command with this signature +For each known tag the package creates a command with this signatur the user can then use to provide the debug narrative of the tag\&. The narrative \fImessage\fR is provided as a Tcl script whose value is \fBsubst\fRed in the caller's scope if and only if the current level of interest for the \fItag\fR matches or exceeds the call's \fIlevel\fR of detail\&. This is useful, as one can place arbitrarily complex Index: embedded/man/files/modules/dns/tcllib_ip.n ================================================================== --- embedded/man/files/modules/dns/tcllib_ip.n +++ embedded/man/files/modules/dns/tcllib_ip.n @@ -1,11 +1,11 @@ '\" '\" Generated from file 'tcllib_ip\&.man' by tcllib/doctools with format 'nroff' '\" Copyright (c) 2004, Pat Thoyts '\" Copyright (c) 2005 Aamer Akhter '\" -.TH "tcllib_ip" n 1\&.2\&.2 tcllib "Domain Name Service" +.TH "tcllib_ip" n 1\&.2\&.1 tcllib "Domain Name Service" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. @@ -275,11 +275,11 @@ .SH NAME tcllib_ip \- IPv4 and IPv6 address manipulation .SH SYNOPSIS package require \fBTcl 8\&.2\fR .sp -package require \fBip ?1\&.2\&.2?\fR +package require \fBip ?1\&.2\&.1?\fR .sp \fB::ip::version\fR \fIaddress\fR .sp \fB::ip::is\fR \fIclass\fR \fIaddress\fR .sp Index: embedded/man/files/modules/doctools/doctools.n ================================================================== --- embedded/man/files/modules/doctools/doctools.n +++ embedded/man/files/modules/doctools/doctools.n @@ -1,10 +1,10 @@ '\" '\" Generated from file 'doctools\&.man' by tcllib/doctools with format 'nroff' -'\" Copyright (c) 2003-2014 Andreas Kupries +'\" Copyright (c) 2003-2013 Andreas Kupries '\" -.TH "doctools" n 1\&.4\&.18 tcllib "Documentation tools" +.TH "doctools" n 1\&.4\&.16 tcllib "Documentation tools" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. @@ -274,11 +274,11 @@ .SH NAME doctools \- doctools - Processing documents .SH SYNOPSIS package require \fBTcl 8\&.2\fR .sp -package require \fBdoctools ?1\&.4\&.18?\fR +package require \fBdoctools ?1\&.4\&.16?\fR .sp \fB::doctools::new\fR \fIobjectName\fR ?\fIoption value\fR\&.\&.\&.? .sp \fB::doctools::help\fR .sp @@ -699,8 +699,8 @@ HTML, TMML, conversion, documentation, manpage, markup, nroff .SH CATEGORY Documentation tools .SH COPYRIGHT .nf -Copyright (c) 2003-2014 Andreas Kupries +Copyright (c) 2003-2013 Andreas Kupries .fi Index: embedded/man/files/modules/dtplite/pkg_dtplite.n ================================================================== --- embedded/man/files/modules/dtplite/pkg_dtplite.n +++ embedded/man/files/modules/dtplite/pkg_dtplite.n @@ -1,10 +1,10 @@ '\" '\" Generated from file 'pkg_dtplite\&.man' by tcllib/doctools with format 'nroff' '\" Copyright (c) 2004-2013 Andreas Kupries '\" -.TH "dtplite" n 1\&.2 tcllib "Documentation toolbox" +.TH "dtplite" n 1\&.1 tcllib "Documentation toolbox" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. @@ -272,12 +272,10 @@ .. .BS .SH NAME dtplite \- Lightweight DocTools Markup Processor .SH SYNOPSIS -package require \fBdtplite ?1\&.2?\fR -.sp \fBdtplite\fR \fB-o\fR \fIoutput\fR ?options? \fIformat\fR \fIinputfile\fR .sp \fBdtplite\fR \fBvalidate\fR \fIinputfile\fR .sp \fBdtplite\fR \fB-o\fR \fIoutput\fR ?options? \fIformat\fR \fIinputdirectory\fR Index: embedded/man/files/modules/ftp/ftp.n ================================================================== --- embedded/man/files/modules/ftp/ftp.n +++ embedded/man/files/modules/ftp/ftp.n @@ -1,9 +1,9 @@ '\" '\" Generated from file 'ftp\&.man' by tcllib/doctools with format 'nroff' '\" -.TH "ftp" n 2\&.4\&.13 tcllib "ftp client" +.TH "ftp" n 2\&.4\&.11 tcllib "ftp client" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. @@ -273,11 +273,11 @@ .SH NAME ftp \- Client-side tcl implementation of the ftp protocol .SH SYNOPSIS package require \fBTcl 8\&.2\fR .sp -package require \fBftp ?2\&.4\&.13?\fR +package require \fBftp ?2\&.4\&.11?\fR .sp \fB::ftp::Open\fR \fIserver\fR \fIuser\fR \fIpasswd\fR ?\fIoptions\fR? .sp \fB::ftp::Close\fR \fIhandle\fR .sp Index: embedded/man/files/modules/html/html.n ================================================================== --- embedded/man/files/modules/html/html.n +++ embedded/man/files/modules/html/html.n @@ -1,9 +1,9 @@ '\" '\" Generated from file 'html\&.man' by tcllib/doctools with format 'nroff' '\" -.TH "html" n 1\&.4\&.3 tcllib "HTML Generation" +.TH "html" n 1\&.4 tcllib "HTML Generation" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. @@ -273,11 +273,11 @@ .SH NAME html \- Procedures to generate HTML structures .SH SYNOPSIS package require \fBTcl 8\&.2\fR .sp -package require \fBhtml ?1\&.4\&.3?\fR +package require \fBhtml ?1\&.4?\fR .sp \fB::html::author\fR \fIauthor\fR .sp \fB::html::bodyTag\fR \fIargs\fR .sp @@ -343,18 +343,10 @@ .sp \fB::html::mailto\fR \fIemail\fR ?\fIsubject\fR? .sp \fB::html::meta\fR \fIargs\fR .sp -\fB::html::css\fR \fIhref\fR -.sp -\fB::html::css-clear\fR -.sp -\fB::html::js\fR \fIhref\fR -.sp -\fB::html::js-clear\fR -.sp \fB::html::minorList\fR \fIlist\fR ?\fIordered\fR? .sp \fB::html::minorMenu\fR \fIlist\fR ?\fIsep\fR? .sp \fB::html::nl2br\fR \fIstring\fR @@ -397,12 +389,10 @@ .sp \fB::html::varEmpty\fR \fIname\fR .sp \fB::html::while\fR \fItest body\fR .sp -\fB::html::doctype\fR \fIid\fR -.sp .BE .SH DESCRIPTION .PP The package \fBhtml\fR provides commands that generate HTML\&. These commands typically return an HTML string as their result\&. In @@ -438,11 +428,11 @@ This uses \fB::html::checkbox\fR\&. All the \fIcheckbox\fR buttons share the same \fIkey\fR for their name\&. The \fIsep\fR is text used to separate the elements\&. .TP \fB::html::checkValue\fR \fIname\fR ?\fIvalue\fR? -Generate the "name=\fIname\fR value=\fIvalue\fR" for a \fIcheckbox\fR form +Generate the "name=\fIname\fR value=\fIvalue\fR for a \fIcheckbox\fR form element\&. If the CGI variable \fIname\fR has the value \fIvalue\fR, then SELECTED is added to the return value\&. \fIvalue\fR defaults to "1"\&. .TP \fB::html::closeTag\fR @@ -593,44 +583,10 @@ define a \fImeta\fR tag for the page\&. The \fIargs\fR is a Tcl-style name, value list that is used for the name= and value= parameters for the \fImeta\fR tag\&. The \fImeta\fR tag is included in the result of \fB::html::head\fR\&. .TP -\fB::html::css\fR \fIhref\fR -\fISide effect only\fR\&. Call this before \fB::html::head\fR to -define a \fIlink\fR tag for a linked CSS document\&. The \fIhref\fR -value is a HTTP URL to a CSS document\&. The \fIlink\fR tag is included -in the result of \fB::html::head\fR\&. -.sp -Multiple calls of this command are allowed, enabling the use of -multiple CSS document references\&. In other words, the arguments -of multiple calls are accumulated, and do not overwrite each other\&. -.TP -\fB::html::css-clear\fR -\fISide effect only\fR\&. Call this before \fB::html::head\fR to -clear all links to CSS documents\&. -.sp -Multiple calls of this command are allowed, doing nothing after the -first of a sequence with no intervening \fB::html::css\fR\&. -.TP -\fB::html::js\fR \fIhref\fR -\fISide effect only\fR\&. Call this before \fB::html::head\fR to -define a \fIscript\fR tag for a linked JavaScript document\&. The -\fIhref\fR is a HTTP URL to a JavaScript document\&. The \fIscript\fR -tag is included in the result of \fB::html::head\fR\&. -.sp -Multiple calls of this command are allowed, enabling the use of -multiple JavaScript document references\&. In other words, the arguments -of multiple calls are accumulated, and do not overwrite each other\&. -.TP -\fB::html::js-clear\fR -\fISide effect only\fR\&. Call this before \fB::html::head\fR to -clear all links to JavaScript documents\&. -.sp -Multiple calls of this command are allowed, doing nothing after the -first of a sequence with no intervening \fB::html::js\fR\&. -.TP \fB::html::minorList\fR \fIlist\fR ?\fIordered\fR? Generate an ordered or unordered list of links\&. The \fIlist\fR is a Tcl-style name, value list of labels and urls for the links\&. \fIordered\fR is a boolean used to choose between an ordered or unordered list\&. It defaults to \fBfalse\fR\&. @@ -675,11 +631,11 @@ label\&. All the radio buttons share the same \fIkey\fR for their name\&. The \fIsep\fR is text used to separate the elements\&. The \fIlist\fR is a Tcl-style label, value list\&. .TP \fB::html::radioValue\fR \fIname value\fR -Generate the "name=\fIname\fR value=\fIvalue\fR" for a \fIradio\fR form +Generate the "name=\fIname\fR value=\fIvalue\fR for a \fIradio\fR form element\&. If the CGI variable \fIname\fR has the value \fIvalue\fR, then SELECTED is added to the return value\&. .TP \fB::html::refresh\fR \fIseconds url\fR Set up a refresh \fImeta\fR tag\&. Call this before \fB::html::head\fR and the @@ -748,42 +704,10 @@ \fB::html::while\fR \fItest body\fR This procedure is similar to the built-in Tcl \fBwhile\fR control structure\&. Rather than evaluating the body, it returns the subst'ed \fIbody\fR\&. Each iteration of the loop causes another string to be concatenated to the result value\&. -.TP -\fB::html::doctype\fR \fIid\fR -This procedure can be used to build the standard DOCTYPE -declaration string\&. It will return the standard declaration -string for the id, or throw an error if the id is not known\&. -The following id's are defined: -.RS -.IP [1] -HTML32 -.IP [2] -HTML40 -.IP [3] -HTML40T -.IP [4] -HTML40F -.IP [5] -HTML401 -.IP [6] -HTML401T -.IP [7] -HTML401F -.IP [8] -XHTML10S -.IP [9] -XHTML10T -.IP [10] -XHTML10F -.IP [11] -XHTML11 -.IP [12] -XHTMLB -.RE .PP .SH "BUGS, IDEAS, FEEDBACK" This document, and the package it describes, will undoubtedly contain bugs and other problems\&. Please report such in the category \fIhtml\fR of the Index: embedded/man/files/modules/json/json_write.n ================================================================== --- embedded/man/files/modules/json/json_write.n +++ embedded/man/files/modules/json/json_write.n @@ -1,10 +1,10 @@ '\" '\" Generated from file 'json_write\&.man' by tcllib/doctools with format 'nroff' '\" Copyright (c) 2009-2013 Andreas Kupries '\" -.TH "json::write" n 1\&.0\&.3 tcllib "JSON" +.TH "json::write" n 1\&.0\&.2 tcllib "JSON" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. @@ -274,11 +274,11 @@ .SH NAME json::write \- JSON generation .SH SYNOPSIS package require \fBTcl 8\&.5\fR .sp -package require \fBjson::write ?1\&.0\&.3?\fR +package require \fBjson::write ?1\&.0\&.2?\fR .sp \fB::json::write\fR \fBindented\fR .sp \fB::json::write\fR \fBindented\fR \fIflag\fR .sp Index: embedded/man/files/modules/math/math_geometry.n ================================================================== --- embedded/man/files/modules/math/math_geometry.n +++ embedded/man/files/modules/math/math_geometry.n @@ -3,11 +3,11 @@ '\" Copyright (c) 2001 by Ideogramic ApS and other parties '\" Copyright (c) 2004 by Arjen Markus '\" Copyright (c) 2010 by Andreas Kupries '\" Copyright (c) 2010 by Kevin Kenny '\" -.TH "math::geometry" n 1\&.1\&.3 tcllib "Tcl Math Library" +.TH "math::geometry" n 1\&.1\&.2 tcllib "Tcl Math Library" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. @@ -277,11 +277,11 @@ .SH NAME math::geometry \- Geometrical computations .SH SYNOPSIS package require \fBTcl ?8\&.3?\fR .sp -package require \fBmath::geometry ?1\&.1\&.3?\fR +package require \fBmath::geometry ?1\&.1\&.2?\fR .sp \fB::math::geometry::+\fR \fIpoint1\fR \fIpoint2\fR .sp \fB::math::geometry::-\fR \fIpoint1\fR \fIpoint2\fR .sp @@ -313,12 +313,10 @@ .sp \fB::math::geometry::calculateDistanceToLineSegment\fR \fIP\fR \fIlinesegment\fR .sp \fB::math::geometry::calculateDistanceToPolyline\fR \fIP\fR \fIpolyline\fR .sp -\fB::math::geometry::calculateDistanceToPolygon\fR \fIP\fR \fIpolygon\fR -.sp \fB::math::geometry::findClosestPointOnLine\fR \fIP\fR \fIline\fR .sp \fB::math::geometry::findClosestPointOnLineSegment\fR \fIP\fR \fIlinesegment\fR .sp \fB::math::geometry::findClosestPointOnPolyline\fR \fIP\fR \fIpolyline\fR @@ -513,35 +511,20 @@ .sp .sp .TP \fB::math::geometry::calculateDistanceToPolyline\fR \fIP\fR \fIpolyline\fR Calculate the distance of point P to the polyline and -return the result\&. Note that a polyline needs not to be closed\&. +return the result\&. .RS .TP list \fIP\fR List of two numbers, the coordinates of the point .TP list \fIpolyline\fR List of numbers, the coordinates of the vertices of the polyline .RE -.sp -.TP -\fB::math::geometry::calculateDistanceToPolygon\fR \fIP\fR \fIpolygon\fR -Calculate the distance of point P to the polygon and -return the result\&. If the list of coordinates is not closed (first and last -points differ), it is automatically closed\&. -.RS -.TP -list \fIP\fR -List of two numbers, the coordinates of the point -.TP -list \fIpolygon\fR -List of numbers, the coordinates of the -vertices of the polygon -.RE .sp .TP \fB::math::geometry::findClosestPointOnLine\fR \fIP\fR \fIline\fR Return the point on a line which is closest to a given point\&. .RS @@ -609,12 +592,11 @@ .RE .sp .TP \fB::math::geometry::lineSegmentsIntersect\fR \fIlinesegment1\fR \fIlinesegment2\fR Check if two line segments intersect or coincide\&. Returns 1 if that is -the case, 0 otherwise (in two dimensions only)\&. If an endpoint of one segment lies on -the other segment (or is very close to the segment), they are considered to intersect +the case, 0 otherwise (in two dimensions only)\&. .RS .TP list \fIlinesegment1\fR First line segment .TP Index: embedded/man/files/modules/pt/pt_peg_from_peg.n ================================================================== --- embedded/man/files/modules/pt/pt_peg_from_peg.n +++ embedded/man/files/modules/pt/pt_peg_from_peg.n @@ -1,10 +1,10 @@ '\" '\" Generated from file 'from\&.inc' by tcllib/doctools with format 'nroff' '\" Copyright (c) 2009 Andreas Kupries '\" -.TH "pt::peg::from::peg" n 1\&.0\&.2 tcllib "Parser Tools" +.TH "pt::peg::from::peg" n 1 tcllib "Parser Tools" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. @@ -274,11 +274,11 @@ .SH NAME pt::peg::from::peg \- PEG Conversion\&. Read PEG format .SH SYNOPSIS package require \fBTcl 8\&.5\fR .sp -package require \fBpt::peg::from::peg ?1\&.0\&.2?\fR +package require \fBpt::peg::from::peg ?1?\fR .sp \fBpt::peg::from::peg\fR \fBconvert\fR \fItext\fR .sp .BE .SH DESCRIPTION Index: embedded/man/files/modules/pt/pt_peg_op.n ================================================================== --- embedded/man/files/modules/pt/pt_peg_op.n +++ embedded/man/files/modules/pt/pt_peg_op.n @@ -1,10 +1,10 @@ '\" '\" Generated from file 'pt_peg_op\&.man' by tcllib/doctools with format 'nroff' '\" Copyright (c) 2009 Andreas Kupries '\" -.TH "pt_peg_op" i 1\&.0\&.1 tcllib "Parser Tools" +.TH "pt_peg_op" i 1 tcllib "Parser Tools" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. @@ -274,11 +274,11 @@ .SH NAME pt_peg_op \- Parser Tools PE Grammar Utility Operations .SH SYNOPSIS package require \fBTcl 8\&.5\fR .sp -package require \fBpt::peg::op 1\&.0\&.1\fR +package require \fBpt::peg::op 1\fR .sp \fB::peg::peg::op\fR \fBcalled\fR \fIcontainer\fR .sp \fB::peg::peg::op\fR \fBdechain\fR \fIcontainer\fR .sp Index: embedded/man/files/modules/pt/pt_peg_to_peg.n ================================================================== --- embedded/man/files/modules/pt/pt_peg_to_peg.n +++ embedded/man/files/modules/pt/pt_peg_to_peg.n @@ -1,10 +1,10 @@ '\" '\" Generated from file 'to\&.inc' by tcllib/doctools with format 'nroff' '\" Copyright (c) 2009 Andreas Kupries '\" -.TH "pt::peg::to::peg" n 1\&.0\&.1 tcllib "Parser Tools" +.TH "pt::peg::to::peg" n 1 tcllib "Parser Tools" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. @@ -274,11 +274,11 @@ .SH NAME pt::peg::to::peg \- PEG Conversion\&. Write PEG format .SH SYNOPSIS package require \fBTcl 8\&.5\fR .sp -package require \fBpt::peg::to::peg ?1\&.0\&.1?\fR +package require \fBpt::peg::to::peg ?1?\fR .sp package require \fBpt::peg \fR .sp package require \fBpt::pe \fR .sp Index: embedded/man/files/modules/pt/pt_pgen.n ================================================================== --- embedded/man/files/modules/pt/pt_pgen.n +++ embedded/man/files/modules/pt/pt_pgen.n @@ -1,10 +1,10 @@ '\" '\" Generated from file 'pt_pgen\&.man' by tcllib/doctools with format 'nroff' '\" Copyright (c) 2009 Andreas Kupries '\" -.TH "pt::pgen" n 1\&.0\&.2 tcllib "Parser Tools" +.TH "pt::pgen" n 1\&.0\&.1 tcllib "Parser Tools" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. @@ -274,11 +274,11 @@ .SH NAME pt::pgen \- Parser Generator .SH SYNOPSIS package require \fBTcl 8\&.5\fR .sp -package require \fBpt::pgen ?1\&.0\&.2?\fR +package require \fBpt::pgen ?1\&.0\&.1?\fR .sp \fB::pt::pgen\fR \fIinputformat\fR \fItext\fR \fIresultformat\fR ?\fIoptions\&.\&.\&.\fR? .sp .BE .SH DESCRIPTION Index: embedded/man/files/modules/rest/rest.n ================================================================== --- embedded/man/files/modules/rest/rest.n +++ embedded/man/files/modules/rest/rest.n @@ -1,9 +1,9 @@ '\" '\" Generated from file 'rest\&.man' by tcllib/doctools with format 'nroff' '\" -.TH "rest" n 1\&.0\&.1 tcllib "A framework for RESTful web services" +.TH "rest" n 1\&.0 tcllib "A framework for RESTful web services" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. @@ -273,11 +273,11 @@ .SH NAME rest \- define REST web APIs and call them inline or asychronously .SH SYNOPSIS package require \fBTcl 8\&.5\fR .sp -package require \fBrest ?1\&.0\&.1?\fR +package require \fBrest ?1\&.0?\fR .sp \fB::rest::simple\fR \fIurl\fR \fIquery\fR ?config? ?body? .sp \fB::rest::get\fR \fIurl\fR \fIquery\fR ?config? ?body? .sp Index: embedded/man/files/modules/struct/struct_list.n ================================================================== --- embedded/man/files/modules/struct/struct_list.n +++ embedded/man/files/modules/struct/struct_list.n @@ -1,11 +1,11 @@ '\" '\" Generated from file 'struct_list\&.man' by tcllib/doctools with format 'nroff' '\" Copyright (c) 2003-2005 by Kevin B\&. Kenny\&. All rights reserved '\" Copyright (c) 2003-2012 Andreas Kupries '\" -.TH "struct::list" n 1\&.8\&.3 tcllib "Tcl Data Structures" +.TH "struct::list" n 1\&.8\&.2 tcllib "Tcl Data Structures" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. @@ -275,11 +275,11 @@ .SH NAME struct::list \- Procedures for manipulating lists .SH SYNOPSIS package require \fBTcl 8\&.4\fR .sp -package require \fBstruct::list ?1\&.8\&.3?\fR +package require \fBstruct::list ?1\&.8\&.2?\fR .sp \fB::struct::list\fR \fBlongestCommonSubsequence\fR \fIsequence1\fR \fIsequence2\fR ?\fImaxOccurs\fR? .sp \fB::struct::list\fR \fBlongestCommonSubsequence2\fR \fIsequence1 sequence2\fR ?\fImaxOccurs\fR? .sp Index: embedded/man/files/modules/tar/tar.n ================================================================== --- embedded/man/files/modules/tar/tar.n +++ embedded/man/files/modules/tar/tar.n @@ -1,9 +1,9 @@ '\" '\" Generated from file 'tar\&.man' by tcllib/doctools with format 'nroff' '\" -.TH "tar" n 0\&.10 tcllib "Tar file handling" +.TH "tar" n 0\&.9 tcllib "Tar file handling" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. @@ -273,11 +273,11 @@ .SH NAME tar \- Tar file creation, extraction & manipulation .SH SYNOPSIS package require \fBTcl 8\&.4\fR .sp -package require \fBtar ?0\&.10?\fR +package require \fBtar ?0\&.9?\fR .sp \fB::tar::contents\fR \fItarball\fR ?\fB-chan\fR? .sp \fB::tar::stat\fR \fItarball\fR ?file? ?\fB-chan\fR? .sp Index: embedded/man/files/modules/term/ansi_cctrl.n ================================================================== --- embedded/man/files/modules/term/ansi_cctrl.n +++ embedded/man/files/modules/term/ansi_cctrl.n @@ -1,10 +1,10 @@ '\" '\" Generated from file 'ansi_cctrl\&.man' by tcllib/doctools with format 'nroff' '\" Copyright (c) 2006-2008 Andreas Kupries '\" -.TH "term::ansi::code::ctrl" n 0\&.2 tcllib "Terminal control" +.TH "term::ansi::code::ctrl" n 0\&.1 tcllib "Terminal control" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. @@ -274,13 +274,13 @@ .SH NAME term::ansi::code::ctrl \- ANSI control sequences .SH SYNOPSIS package require \fBTcl 8\&.4\fR .sp -package require \fBterm::ansi::code ?0\&.2?\fR +package require \fBterm::ansi::code ?0\&.1?\fR .sp -package require \fBterm::ansi::code::ctrl ?0\&.2?\fR +package require \fBterm::ansi::code::ctrl ?0\&.1\&.1?\fR .sp \fB::term::ansi::code::ctrl::names\fR .sp \fB::term::ansi::code::ctrl::import\fR ?\fIns\fR? ?\fIarg\fR\&.\&.\&.? .sp Index: embedded/man/files/modules/term/ansi_code.n ================================================================== --- embedded/man/files/modules/term/ansi_code.n +++ embedded/man/files/modules/term/ansi_code.n @@ -1,10 +1,10 @@ '\" '\" Generated from file 'ansi_code\&.man' by tcllib/doctools with format 'nroff' '\" Copyright (c) 2006 Andreas Kupries '\" -.TH "term::ansi::code" n 0\&.2 tcllib "Terminal control" +.TH "term::ansi::code" n 0\&.1 tcllib "Terminal control" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. @@ -274,11 +274,11 @@ .SH NAME term::ansi::code \- Helper for control sequences .SH SYNOPSIS package require \fBTcl 8\&.4\fR .sp -package require \fBterm::ansi::code ?0\&.2?\fR +package require \fBterm::ansi::code ?0\&.1?\fR .sp \fB::term::ansi::code::esc\fR \fIstr\fR .sp \fB::term::ansi::code::escb\fR \fIstr\fR .sp Index: embedded/man/files/modules/term/ansi_send.n ================================================================== --- embedded/man/files/modules/term/ansi_send.n +++ embedded/man/files/modules/term/ansi_send.n @@ -1,10 +1,10 @@ '\" '\" Generated from file 'ansi_send\&.man' by tcllib/doctools with format 'nroff' '\" Copyright (c) 2006 Andreas Kupries '\" -.TH "term::ansi::send" n 0\&.2 tcllib "Terminal control" +.TH "term::ansi::send" n 0\&.1 tcllib "Terminal control" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. @@ -274,11 +274,11 @@ .SH NAME term::ansi::send \- Output of ANSI control sequences to terminals .SH SYNOPSIS package require \fBTcl 8\&.4\fR .sp -package require \fBterm::ansi::send ?0\&.2?\fR +package require \fBterm::ansi::send ?0\&.1?\fR .sp \fB::term::ansi::send::import\fR ?\fIns\fR? \fI\&.\&.\&.\fR .sp \fB::term::ansi::send::eeol\fR .sp Index: embedded/man/files/modules/textutil/textutil.n ================================================================== --- embedded/man/files/modules/textutil/textutil.n +++ embedded/man/files/modules/textutil/textutil.n @@ -1,9 +1,9 @@ '\" '\" Generated from file 'textutil\&.man' by tcllib/doctools with format 'nroff' '\" -.TH "textutil" n 0\&.8 tcllib "Text and string utilities, macro processing" +.TH "textutil" n 0\&.7\&.1 tcllib "Text and string utilities, macro processing" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. @@ -273,11 +273,11 @@ .SH NAME textutil \- Procedures to manipulate texts and strings\&. .SH SYNOPSIS package require \fBTcl 8\&.2\fR .sp -package require \fBtextutil ?0\&.8?\fR +package require \fBtextutil ?0\&.7\&.1?\fR .sp \fB::textutil::adjust\fR \fIstring args\fR .sp \fB::textutil::adjust::readPatterns\fR \fIfilename\fR .sp Index: embedded/man/files/modules/textutil/textutil_string.n ================================================================== --- embedded/man/files/modules/textutil/textutil_string.n +++ embedded/man/files/modules/textutil/textutil_string.n @@ -1,9 +1,9 @@ '\" '\" Generated from file 'textutil_string\&.man' by tcllib/doctools with format 'nroff' '\" -.TH "textutil::string" n 0\&.8 tcllib "Text and string utilities, macro processing" +.TH "textutil::string" n 0\&.7 tcllib "Text and string utilities, macro processing" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. @@ -273,20 +273,18 @@ .SH NAME textutil::string \- Procedures to manipulate texts and strings\&. .SH SYNOPSIS package require \fBTcl 8\&.2\fR .sp -package require \fBtextutil::string ?0\&.8?\fR +package require \fBtextutil::string ?0\&.7?\fR .sp \fB::textutil::string::chop\fR \fIstring\fR .sp \fB::textutil::string::tail\fR \fIstring\fR .sp \fB::textutil::string::cap\fR \fIstring\fR .sp -\fB::textutil::string::capEachWord\fR \fIstring\fR -.sp \fB::textutil::string::uncap\fR \fIstring\fR .sp \fB::textutil::string::longestCommonPrefixList\fR \fIlist\fR .sp \fB::textutil::string::longestCommonPrefix\fR ?\fIstring\fR\&.\&.\&.? @@ -308,15 +306,10 @@ .TP \fB::textutil::string::cap\fR \fIstring\fR Capitalizes the first character of \fIstring\fR and returns the modified string\&. .TP -\fB::textutil::string::capEachWord\fR \fIstring\fR -Capitalizes the first character of word of the \fIstring\fR and -returns the modified string\&. Words quoted with either backslash or -dollar-sign are left untouched\&. -.TP \fB::textutil::string::uncap\fR \fIstring\fR The complementary operation to \fB::textutil::string::cap\fR\&. Forces the first character of \fIstring\fR to lower case and returns the modified string\&. .TP Index: embedded/man/files/modules/zip/decode.n ================================================================== --- embedded/man/files/modules/zip/decode.n +++ embedded/man/files/modules/zip/decode.n @@ -1,10 +1,10 @@ '\" '\" Generated from file 'decode\&.man' by tcllib/doctools with format 'nroff' -'\" Copyright (c) 2008-2014 Andreas Kupries +'\" Copyright (c) 2008-2012 Andreas Kupries '\" -.TH "zipfile::decode" n 0\&.5 tcllib "Zip archive handling" +.TH "zipfile::encode" n 0\&.3 tcllib "Zip archive handling" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. @@ -270,11 +270,11 @@ .de MT .QW "" .. .BS .SH NAME -zipfile::decode \- Access to zip archives +zipfile::encode \- Access to zip archives .SH SYNOPSIS package require \fBTcl 8\&.4\fR .sp package require \fBfileutil::magic::mimetype \fR .sp @@ -282,11 +282,11 @@ .sp package require \fBTrf \fR .sp package require \fBzlibtcl \fR .sp -package require \fBzipfile::decode ?0\&.5?\fR +package require \fBzipfile::decode ?0\&.4?\fR .sp \fB::zipfile::decode::archive\fR .sp \fB::zipfile::decode::close\fR .sp @@ -394,8 +394,8 @@ decompression, zip .SH CATEGORY File .SH COPYRIGHT .nf -Copyright (c) 2008-2014 Andreas Kupries +Copyright (c) 2008-2012 Andreas Kupries .fi Index: embedded/man/index.n ================================================================== --- embedded/man/index.n +++ embedded/man/index.n @@ -2146,11 +2146,11 @@ .TP \fBfiles/modules/virtchannel_transform/tcllib_zlib\&.n\fR tcl::transform::zlib .TP \fBfiles/modules/zip/decode\&.n\fR -zipfile::decode +zipfile::encode .RE decryption .RS .TP \fBfiles/modules/virtchannel_transform/vt_otp\&.n\fR @@ -11286,14 +11286,14 @@ tcl::chan::zero .RE zip .RS .TP -\fBfiles/modules/zip/decode\&.n\fR -zipfile::decode +\fBfiles/modules/zip/encode\&.n\fR +zipfile::encode .TP -\fBfiles/modules/zip/encode\&.n\fR +\fBfiles/modules/zip/decode\&.n\fR zipfile::encode .RE zlib .RS .TP Index: embedded/man/toc.n ================================================================== --- embedded/man/toc.n +++ embedded/man/toc.n @@ -1486,10 +1486,10 @@ \fIfiles/modules/yaml/yaml\&.n\fR: YAML Format Encoder/Decoder .TP \fByencode\fR \fIfiles/modules/base64/yencode\&.n\fR: Y-encode/decode binary data .TP -\fBzipfile::decode\fR -\fIfiles/modules/zip/decode\&.n\fR: Access to zip archives +\fBzipfile::encode\fR +\fIfiles/modules/zip/encode\&.n\fR: Generation of zip archives .TP \fBzipfile::encode\fR -\fIfiles/modules/zip/encode\&.n\fR: Generation of zip archives +\fIfiles/modules/zip/decode\&.n\fR: Access to zip archives Index: embedded/www/index.html ================================================================== --- embedded/www/index.html +++ embedded/www/index.html @@ -946,11 +946,11 @@ term::ansi::code decompression - tcl::transform::zlib · zipfile::decode + tcl::transform::zlib · zipfile::encode decryption tcl::transform::otp · tcl::transform::rot @@ -4227,11 +4227,11 @@ tcl::chan::nullzero · tcl::chan::zero zip - zipfile::decode · zipfile::encode + zipfile::encode · zipfile::encode zlib tcl::transform::zlib Index: embedded/www/tcllib/files/modules/crc/sum.html ================================================================== --- embedded/www/tcllib/files/modules/crc/sum.html +++ embedded/www/tcllib/files/modules/crc/sum.html @@ -1,6 +1,5 @@ - sum - Cyclic Redundancy Checks -

[ @@ -106,11 +106,11 @@ | Keyword Index | Categories | Modules | Applications ]
-

doctools(n) 1.4.18 tcllib "Documentation tools"

+

doctools(n) 1.4.16 tcllib "Documentation tools"

Name

doctools - doctools - Processing documents

Table Of Contents

    @@ -136,11 +136,11 @@

Synopsis

  • package require Tcl 8.2
  • -
  • package require doctools ?1.4.18?
  • +
  • package require doctools ?1.4.16?

Category

Documentation tools

Index: embedded/www/tcllib/files/modules/dtplite/pkg_dtplite.html ================================================================== --- embedded/www/tcllib/files/modules/dtplite/pkg_dtplite.html +++ embedded/www/tcllib/files/modules/dtplite/pkg_dtplite.html @@ -106,11 +106,11 @@ | Keyword Index | Categories | Modules | Applications ]
-

dtplite(n) 1.2 tcllib "Documentation toolbox"

+

dtplite(n) 1.1 tcllib "Documentation toolbox"

Name

dtplite - Lightweight DocTools Markup Processor

Table Of Contents

Synopsis

-
    -
  • package require dtplite ?1.2?
  • -
  • dtplite -o output ?options? format inputfile
  • dtplite validate inputfile
  • dtplite -o output ?options? format inputdirectory
  • dtplite -merge -o output ?options? format inputdirectory
  • Index: embedded/www/tcllib/files/modules/ftp/ftp.html ================================================================== --- embedded/www/tcllib/files/modules/ftp/ftp.html +++ embedded/www/tcllib/files/modules/ftp/ftp.html @@ -104,11 +104,11 @@ | Keyword Index | Categories | Modules | Applications ]
    -

    ftp(n) 2.4.13 tcllib "ftp client"

    +

    ftp(n) 2.4.11 tcllib "ftp client"

    Name

    ftp - Client-side tcl implementation of the ftp protocol

    Table Of Contents

      @@ -125,11 +125,11 @@

    Synopsis

    • package require Tcl 8.2
    • -
    • package require ftp ?2.4.13?
    • +
    • package require ftp ?2.4.11?
    • ::ftp::Open server user passwd ?options?
    • ::ftp::Close handle
    • ::ftp::Cd handle directory
    • Index: embedded/www/tcllib/files/modules/html/html.html ================================================================== --- embedded/www/tcllib/files/modules/html/html.html +++ embedded/www/tcllib/files/modules/html/html.html @@ -104,11 +104,11 @@ | Keyword Index | Categories | Modules | Applications ]
      -

      html(n) 1.4.3 tcllib "HTML Generation"

      +

      html(n) 1.4 tcllib "HTML Generation"

      Name

      html - Procedures to generate HTML structures

      Table Of Contents

        @@ -123,11 +123,11 @@

      Synopsis

      • package require Tcl 8.2
      • -
      • package require html ?1.4.3?
      • +
      • package require html ?1.4?

      Description

      The package html provides commands that generate HTML. @@ -222,11 +217,11 @@ list should contain an alternating list of labels and values. This uses ::html::checkbox. All the checkbox buttons share the same key for their name. The sep is text used to separate the elements.

      ::html::checkValue name ?value?
      -

      Generate the "name=name value=value" for a checkbox form +

      Generate the "name=name value=value for a checkbox form element. If the CGI variable name has the value value, then SELECTED is added to the return value. value defaults to "1".

      ::html::closeTag

      Pop a tag off the stack created by ::html::openTag and generate @@ -345,154 +340,109 @@

      Side effect only. Call this before ::html::head to define a meta tag for the page. The args is a Tcl-style name, value list that is used for the name= and value= parameters for the meta tag. The meta tag is included in the result of ::html::head.

      -
      ::html::css href
      -

      Side effect only. Call this before ::html::head to -define a link tag for a linked CSS document. The href -value is a HTTP URL to a CSS document. The link tag is included -in the result of ::html::head.

      -

      Multiple calls of this command are allowed, enabling the use of -multiple CSS document references. In other words, the arguments -of multiple calls are accumulated, and do not overwrite each other.

      -
      ::html::css-clear
      -

      Side effect only. Call this before ::html::head to -clear all links to CSS documents.

      -

      Multiple calls of this command are allowed, doing nothing after the -first of a sequence with no intervening ::html::css.

      -
      ::html::js href
      -

      Side effect only. Call this before ::html::head to -define a script tag for a linked JavaScript document. The -href is a HTTP URL to a JavaScript document. The script -tag is included in the result of ::html::head.

      -

      Multiple calls of this command are allowed, enabling the use of -multiple JavaScript document references. In other words, the arguments -of multiple calls are accumulated, and do not overwrite each other.

      -
      ::html::js-clear
      -

      Side effect only. Call this before ::html::head to -clear all links to JavaScript documents.

      -

      Multiple calls of this command are allowed, doing nothing after the -first of a sequence with no intervening ::html::js.

      -
      ::html::minorList list ?ordered?
      +
      ::html::minorList list ?ordered?

      Generate an ordered or unordered list of links. The list is a Tcl-style name, value list of labels and urls for the links. ordered is a boolean used to choose between an ordered or unordered list. It defaults to false.

      -
      ::html::minorMenu list ?sep?
      +
      ::html::minorMenu list ?sep?

      Generate a series of hypertext links. The list is a Tcl-style name, value list of labels and urls for the links. The sep is the text to put between each link. It defaults to " | ".

      -
      ::html::nl2br string
      +
      ::html::nl2br string

      This command replaces all line-endings in the string with a br tag and returns the modified text.

      -
      ::html::openTag tag ?param?
      +
      ::html::openTag tag ?param?

      Push tag onto a stack and generate the opening tag for tag. Use ::html::closeTag to pop the tag from the stack. The second argument provides any tag arguments, as a list whose elements are formatted to be in the form "key=value".

      -
      ::html::paramRow list ?rparam? ?cparam?
      +
      ::html::paramRow list ?rparam? ?cparam?

      Generate a table row, including tr and td tags. Each value in list is placed into its own table cell. This uses ::html::cell. The value of rparam is used as parameter for the tr tag. The value of cparam is passed to ::html::cell as parameter for the td tags.

      -
      ::html::passwordInput ?name?
      +
      ::html::passwordInput ?name?

      Generate an input tag of type password. The name defaults to "password".

      -
      ::html::passwordInputRow label ?name?
      +
      ::html::passwordInputRow label ?name?

      Format a table row containing a label and an input tag of type password. The name defaults to "password".

      -
      ::html::quoteFormValue value
      +
      ::html::quoteFormValue value

      Quote special characters in value by replacing them with HTML entities for quotes, ampersand, and angle brackets.

      -
      ::html::radioSet key sep list
      +
      ::html::radioSet key sep list

      Generate a set of input tags of type radio and an associated text label. All the radio buttons share the same key for their name. The sep is text used to separate the elements. The list is a Tcl-style label, value list.

      -
      ::html::radioValue name value
      -

      Generate the "name=name value=value" for a radio form +

      ::html::radioValue name value
      +

      Generate the "name=name value=value for a radio form element. If the CGI variable name has the value value, then SELECTED is added to the return value.

      -
      ::html::refresh seconds url
      +
      ::html::refresh seconds url

      Set up a refresh meta tag. Call this before ::html::head and the HEAD section will contain a meta tag that causes the document to refresh in seconds seconds. The url is optional. If specified, it specifies a new page to load after the refresh interval.

      -
      ::html::row args
      +
      ::html::row args

      Generate a table row, including tr and td tags. Each value in args is place into its own table cell. This uses ::html::cell. Ignores any default information set up via ::html::init.

      -
      ::html::select name param choices ?current?
      +
      ::html::select name param choices ?current?

      Generate a select form element and nested option tags. The name and param are used to generate the select tag. The choices list is a Tcl-style name, value list.

      -
      ::html::selectPlain name param choices ?current?
      +
      ::html::selectPlain name param choices ?current?

      Like ::html::select except that choices is a Tcl list of values used for the option tags. The label and the value for each option are the same.

      -
      ::html::set var val
      +
      ::html::set var val

      This procedure is similar to the built-in Tcl set command. The main difference is that it returns "" so it can be called from an HTML template file without appending unwanted results. The other difference is that it must take two arguments.

      -
      ::html::submit label ?name?
      +
      ::html::submit label ?name?

      Generate an input tag of type submit. name defaults to "submit".

      -
      ::html::tableFromArray arrname ?param? ?pat?
      +
      ::html::tableFromArray arrname ?param? ?pat?

      Generate a two-column table and nested rows to display a Tcl array. The table gets a heading that matches the array name, and each generated row contains a name, value pair. The array names are sorted (lsort without special options). The argument param is for the table tag and has to contain a pre-formatted string. The pat is a string match pattern used to select the array elements to show in the table. It defaults to *, i.e. the whole array is shown.

      -
      ::html::tableFromList querylist ?param?
      +
      ::html::tableFromList querylist ?param?

      Generate a two-column table and nested rows to display querylist, which is a Tcl dictionary. Each generated row contains a name, value pair. The information is shown in the same order as specified in the dictionary. The argument param is for the table tag and has to contain a pre-formatted string.

      -
      ::html::textarea name ?param? ?current?
      +
      ::html::textarea name ?param? ?current?

      Generate a textarea tag wrapped around its current values.

      -
      ::html::textInput name value args
      +
      ::html::textInput name value args

      Generate an input form tag with type text. This uses ::html::formValue. The args is any additional tag attributes you want to put into the input tag.

      -
      ::html::textInputRow label name value args
      +
      ::html::textInputRow label name value args

      Generate an input form tag with type text formatted into a table row with an associated label. The args is any additional tag attributes you want to put into the input tag.

      -
      ::html::varEmpty name
      +
      ::html::varEmpty name

      This returns 1 if the named variable either does not exist or has the empty string for its value.

      -
      ::html::while test body
      +
      ::html::while test body

      This procedure is similar to the built-in Tcl while control structure. Rather than evaluating the body, it returns the subst'ed body. Each iteration of the loop causes another string to be concatenated to the result value.

      -
      ::html::doctype id
      -

      This procedure can be used to build the standard DOCTYPE -declaration string. It will return the standard declaration -string for the id, or throw an error if the id is not known. -The following id's are defined:

      -
        -
      1. HTML32

      2. -
      3. HTML40

      4. -
      5. HTML40T

      6. -
      7. HTML40F

      8. -
      9. HTML401

      10. -
      11. HTML401T

      12. -
      13. HTML401F

      14. -
      15. XHTML10S

      16. -
      17. XHTML10T

      18. -
      19. XHTML10F

      20. -
      21. XHTML11

      22. -
      23. XHTMLB

      24. -

      Bugs, Ideas, Feedback

      This document, and the package it describes, will undoubtedly contain bugs and other problems. Index: embedded/www/tcllib/files/modules/json/json_write.html ================================================================== --- embedded/www/tcllib/files/modules/json/json_write.html +++ embedded/www/tcllib/files/modules/json/json_write.html @@ -106,11 +106,11 @@ | Keyword Index | Categories | Modules | Applications ]


      -

      json::write(n) 1.0.3 tcllib "JSON"

      +

      json::write(n) 1.0.2 tcllib "JSON"

      Name

      json::write - JSON generation

      Table Of Contents

        @@ -126,11 +126,11 @@

      Synopsis

      • package require Tcl 8.5
      • -
      • package require json::write ?1.0.3?
      • +
      • package require json::write ?1.0.2?
      • ::json::write indented
      • ::json::write indented flag
      • ::json::write aligned
      • Index: embedded/www/tcllib/files/modules/math/math_geometry.html ================================================================== --- embedded/www/tcllib/files/modules/math/math_geometry.html +++ embedded/www/tcllib/files/modules/math/math_geometry.html @@ -106,11 +106,11 @@ | Keyword Index | Categories | Modules | Applications ]
        -

        math::geometry(n) 1.1.3 tcllib "Tcl Math Library"

        +

        math::geometry(n) 1.1.2 tcllib "Tcl Math Library"

        Name

        math::geometry - Geometrical computations

        Table Of Contents

          @@ -127,11 +127,11 @@

        Synopsis

        • package require Tcl ?8.3?
        • -
        • package require math::geometry ?1.1.3?
        • +
        • package require math::geometry ?1.1.2?

        Description

        The math::geometry package is a collection of functions for @@ -288,65 +287,54 @@

        List of four numbers, the coordinates of the first and last points of the line segment

        ::math::geometry::calculateDistanceToPolyline P polyline

        Calculate the distance of point P to the polyline and -return the result. Note that a polyline needs not to be closed.

        +return the result.

        list P

        List of two numbers, the coordinates of the point

        list polyline

        List of numbers, the coordinates of the vertices of the polyline

        -
        ::math::geometry::calculateDistanceToPolygon P polygon
        -

        Calculate the distance of point P to the polygon and -return the result. If the list of coordinates is not closed (first and last -points differ), it is automatically closed.

        -
        -
        list P
        -

        List of two numbers, the coordinates of the point

        -
        list polygon
        -

        List of numbers, the coordinates of the -vertices of the polygon

        -
        -
        ::math::geometry::findClosestPointOnLine P line
        +
        ::math::geometry::findClosestPointOnLine P line

        Return the point on a line which is closest to a given point.

        list P

        List of two numbers, the coordinates of the point

        list line

        List of four numbers, the coordinates of two points on the line

        -
        ::math::geometry::findClosestPointOnLineSegment P linesegment
        +
        ::math::geometry::findClosestPointOnLineSegment P linesegment

        Return the point on a line segment which is closest to a given point.

        list P

        List of two numbers, the coordinates of the point

        list linesegment

        List of four numbers, the first and last points on the line segment

        -
        ::math::geometry::findClosestPointOnPolyline P polyline
        +
        ::math::geometry::findClosestPointOnPolyline P polyline

        Return the point on a polyline which is closest to a given point.

        list P

        List of two numbers, the coordinates of the point

        list polyline

        List of numbers, the vertices of the polyline

        -
        ::math::geometry::lengthOfPolyline polyline
        +
        ::math::geometry::lengthOfPolyline polyline

        Return the length of the polyline (note: it not regarded as a polygon)

        list polyline

        List of numbers, the vertices of the polyline

        -
        ::math::geometry::movePointInDirection P direction dist
        +
        ::math::geometry::movePointInDirection P direction dist

        Move a point over a given distance in a given direction and return the new coordinates (in two dimensions only).

        list P

        Coordinates of the point to be moved

        @@ -354,31 +342,30 @@

        Direction (in degrees; 0 is to the right, 90 upwards)

        list dist

        Distance over which to move the point

        -
        ::math::geometry::lineSegmentsIntersect linesegment1 linesegment2
        +
        ::math::geometry::lineSegmentsIntersect linesegment1 linesegment2

        Check if two line segments intersect or coincide. Returns 1 if that is -the case, 0 otherwise (in two dimensions only). If an endpoint of one segment lies on -the other segment (or is very close to the segment), they are considered to intersect

        +the case, 0 otherwise (in two dimensions only).

        list linesegment1

        First line segment

        list linesegment2

        Second line segment

        -
        ::math::geometry::findLineSegmentIntersection linesegment1 linesegment2
        +
        ::math::geometry::findLineSegmentIntersection linesegment1 linesegment2

        Find the intersection point of two line segments. Return the coordinates or the keywords "coincident" or "none" if the line segments coincide or have no points in common (in two dimensions only).

        list linesegment1

        First line segment

        list linesegment2

        Second line segment

        -
        ::math::geometry::findLineIntersection line1 line2
        +
        ::math::geometry::findLineIntersection line1 line2

        Find the intersection point of two (infinite) lines. Return the coordinates or the keywords "coincident" or "none" if the lines coincide or have no points in common (in two dimensions only).

        list line1
        @@ -385,19 +372,19 @@

        First line

        list line2

        Second line

        See section References for details on the algorithm and math behind it.

        -
        ::math::geometry::polylinesIntersect polyline1 polyline2
        +
        ::math::geometry::polylinesIntersect polyline1 polyline2

        Check if two polylines intersect or not (in two dimensions only).

        list polyline1

        First polyline

        list polyline2

        Second polyline

        -
        ::math::geometry::polylinesBoundingIntersect polyline1 polyline2 granularity
        +
        ::math::geometry::polylinesBoundingIntersect polyline1 polyline2 granularity

        Check whether two polylines intersect, but reduce the correctness of the result to the given granularity. Use this for faster, but weaker, intersection checking.

        How it works:

        Each polyline is split into a number of smaller polylines, @@ -411,21 +398,21 @@

        Second polyline

        int granularity

        Number of points in each part (<=1 means check every edge)

        -
        ::math::geometry::intervalsOverlap y1 y2 y3 y4 strict
        +
        ::math::geometry::intervalsOverlap y1 y2 y3 y4 strict

        Check if two intervals overlap.

        double y1,y2

        Begin and end of first interval

        double y3,y4

        Begin and end of second interval

        logical strict

        Check for strict or non-strict overlap

        -
        ::math::geometry::rectanglesOverlap P1 P2 Q1 Q2 strict
        +
        ::math::geometry::rectanglesOverlap P1 P2 Q1 Q2 strict

        Check if two rectangles overlap.

        list P1

        upper-left corner of the first rectangle

        list P2
        @@ -435,28 +422,28 @@
        list Q2

        lower-right corner of the second rectangle

        list strict

        choosing strict or non-strict interpretation

        -
        ::math::geometry::bbox polyline
        +
        ::math::geometry::bbox polyline

        Calculate the bounding box of a polyline. Returns a list of four coordinates: the upper-left and the lower-right corner of the box.

        list polyline

        The polyline to be examined

        -
        ::math::geometry::pointInsidePolygon P polyline
        +
        ::math::geometry::pointInsidePolygon P polyline

        Determine if a point is completely inside a polygon. If the point touches the polygon, then the point is not completely inside the polygon.

        list P

        Coordinates of the point

        list polyline

        The polyline to be examined

        -
        ::math::geometry::rectangleInsidePolygon P1 P2 polyline
        +
        ::math::geometry::rectangleInsidePolygon P1 P2 polyline

        Determine if a rectangle is completely inside a polygon. If polygon touches the rectangle, then the rectangle is not complete inside the polygon.

        list P1
        @@ -464,11 +451,11 @@
        list P2

        Lower-right corner of the rectangle

        list polygon

        The polygon in question

        -
        ::math::geometry::areaPolygon polygon
        +
        ::math::geometry::areaPolygon polygon

        Calculate the area of a polygon.

        list polygon

        The polygon in question

        Index: embedded/www/tcllib/files/modules/pt/pt_peg_from_peg.html ================================================================== --- embedded/www/tcllib/files/modules/pt/pt_peg_from_peg.html +++ embedded/www/tcllib/files/modules/pt/pt_peg_from_peg.html @@ -106,11 +106,11 @@ | Keyword Index | Categories | Modules | Applications ]
        -

        pt::peg::from::peg(n) 1.0.2 tcllib "Parser Tools"

        +

        pt::peg::from::peg(n) 1 tcllib "Parser Tools"

        Name

        pt::peg::from::peg - PEG Conversion. Read PEG format

        Table Of Contents

          @@ -141,11 +141,11 @@

        Synopsis

        • package require Tcl 8.5
        • -
        • package require pt::peg::from::peg ?1.0.2?
        • +
        • package require pt::peg::from::peg ?1?
        Index: embedded/www/tcllib/files/modules/pt/pt_peg_op.html ================================================================== --- embedded/www/tcllib/files/modules/pt/pt_peg_op.html +++ embedded/www/tcllib/files/modules/pt/pt_peg_op.html @@ -106,11 +106,11 @@ | Keyword Index | Categories | Modules | Applications ]
        -

        pt_peg_op(i) 1.0.1 tcllib "Parser Tools"

        +

        pt_peg_op(i) 1 tcllib "Parser Tools"

        Name

        pt_peg_op - Parser Tools PE Grammar Utility Operations

        Table Of Contents

          @@ -126,11 +126,11 @@

        Synopsis

        • package require Tcl 8.5
        • -
        • package require pt::peg::op 1.0.1
        • +
        • package require pt::peg::op 1
        • ::peg::peg::op called container
        • ::peg::peg::op dechain container
        • ::peg::peg::op drop unreachable container
        • Index: embedded/www/tcllib/files/modules/pt/pt_peg_to_peg.html ================================================================== --- embedded/www/tcllib/files/modules/pt/pt_peg_to_peg.html +++ embedded/www/tcllib/files/modules/pt/pt_peg_to_peg.html @@ -106,11 +106,11 @@ | Keyword Index | Categories | Modules | Applications ]
          -

          pt::peg::to::peg(n) 1.0.1 tcllib "Parser Tools"

          +

          pt::peg::to::peg(n) 1 tcllib "Parser Tools"

          Name

          pt::peg::to::peg - PEG Conversion. Write PEG format

          Table Of Contents

            @@ -142,11 +142,11 @@

          Synopsis

          • package require Tcl 8.5
          • -
          • package require pt::peg::to::peg ?1.0.1?
          • +
          • package require pt::peg::to::peg ?1?
          • package require pt::peg
          • package require pt::pe
          • package require text::write
            Index: embedded/www/tcllib/files/modules/pt/pt_pgen.html ================================================================== --- embedded/www/tcllib/files/modules/pt/pt_pgen.html +++ embedded/www/tcllib/files/modules/pt/pt_pgen.html @@ -106,11 +106,11 @@ | Keyword Index | Categories | Modules | Applications ]
            -

            pt::pgen(n) 1.0.2 tcllib "Parser Tools"

            +

            pt::pgen(n) 1.0.1 tcllib "Parser Tools"

            Name

            pt::pgen - Parser Generator

            Table Of Contents

              @@ -127,11 +127,11 @@

            Synopsis

            • package require Tcl 8.5
            • -
            • package require pt::pgen ?1.0.2?
            • +
            • package require pt::pgen ?1.0.1?
            Index: embedded/www/tcllib/files/modules/rest/rest.html ================================================================== --- embedded/www/tcllib/files/modules/rest/rest.html +++ embedded/www/tcllib/files/modules/rest/rest.html @@ -104,11 +104,11 @@ | Keyword Index | Categories | Modules | Applications ]
            -

            rest(n) 1.0.1 tcllib "A framework for RESTful web services"

            +

            rest(n) 1.0 tcllib "A framework for RESTful web services"

            Name

            rest - define REST web APIs and call them inline or asychronously

            Table Of Contents

              @@ -120,11 +120,11 @@

            Synopsis

            • package require Tcl 8.5
            • -
            • package require rest ?1.0.1?
            • +
            • package require rest ?1.0?
            • ::rest::simple url query ?config? ?body?
            • ::rest::get url query ?config? ?body?
            • ::rest::post url query ?config? ?body?
            • Index: embedded/www/tcllib/files/modules/struct/struct_list.html ================================================================== --- embedded/www/tcllib/files/modules/struct/struct_list.html +++ embedded/www/tcllib/files/modules/struct/struct_list.html @@ -106,11 +106,11 @@ | Keyword Index | Categories | Modules | Applications ]
              -

              struct::list(n) 1.8.3 tcllib "Tcl Data Structures"

              +

              struct::list(n) 1.8.2 tcllib "Tcl Data Structures"

              Name

              struct::list - Procedures for manipulating lists

              Table Of Contents

                @@ -129,11 +129,11 @@

              Synopsis

              • package require Tcl 8.4
              • -
              • package require struct::list ?1.8.3?
              • +
              • package require struct::list ?1.8.2?
              • ::struct::list longestCommonSubsequence sequence1 sequence2 ?maxOccurs?
              • ::struct::list longestCommonSubsequence2 sequence1 sequence2 ?maxOccurs?
              • ::struct::list lcsInvert lcsData len1 len2
              • Index: embedded/www/tcllib/files/modules/tar/tar.html ================================================================== --- embedded/www/tcllib/files/modules/tar/tar.html +++ embedded/www/tcllib/files/modules/tar/tar.html @@ -104,11 +104,11 @@ | Keyword Index | Categories | Modules | Applications ]
                -

                tar(n) 0.10 tcllib "Tar file handling"

                +

                tar(n) 0.9 tcllib "Tar file handling"

                Name

                tar - Tar file creation, extraction & manipulation

                Table Of Contents

                  @@ -122,11 +122,11 @@

                Synopsis

                • package require Tcl 8.4
                • -
                • package require tar ?0.10?
                • +
                • package require tar ?0.9?
                • ::tar::contents tarball ?-chan?
                • ::tar::stat tarball ?file? ?-chan?
                • ::tar::untar tarball args
                • Index: embedded/www/tcllib/files/modules/term/ansi_cctrl.html ================================================================== --- embedded/www/tcllib/files/modules/term/ansi_cctrl.html +++ embedded/www/tcllib/files/modules/term/ansi_cctrl.html @@ -106,11 +106,11 @@ | Keyword Index | Categories | Modules | Applications ]
                  -

                  term::ansi::code::ctrl(n) 0.2 tcllib "Terminal control"

                  +

                  term::ansi::code::ctrl(n) 0.1 tcllib "Terminal control"

                  Name

                  term::ansi::code::ctrl - ANSI control sequences

                  Table Of Contents

                    @@ -131,12 +131,12 @@

                  Synopsis

                  • package require Tcl 8.4
                  • -
                  • package require term::ansi::code ?0.2?
                  • -
                  • package require term::ansi::code::ctrl ?0.2?
                  • +
                  • package require term::ansi::code ?0.1?
                  • +
                  • package require term::ansi::code::ctrl ?0.1.1?
                  • ::term::ansi::code::ctrl::names
                  • ::term::ansi::code::ctrl::import ?ns? ?arg...?
                  • ::term::ansi::code::ctrl::eeol
                  • Index: embedded/www/tcllib/files/modules/term/ansi_code.html ================================================================== --- embedded/www/tcllib/files/modules/term/ansi_code.html +++ embedded/www/tcllib/files/modules/term/ansi_code.html @@ -106,11 +106,11 @@ | Keyword Index | Categories | Modules | Applications ]
                    -

                    term::ansi::code(n) 0.2 tcllib "Terminal control"

                    +

                    term::ansi::code(n) 0.1 tcllib "Terminal control"

                    Name

                    term::ansi::code - Helper for control sequences

                    Table Of Contents

                      @@ -125,11 +125,11 @@

                    Synopsis

                    • package require Tcl 8.4
                    • -
                    • package require term::ansi::code ?0.2?
                    • +
                    • package require term::ansi::code ?0.1?
                    • ::term::ansi::code::esc str
                    • ::term::ansi::code::escb str
                    • ::term::ansi::code::define name escape code
                    • Index: embedded/www/tcllib/files/modules/term/ansi_send.html ================================================================== --- embedded/www/tcllib/files/modules/term/ansi_send.html +++ embedded/www/tcllib/files/modules/term/ansi_send.html @@ -106,11 +106,11 @@ | Keyword Index | Categories | Modules | Applications ]
                      -

                      term::ansi::send(n) 0.2 tcllib "Terminal control"

                      +

                      term::ansi::send(n) 0.1 tcllib "Terminal control"

                      Name

                      term::ansi::send - Output of ANSI control sequences to terminals

                      Table Of Contents

                        @@ -125,11 +125,11 @@

                      Synopsis

                      • package require Tcl 8.4
                      • -
                      • package require term::ansi::send ?0.2?
                      • +
                      • package require term::ansi::send ?0.1?
                      • ::term::ansi::send::import ?ns? ...
                      • ::term::ansi::send::eeol
                      • ::term::ansi::send::esol
                      • Index: embedded/www/tcllib/files/modules/textutil/textutil.html ================================================================== --- embedded/www/tcllib/files/modules/textutil/textutil.html +++ embedded/www/tcllib/files/modules/textutil/textutil.html @@ -103,11 +103,11 @@ | Keyword Index | Categories | Modules | Applications ]
                        -

                        textutil(n) 0.8 tcllib "Text and string utilities, macro processing"

                        +

                        textutil(n) 0.7.1 tcllib "Text and string utilities, macro processing"

                        Name

                        textutil - Procedures to manipulate texts and strings.

                        Table Of Contents

                          @@ -122,11 +122,11 @@

                        Synopsis

                        • package require Tcl 8.2
                        • -
                        • package require textutil ?0.8?
                        • +
                        • package require textutil ?0.7.1?
                        • ::textutil::adjust string args
                        • ::textutil::adjust::readPatterns filename
                        • ::textutil::adjust::listPredefined
                        • Index: embedded/www/tcllib/files/modules/textutil/textutil_string.html ================================================================== --- embedded/www/tcllib/files/modules/textutil/textutil_string.html +++ embedded/www/tcllib/files/modules/textutil/textutil_string.html @@ -1,6 +1,5 @@ - textutil::string - Text and string utilities, macro processing - -

                          [ Tcllib Home | Main Table Of Contents @@ -106,13 +106,13 @@ | Keyword Index | Categories | Modules | Applications ]
                          -

                          zipfile::decode(n) 0.5 tcllib "Zip archive handling"

                          +

                          zipfile::encode(n) 0.3 tcllib "Zip archive handling"

                          Name

                          -

                          zipfile::decode - Access to zip archives

                          +

                          zipfile::encode - Access to zip archives

                          Table Of Contents

                          • Table Of Contents
                          • Synopsis
                          • @@ -130,11 +130,11 @@
                          • package require Tcl 8.4
                          • package require fileutil::magic::mimetype
                          • package require fileutil::decode 0.2
                          • package require Trf
                          • package require zlibtcl
                          • -
                          • package require zipfile::decode ?0.5?
                          • +
                          • package require zipfile::decode ?0.4?

                          Category

                          File

                          Index: embedded/www/tcllib/toc.html ================================================================== --- embedded/www/tcllib/toc.html +++ embedded/www/tcllib/toc.html @@ -1635,11 +1635,11 @@ yencode Y-encode/decode binary data -zipfile::decode +zipfile::encode Access to zip archives zipfile::encode Generation of zip archives Index: embedded/www/toc.html ================================================================== --- embedded/www/toc.html +++ embedded/www/toc.html @@ -533,11 +533,11 @@
                          File
                          - + @@ -3689,14 +3689,14 @@
                          zipfile::decodezipfile::encode Access to zip archives
                          zipfile::encode Generation of zip archives
                          zip
                          - +
                          zipfile::decodezipfile::encode Access to zip archives
                          zipfile::encode Generation of zip archives

                          Index: embedded/www/toc0.html ================================================================== --- embedded/www/toc0.html +++ embedded/www/toc0.html @@ -533,11 +533,11 @@
                          File
                          - + Index: embedded/www/toc1.html ================================================================== --- embedded/www/toc1.html +++ embedded/www/toc1.html @@ -1949,11 +1949,11 @@
                          zipfile::decodezipfile::encode Access to zip archives
                          zipfile::encode Generation of zip archives
                          zip
                          - + Index: modules/comm/comm.man ================================================================== --- modules/comm/comm.man +++ modules/comm/comm.man @@ -1,7 +1,6 @@ -[vset COMM_VERSION 4.6.3] -[manpage_begin comm n [vset COMM_VERSION]] +[manpage_begin comm n 4.6.2] [see_also send(n)] [keywords comm] [keywords communication] [keywords ipc] [keywords message] @@ -18,11 +17,11 @@ [copyright {2006-2009 Andreas Kupries }] [moddesc {Remote communication}] [titledesc {A remote communication facility for Tcl (8.3 and later)}] [category {Programming tools}] [require Tcl 8.3] -[require comm [opt [vset COMM_VERSION]]] +[require comm [opt 4.6.2]] [description] [para] The [package comm] command provides an inter-interpreter remote @@ -880,15 +879,10 @@ [para] The revision history of [package comm] includes these releases: [list_begin definitions] -[def 4.6.3] - -Fixed ticket [lb]ced0d60fc9[rb]. Added proper detection of eof on a -socket, properly closing it. - [def 4.6.2] Fixed bugs 2972571 and 3066872, the first a misdetection of quoted brace after double backslash, the other a blocking gets making for an obvious (hinsight) DoS attack on comm channels. Index: modules/comm/comm.tcl ================================================================== --- modules/comm/comm.tcl +++ modules/comm/comm.tcl @@ -927,17 +927,10 @@ proc ::comm::commIncomingOffered {chan fid addr remport} { variable comm # Check if we have a complete line. if {[gets $fid protoline] < 0} { - #commDebug {puts stderr "commIncomingOffered: no data"} - if {[eof $fid]} { - commDebug {puts stderr "commIncomingOffered: eof on fid=$fid"} - catch { - close $fid - } - } return } # Protocol version line has been received, disable event handling # again. @@ -1813,6 +1806,6 @@ ::comm::comm new ::comm::comm -port 0 -local 1 -listen 1 } } #eof -package provide comm 4.6.3.1 +package provide comm 4.6.2 Index: modules/comm/pkgIndex.tcl ================================================================== --- modules/comm/pkgIndex.tcl +++ modules/comm/pkgIndex.tcl @@ -1,2 +1,2 @@ if {![package vsatisfies [package provide Tcl] 8.3]} {return} -package ifneeded comm 4.6.3.1 [list source [file join $dir comm.tcl]] +package ifneeded comm 4.6.2 [list source [file join $dir comm.tcl]] Index: modules/coroutine/coro_auto.man ================================================================== --- modules/coroutine/coro_auto.man +++ modules/coroutine/coro_auto.man @@ -1,8 +1,7 @@ [comment {-*- tcl -*- doctools manpage}] -[vset CORO_AUTO_VERSION 1.1.2] -[manpage_begin coroutine::auto n [vset CORO_AUTO_VERSION]] +[manpage_begin coroutine::auto n 1] [keywords after] [keywords channel] [keywords coroutine] [keywords events] [keywords exit] @@ -11,16 +10,16 @@ [keywords {green threads}] [keywords read] [keywords threads] [keywords update] [keywords vwait] -[copyright {2010-2014 Andreas Kupries }] +[copyright {2010-2011 Andreas Kupries }] [moddesc {Coroutine utilities}] [category Coroutine] [titledesc {Automatic event and IO coroutine awareness}] [require Tcl 8.6] -[require coroutine::auto [vset CORO_AUTO_VERSION]] +[require coroutine::auto 1.1.1] [require coroutine 1.1] [description] The [package coroutine::auto] package provides no commands or other directly visible functionality. Index: modules/coroutine/coro_auto.tcl ================================================================== --- modules/coroutine/coro_auto.tcl +++ modules/coroutine/coro_auto.tcl @@ -1,10 +1,10 @@ ## -- Tcl Module -- -*- tcl -*- # # ## ### ##### ######## ############# # @@ Meta Begin -# Package coroutine::auto 1.1.2 +# Package coroutine::auto 1.1 # Meta platform tcl # Meta require {Tcl 8.6} # Meta require {coroutine 1.1} # Meta license BSD # Meta as::author {Andreas Kupries} @@ -16,11 +16,11 @@ # Meta description coroutine-oblivious, i.e. able to run # Meta description inside and outside of a coroutine # Meta description without changes. # @@ Meta End -# Copyright (c) 2009-2014 Andreas Kupries +# Copyright (c) 2009-2011 Andreas Kupries ## $Id: coro_auto.tcl,v 1.3 2011/11/17 08:00:45 andreas_kupries Exp $ # # ## ### ##### ######## ############# ## Requisites, and ensemble setup. @@ -134,11 +134,11 @@ while {1} { set blocking [::chan configure $chan -blocking] ::chan configure $chan -blocking 0 try { - set result [::coroutine::auto::core_gets $chan line] + ::coroutine::auto::core_gets $chan line } on error {result opts} { ::chan configure $chan -blocking $blocking return -code $result -options $opts } @@ -209,17 +209,17 @@ while {1} { set blocking [::chan configure $chan -blocking] ::chan configure $chan -blocking 0 try { - set result [::coroutine::auto::core_read $chan] + ::coroutine::auto::core_read $chan } on error {result opts} { ::chan configure $chan -blocking $blocking return -code $result -options $opts } - if {[::chan blocked $chan]} { + if {[fblocked $chan]} { ::chan event $chan readable [list [info coroutine]] yield ::chan event $chan readable {} } else { ::chan configure $chan -blocking $blocking @@ -239,11 +239,11 @@ while {1} { set blocking [::chan configure $chan -blocking] ::chan configure $chan -blocking 0 try { - set result [::coroutine::auto::core_read $chan $left] + ::coroutine::auto::core_read $chan $left } on error {result opts} { ::chan configure $chan -blocking $blocking return -code $result -options $opts } @@ -308,7 +308,7 @@ } ::coroutine::auto} # # ## ### ##### ######## ############# ## Ready -package provide coroutine::auto 1.1.2 +package provide coroutine::auto 1.1.1 return Index: modules/coroutine/coroutine.tcl ================================================================== --- modules/coroutine/coroutine.tcl +++ modules/coroutine/coroutine.tcl @@ -1,10 +1,10 @@ ## -- Tcl Module -- -*- tcl -*- # # ## ### ##### ######## ############# # @@ Meta Begin -# Package coroutine 1.1.1 +# Package coroutine 1 # Meta platform tcl # Meta require {Tcl 8.6} # Meta license BSD # Meta as::author {Andreas Kupries} # Meta as::author {Colin Macleod} @@ -35,11 +35,11 @@ # Meta description their implementation dependending on the # Meta description context they are run in, i.e. inside or # Meta description outside of a coroutine. # @@ Meta End -# Copyright (c) 2009,2014 Andreas Kupries +# Copyright (c) 2009 Andreas Kupries # Copyright (c) 2009 Colin Macleod # Copyright (c) 2009 Colin McCormack # Copyright (c) 2009 Donal Fellows # Copyright (c) 2009 Kevin Kenny # Copyright (c) 2009 Neil Madden @@ -179,11 +179,11 @@ while {1} { set blocking [::chan configure $chan -blocking] ::chan configure $chan -blocking 0 try { - set result [::chan gets $chan line] + ::chan gets $chan line } on error {result opts} { ::chan configure $chan -blocking $blocking return -code $result -options $opts } @@ -246,17 +246,17 @@ while {1} { set blocking [::chan configure $chan -blocking] ::chan configure $chan -blocking 0 try { - set result [::chan read $chan] + ::chan read $chan } on error {result opts} { ::chan configure $chan -blocking $blocking return -code $result -options $opts } - if {[::chan blocked $chan]} { + if {[fblocked $chan]} { ::chan event $chan readable [list [info coroutine]] yield ::chan event $chan readable {} } else { ::chan configure $chan -blocking $blocking @@ -276,11 +276,11 @@ while {1} { set blocking [::chan configure $chan -blocking] ::chan configure $chan -blocking 0 try { - set result [::chan read $chan $left] + ::chan read $chan $left } on error {result opts} { ::chan configure $chan -blocking $blocking return -code $result -options $opts } @@ -371,7 +371,7 @@ variable counter 0 } # # ## ### ##### ######## ############# ## Ready -package provide coroutine 1.1.1 +package provide coroutine 1.1 return Index: modules/coroutine/pkgIndex.tcl ================================================================== --- modules/coroutine/pkgIndex.tcl +++ modules/coroutine/pkgIndex.tcl @@ -1,3 +1,3 @@ if {![package vsatisfies [package provide Tcl] 8.6]} {return} -package ifneeded coroutine 1.1.1 [list source [file join $dir coroutine.tcl]] +package ifneeded coroutine 1.1 [list source [file join $dir coroutine.tcl]] package ifneeded coroutine::auto 1.1.1 [list source [file join $dir coro_auto.tcl]] Index: modules/coroutine/tcllib_coroutine.man ================================================================== --- modules/coroutine/tcllib_coroutine.man +++ modules/coroutine/tcllib_coroutine.man @@ -1,8 +1,7 @@ [comment {-*- tcl -*- doctools manpage}] -[vset CORO_VERSION 1.1.1] -[manpage_begin coroutine n [vset CORO_VERSION]] +[manpage_begin coroutine n 1] [keywords after] [keywords channel] [keywords coroutine] [keywords events] [keywords exit] @@ -11,16 +10,16 @@ [keywords {green threads}] [keywords read] [keywords threads] [keywords update] [keywords vwait] -[copyright {2010-2014 Andreas Kupries }] +[copyright {2010-2011 Andreas Kupries }] [moddesc {Coroutine utilities}] [category Coroutine] [titledesc {Coroutine based event and IO handling}] [require Tcl 8.6] -[require coroutine [vset CORO_VERSION]] +[require coroutine 1.1] [description] The [package coroutine] package provides coroutine-aware implementations of various event- and channel related commands. It can be in multiple modes: Index: modules/crc/cksum.man ================================================================== --- modules/crc/cksum.man +++ modules/crc/cksum.man @@ -1,7 +1,6 @@ -[vset CKSUM_VERSION 1.1.4] -[manpage_begin cksum n [vset CKSUM_VERSION]] +[manpage_begin cksum n 1.1.3] [see_also crc32(n)] [see_also sum(n)] [keywords checksum] [keywords cksum] [keywords crc] @@ -12,11 +11,11 @@ [copyright {2002, Pat Thoyts}] [moddesc {Cyclic Redundancy Checks}] [titledesc {Calculate a cksum(1) compatible checksum}] [category {Hashes, checksums, and encryption}] [require Tcl 8.2] -[require cksum [opt [vset CKSUM_VERSION]]] +[require cksum [opt 1.1.3]] [description] [para] This package provides a Tcl implementation of the cksum(1) algorithm based upon information provided at in the GNU implementation of this Index: modules/crc/cksum.tcl ================================================================== --- modules/crc/cksum.tcl +++ modules/crc/cksum.tcl @@ -14,11 +14,11 @@ # $Id: cksum.tcl,v 1.11 2009/04/21 20:06:19 andreas_kupries Exp $ package require Tcl 8.2; # tcl minimum version namespace eval ::crc { - variable cksum_version 1.1.4 + variable cksum_version 1.1.3 namespace export cksum variable cksum_tbl [list 0x0 \ 0x04C11DB7 0x09823B6E 0x0D4326D9 0x130476DC 0x17C56B6B \ @@ -71,12 +71,11 @@ 0xF0A5BD1D 0xF464A0AA 0xF9278673 0xFDE69BC4 0x89B8FD09 \ 0x8D79E0BE 0x803AC667 0x84FBDBD0 0x9ABC8BD5 0x9E7D9662 \ 0x933EB0BB 0x97FFAD0C 0xAFB010B1 0xAB710D06 0xA6322BDF \ 0xA2F33668 0xBCB4666D 0xB8757BDA 0xB5365D03 0xB1F740B4 ] - variable uid - if {![info exists uid]} {set uid 0} + variable uid ; if {![info exists uid]} {set uid 0} } # crc::CksumInit -- # # Create and initialize a cksum context. This is cleaned up when we @@ -94,18 +93,15 @@ variable cksum_tbl upvar #0 $token state set t $state(t) binary scan $data c* r foreach {n} $r { - set index [expr { (($t >> 24) ^ ($n & 0xFF)) & 0xFF }] - # Since the introduction of built-in bigInt support with Tcl - # 8.5, bit-shifting $t to the left no longer overflows, - # keeping it 32 bits long. The value grows bigger and bigger - # instead - a severe hit on performance. For this reason we - # do a bitwise AND against 0xFFFFFFFF at each step to keep the - # value within limits. - set t [expr {0xFFFFFFFF & (($t << 8) ^ [lindex $cksum_tbl $index])}] + set t [expr {($t << 8) + ^ [lindex $cksum_tbl [expr { + (($t >> 24) \ + ^ ($n & 0xFF)) & 0xFF + }]]}] incr state(l) } set state(t) $t return } @@ -113,12 +109,13 @@ proc ::crc::CksumFinal {token} { variable cksum_tbl upvar #0 $token state set t $state(t) for {set i $state(l)} {$i > 0} {set i [expr {$i>>8}]} { - set index [expr {(($t >> 24) ^ $i) & 0xFF}] - set t [expr {0xFFFFFFFF & (($t << 8) ^ [lindex $cksum_tbl $index])}] + set t [expr {($t << 8) \ + ^ [lindex $cksum_tbl \ + [expr {(($t >> 24) ^ $i) & 0xFF}]]}] } unset state return [expr {~$t & 0xFFFFFFFF}] } Index: modules/crc/pkgIndex.tcl ================================================================== --- modules/crc/pkgIndex.tcl +++ modules/crc/pkgIndex.tcl @@ -1,5 +1,5 @@ if {![package vsatisfies [package provide Tcl] 8.2]} {return} -package ifneeded cksum 1.1.4 [list source [file join $dir cksum.tcl]] +package ifneeded cksum 1.1.3 [list source [file join $dir cksum.tcl]] package ifneeded crc16 1.1.2 [list source [file join $dir crc16.tcl]] package ifneeded crc32 1.3.1 [list source [file join $dir crc32.tcl]] -package ifneeded sum 1.1.1 [list source [file join $dir sum.tcl]] +package ifneeded sum 1.1.0 [list source [file join $dir sum.tcl]] Index: modules/crc/sum.man ================================================================== --- modules/crc/sum.man +++ modules/crc/sum.man @@ -1,7 +1,6 @@ -[vset SUM_VERSION 1.1.1] -[manpage_begin sum n [vset SUM_VERSION]] +[manpage_begin sum n 1.1.0] [see_also cksum(n)] [see_also crc32(n)] [see_also sum(1)] [keywords checksum] [keywords cksum] @@ -14,11 +13,11 @@ [copyright {2002, Pat Thoyts }] [moddesc {Cyclic Redundancy Checks}] [titledesc {Calculate a sum(1) compatible checksum}] [category {Hashes, checksums, and encryption}] [require Tcl 8.2] -[require sum [opt [vset SUM_VERSION]]] +[require sum [opt 1.1.0]] [description] [para] This package provides a Tcl-only implementation of the sum(1) command which calculates a 16 bit checksum value from the input data. The BSD Index: modules/crc/sum.tcl ================================================================== --- modules/crc/sum.tcl +++ modules/crc/sum.tcl @@ -19,11 +19,11 @@ catch {package require tcllibc}; # critcl enhancements to tcllib #catch {package require crcc}; # critcl enhanced crc module namespace eval ::crc { - variable sum_version 1.1.1 + variable sum_version 1.1.0 namespace export sum variable uid if {![info exists uid]} { set uid 0 @@ -42,11 +42,11 @@ set t $seed binary scan $s c* r foreach n $r { incr t [expr {$n & 0xFF}] } - return [expr {$t & 0xFFFF}] + return [expr {$t % 0xFFFF}] } # ------------------------------------------------------------------------- # Description: # This algorithm is similar to the SysV version but includes a bit rotation Index: modules/crc/sum.test ================================================================== --- modules/crc/sum.test +++ modules/crc/sum.test @@ -12,12 +12,12 @@ source [file join \ [file dirname [file dirname [file join [pwd] [info script]]]] \ devtools testutilities.tcl] -testsNeedTcl 8.4 -testsNeedTcltest 2.0 +testsNeedTcl 8.2 +testsNeedTcltest 1.0 testing { useLocal sum.tcl sum ::crc } @@ -29,17 +29,19 @@ puts "> critcl based" } # ------------------------------------------------------------------------- -test sum-1.0 {sum with no parameters} -body { - ::crc::sum -} -returnCodes error -result {wrong # args: should be "sum ?-bsd|-sysv? ?-format string? ?-chunksize size? ?-timeout ms? -file name | -channel chan | data"} +test sum-1.0 {sum with no parameters } { + list [catch {::crc::sum} result] \ + [string match "wrong \# args: *" $result] +} {1 1} -test sum-1.1 {sum with incorrect parameters} -body { - ::crc::sum -zxcv -} -returnCodes error -result {bad option -zxcv: must be one of -bsd, -channel, -chunksize, -filename, -format, -sysv, -timeout} +test sum-1.1 {sum with incorrect parameters } { + list [catch {::crc::sum -zxcv} result] \ + [string match "bad option -zxcv: *" $result] +} {1 1} # ------------------------------------------------------------------------- foreach {n msg expected} { 1 "" @@ -59,13 +61,13 @@ 8 "12345678901234567890123456789012345678901234567890123456789012345678901234567890" "21845" 9 "\uFFFE\u0000\u0001\u0002" "16418" } { - test sum-2.$n {sum using BSD algorithm and unsigned integer} -body { + test sum-2.$n {sum using BSD algorithm and unsigned integer} { ::crc::sum -bsd $msg - } -result $expected + } $expected } # ------------------------------------------------------------------------- foreach {n msg expected} { 1 "" @@ -85,13 +87,13 @@ 8 "12345678901234567890123456789012345678901234567890123456789012345678901234567890" "4200" 9 "\uFFFE\u0000\u0001\u0002" "257" } { - test sum-3.$n {sum using SysV algorithm and unsigned integer} -body { + test sum-3.$n {sum using SysV algorithm and unsigned integer} { ::crc::sum -sysv $msg - } -result $expected + } $expected } # ------------------------------------------------------------------------- set crc::testfile [info script] @@ -102,31 +104,31 @@ set data [read $f] close $f return $data } -test sum-4.0 {sum file option (BSD)} -body { +test sum-4.0 {sum file option (BSD)} { set r1 [::crc::sum -bsd -file $::crc::testfile] set r2 [::crc::sum -bsd [::crc::loaddata $::crc::testfile]] if {$r1 != $r2} { set r "differing results: $r1 != $r2" } else { set r ok } -} -result ok +} {ok} -test sum-4.1 {sum file option (SysV)} -body { +test sum-4.1 {sum file option (SysV)} { set r1 [::crc::sum -sysv -file $::crc::testfile] set r2 [::crc::sum -sysv [::crc::loaddata $crc::testfile]] if {$r1 != $r2} { set r "differing results: $r1 != $r2" } else { set r ok } -} -result ok +} {ok} -test sum-4.2 {sum -channel option (BSD)} -body { +test sum-4.2 {sum -channel option (BSD)} { set r1 [::crc::sum -bsd [::crc::loaddata $::crc::testfile]] set f [open $::crc::testfile r] fconfigure $f -translation binary set r2 [::crc::sum -bsd -channel $f] close $f @@ -133,13 +135,13 @@ if {$r1 != $r2} { set r "differing results: $r1 != $r2" } else { set r ok } -} -result ok +} {ok} -test sum-4.3 {sum -channel option (SysV)} -body { +test sum-4.3 {sum -channel option (SysV)} { set r1 [::crc::sum -sysv -file $::crc::testfile] set f [open $::crc::testfile r] fconfigure $f -translation binary set r2 [::crc::sum -sysv -channel $f] close $f @@ -146,34 +148,21 @@ if {$r1 != $r2} { set r "differing results: $r1 != $r2" } else { set r ok } -} -result ok - -# ------------------------------------------------------------------------- - -test sum-5.0 {sum format option (BSD)} -body { - ::crc::sum -bsd -format 0x%X [string repeat x 200] -} -result 0xF8EE - -test sum-5.1 {sum format option (SysV)} -body { - ::crc::sum -sysv -format 0x%X [string repeat x 200] -} -result 0x5DC0 - -# ------------------------------------------------------------------------- -# ticket a80e60deb1 vectors - data over 1 KB length. - -foreach {n expected base count} { - 0 58624 a 1280 - 1 11008 fx 640 - 2 62976 \xfe 1280 -} { - test sum-6.$n {sum (sysv) over 1 K} -body { - crc::sum -sysv -- [string repeat $base $count] - } -result $expected -} +} {ok} + +# ------------------------------------------------------------------------- + +test sum-5.0 {sum format option (BSD)} { + ::crc::sum -bsd -format 0x%X [string repeat x 200] +} {0xF8EE} + +test sum-5.1 {sum format option (SysV)} { + ::crc::sum -sysv -format 0x%X [string repeat x 200] +} {0x5DC0} # ------------------------------------------------------------------------- catch {unset ::crc::testfile} testsuiteCleanup Index: modules/debug/debug.man ================================================================== --- modules/debug/debug.man +++ modules/debug/debug.man @@ -1,14 +1,14 @@ [comment {-*- tcl -*- doctools manpage}] -[vset PACKAGE_VERSION 1.0.5] +[vset PACKAGE_VERSION 1.0.2] [manpage_begin debug n [vset PACKAGE_VERSION]] [keywords debug] [keywords log] [keywords narrative] [keywords trace] [copyright {200?, Colin McCormack, Wub Server Utilities}] -[copyright {2012-2014, Andreas Kupries }] +[copyright {2012, Andreas Kupries }] [moddesc {debug narrative}] [titledesc {debug narrative - core}] [category {debugging, tracing, and logging}] [require Tcl 8.5] [require debug [opt [vset PACKAGE_VERSION]]] @@ -23,11 +23,11 @@ [list_begin definitions] [comment {= = == === ===== ======== ============= =====================}] [call [cmd debug.[var tag]] [arg message] [opt [arg level]]] -For each known tag the package creates a command with this signature +For each known tag the package creates a command with this signatur the user can then use to provide the debug narrative of the tag. The narrative [arg message] is provided as a Tcl script whose value is [cmd subst]ed in the caller's scope if and only if the current level of interest for the [arg tag] matches or exceeds the call's [arg level] @@ -128,33 +128,10 @@ how the builtin command [cmd parray] does for array, and returns the resulting string. [para] This makes it suitable for use in debug messages. -[comment {= = == === ===== ======== ============= =====================}] -[call [cmd debug] [method hexl] [arg data] [opt [arg prefix]]] - -This is a convenience method formatting arbitrary data into a hex-dump -and returns the resulting string. - -[para] This makes it suitable for use in debug messages. - -[para] Each line of the dump is prefixed with [arg prefix]. This prefix -defaults to the empty string. - -[comment {= = == === ===== ======== ============= =====================}] -[call [cmd debug] [method nl]] - -This is a convenience method to insert a linefeed character (ASCII 0x0a) -into a debug message. - -[comment {= = == === ===== ======== ============= =====================}] -[call [cmd debug] [method tab]] - -This is a convenience method to insert a TAB character (ASCII 0x09) -into a debug message. - [comment {= = == === ===== ======== ============= =====================}] [call [cmd debug] [method prefix] [arg tag] [opt [arg text]]] This method is similar to the method [method header] above, in that it defines [cmd subst]able Tcl script which provides more text for debug Index: modules/debug/debug.tcl ================================================================== --- modules/debug/debug.tcl +++ modules/debug/debug.tcl @@ -19,12 +19,11 @@ package require Tcl 8.5 namespace eval ::debug { namespace export -clear \ define on off prefix suffix header trailer \ - names 2array level setting parray pdict \ - nl tab hexl + names 2array level setting parray pdict namespace ensemble create -subcommands {} } # # ## ### ##### ######## ############# ##################### ## API & Implementation @@ -205,16 +204,11 @@ } return } # # ## ### ##### ######## ############# ##################### -## Convenience commands. -# Format arrays and dicts as multi-line message. -# Insert newlines and tabs. - -proc ::debug::nl {} { return \n } -proc ::debug::tab {} { return \t } +## Convenience command. Format an array as multi-line message. proc ::debug::parray {a {pattern *}} { upvar 1 $a array if {![array exists array]} { error "\"$a\" isn't an array" @@ -231,59 +225,18 @@ } } set maxl [expr {$maxl + 2}] set lines {} foreach name $names { - set nameString [format (%s) $name] + set nameString [format %s(%s) $name] lappend lines [format "%-*s = %s" \ $maxl $nameString \ [dict get $dict $name]] } return [join $lines \n] } -proc ::debug::hexl {data {prefix {}}} { - set r {} - - # Convert the data to hex and to characters. - binary scan $data H*@0a* hexa asciia - - # Replace non-printing characters in the data with dots. - regsub -all -- {[^[:graph:] ]} $asciia {.} asciia - - # Pad with spaces to a full multiple of 32/16. - set n [expr {[string length $hexa] % 32}] - if {$n < 32} { append hexa [string repeat { } [expr {32-$n}]] } - #puts "pad H [expr {32-$n}]" - - set n [expr {[string length $asciia] % 32}] - if {$n < 16} { append asciia [string repeat { } [expr {16-$n}]] } - #puts "pad A [expr {32-$n}]" - - # Reassemble formatted, in groups of 16 bytes/characters. - # The hex part is handled in groups of 32 nibbles. - set addr 0 - while {[string length $hexa]} { - # Get front group of 16 bytes each. - set hex [string range $hexa 0 31] - set ascii [string range $asciia 0 15] - # Prep for next iteration - set hexa [string range $hexa 32 end] - set asciia [string range $asciia 16 end] - - # Convert the hex to pairs of hex digits - regsub -all -- {..} $hex {& } hex - - # Add the hex and latin-1 data to the result buffer - append r $prefix [format %04x $addr] { | } $hex { |} $ascii |\n - incr addr 16 - } - - # And done - return $r -} - # # ## ### ##### ######## ############# ##################### namespace eval debug { variable detail ; # map: TAG -> level of interest variable prefix ; # map: TAG -> message prefix to use @@ -300,7 +253,7 @@ } # # ## ### ##### ######## ############# ##################### ## Ready -package provide debug 1.0.5 +package provide debug 1.0.2 return Index: modules/debug/pkgIndex.tcl ================================================================== --- modules/debug/pkgIndex.tcl +++ modules/debug/pkgIndex.tcl @@ -1,5 +1,5 @@ if {![package vsatisfies [package require Tcl] 8.5]} return -package ifneeded debug 1.0.5 [list source [file join $dir debug.tcl]] +package ifneeded debug 1.0.2 [list source [file join $dir debug.tcl]] package ifneeded debug::heartbeat 1 [list source [file join $dir heartbeat.tcl]] package ifneeded debug::timestamp 1 [list source [file join $dir timestamp.tcl]] package ifneeded debug::caller 1 [list source [file join $dir caller.tcl]] Index: modules/dns/dns.tcl ================================================================== --- modules/dns/dns.tcl +++ modules/dns/dns.tcl @@ -36,11 +36,11 @@ package require uri; # tcllib 1.1 package require uri::urn; # tcllib 1.2 package require ip; # tcllib 1.7 namespace eval ::dns { - variable version 1.3.4 + variable version 1.3.3 variable rcsid {$Id: dns.tcl,v 1.36 2008/11/22 12:28:54 mic42 Exp $} namespace export configure resolve name address cname \ status reset wait cleanup errorcode @@ -1325,22 +1325,22 @@ # URI quoting to be accounted for. # catch { uri::register {dns} { - variable escape [set [namespace parent [namespace current]]::basic::escape] - variable host [set [namespace parent [namespace current]]::basic::host] - variable hostOrPort [set [namespace parent [namespace current]]::basic::hostOrPort] + set escape [set [namespace parent [namespace current]]::basic::escape] + set host [set [namespace parent [namespace current]]::basic::host] + set hostOrPort [set [namespace parent [namespace current]]::basic::hostOrPort] - variable class [string map {* \\\\*} \ + set class [string map {* \\\\*} \ "class=([join [array names ::dns::classes] {|}])"] - variable type [string map {* \\\\*} \ + set type [string map {* \\\\*} \ "type=([join [array names ::dns::types] {|}])"] - variable classOrType "(?:${class}|${type})" - variable classOrTypeSpec "(?:${class}|${type})(?:;(?:${class}|${type}))?" + set classOrType "(?:${class}|${type})" + set classOrTypeSpec "(?:${class}|${type})(?:;(?:${class}|${type}))?" - variable query "${host}(${classOrTypeSpec})?" + set query "${host}(${classOrTypeSpec})?" variable schemepart "(//${hostOrPort}/)?(${query})" variable url "dns:$schemepart" } } Index: modules/dns/ip.tcl ================================================================== --- modules/dns/ip.tcl +++ modules/dns/ip.tcl @@ -14,11 +14,11 @@ # @mdgen EXCLUDE: ipMoreC.tcl package require Tcl 8.2; # tcl minimum version namespace eval ip { - variable version 1.2.2 + variable version 1.2.1 variable rcsid {$Id: ip.tcl,v 1.14 2010/08/16 17:35:18 andreas_kupries Exp $} namespace export is version normalize equal type contract mask collapse subtract #catch {namespace ensemble create} Index: modules/dns/ip.test ================================================================== --- modules/dns/ip.test +++ modules/dns/ip.test @@ -225,43 +225,10 @@ } { test ip-11.$i "maskToLength, $m" { ip::maskToLength $m } $e } - -# ------------------------------------------------------------------------- - -foreach {i ip e} { - 0 0.0.0.0 0 - 1 0.0.0.1 1 - 2 0.0.1.0 256 - 3 0.1.0.0 65536 - 4 1.0.0.0 16777216 - 5 0.0.0.255 255 - 6 0.0.255.0 65280 - 7 0.255.0.0 16711680 - 8 255.0.0.0 4278190080 - 9 255.255.255.255 4294967295 -} { - test ip-12.$i "toInteger $ip" { - ip::toInteger $ip - } $e -} - -# ------------------------------------------------------------------------- - -foreach {i pma e} { - 0 {1.1.1.1 24} 1.1.2.1/0 - 1 {1.1.1.1 24 0} 1.1.1.1/0 - 2 {1.1.1.1 24 1} 1.1.2.1/0 - 3 {1.1.1.1 24 2} 1.1.3.1/0 -} { - test ip-13.$i "nextNet $pma" { - ip::nativeToPrefix [eval ip::nextNet $pma] - } $e -} - # ------------------------------------------------------------------------- testsuiteCleanup Index: modules/dns/ipMore.tcl ================================================================== --- modules/dns/ipMore.tcl +++ modules/dns/ipMore.tcl @@ -310,11 +310,11 @@ # # End of Header proc ::ip::toInteger {ip} { binary scan [ip::Normalize4 $ip] I out - return [format %u [expr {$out & 0xffffffff}]] + return $out } ##Procedure Header # Copyright (c) 2004 Cisco Systems, Inc. # @@ -653,12 +653,13 @@ if {![string is integer -strict $prefix]} { set prefix [toInteger $prefix] } if {![string is integer -strict $mask] || ($mask < 33 && $mask > 0)} { set mask [maskToInt $mask] - } - set prefix [expr {$prefix + ((($mask ^ 0xFFffFFff) + 1) * $count) }] + } + + set prefix [expr $prefix + ($mask ^ 0xFFffFFff) + $count ] return [format "0x%08x" $prefix] } ##Procedure Header Index: modules/dns/pkgIndex.tcl ================================================================== --- modules/dns/pkgIndex.tcl +++ modules/dns/pkgIndex.tcl @@ -1,9 +1,9 @@ # pkgIndex.tcl - # # $Id: pkgIndex.tcl,v 1.21 2010/08/16 17:35:18 andreas_kupries Exp $ if {![package vsatisfies [package provide Tcl] 8.2]} {return} -package ifneeded dns 1.3.4 [list source [file join $dir dns.tcl]] +package ifneeded dns 1.3.3 [list source [file join $dir dns.tcl]] package ifneeded resolv 1.0.3 [list source [file join $dir resolv.tcl]] -package ifneeded ip 1.2.2 [list source [file join $dir ip.tcl]] +package ifneeded ip 1.2.1 [list source [file join $dir ip.tcl]] package ifneeded spf 1.1.1 [list source [file join $dir spf.tcl]] Index: modules/dns/tcllib_dns.man ================================================================== --- modules/dns/tcllib_dns.man +++ modules/dns/tcllib_dns.man @@ -1,7 +1,6 @@ -[vset DNS_VERSION 1.3.4] -[manpage_begin dns n [vset DNS_VERSION]] +[manpage_begin dns n 1.3.3] [see_also resolver(5)] [keywords DNS] [keywords {domain name service}] [keywords resolver] [keywords {rfc 1034}] @@ -10,11 +9,11 @@ [copyright {2002, Pat Thoyts}] [moddesc {Domain Name Service}] [titledesc {Tcl Domain Name Service Client}] [category Networking] [require Tcl 8.2] -[require dns [opt [vset DNS_VERSION]]] +[require dns [opt 1.3.3]] [description] [para] The dns package provides a Tcl only Domain Name Service client. You should refer to (1) and (2) for information about the DNS protocol or Index: modules/dns/tcllib_ip.man ================================================================== --- modules/dns/tcllib_ip.man +++ modules/dns/tcllib_ip.man @@ -1,7 +1,6 @@ -[vset IP_VERSION 1.2.2] -[manpage_begin tcllib_ip n [vset IP_VERSION]] +[manpage_begin tcllib_ip n 1.2.1] [see_also inet(3)] [see_also ip(7)] [see_also ipv6(7)] [keywords {internet address}] [keywords ip] @@ -12,11 +11,11 @@ [copyright {2005 Aamer Akhter }] [moddesc {Domain Name Service}] [titledesc {IPv4 and IPv6 address manipulation}] [category Networking] [require Tcl 8.2] -[require ip [opt [vset IP_VERSION]]] +[require ip [opt 1.2.1]] [description] [para] This package provides a set of commands to help in parsing, displaying and comparing internet addresses. The package can handle both IPv4 (1) Index: modules/doctools/checker.tcl ================================================================== --- modules/doctools/checker.tcl +++ modules/doctools/checker.tcl @@ -2,11 +2,11 @@ # checker.tcl # # Code used inside of a checker interpreter to ensure correct usage of # doctools formatting commands. # -# Copyright (c) 2003-2014 Andreas Kupries +# Copyright (c) 2003-2010 Andreas Kupries # L10N package require msgcat @@ -250,13 +250,10 @@ proc vset {var args} { switch -exact -- [llength $args] { 0 { # Retrieve contents of variable VAR upvar #0 __$var data - if {![info exists data]} { - return -code error "can't read doc variable \"$var\": not set" - } return $data } 1 { # Set contents of variable VAR global __$var Index: modules/doctools/doctools.man ================================================================== --- modules/doctools/doctools.man +++ modules/doctools/doctools.man @@ -1,8 +1,7 @@ [comment {-*- tcl -*- doctools manpage}] -[vset PACKAGE_VERSION 1.4.18] -[manpage_begin doctools n [vset PACKAGE_VERSION]] +[manpage_begin doctools n 1.4.16] [see_also doctools_intro] [see_also doctools_lang_cmdref] [see_also doctools_lang_intro] [see_also doctools_lang_syntax] [see_also doctools_plugin_apiref] @@ -11,16 +10,16 @@ [keywords HTML] [keywords manpage] [keywords markup] [keywords nroff] [keywords TMML] -[copyright {2003-2014 Andreas Kupries }] +[copyright {2003-2013 Andreas Kupries }] [moddesc {Documentation tools}] [titledesc {doctools - Processing documents}] [category {Documentation tools}] [require Tcl 8.2] -[require doctools [opt [vset PACKAGE_VERSION]]] +[require doctools [opt 1.4.16]] [description] This package provides a class for the creation of objects able to process and convert text written in the [term doctools] markup language into any output format X for which a Index: modules/doctools/doctools.tcl ================================================================== --- modules/doctools/doctools.tcl +++ modules/doctools/doctools.tcl @@ -1,13 +1,15 @@ # doctools.tcl -- # # Implementation of doctools objects for Tcl. # -# Copyright (c) 2003-2014 Andreas Kupries +# Copyright (c) 2003-2013 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.45 2011/02/23 22:11:59 andreas_kupries Exp $ package require Tcl 8.2 package require textutil::expander # @mdgen OWNER: api.tcl @@ -491,12 +493,11 @@ if {$chk_ip == ""} {SetupChecker $name} # assert (format_ip != "") set warnings [list] if {[catch {$format_ip eval fmt_initialize}]} { - return -code error -errorcode {DOCTOOLS ENGINE} \ - "Could not initialize engine" + return -code error "Could not initialize engine" } set result "" for { set p $passes ; set n 1 @@ -505,43 +506,36 @@ } { incr p -1 ; incr n } { if {[catch {$format_ip eval [list fmt_setup $n]}]} { catch {$format_ip eval fmt_shutdown} - return -code error -errorcode {DOCTOOLS ENGINE} \ - "Could not initialize pass $n of engine" + return -code error "Could not initialize pass $n of engine" } $chk_ip eval ck_initialize $n if {[catch {set result [$expander expand $text]} msg]} { catch {$format_ip eval fmt_shutdown} # Filter for checker errors and reduce them to the essential message. - if {![regexp {^Error in} $msg]} { - return -code error -errorcode {DOCTOOLS INPUT} $msg - } + if {![regexp {^Error in} $msg]} {return -code error $msg} #set msg [join [lrange [split $msg \n] 2 end]] - if {![regexp {^--> \(FmtError\) } $msg]} { - return -code error -errorcode {DOCTOOLS INPUT} "Doctools $msg" - } + if {![regexp {^--> \(FmtError\) } $msg]} {return -code error "Doctools $msg"} set msg [lindex [split $msg \n] 0] regsub {^--> \(FmtError\) } $msg {} msg - return -code error -errorcode {DOCTOOLS INPUT} $msg + return -code error $msg } $chk_ip eval ck_complete } if {[catch {set result [$format_ip eval [list fmt_postprocess $result]]}]} { - return -code error -errorcode {DOCTOOLS ENGINE} \ - "Unable to post process final result" + return -code error "Unable to post process final result" } if {[catch {$format_ip eval fmt_shutdown}]} { - return -code error -errorcode {DOCTOOLS ENGINE} \ - "Could not shut engine down" + return -code error "Could not shut engine down" } return $result } @@ -1354,6 +1348,6 @@ #catch {search [file join $here lib doctools mpformats]} #catch {search [file join [file dirname $here] lib doctools mpformats]} catch {search [file join $here mpformats]} } -package provide doctools 1.4.18 +package provide doctools 1.4.17 Index: modules/doctools/pkgIndex.tcl ================================================================== --- modules/doctools/pkgIndex.tcl +++ modules/doctools/pkgIndex.tcl @@ -1,6 +1,6 @@ if {![package vsatisfies [package provide Tcl] 8.2]} {return} -package ifneeded doctools 1.4.18 [list source [file join $dir doctools.tcl]] +package ifneeded doctools 1.4.17 [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]] package ifneeded doctools::changelog 1.1 [list source [file join $dir changelog.tcl]] Index: modules/dtplite/dtplite.tcl ================================================================== --- modules/dtplite/dtplite.tcl +++ modules/dtplite/dtplite.tcl @@ -1,8 +1,8 @@ # -*- tcl -*- \ # @@ Meta Begin -# Application dtplite 1.2 +# Application dtplite 1.1 # Meta platform tcl # Meta summary Lightweight DocTools Processor # Meta description This application is a simple processor # Meta description for documents written in the doctools # Meta description markup language. It covers the most @@ -17,11 +17,11 @@ # Meta require textutil::repeat # Meta author Andreas Kupries # Meta license BSD # @@ Meta End -package provide dtplite 1.2 +package provide dtplite 1.1 # dtp lite - Lightweight DocTools Processor # ======== = ============================== # # Use cases @@ -636,17 +636,17 @@ Print stderr "$argv0 wrong#args, expected:\ -o outputpath ?-merge? ?-ext ext?\ ?-style file? ?-header file?\ ?-footer file? ?-nav label url?...\ format inputpath" - return -code error -errorcode {DTPLITE STOP} {} + return -code error -errorcode STOP {} } proc ::dtplite::ArgError {text} { global argv0 Print stderr "$argv0: $text" - return -code error -errorcode {DTPLITE STOP} {} + return -code error -errorcode STOP {} } proc ::dtplite::Print {args} { variable print set cmd [concat $print $args] Index: modules/dtplite/pkgIndex.tcl ================================================================== --- modules/dtplite/pkgIndex.tcl +++ modules/dtplite/pkgIndex.tcl @@ -1,5 +1,5 @@ if {![package vsatisfies [package provide Tcl] 8.2]} { # PRAGMA: returnok return } -package ifneeded dtplite 1.2 [list source [file join $dir dtplite.tcl]] +package ifneeded dtplite 1.1 [list source [file join $dir dtplite.tcl]] Index: modules/dtplite/pkg_dtplite.man ================================================================== --- modules/dtplite/pkg_dtplite.man +++ modules/dtplite/pkg_dtplite.man @@ -1,8 +1,7 @@ [comment {-*- tcl -*- doctools manpage}] -[vset PACKAGE_VERSION 1.2] -[manpage_begin dtplite n [vset PACKAGE_VERSION]] +[manpage_begin dtplite n 1.1] [see_also {docidx introduction}] [see_also {doctoc introduction}] [see_also {doctools introduction}] [keywords conversion] [keywords docidx] @@ -15,11 +14,10 @@ [keywords TMML] [copyright {2004-2013 Andreas Kupries }] [titledesc {Lightweight DocTools Markup Processor}] [moddesc {Documentation toolbox}] [category {Documentation tools}] -[require dtplite [opt [vset PACKAGE_VERSION]]] [description] [para] The application described by this document, [syscmd dtplite], is the successor to the extremely simple [syscmd mpexpand]. Influenced in its Index: modules/ftp/ftp.man ================================================================== --- modules/ftp/ftp.man +++ modules/ftp/ftp.man @@ -1,8 +1,7 @@ [comment {-*- tcl -*- doctools manpage}] -[vset PACKAGE_VERSION 2.4.13] -[manpage_begin ftp n [vset PACKAGE_VERSION]] +[manpage_begin ftp n 2.4.11] [see_also ftpd] [see_also mime] [see_also pop3] [see_also smtp] [keywords ftp] @@ -11,11 +10,11 @@ [keywords {rfc 959}] [moddesc {ftp client}] [titledesc {Client-side tcl implementation of the ftp protocol}] [category Networking] [require Tcl 8.2] -[require ftp [opt [vset PACKAGE_VERSION]]] +[require ftp [opt 2.4.11]] [description] [para] The ftp package provides the client side of the ftp protocol as Index: modules/ftp/ftp.tcl ================================================================== --- modules/ftp/ftp.tcl +++ modules/ftp/ftp.tcl @@ -116,13 +116,10 @@ # Arguments: # - # proc ::ftp::Timeout {s} { upvar ::ftp::ftp$s ftp - variable VERBOSE - - if {$VERBOSE} { DisplayMsg $s Waiting|Timeout! } after cancel $ftp(Wait) set ftp(state.control) 1 DisplayMsg "" "Timeout of control connection after $ftp(Timeout) sec.!" error @@ -145,33 +142,27 @@ # - # proc ::ftp::WaitOrTimeout {s} { upvar ::ftp::ftp$s ftp - variable VERBOSE set retvar 1 if { ![string length $ftp(Command)] && [info exists ftp(state.control)] } { - if {$VERBOSE} { DisplayMsg $s Waiting|$ftp(Timeout)|\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\# } - set ftp(Wait) [after [expr {$ftp(Timeout) * 1000}] [list [namespace current]::Timeout $s]] vwait ::ftp::ftp${s}(state.control) set retvar $ftp(state.control) - - if {$VERBOSE} { DisplayMsg $s Waiting|Done|\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\# } } if {$ftp(Error) != ""} { set errmsg $ftp(Error) set ftp(Error) "" DisplayMsg $s $errmsg error } - if {$VERBOSE} { DisplayMsg $s Waiting|OK|$retvar } return $retvar } ############################################################################# # @@ -185,35 +176,22 @@ # 0 ... Error # 1 ... OK # proc ::ftp::WaitComplete {s value} { - variable VERBOSE upvar ::ftp::ftp$s ftp - if {$VERBOSE} { DisplayMsg $s Waiting|Complete|$s|$value|\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\# } - if {![info exists ftp(Command)]} { set ftp(state.control) $value - - if {$VERBOSE} { DisplayMsg $s Waiting|Complete|Done/Command|$value|\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\# } return $value } if { ![string length $ftp(Command)] && [info exists ftp(state.data)] } { - - if {$VERBOSE} { DisplayMsg $s Waiting|State|\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\# } - vwait ::ftp::ftp${s}(state.data) - - if {$VERBOSE} { DisplayMsg $s Waiting|State|Done|\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\# } } catch {after cancel $ftp(Wait)} set ftp(state.control) $value - - if {$VERBOSE} { DisplayMsg $s Waiting|OK|$ftp(state.control)|\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\# } - return $ftp(state.control) } ############################################################################# # @@ -255,12 +233,10 @@ proc ::ftp::StateHandler {s {sock ""}} { upvar ::ftp::ftp$s ftp variable DEBUG variable VERBOSE - if {$VERBOSE} { DisplayMsg $s StateHandler/$s/$sock/================================================ } - # disable fileevent on control socket, enable it at the and of the state machine # fileevent $ftp(CtrlSock) readable {} # there is no socket (and no channel to get) if called from a procedure @@ -330,38 +306,32 @@ } CloseDataConn $s WaitComplete $s 0 Command $ftp(Command) terminated catch {unset ftp(State)} - - if {$VERBOSE} { DisplayMsg $s EOF/Control } return } else { # Fix SF bug #466746: Incomplete line, do nothing. - if {$VERBOSE} { DisplayMsg $s Incomplete/Line } return } } if { $DEBUG } { - DisplayMsg $s "-> rc=\"$rc\" -> msgtext=\"$msgtext\" -> state=\"$ftp(State)\"" + DisplayMsg $s "-> rc=\"$rc\"\n-> msgtext=\"$msgtext\"\n-> state=\"$ftp(State)\"" } # In asynchronous mode, should we move on to the next state? set nextState 0 # system status replay if { [string equal $rc "211"] } { - if {$VERBOSE} { DisplayMsg $s Ignore/211 } return } # use only the first digit regexp -- "^\[0-9\]?" $rc rc - - if {$VERBOSE} { DisplayMsg $s StateBegin////////($ftp(State)) } - + switch -exact -- $ftp(State) { user { switch -exact -- $rc { 2 { PutsCtrlSock $s "USER $ftp(User)" @@ -566,14 +536,10 @@ } list_close { switch -exact -- $rc { 1 {} 2 { - # Sync control sequencer to active data connection - # before stepping out - WaitDataConn $s - set nextState 1 if {[info exists ftp(NextState)] && ![llength $ftp(NextState)]} { Command $ftp(Command) list [ListPostProcess $ftp(List)] } else { set complete_with 1 @@ -816,18 +782,13 @@ } put_close { switch -exact -- $rc { 1 { # Keep going - if {$VERBOSE} { DisplayMsg $s put_close/1--continue } return } 2 { - # Sync control sequencer to active data connection - # before stepping out - WaitDataConn $s - set complete_with 1 set nextState 1 Command $ftp(Command) put $ftp(RemoteFilename) } default { @@ -893,14 +854,10 @@ } } append_close { switch -exact -- $rc { 2 { - # Sync control sequencer to active data connection - # before stepping out - WaitDataConn $s - set complete_with 1 set nextState 1 Command $ftp(Command) append $ftp(RemoteFilename) } default { @@ -958,11 +915,11 @@ default { if { [string equal $ftp(Mode) "passive"] } { set errmsg "Error setting PASSIVE mode!" } else { set errmsg "Error setting port!" - } + } set complete_with 0 Command $ftp(Command) error $errmsg } } } @@ -983,14 +940,10 @@ } } reget_close { switch -exact -- $rc { 2 { - # Sync control sequencer to active data connection - # before stepping out - WaitDataConn $s - set complete_with 1 set nextState 1 Command $ftp(Command) get $ftp(RemoteFilename):$ftp(From):$ftp(To) unset ftp(From) ftp(To) } @@ -1057,14 +1010,10 @@ } } get_close { switch -exact -- $rc { 2 { - # Sync control sequencer to active data connection - # before stepping out - WaitDataConn $s - set complete_with 1 set nextState 1 if {$ftp(inline)} { upvar #0 $ftp(get:varname) returnData set returnData $ftp(GetData) @@ -1083,19 +1032,13 @@ default { error "Unknown state \"$ftp(State)\"" } } - if {$VERBOSE} { DisplayMsg $s ////////StateDone==>$ftp(State) } - # finish waiting if { [info exists complete_with] } { - if {$VERBOSE} { DisplayMsg $s WaitBegin////////($complete_with) } - WaitComplete $s $complete_with - - if {$VERBOSE} { DisplayMsg $s ////////WaitDone } } # display control channel message if { [info exists buffer] } { if { $VERBOSE } { @@ -1112,29 +1055,20 @@ if { [info exists errmsg] } { set ftp(Error) $errmsg } # If operating asynchronously, commence next state - if {$VERBOSE} { - DisplayMsg $s "ns=$nextState, NS=[info exists ftp(NextState)], NSlen=[expr {[info exists ftp(NextState)] && [llength $ftp(NextState)]}]" - } if {$nextState && [info exists ftp(NextState)] && [llength $ftp(NextState)]} { # Pop the head of the NextState queue - if {$VERBOSE} { DisplayMsg $s Sequence=($ftp(NextState)) } - - set ftp(State) [lindex $ftp(NextState) 0] + set ftp(State) [lindex $ftp(NextState) 0] set ftp(NextState) [lreplace $ftp(NextState) 0 0] - - if {$VERBOSE} { DisplayMsg $s Recurse/StateHandler } StateHandler $s } # enable fileevent on control socket again #fileevent $ftp(CtrlSock) readable [list ::ftp::StateHandler $ftp(CtrlSock)] - if {$VERBOSE} { DisplayMsg $s ======/HandlerDone } - return } ############################################################################# # # Type -- @@ -1201,15 +1135,12 @@ # # Returns: # sorted list of files or {} if listing fails proc ::ftp::NList {s { dir ""}} { - variable VERBOSE upvar ::ftp::ftp$s ftp - if {$VERBOSE} { DisplayMsg $s NList($s)($dir)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } - if { ![info exists ftp(State)] } { if { ![string is digit -strict $s] } { DisplayMsg $s "Bad connection name \"$s\"" error } else { DisplayMsg $s "Not connected!" error @@ -1225,12 +1156,10 @@ } # save current type and force ascii mode set old_type $ftp(Type) if { $ftp(Type) != "ascii" } { - if {$VERBOSE} { DisplayMsg $s NList/ForceAscii } - if {[string length $ftp(Command)]} { set ftp(NextState) [list nlist_$ftp(Mode) type_change list_last] set ftp(type:changeto) $old_type Type $s ascii return {} @@ -1237,38 +1166,27 @@ } Type $s ascii } set ftp(State) nlist_$ftp(Mode) - - if {$VERBOSE} { DisplayMsg $s NList/Process~~~~~~~~~~~~~~~~~~~ } StateHandler $s - if {$VERBOSE} { DisplayMsg $s NList/Processed~~~~~~~~~~~~~~~~~ } - # wait for synchronization set rc [WaitOrTimeout $s] # restore old type - if {$VERBOSE} { DisplayMsg $s NList/RestoreType~~~~~~~~~~~~~~~~~~~~~ } if { [Type $s] != $old_type } { Type $s $old_type } unset ftp(Dir) if { $rc } { - if {$VERBOSE} { DisplayMsg $s NList/ReturnData~~~~~~~~~~~~~~~~~~~~~~~ } - return [lsort [split [string trim $ftp(List) \n] \n]] } else { - if {$VERBOSE} { DisplayMsg $s NList/CDC~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ } - CloseDataConn $s return {} } - - if {$VERBOSE} { DisplayMsg $s ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~NList/Done } } ############################################################################# # # List -- @@ -2837,11 +2755,10 @@ if {[info exists ftp(get:channel)]} { catch {unset ftp(get:channel)} catch {unset ftp(DestCI)} } - catch { unset ftp(AC) } catch {after cancel $ftp(Wait)} catch {fileevent $ftp(DataSock) readable {}} catch {close $ftp(DataSock); unset ftp(DataSock)} catch {close $ftp(DestCI); unset ftp(DestCI)} catch {close $ftp(SourceCI); unset ftp(SourceCI)} @@ -2865,15 +2782,10 @@ proc ::ftp::InitDataConn {s sock addr port} { upvar ::ftp::ftp$s ftp variable VERBOSE - if { $VERBOSE } { - DisplayMsg $s "D: New Connection from $addr:$port" data - DisplayMsg $s "D: Sequencer state $ftp(State)" data - } - # If the new channel is accepted, the dummy channel will be closed catch {close $ftp(DummySock); unset ftp(DummySock)} set ftp(state.data) 0 @@ -2925,61 +2837,12 @@ error "Unknown state \"$ftp(State)\"" } } if { $VERBOSE } { - DisplayMsg $s "D: ... Connection from $addr:$port ... initialized" data - } - - # Marker for WaitDataConn - set ftp(AC) 1 - return -} - -############################################################################# -# -# WaitDataConn -- -# Arguments: The ftp connection handle -# Returns: None -# -# Synchronizes the control sequencer to the data connection (active -# mode). This must be placed at the end of all state sequences, -# i.e. the last state of each sequence, dealing with a data -# connection. Without the sync the control sequencer may step to the -# next command causing a very late-coming data connection to encounter -# an unknown state, and failing to establish what to do. -# -# Sync is achieved through the state field AC, in cooperation with the -# procedures OpenActiveConn and InitDataConn. -# -# Missing field => Not an active connection - Ignore -# AC == 0 => OAC has run, IDC not - Wait for IDC, then cleanup -# AC == 1 => OAC has run, IDC as well - No waiting, just cleanup. - -proc ::ftp::WaitDataConn {s} { - variable VERBOSE - upvar ::ftp::ftp$s ftp - - if {$VERBOSE} { DisplayMsg $s WDC|$s|Begin|@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ } - - # Passive connection, nothing to do - if {![info exists ftp(AC)]} { - if {$VERBOSE} { DisplayMsg $s WDC|$s|Passive|@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ } - return - } - - # InitDataConn has not run yet. Wait! - if {!$ftp(AC)} { - if {$VERBOSE} { DisplayMsg $s WDC|$s|Sync|@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ } - vwait ::ftp::ftp${s}(AC) - # assert ftp(AC) == 1 - if {$VERBOSE} { DisplayMsg $s WDC|$s|Synced|@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ } - } ; # else: Was run already - - if {$VERBOSE} { DisplayMsg $s WDC|$s|Cleanup|@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ } - # InitDataConn has run, clean up and continue - unset ftp(AC) + DisplayMsg $s "D: Connection from $addr:$port" data + } return } ############################################################################# # @@ -3020,12 +2883,10 @@ if { $VERBOSE } { DisplayMsg $s "D: Port is $p" data } set ftp(DataPort) "[expr {$p / 256}],[expr {$p % 256}]" - # Marker for WaitDataConn - set ftp(AC) 0 return 1 } ############################################################################# # @@ -3154,6 +3015,6 @@ } # ================================================================== # At last, everything is fine, we can provide the package. -package provide ftp [lindex {Revision: 2.4.13} 1] +package provide ftp [lindex {Revision: 2.4.12} 1] Index: modules/ftp/pkgIndex.tcl ================================================================== --- modules/ftp/pkgIndex.tcl +++ modules/ftp/pkgIndex.tcl @@ -1,3 +1,3 @@ if {![package vsatisfies [package provide Tcl] 8.2]} {return} -package ifneeded ftp 2.4.13 [list source [file join $dir ftp.tcl]] +package ifneeded ftp 2.4.12 [list source [file join $dir ftp.tcl]] package ifneeded ftp::geturl 0.2.1 [list source [file join $dir ftp_geturl.tcl]] Index: modules/html/html.man ================================================================== --- modules/html/html.man +++ modules/html/html.man @@ -1,8 +1,7 @@ [comment {-*- tcl -*- doctools manpage}] -[vset HTML_VERSION 1.4.3] -[manpage_begin html n [vset HTML_VERSION]] +[manpage_begin html n 1.4] [see_also htmlparse] [see_also ncgi] [keywords checkbox] [keywords checkbutton] [keywords form] @@ -11,11 +10,11 @@ [keywords table] [moddesc {HTML Generation}] [titledesc {Procedures to generate HTML structures}] [category {CGI programming}] [require Tcl 8.2] -[require html [opt [vset HTML_VERSION]]] +[require html [opt 1.4]] [description] [para] The package [package html] provides commands that generate HTML. These commands typically return an HTML string as their result. In @@ -61,11 +60,11 @@ same [arg key] for their name. The [arg sep] is text used to separate the elements. [call [cmd ::html::checkValue] [arg name] [opt [arg value]]] -Generate the "name=[arg name] value=[arg value]" for a [term checkbox] form +Generate the "name=[arg name] value=[arg value] for a [term checkbox] form element. If the CGI variable [arg name] has the value [arg value], then SELECTED is added to the return value. [arg value] defaults to "1". [call [cmd ::html::closeTag]] @@ -244,55 +243,10 @@ define a [term meta] tag for the page. The [arg args] is a Tcl-style name, value list that is used for the name= and value= parameters for the [term meta] tag. The [term meta] tag is included in the result of [cmd ::html::head]. -[call [cmd ::html::css] [arg href]] - -[emph {Side effect only}]. Call this before [cmd ::html::head] to -define a [term link] tag for a linked CSS document. The [arg href] -value is a HTTP URL to a CSS document. The [term link] tag is included -in the result of [cmd ::html::head]. - -[para] - -Multiple calls of this command are allowed, enabling the use of -multiple CSS document references. In other words, the arguments -of multiple calls are accumulated, and do not overwrite each other. - -[call [cmd ::html::css-clear]] - -[emph {Side effect only}]. Call this before [cmd ::html::head] to -clear all links to CSS documents. -[para] - -Multiple calls of this command are allowed, doing nothing after the -first of a sequence with no intervening [cmd ::html::css]. - -[call [cmd ::html::js] [arg href]] - -[emph {Side effect only}]. Call this before [cmd ::html::head] to -define a [term script] tag for a linked JavaScript document. The -[arg href] is a HTTP URL to a JavaScript document. The [term script] -tag is included in the result of [cmd ::html::head]. - -[para] - -Multiple calls of this command are allowed, enabling the use of -multiple JavaScript document references. In other words, the arguments -of multiple calls are accumulated, and do not overwrite each other. - - -[call [cmd ::html::js-clear]] - -[emph {Side effect only}]. Call this before [cmd ::html::head] to -clear all links to JavaScript documents. -[para] - -Multiple calls of this command are allowed, doing nothing after the -first of a sequence with no intervening [cmd ::html::js]. - [call [cmd ::html::minorList] [arg list] [opt [arg ordered]]] Generate an ordered or unordered list of links. The [arg list] is a Tcl-style name, value list of labels and urls for the links. @@ -350,11 +304,11 @@ The [arg sep] is text used to separate the elements. The [arg list] is a Tcl-style label, value list. [call [cmd ::html::radioValue] [arg {name value}]] -Generate the "name=[arg name] value=[arg value]" for a [term radio] form +Generate the "name=[arg name] value=[arg value] for a [term radio] form element. If the CGI variable [arg name] has the value [arg value], then SELECTED is added to the return value. [call [cmd ::html::refresh] [arg {seconds url}]] @@ -445,32 +399,10 @@ This procedure is similar to the built-in Tcl [cmd while] control structure. Rather than evaluating the body, it returns the subst'ed [arg body]. Each iteration of the loop causes another string to be concatenated to the result value. -[call [cmd ::html::doctype] [arg id]] - -This procedure can be used to build the standard DOCTYPE -declaration string. It will return the standard declaration -string for the id, or throw an error if the id is not known. -The following id's are defined: - -[list_begin enumerated] -[enum] HTML32 -[enum] HTML40 -[enum] HTML40T -[enum] HTML40F -[enum] HTML401 -[enum] HTML401T -[enum] HTML401F -[enum] XHTML10S -[enum] XHTML10T -[enum] XHTML10F -[enum] XHTML11 -[enum] XHTMLB -[list_end] - [list_end] [vset CATEGORY html] [include ../doctools2base/include/feedback.inc] [manpage_end] Index: modules/html/html.tcl ================================================================== --- modules/html/html.tcl +++ modules/html/html.tcl @@ -13,11 +13,11 @@ # # Originally by Brent Welch, with help from Dan Kuchler and Melissa Chawla package require Tcl 8.2 package require ncgi -package provide html 1.4.3 +package provide html 1.4 namespace eval ::html { # State about the current page @@ -508,11 +508,11 @@ variable page ::set html "" + append html "\">\n" lappend page(meta) $html return "" } # ::html::headTag @@ -1403,11 +1403,11 @@ # # Results: # The text with
                          in place of line-endings. proc ::html::nl2br {s} { - return [string map [list \n\r
                          \r\n
                          \n
                          \r
                          ] $s] + return [string map [list \n\r
                          \n
                          \r
                          ] $s] } # ::html::doctype # Create the DOCTYPE tag and tuck it away for usage # @@ -1417,14 +1417,13 @@ # Results: # HTML for the doctype section proc ::html::doctype {arg} { variable doctypes - ::set code [string toupper $arg] - ::if {![info exists doctypes($code)]} { - return -code error -errorcode {HTML DOCTYPE BAD} \ - "Unknown doctype \"$arg\"" + set code [string toupper $arg] + if {![info exists doctypes($code)]} { + return -code error "Unknown doctype \"$arg\"" } return $doctypes($code) } namespace eval ::html { @@ -1450,30 +1449,16 @@ # # Arguments: # href The location of the css file to include the filename and path # # Results: -# None. +# HTML for the section proc ::html::css {href} { variable page - lappend page(css) "" - return -} - -# ::html::css-clear -# Drop all text/css references. -# -# Arguments: -# None. -# -# Results: -# None. - -proc ::html::css-clear {} { - variable page - catch { unset page(css) } + set page(css) \ + "\n" return } # ::html::js # Create the text/javascript tag and tuck it away for usage @@ -1480,27 +1465,13 @@ # # Arguments: # href The location of the javascript file to include the filename and path # # Results: -# None. +# HTML for the section proc ::html::js {href} { variable page - lappend page(js) "" - return -} - -# ::html::js-clear -# Drop all text/javascript references. -# -# Arguments: -# None. -# -# Results: -# None. - -proc ::html::js-clear {} { - variable page - catch { unset page(js) } + set page(js) \ + "\n" return } Index: modules/html/html.test ================================================================== --- modules/html/html.test +++ modules/html/html.test @@ -15,85 +15,84 @@ source [file join \ [file dirname [file dirname [file join [pwd] [info script]]]] \ devtools testutilities.tcl] -testsNeedTcl 8.4 -testsNeedTcltest 2.0 +testsNeedTcl 8.2 +testsNeedTcltest 1.0 testing { useLocal html.tcl html } # ------------------------------------------------------------------------- -test html-1.1 {html::init} -body { +test html-1.1 {html::init} { html::init - list \ - [array exists html::defaults] \ - [array size html::defaults] \ - [info exists html::page] -} -result {1 0 0} + list [array exists html::defaults] \ + [array size html::defaults] \ + [info exists html::page] +} {1 0 0} -test html-1.2 {html::init} -body { +test html-1.2 {html::init} { html::init { font.face arial body.bgcolor white body.text black } lsort [array names html::defaults] -} -result {body.bgcolor body.text font.face} - -test html-1.3 {html::init, too many args} -body { - html::init wrong num args -} -returnCodes error -result {wrong # args: should be "html::init ?nvlist?"} - -test html-1.4 {html::init, bad arg, odd-length list} -body { - html::init {wrong num args} -} -returnCodes error -result {list must have an even number of elements} - -test html-2.1 {html::head, not enough args} -body { - html::head -} -returnCodes error -result {wrong # args: should be "html::head title"} - -test html-2.2 {html::head} -body { +} {body.bgcolor body.text font.face} + +test html-1.3 {html::init} { + catch {html::init wrong num args} +} 1 + +test html-1.4 {html::init} { + catch {html::init {wrong num args}} +} 1 + +test html-2.1 {html::head} { + catch {html::head} +} 1 + +test html-2.2 {html::head} { html::head "The Title" -} -result "\n\tThe Title\n\n" +} "\n\tThe Title\n\n" -test html-2.3 {html::head} -body { +test html-2.3 {html::head} { html::description "The Description" html::keywords key word html::author "Cathy Coder" html::meta metakey metavalue html::head "The Title" -} -result { +} { The Title } -test html-3.1 {html::title, not enough args} -body { - html::title -} -returnCodes error -result {wrong # args: should be "html::title title"} +test html-3.1 {html::title} { + catch html::title +} 1 -test html-3.2 {html::title} -body { +test html-3.2 {html::title} { html::title "blah blah" -} -result "blah blah\n" +} "blah blah\n" -test html-4.1 {html::getTitle} -body { +test html-4.1 {html::getTitle} { html::init html::getTitle -} -result "" +} "" -test html-4.2 {html::getTitle} -body { +test html-4.2 {html::getTitle} { html::init html::title "blah blah" html::getTitle -} -result {blah blah} +} {blah blah} test html-5.1 {html::meta} { html::init html::meta one two } {} @@ -515,19 +514,21 @@ html::refresh 4 html::head title } { title + } test html-26.5 {html::refresh} { html::init html::refresh 9 http://www.scriptics.com html::head title } { title + } test html-27.1 {html::foreach--1 var, 1 iteration} { html::foreach x {a} {
                          } @@ -791,156 +792,47 @@ test html-32.1 {single argument} { set x 0 set result [html::eval {set x [format 22]}] list $result $x } {{} 22} - test html-32.2 {multiple arguments} { set a {$b} set b xyzzy set x 0 set result [html::eval {set x [eval format $a]}] list $result $x } {{} xyzzy} - test html-32.3 {single argument} { set x [list] set y 1 set result [html::eval lappend x a b c d {$y} e f g] list $result $x } {{} {a b c d 1 e f g}} - -test html-32.4 {error: not enough arguments} -body { - html::eval -} -returnCodes error -result {wrong # args: should be "uplevel ?level? command ?arg ...?"} - -test html-32.6 {error in eval'ed command} -body { - html::eval {error "test error"} -} -returnCodes error -result {test error} - -test html-33.0 {html::font} -body { - html::font -} -result {} - -test html-33.1 {html::font} -body { - html::font size=18 -} -result {} - -test html-34.0 {html::nl2br} -body { - html::nl2br "a\n\rb\nc\rd" -} -result {a
                          b
                          c
                          d} - -test html-34.1 {html::nl2br, ticket 1742078} -body { - html::nl2br "a\r\nb" -} -result {a
                          b} - -# ------------------------------------------------------------------------- - -test html-tkt3439702-35.0 {html::css, not enough arguments} -body { - html::css -} -returnCodes error -result {wrong # args: should be "html::css href"} - -test html-tkt3439702-35.1 {html::css, too many arguments} -body { - html::css REF X -} -returnCodes error -result {wrong # args: should be "html::css href"} - -test html-tkt3439702-35.2 {html::css, single ref} -setup { - html::css-clear -} -body { - html::css "http://test.css" - string trim [html::head T] -} -cleanup { - html::css-clear -} -result "\n\tT\n\t\n\t\n" - -test html-tkt3439702-35.3 {html::css, multiple ref} -setup { - html::css-clear -} -body { - html::css "http://test1.css" - html::css "http://test2.css" - string trim [html::head T] -} -cleanup { - html::css-clear -} -result { - T - - - -} - -# ------------------------------------------------------------------------- - -test html-tkt3439702-36.0 {html::js, not enough arguments} -body { - html::js -} -returnCodes error -result {wrong # args: should be "html::js href"} - -test html-tkt3439702-36.1 {html::js, too many arguments} -body { - html::js REF X -} -returnCodes error -result {wrong # args: should be "html::js href"} - -test html-tkt3439702-36.2 {html::js, single ref} -setup { - html::js-clear -} -body { - html::js "http://test.js" - string trim [html::head T] -} -cleanup { - html::js-clear -} -result { - T - - -} - -test html-tkt3439702-36.3 {html::js, multiple ref} -setup { - html::js-clear -} -body { - html::js "http://test1.js" - html::js "http://test2.js" - string trim [html::head T] -} -cleanup { - html::js-clear -} -result { - T - - - -} - -test html-tkt3439702-37.0 {html::js, html::css, mixed} -setup { - html::css-clear - html::js-clear -} -body { - html::css "http://test.css" - html::js "http://test.js" - string trim [html::head T] -} -cleanup { - html::js-clear - html::css-clear -} -result { - T - - - -} - -# ------------------------------------------------------------------------- -# TODO: html::css-clear, html::js-clear - - -test html-tktafe4366e2e-38.0 {html::doctype, not enough args} -body { - html::doctype -} -returnCodes error -result {wrong # args: should be "html::doctype arg"} - -test html-tktafe4366e2e-38.1 {html::doctype, too many args} -body { - html::doctype HTML401T X -} -returnCodes error -result {wrong # args: should be "html::doctype arg"} - -test html-tktafe4366e2e-38.2 {html::doctype, unknown type} -body { - html::doctype HTML401TXXX -} -returnCodes error -result {Unknown doctype "HTML401TXXX"} - -test html-tktafe4366e2e-38.3 {html::doctype} -body { - html::doctype HTML401T -} -result {} - -# ------------------------------------------------------------------------- +test html-32.4 {error: not enough arguments} {catch html::eval} 1 +test html-32.5 {error: not enough arguments} { + catch html::eval msg + set msg +} {wrong # args: should be "uplevel ?level? command ?arg ...?"} +test html-32.6 {error in eval'ed command} { + catch {html::eval {error "test error"}} +} 1 +test html-32.7 {error in eval'ed command} { + catch {html::eval {error "test error"}} msg + set msg +} {test error} + + +test html-33.0 {html::font} { + html::font +} {} + +test html-33.1 {html::font} { + html::font size=18 +} {} + + +test html-34.0 {html::nl2br} { + html::nl2br "a\n\rb\nc\rd" +} {a
                          b
                          c
                          d} + + testsuiteCleanup Index: modules/html/pkgIndex.tcl ================================================================== --- modules/html/pkgIndex.tcl +++ modules/html/pkgIndex.tcl @@ -1,2 +1,2 @@ if {![package vsatisfies [package provide Tcl] 8.2]} {return} -package ifneeded html 1.4.3 [list source [file join $dir html.tcl]] +package ifneeded html 1.4 [list source [file join $dir html.tcl]] Index: modules/json/json.bench ================================================================== --- modules/json/json.bench +++ modules/json/json.bench @@ -89,11 +89,11 @@ bench_puts "=== === === $impl ===" bench_puts "=== === === === === ===" bench_puts {=== test-data =========} - foreach f [glob -nocomplain -directory $self/tests *.json] { + foreach f [glob -nocomplain -directory $self/test-data *.json] { set in [cat $f] bench -desc "parse [file rootname [file tail $f]] ($impl)" -body { json::json2dict $in } @@ -101,11 +101,11 @@ bench -desc "validate [file rootname [file tail $f]] ($impl)" -body { json::validate $in } } - foreach f [glob -nocomplain -directory $self/tests *.bench] { + foreach f [glob -nocomplain -directory $self/test-data *.bench] { set in [cat $f] bench -desc "parse [file rootname [file tail $f]] ($impl)" -body { json::json2dict $in } Index: modules/json/json.test ================================================================== --- modules/json/json.test +++ modules/json/json.test @@ -16,11 +16,11 @@ testsNeedTcl [expr {[catch {package require dict}] ? "8.5" : "8.4"}] testsNeedTcltest 2.0 support { - useLocalFile tests/support.tcl + useLocalFile test_support.tcl } testing { useAccel [useTcllibC] json/json.tcl json TestAccelInit json Index: modules/json/json_write.man ================================================================== --- modules/json/json_write.man +++ modules/json/json_write.man @@ -1,18 +1,17 @@ [comment {-*- tcl -*- doctools manpage}] -[vset PACKAGE_VERSION 1.0.3] -[manpage_begin json::write n [vset PACKAGE_VERSION]] +[manpage_begin json::write n 1.0.2] [keywords {data exchange}] [keywords {exchange format}] [keywords javascript] [keywords json] [copyright {2009-2013 Andreas Kupries }] [moddesc {JSON}] [titledesc {JSON generation}] [category {CGI programming}] [require Tcl 8.5] -[require json::write [opt [vset PACKAGE_VERSION]]] +[require json::write [opt 1.0.2]] [description] [para] The [package json::write] package provides a simple Tcl-only library for generation of text in the JSON [uri http://www.json.org/] data Index: modules/json/json_write.tcl ================================================================== --- modules/json/json_write.tcl +++ modules/json/json_write.tcl @@ -173,28 +173,13 @@ variable indented 1 variable aligned 1 variable quotes \ - [list "\"" "\\\"" \\ \\\\ \b \\b \f \\f \n \\n \r \\r \t \\t \ - \x00 \\u0000 \x01 \\u0001 \x02 \\u0002 \x03 \\u0003 \ - \x04 \\u0004 \x05 \\u0005 \x06 \\u0006 \x07 \\u0007 \ - \x0b \\u000b \x0e \\u000e \x0f \\u000f \x10 \\u0010 \ - \x11 \\u0011 \x12 \\u0012 \x13 \\u0013 \x14 \\u0014 \ - \x15 \\u0015 \x16 \\u0016 \x17 \\u0017 \x18 \\u0018 \ - \x19 \\u0019 \x1a \\u001a \x1b \\u001b \x1c \\u001c \ - \x1d \\u001d \x1e \\u001e \x1f \\u001f \x7f \\u007f \ - \x80 \\u0080 \x81 \\u0081 \x82 \\u0082 \x83 \\u0083 \ - \x84 \\u0084 \x85 \\u0085 \x86 \\u0086 \x87 \\u0087 \ - \x88 \\u0088 \x89 \\u0089 \x8a \\u008a \x8b \\u008b \ - \x8c \\u008c \x8d \\u008d \x8e \\u008e \x8f \\u008f \ - \x90 \\u0090 \x91 \\u0091 \x92 \\u0092 \x93 \\u0093 \ - \x94 \\u0094 \x95 \\u0095 \x96 \\u0096 \x97 \\u0097 \ - \x98 \\u0098 \x99 \\u0099 \x9a \\u009a \x9b \\u009b \ - \x9c \\u009c \x9d \\u009d \x9e \\u009e \x9f \\u009f ] + [list "\"" "\\\"" \\ \\\\ \b \\b \f \\f \n \\n \r \\r \t \\t] } # ### ### ### ######### ######### ######### ## Ready -package provide json::write 1.0.3 +package provide json::write 1.0.2 return Index: modules/json/json_write.test ================================================================== --- modules/json/json_write.test +++ modules/json/json_write.test @@ -101,14 +101,13 @@ json::write object A } -returnCodes 1 -result {wrong # args, expected an even number of arguments} # ------------------------------------------------------------------------- -test json-write-3.0 {indented, aligned} -setup { +test json-write-3.0 {indented, aligned} -body { json::write indented 1 json::write aligned 1 -} -body { gen $data } -result {{ "grammar" : { "rules" : { "A" : { @@ -146,14 +145,13 @@ }, "start" : "n Expression" } }} -test json-write-3.1 {indented, !aligned} -setup { +test json-write-3.1 {indented, !aligned} -body { json::write indented 1 json::write aligned 0 -} -body { gen $data } -result {{ "grammar" : { "rules" : { "A" : { @@ -191,28 +189,20 @@ }, "start" : "n Expression" } }} -test json-write-3.1 {!indented, !aligned} -setup { +test json-write-3.1 {!indented, !aligned} -body { json::write indented 0 json::write aligned 0 -} -body { gen $data } -result {{"grammar":{"rules":{"A":{"is":"/ {t +} {t -}","mode":"value"},"D":{"is":"/ {t 0} {t 1} ","mode":"value"},"E":{"is":"/ {x {t (} {n E} {t )}} {x {n F} {* {x {n M} {n F}}}}","mode":"value"},"F":{"is":"x {n T} {* {x {n A} {n T}}}","mode":"value"},"M":{"is":"/ {t *} {t /}","mode":"value"},"N":{"is":"x {? {n S}} {+ {n D}}","mode":"value"},"S":{"is":"/ {t +} {t -}","mode":"value"},"T":{"is":"n N","mode":"value"}},"start":"n Expression"}}} - -# ------------------------------------------------------------------------- - -test json-write-4.0 {string quoting} -body { - json::write string "a\"b\\c\bd\fe\nf\rg\th\0i\1j\2k\3l\177m" -} -result "\"a\\\"b\\\\c\\bd\\fe\\nf\\rg\\th\\u0000i\\u0001j\\u0002k\\u0003l\\u007fm\"" - # ------------------------------------------------------------------------- unset data rename gen {} testsuiteCleanup # Local Variables: # mode: tcl # indent-tabs-mode: nil # End: Index: modules/json/pkgIndex.tcl ================================================================== --- modules/json/pkgIndex.tcl +++ modules/json/pkgIndex.tcl @@ -2,6 +2,6 @@ if {![package vsatisfies [package provide Tcl] 8.4]} {return} package ifneeded json 1.3.2 [list source [file join $dir json.tcl]] if {![package vsatisfies [package provide Tcl] 8.5]} {return} -package ifneeded json::write 1.0.3 [list source [file join $dir json_write.tcl]] +package ifneeded json::write 1.0.2 [list source [file join $dir json_write.tcl]] ADDED modules/json/test-data/array.json Index: modules/json/test-data/array.json ================================================================== --- /dev/null +++ modules/json/test-data/array.json @@ -0,0 +1,22 @@ +[ + { + "precision": "zip", + "Latitude": 37.7668, + "Longitude": -122.3959, + "Address": "", + "City": "SAN FRANCISCO", + "State": "CA", + "Zip": "94107", + "Country": "US" + }, + { + "precision": "zip", + "Latitude": 37.371991, + "Longitude": -122.026020, + "Address": "", + "City": "SUNNYVALE", + "State": "CA", + "Zip": "94085", + "Country": "US" + } + ] ADDED modules/json/test-data/array.result Index: modules/json/test-data/array.result ================================================================== --- /dev/null +++ modules/json/test-data/array.result @@ -0,0 +1,1 @@ +{precision zip Latitude 37.7668 Longitude -122.3959 Address {} City {SAN FRANCISCO} State CA Zip 94107 Country US} {precision zip Latitude 37.371991 Longitude -122.026020 Address {} City SUNNYVALE State CA Zip 94085 Country US} ADDED modules/json/test-data/array.sort Index: modules/json/test-data/array.sort ================================================================== --- /dev/null +++ modules/json/test-data/array.sort @@ -0,0 +1,1 @@ +list dict ADDED modules/json/test-data/glossary.json Index: modules/json/test-data/glossary.json ================================================================== --- /dev/null +++ modules/json/test-data/glossary.json @@ -0,0 +1,15 @@ +{ + "glossary": { + "title": "example glossary", + "mixlist": ["a \"\" str", -0.09, null, "", {"member":true}], + "GlossDiv": { + "title": "S", + "GlossList": [{ + "ID": "SGML", + "GlossTerm": "Standard \\\" Language", + "Acronym": "SGML\\", + "Abbrev": "ISO 8879:1986", + "GlossDef": + "A meta-markup language, used ...", + "GlossSeeAlso": ["GML", "XML", "markup"]}]}} +} ADDED modules/json/test-data/glossary.result Index: modules/json/test-data/glossary.result ================================================================== --- /dev/null +++ modules/json/test-data/glossary.result @@ -0,0 +1,1 @@ +glossary {title {example glossary} mixlist {{a "" str} -0.09 null {} {member true}} GlossDiv {title S GlossList {{ID SGML GlossTerm {Standard \" Language} Acronym SGML\\ Abbrev {ISO 8879:1986} GlossDef {A meta-markup language, used ...} GlossSeeAlso {GML XML markup}}}}} ADDED modules/json/test-data/glossary.sort Index: modules/json/test-data/glossary.sort ================================================================== --- /dev/null +++ modules/json/test-data/glossary.sort @@ -0,0 +1,1 @@ +dict * {dict GlossDiv {dict GlossList {list dict}}} ADDED modules/json/test-data/menu.json Index: modules/json/test-data/menu.json ================================================================== --- /dev/null +++ modules/json/test-data/menu.json @@ -0,0 +1,12 @@ +{"menu": { + "id": "file", + "value": "File:", + "unival": "\u6021:", + "popup": { + "menuitem": [ + {"value": "Open", "onclick": "OpenDoc()"}, + {"value": "Close", "onclick": "CloseDoc()"} + ] + } +} +} ADDED modules/json/test-data/menu.result Index: modules/json/test-data/menu.result ================================================================== --- /dev/null +++ modules/json/test-data/menu.result @@ -0,0 +1,1 @@ +menu {id file value File: unival @@@: popup {menuitem {{value Open onclick OpenDoc()} {value Close onclick CloseDoc()}}}} ADDED modules/json/test-data/menu.sort Index: modules/json/test-data/menu.sort ================================================================== --- /dev/null +++ modules/json/test-data/menu.sort @@ -0,0 +1,1 @@ +dict * {dict popup {dict * {list dict}}} ADDED modules/json/test-data/menu2.json Index: modules/json/test-data/menu2.json ================================================================== --- /dev/null +++ modules/json/test-data/menu2.json @@ -0,0 +1,14 @@ +{"menu": { + "header": "Viewer", + "items": [ + {"id": "Open"}, + {"id": "OpenNew", "label": "Open New"}, + null, + {"id": "ZoomIn", "label": "Zoom In"}, + {"id": "ZoomOut", "label": "Zoom Out"}, + null, + {"id": "Help"}, + {"id": "About", "label": "About Viewer..."} + ] +} +} ADDED modules/json/test-data/menu2.result Index: modules/json/test-data/menu2.result ================================================================== --- /dev/null +++ modules/json/test-data/menu2.result @@ -0,0 +1,1 @@ +menu {header Viewer items {{id Open} {id OpenNew label {Open New}} null {id ZoomIn label {Zoom In}} {id ZoomOut label {Zoom Out}} null {id Help} {id About label {About Viewer...}}}} ADDED modules/json/test-data/menu2.sort Index: modules/json/test-data/menu2.sort ================================================================== --- /dev/null +++ modules/json/test-data/menu2.sort @@ -0,0 +1,1 @@ +dict * {dict items {list 0 dict 1 dict 3 dict 4 dict 6 dict 7 dict}} ADDED modules/json/test-data/widget.json Index: modules/json/test-data/widget.json ================================================================== --- /dev/null +++ modules/json/test-data/widget.json @@ -0,0 +1,19 @@ +{"widget": { + "debug": "on", + "window": { + "title":"Sample Widget", + "name": "main_window", + "width": 500, + "height": 500}, + "text": { + "data": "Click Here", + "size": 36, + "style": "bold", + "name": null, + "hOffset":250, + "vOffset": 100, + "alignment": "center", + "onMouseUp": "sun1.opacity = (sun1.opacity / 100) * 90;" + } +} +} ADDED modules/json/test-data/widget.result Index: modules/json/test-data/widget.result ================================================================== --- /dev/null +++ modules/json/test-data/widget.result @@ -0,0 +1,1 @@ +widget {debug on window {title {Sample Widget} name main_window width 500 height 500} text {data {Click Here} size 36 style bold name null hOffset 250 vOffset 100 alignment center onMouseUp {sun1.opacity = (sun1.opacity / 100) * 90;}}} ADDED modules/json/test-data/widget.sort Index: modules/json/test-data/widget.sort ================================================================== --- /dev/null +++ modules/json/test-data/widget.sort @@ -0,0 +1,1 @@ +dict * {dict text dict window dict} ADDED modules/json/test_support.tcl Index: modules/json/test_support.tcl ================================================================== --- /dev/null +++ modules/json/test_support.tcl @@ -0,0 +1,132 @@ + +#use fileutil/fileutil.tcl fileutil + +catch {unset JSON} +catch {unset TCL} +catch {unset DICTSORT} + +proc dictsort3 {spec data} { + while [llength $spec] { + set type [lindex $spec 0] + set spec [lrange $spec 1 end] + + switch -- $type { + dict { + lappend spec * string + + set json {} + foreach {key} [lsort [dict keys $data]] { + set val [dict get $data $key] + foreach {keymatch valtype} $spec { + if {[string match $keymatch $key]} { + lappend json $key [dictsort3 $valtype $val] + break + } + } + } + return $json + } + list { + lappend spec * string + set json {} + set idx 0 + foreach {val} $data { + foreach {keymatch valtype} $spec { + if {$idx == $keymatch || $keymatch eq "*"} { + lappend json [dictsort3 $valtype $val] + break + } + } + incr idx + } + return $json + } + string { + return $data + } + default { + error "Invalid type" + } + } + } +} + +foreach f [TestFilesGlob test-data/*.json] { + set name [file rootname [file tail $f]] + set JSON($name) [tcltest::viewFile $f] +} + +foreach f [TestFilesGlob test-data/*.result] { + set name [file rootname [file tail $f]] + set TCL($name) [tcltest::viewFile $f] +} + +foreach f [TestFilesGlob test-data/*.sort] { + set name [file rootname [file tail $f]] + set DICTSORT($name) [tcltest::viewFile $f] +} + +# Postprocessing result of one test case, insert proper expected unicodepoint +set TCL(menu) [string map [list @@@ \u6021] $TCL(menu)] + +set JSON(emptyList) {[]} +set TCL(emptyList) {} + +set JSON(emptyList2) {{"menu": []}} +set TCL(emptyList2) {menu {}} + +set JSON(emptyList3) {["menu", []]} +set TCL(emptyList3) {menu {}} + +set JSON(emptyList4) {[[]]} +set TCL(emptyList4) {{}} + +set JSON(escapes) {"\t\r\n\f\b\/\\\""} +set TCL(escapes) "\t\r\n\f\b/\\\"" + + + +foreach f [TestFilesGlob test-data/*.fail] { + set name [file rootname [file tail $f]] + set FAIL($name) [tcltest::viewFile $f] +} + +foreach f [TestFilesGlob test-data/*.err] { + set name [file rootname [file tail $f]] + set ERR($name) [tcltest::viewFile $f] +} + +## Tcl has strict escape checking. +## C uses Tcl_UtfBacklash, and allows lots of irregular escapes. +# +# set FAIL(escape1) {"\%"} +# set ERR(escape1-tcl) {unexpected token "END" at position 0; expecting VALUE} +# set ERR(escape1-critcl) {syntax error 0 bytes before end, around ``%''} +# +# set FAIL(escape2) {"\."} +# set ERR(escape2-tcl) {unexpected token "END" at position 0; expecting VALUE} +# set ERR(escape2-critcl) {syntax error 0 bytes before end, around ``.''} + + + +proc resultfor {name} { + global TCL + transform $TCL($name) $name +} + +proc transform {res name} { + global DICTSORT + if {[info exists DICTSORT($name)]} { + return [dictsort3 $DICTSORT($name) $res] + } else { + return $res + } +} + +proc transform* {res args} { + set t {} + foreach r $res n $args { + lappend t [transform $r $n] + } + return $t +} DELETED modules/json/tests/array.json Index: modules/json/tests/array.json ================================================================== --- modules/json/tests/array.json +++ /dev/null @@ -1,22 +0,0 @@ -[ - { - "precision": "zip", - "Latitude": 37.7668, - "Longitude": -122.3959, - "Address": "", - "City": "SAN FRANCISCO", - "State": "CA", - "Zip": "94107", - "Country": "US" - }, - { - "precision": "zip", - "Latitude": 37.371991, - "Longitude": -122.026020, - "Address": "", - "City": "SUNNYVALE", - "State": "CA", - "Zip": "94085", - "Country": "US" - } - ] DELETED modules/json/tests/array.result Index: modules/json/tests/array.result ================================================================== --- modules/json/tests/array.result +++ /dev/null @@ -1,1 +0,0 @@ -{precision zip Latitude 37.7668 Longitude -122.3959 Address {} City {SAN FRANCISCO} State CA Zip 94107 Country US} {precision zip Latitude 37.371991 Longitude -122.026020 Address {} City SUNNYVALE State CA Zip 94085 Country US} DELETED modules/json/tests/array.sort Index: modules/json/tests/array.sort ================================================================== --- modules/json/tests/array.sort +++ /dev/null @@ -1,1 +0,0 @@ -list dict DELETED modules/json/tests/glossary.json Index: modules/json/tests/glossary.json ================================================================== --- modules/json/tests/glossary.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "glossary": { - "title": "example glossary", - "mixlist": ["a \"\" str", -0.09, null, "", {"member":true}], - "GlossDiv": { - "title": "S", - "GlossList": [{ - "ID": "SGML", - "GlossTerm": "Standard \\\" Language", - "Acronym": "SGML\\", - "Abbrev": "ISO 8879:1986", - "GlossDef": - "A meta-markup language, used ...", - "GlossSeeAlso": ["GML", "XML", "markup"]}]}} -} DELETED modules/json/tests/glossary.result Index: modules/json/tests/glossary.result ================================================================== --- modules/json/tests/glossary.result +++ /dev/null @@ -1,1 +0,0 @@ -glossary {title {example glossary} mixlist {{a "" str} -0.09 null {} {member true}} GlossDiv {title S GlossList {{ID SGML GlossTerm {Standard \" Language} Acronym SGML\\ Abbrev {ISO 8879:1986} GlossDef {A meta-markup language, used ...} GlossSeeAlso {GML XML markup}}}}} DELETED modules/json/tests/glossary.sort Index: modules/json/tests/glossary.sort ================================================================== --- modules/json/tests/glossary.sort +++ /dev/null @@ -1,1 +0,0 @@ -dict * {dict GlossDiv {dict GlossList {list dict}}} DELETED modules/json/tests/menu.json Index: modules/json/tests/menu.json ================================================================== --- modules/json/tests/menu.json +++ /dev/null @@ -1,12 +0,0 @@ -{"menu": { - "id": "file", - "value": "File:", - "unival": "\u6021:", - "popup": { - "menuitem": [ - {"value": "Open", "onclick": "OpenDoc()"}, - {"value": "Close", "onclick": "CloseDoc()"} - ] - } -} -} DELETED modules/json/tests/menu.result Index: modules/json/tests/menu.result ================================================================== --- modules/json/tests/menu.result +++ /dev/null @@ -1,1 +0,0 @@ -menu {id file value File: unival @@@: popup {menuitem {{value Open onclick OpenDoc()} {value Close onclick CloseDoc()}}}} DELETED modules/json/tests/menu.sort Index: modules/json/tests/menu.sort ================================================================== --- modules/json/tests/menu.sort +++ /dev/null @@ -1,1 +0,0 @@ -dict * {dict popup {dict * {list dict}}} DELETED modules/json/tests/menu2.json Index: modules/json/tests/menu2.json ================================================================== --- modules/json/tests/menu2.json +++ /dev/null @@ -1,14 +0,0 @@ -{"menu": { - "header": "Viewer", - "items": [ - {"id": "Open"}, - {"id": "OpenNew", "label": "Open New"}, - null, - {"id": "ZoomIn", "label": "Zoom In"}, - {"id": "ZoomOut", "label": "Zoom Out"}, - null, - {"id": "Help"}, - {"id": "About", "label": "About Viewer..."} - ] -} -} DELETED modules/json/tests/menu2.result Index: modules/json/tests/menu2.result ================================================================== --- modules/json/tests/menu2.result +++ /dev/null @@ -1,1 +0,0 @@ -menu {header Viewer items {{id Open} {id OpenNew label {Open New}} null {id ZoomIn label {Zoom In}} {id ZoomOut label {Zoom Out}} null {id Help} {id About label {About Viewer...}}}} DELETED modules/json/tests/menu2.sort Index: modules/json/tests/menu2.sort ================================================================== --- modules/json/tests/menu2.sort +++ /dev/null @@ -1,1 +0,0 @@ -dict * {dict items {list 0 dict 1 dict 3 dict 4 dict 6 dict 7 dict}} DELETED modules/json/tests/support.tcl Index: modules/json/tests/support.tcl ================================================================== --- modules/json/tests/support.tcl +++ /dev/null @@ -1,132 +0,0 @@ - -#use fileutil/fileutil.tcl fileutil - -catch {unset JSON} -catch {unset TCL} -catch {unset DICTSORT} - -proc dictsort3 {spec data} { - while [llength $spec] { - set type [lindex $spec 0] - set spec [lrange $spec 1 end] - - switch -- $type { - dict { - lappend spec * string - - set json {} - foreach {key} [lsort [dict keys $data]] { - set val [dict get $data $key] - foreach {keymatch valtype} $spec { - if {[string match $keymatch $key]} { - lappend json $key [dictsort3 $valtype $val] - break - } - } - } - return $json - } - list { - lappend spec * string - set json {} - set idx 0 - foreach {val} $data { - foreach {keymatch valtype} $spec { - if {$idx == $keymatch || $keymatch eq "*"} { - lappend json [dictsort3 $valtype $val] - break - } - } - incr idx - } - return $json - } - string { - return $data - } - default { - error "Invalid type" - } - } - } -} - -foreach f [TestFilesGlob tests/*.json] { - set name [file rootname [file tail $f]] - set JSON($name) [tcltest::viewFile $f] -} - -foreach f [TestFilesGlob tests/*.result] { - set name [file rootname [file tail $f]] - set TCL($name) [tcltest::viewFile $f] -} - -foreach f [TestFilesGlob tests/*.sort] { - set name [file rootname [file tail $f]] - set DICTSORT($name) [tcltest::viewFile $f] -} - -# Postprocessing result of one test case, insert proper expected unicodepoint -set TCL(menu) [string map [list @@@ \u6021] $TCL(menu)] - -set JSON(emptyList) {[]} -set TCL(emptyList) {} - -set JSON(emptyList2) {{"menu": []}} -set TCL(emptyList2) {menu {}} - -set JSON(emptyList3) {["menu", []]} -set TCL(emptyList3) {menu {}} - -set JSON(emptyList4) {[[]]} -set TCL(emptyList4) {{}} - -set JSON(escapes) {"\t\r\n\f\b\/\\\""} -set TCL(escapes) "\t\r\n\f\b/\\\"" - - - -foreach f [TestFilesGlob tests/*.fail] { - set name [file rootname [file tail $f]] - set FAIL($name) [tcltest::viewFile $f] -} - -foreach f [TestFilesGlob tests/*.err] { - set name [file rootname [file tail $f]] - set ERR($name) [tcltest::viewFile $f] -} - -## Tcl has strict escape checking. -## C uses Tcl_UtfBacklash, and allows lots of irregular escapes. -# -# set FAIL(escape1) {"\%"} -# set ERR(escape1-tcl) {unexpected token "END" at position 0; expecting VALUE} -# set ERR(escape1-critcl) {syntax error 0 bytes before end, around ``%''} -# -# set FAIL(escape2) {"\."} -# set ERR(escape2-tcl) {unexpected token "END" at position 0; expecting VALUE} -# set ERR(escape2-critcl) {syntax error 0 bytes before end, around ``.''} - - - -proc resultfor {name} { - global TCL - transform $TCL($name) $name -} - -proc transform {res name} { - global DICTSORT - if {[info exists DICTSORT($name)]} { - return [dictsort3 $DICTSORT($name) $res] - } else { - return $res - } -} - -proc transform* {res args} { - set t {} - foreach r $res n $args { - lappend t [transform $r $n] - } - return $t -} DELETED modules/json/tests/widget.json Index: modules/json/tests/widget.json ================================================================== --- modules/json/tests/widget.json +++ /dev/null @@ -1,19 +0,0 @@ -{"widget": { - "debug": "on", - "window": { - "title":"Sample Widget", - "name": "main_window", - "width": 500, - "height": 500}, - "text": { - "data": "Click Here", - "size": 36, - "style": "bold", - "name": null, - "hOffset":250, - "vOffset": 100, - "alignment": "center", - "onMouseUp": "sun1.opacity = (sun1.opacity / 100) * 90;" - } -} -} DELETED modules/json/tests/widget.result Index: modules/json/tests/widget.result ================================================================== --- modules/json/tests/widget.result +++ /dev/null @@ -1,1 +0,0 @@ -widget {debug on window {title {Sample Widget} name main_window width 500 height 500} text {data {Click Here} size 36 style bold name null hOffset 250 vOffset 100 alignment center onMouseUp {sun1.opacity = (sun1.opacity / 100) * 90;}}} DELETED modules/json/tests/widget.sort Index: modules/json/tests/widget.sort ================================================================== --- modules/json/tests/widget.sort +++ /dev/null @@ -1,1 +0,0 @@ -dict * {dict text dict window dict} Index: modules/math/geometry.tcl ================================================================== --- modules/math/geometry.tcl +++ modules/math/geometry.tcl @@ -1260,6 +1260,6 @@ + - s* direction v h p between distance length \ nwse rect octant findLineSegmentIntersection \ findLineIntersection bbox x y conjx conjy } -package provide math::geometry 1.1.3 +package provide math::geometry 1.1.2 Index: modules/pt/include/format/cparam.inc ================================================================== --- modules/pt/include/format/cparam.inc +++ modules/pt/include/format/cparam.inc @@ -7,10 +7,11 @@ The bulk of such a framework has to be specified through the option [option -template]. The additional options [list_begin options] [opt_def -fun-qualifier string] +[opt_def -indent integer] [opt_def -main string] [opt_def -namespace string] [opt_def -prelude string] [opt_def -self-command string] [opt_def -state-decl string] @@ -19,20 +20,9 @@ [list_end] provide code snippets which help to glue framework and generated code together. Their placeholders are in the [emph generated] code. -Further the options - -[list_begin options] -[opt_def -indent integer] -[opt_def -comments boolean] -[list_end] - -allow for the customization of the code indent (default none), and -whether to generate comments showing the parsing expressions a -function is for (default on). - [subsection Example] We are forgoing an example of this representation, with apologies. It would be way to large for this document. Index: modules/pt/include/format/options_cparam_rawc.inc ================================================================== --- modules/pt/include/format/options_cparam_rawc.inc +++ modules/pt/include/format/options_cparam_rawc.inc @@ -129,14 +129,6 @@ The number of characters to indent each line of the generated code by. The default value is [const 0]. - -[opt_def -comments boolean] - -A flag controlling the generation of code comments containing the -original parsing expression a parsing function is for. - -The default value is [const on]. - [list_end] Index: modules/pt/pkgIndex.tcl ================================================================== --- modules/pt/pkgIndex.tcl +++ modules/pt/pkgIndex.tcl @@ -34,11 +34,11 @@ 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]] -package ifneeded pt::peg::to::cparam 1.1.1 [list source [file join $dir pt_peg_to_cparam.tcl]] +package ifneeded pt::peg::to::cparam 1.0.1 [list source [file join $dir pt_peg_to_cparam.tcl]] package ifneeded pt::peg::to::json 1 [list source [file join $dir pt_peg_to_json.tcl]] package ifneeded pt::peg::to::param 1 [list source [file join $dir pt_peg_to_param.tcl]] package ifneeded pt::peg::to::peg 1.0.1 [list source [file join $dir pt_peg_to_peg.tcl]] package ifneeded pt::peg::to::tclparam 1 [list source [file join $dir pt_peg_to_tclparam.tcl]] Index: modules/pt/pt_cparam_config_critcl.tcl ================================================================== --- modules/pt/pt_cparam_config_critcl.tcl +++ modules/pt/pt_cparam_config_critcl.tcl @@ -92,11 +92,11 @@ namespace eval ::@@CHEAD@@ { # # ## ### ##### ######## ############# ##################### ## Supporting code for the main command. catch { - #critcl::cflags -g + #critcl::cheaders -g #critcl::debug memory symbols } # # ## ### ###### ######## ############# ## RDE runtime, inlined, and made static. @@ -245,17 +245,10 @@ lv [1] = Tcl_NewIntObj (1 + lsv [lsc-1]); lv [2] = Tcl_NewIntObj (rde_param_query_cl (p)); Tcl_SetObjResult (interp, Tcl_NewListObj (3, lv)); ckfree ((char*) lv); - - } else if (ac == 0) { - /* - * Match, but no AST. This is possible if the grammar - * consists of only the start expression. - */ - Tcl_SetObjResult (interp, Tcl_NewStringObj ("",-1)); } else { Tcl_SetObjResult (interp, av [0]); } return TCL_OK; Index: modules/pt/pt_parse_peg_c.tcl ================================================================== --- modules/pt/pt_parse_peg_c.tcl +++ modules/pt/pt_parse_peg_c.tcl @@ -382,11 +382,11 @@ long int off = tc->num; char* ch; int clen; Tcl_UniChar uni; if (len < 0) { - len = strlen (string); + len = strlen (ch); } if ((tc->num + len) >= tc->max) { int new = len + (tc->max ? (2 * tc->max) : RDE_STACK_INITIAL_SIZE); char* str = ckrealloc (tc->str, new * sizeof(char)); Index: modules/pt/pt_peg_to_cparam.man ================================================================== --- modules/pt/pt_peg_to_cparam.man +++ modules/pt/pt_peg_to_cparam.man @@ -1,7 +1,7 @@ [comment {--- doctools ---}] [vset PACKAGE cparam] [vset NAME CPARAM] [vset REQUIRE cparam] [vset CONFIG cparam] -[vset VERSION 1.1.1] +[vset VERSION 1.0.1] [include include/export/to.inc] Index: modules/pt/pt_peg_to_cparam.tcl ================================================================== --- modules/pt/pt_peg_to_cparam.tcl +++ modules/pt/pt_peg_to_cparam.tcl @@ -48,11 +48,10 @@ variable self {} ; # -self-command variable ns {} ; # -namespace variable def static ; # -fun-qualifier variable main __main ; # -main variable indent 0 ; # -indent - variable comments 1 ; # -comments variable prelude {} ; # -prelude variable statedecl {RDE_PARAM p} ; # -state-decl variable stateref {p} ; # -state-ref variable strings p_string ; # -string-varname return @@ -67,19 +66,17 @@ variable ns variable def variable main variable omap variable indent - variable comments variable prelude variable statedecl variable stateref variable strings if {[llength $args] == 0} { return [list \ - -comments $comments \ -file $file \ -fun-qualifier $def \ -indent $indent \ -main $main \ -name $name \ @@ -95,17 +92,17 @@ lassign $args option set variable [string range $option 1 end] if {[info exists omap($variable)]} { return [set $omap($variable)] } else { - return -code error "Expected one of -comments, -file, -fun-qualifier, -indent, -main, -name, -namespace, -self-command, -state-decl, -state-ref, -string-varname, -template, or -user, got \"$option\"" + return -code error "Expected one of -file, -fun-qualifier, -indent, -main, -name, -namespace, -self-command, -state-decl, -state-ref, -string-varname, -template, or -user, got \"$option\"" } } elseif {[llength $args] % 2 == 0} { foreach {option value} $args { set variable [string range $option 1 end] if {![info exists omap($variable)]} { - return -code error "Expected one of -comments, -file, -fun-qualifier, -indent, -main, -name, -namespace, -self-command, -state-decl, -state-ref, -string-varname, -template, or -user, got \"$option\"" + return -code error "Expected one of -file, -fun-qualifier, -indent, -main, -name, -namespace, -self-command, -state-decl, -state-ref, -string-varname, -template, or -user, got \"$option\"" } } foreach {option value} $args { set variable $omap([string range $option 1 end]) switch -exact -- $variable { @@ -117,15 +114,10 @@ indent { if {![string is integer -strict $value] || ($value < 0)} { return -code error "Expected int > 0, got \"$value\"" } } - comments { - if {![string is boolean -strict $value]} { - return -code error "Expected boolean, got \"$value\"" - } - } statedecl - stateref - strings - self - def - @@ -1310,11 +1302,10 @@ text::write undef FUN_HEADER } FunStart $name - # Comment at function start. text::write recall PE ; # Generated in Asm::ReExpression, printed text::write undef PE ; # representation of the expression, to # make the generated code more readable. uplevel 1 $def CStmt return @@ -1482,41 +1473,20 @@ #text::write /line return } proc ::pt::peg::to::cparam::Op::Asm::PE {pe} { - variable ::pt::peg::to::cparam::comments - - text::write clear - if {$comments} { - text::write field " /*" - text::write /line - - # Ticket [da61329276]: Detect C comment opener and closer, and - # disarm them. This can occur with char classes, and char - # sequences, i.e. strings. We recode them into - # backslash-escaped unicode code-points. - - # Note: Putting this into the 'pe print' method is not - # possible, as the output can be used in other contexts (Tcl, - # whatever), each with their own special strings to be aware - # of. This is something each generator has to handle, knowing - # their special sequences. - - lappend map "*/" "\\u002a\\u002f" - lappend map "/*" "\\u002f\\u002a" - - foreach l [split [pt::pe print $pe] \n] { - text::write field " * [string map $map $l]" - text::write /line - } - text::write field " */" - text::write /line - text::write /line - } - # Keeping the definition of PE, albeit empty avoids having to - # special case the places using this block. + text::write clear + text::write field " /*" + text::write /line + foreach l [split [pt::pe print $pe] \n] { + text::write field " * $l" + text::write /line + } + text::write field " */" + text::write /line + text::write /line text::write store PE return } proc ::pt::peg::to::cparam::Op::Asm::String {s} { @@ -1557,14 +1527,11 @@ array set cache {} set cache(_str,counter) -1 set cache(_strings) {} } - # Map from option name (without leading dash) to the name of the - # variable used to store setting. variable omap ; array set omap { - comments comments file file fun-qualifier def indent indent main main name name @@ -1576,11 +1543,10 @@ string-varname strings template template user user } - variable comments 1 variable self {} variable ns {} variable def static variable main __main variable indent 0 @@ -1603,7 +1569,7 @@ } # ### ### ### ######### ######### ######### ## Ready -package provide pt::peg::to::cparam 1.1.1 +package provide pt::peg::to::cparam 1.0.1 return DELETED modules/pt/pt_pgen.test Index: modules/pt/pt_pgen.test ================================================================== --- modules/pt/pt_pgen.test +++ /dev/null @@ -1,101 +0,0 @@ -# -*- tcl -*- -# pt_pgen.test: Testing the parser generator, and the generated parsers. -# Mainly for testing generated parsers for good and bad inputs. -# -# Copyright (c) 2014 by Andreas Kupries -# All rights reserved. -# -# RCS: @(#) $Id: pt_parse_peg.test,v 1.1 2010/03/26 05:07:24 andreas_kupries Exp $ - -# ------------------------------------------------------------------------- - -source [file join \ - [file dirname [file dirname [file join [pwd] [info script]]]] \ - devtools testutilities.tcl] - -testsNeedTcl 8.5 -testsNeedTcltest 2 - -support { - useAccel [useTcllibC] struct/stack.tcl struct::stack ; # User: pt::rde - TestAccelInit struct::stack ; # (tcl) - - use snit/snit.tcl snit - use fileutil/fileutil.tcl fileutil ;# tests/common - use textutil/adjust.tcl textutil::adjust - - useLocal pt_astree.tcl pt::ast - useLocal pt_pexpression.tcl pt::pe - useLocal pt_pegrammar.tcl pt::peg - useLocal pt_peg_container.tcl pt::peg::container - - useAccel [useTcllibC] pt/pt_rdengine.tcl pt::rde ; # User: pt::parse::peg - TestAccelInit pt::rde ; # and: pt:peg::interp - - useLocal pt_rdengine_oo.tcl pt::rde::oo - useLocal pt_peg_interp.tcl pt::peg::interp - - useAccel [useTcllibC] pt/pt_parse_peg.tcl pt::parse::peg ; # User: pt::peg::from::peg - TestAccelInit pt::parse::peg - - useLocal pt_peg_from_json.tcl pt::peg::from::json ; # Frontends: json, and PEG text form - useLocal pt_peg_from_peg.tcl pt::peg::from::peg ; # - useLocal pt_peg_to_container.tcl pt::peg::to::container ; # Backends: json, peg, container code, - useLocal pt_peg_to_json.tcl pt::peg::to::json ; # param assembler, - useLocal pt_peg_to_peg.tcl pt::peg::to::peg ; # - useLocal pt_peg_to_param.tcl pt::peg::to::param ; # PARAM assembly, raw - useLocal pt_peg_to_tclparam.tcl pt::peg::to::tclparam ; # PARAM assembly, embedded into Tcl - useLocal pt_peg_to_cparam.tcl pt::peg::to::cparam ; # PARAM assembly, embedded into C - useLocal pt_tclparam_config_snit.tcl pt::tclparam::configuration::snit ; # PARAM/Tcl, snit::type - useLocal pt_tclparam_config_tcloo.tcl pt::tclparam::configuration::tcloo ; # PARAM/Tcl, TclOO class - useLocal pt_cparam_config_critcl.tcl pt::cparam::configuration::critcl ; # PARAM/C, in critcl - - # Get the parser used by the converter, either the grammar - # interpreter, or snit-based and spcialized to PEG. - #useLocal pt_peg_container_peg.tcl pt::peg::container::peg - #useLocal pt_peg_interp.tcl pt::peg::interp - - source [localPath tests/common] -} -testing { - useLocal pt_pgen.tcl pt::pgen ;# Generator -} - -set mytestdir tests/data - -# ------------------------------------------------------------------------- -# Note: When using pt::rde's C implementation struct::stack is not -# used, and its implementation of no relevance. -# -# Similarly, when pt::parse::peg's C implementation is used -# neither pt::rde's, nor struct::stack's implementations are of -# relevance. - -TestAccelDo pt::parse::peg parseimpl { - if {$parseimpl eq "critcl"} { - set rdeimpl n/a - set stackimpl n/a - pt::rde::SwitchTo {} - struct::stack::SwitchTo {} - source [localPath tests/pt_pgen.tests] - } else { - TestAccelDo pt::rde rdeimpl { - if {$rdeimpl eq "critcl"} { - set stackimpl n/a - struct::stack::SwitchTo {} - source [localPath tests/pt_pgen.tests] - } else { - TestAccelDo struct::stack stackimpl { - source [localPath tests/pt_pgen.tests] - } - } - } - } -} - -# ------------------------------------------------------------------------- -TestAccelExit pt::parse::peg -TestAccelExit pt::rde -TestAccelExit struct::stack -testsuiteCleanup -return Index: modules/pt/pt_rdengine_c.tcl ================================================================== --- modules/pt/pt_rdengine_c.tcl +++ modules/pt/pt_rdengine_c.tcl @@ -16,11 +16,11 @@ ## Requisites package require Tcl 8.4 package require critcl # @sak notprovided pt_rde_critcl -package provide pt_rde_critcl 1.3.2 +package provide pt_rde_critcl 1.3.1 # # ## ### ##### ######## ############# ##################### ## Implementation namespace eval ::pt { Index: modules/pt/pt_rdengine_oo.tcl ================================================================== --- modules/pt/pt_rdengine_oo.tcl +++ modules/pt/pt_rdengine_oo.tcl @@ -1,8 +1,8 @@ # -*- tcl -*- # -# Copyright (c) 2009-2014 by Andreas Kupries +# Copyright (c) 2009 by Andreas Kupries # # ## ### ##### ######## ############# ##################### ## Package description ## Implementation of the PackRat Machine (PARAM), a virtual machine on @@ -70,20 +70,16 @@ if {$n > 1} { set pos [$mystackloc peek] incr pos set children [lreverse [$mystackast peek [$mystackast size]]] ; # SaveToMark return [pt::ast new {} $pos $myloc {*}$children] ; # Reduce ALL - } elseif {$n == 0} { - # Match, but no AST. This is possible if the grammar - # consists of only the start expression. - return {} } else { return [$mystackast peek] } } else { lassign $myerror loc messages - return -code error [list pt::rde $loc $messages] + return -code error [list pt::rde $loc [$self position $loc] $messages] } } # # ## ### ##### ######## ############# ##################### ## API - State accessors @@ -361,11 +357,11 @@ if {$myok} { $mystackloc pop return -code return } set myloc [$mystackloc peek] - $mystackerr push $myerror + $mystackerr push {} return } method si:voidvalue_branch {} { # i_error_pop_merge @@ -1117,19 +1113,18 @@ } set k [list $at $symbol] set mysymbol($k) [list $myloc $myok $myerror $mysvalue] - # si:reduce_symbol_end / i_error_nonterminal -- inlined -- disabled - if {0} {if {[llength $myerror]} { + if {[llength $myerror]} { set pos $at incr pos lassign $myerror loc messages if {$loc == $pos} { set myerror [list $loc [list [list n $symbol]]] } - }} + } $mystackast trim* [$mystackmark pop] if {$myok} { $mystackast push $mysvalue } @@ -1161,19 +1156,18 @@ } set k [list $at $symbol] set mysymbol($k) [list $myloc $myok $myerror $mysvalue] - # si:void_leaf_symbol_end / i_error_nonterminal -- inlined -- disabled - if {0} {if {[llength $myerror]} { + if {[llength $myerror]} { set pos $at incr pos lassign $myerror loc messages if {$loc == $pos} { set myerror [list $loc [list [list n $symbol]]] } - }} + } if {$myok} { $mystackast push $mysvalue } return @@ -1205,19 +1199,18 @@ } set k [list $at $symbol] set mysymbol($k) [list $myloc $myok $myerror $mysvalue] - # si:value_leaf_symbol_end / i_error_nonterminal -- inlined -- disabled - if {0} {if {[llength $myerror]} { + if {[llength $myerror]} { set pos $at incr pos lassign $myerror loc messages if {$loc == $pos} { set myerror [list $loc [list [list n $symbol]]] } - }} + } $mystackast trim* [$mystackmark pop] if {$myok} { $mystackast push $mysvalue } @@ -1235,19 +1228,18 @@ set at [$mystackloc pop] set k [list $at $symbol] set mysymbol($k) [list $myloc $myok $myerror $mysvalue] - # si:value_clear_symbol_end / i_error_nonterminal -- inlined -- disabled - if {0} {if {[llength $myerror]} { + if {[llength $myerror]} { set pos $at incr pos lassign $myerror loc messages if {$loc == $pos} { set myerror [list $loc [list [list n $symbol]]] } - }} + } $mystackast trim* [$mystackmark pop] return } @@ -1261,19 +1253,18 @@ set at [$mystackloc pop] set k [list $at $symbol] set mysymbol($k) [list $myloc $myok $myerror $mysvalue] - # si:void_clear_symbol_end / i_error_nonterminal -- inlined -- disabled - if {0} {if {[llength $myerror]} { + if {[llength $myerror]} { set pos $at incr pos lassign $myerror loc messages if {$loc == $pos} { set myerror [list $loc [list [list n $symbol]]] } - }} + } return } # # ## ### ##### ######## ############# ##################### ## API - Instructions - Control flow @@ -1357,17 +1348,10 @@ set myerror [list $loe [lsort -uniq [list {*}$msgse {*}$msgsn]]] return } method i_error_nonterminal {symbol} { - # i_error_nonterminal -- Disabled. Generate only low-level - # i_error_nonterminal -- errors until we have worked out how - # i_error_nonterminal -- to integrate symbol information with - # i_error_nonterminal -- them. Do not forget where this - # i_error_nonterminal -- instruction is inlined. - return - # Inlined: Errors, Expected. if {![llength $myerror]} return set pos [$mystackloc peek] incr pos lassign $myerror loc messages Index: modules/pt/pt_rdengine_tcl.tcl ================================================================== --- modules/pt/pt_rdengine_tcl.tcl +++ modules/pt/pt_rdengine_tcl.tcl @@ -1,8 +1,8 @@ # -*- tcl -*- # -# Copyright (c) 2009-2014 by Andreas Kupries +# Copyright (c) 2009 by Andreas Kupries # # ## ### ##### ######## ############# ##################### ## Package description ## Implementation of the PackRat Machine (PARAM), a virtual machine on @@ -37,14 +37,12 @@ set mystackmark [struct::stack ${selfns}::MARK] ; # s.a. return } #TRACE variable count 0 - #variable count 0 - method reset {{chan {}}} { ; #set count 0 - ; #TRACE puts "[format %8d [incr count]] RDE reset" + method reset {{chan {}}} { ; #TRACE puts "[format %8d [incr count]] RDE reset" set mychan $chan ; # IN set mycurrent {} ; # CC set myloc -1 ; # CL set myok 0 ; # ST set msvalue {} ; # SV @@ -65,14 +63,10 @@ if {$n > 1} { set pos [$mystackloc peek] incr pos set children [$mystackast peekr [$mystackast size]] ; # SaveToMark return [pt::ast new {} $pos $myloc {*}$children] ; # Reduce ALL - } elseif {$n == 0} { - # Match, but no AST. This is possible if the grammar - # consists of only the start expression. - return {} } else { return [$mystackast peek] } } else { lassign $myerror loc messages @@ -131,28 +125,28 @@ } # # ## ### ##### ######## ############# ##################### ## Common instruction sequences - method si:void_state_push {} { ; #TRACE puts "[format %8d [incr count]] RDE si:void_state_push" + method si:void_state_push {} { # i_loc_push # i_error_clear_push $mystackloc push $myloc set myerror {} $mystackerr push {} return } - method si:void2_state_push {} { ; #TRACE puts "[format %8d [incr count]] RDE si:void2_state_push" + method si:void2_state_push {} { # i_loc_push # i_error_push $mystackloc push $myloc $mystackerr push {} return } - method si:value_state_push {} { ; #TRACE puts "[format %8d [incr count]] RDE si:value_state_push" + method si:value_state_push {} { # i_ast_push # i_loc_push # i_error_clear_push $mystackmark push [$mystackast size] $mystackloc push $myloc @@ -161,11 +155,11 @@ return } # - -- --- ----- -------- ------------- --------------------- - method si:void_state_merge {} { ; #TRACE puts "[format %8d [incr count]] RDE si:void_state_merge" + method si:void_state_merge {} { # i_error_pop_merge # i_loc_pop_rewind/discard set olderror [$mystackerr pop] # We have either old or new error data, keep it. @@ -190,11 +184,11 @@ if {$myok} return set myloc $last return } - method si:void_state_merge_ok {} { ; #TRACE puts "[format %8d [incr count]] RDE si:void_state_merge_ok" + method si:void_state_merge_ok {} { # i_error_pop_merge # i_loc_pop_rewind/discard # i_status_ok set olderror [$mystackerr pop] @@ -221,11 +215,11 @@ set myloc $last set myok 1 return } - method si:value_state_merge {} { ; #TRACE puts "[format %8d [incr count]] RDE si:value_state_merge" + method si:value_state_merge {} { # i_error_pop_merge # i_ast_pop_rewind/discard # i_loc_pop_rewind/discard set olderror [$mystackerr pop] @@ -255,29 +249,29 @@ return } # - -- --- ----- -------- ------------- --------------------- - method si:value_notahead_start {} { ; #TRACE puts "[format %8d [incr count]] RDE si:value_notahead_start" + method si:value_notahead_start {} { # i_loc_push # i_ast_push $mystackloc push $myloc $mystackmark push [$mystackast size] return } - method si:void_notahead_exit {} { ; #TRACE puts "[format %8d [incr count]] RDE si:void_notahead_exit" + method si:void_notahead_exit {} { # i_loc_pop_rewind # i_status_negate set myloc [$mystackloc pop] set myok [expr {!$myok}] return } - method si:value_notahead_exit {} { ; #TRACE puts "[format %8d [incr count]] RDE si:value_notahead_exit" + method si:value_notahead_exit {} { # i_ast_pop_discard/rewind # i_loc_pop_rewind # i_status_negate set mark [$mystackmark pop] @@ -289,21 +283,21 @@ return } # - -- --- ----- -------- ------------- --------------------- - method si:kleene_abort {} { ; #TRACE puts "[format %8d [incr count]] RDE si:kleene_abort" + method si:kleene_abort {} { # i_loc_pop_rewind/discard # i:fail_return set last [$mystackloc pop] if {$myok} return set myloc $last return -code return } - method si:kleene_close {} { ; #TRACE puts "[format %8d [incr count]] RDE si:kleene_close" + method si:kleene_close {} { # i_error_pop_merge # i_loc_pop_rewind/discard # i:fail_status_ok # i:fail_return @@ -333,11 +327,11 @@ return -code return } # - -- --- ----- -------- ------------- --------------------- - method si:voidvoid_branch {} { ; #TRACE puts "[format %8d [incr count]] RDE si:voidvoid_branch" + method si:voidvoid_branch {} { # i_error_pop_merge # i:ok_loc_pop_discard # i:ok_return # i_loc_rewind # i_error_push @@ -364,15 +358,15 @@ if {$myok} { $mystackloc pop return -code return } set myloc [$mystackloc peek] - $mystackerr push $myerror + $mystackerr push {} return } - method si:voidvalue_branch {} { ; #TRACE puts "[format %8d [incr count]] RDE si:voidvalue_branch" + method si:voidvalue_branch {} { # i_error_pop_merge # i:ok_loc_pop_discard # i:ok_return # i_ast_push # i_loc_rewind @@ -405,11 +399,11 @@ set myloc [$mystackloc peek] $mystackerr push {} return } - method si:valuevoid_branch {} { ; #TRACE puts "[format %8d [incr count]] RDE si:valuevoid_branch" + method si:valuevoid_branch {} { # i_error_pop_merge # i_ast_pop_rewind/discard # i:ok_loc_pop_discard # i:ok_return # i_loc_rewind @@ -442,11 +436,11 @@ set myloc [$mystackloc peek] $mystackerr push {} return } - method si:valuevalue_branch {} { ; #TRACE puts "[format %8d [incr count]] RDE si:valuevalue_branch" + method si:valuevalue_branch {} { # i_error_pop_merge # i_ast_pop_discard # i:ok_loc_pop_discard # i:ok_return # i_ast_rewind @@ -482,11 +476,11 @@ return } # - -- --- ----- -------- ------------- --------------------- - method si:voidvoid_part {} { ; #TRACE puts "[format %8d [incr count]] RDE si:voidvoid_part" + method si:voidvoid_part {} { # i_error_pop_merge # i:fail_loc_pop_rewind # i:fail_return # i_error_push @@ -514,11 +508,11 @@ } $mystackerr push $myerror return } - method si:voidvalue_part {} { ; #TRACE puts "[format %8d [incr count]] RDE si:voidvalue_part" + method si:voidvalue_part {} { # i_error_pop_merge # i:fail_loc_pop_rewind # i:fail_return # i_ast_push # i_error_push @@ -548,11 +542,11 @@ $mystackmark push [$mystackast size] $mystackerr push $myerror return } - method si:valuevalue_part {} { ; #TRACE puts "[format %8d [incr count]] RDE si:valuevalue_part" + method si:valuevalue_part {} { # i_error_pop_merge # i:fail_ast_pop_rewind # i:fail_loc_pop_rewind # i:fail_return # i_error_push @@ -584,11 +578,11 @@ return } # - -- --- ----- -------- ------------- --------------------- - method si:next_str {tok} { ; #TRACE puts "[format %8d [incr count]] RDE si:next_str ($tok)" + method si:next_str {tok} { # String = sequence of characters. No need for all the intermediate # stack churn. set n [string length $tok] set last [expr {$myloc + $n}] @@ -602,18 +596,10 @@ return } set lex [string range $mytoken $myloc $last] set mycurrent [string index $mytoken $last] - # ATTENTION: The error output of this instruction is different - # from a regular sequence of si:next_char instructions. The - # error location will be the start of the string token we - # wanted to match, and the message will contain the entire - # string token. In the regular sequence we would see the exact - # point of the mismatch instead, with the message containing - # the expected character. - set myok [expr {$tok eq $lex}] if {$myok} { set myloc $last set myerror {} @@ -622,11 +608,11 @@ incr myloc -1 } return } - method si:next_class {tok} { ; #TRACE puts "[format %8d [incr count]] RDE si:next_class ($tok)" + method si:next_class {tok} { # Class = Choice of characters. No need for stack churn. # i_input_next "\{t $c\}" # i:fail_return # i_test_ @@ -652,11 +638,11 @@ incr myloc -1 } return } - method si:next_char {tok} { ; #TRACE puts "[format %8d [incr count]] RDE si:next_char ($tok)" + method si:next_char {tok} { # i_input_next "\{t $c\}" # i:fail_return # i_test_char $c incr myloc @@ -676,11 +662,11 @@ incr myloc -1 } return } - method si:next_range {toks toke} { ; #TRACE puts "[format %8d [incr count]] RDE si:next_range ($toks $toke)" + method si:next_range {toks toke} { #Asm::Ins i_input_next "\{.. $s $e\}" #Asm::Ins i:fail_return #Asm::Ins i_test_range $s $e incr myloc @@ -1019,11 +1005,11 @@ return } # - -- --- ----- -------- ------------- --------------------- - method si:value_symbol_start {symbol} { ; #TRACE puts "[format %8d [incr count]] RDE si:value_symbol_start ($symbol)" + method si:value_symbol_start {symbol} { # if @runtime@ i_symbol_restore $symbol # i:found:ok_ast_value_push # i:found_return # i_loc_push # i_ast_push @@ -1039,11 +1025,11 @@ $mystackloc push $myloc $mystackmark push [$mystackast size] return } - method si:value_void_symbol_start {symbol} { ; #TRACE puts "[format %8d [incr count]] RDE si:value_void_symbol_start ($symbol)" + method si:value_void_symbol_start {symbol} { # if @runtime@ i_symbol_restore $symbol # i:found_return # i_loc_push # i_ast_push @@ -1055,11 +1041,11 @@ $mystackloc push $myloc $mystackmark push [$mystackast size] return } - method si:void_symbol_start {symbol} { ; #TRACE puts "[format %8d [incr count]] RDE si:void_symbol_start ($symbol)" + method si:void_symbol_start {symbol} { # if @runtime@ i_symbol_restore $symbol # i:found:ok_ast_value_push # i:found_return # i_loc_push @@ -1073,11 +1059,11 @@ } $mystackloc push $myloc return } - method si:void_void_symbol_start {symbol} { ; #TRACE puts "[format %8d [incr count]] RDE si:void_void_symbol_start ($symbol)" + method si:void_void_symbol_start {symbol} { # if @runtime@ i_symbol_restore $symbol # i:found_return # i_loc_push set k [list $myloc $symbol] @@ -1087,11 +1073,11 @@ } $mystackloc push $myloc return } - method si:reduce_symbol_end {symbol} { ; #TRACE puts "[format %8d [incr count]] RDE si:reduce_symbol_end ($symbol)" + method si:reduce_symbol_end {symbol} { # i_value_clear/reduce $symbol # i_symbol_save $symbol # i_error_nonterminal $symbol # i_ast_pop_rewind # i_loc_pop_discard @@ -1128,28 +1114,27 @@ } set k [list $at $symbol] set mysymbol($k) [list $myloc $myok $myerror $mysvalue] - # si:reduce_symbol_end / i_error_nonterminal -- inlined -- disabled - if {0} {if {[llength $myerror]} { + if {[llength $myerror]} { set pos $at incr pos lassign $myerror loc messages if {$loc == $pos} { set myerror [list $loc [list [list n $symbol]]] } - }} + } $mystackast trim* [$mystackmark pop] if {$myok} { $mystackast push $mysvalue } return } - method si:void_leaf_symbol_end {symbol} { ; #TRACE puts "[format %8d [incr count]] RDE si:void_leaf_symbol_end ($symbol)" + method si:void_leaf_symbol_end {symbol} { # i_value_clear/leaf $symbol # i_symbol_save $symbol # i_error_nonterminal $symbol # i_loc_pop_discard # i:ok_ast_value_push @@ -1172,27 +1157,26 @@ } set k [list $at $symbol] set mysymbol($k) [list $myloc $myok $myerror $mysvalue] - # si:void_leaf_symbol_end / i_error_nonterminal -- inlined -- disabled - if {0} {if {[llength $myerror]} { + if {[llength $myerror]} { set pos $at incr pos lassign $myerror loc messages if {$loc == $pos} { set myerror [list $loc [list [list n $symbol]]] } - }} + } if {$myok} { $mystackast push $mysvalue } return } - method si:value_leaf_symbol_end {symbol} { ; #TRACE puts "[format %8d [incr count]] RDE si:value_leaf_symbol_end ($symbol)" + method si:value_leaf_symbol_end {symbol} { # i_value_clear/leaf $symbol # i_symbol_save $symbol # i_error_nonterminal $symbol # i_loc_pop_discard # i_ast_pop_rewind @@ -1216,28 +1200,27 @@ } set k [list $at $symbol] set mysymbol($k) [list $myloc $myok $myerror $mysvalue] - # si:value_leaf_symbol_end / i_error_nonterminal -- inlined -- disabled - if {0} {if {[llength $myerror]} { + if {[llength $myerror]} { set pos $at incr pos lassign $myerror loc messages if {$loc == $pos} { set myerror [list $loc [list [list n $symbol]]] } - }} + } $mystackast trim* [$mystackmark pop] if {$myok} { $mystackast push $mysvalue } return } - method si:value_clear_symbol_end {symbol} { ; #TRACE puts "[format %8d [incr count]] RDE si:value_clear_symbol_end ($symbol)" + method si:value_clear_symbol_end {symbol} { # i_value_clear # i_symbol_save $symbol # i_error_nonterminal $symbol # i_loc_pop_discard # i_ast_pop_rewind @@ -1246,25 +1229,24 @@ set at [$mystackloc pop] set k [list $at $symbol] set mysymbol($k) [list $myloc $myok $myerror $mysvalue] - # si:value_clear_symbol_end / i_error_nonterminal -- inlined -- disabled - if {0} {if {[llength $myerror]} { + if {[llength $myerror]} { set pos $at incr pos lassign $myerror loc messages if {$loc == $pos} { set myerror [list $loc [list [list n $symbol]]] } - }} + } $mystackast trim* [$mystackmark pop] return } - method si:void_clear_symbol_end {symbol} { ; #TRACE puts "[format %8d [incr count]] RDE si:void_clear_symbol_end ($symbol)" + method si:void_clear_symbol_end {symbol} { # i_value_clear # i_symbol_save $symbol # i_error_nonterminal $symbol # i_loc_pop_discard @@ -1272,19 +1254,18 @@ set at [$mystackloc pop] set k [list $at $symbol] set mysymbol($k) [list $myloc $myok $myerror $mysvalue] - # si:void_clear_symbol_end / i_error_nonterminal -- inlined -- disabled - if {0} {if {[llength $myerror]} { + if {[llength $myerror]} { set pos $at incr pos lassign $myerror loc messages if {$loc == $pos} { set myerror [list $loc [list [list n $symbol]]] } - }} + } return } # # ## ### ##### ######## ############# ##################### ## API - Instructions - Control flow @@ -1333,22 +1314,22 @@ method i_error_clear {} { ; #TRACE puts "[format %8d [incr count]] RDE i_error_clear" set myerror {} return } - method i_error_push {} { ; #TRACE puts "[format %8d [incr count]] RDE i_error_push ($myerror)" + method i_error_push {} { ; #TRACE puts "[format %8d [incr count]] RDE i_error_push" $mystackerr push $myerror return } - method i_error_clear_push {} { ; #TRACE puts "[format %8d [incr count]] RDE i_error_clear_push ()" + method i_error_clear_push {} { ; #TRACE puts "[format %8d [incr count]] RDE i_error_clear_push" set myerror {} $mystackerr push {} return } - method i_error_pop_merge {} { ; #TRACE puts "[format %8d [incr count]] RDE i_error_pop_merge ($myerror)-/-([$mystackerr peek])" + method i_error_pop_merge {} { ; #TRACE puts "[format %8d [incr count]] RDE i_error_pop_merge" set olderror [$mystackerr pop] # We have either old or new error data, keep it. if {![llength $myerror]} { set myerror $olderror ; return } @@ -1366,32 +1347,18 @@ # Equal locations, merge the message lists, set-like. set myerror [list $loe [lsort -uniq [list {*}$msgse {*}$msgsn]]] return } - method i_error_nonterminal {symbol} { ; #TRACE puts "[format %8d [incr count]] RDE i_error_nonterminal ($symbol)" - # i_error_nonterminal -- Disabled. Generate only low-level - # i_error_nonterminal -- errors until we have worked out how - # i_error_nonterminal -- to integrate symbol information with - # i_error_nonterminal -- them. Do not forget where this - # i_error_nonterminal -- instruction is inlined. - return - + method i_error_nonterminal {symbol} { ; #TRACE puts "[format %8d [incr count]] RDE i_error_nonterminal" # Inlined: Errors, Expected. - if {![llength $myerror]} { - #TRACE puts "[format %8d $count] RDE i_error_nonterminal ($symbol) no error" - return - } + if {![llength $myerror]} return set pos [$mystackloc peek] incr pos lassign $myerror loc messages - if {$loc != $pos} { - #TRACE puts "[format %8d $count] RDE i_error_nonterminal ($symbol) -- $myerror != $pos" - return - } + if {$loc != $pos} return set myerror [list $loc [list [list n $symbol]]] - TRACE puts "[format %8d $count] RDE i_error_nonterminal ($symbol) := $myerror" return } # # ## ### ##### ######## ############# ##################### ## API - Instructions - Basic input handling and tracking @@ -1532,11 +1499,11 @@ method i_value_clear {} { ; #TRACE puts "[format %8d [incr count]] RDE i_value_clear" set mysvalue {} return } - method i_value_clear/leaf {symbol} { ; #TRACE puts "[format %8d [incr count]] RDE i_value_clear/leaf ($symbol ok $myok ([expr {[$mystackloc peek]+1}])-@$myloc)" + method i_value_clear/leaf {symbol} { ; #TRACE puts "[format %8d [incr count]] RDE i_value_clear/leaf (ok $myok ([expr {[$mystackloc peek]+1}])-@$myloc)" # not quite value_lead (guarded, and clear on fail) # Inlined clear, reduce, and optimized. # Clear ; if {$ok} {Reduce $symbol} set mysvalue {} if {!$myok} return @@ -1553,11 +1520,11 @@ set mysvalue [pt::ast new $symbol $pos $myloc] } return } - method i_value_clear/reduce {symbol} { ; #TRACE puts "[format %8d [incr count]] RDE i_value_clear/reduce ($symbol)" + method i_value_clear/reduce {symbol} { ; #TRACE puts "[format %8d [incr count]] RDE i_value_clear/reduce" set mysvalue {} if {!$myok} return set mark [$mystackmark peek];# Old size of stack before current nt pushed more. set newa [expr {[$mystackast size] - $mark}] @@ -1588,11 +1555,11 @@ } # # ## ### ##### ######## ############# ##################### ## API - Instructions - Terminal matching - method i_input_next {msg} { ; #TRACE puts "[format %8d [incr count]] RDE i_input_next ($msg)" + method i_input_next {msg} { ; #TRACE puts "[format %8d [incr count]] RDE i_input_next" # Inlined: Getch, Expected, ClearErrors # Satisfy from input cache if possible. incr myloc # May read from the input (ExtendTC), and remember the @@ -1619,11 +1586,11 @@ incr myloc -1 } return } - method i_test_range {toks toke} { ; #TRACE puts "[format %8d [incr count]] RDE i_test_range ($toks $toke)" + method i_test_range {toks toke} { ; #TRACE puts "[format %8d [incr count]] RDE i_test_range" set myok [expr { ([string compare $toks $mycurrent] <= 0) && ([string compare $mycurrent $toke] <= 0) }] ; # {} if {$myok} { Index: modules/pt/rde_critcl/param.c ================================================================== --- modules/pt/rde_critcl/param.c +++ modules/pt/rde_critcl/param.c @@ -541,18 +541,10 @@ } SCOPE void rde_param_i_error_nonterminal (RDE_PARAM p, int s) { - /* - * Disabled. Generate only low-level errors until we have worked out how - * to integrate symbol information with them. Do not forget where this - * instruction is inlined - No such exist, places using the instruction - * directly call on this function. - */ - return; - long int pos; if (!p->ER) return; pos = 1 + (long int) rde_stack_top (p->LS); if (p->ER->loc != pos) return; error_set (p, s); Index: modules/pt/rde_critcl/tc.c ================================================================== --- modules/pt/rde_critcl/tc.c +++ modules/pt/rde_critcl/tc.c @@ -68,11 +68,11 @@ char* ch; int clen; Tcl_UniChar uni; if (len < 0) { - len = strlen (string); + len = strlen (ch); } /* * Extend character buffer to hold the new string, and copy the string in. */ Index: modules/pt/tests/common ================================================================== --- modules/pt/tests/common +++ modules/pt/tests/common @@ -1,9 +1,9 @@ # -*- tcl -*- # Code common to the various control files. # -# Copyright (c) 2009-2014 by Andreas Kupries +# Copyright (c) 2009 by Andreas Kupries # All rights reserved. # # RCS: @(#) $Id: common,v 1.1 2010/03/26 05:07:24 andreas_kupries Exp $ # ------------------------------------------------------------------------- @@ -10,18 +10,17 @@ # Similar to TestFiles in devtools/testutilities.tcl, but not # identical. Here we do not expect source'able test suites, but data # files, organized in sections under a main directory. -proc TestFilesProcess {maindir section inset outset -> nv lv iv dv ev script {optionalok 0}} { +proc TestFilesProcess {maindir section inset outset -> nv lv iv dv ev script} { upvar 1 $nv n $lv label $dv data $ev expected $iv inputfile set pattern $maindir/$section/$inset/* set files [TestFilesGlob $pattern] if {![llength $files]} { - if {$optionalok} return return -code error "No files matching \"$pattern\"" } foreach src $files { if {[string match *README* $src]} continue if {[file isdirectory $src]} continue @@ -35,39 +34,10 @@ @line @line \ {@ %d} {@ %d} \ {@ %p} {@ %p} \ @ $::tcltest::testsDirectory] $expected] - regexp -- {^([0-9]+)} $srcname -> n - regsub -all -- {^[0-9]+} $srcname {} label - - scan $n %d n - set label [string trim [string map {_ { }} $label]] - set inputfile $src - - uplevel 1 $script - } - return -} - - -proc TestFilesProcessIn {maindir section inset -> nv lv iv dv script} { - upvar 1 $nv n $lv label $dv data $iv inputfile - - set pattern $maindir/$section/$inset/* - - set files [TestFilesGlob $pattern] - if {![llength $files]} { - return -code error "No files matching \"$pattern\"" - } - foreach src $files { - if {[string match *README* $src]} continue - if {[file isdirectory $src]} continue - - set srcname [file tail $src] - set data [fileutil::cat -translation binary -encoding utf-8 $src] - regexp -- {^([0-9]+)} $srcname -> n regsub -all -- {^[0-9]+} $srcname {} label scan $n %d n set label [string trim [string map {_ { }} $label]] @@ -269,113 +239,7 @@ match_node $ta $ca $tb $cb } return } -# ------------------------------------------------------------------------- -## Dynamically create a parser for a PE grammar stored in a string. -## Different types: -## - critcl -- Run through critcl tool for compilation at test time. -## - oo -## - container -- interpreter loaded from a container -## - snit - -proc make-parser {format glabel grammar} { - global pcounter - if {![info exist pcounter]} { set pcounter 0 } - - set debug 1 - - # should be preloaded by test suite. - if {[catch { - package present pt::pgen - }]} { - error "pt::pgen package required and not loaded. Please fix your testsuite." - } - - # Options per format. - # container : -name - # critcl : -class -name - # oo : -class -name - # snit : -class -name - - lappend cmd pt::pgen peg $grammar $format -name G - if {$format ne "container"} { - lappend cmd -class [set gc GC[incr pcounter]] - } - - set code [eval $cmd] - - # debugging generator output - if {$debug} { - puts "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% $format ($glabel)" - puts $code - puts "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% $format ($glabel)" - } - - # Now do format-specific post-processing of the generated code to - # get a proper parser object. - - switch -exact -- $format { - container { - # should be preloaded by test suite. - if {[catch { - package present pt::peg::interp - }]} { - error "pt::peg::interp package required and not loaded. Please fix your testsuite." - } - - # Instantiate container class (transient). - eval $code - # Instantiate container (transient). - set c [G %AUTO%] - - # Instantiate PEG interpreter, and configure with grammar in container. - set p [pt::peg::interp %AUTO%] - $p use $c - - # Clean up the transient pieces (container class and instance). - $c destroy - G destroy - } - snit { - # Instantiate the parser class. - # ATTENTION: We chop the last 2 lines of the code first, - # unwanted "package provide" and "return" commands. - eval [join [lrange [split $code \n] 0 end-2] \n] - - # Instantiate a parser based on the class. - set p [$gc %AUTO%] - # Note: Cannot destroy class now, would destroy instance as well. - } - oo { - # Instantiate the parser class. - # ATTENTION: We chop the last 2 lines of the code first, - # unwanted "package provide" and "return" commands. - eval [join [lrange [split $code \n] 0 end-2] \n] - - # Instantiate a parser based on the class. - set p [$gc new] - # Note: Cannot destroy class now, would destroy instance as well. - } - critcl { - # TODO: - # - Save to file, - # - Run through critcl - # - Load generated shlib - # - Instantiate parser - error NYI-critcl - } - } - - # Provide parser instance. - if {$debug} { - puts "P = ($p)" - puts "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% $format ($glabel)" - puts %% - puts %%% - } - return $p -} - # ------------------------------------------------------------------------- return DELETED modules/pt/tests/data/gr/def/0_sequence Index: modules/pt/tests/data/gr/def/0_sequence ================================================================== --- modules/pt/tests/data/gr/def/0_sequence +++ /dev/null @@ -1,2 +0,0 @@ -PEG a_pe_grammar ('a' 'b' 'c') -END; DELETED modules/pt/tests/data/gr/def/1_sym-sequence Index: modules/pt/tests/data/gr/def/1_sym-sequence ================================================================== --- modules/pt/tests/data/gr/def/1_sym-sequence +++ /dev/null @@ -1,3 +0,0 @@ -PEG a_pe_grammar (N) - N <- 'a' 'b' 'c'; -END; DELETED modules/pt/tests/data/gr/def/2_choice Index: modules/pt/tests/data/gr/def/2_choice ================================================================== --- modules/pt/tests/data/gr/def/2_choice +++ /dev/null @@ -1,2 +0,0 @@ -PEG a_pe_grammar ('alpha' / 'anumeric' / 'digit') -END; DELETED modules/pt/tests/data/gr/fail-choice-container-res/0_aleph Index: modules/pt/tests/data/gr/fail-choice-container-res/0_aleph ================================================================== --- modules/pt/tests/data/gr/fail-choice-container-res/0_aleph +++ /dev/null @@ -1,1 +0,0 @@ -1 {pt::rde 2 {{t p}}} DELETED modules/pt/tests/data/gr/fail-choice-container-res/1_anumber Index: modules/pt/tests/data/gr/fail-choice-container-res/1_anumber ================================================================== --- modules/pt/tests/data/gr/fail-choice-container-res/1_anumber +++ /dev/null @@ -1,1 +0,0 @@ -1 {pt::rde 4 {{t e}}} DELETED modules/pt/tests/data/gr/fail-choice-container-res/2_digup Index: modules/pt/tests/data/gr/fail-choice-container-res/2_digup ================================================================== --- modules/pt/tests/data/gr/fail-choice-container-res/2_digup +++ /dev/null @@ -1,1 +0,0 @@ -1 {pt::rde 3 {{t i}}} DELETED modules/pt/tests/data/gr/fail-choice-container-res/3_other Index: modules/pt/tests/data/gr/fail-choice-container-res/3_other ================================================================== --- modules/pt/tests/data/gr/fail-choice-container-res/3_other +++ /dev/null @@ -1,1 +0,0 @@ -1 {pt::rde 0 {{t a} {t d}}} DELETED modules/pt/tests/data/gr/fail-choice-oo-res/0_aleph Index: modules/pt/tests/data/gr/fail-choice-oo-res/0_aleph ================================================================== --- modules/pt/tests/data/gr/fail-choice-oo-res/0_aleph +++ /dev/null @@ -1,1 +0,0 @@ -1 {pt::rde 0 {{t alpha} {t anumeric} {t digit}}} DELETED modules/pt/tests/data/gr/fail-choice-oo-res/1_anumber Index: modules/pt/tests/data/gr/fail-choice-oo-res/1_anumber ================================================================== --- modules/pt/tests/data/gr/fail-choice-oo-res/1_anumber +++ /dev/null @@ -1,1 +0,0 @@ -1 {pt::rde 0 {{t alpha} {t anumeric} {t digit}}} DELETED modules/pt/tests/data/gr/fail-choice-oo-res/2_digup Index: modules/pt/tests/data/gr/fail-choice-oo-res/2_digup ================================================================== --- modules/pt/tests/data/gr/fail-choice-oo-res/2_digup +++ /dev/null @@ -1,1 +0,0 @@ -1 {pt::rde 0 {{t alpha} {t anumeric} {t digit}}} DELETED modules/pt/tests/data/gr/fail-choice-oo-res/3_other Index: modules/pt/tests/data/gr/fail-choice-oo-res/3_other ================================================================== --- modules/pt/tests/data/gr/fail-choice-oo-res/3_other +++ /dev/null @@ -1,1 +0,0 @@ -1 {pt::rde 0 {{t alpha} {t anumeric} {t digit}}} DELETED modules/pt/tests/data/gr/fail-choice-snit-res/0_aleph Index: modules/pt/tests/data/gr/fail-choice-snit-res/0_aleph ================================================================== --- modules/pt/tests/data/gr/fail-choice-snit-res/0_aleph +++ /dev/null @@ -1,1 +0,0 @@ -1 {pt::rde 0 {{t alpha} {t anumeric} {t digit}}} DELETED modules/pt/tests/data/gr/fail-choice-snit-res/1_anumber Index: modules/pt/tests/data/gr/fail-choice-snit-res/1_anumber ================================================================== --- modules/pt/tests/data/gr/fail-choice-snit-res/1_anumber +++ /dev/null @@ -1,1 +0,0 @@ -1 {pt::rde 0 {{t alpha} {t anumeric} {t digit}}} DELETED modules/pt/tests/data/gr/fail-choice-snit-res/2_digup Index: modules/pt/tests/data/gr/fail-choice-snit-res/2_digup ================================================================== --- modules/pt/tests/data/gr/fail-choice-snit-res/2_digup +++ /dev/null @@ -1,1 +0,0 @@ -1 {pt::rde 0 {{t alpha} {t anumeric} {t digit}}} DELETED modules/pt/tests/data/gr/fail-choice-snit-res/3_other Index: modules/pt/tests/data/gr/fail-choice-snit-res/3_other ================================================================== --- modules/pt/tests/data/gr/fail-choice-snit-res/3_other +++ /dev/null @@ -1,1 +0,0 @@ -1 {pt::rde 0 {{t alpha} {t anumeric} {t digit}}} DELETED modules/pt/tests/data/gr/fail-choice/0_aleph Index: modules/pt/tests/data/gr/fail-choice/0_aleph ================================================================== --- modules/pt/tests/data/gr/fail-choice/0_aleph +++ /dev/null @@ -1,1 +0,0 @@ -aleph DELETED modules/pt/tests/data/gr/fail-choice/1_anumber Index: modules/pt/tests/data/gr/fail-choice/1_anumber ================================================================== --- modules/pt/tests/data/gr/fail-choice/1_anumber +++ /dev/null @@ -1,1 +0,0 @@ -anumber DELETED modules/pt/tests/data/gr/fail-choice/2_digup Index: modules/pt/tests/data/gr/fail-choice/2_digup ================================================================== --- modules/pt/tests/data/gr/fail-choice/2_digup +++ /dev/null @@ -1,1 +0,0 @@ -digup DELETED modules/pt/tests/data/gr/fail-choice/3_other Index: modules/pt/tests/data/gr/fail-choice/3_other ================================================================== --- modules/pt/tests/data/gr/fail-choice/3_other +++ /dev/null @@ -1,1 +0,0 @@ -other DELETED modules/pt/tests/data/gr/fail-sequence-container-res/0_abe Index: modules/pt/tests/data/gr/fail-sequence-container-res/0_abe ================================================================== --- modules/pt/tests/data/gr/fail-sequence-container-res/0_abe +++ /dev/null @@ -1,1 +0,0 @@ -1 {pt::rde 2 {{t c}}} DELETED modules/pt/tests/data/gr/fail-sequence-container-res/1_b Index: modules/pt/tests/data/gr/fail-sequence-container-res/1_b ================================================================== --- modules/pt/tests/data/gr/fail-sequence-container-res/1_b +++ /dev/null @@ -1,1 +0,0 @@ -1 {pt::rde 0 {{t a}}} DELETED modules/pt/tests/data/gr/fail-sequence-oo-res/0_abe Index: modules/pt/tests/data/gr/fail-sequence-oo-res/0_abe ================================================================== --- modules/pt/tests/data/gr/fail-sequence-oo-res/0_abe +++ /dev/null @@ -1,1 +0,0 @@ -1 {pt::rde 0 {{t abc}}} DELETED modules/pt/tests/data/gr/fail-sequence-oo-res/1_b Index: modules/pt/tests/data/gr/fail-sequence-oo-res/1_b ================================================================== --- modules/pt/tests/data/gr/fail-sequence-oo-res/1_b +++ /dev/null @@ -1,1 +0,0 @@ -1 {pt::rde 0 {{t abc}}} DELETED modules/pt/tests/data/gr/fail-sequence-snit-res/0_abe Index: modules/pt/tests/data/gr/fail-sequence-snit-res/0_abe ================================================================== --- modules/pt/tests/data/gr/fail-sequence-snit-res/0_abe +++ /dev/null @@ -1,1 +0,0 @@ -1 {pt::rde 0 {{t abc}}} DELETED modules/pt/tests/data/gr/fail-sequence-snit-res/1_b Index: modules/pt/tests/data/gr/fail-sequence-snit-res/1_b ================================================================== --- modules/pt/tests/data/gr/fail-sequence-snit-res/1_b +++ /dev/null @@ -1,1 +0,0 @@ -1 {pt::rde 0 {{t abc}}} DELETED modules/pt/tests/data/gr/fail-sequence/0_abe Index: modules/pt/tests/data/gr/fail-sequence/0_abe ================================================================== --- modules/pt/tests/data/gr/fail-sequence/0_abe +++ /dev/null @@ -1,1 +0,0 @@ -abe DELETED modules/pt/tests/data/gr/fail-sequence/1_b Index: modules/pt/tests/data/gr/fail-sequence/1_b ================================================================== --- modules/pt/tests/data/gr/fail-sequence/1_b +++ /dev/null @@ -1,1 +0,0 @@ -b DELETED modules/pt/tests/data/gr/fail-sym-sequence-container-res/0_abe Index: modules/pt/tests/data/gr/fail-sym-sequence-container-res/0_abe ================================================================== --- modules/pt/tests/data/gr/fail-sym-sequence-container-res/0_abe +++ /dev/null @@ -1,1 +0,0 @@ -1 {pt::rde 2 {{t c}}} DELETED modules/pt/tests/data/gr/fail-sym-sequence-container-res/1_b Index: modules/pt/tests/data/gr/fail-sym-sequence-container-res/1_b ================================================================== --- modules/pt/tests/data/gr/fail-sym-sequence-container-res/1_b +++ /dev/null @@ -1,1 +0,0 @@ -1 {pt::rde 0 {{t a}}} DELETED modules/pt/tests/data/gr/fail-sym-sequence-oo-res/0_abe Index: modules/pt/tests/data/gr/fail-sym-sequence-oo-res/0_abe ================================================================== --- modules/pt/tests/data/gr/fail-sym-sequence-oo-res/0_abe +++ /dev/null @@ -1,1 +0,0 @@ -1 {pt::rde 0 {{t abc}}} DELETED modules/pt/tests/data/gr/fail-sym-sequence-oo-res/1_b Index: modules/pt/tests/data/gr/fail-sym-sequence-oo-res/1_b ================================================================== --- modules/pt/tests/data/gr/fail-sym-sequence-oo-res/1_b +++ /dev/null @@ -1,1 +0,0 @@ -1 {pt::rde 0 {{t abc}}} DELETED modules/pt/tests/data/gr/fail-sym-sequence-snit-res/0_abe Index: modules/pt/tests/data/gr/fail-sym-sequence-snit-res/0_abe ================================================================== --- modules/pt/tests/data/gr/fail-sym-sequence-snit-res/0_abe +++ /dev/null @@ -1,1 +0,0 @@ -1 {pt::rde 0 {{t abc}}} DELETED modules/pt/tests/data/gr/fail-sym-sequence-snit-res/1_b Index: modules/pt/tests/data/gr/fail-sym-sequence-snit-res/1_b ================================================================== --- modules/pt/tests/data/gr/fail-sym-sequence-snit-res/1_b +++ /dev/null @@ -1,1 +0,0 @@ -1 {pt::rde 0 {{t abc}}} DELETED modules/pt/tests/data/gr/fail-sym-sequence/0_abe Index: modules/pt/tests/data/gr/fail-sym-sequence/0_abe ================================================================== --- modules/pt/tests/data/gr/fail-sym-sequence/0_abe +++ /dev/null @@ -1,1 +0,0 @@ -abe DELETED modules/pt/tests/data/gr/fail-sym-sequence/1_b Index: modules/pt/tests/data/gr/fail-sym-sequence/1_b ================================================================== --- modules/pt/tests/data/gr/fail-sym-sequence/1_b +++ /dev/null @@ -1,1 +0,0 @@ -b DELETED modules/pt/tests/data/gr/ok-choice-res/0_alpha Index: modules/pt/tests/data/gr/ok-choice-res/0_alpha ================================================================== --- modules/pt/tests/data/gr/ok-choice-res/0_alpha +++ /dev/null DELETED modules/pt/tests/data/gr/ok-choice-res/1_digit Index: modules/pt/tests/data/gr/ok-choice-res/1_digit ================================================================== --- modules/pt/tests/data/gr/ok-choice-res/1_digit +++ /dev/null DELETED modules/pt/tests/data/gr/ok-choice-res/2_anumeric Index: modules/pt/tests/data/gr/ok-choice-res/2_anumeric ================================================================== --- modules/pt/tests/data/gr/ok-choice-res/2_anumeric +++ /dev/null DELETED modules/pt/tests/data/gr/ok-choice/0_alpha Index: modules/pt/tests/data/gr/ok-choice/0_alpha ================================================================== --- modules/pt/tests/data/gr/ok-choice/0_alpha +++ /dev/null @@ -1,1 +0,0 @@ -alpha DELETED modules/pt/tests/data/gr/ok-choice/1_digit Index: modules/pt/tests/data/gr/ok-choice/1_digit ================================================================== --- modules/pt/tests/data/gr/ok-choice/1_digit +++ /dev/null @@ -1,1 +0,0 @@ -digit DELETED modules/pt/tests/data/gr/ok-choice/2_anumeric Index: modules/pt/tests/data/gr/ok-choice/2_anumeric ================================================================== --- modules/pt/tests/data/gr/ok-choice/2_anumeric +++ /dev/null @@ -1,1 +0,0 @@ -anumeric DELETED modules/pt/tests/data/gr/ok-sequence-res/0_abc Index: modules/pt/tests/data/gr/ok-sequence-res/0_abc ================================================================== --- modules/pt/tests/data/gr/ok-sequence-res/0_abc +++ /dev/null DELETED modules/pt/tests/data/gr/ok-sequence/0_abc Index: modules/pt/tests/data/gr/ok-sequence/0_abc ================================================================== --- modules/pt/tests/data/gr/ok-sequence/0_abc +++ /dev/null @@ -1,1 +0,0 @@ -abc DELETED modules/pt/tests/data/gr/ok-sym-sequence-res/0_abc Index: modules/pt/tests/data/gr/ok-sym-sequence-res/0_abc ================================================================== --- modules/pt/tests/data/gr/ok-sym-sequence-res/0_abc +++ /dev/null @@ -1,1 +0,0 @@ -N 0 2 DELETED modules/pt/tests/data/gr/ok-sym-sequence/0_abc Index: modules/pt/tests/data/gr/ok-sym-sequence/0_abc ================================================================== --- modules/pt/tests/data/gr/ok-sym-sequence/0_abc +++ /dev/null @@ -1,1 +0,0 @@ -abc Index: modules/pt/tests/data/ok/peg_cparam-critcl/0_basic_arithmetic ================================================================== --- modules/pt/tests/data/ok/peg_cparam-critcl/0_basic_arithmetic +++ modules/pt/tests/data/ok/peg_cparam-critcl/0_basic_arithmetic @@ -382,11 +382,11 @@ long int off = tc->num; char* ch; int clen; Tcl_UniChar uni; if (len < 0) { - len = strlen (string); + len = strlen (ch); } if ((tc->num + len) >= tc->max) { int new = len + (tc->max ? (2 * tc->max) : RDE_STACK_INITIAL_SIZE); char* str = ckrealloc (tc->str, new * sizeof(char)); @@ -1960,11 +1960,11 @@ * value Symbol 'MulOp' */ static void sym_MulOp (RDE_PARAM p) { /* - * [\u002a\u002f] + * [*/] */ if (rde_param_i_symbol_start (p, 14)) return ; rde_param_i_next_class (p, "*/", 12); rde_param_i_symbol_done_leaf (p, 14, 13); Index: modules/pt/tests/data/ok/peg_cparam-critcl/10_notahead ================================================================== --- modules/pt/tests/data/ok/peg_cparam-critcl/10_notahead +++ modules/pt/tests/data/ok/peg_cparam-critcl/10_notahead @@ -382,11 +382,11 @@ long int off = tc->num; char* ch; int clen; Tcl_UniChar uni; if (len < 0) { - len = strlen (string); + len = strlen (ch); } if ((tc->num + len) >= tc->max) { int new = len + (tc->max ? (2 * tc->max) : RDE_STACK_INITIAL_SIZE); char* str = ckrealloc (tc->str, new * sizeof(char)); Index: modules/pt/tests/data/ok/peg_cparam-critcl/11_epsilon ================================================================== --- modules/pt/tests/data/ok/peg_cparam-critcl/11_epsilon +++ modules/pt/tests/data/ok/peg_cparam-critcl/11_epsilon @@ -382,11 +382,11 @@ long int off = tc->num; char* ch; int clen; Tcl_UniChar uni; if (len < 0) { - len = strlen (string); + len = strlen (ch); } if ((tc->num + len) >= tc->max) { int new = len + (tc->max ? (2 * tc->max) : RDE_STACK_INITIAL_SIZE); char* str = ckrealloc (tc->str, new * sizeof(char)); Index: modules/pt/tests/data/ok/peg_cparam-critcl/1_functions ================================================================== --- modules/pt/tests/data/ok/peg_cparam-critcl/1_functions +++ modules/pt/tests/data/ok/peg_cparam-critcl/1_functions @@ -382,11 +382,11 @@ long int off = tc->num; char* ch; int clen; Tcl_UniChar uni; if (len < 0) { - len = strlen (string); + len = strlen (ch); } if ((tc->num + len) >= tc->max) { int new = len + (tc->max ? (2 * tc->max) : RDE_STACK_INITIAL_SIZE); char* str = ckrealloc (tc->str, new * sizeof(char)); Index: modules/pt/tests/data/ok/peg_cparam-critcl/2_fun_arithmetic ================================================================== --- modules/pt/tests/data/ok/peg_cparam-critcl/2_fun_arithmetic +++ modules/pt/tests/data/ok/peg_cparam-critcl/2_fun_arithmetic @@ -382,11 +382,11 @@ long int off = tc->num; char* ch; int clen; Tcl_UniChar uni; if (len < 0) { - len = strlen (string); + len = strlen (ch); } if ((tc->num + len) >= tc->max) { int new = len + (tc->max ? (2 * tc->max) : RDE_STACK_INITIAL_SIZE); char* str = ckrealloc (tc->str, new * sizeof(char)); @@ -1987,11 +1987,11 @@ * value Symbol 'MulOp' */ static void sym_MulOp (RDE_PARAM p) { /* - * [\u002a\u002f] + * [*/] */ if (rde_param_i_symbol_start (p, 16)) return ; rde_param_i_next_class (p, "*/", 14); rde_param_i_symbol_done_leaf (p, 16, 15); Index: modules/pt/tests/data/ok/peg_cparam-critcl/3_peg_itself ================================================================== --- modules/pt/tests/data/ok/peg_cparam-critcl/3_peg_itself +++ modules/pt/tests/data/ok/peg_cparam-critcl/3_peg_itself @@ -382,11 +382,11 @@ long int off = tc->num; char* ch; int clen; Tcl_UniChar uni; if (len < 0) { - len = strlen (string); + len = strlen (ch); } if ((tc->num + len) >= tc->max) { int new = len + (tc->max ? (2 * tc->max) : RDE_STACK_INITIAL_SIZE); char* str = ckrealloc (tc->str, new * sizeof(char)); Index: modules/pt/tests/data/ok/peg_cparam-critcl/4_choice ================================================================== --- modules/pt/tests/data/ok/peg_cparam-critcl/4_choice +++ modules/pt/tests/data/ok/peg_cparam-critcl/4_choice @@ -382,11 +382,11 @@ long int off = tc->num; char* ch; int clen; Tcl_UniChar uni; if (len < 0) { - len = strlen (string); + len = strlen (ch); } if ((tc->num + len) >= tc->max) { int new = len + (tc->max ? (2 * tc->max) : RDE_STACK_INITIAL_SIZE); char* str = ckrealloc (tc->str, new * sizeof(char)); Index: modules/pt/tests/data/ok/peg_cparam-critcl/5_sequence ================================================================== --- modules/pt/tests/data/ok/peg_cparam-critcl/5_sequence +++ modules/pt/tests/data/ok/peg_cparam-critcl/5_sequence @@ -382,11 +382,11 @@ long int off = tc->num; char* ch; int clen; Tcl_UniChar uni; if (len < 0) { - len = strlen (string); + len = strlen (ch); } if ((tc->num + len) >= tc->max) { int new = len + (tc->max ? (2 * tc->max) : RDE_STACK_INITIAL_SIZE); char* str = ckrealloc (tc->str, new * sizeof(char)); Index: modules/pt/tests/data/ok/peg_cparam-critcl/6_optional ================================================================== --- modules/pt/tests/data/ok/peg_cparam-critcl/6_optional +++ modules/pt/tests/data/ok/peg_cparam-critcl/6_optional @@ -382,11 +382,11 @@ long int off = tc->num; char* ch; int clen; Tcl_UniChar uni; if (len < 0) { - len = strlen (string); + len = strlen (ch); } if ((tc->num + len) >= tc->max) { int new = len + (tc->max ? (2 * tc->max) : RDE_STACK_INITIAL_SIZE); char* str = ckrealloc (tc->str, new * sizeof(char)); Index: modules/pt/tests/data/ok/peg_cparam-critcl/7_kleene ================================================================== --- modules/pt/tests/data/ok/peg_cparam-critcl/7_kleene +++ modules/pt/tests/data/ok/peg_cparam-critcl/7_kleene @@ -382,11 +382,11 @@ long int off = tc->num; char* ch; int clen; Tcl_UniChar uni; if (len < 0) { - len = strlen (string); + len = strlen (ch); } if ((tc->num + len) >= tc->max) { int new = len + (tc->max ? (2 * tc->max) : RDE_STACK_INITIAL_SIZE); char* str = ckrealloc (tc->str, new * sizeof(char)); Index: modules/pt/tests/data/ok/peg_cparam-critcl/8_pkleene ================================================================== --- modules/pt/tests/data/ok/peg_cparam-critcl/8_pkleene +++ modules/pt/tests/data/ok/peg_cparam-critcl/8_pkleene @@ -382,11 +382,11 @@ long int off = tc->num; char* ch; int clen; Tcl_UniChar uni; if (len < 0) { - len = strlen (string); + len = strlen (ch); } if ((tc->num + len) >= tc->max) { int new = len + (tc->max ? (2 * tc->max) : RDE_STACK_INITIAL_SIZE); char* str = ckrealloc (tc->str, new * sizeof(char)); Index: modules/pt/tests/data/ok/peg_cparam-critcl/9_ahead ================================================================== --- modules/pt/tests/data/ok/peg_cparam-critcl/9_ahead +++ modules/pt/tests/data/ok/peg_cparam-critcl/9_ahead @@ -382,11 +382,11 @@ long int off = tc->num; char* ch; int clen; Tcl_UniChar uni; if (len < 0) { - len = strlen (string); + len = strlen (ch); } if ((tc->num + len) >= tc->max) { int new = len + (tc->max ? (2 * tc->max) : RDE_STACK_INITIAL_SIZE); char* str = ckrealloc (tc->str, new * sizeof(char)); Index: modules/pt/tests/data/ok/peg_cparam/0_basic_arithmetic ================================================================== --- modules/pt/tests/data/ok/peg_cparam/0_basic_arithmetic +++ modules/pt/tests/data/ok/peg_cparam/0_basic_arithmetic @@ -283,11 +283,11 @@ * value Symbol 'MulOp' */ <> void <>sym_MulOp (<> <>) { <> /* - * [\u002a\u002f] + * [*/] */ if (rde_param_i_symbol_start (<>, 14)) return ; rde_param_i_next_class (<>, "*/", 12); rde_param_i_symbol_done_leaf (<>, 14, 13); Index: modules/pt/tests/data/ok/peg_cparam/2_fun_arithmetic ================================================================== --- modules/pt/tests/data/ok/peg_cparam/2_fun_arithmetic +++ modules/pt/tests/data/ok/peg_cparam/2_fun_arithmetic @@ -310,11 +310,11 @@ * value Symbol 'MulOp' */ <> void <>sym_MulOp (<> <>) { <> /* - * [\u002a\u002f] + * [*/] */ if (rde_param_i_symbol_start (<>, 16)) return ; rde_param_i_next_class (<>, "*/", 14); rde_param_i_symbol_done_leaf (<>, 16, 15); DELETED modules/pt/tests/pt_pgen.tests Index: modules/pt/tests/pt_pgen.tests ================================================================== --- modules/pt/tests/pt_pgen.tests +++ /dev/null @@ -1,67 +0,0 @@ -# -*- tcl -*- -# Testsuite for pt::pgen. -# Called by the ../pt_pgen.test driver file. - -#---------------------------------------------------------------------- -## I. Testing the generator operation itself - -# TODO testing of the pt::pgen command API (#args, options, outputs) ... - -#---------------------------------------------------------------------- -## II. Using generated parsers to test behaviour on good and bad -## input, i.e. the error handling implemented in our PEG parsers. - -foreach {format notes} { - container {grammar interpreter - reference} - snit {snit::type Tcl parser} - oo {TclOO class Tcl parser} - critcl {PARAM based C class parser} -} { - # SKIP nyi ... - if {$format in {critcl}} continue - - TestFilesProcessIn $mytestdir gr def -> n glabel grfile grdata { - # Make parser instance. Shared across tests. Amortize the time - # spent on dynamically making it. - set p [make-parser $format $glabel $grdata] - - # Test parser on good inputs for the grammar. - TestFilesProcess $mytestdir gr ok-${glabel} ok-${glabel}-res -> k label infile text expected { - test pt-pgen-parse:${parseimpl}-rde:${rdeimpl}-stack:${stackimpl}-f:${format}-g:${glabel}-t:${label}-1.$n.$k \ - "$format parser $glabel, good input - $label" -setup { - } -body { - $p parset $text - } -cleanup { - } -result $expected - } - - # Test parser on bad inputs for the grammar. - ## - # Note how the expected output depends not only on grammar, - # but the parser format as well. Different optimizations and - # such leading to different instructions implementing matches. - # Example: "next_str" vs. "sequence of next_char". - - TestFilesProcess $mytestdir gr fail-${glabel} fail-${glabel}-${format}-res -> k label infile text expected { - test pt-pgen-parse:${parseimpl}-rde:${rdeimpl}-stack:${stackimpl}-f:${format}-g:${glabel}-t:${label}-2.$n.$k \ - "$format parser $glabel, bad input - $label" -setup { - } -body { - set code [catch { - $p parset $text - } msg] - # TODO: Convert message to readable. - list $code $msg - } -cleanup { - } -result $expected - } yes ;# Allow missing testsets, for two reasons: - # # (a) Easier during testsuite development, allowing incremental buildup - # # (b) Some grammar construction *cannot* fail (Ex: x*), thus we cannot provide - # # failure cases either. - - # Kill shared parser instance. - $p destroy - } -} - - -#---------------------------------------------------------------------- Index: modules/struct/list.tcl ================================================================== --- modules/struct/list.tcl +++ modules/struct/list.tcl @@ -756,11 +756,11 @@ # None of its own, but the command prefix can perform arbitrary actions. proc ::struct::list::Lfilter {sequence cmdprefix} { # Shortcut when nothing is to be done. if {[::llength $sequence] == 0} {return $sequence} - return [uplevel 1 [::list ::struct::list::Lfold $sequence {} [::list ::struct::list::FTest $cmdprefix]]] + return [Lfold $sequence {} [::list ::struct::list::FTest $cmdprefix]] } proc ::struct::list::FTest {cmdprefix result item} { set pass [uplevel 1 [::linsert $cmdprefix end $item]] if {$pass} {::lappend result $item} @@ -830,11 +830,11 @@ if {[::llength $sequence] == 0} { set pass {} set fail {} return {0 0} } - foreach {pass fail} [uplevel 1 [::list ::struct::list::Lfold $sequence {} [::list ::struct::list::PFTest $cmdprefix]]] break + foreach {pass fail} [Lfold $sequence {} [::list ::struct::list::PFTest $cmdprefix]] break return [::list [llength $pass] [llength $fail]] } else { return -code error \ "wrong#args: should be \"::struct::list::Lsplit sequence cmdprefix ?passVar failVar?" } @@ -1823,6 +1823,6 @@ namespace eval ::struct { # Get 'list::list' into the general structure namespace. namespace import -force list::list namespace export list } -package provide struct::list 1.8.3 +package provide struct::list 1.8.2 Index: modules/struct/list.test ================================================================== --- modules/struct/list.test +++ modules/struct/list.test @@ -498,30 +498,10 @@ test filter-4.4 {filter command} { filter {2 4 6} even } {2 4 6} -# Alternate which elements are filtered by using a global variable -# flag. Used to test that the `cmdprefix' is evaluated in the caller's -# scope. -# -# The flag variable should be set on the -setup phase. - -proc alternating {_} { - upvar 1 flag flag; - set flag [expr {!($flag)}]; - return $flag; -} - -test filter-4.5 {filter evaluates cmdprefix on outer scope} -setup { - set flag 1 -} -body { - filter {1 2 3 4 5 6} alternating -} -cleanup { - unset flag -} -result {2 4 6} - #---------------------------------------------------------------------- interp alias {} filterfor {} ::struct::list::list filterfor test filterfor-4.1 {filterfor command} { @@ -576,21 +556,10 @@ test split-4.8 {split command} { list [lsplit {2 4 6} even pass fail] $pass $fail } {{3 0} {2 4 6} {}} - -# See test filter-4.5 for explanations. - -test split-4.9 {split evaluates cmdprefix on outer scope} -setup { - set flag 1 -} -body { - list [lsplit {1 2 3 4 5 6 7 8} alternating pass fail] $pass $fail -} -cleanup { - unset flag -} -result {{4 4} {2 4 6 8} {1 3 5 7}} - #---------------------------------------------------------------------- interp alias {} shift {} ::struct::list::list shift test shift-4.1 {shift command} { Index: modules/struct/matrix.man ================================================================== --- modules/struct/matrix.man +++ modules/struct/matrix.man @@ -1,7 +1,7 @@ [comment {-*- tcl -*-}] -[manpage_begin struct::matrix n 2.0.3] +[manpage_begin struct::matrix n 2.0.1] [keywords matrix] [copyright {2002-2013 Andreas Kupries }] [moddesc {Tcl Data Structures}] [titledesc {Create and manipulate matrix objects}] [category {Data structures}] @@ -434,11 +434,11 @@ will be filled with empty strings to the length of the longest sublist. If the submatrix specified by the top-left cell and the number of rows and columns in the [arg values] extends beyond the matrix we are modifying the over-extending parts of the values are ignored, i.e. essentially cut off. This subcommand expects its input -in the format as returned by [method {get rect}]. +in the format as returned by [method getrect]. [call [arg matrixName] [method {set row}] [arg {row values}]] Sets the values in the cells identified by the row index to the elements of the list provided as the third argument. Each element of @@ -491,18 +491,18 @@ contains the contents of the row above it, rotated by one cell to the right. [para] [example { - % M get rect 0 0 4 4 + % M getrect 0 0 4 4 {{1 2 3 4 5} {5 1 2 3 4} {4 5 1 2 3} {3 4 5 1 2} {2 3 4 5 1}} }] [para] [example { - % M set rect 1 1 {{0 0 0} {0 0 0} {0 0 0}} - % M get rect 0 0 4 4 + % M setrect 1 1 {{0 0 0} {0 0 0} {0 0 0}} + % M getrect 0 0 4 4 {{1 2 3 4 5} {5 0 0 0 4} {4 0 0 0 3} {3 0 0 0 2} {2 3 4 5 1}} }] [para] Index: modules/struct/pkgIndex.tcl ================================================================== --- modules/struct/pkgIndex.tcl +++ modules/struct/pkgIndex.tcl @@ -16,8 +16,8 @@ package ifneeded struct::graph 1.2.1 [list source [file join $dir graph1.tcl]] package ifneeded struct::tree 1.2.2 [list source [file join $dir tree1.tcl]] 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.3 [list source [file join $dir list.tcl]] +package ifneeded struct::list 1.8.2 [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]] Index: modules/struct/struct_list.man ================================================================== --- modules/struct/struct_list.man +++ modules/struct/struct_list.man @@ -1,9 +1,8 @@ [comment {-*- tcl -*- doctools manpage}] [comment {$Id: struct_list.man,v 1.24 2010/10/05 21:47:25 andreas_kupries Exp $}] -[vset LIST_VERSION 1.8.3] -[manpage_begin struct::list n [vset LIST_VERSION]] +[manpage_begin struct::list n 1.8.2] [keywords assign] [keywords common] [keywords comparison] [keywords diff] [keywords differential] @@ -38,11 +37,11 @@ [copyright {2003-2012 Andreas Kupries }] [moddesc {Tcl Data Structures}] [titledesc {Procedures for manipulating lists}] [category {Data structures}] [require Tcl 8.4] -[require struct::list [opt [vset LIST_VERSION]]] +[require struct::list [opt 1.8.2]] [description] [para] The [cmd ::struct::list] namespace contains several useful commands Index: modules/tar/pkgIndex.tcl ================================================================== --- modules/tar/pkgIndex.tcl +++ modules/tar/pkgIndex.tcl @@ -1,5 +1,5 @@ if {![package vsatisfies [package provide Tcl] 8.4]} { # PRAGMA: returnok return } -package ifneeded tar 0.10 [list source [file join $dir tar.tcl]] +package ifneeded tar 0.9 [list source [file join $dir tar.tcl]] Index: modules/tar/tar.man ================================================================== --- modules/tar/tar.man +++ modules/tar/tar.man @@ -1,6 +1,6 @@ -[vset PACKAGE_VERSION 0.10] +[vset PACKAGE_VERSION 0.9] [comment {-*- tcl -*- doctools manpage}] [manpage_begin tar n [vset PACKAGE_VERSION]] [keywords archive] [keywords {tape archive}] [keywords tar] Index: modules/tar/tar.tcl ================================================================== --- modules/tar/tar.tcl +++ modules/tar/tar.tcl @@ -10,11 +10,11 @@ # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # # RCS: @(#) $Id: tar.tcl,v 1.17 2012/09/11 17:22:24 andreas_kupries Exp $ package require Tcl 8.4 -package provide tar 0.10 +package provide tar 0.9 namespace eval ::tar {} proc ::tar::parseOpts {acc opts} { array set flags $acc @@ -143,11 +143,10 @@ set ret {} while {![eof $fh]} { array set header [readHeader [read $fh 512]] HandleLongLink $fh header if {$header(name) == ""} break - if {$header(prefix) != ""} {append header(prefix) /} lappend ret $header(prefix)$header(name) seekorskip $fh [expr {$header(size) + [pad $header(size)]}] current } if {!$chan} { close $fh @@ -167,11 +166,10 @@ set ret {} while {![eof $fh]} { array set header [readHeader [read $fh 512]] HandleLongLink $fh header if {$header(name) == ""} break - if {$header(prefix) != ""} {append header(prefix) /} seekorskip $fh [expr {$header(size) + [pad $header(size)]}] current if {$file != "" && "$header(prefix)$header(name)" != $file} {continue} set header(type) [string map {0 file 5 directory 3 characterSpecial 4 blockSpecial 6 fifo 2 link} $header(type)] set header(mode) [string range $header(mode) 2 end] lappend ret $header(prefix)$header(name) [list mode $header(mode) uid $header(uid) gid $header(gid) \ @@ -196,11 +194,10 @@ while {![eof $fh]} { set data [read $fh 512] array set header [readHeader $data] HandleLongLink $fh header if {$header(name) == ""} break - if {$header(prefix) != ""} {append header(prefix) /} set name [string trimleft $header(prefix)$header(name) /] if {$name == $file} { set file [read $fh $header(size)] if {!$chan} { close $fh @@ -239,11 +236,10 @@ } while {![eof $fh]} { array set header [readHeader [read $fh 512]] HandleLongLink $fh header if {$header(name) == ""} break - if {$header(prefix) != ""} {append header(prefix) /} set name [string trimleft $header(prefix)$header(name) /] if {![string match $pattern $name] || ($nooverwrite && [file exists $name])} { seekorskip $fh [expr {$header(size) + [pad $header(size)]}] current continue } @@ -379,16 +375,12 @@ set name [string trimleft $name /] if {[string length $name] > 255} { return -code error "path name over 255 chars" } elseif {[string length $name] > 100} { - set common [string range $name end-99 154] - if {[set splitpoint [string first / $common]] == -1} { - return -code error "path name cannot be split into prefix and name" - } - set prefix [string range $name 0 end-100][string range $common 0 $splitpoint-1] - set name [string range $common $splitpoint+1 end][string range $name 155 end] + set prefix [string range $name 0 end-100] + set name [string range $name end-99 end] } else { set prefix "" } set header [binary format a100A8A8A8A12A12A8a1a100A6a2a32a32a8a8a155a12 \ @@ -495,11 +487,10 @@ array set header [readHeader [read $fh 512]] if {$header(name) == ""} { puts -nonewline $tfh [string repeat \x00 1024] break } - if {$header(prefix) != ""} {append header(prefix) /} set name $header(prefix)$header(name) set len [expr {$header(size) + [pad $header(size)]}] if {[lsearch $files $name] > -1} { seek $fh $len current } else { Index: modules/tar/tar.test ================================================================== --- modules/tar/tar.test +++ modules/tar/tar.test @@ -9,34 +9,34 @@ testsNeedTcl 8.5 ; # Virt channel support! testsNeedTcltest 1.0 support { use virtchannel_base/memchan.tcl tcl::chan::memchan - useLocalFile tests/support.tcl + useLocalFile test-support.tcl } testing { useLocal tar.tcl tar } # ------------------------------------------------------------------------- -test tar-stream {stream} -setup setup1 -body { +test test-stream {} -setup setup1 -body { string length [read $chan1] } -cleanup cleanup1 -result 128000 -test tar-pad {pad} -body { +test tar-pad {} -body { tar::pad 230 } -result {282} -test tar-skip {skip} -setup setup1 -body { +test tar-skip {} -setup setup1 -body { tar::skip $chan1 10 lappend res [read $chan1 10] tar::skip $chan1 72313 lappend res [read $chan1 10] } -cleanup cleanup1 -result {{6 7 8 9 10} {07 13908 1}} -test tar-seekorskip-backwards {seekorskip} -constraints tcl8.6plus -setup setup1 -body { +test tar-seekorskip-backwards {} -constraints tcl8.6plus -setup setup1 -body { # The zlib push stuff is Tcl 8.6+. Properly restrict the test. zlib push gzip $chan1 catch {tar::seekorskip $chan1 -10 start} cres lappend res $cres catch {tar::seekorskip $chan1 10 start} cres @@ -44,20 +44,20 @@ catch {tar::seekorskip $chan1 -10 end} cres lappend res $cres catch {tar::seekorskip $chan1 10 end} cres lappend res $cres lappend res [read $chan1 10] -} -cleanup cleanup1 -match glob \ - -result [list \ - {WHENCE=start not supported*} \ - {WHENCE=start not supported*} \ - {WHENCE=end not supported*} \ - {WHENCE=end not supported*} \ - {1 2 3 4 5 } \ - ] - -test tar-header {header} -body { +} -cleanup cleanup1 -match glob -result [ + list {WHENCE=start not supported*} \ + {WHENCE=start not supported*} \ + {WHENCE=end not supported*} \ + {WHENCE=end not supported*} \ + {1 2 3 4 5 } + +] + +test tar-header {} -body { set file1 [dict get $filesys Dir1 File1] dict set file1 path /Dir1/File1 set header [header_posix $file1] set parsed [string trim [tar::readHeader $header]] set golden "name /Dir1/File1 mode 755 uid 13103 gid 18103 size 100 mtime 5706756101 cksum 3676 type 0 linkname {} magic ustar\0 version 00 uname {} gname {} devmajor 0 devminor 0 prefix {}" @@ -64,36 +64,21 @@ set len [string length $parsed] foreach {key value} $golden { if {[set value1 [dict get $parsed $key]] ne $value } { lappend res [list $key $value $value1] } + } } -result {} -test tar-add {add} -setup setup1 -body { + +test tar-add {} -setup setup1 -body { tar::create $chan1 [list $tmpdir/one/a $tmpdir/one/two/a $tmpdir/one/three/a] -chan seek $chan1 0 lappend res {*}[tar::contents $chan1 -chan] seek $chan1 0 lappend res [string trim [tar::get $chan1 $tmpdir/one/two/a -chan]] } -cleanup cleanup1 -result {tartest/one/a tartest/one/two/a tartest/one/three/a hello2} -test tar-bug-2840180 {} -setup setup2 -body { - tar::create $chan1 [list $tmpdir/[large-path]/a] -chan - seek $chan1 0 - - # What the package sees. - lappend res {*}[tar::contents $chan1 -chan] - close $chan1 - - # What a regular tar package sees. - lappend res [exec 2> $tmpfile.err tar tvf $tmpfile] - join $res \n -} -cleanup cleanup2 -match glob \ - -result [join [list \ - $tmpdir/[large-path]/a \ - "* $tmpdir/[large-path]/a" \ - ] \n] - # ------------------------------------------------------------------------- testsuiteCleanup ADDED modules/tar/test-support.tcl Index: modules/tar/test-support.tcl ================================================================== --- /dev/null +++ modules/tar/test-support.tcl @@ -0,0 +1,93 @@ + +proc stream {{size 128000}} { + set chan [tcl::chan::memchan] + set line {} + while 1 { + incr i + set istring $i + set ilen [string length $istring] + if {$line ne {}} { + append line { } + incr size -1 + } + append line $istring + incr size -$ilen + if {$size < 1} { + set line [string range $line 0 end-[expr {abs(1-$size)}]] + puts $chan $line + break + } + + if {$i % 10 == 0} { + puts $chan $line + incr size -1 ;# for the [puts] newline + set line {} + } + } + + seek $chan 0 + return $chan +} + +proc header_posix {tarball} { + dict with tarball {} + tar::formatHeader $path \ + [dict create \ + mode $mode \ + type $type \ + uid $uid \ + gid $gid \ + size $size \ + mtime $mtime] +} + +proc setup1 {} { + variable chan1 + variable res {} + variable tmpdir tartest + + tcltest::makeDirectory $tmpdir + + foreach directory { + one + one/two + one/three + } { + tcltest::makeDirectory $tmpdir/$directory + set chan [open $tmpdir/$directory/a w] + puts $chan hello[incr i] + close $chan + } + set chan1 [stream] +} + +proc cleanup1 {} { + variable chan1 + close $chan1 + tcltest::removeDirectory tartest + return +} + +variable filesys { + Dir1 { + File1 { + type 0 + mode 755 + uid 13103 + gid 18103 + size 100 + mtime 5706756101 + } + } + + Dir2 { + File1 { + type 0 + mode 644 + uid 15103 + gid 19103 + size 100 + mtime 5706776103 + } + } +} DELETED modules/tar/tests/support.tcl Index: modules/tar/tests/support.tcl ================================================================== --- modules/tar/tests/support.tcl +++ /dev/null @@ -1,126 +0,0 @@ - -proc stream {{size 128000}} { - set chan [tcl::chan::memchan] - set line {} - while 1 { - incr i - set istring $i - set ilen [string length $istring] - if {$line ne {}} { - append line { } - incr size -1 - } - append line $istring - incr size -$ilen - if {$size < 1} { - set line [string range $line 0 end-[expr {abs(1-$size)}]] - puts $chan $line - break - } - - if {$i % 10 == 0} { - puts $chan $line - incr size -1 ;# for the [puts] newline - set line {} - } - } - - seek $chan 0 - return $chan -} - -proc header_posix {tarball} { - dict with tarball {} - tar::formatHeader $path \ - [dict create \ - mode $mode \ - type $type \ - uid $uid \ - gid $gid \ - size $size \ - mtime $mtime] -} - -proc setup1 {} { - variable chan1 - variable res {} - variable tmpdir tartest - - tcltest::makeDirectory $tmpdir - - foreach directory { - one - one/two - one/three - } { - tcltest::makeDirectory $tmpdir/$directory - set chan [open $tmpdir/$directory/a w] - puts $chan hello[incr i] - close $chan - } - set chan1 [stream] -} - -proc large-path {} { - return aaaaa/bbbbaaaaa/bbbbaaaaa/bbbbaaaaa/bbbbaaaaa/bbbbaaaaa/bbbbaaaaa/bbbbaaaaa/bbbbaaaaa/bbbbaaaaa/bbbbtcllib/modules/tar -} - -proc setup2 {} { - variable chan1 - variable res {} - variable tmpdir tartest - variable tmpfile tarX - - tcltest::makeDirectory $tmpdir - tcltest::makeFile {} $tmpfile - - foreach directory [list [large-path]] { - tcltest::makeDirectory $tmpdir/$directory - set chan [open $tmpdir/$directory/a w] - puts $chan hello[incr i] - close $chan - } - set chan1 [open $tmpfile w+] -} - -proc cleanup1 {} { - variable chan1 - close $chan1 - tcltest::removeDirectory tartest - return -} - -proc cleanup2 {} { - variable chan1 - variable tmpdir - variable tmpfile - catch { close $chan1 } - tcltest::removeDirectory $tmpdir - tcltest::removeFile $tmpfile - tcltest::removeFile $tmpfile.err - return -} - -variable filesys { - Dir1 { - File1 { - type 0 - mode 755 - uid 13103 - gid 18103 - size 100 - mtime 5706756101 - } - } - - Dir2 { - File1 { - type 0 - mode 644 - uid 15103 - gid 19103 - size 100 - mtime 5706776103 - } - } -} DELETED modules/uri/uri_urn.pcx Index: modules/uri/uri_urn.pcx ================================================================== --- modules/uri/uri_urn.pcx +++ /dev/null @@ -1,27 +0,0 @@ -# -*- tcl -*- uri_urn.pcx -# Syntax of the commands provided by package uri::urn. -# -# 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 uri::urn -pcx::tcldep 1.0 needs tcl 8.4 - -namespace eval ::uri {} -namespace eval ::uri::urn {} - -#pcx::message FOO {... text ...} type -#pcx::scan - -pcx::check 1.0 std ::uri::urn::quote \ - {checkSimpleArgs 0 -1 { - checkWord - }} - -# Initialization via pcx::init. -# Use a ::uri::init procedure for non-standard initialization. -pcx::complete Index: modules/uuid/pkgIndex.tcl ================================================================== --- modules/uuid/pkgIndex.tcl +++ modules/uuid/pkgIndex.tcl @@ -3,6 +3,6 @@ # uuid package index file # # $Id: pkgIndex.tcl,v 1.3 2012/11/19 19:28:24 andreas_kupries Exp $ if {![package vsatisfies [package provide Tcl] 8.2]} {return} -package ifneeded uuid 1.0.3 [list source [file join $dir uuid.tcl]] +package ifneeded uuid 1.0.2 [list source [file join $dir uuid.tcl]] Index: modules/uuid/uuid.man ================================================================== --- modules/uuid/uuid.man +++ modules/uuid/uuid.man @@ -1,15 +1,14 @@ -[vset UUID_VERSION 1.0.3] -[manpage_begin uuid n [vset UUID_VERSION]] +[manpage_begin uuid n 1.0.2] [keywords GUID] [keywords UUID] [moddesc {uuid}] [copyright {2004, Pat Thoyts }] [titledesc {UUID generation and comparison}] [category {Hashes, checksums, and encryption}] [require Tcl 8.2] -[require uuid [opt [vset UUID_VERSION]]] +[require uuid [opt 1.0.2]] [description] [para] This package provides a generator of universally unique identifiers (UUID) also known as globally unique identifiers (GUID). This Index: modules/uuid/uuid.tcl ================================================================== --- modules/uuid/uuid.tcl +++ modules/uuid/uuid.tcl @@ -10,11 +10,11 @@ # # Usage: uuid::uuid generate # uuid::uuid equal $idA $idB namespace eval uuid { - variable version 1.0.3 + variable version 1.0.2 variable accel array set accel {critcl 0} namespace export uuid @@ -83,11 +83,11 @@ } set r [md5::MD5Final $tok] binary scan $r c* r # 3.4: set uuid versioning fields - lset r 8 [expr {([lindex $r 8] & 0x3F) | 0x80}] + lset r 8 [expr {([lindex $r 8] & 0x7F) | 0x40}] lset r 6 [expr {([lindex $r 6] & 0x0F) | 0x40}] return [binary format c* $r] } Index: modules/websocket/pkgIndex.tcl ================================================================== --- modules/websocket/pkgIndex.tcl +++ modules/websocket/pkgIndex.tcl @@ -6,6 +6,6 @@ # information so that packages will be loaded automatically # in response to "package require" commands. When this # script is sourced, the variable $dir must contain the # full path name of this file's directory. -package ifneeded websocket 1.3.1 [list source [file join $dir websocket.tcl]] +package ifneeded websocket 1.3 [list source [file join $dir websocket.tcl]] Index: modules/websocket/websocket.man ================================================================== --- modules/websocket/websocket.man +++ modules/websocket/websocket.man @@ -1,8 +1,7 @@ [comment {-*- tcl -*- doctools manpage}] -[vset WEBSOCKET_VERSION 1.3.1] -[manpage_begin websocket n [vset WEBSOCKET_VERSION]] +[manpage_begin websocket n 1.3] [see_also http] [keywords http] [keywords internet] [keywords net] [keywords {rfc 6455}] @@ -12,11 +11,11 @@ [require Tcl 8.4] [require http 2.7] [require logger] [require sha1] [require base64] -[require websocket [opt [vset WEBSOCKET_VERSION]]] +[require websocket 1.3] [description] [para] NOTE: THIS DOCUMENTATION IS WORK IN PROGRESS... @@ -299,43 +298,10 @@ [const "-keepalive"] defaults to 30 seconds, and in clients, no pings are initiated. [def [const "-ping"]] is the text that is used during the automated pings. This text defaults to the empty string, leading to an empty ping. [list_end] - -[call [cmd ::websocket::loglevel] [opt [arg loglvl]]] - -Set or query the log level of the library, which defaults to error. -Logging is built on top of the logger module, and the library makes -use of the following levels: [const debug], [const info], [const notice], -[const warn] and [const error]. When called with no argument, this procedure will -simply return the current log level. Otherwise [arg loglvl] should contain -the desired log level. - -[call [cmd ::websocket::close] [arg sock] [opt [arg code]] [opt [arg reason]]] - -Gracefully close a websocket that was directly or indirectly passed to -[cmd ::websocket::takeover]. The procedure will optionally send the -[arg code] and describing [arg reason] as part of the closure handshake. -Good defaults are provided, so that reasons for a number of known codes will -be sent back. Only the first 125 characters of a reason string will be kept and -sent as part of the handshake. The known codes are: -[list_begin definitions] -[def [const 1000]] Normal closure (the default [arg code] when none provided). -[def [const 1001]] Endpoint going away -[def [const 1002]] Protocol Error -[def [const 1003]] Received incompatible data type -[def [const 1006]] Abnormal closure -[def [const 1007]] Received data not consistent with type -[def [const 1008]] Policy violation -[def [const 1009]] Received message too big -[def [const 1010]] Missing extension -[def [const 1011]] Unexpected condition -[def [const 1015]] TLS hanshake error -[list_end] - - [list_end] [section Examples] Index: modules/websocket/websocket.tcl ================================================================== --- modules/websocket/websocket.tcl +++ modules/websocket/websocket.tcl @@ -42,11 +42,11 @@ namespace eval ::websocket { variable WS if { ! [info exists WS] } { array set WS { - loglevel "error" + loglevel "warn" maxlength 16777216 ws_magic "258EAFA5-E914-47DA-95CA-C5AB0DC85B11" ws_version 13 id_gene 0 -keepalive 30 @@ -881,11 +881,11 @@ } set type [Type $Connection(read:mode)] # If the FIN bit is set, process the frame. if { $header & 0x8000 } { - ${log}::debug "Received $len bytes long $type final fragment from $dst" + ${log}::debug "Received $len long $type final fragment from $dst" switch $opcode { 1 { # Text: decode and notify handler Push $sock text \ [encoding convertfrom utf-8 $Connection(read:msg)] @@ -1019,20 +1019,16 @@ if { [catch {fconfigure $sock -peername} sockinfo] == 0 } { set Connection(peername) [lindex $sockinfo 1] if { $Connection(peername) eq "" } { set Connection(peername) [lindex $sockinfo 0] } - } else { - ${log}::warn "Cannot get remote information from socket: $sockinfo" } if { [catch {fconfigure $sock -sockname} sockinfo] == 0 } { set Connection(sockname) [lindex $sockinfo 1] if { $Connection(sockname) eq "" } { set Connection(sockname) [lindex $sockinfo 0] } - } else { - ${log}::warn "Cannot get local information from socket: $sockinfo" } # Listen to incoming traffic on socket and make sure we ping if # necessary. fconfigure $sock -translation binary -blocking on @@ -1136,11 +1132,10 @@ } ::http::cleanup $token unset $opener; # Always unset the temporary connection opening # array - return 0 } # ::websocket::Finished -- Pass further on HTTP connection finalisation # @@ -1331,22 +1326,20 @@ set HDR(Sec-WebSocket-Key) $OPEN(nonce) set HDR(Sec-WebSocket-Protocol) [join $protos ", "] set HDR(Sec-WebSocket-Version) $WS(ws_version) lappend cmd -headers [array get HDR] - # Adding our own handler to intercept the socket once connection - # has been opened and established properly would be logical, but - # does not work in practice since this forces the HTTP library to - # perform a HTTP 1.0 request. Instead, we arrange to be called - # back via -command. We force -keepalive to make sure the HTTP - # library does not insert a "Connection: close" directive in the - # headers, and really make sure to do whatever we can to have a - # HTTP 1.1 connection. + # Add our own handler to intercept the socket once connection has + # been opened and established properly and make sure we keep alive + # the socket so we can continue using it. In practice, what gets + # called is the command that is specified by -command, even though + # we would like to intercept this earlier on. This has to do with + # the internals of the HTTP package. lappend cmd \ + -handler [list [namespace current]::Connected $varname] \ -command [list [namespace current]::Finished $varname] \ - -keepalive 1 \ - -protocol 1.1 + -keepalive 1 # Now open the connection to the remote server using the HTTP # package... set sock "" if { [catch {eval $cmd} token] } { @@ -1524,6 +1517,6 @@ } } } -package provide websocket 1.3.1 +package provide websocket 1.3; DELETED modules/yaml/06eef112da.data Index: modules/yaml/06eef112da.data ================================================================== --- modules/yaml/06eef112da.data +++ /dev/null @@ -1,7 +0,0 @@ ---- -- &foo -- &bar -- alpha: 43 - beta: - houston: [*foo] - newyork: [[*bar,[aaa]]] Index: modules/yaml/pkgIndex.tcl ================================================================== --- modules/yaml/pkgIndex.tcl +++ modules/yaml/pkgIndex.tcl @@ -6,7 +6,7 @@ # information so that packages will be loaded automatically # in response to "package require" commands. When this # script is sourced, the variable $dir must contain the # full path name of this file's directory. -package ifneeded yaml 0.3.7 [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]] Index: modules/yaml/yaml.man ================================================================== --- modules/yaml/yaml.man +++ modules/yaml/yaml.man @@ -1,8 +1,7 @@ [comment {-*- tcl -*- doctools manpage}] -[vset YAML_VERSION 0.3.7] -[manpage_begin yaml n [vset YAML_VERSION]] +[manpage_begin yaml n 0.3.6] [see_also base64] [see_also huddle] [see_also json] [keywords {data exchange}] [keywords huddle] @@ -11,11 +10,11 @@ [keywords yaml] [copyright {2008 KATO Kanryu }] [moddesc {YAML processing}] [titledesc {YAML Format Encoder/Decoder}] [require Tcl 8.4] -[require yaml [opt [vset YAML_VERSION]]] +[require yaml [opt 0.3.6]] [description] [para] The [package yaml] package provides a simple Tcl-only library for parsing the YAML [uri http://www.yaml.org/] data exchange format as specified in Index: modules/yaml/yaml.tcl ================================================================== --- modules/yaml/yaml.tcl +++ modules/yaml/yaml.tcl @@ -14,11 +14,11 @@ if {$::tcl_version < 8.5} { package require dict } -package provide yaml 0.3.7 +package provide yaml 0.3.6 package require cmdline package require huddle namespace eval ::yaml { @@ -952,11 +952,11 @@ # get a space separated token proc ::yaml::_getToken {} { variable data - set reStr {^[^ \t\n,\]]+} + set reStr {^[^ \t\n,]+} set result [_getFoldedString $reStr] return $result } proc ::yaml::_skipSpaces {{commentSkip 0}} { Index: modules/yaml/yaml.test ================================================================== --- modules/yaml/yaml.test +++ modules/yaml/yaml.test @@ -74,16 +74,10 @@ return $out } error } -# ------------ - -test yaml-21.0.06eef112da {ticket 06eef112da} -body { - yaml::yaml2dict -file [localPath 06eef112da.data] -} -result {{} {} {alpha 43 beta {houston {{}} newyork {{{} aaa}}}}} - # ------------ # error ..... test yaml-1.1 "error" -body { set error1 { Index: modules/zip/decode.man ================================================================== --- modules/zip/decode.man +++ modules/zip/decode.man @@ -1,19 +1,18 @@ -[vset ZIP_DECODE_VERSION 0.6] [comment {-*- tcl -*- doctools manpage}] -[manpage_begin zipfile::decode n [vset ZIP_DECODE_VERSION]] +[manpage_begin zipfile::encode n 0.3] [keywords decompression zip] -[copyright {2008-2014 Andreas Kupries}] +[copyright {2008-2012 Andreas Kupries}] [moddesc {Zip archive handling}] [titledesc {Access to zip archives}] [category File] [require Tcl 8.4] [require fileutil::magic::mimetype] [require fileutil::decode 0.2] [require Trf] [require zlibtcl] -[require zipfile::decode [opt [vset ZIP_DECODE_VERSION]]] +[require zipfile::decode [opt 0.4]] [description] [para] This package provides commands to decompress and access the contents of zip archives. @@ -90,17 +89,10 @@ check if the specified [arg path] is found in the archive. The result of the command is a boolean flag, [const true] if the path is found, and [const false] otherwise. -[comment ---------------------------------------------------------------------] -[call [cmd ::zipfile::decode::iszip] [arg archive]] - -This command takes the path of a presumed zip [arg archive] file and -returns a boolean flag as the result of the command telling us if it -actually is a zip archive ([const true]), or not ([const false]). - [comment ---------------------------------------------------------------------] [call [cmd ::zipfile::decode::open] [arg archive]] This command takes the path of a zip [arg archive] file and prepares it for decoding. Index: modules/zip/decode.tcl ================================================================== --- modules/zip/decode.tcl +++ modules/zip/decode.tcl @@ -38,19 +38,10 @@ } # ### ### ### ######### ######### ######### ## -proc ::zipfile::decode::iszip {fname} { - if {[catch { - LocateEnd $fname - } msg]} { - return 0 - } - return 1 -} - proc ::zipfile::decode::open {fname} { variable eoa if {[catch { set eoa [LocateEnd $fname] } msg]} { @@ -187,11 +178,11 @@ # change from the sustem defaults. Permissions are in the # lower 9 bits of the MSW. file attributes $dst -permissions \ [string map {0 --- 1 --x 2 -w- 3 -wx 4 r-- 5 r-x 6 rw- 7 rwx} \ - [format %03o [expr {($fd(efattr) >> 16) & 0x1ff}]]] + [format %o [expr {($fd(efattr) >> 16) & 0x1ff}]]] } # FUTURE: Run crc checksum on created file and compare to the # ......: stored information. @@ -673,7 +664,7 @@ return [array get cb] } # ### ### ### ######### ######### ######### ## Ready -package provide zipfile::decode 0.6.1 +package provide zipfile::decode 0.4 return Index: modules/zip/pkgIndex.tcl ================================================================== --- modules/zip/pkgIndex.tcl +++ modules/zip/pkgIndex.tcl @@ -1,3 +1,3 @@ if {![package vsatisfies [package provide Tcl] 8.4]} {return} package ifneeded zipfile::encode 0.3 [list source [file join $dir encode.tcl]] -package ifneeded zipfile::decode 0.6.1 [list source [file join $dir decode.tcl]] +package ifneeded zipfile::decode 0.4 [list source [file join $dir decode.tcl]] Index: sak.tcl ================================================================== --- sak.tcl +++ sak.tcl @@ -2175,12 +2175,10 @@ } proc __release {} { # Regenerate PACKAGES, and extend - gd-gen-packages - return global argv argv0 distribution package_name package_version getpackage textutil textutil/textutil.tcl Index: support/devel/sak/doc/kwic.txt ================================================================== --- support/devel/sak/doc/kwic.txt +++ support/devel/sak/doc/kwic.txt @@ -622,11 +622,11 @@ [manpage modules/math/decimal.man math::decimal] [key declare] [manpage modules/term/ansi_code.man term::ansi::code] [key decompression] [manpage modules/virtchannel_transform/tcllib_zlib.man tcl::transform::zlib] -[manpage modules/zip/decode.man zipfile::decode] +[manpage modules/zip/decode.man zipfile::encode] [key decryption] [manpage modules/virtchannel_transform/vt_otp.man tcl::transform::otp] [manpage modules/virtchannel_transform/rot.man tcl::transform::rot] [key deferal] [manpage modules/uev/uevent_onidle.man uevent::onidle] @@ -3674,14 +3674,14 @@ [manpage modules/base64/yencode.man yencode] [key zero] [manpage modules/virtchannel_base/nullzero.man tcl::chan::nullzero] [manpage modules/virtchannel_base/tcllib_zero.man tcl::chan::zero] [key zip] -[manpage modules/zip/decode.man zipfile::decode] +[manpage modules/zip/decode.man zipfile::encode] [manpage modules/zip/encode.man zipfile::encode] [key zlib] [manpage modules/virtchannel_transform/tcllib_zlib.man tcl::transform::zlib] [key zoom] [manpage modules/map/map_slippy.man map::slippy] [manpage modules/map/map_slippy_cache.man map::slippy::cache] [manpage modules/map/map_slippy_fetcher.man map::slippy::fetcher] [index_end] Index: support/devel/sak/doc/toc.txt ================================================================== --- support/devel/sak/doc/toc.txt +++ support/devel/sak/doc/toc.txt @@ -138,11 +138,11 @@ [item apps/tcldocstrip.man tcldocstrip {Tcl-based Docstrip Processor}] [item modules/tepam/tepam_doc_gen.man tepam::doc_gen {TEPAM DOC Generation, reference manual}] [item modules/textutil/expander.man textutil::expander {Procedures to process templates and expand text.}] [division_end] [division_start File] -[item modules/zip/decode.man zipfile::decode {Access to zip archives}] +[item modules/zip/decode.man zipfile::encode {Access to zip archives}] [item modules/zip/encode.man zipfile::encode {Generation of zip archives}] [division_end] [division_start {File formats}] [item modules/exif/exif.man exif {Tcl EXIF extracts and parses EXIF fields from digital images}] [item modules/gpx/gpx.man gpx {Extracts waypoints, tracks and routes from GPX files}] @@ -1092,11 +1092,11 @@ [division_start yaml] [item modules/yaml/huddle.man huddle {Create and manipulate huddle object}] [item modules/yaml/yaml.man yaml {YAML Format Encoder/Decoder}] [division_end] [division_start zip] -[item modules/zip/decode.man zipfile::decode {Access to zip archives}] +[item modules/zip/decode.man zipfile::encode {Access to zip archives}] [item modules/zip/encode.man zipfile::encode {Generation of zip archives}] [division_end] [division_end] [division_end] [toc_end] Index: support/devel/sak/doc/toc_cats.txt ================================================================== --- support/devel/sak/doc/toc_cats.txt +++ support/devel/sak/doc/toc_cats.txt @@ -138,11 +138,11 @@ [item apps/tcldocstrip.man tcldocstrip {Tcl-based Docstrip Processor}] [item modules/tepam/tepam_doc_gen.man tepam::doc_gen {TEPAM DOC Generation, reference manual}] [item modules/textutil/expander.man textutil::expander {Procedures to process templates and expand text.}] [division_end] [division_start File] -[item modules/zip/decode.man zipfile::decode {Access to zip archives}] +[item modules/zip/decode.man zipfile::encode {Access to zip archives}] [item modules/zip/encode.man zipfile::encode {Generation of zip archives}] [division_end] [division_start {File formats}] [item modules/exif/exif.man exif {Tcl EXIF extracts and parses EXIF fields from digital images}] [item modules/gpx/gpx.man gpx {Extracts waypoints, tracks and routes from GPX files}] Index: support/devel/sak/doc/toc_mods.txt ================================================================== --- support/devel/sak/doc/toc_mods.txt +++ support/devel/sak/doc/toc_mods.txt @@ -622,10 +622,10 @@ [division_start yaml] [item modules/yaml/huddle.man huddle {Create and manipulate huddle object}] [item modules/yaml/yaml.man yaml {YAML Format Encoder/Decoder}] [division_end] [division_start zip] -[item modules/zip/decode.man zipfile::decode {Access to zip archives}] +[item modules/zip/decode.man zipfile::encode {Access to zip archives}] [item modules/zip/encode.man zipfile::encode {Generation of zip archives}] [division_end] [division_end] [toc_end] Index: support/installation/actions.tcl ================================================================== --- support/installation/actions.tcl +++ support/installation/actions.tcl @@ -21,21 +21,10 @@ global distribution xcopy \ [file join $distribution modules $module] \ [file join $libdir $module] \ 1 *.tcl - return -} - -proc _rde {module libdir} { - global distribution - - _tcl $module $libdir - xcopy \ - [file join $distribution modules $module rde_critcl] \ - [file join $libdir $module rde_critcl] \ - 1 return } proc _doc {module libdir} { global distribution Index: support/installation/modules.tcl ================================================================== --- support/installation/modules.tcl +++ support/installation/modules.tcl @@ -109,11 +109,11 @@ Module pluginmgr _tcl _man _null Module png _tcl _man _null Module pop3 _tcl _man _null Module pop3d _tcl _man _null Module profiler _tcl _man _null -Module pt _rde _man _null +Module pt _tcl _man _null Module rc4 _tcl _man _null Module rcs _tcl _man _null Module report _tcl _man _null Module rest _tcl _man _null Module ripemd _tcl _man _null Index: support/releases/PACKAGES ================================================================== --- support/releases/PACKAGES +++ support/releases/PACKAGES @@ -1,13 +1,12 @@ -@@ RELEASE 1.16 +@@ RELEASE 1.15 S3 1.0.0 -SASL 1.3.3 -SASL::NTLM 1.1.2 -SASL::SCRAM 0.1 +SASL 1.3.2 +SASL::NTLM 1.1.1 SASL::XGoogleToken 1.0.1 -aes 1.1.1 +aes 1.1 ascii85 1.0 asn 0.8.4 autoproxy 1.5.3 base32 0.1 base32::core 0.1 @@ -29,25 +28,21 @@ cmdline 1.3.3 comm 4.6.2 configuration 1 control 0.1.3 coroutine 1.1 -coroutine::auto 1.1.1 +coroutine::auto 1.1 counter 2.0.4 crc16 1.1.2 crc32 1.3.1 csv 0.8 -debug 1.0.2 -debug::caller 1 -debug::heartbeat 1 -debug::timestamp 1 des 1.1.0 dns 1.3.3 docstrip 1.2 docstrip::util 1.3 -doctools 1.4.17 -doctools::changelog 1.1 +doctools 1.4.14 +doctools::changelog 1 doctools::config 0.1 doctools::cvs 1 doctools::html 0.1 doctools::html::cssdefaults 0.1 doctools::idx 1.0.4 @@ -89,31 +84,30 @@ 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 -dtplite 1.1 exif 1.1.2 -fileutil 1.14.6 -fileutil::decode 0.2 +fileutil 1.14.5 +fileutil::decode 0.1 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.3 -ftp 2.4.12 +ftp 2.4.11 ftp::geturl 0.2.1 ftpd 1.2.6 generator 0.1 gpx 1 grammar::aycock 1.0 grammar::aycock::debug 1.0 grammar::aycock::runtime 1.0 -grammar::fa 0.5 +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 @@ -125,20 +119,20 @@ hook 0.1 html 1.4 htmlparse 1.2.1 huddle 0.1.5 ident 0.42 -imap4 0.5.2 +imap4 0.4 inifile 0.2.5 interp 0.1.2 interp::delegate::method 0.2 interp::delegate::proc 0.2 -ip 1.2.2 +ip 1.2 irc 0.6.1 javascript 1.0.2 -jpeg 0.5 -json 1.3.2 +jpeg 0.4.0 +json 1.1.2 json::write 1.0.2 lambda 1 ldap 1.8 ldapx 1.0 log 1.3 @@ -152,43 +146,43 @@ 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.2 +math::calculus 0.7.1 math::calculus::symdiff 1.0 math::complexnumbers 1.0.2 math::constants 1.0.1 -math::decimal 1.0.3 +math::decimal 1.0.2 math::fourier 1.0.2 math::fuzzy 0.2.1 -math::geometry 1.1.3 -math::interpolate 1.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.9 +math::statistics 0.8.0 md4 1.0.5 md5 1.4.4 md5 2.0.7 md5crypt 1.1.0 -mime 1.6 +mime 1.5.6 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.4.2 +ncgi 1.4.1 nmea 1.0.0 nntp 0.2.1 -oo::util 1.2 +oo::util 1.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 @@ -249,32 +243,31 @@ 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.0.2 +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.0.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.0.1 +pt::peg::to::peg 1 pt::peg::to::tclparam 1 -pt::pgen 1.0.2 +pt::pgen 1.0.1 pt::rde 1.0.2 -pt::rde::oo 1.0.2 pt::tclparam::configuration::snit 1.0.1 -pt::tclparam::configuration::tcloo 1.0.3 +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.1 +rest 1.0 ripemd128 1.0.4 ripemd160 1.0.4 sha1 1.1.0 sha1 2.0.3 sha256 1.0.3 @@ -286,50 +279,48 @@ snit 1.4.2 snit 2.3.2 soundex 1.0 spf 1.1.1 stooop 4.4.1 -string::token 1 -string::token::shell 1.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.3 +struct::list 1.8.2 struct::matrix 1.2.1 -struct::matrix 2.0.3 +struct::matrix 2.0.2 struct::pool 1.2.1 struct::prioqueue 1.4 -struct::queue 1.4.5 +struct::queue 1.4.4 struct::record 1.2.1 struct::set 2.2.3 struct::skiplist 1.3 struct::stack 1.5.3 struct::tree 1.2.2 struct::tree 2.1.2 sum 1.1.0 switched 2.2.1 -tar 0.9 +tar 0.7.1 tcl::chan::cat 1.0.2 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.0.3 +tcl::chan::memchan 1.0.2 tcl::chan::null 1 tcl::chan::nullzero 1 tcl::chan::random 1 tcl::chan::std 1.0.1 -tcl::chan::string 1.0.2 +tcl::chan::string 1.0.1 tcl::chan::textwindow 1 -tcl::chan::variable 1.0.3 +tcl::chan::variable 1.0.2 tcl::chan::zero 1 tcl::randomseed 1 tcl::transform::adler32 1 tcl::transform::base64 1 tcl::transform::core 1 @@ -343,31 +334,30 @@ tcl::transform::rot 1 tcl::transform::spacer 1 tcl::transform::zlib 1 tclDES 1.0.0 tclDESjr 1.0.0 -tepam 0.5.0 -tepam::doc_gen 0.1.1 +tepam 0.4.0 term 0.1 -term::ansi::code 0.2 +term::ansi::code 0.1 term::ansi::code::attr 0.1 -term::ansi::code::ctrl 0.2 +term::ansi::code::ctrl 0.1.2 term::ansi::code::macros 0.1 term::ansi::ctrl::unix 0.1.1 -term::ansi::send 0.2 +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.8 +textutil 0.7.1 textutil::adjust 0.7.1 textutil::expander 1.3.1 textutil::repeat 0.7 textutil::split 0.7 -textutil::string 0.8 +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 @@ -389,30 +379,29 @@ uevent 0.3.1 uevent::onidle 0.1 unicode 1.0.0 unicode::data 1.0.0 units 2.1.1 -uri 1.2.4 +uri 1.2.2 uri::urn 1.0.2 uuencode 1.1.5 uuid 1.0.2 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.4 +valtype::iban 1.1 valtype::imei 1 valtype::isbn 1 valtype::luhn 1 valtype::luhn5 1 valtype::usnpi 1 valtype::verhoeff 1 -websocket 1.3 wip 1.2 wip 2.2 xsxp 1.0 yaml 0.3.6 yencode 1.1.3 -zipfile::decode 0.4 -zipfile::encode 0.3 +zipfile::decode 0.2 +zipfile::encode 0.1 Index: support/releases/history/README-1.16.txt ================================================================== --- support/releases/history/README-1.16.txt +++ support/releases/history/README-1.16.txt @@ -1,12 +1,12 @@ Overview ======== 11 new packages in 7 modules - 45 changed packages in 26 modules + 44 changed packages in 26 modules 288 internally changed packages in 100 modules - 61 unchanged packages in 11 modules + 62 unchanged packages in 11 modules 411 packages, total in 114 modules, total New in tcllib 1.16 ================== @@ -34,11 +34,11 @@ tcllib 1.15 tcllib 1.16 Module Package Old Version New Version Comments ------------------ ------------------------------------ ------------- ------------- ---------- aes aes 1.1 1.1.1 B D T coroutine coroutine::auto 1.1 1.1.1 B D - dns ip 1.2 1.2.2 B D T + dns ip 1.2 1.2.1 B D T ------------------ ------------------------------------ ------------- ------------- ---------- doctools doctools 1.4.14 1.4.17 B D T doctools::changelog 1 1.1 D ------------------ ------------------------------------ ------------- ------------- ---------- fileutil fileutil 1.14.5 1.14.6 B D T @@ -69,12 +69,11 @@ rest rest 1.0 1.0.1 B D ------------------ ------------------------------------ ------------- ------------- ---------- sasl SASL 1.3.2 1.3.3 B D T SASL::NTLM 1.1.1 1.1.2 B D T ------------------ ------------------------------------ ------------- ------------- ---------- - struct struct::list 1.8.2 1.8.3 B D T - struct::matrix 1.2.1 1.2.1 D + struct struct::matrix 1.2.1 1.2.1 D struct::matrix 2.0.2 2.0.3 D struct::queue 1.4.4 1.4.5 B D T ------------------ ------------------------------------ ------------- ------------- ---------- tar tar 0.7.1 0.9 B D T tepam tepam 0.4.0 0.5.0 B D T @@ -494,13 +493,13 @@ page::transform::realizable, 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, pt::peg::container::peg, pt::peg::export::container, resolv, - spf, struct, text::write, tie::std::array, tie::std::dsource, - tie::std::file, tie::std::growfile, tie::std::log, - tie::std::rarray, transfer::copy::queue + spf, struct, struct::list, text::write, tie::std::array, + tie::std::dsource, tie::std::file, tie::std::growfile, + tie::std::log, tie::std::rarray, transfer::copy::queue Legend Change Details Comments ------ ------- --------- Major API: ** incompatible ** API changes.
                          zipfile::decodezipfile::encode Access to zip archives
                          zipfile::encode Generation of zip archives$x