summaryrefslogtreecommitdiffstats
path: root/generic/tkImgGIF.c
diff options
context:
space:
mode:
authorhobbs <hobbs>2000-02-08 11:31:28 (GMT)
committerhobbs <hobbs>2000-02-08 11:31:28 (GMT)
commitacfa815d400ff9f351e628c2dd24089170b2bfe3 (patch)
treeaaba98591be690b73fe87702aaa4023a89457083 /generic/tkImgGIF.c
parent4a0d1284957db786ed4b02c4a426b3681212565f (diff)
downloadtk-acfa815d400ff9f351e628c2dd24089170b2bfe3.zip
tk-acfa815d400ff9f351e628c2dd24089170b2bfe3.tar.gz
tk-acfa815d400ff9f351e628c2dd24089170b2bfe3.tar.bz2
* generic/tkDecls.h:
* generic/tk.decls: * generic/tk.h: moved new public functions created in dash patch to the stubs interface [Bug: 4062] * generic/tk.h: * doc/CrtImgType.3: * doc/CrtPhImgFmt.3: * generic/tk.h: * generic/tkImgGIF.c: * generic/tkImgPhoto.c: * generic/tkStubImg.c (new file): * generic/tkTest.c: * unix/Makefile.in: * win/Makefile.in: * win/makefile.vc: improved support for moving from the old style image C API to the new obj'ified one with new Tk_InitImageArgs command and stub'ing of image code. See docs for how to make the transition. [Bug: 4060]
Diffstat (limited to 'generic/tkImgGIF.c')
-rw-r--r--generic/tkImgGIF.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/generic/tkImgGIF.c b/generic/tkImgGIF.c
index 87a90c7..e3a4085 100644
--- a/generic/tkImgGIF.c
+++ b/generic/tkImgGIF.c
@@ -29,7 +29,7 @@
* | provided "as is" without express or implied warranty. |
* +-------------------------------------------------------------------+
*
- * RCS: @(#) $Id: tkImgGIF.c,v 1.10 2000/01/27 16:58:42 ericm Exp $
+ * RCS: @(#) $Id: tkImgGIF.c,v 1.11 2000/02/08 11:31:33 hobbs Exp $
*/
/*
@@ -78,11 +78,11 @@ static Tcl_ThreadDataKey dataKey;
* The format record for the GIF file format:
*/
-static int FileMatchGIF _ANSI_ARGS_((Tcl_Channel chan, char *fileName,
+static int FileMatchGIF _ANSI_ARGS_((Tcl_Channel chan, CONST char *fileName,
Tcl_Obj *format, int *widthPtr, int *heightPtr,
Tcl_Interp *interp));
static int FileReadGIF _ANSI_ARGS_((Tcl_Interp *interp,
- Tcl_Channel chan, char *fileName, Tcl_Obj *format,
+ Tcl_Channel chan, CONST char *fileName, Tcl_Obj *format,
Tk_PhotoHandle imageHandle, int destX, int destY,
int width, int height, int srcX, int srcY));
static int StringMatchGIF _ANSI_ARGS_(( Tcl_Obj *dataObj,
@@ -93,14 +93,14 @@ static int StringReadGIF _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Obj *dataObj,
int destX, int destY, int width, int height,
int srcX, int srcY));
static int FileWriteGIF _ANSI_ARGS_((Tcl_Interp *interp,
- char *filename, Tcl_Obj *format,
+ CONST char *filename, Tcl_Obj *format,
Tk_PhotoImageBlock *blockPtr));
static int CommonWriteGIF _ANSI_ARGS_((Tcl_Interp *interp,
Tcl_Channel handle, Tcl_Obj *format,
Tk_PhotoImageBlock *blockPtr));
Tk_PhotoImageFormat tkImgFmtGIF = {
- "GIF", /* name */
+ "gif", /* name */
FileMatchGIF, /* fileMatchProc */
StringMatchGIF, /* stringMatchProc */
FileReadGIF, /* fileReadProc */
@@ -177,7 +177,7 @@ static void mInit _ANSI_ARGS_((unsigned char *string,
static int
FileMatchGIF(chan, fileName, format, widthPtr, heightPtr, interp)
Tcl_Channel chan; /* The image file, open for reading. */
- char *fileName; /* The name of the image file. */
+ CONST char *fileName; /* The name of the image file. */
Tcl_Obj *format; /* User-specified format object, or NULL. */
int *widthPtr, *heightPtr; /* The dimensions of the image are
* returned here if the file is a valid
@@ -212,7 +212,7 @@ FileReadGIF(interp, chan, fileName, format, imageHandle, destX, destY,
width, height, srcX, srcY)
Tcl_Interp *interp; /* Interpreter to use for reporting errors. */
Tcl_Channel chan; /* The image file, open for reading. */
- char *fileName; /* The name of the image file. */
+ CONST char *fileName; /* The name of the image file. */
Tcl_Obj *format; /* User-specified format object, or NULL. */
Tk_PhotoHandle imageHandle; /* The photo image to write into. */
int destX, destY; /* Coordinates of top-left pixel in
@@ -1323,14 +1323,14 @@ static int no_bits _ANSI_ARGS_((int colors));
static int
FileWriteGIF (interp, filename, format, blockPtr)
Tcl_Interp *interp; /* Interpreter to use for reporting errors. */
- char *filename;
+ CONST char *filename;
Tcl_Obj *format;
Tk_PhotoImageBlock *blockPtr;
{
Tcl_Channel chan = NULL;
int result;
- chan = Tcl_OpenFileChannel(interp, filename, "w", 0644);
+ chan = Tcl_OpenFileChannel(interp, (char *) filename, "w", 0644);
if (!chan) {
return TCL_ERROR;
}