summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-10-30 22:12:13 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-10-30 22:12:13 (GMT)
commita05dc9b185fda9d8855e624419f85919b3596742 (patch)
treeb19eab9e82ac8a9470ab609b9d256139b35d5c3a
parent3c5db5a964e812619488d2c39b738a480c49ce39 (diff)
parent1c562792a5e80ef3362c78bba77a17b0809983c8 (diff)
downloadtk-a05dc9b185fda9d8855e624419f85919b3596742.zip
tk-a05dc9b185fda9d8855e624419f85919b3596742.tar.gz
tk-a05dc9b185fda9d8855e624419f85919b3596742.tar.bz2
Merge 8.6
-rw-r--r--generic/tkImgBmap.c39
1 files changed, 18 insertions, 21 deletions
diff --git a/generic/tkImgBmap.c b/generic/tkImgBmap.c
index eec8730..3ff3a81 100644
--- a/generic/tkImgBmap.c
+++ b/generic/tkImgBmap.c
@@ -77,15 +77,15 @@ static int GetByte(Tcl_Channel chan);
static int ImgBmapCreate(Tcl_Interp *interp,
const char *name, Tcl_Size objc, Tcl_Obj *const objv[],
const Tk_ImageType *typePtr, Tk_ImageModel model,
- ClientData *clientDataPtr);
-static ClientData ImgBmapGet(Tk_Window tkwin, ClientData clientData);
-static void ImgBmapDisplay(ClientData clientData,
+ void **clientDataPtr);
+static ClientData ImgBmapGet(Tk_Window tkwin, void *clientData);
+static void ImgBmapDisplay(void *clientData,
Display *display, Drawable drawable,
int imageX, int imageY, int width, int height,
int drawableX, int drawableY);
-static void ImgBmapFree(ClientData clientData, Display *display);
-static void ImgBmapDelete(ClientData clientData);
-static int ImgBmapPostscript(ClientData clientData,
+static void ImgBmapFree(void *clientData, Display *display);
+static void ImgBmapDelete(void *clientData);
+static int ImgBmapPostscript(void *clientData,
Tcl_Interp *interp, Tk_Window tkwin,
Tk_PostscriptInfo psinfo, int x, int y,
int width, int height, int prepass);
@@ -145,9 +145,9 @@ typedef struct ParseInfo {
* Prototypes for procedures used only locally in this file:
*/
-static int ImgBmapCmd(ClientData clientData, Tcl_Interp *interp,
+static int ImgBmapCmd(void *clientData, Tcl_Interp *interp,
int objc, Tcl_Obj *const objv[]);
-static void ImgBmapCmdDeletedProc(ClientData clientData);
+static void ImgBmapCmdDeletedProc(void *clientData);
static void ImgBmapConfigureInstance(BitmapInstance *instancePtr);
static int ImgBmapConfigureModel(BitmapModel *modelPtr,
Tcl_Size objc, Tcl_Obj *const objv[], int flags);
@@ -177,14 +177,13 @@ ImgBmapCreate(
Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[], /* Argument objects for options (doesn't
* include image name or type). */
- const Tk_ImageType *typePtr,/* Pointer to our type record (not used). */
+ TCL_UNUSED(const Tk_ImageType *),/* Pointer to our type record (not used). */
Tk_ImageModel model, /* Token for image, to be used by us in later
* callbacks. */
- ClientData *clientDataPtr) /* Store manager's token for image here; it
+ void **clientDataPtr) /* Store manager's token for image here; it
* will be returned in later callbacks. */
{
BitmapModel *modelPtr = (BitmapModel *)ckalloc(sizeof(BitmapModel));
- (void)typePtr;
modelPtr->tkModel = model;
modelPtr->interp = interp;
@@ -745,7 +744,7 @@ NextBitmapWord(
static int
ImgBmapCmd(
- ClientData clientData, /* Information about the image model. */
+ void *clientData, /* Information about the image model. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -810,7 +809,7 @@ static ClientData
ImgBmapGet(
Tk_Window tkwin, /* Window in which the instance will be
* used. */
- ClientData modelData) /* Pointer to our model structure for the
+ void *modelData) /* Pointer to our model structure for the
* image. */
{
BitmapModel *modelPtr = (BitmapModel *)modelData;
@@ -877,7 +876,7 @@ ImgBmapGet(
static void
ImgBmapDisplay(
- ClientData clientData, /* Pointer to BitmapInstance structure for
+ void *clientData, /* Pointer to BitmapInstance structure for
* instance to be displayed. */
Display *display, /* Display on which to draw image. */
Drawable drawable, /* Pixmap or window in which to draw image. */
@@ -938,7 +937,7 @@ ImgBmapDisplay(
static void
ImgBmapFree(
- ClientData clientData, /* Pointer to BitmapInstance structure for
+ void *clientData, /* Pointer to BitmapInstance structure for
* instance to be displayed. */
Display *display) /* Display containing window that used image. */
{
@@ -1000,7 +999,7 @@ ImgBmapFree(
static void
ImgBmapDelete(
- ClientData modelData) /* Pointer to BitmapModel structure for
+ void *modelData) /* Pointer to BitmapModel structure for
* image. Must not have any more instances. */
{
BitmapModel *modelPtr = (BitmapModel *)modelData;
@@ -1041,7 +1040,7 @@ ImgBmapDelete(
static void
ImgBmapCmdDeletedProc(
- ClientData clientData) /* Pointer to BitmapModel structure for
+ void *clientData) /* Pointer to BitmapModel structure for
* image. */
{
BitmapModel *modelPtr = (BitmapModel *)clientData;
@@ -1073,10 +1072,8 @@ GetByte(
Tcl_Channel chan) /* The channel we read from. */
{
char buffer;
- size_t size;
- size = Tcl_Read(chan, &buffer, 1);
- if (size != 1) {
+ if (Tcl_Read(chan, &buffer, 1) != 1) {
return EOF;
} else {
return buffer;
@@ -1184,7 +1181,7 @@ ImgBmapPsImagemask(
static int
ImgBmapPostscript(
- ClientData clientData,
+ void *clientData,
Tcl_Interp *interp,
Tk_Window tkwin,
Tk_PostscriptInfo psinfo,