<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to patches</title><link>https://sourceforge.net/p/tcllib/patches/</link><description>Recent changes to patches</description><atom:link href="https://sourceforge.net/p/tcllib/patches/feed.rss" rel="self"/><language>en</language><lastBuildDate>Wed, 10 Apr 2013 18:11:03 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/tcllib/patches/feed.rss" rel="self" type="application/rss+xml"/><item><title>Symmetrical json conversion</title><link>https://sourceforge.net/p/tcllib/patches/257/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I propose the following enhancement:&lt;/p&gt;
&lt;p&gt;proc json::dict2json {dictVal {keys {}}} {&lt;br /&gt;
set json ""&lt;br /&gt;
dict for {key val} $dictVal {&lt;br /&gt;
# key must always be a string, val may be a number, string or&lt;br /&gt;
# bare word (true|false|null) or a dict if provided in keys&lt;/p&gt;
&lt;p&gt;## check if we can resolve the value to a dictionary&lt;br /&gt;
if {($key in $keys) &amp;amp;&amp;amp; ![catch {dict keys $val}]} {&lt;br /&gt;
set val [json::dict2json $val $keys]&lt;br /&gt;
} elseif {![string is double -strict $val]&lt;br /&gt;
&amp;amp;&amp;amp; ![regexp {^(?:true|false|null)$} $val]} {&lt;br /&gt;
set val "\"$val\""&lt;br /&gt;
}&lt;br /&gt;
if {$json ne ""} {append json ","}&lt;br /&gt;
append json "\"$key\":$val"&lt;br /&gt;
}&lt;br /&gt;
return "\{${json}\}"&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;Normally one knows the keys in a dictionary, how else would you be able to access them? Thus you could also pass a list of all possible keys allowing for symmetric conversion:&lt;/p&gt;
&lt;p&gt;&amp;gt; json::json2dict {{"user1":{"maint":"yes"},"user2":{"maint":"no","home":{"town":"Vienna","state":"Austria"}}}}&lt;br /&gt;
user1 {maint yes} user2 {maint no home {town Vienna state Austria}}&lt;/p&gt;
&lt;p&gt;&amp;gt; json::dict2json {user1 {maint yes} user2 {maint no home {town Vienna state Austria}}} {user1 user2 home}&lt;br /&gt;
{"user1":{"maint":"yes"},"user2":{"maint":"no","home":{"town":"Vienna","state":"Austria"}}}&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Thomas Perschak</dc:creator><pubDate>Wed, 10 Apr 2013 18:11:03 -0000</pubDate><guid>https://sourceforge.net20045a75d107ff21ed6d99c33d6c1936604a6140</guid></item><item><title>Calendar closes by clicking year/month navigation arrow.</title><link>https://sourceforge.net/p/tcllib/patches/256/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I have modified dateentry &amp;lt;ButtonPress&amp;gt; binding not to close a calendar by clicking items tagged with "cbutton".&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Yusuke Yamasaki</dc:creator><pubDate>Fri, 08 Mar 2013 01:01:20 -0000</pubDate><guid>https://sourceforge.netdf7b414a2a336ca2be32cbf2a6574e2713c17ff6</guid></item><item><title>update iban valtype</title><link>https://sourceforge.net/p/tcllib/patches/255/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Update version for compatibility with IBAN Registry version 43&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">MaxJarek</dc:creator><pubDate>Tue, 26 Feb 2013 19:17:53 -0000</pubDate><guid>https://sourceforge.net078e5173d5042d1cae802ecbf797ad02d5c25a9e</guid></item><item><title>added imap "copy" command</title><link>https://sourceforge.net/p/tcllib/patches/254/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I've added a proc for the imap "copy" function, which is needed if you want to move a message from one mailbox to another.  Currently, it's not possible to move messages between folders with the imap4 library. This proc fixes that problem.&lt;/p&gt;
&lt;p&gt;To add this feature, paste the following proc below the "proc expunge" function in imap4.tcl&lt;/p&gt;
&lt;p&gt;May I ask that you add this patch to the imap library ?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;-john&lt;/p&gt;
&lt;p&gt;# copy : copy a message to a destination mailbox&lt;br /&gt;
proc copy {chan msgid mailbox} {&lt;br /&gt;
if {[simplecmd $chan COPY SELECT [list $msgid $mailbox]]} {&lt;br /&gt;
return 1&lt;br /&gt;
}&lt;br /&gt;
return 0&lt;br /&gt;
}&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Magnatune</dc:creator><pubDate>Mon, 11 Feb 2013 17:24:26 -0000</pubDate><guid>https://sourceforge.netfb2f558e77d87c0e2f838d5a6319974834c58b2d</guid></item><item><title>huddle get does not accept non-scalar dict keys</title><link>https://sourceforge.net/p/tcllib/patches/253/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Found a bug in how huddle dict objects lookup non-scalar keys.  The bug is in huddle::_key_reflexive and stems from the a non-scalar single key being passed via args (variadic mechanism).  The problem is that an extra set of curly braces ends up enclosing the key path when it finally gets passed to dict get (which errors).  A simple example is:&lt;br /&gt;
set h [huddle create {a a} b]&lt;br /&gt;
huddle get $h {a a}; # error thrown here&lt;/p&gt;
&lt;p&gt;I've seen this bug in huddle versions 0.1.3 through 0.1.5.&lt;/p&gt;
&lt;p&gt;A fix for this is attached along with some new tests, the files are modified versions of the huddle 0.1.5 source.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ethanp</dc:creator><pubDate>Wed, 20 Jun 2012 20:06:50 -0000</pubDate><guid>https://sourceforge.netf075984888465e0780b3474ed0f5c402da4ff75e</guid></item><item><title>iban validate</title><link>https://sourceforge.net/p/tcllib/patches/252/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;update version for compatibility with IBAN Registry version 35&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">MaxJarek</dc:creator><pubDate>Tue, 05 Jun 2012 21:34:28 -0000</pubDate><guid>https://sourceforge.neteb28746e0ccd691464000a33587fd4ff18be7fc9</guid></item><item><title>json:  pretty-printing a dictionary</title><link>https://sourceforge.net/p/tcllib/patches/251/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Based on json.tcl (1.1.2)&lt;br /&gt;
I added a new proc named "json2prettydict"&lt;/p&gt;
&lt;p&gt;Aim of this proc is to return a "pretty-printed" tcl-dictionary.&lt;/p&gt;
&lt;p&gt;I think this proc could be useful for documentating complex nested dictionaries.&lt;/p&gt;
&lt;p&gt;- Internal Notes -&lt;br /&gt;
"json2prettydict" is heavily based on existing json2dict and json::parseXXX procs.&lt;br /&gt;
I slightly changed the internal code of all json::parseXXX procs, so that&lt;br /&gt;
these procs, may be called in two ways: for getting a (traditional) tcl-dict&lt;br /&gt;
or for getting a pretty-printed tcl-dict.&lt;/p&gt;
&lt;p&gt;[Source code is attached]&lt;/p&gt;
&lt;p&gt;-------------------------------------&lt;br /&gt;
Here is a demo:&lt;/p&gt;
&lt;p&gt;set jsonStr { \
{ "photos": { "page": 1, "pages": "726", "perpage": 3, "total": "7257", &lt;br /&gt;
"photo": [&lt;br /&gt;
{ "id": "6974156079", "owner": "74957296@N08", "secret": "005d743f82", "server": "7197", "farm": 8, "title": "Kenya Watamu \"Deep Sea Fishing\" \"Indian Ocean\" \"Blue Marlin\"", "ispublic": 1, "isfriend": 0, "isfamily": 0 },&lt;br /&gt;
{ "id": "6822988100", "owner": "52857411@N08", "secret": "56630c18e8", "server": "7183", "farm": 8, "title": "Gedi Ruins, Local Guide", "ispublic": 1, "isfriend": 0, "isfamily": 0 },&lt;br /&gt;
{ "id": "6822909640", "owner": "52857411@N08", "secret": "f4e392ea36", "server": "7063", "farm": 8, "title": "Local Fisherman, Mida Creek", "ispublic": 1, "isfriend": 0, "isfamily": 0 }&lt;br /&gt;
] }, "stat": "ok" }&lt;br /&gt;
}&lt;br /&gt;
# First, just for comparision, call json2dict&lt;br /&gt;
set d1 [json::json2dict $jsonStr]&lt;br /&gt;
# result is the following&lt;br /&gt;
if {0} {&lt;/p&gt;
&lt;p&gt;photos {page 1 pages 726 perpage 3 total 7257 photo {{id 6974156079 owner 74957296@N08 secret 005d743f82 server 7197 farm 8 title {Kenya Watamu "Deep Sea Fishing" "Indian Ocean" "Blue Marlin"} ispublic 1 isfriend 0 isfamily 0} {id 6822988100 owner 52857411@N08 secret 56630c18e8 server 7183 farm 8 title {Gedi Ruins, Local Guide} ispublic 1 isfriend 0 isfamily 0} {id 6822909640 owner 52857411@N08 secret f4e392ea36 server 7063 farm 8 title {Local Fisherman, Mida Creek} ispublic 1 isfriend 0 isfamily 0}}} stat ok&lt;/p&gt;
&lt;p&gt;}&lt;br /&gt;
# Then create a pretty printed dictionary&lt;br /&gt;
set d2 [json::json2prettydict $jsonStr]&lt;br /&gt;
# result is the following&lt;br /&gt;
if {0} {&lt;/p&gt;
&lt;p&gt;photos {&lt;br /&gt;
page 1&lt;br /&gt;
pages 726&lt;br /&gt;
perpage 3&lt;br /&gt;
total 7257&lt;br /&gt;
photo {&lt;br /&gt;
{&lt;br /&gt;
id 6974156079&lt;br /&gt;
owner 74957296@N08&lt;br /&gt;
secret 005d743f82&lt;br /&gt;
server 7197&lt;br /&gt;
farm 8&lt;br /&gt;
title {Kenya Watamu "Deep Sea Fishing" "Indian Ocean" "Blue Marlin"}&lt;br /&gt;
ispublic 1&lt;br /&gt;
isfriend 0&lt;br /&gt;
isfamily 0&lt;br /&gt;
}&lt;br /&gt;
{&lt;br /&gt;
id 6822988100&lt;br /&gt;
owner 52857411@N08&lt;br /&gt;
secret 56630c18e8&lt;br /&gt;
server 7183&lt;br /&gt;
farm 8&lt;br /&gt;
title {Gedi Ruins, Local Guide}&lt;br /&gt;
ispublic 1&lt;br /&gt;
isfriend 0&lt;br /&gt;
isfamily 0&lt;br /&gt;
}&lt;br /&gt;
{&lt;br /&gt;
id 6822909640&lt;br /&gt;
owner 52857411@N08&lt;br /&gt;
secret f4e392ea36&lt;br /&gt;
server 7063&lt;br /&gt;
farm 8&lt;br /&gt;
title {Local Fisherman, Mida Creek}&lt;br /&gt;
ispublic 1&lt;br /&gt;
isfriend 0&lt;br /&gt;
isfamily 0&lt;br /&gt;
}&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;}&lt;br /&gt;
stat ok&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;# -- end&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Aldo Buratti</dc:creator><pubDate>Mon, 19 Mar 2012 11:40:11 -0000</pubDate><guid>https://sourceforge.net2717ee49a4892ab879a3c07101d2b069e9473b13</guid></item><item><title>New Module: socks5</title><link>https://sourceforge.net/p/tcllib/patches/250/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Patch to add a new module for establishing connections via SOCKS 5 proxies.  The patch was generated against the 1.14 release tarball.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Blair Kitchen</dc:creator><pubDate>Sat, 10 Mar 2012 23:19:28 -0000</pubDate><guid>https://sourceforge.netb5441b5e6155df0fce78120375b775924aa5a32b</guid></item><item><title>::S3 missing "Host:" header</title><link>https://sourceforge.net/p/tcllib/patches/249/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;::S3 does not send a "Host:" header.&lt;br /&gt;
This causes "HTTP/1.1 400 Bad Request" to be returned by some transparent proxies.&lt;br /&gt;
(e.g. when using Telstra 3G through the telstra.iph APN).&lt;/p&gt;
&lt;p&gt;The patch below sets the host header.&lt;/p&gt;
&lt;p&gt;--- /System/Library/Tcl/tcllib1.12/amazon-s3/S3.tcl.orig   2012-02-25 15:32:45.000000000 +1100&lt;br /&gt;
+++ /System/Library/Tcl/tcllib1.12/amazon-s3/S3.tcl 2012-03-02 09:13:07.000000000 +1100&lt;br /&gt;
@@ -252,6 +252,7 @@&lt;br /&gt;
if {${content-type} != ""} {&lt;br /&gt;
dict set headers content-type ${content-type}&lt;br /&gt;
}&lt;br /&gt;
+    dict set headers host s3.amazonaws.com &lt;br /&gt;
set xamz ""&lt;br /&gt;
foreach key [lsort [dict keys $headers x-amz-*]] {&lt;br /&gt;
# Assume each is seen only once, for now, and is canonical already.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sam O'Connor</dc:creator><pubDate>Thu, 01 Mar 2012 22:18:55 -0000</pubDate><guid>https://sourceforge.net6d831abe7fa08c803baf2358e02d5c2b80529b76</guid></item><item><title>First go at installing tcl modules</title><link>https://sourceforge.net/p/tcllib/patches/248/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Attached patch gives the installer the ability to install (some) packages as tcl modules.&lt;br /&gt;
Also adds -destdir option, similar to ${DESTDIR} in Tcl's Makefile.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Stuart Cassoff</dc:creator><pubDate>Wed, 29 Feb 2012 23:26:49 -0000</pubDate><guid>https://sourceforge.net0df18ef278237c64f9e58366e12805dca9e78339</guid></item></channel></rss>