summaryrefslogtreecommitdiffstats
path: root/generic/tkSquare.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-12-20 10:41:43 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-12-20 10:41:43 (GMT)
commit2f89fa96c29e874b87523d628df15c62984dd9b7 (patch)
tree512c62f76a0e9be490f422d8aa6f866cd1c0c5c3 /generic/tkSquare.c
parent22f8312f1177e98133c31e059d6f1ae948178f37 (diff)
downloadtk-2f89fa96c29e874b87523d628df15c62984dd9b7.zip
tk-2f89fa96c29e874b87523d628df15c62984dd9b7.tar.gz
tk-2f89fa96c29e874b87523d628df15c62984dd9b7.tar.bz2
Much more WIP: Appears to be working on UNIX, and for a bit part on Windows too.
Diffstat (limited to 'generic/tkSquare.c')
-rw-r--r--generic/tkSquare.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/generic/tkSquare.c b/generic/tkSquare.c
index 8421988..8bfa850 100644
--- a/generic/tkSquare.c
+++ b/generic/tkSquare.c
@@ -125,7 +125,7 @@ static int SquareWidgetObjCmd(ClientData clientData,
int
SquareObjCmd(
- ClientData clientData, /* NULL. */
+ ClientData dummy, /* NULL. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -133,6 +133,7 @@ SquareObjCmd(
Square *squarePtr;
Tk_Window tkwin;
Tk_OptionTable optionTable;
+ (void)dummy;
if (objc < 2) {
Tcl_WrongNumArgs(interp, 1, objv, "pathName ?-option value ...?");
@@ -160,7 +161,7 @@ SquareObjCmd(
* just the non-NULL/0 items.
*/
- squarePtr = ckalloc(sizeof(Square));
+ squarePtr = (Square *)ckalloc(sizeof(Square));
memset(squarePtr, 0, sizeof(Square));
squarePtr->tkwin = tkwin;
@@ -223,7 +224,7 @@ SquareWidgetObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj * const objv[]) /* Argument objects. */
{
- Square *squarePtr = clientData;
+ Square *squarePtr = (Square *)clientData;
int result = TCL_OK;
static const char *const squareOptions[] = {"cget", "configure", NULL};
enum {
@@ -318,12 +319,13 @@ SquareWidgetObjCmd(
static int
SquareConfigure(
- Tcl_Interp *interp, /* Used for error reporting. */
+ Tcl_Interp *dummy, /* Used for error reporting. */
Square *squarePtr) /* Information about widget. */
{
int borderWidth;
Tk_3DBorder bgBorder;
int doubleBuffer;
+ (void)dummy;
/*
* Set the background for the window and create a graphics context for use
@@ -383,7 +385,7 @@ SquareObjEventProc(
ClientData clientData, /* Information about window. */
XEvent *eventPtr) /* Information about event. */
{
- Square *squarePtr = clientData;
+ Square *squarePtr = (Square *)clientData;
if (eventPtr->type == Expose) {
if (!squarePtr->updatePending) {
@@ -436,7 +438,7 @@ static void
SquareDeletedProc(
ClientData clientData) /* Pointer to widget record for widget. */
{
- Square *squarePtr = clientData;
+ Square *squarePtr = (Square *)clientData;
Tk_Window tkwin = squarePtr->tkwin;
/*
@@ -473,7 +475,7 @@ static void
SquareDisplay(
ClientData clientData) /* Information about window. */
{
- Square *squarePtr = clientData;
+ Square *squarePtr = (Square *)clientData;
Tk_Window tkwin = squarePtr->tkwin;
Pixmap pm = None;
Drawable d;
@@ -556,7 +558,7 @@ static void
SquareDestroy(
void *memPtr) /* Info about square widget. */
{
- Square *squarePtr = memPtr;
+ Square *squarePtr = (Square *)memPtr;
ckfree(squarePtr);
}
@@ -581,7 +583,7 @@ SquareDestroy(
static void
KeepInWindow(
- register Square *squarePtr) /* Pointer to widget record. */
+ Square *squarePtr) /* Pointer to widget record. */
{
int i, bd, relief;
int borderWidth, size;