summaryrefslogtreecommitdiffstats
path: root/generic/tclZlib.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-07-10 05:51:56 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-07-10 05:51:56 (GMT)
commit2a3d586a796e62f522303b3ab71c84743a73bf89 (patch)
tree75ee68f89422b10ec42523bafa46fae061c6489d /generic/tclZlib.c
parentd409a29e57b2d4ced1bad4b0bb5bb1e2387f4120 (diff)
parent6cf70a8d484881c9886d7d0cd5d2b9b6feac10fb (diff)
downloadtcl-2a3d586a796e62f522303b3ab71c84743a73bf89.zip
tcl-2a3d586a796e62f522303b3ab71c84743a73bf89.tar.gz
tcl-2a3d586a796e62f522303b3ab71c84743a73bf89.tar.bz2
Merge 8.7, and continue implementation. Almost done
Diffstat (limited to 'generic/tclZlib.c')
-rw-r--r--generic/tclZlib.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/generic/tclZlib.c b/generic/tclZlib.c
index 8dbe807..09195a2 100644
--- a/generic/tclZlib.c
+++ b/generic/tclZlib.c
@@ -699,7 +699,7 @@ Tcl_ZlibStreamInit(
case TCL_ZLIB_FORMAT_GZIP:
wbits = WBITS_GZIP;
if (dictObj) {
- gzHeaderPtr = ckalloc(sizeof(GzipHeader));
+ gzHeaderPtr = (GzipHeader *)ckalloc(sizeof(GzipHeader));
memset(gzHeaderPtr, 0, sizeof(GzipHeader));
if (GenerateHeader(interp, dictObj, gzHeaderPtr,
NULL) != TCL_OK) {
@@ -733,7 +733,7 @@ Tcl_ZlibStreamInit(
break;
case TCL_ZLIB_FORMAT_GZIP:
wbits = WBITS_GZIP;
- gzHeaderPtr = ckalloc(sizeof(GzipHeader));
+ gzHeaderPtr = (GzipHeader *)ckalloc(sizeof(GzipHeader));
memset(gzHeaderPtr, 0, sizeof(GzipHeader));
gzHeaderPtr->header.name = (Bytef *)
gzHeaderPtr->nativeFilenameBuf;
@@ -759,7 +759,7 @@ Tcl_ZlibStreamInit(
" TCL_ZLIB_STREAM_INFLATE");
}
- zshPtr = ckalloc(sizeof(ZlibStreamHandle));
+ zshPtr = (ZlibStreamHandle *)ckalloc(sizeof(ZlibStreamHandle));
zshPtr->interp = interp;
zshPtr->mode = mode;
zshPtr->format = format;
@@ -886,7 +886,7 @@ static void
ZlibStreamCmdDelete(
void *cd)
{
- ZlibStreamHandle *zshPtr = cd;
+ ZlibStreamHandle *zshPtr = (ZlibStreamHandle *)cd;
zshPtr->cmd = NULL;
ZlibStreamCleanup(zshPtr);
@@ -1233,7 +1233,7 @@ Tcl_ZlibStreamPut(
if (outSize > BUFFER_SIZE_LIMIT) {
outSize = BUFFER_SIZE_LIMIT;
}
- dataTmp = ckalloc(outSize);
+ dataTmp = (char *)ckalloc(outSize);
while (1) {
e = Deflate(&zshPtr->stream, dataTmp, outSize, flush, &toStore);
@@ -1267,7 +1267,7 @@ Tcl_ZlibStreamPut(
if (outSize < BUFFER_SIZE_LIMIT) {
outSize = BUFFER_SIZE_LIMIT;
/* There may be *lots* of data left to output... */
- dataTmp = ckrealloc(dataTmp, outSize);
+ dataTmp = (char *)ckrealloc(dataTmp, outSize);
}
}
@@ -1752,10 +1752,10 @@ Tcl_ZlibInflate(
if (gzipHeaderDictObj) {
headerPtr = &header;
memset(headerPtr, 0, sizeof(gz_header));
- nameBuf = ckalloc(MAXPATHLEN);
+ nameBuf = (char *)ckalloc(MAXPATHLEN);
header.name = (Bytef *) nameBuf;
header.name_max = MAXPATHLEN - 1;
- commentBuf = ckalloc(MAX_COMMENT_LEN);
+ commentBuf = (char *)ckalloc(MAX_COMMENT_LEN);
header.comment = (Bytef *) commentBuf;
header.comm_max = MAX_COMMENT_LEN - 1;
}
@@ -2521,7 +2521,7 @@ ZlibStreamCmd(
int objc,
Tcl_Obj *const objv[])
{
- Tcl_ZlibStream zstream = cd;
+ Tcl_ZlibStream zstream = (Tcl_ZlibStream)cd;
int command, count, code;
Tcl_Obj *obj;
static const char *const cmds[] = {
@@ -2647,7 +2647,7 @@ ZlibStreamAddCmd(
int objc,
Tcl_Obj *const objv[])
{
- Tcl_ZlibStream zstream = cd;
+ Tcl_ZlibStream zstream = (Tcl_ZlibStream)cd;
int index, code, buffersize = -1, flush = -1, i;
Tcl_Obj *obj, *compDictObj = NULL;
static const char *const add_options[] = {
@@ -2771,7 +2771,7 @@ ZlibStreamPutCmd(
int objc,
Tcl_Obj *const objv[])
{
- Tcl_ZlibStream zstream = cd;
+ Tcl_ZlibStream zstream = (Tcl_ZlibStream)cd;
int index, flush = -1, i;
Tcl_Obj *compDictObj = NULL;
static const char *const put_options[] = {
@@ -2860,7 +2860,7 @@ ZlibStreamHeaderCmd(
int objc,
Tcl_Obj *const objv[])
{
- ZlibStreamHandle *zshPtr = cd;
+ ZlibStreamHandle *zshPtr = (ZlibStreamHandle *)cd;
Tcl_Obj *resultObj;
if (objc != 2) {
@@ -2897,7 +2897,7 @@ ZlibTransformClose(
void *instanceData,
Tcl_Interp *interp)
{
- ZlibChannelData *cd = instanceData;
+ ZlibChannelData *cd = (ZlibChannelData *)instanceData;
int e, written, result = TCL_OK;
/*
@@ -2990,7 +2990,7 @@ ZlibTransformInput(
int toRead,
int *errorCodePtr)
{
- ZlibChannelData *cd = instanceData;
+ ZlibChannelData *cd = (ZlibChannelData *)instanceData;
Tcl_DriverInputProc *inProc =
Tcl_ChannelInputProc(Tcl_GetChannelType(cd->parent));
int readBytes, gotBytes, copied;
@@ -3104,7 +3104,7 @@ ZlibTransformOutput(
int toWrite,
int *errorCodePtr)
{
- ZlibChannelData *cd = instanceData;
+ ZlibChannelData *cd = (ZlibChannelData *)instanceData;
Tcl_DriverOutputProc *outProc =
Tcl_ChannelOutputProc(Tcl_GetChannelType(cd->parent));
int e, produced;
@@ -3225,7 +3225,7 @@ ZlibTransformSetOption( /* not used */
const char *optionName,
const char *value)
{
- ZlibChannelData *cd = instanceData;
+ ZlibChannelData *cd = (ZlibChannelData *)instanceData;
Tcl_DriverSetOptionProc *setOptionProc =
Tcl_ChannelSetOptionProc(Tcl_GetChannelType(cd->parent));
static const char *compressChanOptions = "dictionary flush";
@@ -3338,7 +3338,7 @@ ZlibTransformGetOption(
const char *optionName,
Tcl_DString *dsPtr)
{
- ZlibChannelData *cd = instanceData;
+ ZlibChannelData *cd = (ZlibChannelData *)instanceData;
Tcl_DriverGetOptionProc *getOptionProc =
Tcl_ChannelGetOptionProc(Tcl_GetChannelType(cd->parent));
static const char *compressChanOptions = "checksum dictionary";
@@ -3456,7 +3456,7 @@ ZlibTransformWatch(
void *instanceData,
int mask)
{
- ZlibChannelData *cd = instanceData;
+ ZlibChannelData *cd = (ZlibChannelData *)instanceData;
Tcl_DriverWatchProc *watchProc;
/*
@@ -3479,7 +3479,7 @@ ZlibTransformEventHandler(
void *instanceData,
int interestMask)
{
- ZlibChannelData *cd = instanceData;
+ ZlibChannelData *cd = (ZlibChannelData *)instanceData;
ZlibTransformEventTimerKill(cd);
return interestMask;
@@ -3499,7 +3499,7 @@ static void
ZlibTransformTimerRun(
void *clientData)
{
- ZlibChannelData *cd = clientData;
+ ZlibChannelData *cd = (ZlibChannelData *)clientData;
cd->timer = NULL;
Tcl_NotifyChannel(cd->chan, TCL_READABLE);
@@ -3522,7 +3522,7 @@ ZlibTransformGetHandle(
int direction,
void **handlePtr)
{
- ZlibChannelData *cd = instanceData;
+ ZlibChannelData *cd = (ZlibChannelData *)instanceData;
return Tcl_GetChannelHandle(cd->parent, direction, handlePtr);
}
@@ -3542,7 +3542,7 @@ ZlibTransformBlockMode(
void *instanceData,
int mode)
{
- ZlibChannelData *cd = instanceData;
+ ZlibChannelData *cd = (ZlibChannelData *)instanceData;
if (mode == TCL_MODE_NONBLOCKING) {
cd->flags |= ASYNC;
@@ -3592,7 +3592,7 @@ ZlibStackChannelTransform(
* dictionary (not dictObj!) to use if
* necessary. */
{
- ZlibChannelData *cd = ckalloc(sizeof(ZlibChannelData));
+ ZlibChannelData *cd = (ZlibChannelData *)ckalloc(sizeof(ZlibChannelData));
Tcl_Channel chan;
int wbits = 0;
@@ -3652,7 +3652,7 @@ ZlibStackChannelTransform(
goto error;
}
cd->inAllocated = DEFAULT_BUFFER_SIZE;
- cd->inBuffer = ckalloc(cd->inAllocated);
+ cd->inBuffer = (char *)ckalloc(cd->inAllocated);
if (cd->flags & IN_HEADER) {
if (inflateGetHeader(&cd->inStream, &cd->inHeader.header) != Z_OK) {
goto error;
@@ -3669,7 +3669,7 @@ ZlibStackChannelTransform(
goto error;
}
cd->outAllocated = DEFAULT_BUFFER_SIZE;
- cd->outBuffer = ckalloc(cd->outAllocated);
+ cd->outBuffer = (char *)ckalloc(cd->outAllocated);
if (cd->flags & OUT_HEADER) {
if (deflateSetHeader(&cd->outStream, &cd->outHeader.header) != Z_OK) {
goto error;