summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-04-20 10:22:03 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-04-20 10:22:03 (GMT)
commitace56e587278e676259306f1a89602f3ca679f52 (patch)
tree49f99e115ef3d5e6f0e70b5c450510f00b09f24e
parentbb60b9fc1e715c3640c74a5da73c066efabf15c1 (diff)
downloadtcl-ace56e587278e676259306f1a89602f3ca679f52.zip
tcl-ace56e587278e676259306f1a89602f3ca679f52.tar.gz
tcl-ace56e587278e676259306f1a89602f3ca679f52.tar.bz2
another bit of fconfigure guts
-rw-r--r--generic/tclZlib.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/generic/tclZlib.c b/generic/tclZlib.c
index 0caa02b..6290d60 100644
--- a/generic/tclZlib.c
+++ b/generic/tclZlib.c
@@ -2859,7 +2859,24 @@ ZlibTransformGetOption(
}
if (optionName == NULL || strcmp(optionName, "-dictionary") == 0) {
- // TODO dictionary option
+ /*
+ * Embedded NUL bytes are ok; they'll be C080-encoded.
+ */
+
+ if (optionName == NULL) {
+ Tcl_DStringAppendElement(dsPtr, "-dictionary");
+ if (cd->compDictObj) {
+ Tcl_DStringAppendElement(dsPtr,
+ Tcl_GetString(cd->compDictObj));
+ } else {
+ Tcl_DStringAppendElement(dsPtr, "");
+ }
+ } else {
+ int len;
+ const char *str = Tcl_GetStringFromObj(cd->compDictObj, &len);
+
+ Tcl_DStringAppend(dsPtr, str, len);
+ }
}
/*