summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2009-10-29 08:08:32 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2009-10-29 08:08:32 (GMT)
commit4110908a9c6a3510c762409aadf6d887a640baa4 (patch)
treed2759a89de422c382c2eb027f211f6195cbcc38d
parentd6e3f26a3c15aa9926fafac19a13388a9fae9367 (diff)
downloadtcl-4110908a9c6a3510c762409aadf6d887a640baa4.zip
tcl-4110908a9c6a3510c762409aadf6d887a640baa4.tar.gz
tcl-4110908a9c6a3510c762409aadf6d887a640baa4.tar.bz2
Remove accidental C99-ism which reportedly makes the AIX native compiler choke.
-rw-r--r--ChangeLog42
-rw-r--r--generic/tclZlib.c50
2 files changed, 54 insertions, 38 deletions
diff --git a/ChangeLog b/ChangeLog
index 17377c5..c621064 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,17 +1,22 @@
+2009-10-29 Donal K. Fellows <dkf@users.sf.net>
+
+ * generic/tclZlib.c (TclZlibCmd): Remove accidental C99-ism which
+ reportedly makes the AIX native compiler choke.
+
2009-10-29 Kevin B. Kenny <kennykb@acm.org>
* library/clock.tcl (LocalizeFormat):
* tests/clock.test (clock-67.1):
- Corrected a problem where '%%' followed by a letter in a format group
- could expand recursively: %%R would turn into %%H:%M:%S. [Bug 2819334]
+ [Bug 2819334]: Corrected a problem where '%%' followed by a letter in
+ a format group could expand recursively: %%R would turn into %%H:%M:%S
2009-10-28 Don Porter <dgp@users.sourceforge.net>
- * generic/tclLiteral.c: Fixed 2 bugs reported in [Bug 2888044].
+ * generic/tclLiteral.c: [Bug 2888044]: Fixed 2 bugs.
* tests/info.test: First, as noted in the comments of the
- TclCleanupLiteralTable routine, since the teardown of the intrep
- of one Tcl_Obj can cause the teardown of others in the same table,
- the full table cleanup must be done with care, but the code did not
+ TclCleanupLiteralTable routine, since the teardown of the intrep of
+ one Tcl_Obj can cause the teardown of others in the same table, the
+ full table cleanup must be done with care, but the code did not
contain the same care demanded in the comment. Second, recent
additions to the info.test file had poor hygiene, leaving an array
variable ::a lying around, which breaks later interp.test tests during
@@ -21,20 +26,19 @@
* tests/fileName.test (fileName-20.[78]): Corrected poor test
hygiene (failure to save and restore the working directory) that
- caused these two tests to fail on Windows (and [Bug 2806250]
- to be reopened).
-
+ caused these two tests to fail on Windows (and [Bug 2806250] to be
+ reopened).
+
2009-10-27 Don Porter <dgp@users.sourceforge.net>
- * generic/tclPathObj.c: Missing refcount on cached normalized path
- caused crashes. [Bug 2884203].
+ * generic/tclPathObj.c: [Bug 2884203]: Missing refcount on cached
+ normalized path caused crashes.
2009-10-27 Kevin B. Kenny <kennykb@acm.org>
- * library/clock.tcl (ParseClockScanFormat):
- Corrected a problem where [clock scan] didn't load the timezone
- soon enough when processing a time format that lacked a complete
- date. [Bug 2886852]
+ * library/clock.tcl (ParseClockScanFormat): [Bug 2886852]: Corrected a
+ problem where [clock scan] didn't load the timezone soon enough when
+ processing a time format that lacked a complete date.
* tests/clock.test (clock-66.1):
Added a test case for the above bug.
* library/tzdata/America/Argentina/Buenos_Aires:
@@ -83,10 +87,10 @@
2009-10-20 Don Porter <dgp@users.sourceforge.net>
* unix/Makefile.in: Removed the long outdated and broken targets
- package-* that were for building Solaris packages. Appears that
- the pieces needed for these targets to function have never been
- present in the current era of Tcl development and belong completely
- to Tcl pre-history.
+ package-* that were for building Solaris packages. Appears that the
+ pieces needed for these targets to function have never been present in
+ the current era of Tcl development and belong completely to Tcl
+ pre-history.
2009-10-19 Don Porter <dgp@users.sourceforge.net>
diff --git a/generic/tclZlib.c b/generic/tclZlib.c
index 5dc8c2e..7f5ff7b 100644
--- a/generic/tclZlib.c
+++ b/generic/tclZlib.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclZlib.c,v 1.30 2009/07/10 17:37:18 patthoyts Exp $
+ * RCS: @(#) $Id: tclZlib.c,v 1.31 2009/10/29 08:08:33 dkf Exp $
*/
#include "tclInt.h"
@@ -214,9 +214,13 @@ deflateSetHeader(
{
struct internal_state *state;
- if (strm == Z_NULL) return Z_STREAM_ERROR;
+ if (strm == Z_NULL) {
+ return Z_STREAM_ERROR;
+ }
state = (struct internal_state *) strm->state;
- if ((state == Z_NULL) || (state->wrap != 2)) return Z_STREAM_ERROR;
+ if ((state == Z_NULL) || (state->wrap != 2)) {
+ return Z_STREAM_ERROR;
+ }
state->gzhead = head;
return Z_OK;
}
@@ -227,9 +231,13 @@ static int inflateGetHeader(
{
struct inflate_state *state;
- if (strm == Z_NULL) return Z_STREAM_ERROR;
+ if (strm == Z_NULL) {
+ return Z_STREAM_ERROR;
+ }
state = (struct inflate_state *) strm->state;
- if ((state == Z_NULL) || ((state->wrap & 2) == 0)) return Z_STREAM_ERROR;
+ if ((state == Z_NULL) || ((state->wrap & 2) == 0)) {
+ return Z_STREAM_ERROR;
+ }
state->head = head;
head->done = 0;
return Z_OK;
@@ -1671,7 +1679,7 @@ TclZlibCmd(
};
enum zlibCommands {
z_adler32, z_compress, z_crc32, z_decompress, z_deflate, z_gunzip,
- z_gzip, z_inflate, z_push, z_stream,
+ z_gzip, z_inflate, z_push, z_stream
};
static const char *const stream_formats[] = {
"compress", "decompress", "deflate", "gunzip", "gzip", "inflate",
@@ -1792,8 +1800,8 @@ TclZlibCmd(
}
return Tcl_ZlibDeflate(interp, TCL_ZLIB_FORMAT_GZIP, objv[2], level,
headerDictObj);
- case z_inflate: /* inflate rawcomprdata ?bufferSize?
- * -> decompressedData */
+ case z_inflate: /* inflate rawcomprdata ?bufferSize?
+ * -> decompressedData */
if (objc < 3 || objc > 4) {
Tcl_WrongNumArgs(interp, 2, objv, "data ?bufferSize?");
return TCL_ERROR;
@@ -1809,8 +1817,9 @@ TclZlibCmd(
}
return Tcl_ZlibInflate(interp, TCL_ZLIB_FORMAT_RAW, objv[2],
buffersize, NULL);
- case z_decompress: /* decompress zlibcomprdata ?bufferSize?
- * -> decompressedData */
+ case z_decompress: /* decompress zlibcomprdata \
+ * ?bufferSize?
+ * -> decompressedData */
if (objc < 3 || objc > 4) {
Tcl_WrongNumArgs(interp, 2, objv, "data ?bufferSize?");
return TCL_ERROR;
@@ -1826,8 +1835,8 @@ TclZlibCmd(
}
return Tcl_ZlibInflate(interp, TCL_ZLIB_FORMAT_ZLIB, objv[2],
buffersize, NULL);
- case z_gunzip: /* gunzip gzippeddata ?bufferSize?
- * -> decompressedData */
+ case z_gunzip: /* gunzip gzippeddata ?bufferSize?
+ * -> decompressedData */
if (objc < 3 || objc > 5 || ((objc & 1) == 0)) {
Tcl_WrongNumArgs(interp, 2, objv, "data ?-headerVar varName?");
return TCL_ERROR;
@@ -1873,7 +1882,9 @@ TclZlibCmd(
return TCL_ERROR;
}
return TCL_OK;
- case z_stream: /* stream deflate/inflate/...gunzip ?level?*/
+ case z_stream: /* stream deflate/inflate/...gunzip \
+ * ?level?
+ * -> handleCmd */
if (objc < 3 || objc > 4) {
Tcl_WrongNumArgs(interp, 2, objv, "mode ?level?");
return TCL_ERROR;
@@ -1917,7 +1928,8 @@ TclZlibCmd(
}
Tcl_SetObjResult(interp, Tcl_ZlibStreamGetCommandName(zh));
return TCL_OK;
- case z_push: { /* push mode channel options...*/
+ case z_push: { /* push mode channel options...
+ * -> channel */
Tcl_Channel chan;
int chanMode, mode;
static const char *const pushOptions[] = {
@@ -2324,13 +2336,12 @@ ZlibTransformClose(
cd->outAllocated - cd->outStream.avail_out) < 0) {
/* TODO: is this the right way to do errors on close?
* Note: when close is called from FinalizeIOSubsystem
- * then interp may be NULL
- */
+ * then interp may be NULL */
if (!TclInThreadExit()) {
if (interp) {
Tcl_AppendResult(interp,
- "error while finalizing file: ",
- Tcl_PosixError(interp), NULL);
+ "error while finalizing file: ",
+ Tcl_PosixError(interp), NULL);
}
}
result = TCL_ERROR;
@@ -2383,8 +2394,9 @@ ZlibTransformInput(
}
if (e != Z_OK) {
Tcl_Obj *errObj = Tcl_NewListObj(0, NULL);
+
Tcl_ListObjAppendElement(NULL, errObj,
- Tcl_NewStringObj(cd->inStream.msg, -1));
+ Tcl_NewStringObj(cd->inStream.msg, -1));
Tcl_SetChannelError(cd->parent, errObj);
*errorCodePtr = EINVAL;
return -1;