diff options
Diffstat (limited to 'unix/tkUnixButton.c')
-rw-r--r-- | unix/tkUnixButton.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/unix/tkUnixButton.c b/unix/tkUnixButton.c index 373f2e3..e45812e 100644 --- a/unix/tkUnixButton.c +++ b/unix/tkUnixButton.c @@ -35,9 +35,11 @@ typedef struct UnixButton { * The class function table for the button widgets. */ -Tk_ClassProcs tkpButtonProcs = { +const Tk_ClassProcs tkpButtonProcs = { sizeof(Tk_ClassProcs), /* size */ TkButtonWorldChanged, /* worldChangedProc */ + NULL, /* createProc */ + NULL /* modalProc */ }; /* @@ -55,7 +57,7 @@ Tk_ClassProcs tkpButtonProcs = { */ /* XPM */ -static char *button_images[] = { +static const char *const button_images[] = { /* width height ncolors chars_per_pixel */ "52 26 7 1", /* colors */ @@ -279,7 +281,7 @@ TkpDrawCheckIndicator( for (iy=0 ; iy<dim ; iy++) { for (ix=0 ; ix<dim ; ix++) { XPutPixel(img, ix, iy, - imgColors[button_images[imgstart+iy][imgsel+ix] - 'A'] ); + imgColors[button_images[imgstart+iy][imgsel+ix] - 'A']); } } @@ -293,9 +295,9 @@ TkpDrawCheckIndicator( copyGC = Tk_GetGC(tkwin, 0, &gcValues); XPutImage(display, pixmap, copyGC, img, 0, 0, 0, 0, - (unsigned int)dim, (unsigned int)dim); + (unsigned)dim, (unsigned)dim); XCopyArea(display, pixmap, d, copyGC, 0, 0, - (unsigned int)dim, (unsigned int)dim, x, y); + (unsigned)dim, (unsigned)dim, x, y); /* * Tidy up. @@ -326,7 +328,8 @@ TkButton * TkpCreateButton( Tk_Window tkwin) { - UnixButton *butPtr = (UnixButton *) ckalloc(sizeof(UnixButton)); + UnixButton *butPtr = ckalloc(sizeof(UnixButton)); + return (TkButton *) butPtr; } |