summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tkImgGIF.c37
1 files changed, 23 insertions, 14 deletions
diff --git a/generic/tkImgGIF.c b/generic/tkImgGIF.c
index 33bf004..a22e2c9 100644
--- a/generic/tkImgGIF.c
+++ b/generic/tkImgGIF.c
@@ -436,7 +436,8 @@ FileReadGIF(
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"no value given for \"%s\" option",
Tcl_GetString(objv[i])));
- Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "OPT_VALUE", NULL);
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "OPT_VALUE",
+ (char *) NULL);
return TCL_ERROR;
}
if (Tcl_GetIntFromObj(interp, objv[++i], &index) != TCL_OK) {
@@ -451,13 +452,15 @@ FileReadGIF(
if (!ReadGIFHeader(gifConfPtr, chan, &fileWidth, &fileHeight)) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"couldn't read GIF header from file \"%s\"", fileName));
- Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "HEADER", NULL);
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "HEADER",
+ (char *) NULL);
return TCL_ERROR;
}
if ((fileWidth <= 0) || (fileHeight <= 0)) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"GIF image file \"%s\" has dimension(s) <= 0", fileName));
- Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "BOGUS_SIZE", NULL);
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "BOGUS_SIZE",
+ (char *) NULL);
return TCL_ERROR;
}
@@ -471,7 +474,8 @@ FileReadGIF(
*/
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"GIF file truncated", -1));
- Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "TRUNCATED", NULL);
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "TRUNCATED",
+ (char *) NULL);
return TCL_ERROR;
}
bitPixel = 2 << (buf[0] & 0x07);
@@ -480,7 +484,8 @@ FileReadGIF(
if (!ReadColorMap(gifConfPtr, chan, bitPixel, colorMap)) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"error reading color map", -1));
- Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "COLOR_MAP", NULL);
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "COLOR_MAP",
+ (char *) NULL);
return TCL_ERROR;
}
}
@@ -519,7 +524,7 @@ FileReadGIF(
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"premature end of image data for this index", -1));
Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "PREMATURE_END",
- NULL);
+ (char *) NULL);
goto error;
}
@@ -527,7 +532,8 @@ FileReadGIF(
case GIF_TERMINATOR:
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"no image data for this index", -1));
- Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "NO_DATA", NULL);
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "NO_DATA",
+ (char *) NULL);
goto error;
case GIF_EXTENSION:
@@ -540,7 +546,7 @@ FileReadGIF(
"error reading extension function code in GIF image",
-1));
Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "BAD_EXT",
- NULL);
+ (char *) NULL);
goto error;
}
if (DoExtension(gifConfPtr, chan, buf[0],
@@ -548,7 +554,7 @@ FileReadGIF(
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"error reading extension in GIF image", -1));
Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "BAD_EXT",
- NULL);
+ (char *) NULL);
goto error;
}
continue;
@@ -558,7 +564,7 @@ FileReadGIF(
"couldn't read left/top/width/height in GIF image",
-1));
Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "DIMENSIONS",
- NULL);
+ (char *) NULL);
goto error;
}
break;
@@ -589,7 +595,7 @@ FileReadGIF(
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"error reading color map", -1));
Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF",
- "COLOR_MAP", NULL);
+ "COLOR_MAP", (char *) NULL);
goto error;
}
}
@@ -651,7 +657,8 @@ FileReadGIF(
if (!ReadColorMap(gifConfPtr, chan, bitPixel, colorMap)) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"error reading color map", -1));
- Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "COLOR_MAP", NULL);
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "COLOR_MAP",
+ (char *) NULL);
goto error;
}
}
@@ -1079,7 +1086,8 @@ ReadImage(
if (initialCodeSize > MAX_LWZ_BITS) {
Tcl_SetObjResult(interp, Tcl_NewStringObj("malformed image", -1));
- Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "MALFORMED", NULL);
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "MALFORMED",
+ (char *) NULL);
return TCL_ERROR;
}
@@ -1768,7 +1776,8 @@ CommonWriteGIF(
SaveMap(&state, blockPtr);
if (state.num >= MAXCOLORMAPSIZE) {
Tcl_SetObjResult(interp, Tcl_NewStringObj("too many colors", -1));
- Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "COLORFUL", NULL);
+ Tcl_SetErrorCode(interp, "TK", "IMAGE", "GIF", "COLORFUL",
+ (char *) NULL);
return TCL_ERROR;
}
if (state.num<2) {