diff options
-rw-r--r-- | generic/tk3d.c | 2 | ||||
-rw-r--r-- | generic/tkArgv.c | 12 | ||||
-rw-r--r-- | generic/tkBind.c | 118 | ||||
-rw-r--r-- | generic/tkBitmap.c | 8 | ||||
-rw-r--r-- | generic/tkBusy.c | 2 | ||||
-rw-r--r-- | generic/tkButton.c | 2 | ||||
-rw-r--r-- | generic/tkClipboard.c | 6 | ||||
-rw-r--r-- | generic/tkCmds.c | 26 | ||||
-rw-r--r-- | generic/tkError.c | 2 | ||||
-rw-r--r-- | generic/tkEvent.c | 32 | ||||
-rw-r--r-- | generic/tkFocus.c | 10 | ||||
-rw-r--r-- | generic/tkGeometry.c | 16 | ||||
-rw-r--r-- | generic/tkGet.c | 22 | ||||
-rw-r--r-- | generic/tkIcu.c | 4 | ||||
-rw-r--r-- | generic/tkImage.c | 12 | ||||
-rw-r--r-- | generic/tkImgPhInstance.c | 2 | ||||
-rw-r--r-- | generic/tkStyle.c | 10 | ||||
-rw-r--r-- | generic/tkUndo.c | 8 | ||||
-rw-r--r-- | generic/tkUtil.c | 26 | ||||
-rw-r--r-- | generic/tkVisual.c | 10 | ||||
-rw-r--r-- | generic/tkWindow.c | 36 |
21 files changed, 184 insertions, 182 deletions
diff --git a/generic/tk3d.c b/generic/tk3d.c index 33e2e56..be7ba9b 100644 --- a/generic/tk3d.c +++ b/generic/tk3d.c @@ -680,7 +680,7 @@ Tk_GetRelief( Tcl_SetObjResult(interp, Tcl_ObjPrintf("bad relief \"%.50s\": must be %s", name, "flat, groove, raised, ridge, solid, or sunken")); - Tcl_SetErrorCode(interp, "TK", "VALUE", "RELIEF", NULL); + Tcl_SetErrorCode(interp, "TK", "VALUE", "RELIEF", (char *)NULL); } return TCL_ERROR; } diff --git a/generic/tkArgv.c b/generic/tkArgv.c index 33e7d4f..134b081 100644 --- a/generic/tkArgv.c +++ b/generic/tkArgv.c @@ -142,7 +142,7 @@ Tk_ParseArgv( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "ambiguous option \"%s\"", curArg)); Tcl_SetErrorCode(interp, "TK", "ARG", "AMBIGUOUS", curArg, - NULL); + (char *)NULL); return TCL_ERROR; } matchPtr = infoPtr; @@ -158,7 +158,7 @@ Tk_ParseArgv( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "unrecognized argument \"%s\"", curArg)); Tcl_SetErrorCode(interp, "TK", "ARG", "UNRECOGNIZED", curArg, - NULL); + (char *)NULL); return TCL_ERROR; } argv[dstIndex] = curArg; @@ -239,7 +239,7 @@ Tk_ParseArgv( } case TK_ARGV_HELP: PrintUsage(interp, argTable, flags); - Tcl_SetErrorCode(interp, "TK", "ARG", "HELP", NULL); + Tcl_SetErrorCode(interp, "TK", "ARG", "HELP", (char *)NULL); return TCL_ERROR; case TK_ARGV_CONST_OPTION: Tk_AddOption(tkwin, (char *)infoPtr->dst, (char *)infoPtr->src, @@ -260,7 +260,7 @@ Tk_ParseArgv( "\"%s\" option requires two following arguments", curArg)); Tcl_SetErrorCode(interp, "TK", "ARG", "NAME_VALUE", curArg, - NULL); + (char *)NULL); return TCL_ERROR; } Tk_AddOption(tkwin, argv[srcIndex], argv[srcIndex+1], @@ -271,7 +271,7 @@ Tk_ParseArgv( default: Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad argument type %d in Tk_ArgvInfo", infoPtr->type)); - Tcl_SetErrorCode(interp, "TK", "API_ABUSE", NULL); + Tcl_SetErrorCode(interp, "TK", "API_ABUSE", (char *)NULL); return TCL_ERROR; } } @@ -295,7 +295,7 @@ Tk_ParseArgv( missingArg: Tcl_SetObjResult(interp, Tcl_ObjPrintf( "\"%s\" option requires an additional argument", curArg)); - Tcl_SetErrorCode(interp, "TK", "ARG", "MISSING", curArg, NULL); + Tcl_SetErrorCode(interp, "TK", "ARG", "MISSING", curArg, (char *)NULL); return TCL_ERROR; } diff --git a/generic/tkBind.c b/generic/tkBind.c index ae9d5e1..cc97fde 100644 --- a/generic/tkBind.c +++ b/generic/tkBind.c @@ -528,7 +528,7 @@ static const EventInfo eventArray[] = { {"Activate", ActivateNotify, ActivateMask}, {"Deactivate", DeactivateNotify, ActivateMask}, {"MouseWheel", MouseWheelEvent, MouseWheelMask}, - {"TouchpadScroll", TouchpadScroll, TouchpadScrollMask}, + {"TouchpadScroll", TouchpadScroll, TouchpadScrollMask}, {"CirculateRequest", CirculateRequest, SubstructureRedirectMask}, {"ConfigureRequest", ConfigureRequest, SubstructureRedirectMask}, {"Create", CreateNotify, SubstructureNotifyMask}, @@ -2780,7 +2780,9 @@ IsPSInPSList( PSEntry *psEntry; TK_DLIST_FOREACH(psEntry, psList) { - if (psEntry->psPtr == psPtr) { return 1; } + if (psEntry->psPtr == psPtr) { + return 1; + } } return 0; } @@ -2833,12 +2835,12 @@ MatchPatterns( * it from the keyboard. See bug [16ef161925]. */ if (IsKeyEventType(curEvent->xev.type)) { - for (i = 0; i < dispPtr->numModKeyCodes; ++i) { - if (dispPtr->modKeyCodes[i] == curEvent->xev.xkey.keycode) { - isModKeyOnly = 1; - break; - } - } + for (i = 0; i < dispPtr->numModKeyCodes; ++i) { + if (dispPtr->modKeyCodes[i] == curEvent->xev.xkey.keycode) { + isModKeyOnly = 1; + break; + } + } } for (psEntry = PSList_First(psList); psEntry; psEntry = PSList_Next(psEntry)) { @@ -2855,11 +2857,11 @@ MatchPatterns( : VirtPatIsBound(bindPtr, psPtr, object, physPtrPtr)) { TkPattern *patPtr = psPtr->pats + patIndex; - /* Ignore modifier key events, and KeyRelease events if the current event - * is of a different type (e.g. a Button event) - */ - psEntry->keepIt = isModKeyOnly || \ - ((patPtr->eventType != (unsigned) curEvent->xev.type) && curEvent->xev.type == KeyRelease); + /* Ignore modifier key events, and KeyRelease events if the current event + * is of a different type (e.g. a Button event) + */ + psEntry->keepIt = isModKeyOnly || \ + ((patPtr->eventType != (unsigned) curEvent->xev.type) && curEvent->xev.type == KeyRelease); if (patPtr->eventType == (unsigned) curEvent->xev.type && (curEvent->xev.type != CreateNotify @@ -2875,7 +2877,7 @@ MatchPatterns( unsigned curModMask = ResolveModifiers(dispPtr, bindPtr->curModMask); psEntry->expired = 1; /* Remove it from promotion list. */ - psEntry->keepIt = 0; /* Don't keep matching patterns. */ + psEntry->keepIt = 0; /* Don't keep matching patterns. */ if (IsSubsetOf(modMask, curModMask)) { unsigned count = patPtr->info ? curEvent->countDetailed : curEvent->countAny; @@ -2942,7 +2944,7 @@ MatchPatterns( psEntry->keepIt = 1; /* Don't remove it from promotion list. */ } } else { - /* + /* * Pattern sequence is already present in the success list. */ @@ -3938,7 +3940,7 @@ HandleEventGenerate( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "window id \"%s\" doesn't exist in this application", Tcl_GetString(objv[0]))); - Tcl_SetErrorCode(interp, "TK", "LOOKUP", "WINDOW", Tcl_GetString(objv[0]), NULL); + Tcl_SetErrorCode(interp, "TK", "LOOKUP", "WINDOW", Tcl_GetString(objv[0]), (char *)NULL); return TCL_ERROR; } @@ -3952,12 +3954,12 @@ HandleEventGenerate( if (count != 1u) { Tcl_SetObjResult(interp, Tcl_NewStringObj("Double, Triple, or Quadruple modifier not allowed", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "EVENT", "BAD_MODIFIER", NULL); + Tcl_SetErrorCode(interp, "TK", "EVENT", "BAD_MODIFIER", (char *)NULL); return TCL_ERROR; } if (*p) { Tcl_SetObjResult(interp, Tcl_NewStringObj("only one event specification allowed", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "EVENT", "MULTIPLE", NULL); + Tcl_SetErrorCode(interp, "TK", "EVENT", "MULTIPLE", (char *)NULL); return TCL_ERROR; } @@ -4014,7 +4016,7 @@ HandleEventGenerate( for (i = 2; i < objc; i += 2) { Tcl_Obj *optionPtr, *valuePtr; #if defined(_MSC_VER) - /* Work around MSVC compiler optimization bug, see [d93c8175fd]. */ + /* Work around MSVC compiler optimization bug, see [d93c8175fd]. */ volatile int badOpt = 0; #else int badOpt = 0; @@ -4038,7 +4040,7 @@ HandleEventGenerate( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "value for \"%s\" missing", Tcl_GetString(optionPtr))); - Tcl_SetErrorCode(interp, "TK", "EVENT", "MISSING_VALUE", NULL); + Tcl_SetErrorCode(interp, "TK", "EVENT", "MISSING_VALUE", (char *)NULL); return TCL_ERROR; } @@ -4176,14 +4178,14 @@ HandleEventGenerate( keysym = TkStringToKeysym(value); if (keysym == NoSymbol) { Tcl_SetObjResult(interp, Tcl_ObjPrintf("unknown keysym \"%s\"", value)); - Tcl_SetErrorCode(interp, "TK", "LOOKUP", "KEYSYM", value, NULL); + Tcl_SetErrorCode(interp, "TK", "LOOKUP", "KEYSYM", value, (char *)NULL); return TCL_ERROR; } TkpSetKeycodeAndState(tkwin, keysym, &event.general); if (event.general.xkey.keycode == 0) { Tcl_SetObjResult(interp, Tcl_ObjPrintf("no keycode for keysym \"%s\"", value)); - Tcl_SetErrorCode(interp, "TK", "LOOKUP", "KEYCODE", value, NULL); + Tcl_SetErrorCode(interp, "TK", "LOOKUP", "KEYCODE", value, (char *)NULL); return TCL_ERROR; } if (!(flags & KEY)) { @@ -4418,7 +4420,7 @@ HandleEventGenerate( if (badOpt) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "%s event doesn't accept \"%s\" option", name, Tcl_GetString(optionPtr))); - Tcl_SetErrorCode(interp, "TK", "EVENT", "BAD_OPTION", NULL); + Tcl_SetErrorCode(interp, "TK", "EVENT", "BAD_OPTION", (char *)NULL); return TCL_ERROR; } } @@ -4461,19 +4463,19 @@ HandleEventGenerate( dispPtr->warpX = event.general.xmotion.x; dispPtr->warpY = event.general.xmotion.y; - /* - * Warping with respect to a window will be done when Tk_handleEvent - * below will run the event handlers and in particular TkPointerEvent. - * This allows to make grabs and warping work together robustly, that - * is without depending on a precise sequence of events. - * Warping with respect to the whole screen (i.e. dispPtr->warpWindow - * is NULL) is run directly here. - */ - - if (!dispPtr->warpWindow) { - TkpWarpPointer(dispPtr); - XForceScreenSaver(dispPtr->display, ScreenSaverReset); - } + /* + * Warping with respect to a window will be done when Tk_handleEvent + * below will run the event handlers and in particular TkPointerEvent. + * This allows to make grabs and warping work together robustly, that + * is without depending on a precise sequence of events. + * Warping with respect to the whole screen (i.e. dispPtr->warpWindow + * is NULL) is run directly here. + */ + + if (!dispPtr->warpWindow) { + TkpWarpPointer(dispPtr); + XForceScreenSaver(dispPtr->display, ScreenSaverReset); + } } /* @@ -4544,7 +4546,7 @@ NameToWindow( if (!tkwin) { Tcl_SetObjResult(interp, Tcl_ObjPrintf("bad window name/identifier \"%s\"", name)); - Tcl_SetErrorCode(interp, "TK", "LOOKUP", "WINDOW_ID", name, NULL); + Tcl_SetErrorCode(interp, "TK", "LOOKUP", "WINDOW_ID", name, (char *)NULL); return 0; } } @@ -4583,20 +4585,20 @@ TkDoWarpWrtWin( if (dispPtr->warpWindow) { - /* - * Warping with respect to a window can only be done if the window is - * mapped. This was checked in HandleEvent. The window needs to be - * still mapped at the time the present code is executed. Also - * one needs to guard against window destruction in the meantime, - * which could have happened as a side effect of an event handler. - */ - - if (Tk_IsMapped(dispPtr->warpWindow) && Tk_WindowId(dispPtr->warpWindow) != None) { - TkpWarpPointer(dispPtr); - XForceScreenSaver(dispPtr->display, ScreenSaverReset); - } - Tcl_Release(dispPtr->warpWindow); - dispPtr->warpWindow = NULL; + /* + * Warping with respect to a window can only be done if the window is + * mapped. This was checked in HandleEvent. The window needs to be + * still mapped at the time the present code is executed. Also + * one needs to guard against window destruction in the meantime, + * which could have happened as a side effect of an event handler. + */ + + if (Tk_IsMapped(dispPtr->warpWindow) && Tk_WindowId(dispPtr->warpWindow) != None) { + TkpWarpPointer(dispPtr); + XForceScreenSaver(dispPtr->display, ScreenSaverReset); + } + Tcl_Release(dispPtr->warpWindow); + dispPtr->warpWindow = NULL; } } @@ -4638,7 +4640,7 @@ GetVirtualEventUid( || virtString[length - 2] != '>' || virtString[length - 1] != '>') { Tcl_SetObjResult(interp, Tcl_ObjPrintf("virtual event \"%s\" is badly formed", virtString)); - Tcl_SetErrorCode(interp, "TK", "EVENT", "VIRTUAL", "MALFORMED", NULL); + Tcl_SetErrorCode(interp, "TK", "EVENT", "VIRTUAL", "MALFORMED", (char *)NULL); return NULL; } virtString[length - 2] = '\0'; @@ -4731,7 +4733,7 @@ FindSequence( if (!allowVirtual) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "virtual event not allowed in definition of another virtual event", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "EVENT", "VIRTUAL", "INNER", NULL); + Tcl_SetErrorCode(interp, "TK", "EVENT", "VIRTUAL", "INNER", (char *)NULL); ckfree(psPtr); return NULL; } @@ -4755,13 +4757,13 @@ FindSequence( if (numPats == 0) { Tcl_SetObjResult(interp, Tcl_NewStringObj("no events specified in binding", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "EVENT", "NO_EVENTS", NULL); + Tcl_SetErrorCode(interp, "TK", "EVENT", "NO_EVENTS", (char *)NULL); ckfree(psPtr); return NULL; } if (numPats > 1u && virtualFound) { Tcl_SetObjResult(interp, Tcl_NewStringObj("virtual events may not be composed", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "EVENT", "VIRTUAL", "COMPOSITION", NULL); + Tcl_SetErrorCode(interp, "TK", "EVENT", "VIRTUAL", "COMPOSITION", (char *)NULL); ckfree(psPtr); return NULL; } @@ -4861,7 +4863,7 @@ FinalizeParseEventDescription( if (errorObj) { Tcl_SetObjResult(interp, errorObj); - Tcl_SetErrorCode(interp, "TK", "EVENT", errCode, NULL); + Tcl_SetErrorCode(interp, "TK", "EVENT", errCode, (char *)NULL); } patPtr->count = count; return count; @@ -5287,9 +5289,9 @@ TkStringToKeysym( size_t len = TkUtfToUniChar(name, &keysym); if (name[len] == '\0') { - if (!Tcl_UniCharIsPrint(keysym)) { + if (!Tcl_UniCharIsPrint(keysym)) { /* This form not supported */ - } else if ((unsigned)(keysym - 0x21) <= 0x5D) { + } else if ((unsigned)(keysym - 0x21) <= 0x5D) { return (KeySym)keysym; } else if ((unsigned)(keysym - 0xA1) <= 0x5E) { return (KeySym)keysym; diff --git a/generic/tkBitmap.c b/generic/tkBitmap.c index 9f97b33..edd36ad 100644 --- a/generic/tkBitmap.c +++ b/generic/tkBitmap.c @@ -351,7 +351,7 @@ GetBitmap( Tcl_SetObjResult(interp, Tcl_NewStringObj( "can't specify bitmap with '@' in a safe interpreter", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "SAFE", "BITMAP_FILE", NULL); + Tcl_SetErrorCode(interp, "TK", "SAFE", "BITMAP_FILE", (char *)NULL); goto error; } @@ -373,7 +373,7 @@ GetBitmap( if (interp != NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "error reading bitmap file \"%s\"", string)); - Tcl_SetErrorCode(interp, "TK", "BITMAP", "FILE_ERROR", NULL); + Tcl_SetErrorCode(interp, "TK", "BITMAP", "FILE_ERROR", (char *)NULL); } Tcl_DStringFree(&buffer); goto error; @@ -396,7 +396,7 @@ GetBitmap( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bitmap \"%s\" not defined", string)); Tcl_SetErrorCode(interp, "TK", "LOOKUP", "BITMAP", string, - NULL); + (char *)NULL); } goto error; } @@ -500,7 +500,7 @@ Tk_DefineBitmap( if (!isNew) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bitmap \"%s\" is already defined", name)); - Tcl_SetErrorCode(interp, "TK", "BITMAP", "EXISTS", NULL); + Tcl_SetErrorCode(interp, "TK", "BITMAP", "EXISTS", (char *)NULL); return TCL_ERROR; } predefPtr = (TkPredefBitmap *)ckalloc(sizeof(TkPredefBitmap)); diff --git a/generic/tkBusy.c b/generic/tkBusy.c index 9cac37c..65e1fc7 100644 --- a/generic/tkBusy.c +++ b/generic/tkBusy.c @@ -699,7 +699,7 @@ GetBusy( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "can't find busy window \"%s\"", Tcl_GetString(windowObj))); Tcl_SetErrorCode(interp, "TK", "LOOKUP", "BUSY", - Tcl_GetString(windowObj), NULL); + Tcl_GetString(windowObj), (char *)NULL); return NULL; } return (Busy *)Tcl_GetHashValue(hPtr); diff --git a/generic/tkButton.c b/generic/tkButton.c index fce0f0a..cbbe880 100644 --- a/generic/tkButton.c +++ b/generic/tkButton.c @@ -646,7 +646,7 @@ ButtonCreate( */ tkwin = Tk_CreateWindowFromPath(interp, Tk_MainWindow(interp), - Tcl_GetString(objv[1]), NULL); + Tcl_GetString(objv[1]), (char *)NULL); if (tkwin == NULL) { return TCL_ERROR; } diff --git a/generic/tkClipboard.c b/generic/tkClipboard.c index 1b16b86..3bbfe12 100644 --- a/generic/tkClipboard.c +++ b/generic/tkClipboard.c @@ -373,7 +373,7 @@ Tk_ClipboardAppend( Tk_GetAtomName(tkwin, format), Tk_GetAtomName(tkwin, targetPtr->format), Tk_GetAtomName(tkwin, type))); - Tcl_SetErrorCode(interp, "TK", "CLIPBOARD", "FORMAT_MISMATCH", NULL); + Tcl_SetErrorCode(interp, "TK", "CLIPBOARD", "FORMAT_MISMATCH", (char *)NULL); return TCL_ERROR; } @@ -480,7 +480,7 @@ Tk_ClipboardObjCmd( if (i >= objc) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "value for \"%s\" missing", string)); - Tcl_SetErrorCode(interp, "TK", "CLIPBOARD", "VALUE", NULL); + Tcl_SetErrorCode(interp, "TK", "CLIPBOARD", "VALUE", (char *)NULL); return TCL_ERROR; } switch ((enum appendOptions) subIndex) { @@ -570,7 +570,7 @@ Tk_ClipboardObjCmd( if (i >= objc) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "value for \"%s\" missing", string)); - Tcl_SetErrorCode(interp, "TK", "CLIPBOARD", "VALUE", NULL); + Tcl_SetErrorCode(interp, "TK", "CLIPBOARD", "VALUE", (char *)NULL); return TCL_ERROR; } switch ((enum getOptions) subIndex) { diff --git a/generic/tkCmds.c b/generic/tkCmds.c index eebddaf..aaa6be4 100644 --- a/generic/tkCmds.c +++ b/generic/tkCmds.c @@ -564,7 +564,7 @@ Tk_LowerObjCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "can't lower \"%s\" to bottom", Tcl_GetString(objv[1]))); } - Tcl_SetErrorCode(interp, "TK", "RESTACK", "LOWER", NULL); + Tcl_SetErrorCode(interp, "TK", "RESTACK", "LOWER", (char *)NULL); return TCL_ERROR; } return TCL_OK; @@ -623,7 +623,7 @@ Tk_RaiseObjCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "can't raise \"%s\" to top", Tcl_GetString(objv[1]))); } - Tcl_SetErrorCode(interp, "TK", "RESTACK", "RAISE", NULL); + Tcl_SetErrorCode(interp, "TK", "RESTACK", "RAISE", (char *)NULL); return TCL_ERROR; } return TCL_OK; @@ -693,7 +693,7 @@ AppnameCmd( if (Tcl_IsSafe(interp)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "appname not accessible in a safe interpreter", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "SAFE", "APPLICATION", NULL); + Tcl_SetErrorCode(interp, "TK", "SAFE", "APPLICATION", (char *)NULL); return TCL_ERROR; } @@ -829,7 +829,7 @@ ScalingCmd( } else if (Tcl_IsSafe(interp)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "setting the scaling not accessible in a safe interpreter", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "SAFE", "SCALING", NULL); + Tcl_SetErrorCode(interp, "TK", "SAFE", "SCALING", (char *)NULL); return TCL_ERROR; } else if (objc == 2 + skip) { if (Tcl_GetDoubleFromObj(interp, objv[1+skip], &d) != TCL_OK) { @@ -890,7 +890,7 @@ UseinputmethodsCmd( if (Tcl_IsSafe(interp)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "useinputmethods not accessible in a safe interpreter", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "SAFE", "INPUT_METHODS", NULL); + Tcl_SetErrorCode(interp, "TK", "SAFE", "INPUT_METHODS", (char *)NULL); return TCL_ERROR; } @@ -973,14 +973,14 @@ InactiveCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad option \"%s\": must be reset", string)); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "INDEX", "option", - string, NULL); + string, (char *)NULL); return TCL_ERROR; } if (Tcl_IsSafe(interp)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "resetting the user inactivity timer " "is not allowed in a safe interpreter", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "SAFE", "INACTIVITY_TIMER", NULL); + Tcl_SetErrorCode(interp, "TK", "SAFE", "INACTIVITY_TIMER", (char *)NULL); return TCL_ERROR; } Tk_ResetUserInactiveTime(Tk_Display(tkwin)); @@ -1084,7 +1084,7 @@ Tk_TkwaitObjCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "window \"%s\" was deleted before its visibility changed", Tcl_GetString(objv[2]))); - Tcl_SetErrorCode(interp, "TK", "WAIT", "PREMATURE", NULL); + Tcl_SetErrorCode(interp, "TK", "WAIT", "PREMATURE", (char *)NULL); return TCL_ERROR; } Tk_DeleteEventHandler(window, @@ -1619,7 +1619,7 @@ Tk_WinfoObjCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "no atom exists with id \"%s\"", Tcl_GetString(objv[2]))); Tcl_SetErrorCode(interp, "TK", "LOOKUP", "ATOM", - Tcl_GetString(objv[2]), NULL); + Tcl_GetString(objv[2]), (char *)NULL); return TCL_ERROR; } Tcl_SetObjResult(interp, Tcl_NewStringObj(name, TCL_INDEX_NONE)); @@ -1680,7 +1680,7 @@ Tk_WinfoObjCmd( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "window id \"%s\" doesn't exist in this application", string)); - Tcl_SetErrorCode(interp, "TK", "LOOKUP", "WINDOW", string, NULL); + Tcl_SetErrorCode(interp, "TK", "LOOKUP", "WINDOW", string, (char *)NULL); return TCL_ERROR; } @@ -1818,7 +1818,7 @@ Tk_WinfoObjCmd( if (visInfoPtr == NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "can't find any visuals for screen", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "VISUAL", "NONE", NULL); + Tcl_SetErrorCode(interp, "TK", "VISUAL", "NONE", (char *)NULL); return TCL_ERROR; } resultPtr = Tcl_NewObj(); @@ -1895,10 +1895,10 @@ TkGetDisplayOf( string = Tcl_GetStringFromObj(objv[0], &length); if ((length >= 2) && (strncmp(string, "-displayof", length) == 0)) { - if (objc < 2) { + if (objc < 2) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "value for \"-displayof\" missing", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "NO_VALUE", "DISPLAYOF", NULL); + Tcl_SetErrorCode(interp, "TK", "NO_VALUE", "DISPLAYOF", (char *)NULL); return TCL_INDEX_NONE; } *tkwinPtr = Tk_NameToWindow(interp, Tcl_GetString(objv[1]), *tkwinPtr); diff --git a/generic/tkError.c b/generic/tkError.c index b15881f..bffcbe5 100644 --- a/generic/tkError.c +++ b/generic/tkError.c @@ -80,7 +80,7 @@ Tk_CreateErrorHandler( Tk_ErrorProc *errorProc, /* Procedure to invoke when a matching error * occurs. NULL means just ignore matching * errors. */ - ClientData clientData) /* Arbitrary value to pass to errorProc. */ + void *clientData) /* Arbitrary value to pass to errorProc. */ { TkErrorHandler *errorPtr; TkDisplay *dispPtr; diff --git a/generic/tkEvent.c b/generic/tkEvent.c index 59b4e49..1231a97 100644 --- a/generic/tkEvent.c +++ b/generic/tkEvent.c @@ -51,7 +51,7 @@ typedef struct InProgress { typedef struct GenericHandler { Tk_GenericProc *proc; /* Function to dispatch on all X events. */ - ClientData clientData; /* Client data to pass to function. */ + void *clientData; /* Client data to pass to function. */ int deleteFlag; /* Flag to set when this handler is * deleted. */ struct GenericHandler *nextPtr; @@ -134,7 +134,7 @@ static const unsigned long eventMasks[TK_LASTEVENT] = { typedef struct ExitHandler { Tcl_ExitProc *proc; /* Function to call when process exits. */ - ClientData clientData; /* One word of information to pass to proc. */ + void *clientData; /* One word of information to pass to proc. */ struct ExitHandler *nextPtr;/* Next in list of all exit handlers for this * application, or NULL for end of list. */ } ExitHandler; @@ -174,7 +174,7 @@ typedef struct { Tk_RestrictProc *restrictProc; /* Function to call. NULL means no * restrictProc is currently in effect. */ - ClientData restrictArg; /* Argument to pass to restrictProc. */ + void *restrictArg; /* Argument to pass to restrictProc. */ ExitHandler *firstExitPtr; /* First in list of all exit handlers for this * thread. */ int inExit; /* True when this thread is exiting. This is @@ -198,7 +198,7 @@ TCL_DECLARE_MUTEX(exitMutex) */ static void CleanUpTkEvent(XEvent *eventPtr); -static void DelayedMotionProc(ClientData clientData); +static void DelayedMotionProc(void *clientData); static unsigned long GetEventMaskFromXEvent(XEvent *eventPtr); static TkWindow * GetTkWindowFromXEvent(XEvent *eventPtr); static void InvokeClientMessageHandlers(ThreadSpecificData *tsdPtr, @@ -211,7 +211,7 @@ static int InvokeMouseHandlers(TkWindow *winPtr, unsigned long mask, XEvent *eventPtr); static Window ParentXId(Display *display, Window w); static int RefreshKeyboardMappingIfNeeded(XEvent *eventPtr); -static int TkXErrorHandler(ClientData clientData, +static int TkXErrorHandler(void *clientData, XErrorEvent *errEventPtr); static int WindowEventProc(Tcl_Event *evPtr, int flags); static void CreateXIC(TkWindow *winPtr); @@ -692,7 +692,7 @@ Tk_CreateEventHandler( * handler. */ unsigned long mask, /* Events for which proc should be called. */ Tk_EventProc *proc, /* Function to call for each selected event */ - ClientData clientData) /* Arbitrary data to pass to proc. */ + void *clientData) /* Arbitrary data to pass to proc. */ { TkEventHandler *handlerPtr; TkWindow *winPtr = (TkWindow *)token; @@ -782,7 +782,7 @@ Tk_DeleteEventHandler( Tk_Window token, /* Same as corresponding arguments passed */ unsigned long mask, /* previously to Tk_CreateEventHandler. */ Tk_EventProc *proc, - ClientData clientData) + void *clientData) { TkEventHandler *handlerPtr; InProgress *ipPtr; @@ -857,7 +857,7 @@ Tk_DeleteEventHandler( void Tk_CreateGenericHandler( Tk_GenericProc *proc, /* Function to call on every event. */ - ClientData clientData) /* One-word value to pass to proc. */ + void *clientData) /* One-word value to pass to proc. */ { GenericHandler *handlerPtr; ThreadSpecificData *tsdPtr = (ThreadSpecificData *) @@ -898,7 +898,7 @@ Tk_CreateGenericHandler( void Tk_DeleteGenericHandler( Tk_GenericProc *proc, - ClientData clientData) + void *clientData) { GenericHandler * handler; ThreadSpecificData *tsdPtr = (ThreadSpecificData *) @@ -1043,7 +1043,7 @@ TkEventInit(void) static int TkXErrorHandler( - ClientData clientData, /* Pointer to flag we set. */ + void *clientData, /* Pointer to flag we set. */ TCL_UNUSED(XErrorEvent *)) /* X error info. */ { int *error = (int *)clientData; @@ -1455,8 +1455,8 @@ TkCurrentTime( Tk_RestrictProc * Tk_RestrictEvents( Tk_RestrictProc *proc, /* Function to call for each incoming event */ - ClientData arg, /* Arbitrary argument to pass to proc. */ - ClientData *prevArgPtr) /* Place to store information about previous + void *arg, /* Arbitrary argument to pass to proc. */ + void **prevArgPtr) /* Place to store information about previous * argument. */ { Tk_RestrictProc *prev; @@ -1814,7 +1814,7 @@ CleanUpTkEvent( static void DelayedMotionProc( - ClientData clientData) /* Pointer to display containing a delayed + void *clientData) /* Pointer to display containing a delayed * motion event to be serviced. */ { TkDisplay *dispPtr = (TkDisplay *)clientData; @@ -1900,7 +1900,7 @@ TkCreateExitHandler( void TkDeleteExitHandler( Tcl_ExitProc *proc, /* Function that was previously registered. */ - ClientData clientData) /* Arbitrary value to pass to proc. */ + void *clientData) /* Arbitrary value to pass to proc. */ { ExitHandler *exitPtr, *prevPtr; @@ -1942,7 +1942,7 @@ TkDeleteExitHandler( void TkCreateThreadExitHandler( Tcl_ExitProc *proc, /* Function to invoke. */ - ClientData clientData) /* Arbitrary value to pass to proc. */ + void *clientData) /* Arbitrary value to pass to proc. */ { ExitHandler *exitPtr; ThreadSpecificData *tsdPtr = (ThreadSpecificData *) @@ -1983,7 +1983,7 @@ TkCreateThreadExitHandler( void TkDeleteThreadExitHandler( Tcl_ExitProc *proc, /* Function that was previously registered. */ - ClientData clientData) /* Arbitrary value to pass to proc. */ + void *clientData) /* Arbitrary value to pass to proc. */ { ExitHandler *exitPtr, *prevPtr; ThreadSpecificData *tsdPtr = (ThreadSpecificData *) diff --git a/generic/tkFocus.c b/generic/tkFocus.c index cd2df92..9ea7321 100644 --- a/generic/tkFocus.c +++ b/generic/tkFocus.c @@ -82,7 +82,7 @@ typedef struct TkDisplayFocusInfo { static DisplayFocusInfo*FindDisplayFocusInfo(TkMainInfo *mainPtr, TkDisplay *dispPtr); -static void FocusMapProc(ClientData clientData, XEvent *eventPtr); +static void FocusMapProc(void *clientData, XEvent *eventPtr); static void GenerateFocusEvents(TkWindow *sourcePtr, TkWindow *destPtr); @@ -105,7 +105,7 @@ static void GenerateFocusEvents(TkWindow *sourcePtr, int Tk_FocusObjCmd( - ClientData clientData, /* Main window associated with interpreter. */ + void *clientData, /* Main window associated with interpreter. */ Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ @@ -630,8 +630,8 @@ TkSetFocusWin( } tlFocusPtr->focusWinPtr = winPtr; - if (topLevelPtr->flags & TK_EMBEDDED && - (displayFocusPtr->focusWinPtr == NULL)) { + if ((topLevelPtr->flags & TK_EMBEDDED) && + (displayFocusPtr->focusWinPtr == NULL)) { /* * We are assigning focus to an embedded toplevel. The platform @@ -971,7 +971,7 @@ GenerateFocusEvents( static void FocusMapProc( - ClientData clientData, /* Toplevel window. */ + void *clientData, /* Toplevel window. */ XEvent *eventPtr) /* Information about event. */ { TkWindow *winPtr = (TkWindow *)clientData; diff --git a/generic/tkGeometry.c b/generic/tkGeometry.c index 10344f7..b34e3ba 100644 --- a/generic/tkGeometry.c +++ b/generic/tkGeometry.c @@ -53,10 +53,10 @@ typedef struct MaintainContainer { * Prototypes for static procedures in this file: */ -static void MaintainCheckProc(ClientData clientData); -static void MaintainContainerProc(ClientData clientData, +static void MaintainCheckProc(void *clientData); +static void MaintainContainerProc(void *clientData, XEvent *eventPtr); -static void MaintainContentProc(ClientData clientData, +static void MaintainContentProc(void *clientData, XEvent *eventPtr); /* @@ -87,7 +87,7 @@ Tk_ManageGeometry( const Tk_GeomMgr *mgrPtr, /* Static structure describing the geometry * manager. This structure must never go * away. */ - ClientData clientData) /* Arbitrary one-word argument to pass to + void *clientData) /* Arbitrary one-word argument to pass to * geometry manager procedures. */ { TkWindow *winPtr = (TkWindow *) tkwin; @@ -336,7 +336,7 @@ TkSetGeometryContainer( "cannot use geometry manager %s inside %s because" " %s is already managing it's content windows", name, Tk_PathName(tkwin), winPtr->geomMgrName)); - Tcl_SetErrorCode(interp, "TK", "GEOMETRY", "FIGHT", NULL); + Tcl_SetErrorCode(interp, "TK", "GEOMETRY", "FIGHT", (char *)NULL); } return TCL_ERROR; } @@ -654,7 +654,7 @@ Tk_UnmaintainGeometry( static void MaintainContainerProc( - ClientData clientData, /* Pointer to MaintainContainer structure for the + void *clientData, /* Pointer to MaintainContainer structure for the * container window. */ XEvent *eventPtr) /* Describes what just happened. */ { @@ -708,7 +708,7 @@ MaintainContainerProc( static void MaintainContentProc( - ClientData clientData, /* Pointer to MaintainContent structure for + void *clientData, /* Pointer to MaintainContent structure for * container-window pair. */ XEvent *eventPtr) /* Describes what just happened. */ { @@ -741,7 +741,7 @@ MaintainContentProc( static void MaintainCheckProc( - ClientData clientData) /* Pointer to MaintainContainer structure for the + void *clientData) /* Pointer to MaintainContainer structure for the * container window. */ { MaintainContainer *containerPtr = (MaintainContainer *)clientData; diff --git a/generic/tkGet.c b/generic/tkGet.c index dea28bf..f109582 100644 --- a/generic/tkGet.c +++ b/generic/tkGet.c @@ -28,7 +28,7 @@ typedef struct { } ThreadSpecificData; static Tcl_ThreadDataKey dataKey; -static void FreeUidThreadExitProc(ClientData clientData); +static void FreeUidThreadExitProc(void *clientData); /* * The following tables defines the string values for reliefs, which are @@ -155,7 +155,7 @@ Tk_GetAnchor( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad anchor position \"%s\": must be" " n, ne, e, se, s, sw, w, nw, or center", string)); - Tcl_SetErrorCode(interp, "TK", "VALUE", "ANCHOR", NULL); + Tcl_SetErrorCode(interp, "TK", "VALUE", "ANCHOR", (char *)NULL); return TCL_ERROR; } @@ -243,7 +243,7 @@ Tk_GetJoinStyle( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad join style \"%s\": must be bevel, miter, or round", string)); - Tcl_SetErrorCode(interp, "TK", "VALUE", "JOIN", NULL); + Tcl_SetErrorCode(interp, "TK", "VALUE", "JOIN", (char *)NULL); return TCL_ERROR; } @@ -324,7 +324,7 @@ Tk_GetCapStyle( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad cap style \"%s\": must be butt, projecting, or round", string)); - Tcl_SetErrorCode(interp, "TK", "VALUE", "CAP", NULL); + Tcl_SetErrorCode(interp, "TK", "VALUE", "CAP", (char *)NULL); return TCL_ERROR; } @@ -442,7 +442,7 @@ Tk_GetJustify( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad justification \"%s\": must be left, right, or center", string)); - Tcl_SetErrorCode(interp, "TK", "VALUE", "JUSTIFY", NULL); + Tcl_SetErrorCode(interp, "TK", "VALUE", "JUSTIFY", (char *)NULL); return TCL_ERROR; } @@ -532,7 +532,7 @@ Tk_GetUid( { int dummy; ThreadSpecificData *tsdPtr = (ThreadSpecificData *) - Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); + Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); Tcl_HashTable *tablePtr = &tsdPtr->uidTable; if (!tsdPtr->initialized) { @@ -581,7 +581,7 @@ Tk_GetScreenMM( if (!tkwin) { if (interp != NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj("bad screen", -1)); - Tcl_SetErrorCode(interp, "TK", "VALUE", "SCREEN_DISTANCE", NULL); + Tcl_SetErrorCode(interp, "TK", "VALUE", "SCREEN_DISTANCE", (char *)NULL); } return TCL_ERROR; } @@ -602,7 +602,7 @@ Tk_GetScreenMM( if (interp != NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "expected screen distance or \"\" but got \"%.50s\"", string)); - Tcl_SetErrorCode(interp, "TK", "VALUE", "PIXELS", NULL); + Tcl_SetErrorCode(interp, "TK", "VALUE", "PIXELS", (char *)NULL); } return TCL_ERROR; } @@ -714,7 +714,7 @@ TkGetDoublePixels( if (!tkwin) { if (interp != NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj("bad screen", -1)); - Tcl_SetErrorCode(interp, "TK", "VALUE", "FRACTIONAL_PIXELS", NULL); + Tcl_SetErrorCode(interp, "TK", "VALUE", "FRACTIONAL_PIXELS", (char *)NULL); } return TCL_ERROR; } @@ -729,8 +729,8 @@ TkGetDoublePixels( error: if (interp != NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "expected screen distance but got \"%s\"", string)); - Tcl_SetErrorCode(interp, "TK", "VALUE", "PIXELS", NULL); + "expected screen distance but got \"%.50s\"", string)); + Tcl_SetErrorCode(interp, "TK", "VALUE", "PIXELS", (char *)NULL); } return TCL_ERROR; } diff --git a/generic/tkIcu.c b/generic/tkIcu.c index 257003c..503c98d 100644 --- a/generic/tkIcu.c +++ b/generic/tkIcu.c @@ -96,7 +96,7 @@ startEndOfCmd( if (TkGetIntForIndex(objv[2], ulen-1, 0, &idx) != TCL_OK) { Tcl_DStringFree(&ds); Tcl_SetObjResult(interp, Tcl_ObjPrintf("bad index \"%s\": must be integer?[+-]integer?, end?[+-]integer?, or \"\"", Tcl_GetString(objv[2]))); - Tcl_SetErrorCode(interp, "TK", "ICU", "INDEX", NULL); + Tcl_SetErrorCode(interp, "TK", "ICU", "INDEX", (char *)NULL); return TCL_ERROR; } it = icu_open((UBreakIteratorTypex)(flags&3), locale, @@ -109,7 +109,7 @@ startEndOfCmd( if (it == NULL || errorCode != U_ZERO_ERRORZ) { Tcl_DStringFree(&ds); Tcl_SetObjResult(interp, Tcl_ObjPrintf("cannot open ICU iterator, errorcode: %d", (int)errorCode)); - Tcl_SetErrorCode(interp, "TK", "ICU", "CANNOTOPEN", NULL); + Tcl_SetErrorCode(interp, "TK", "ICU", "CANNOTOPEN", (char *)NULL); return TCL_ERROR; } if (idx > 0 && len != ulen) { diff --git a/generic/tkImage.c b/generic/tkImage.c index 77b2c62..701c765 100644 --- a/generic/tkImage.c +++ b/generic/tkImage.c @@ -233,7 +233,7 @@ Tk_ImageObjCmd( const char *arg, *name; Tcl_Obj *resultObj; ThreadSpecificData *tsdPtr = (ThreadSpecificData *) - Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); + Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "option ?args?"); @@ -280,7 +280,7 @@ Tk_ImageObjCmd( if (typePtr == NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "image type \"%s\" doesn't exist", arg)); - Tcl_SetErrorCode(interp, "TK", "LOOKUP", "IMAGE_TYPE", arg, NULL); + Tcl_SetErrorCode(interp, "TK", "LOOKUP", "IMAGE_TYPE", arg, (char *)NULL); return TCL_ERROR; } @@ -313,7 +313,7 @@ Tk_ImageObjCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "images may not be named the same as the main window", -1)); - Tcl_SetErrorCode(interp, "TK", "IMAGE", "SMASH_MAIN", NULL); + Tcl_SetErrorCode(interp, "TK", "IMAGE", "SMASH_MAIN", (char *)NULL); return TCL_ERROR; } } @@ -376,7 +376,7 @@ Tk_ImageObjCmd( Tcl_Preserve(modelPtr); if (oldimage) { typedef int (OldCreateProc)(Tcl_Interp*, char*, Tcl_Size, char**, - Tk_ImageType*, Tk_ImageModel, ClientData*); + Tk_ImageType*, Tk_ImageModel, void **); i = ((OldCreateProc*)typePtr->createProc)(interp, (char*)name, objc, (char**)args, typePtr, (Tk_ImageModel)modelPtr, &modelPtr->modelData); @@ -511,7 +511,7 @@ Tk_ImageObjCmd( alreadyDeleted: Tcl_SetObjResult(interp, Tcl_ObjPrintf("image \"%s\" doesn't exist",arg)); - Tcl_SetErrorCode(interp, "TK", "LOOKUP", "IMAGE", arg, NULL); + Tcl_SetErrorCode(interp, "TK", "LOOKUP", "IMAGE", arg, (char *)NULL); return TCL_ERROR; } @@ -657,7 +657,7 @@ Tk_GetImage( if (interp) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "image \"%s\" doesn't exist", name)); - Tcl_SetErrorCode(interp, "TK", "LOOKUP", "IMAGE", name, NULL); + Tcl_SetErrorCode(interp, "TK", "LOOKUP", "IMAGE", name, (char *)NULL); } return NULL; } diff --git a/generic/tkImgPhInstance.c b/generic/tkImgPhInstance.c index c669b41..98a2b41 100644 --- a/generic/tkImgPhInstance.c +++ b/generic/tkImgPhInstance.c @@ -214,7 +214,7 @@ TkImgPhotoConfigureInstance( *---------------------------------------------------------------------- */ -ClientData +void * TkImgPhotoGet( Tk_Window tkwin, /* Window in which the instance will be * used. */ diff --git a/generic/tkStyle.c b/generic/tkStyle.c index 16601b1..b243674 100644 --- a/generic/tkStyle.c +++ b/generic/tkStyle.c @@ -78,7 +78,7 @@ typedef struct Style { const char *name; /* Name of style. Points to a hash key. */ StyleEngine *enginePtr; /* Style engine of which the style is an * instance. */ - ClientData clientData; /* Data provided during registration. */ + void *clientData; /* Data provided during registration. */ } Style; /* @@ -135,7 +135,7 @@ static StyledWidgetSpec*GetWidgetSpec(StyledElement *elementPtr, static void InitElement(Element *elementPtr, const char *name, int id, int genericId, int created); static void InitStyle(Style *stylePtr, const char *name, - StyleEngine *enginePtr, ClientData clientData); + StyleEngine *enginePtr, void *clientData); static void InitStyledElement(StyledElement *elementPtr); static void InitStyleEngine(StyleEngine *enginePtr, const char *name, StyleEngine *parentPtr); @@ -1229,7 +1229,7 @@ Tk_CreateStyle( const char *name, /* Name of the style to create. NULL or empty * means the default system style. */ Tk_StyleEngine engine, /* The style engine. */ - ClientData clientData) /* Private data passed as is to engine code. */ + void *clientData) /* Private data passed as is to engine code. */ { ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); @@ -1315,7 +1315,7 @@ InitStyle( * means the default system style. Usually * points to the hash key. */ StyleEngine *enginePtr, /* The style engine. */ - ClientData clientData) /* Private data passed as is to engine code. */ + void *clientData) /* Private data passed as is to engine code. */ { stylePtr->name = name; stylePtr->enginePtr = enginePtr; @@ -1359,7 +1359,7 @@ Tk_GetStyle( if (interp != NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "style \"%s\" doesn't exist", name)); - Tcl_SetErrorCode(interp, "TK", "LOOKUP", "STYLE", name, NULL); + Tcl_SetErrorCode(interp, "TK", "LOOKUP", "STYLE", name, (char *)NULL); } return NULL; } diff --git a/generic/tkUndo.c b/generic/tkUndo.c index 97ac25b..0e48f69 100644 --- a/generic/tkUndo.c +++ b/generic/tkUndo.c @@ -244,7 +244,7 @@ TkUndoMakeCmdSubAtom( atom->next = NULL; atom->action = actionScript; if (atom->action != NULL) { - Tcl_IncrRefCount(atom->action); + Tcl_IncrRefCount(atom->action); } if (subAtomList != NULL) { @@ -287,7 +287,7 @@ TkUndoSubAtom * TkUndoMakeSubAtom( TkUndoProc *funcPtr, /* Callback function to perform the * undo/redo. */ - ClientData clientData, /* Data to pass to the callback function. */ + void *clientData, /* Data to pass to the callback function. */ Tcl_Obj *actionScript, /* Additional Tcl data to pass to the callback * function (may be NULL). */ TkUndoSubAtom *subAtomList) /* Add to the end of this list of actions if @@ -306,7 +306,7 @@ TkUndoMakeSubAtom( atom->next = NULL; atom->action = actionScript; if (atom->action != NULL) { - Tcl_IncrRefCount(atom->action); + Tcl_IncrRefCount(atom->action); } if (subAtomList != NULL) { @@ -712,7 +712,7 @@ EvaluateActionList( Tcl_GetCommandFullName(interp, action->command, cmdNameObj); Tcl_ListObjAppendElement(NULL, evalObj, cmdNameObj); if (action->action != NULL) { - Tcl_ListObjAppendList(NULL, evalObj, action->action); + Tcl_ListObjAppendList(NULL, evalObj, action->action); } result = Tcl_EvalObjEx(interp, evalObj, TCL_EVAL_GLOBAL); Tcl_DecrRefCount(evalObj); diff --git a/generic/tkUtil.c b/generic/tkUtil.c index ef65880..60daffe 100644 --- a/generic/tkUtil.c +++ b/generic/tkUtil.c @@ -103,7 +103,7 @@ TkStateParseProc( } Tcl_AppendToObj(msgObj, " or disabled", TCL_INDEX_NONE); Tcl_SetObjResult(interp, msgObj); - Tcl_SetErrorCode(interp, "TK", "VALUE", "STATE", NULL); + Tcl_SetErrorCode(interp, "TK", "VALUE", "STATE", (char *)NULL); *statePtr = TK_STATE_NORMAL; return TCL_ERROR; } @@ -205,7 +205,7 @@ TkOrientParseProc( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad orientation \"%s\": must be vertical or horizontal", value)); - Tcl_SetErrorCode(interp, "TK", "VALUE", "ORIENTATION", NULL); + Tcl_SetErrorCode(interp, "TK", "VALUE", "ORIENTATION", (char *)NULL); *orientPtr = 0; return TCL_ERROR; } @@ -396,7 +396,7 @@ TkOffsetParseProc( } Tcl_AppendToObj(msgObj, ", n, ne, e, se, s, sw, w, nw, or center", TCL_INDEX_NONE); Tcl_SetObjResult(interp, msgObj); - Tcl_SetErrorCode(interp, "TK", "VALUE", "OFFSET", NULL); + Tcl_SetErrorCode(interp, "TK", "VALUE", "OFFSET", (char *)NULL); return TCL_ERROR; } @@ -495,7 +495,7 @@ TkPixelParseProc( if ((result == TCL_OK) && (clientData == NULL) && (*doublePtr < 0.0)) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "expected screen distance but got \"%.50s\"", value)); - Tcl_SetErrorCode(interp, "TK", "VALUE", "PIXELS", NULL); + Tcl_SetErrorCode(interp, "TK", "VALUE", "PIXELS", (char *)NULL); return TCL_ERROR; } return result; @@ -661,7 +661,7 @@ Tk_GetScrollInfo( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "wrong # args: should be \"%s %s %s\"", argv[0], argv[1], "moveto fraction")); - Tcl_SetErrorCode(interp, "TCL", "WRONGARGS", NULL); + Tcl_SetErrorCode(interp, "TCL", "WRONGARGS", (char *)NULL); return TK_SCROLL_ERROR; } if (Tcl_GetDouble(interp, argv[3], dblPtr) != TCL_OK) { @@ -675,7 +675,7 @@ Tk_GetScrollInfo( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "wrong # args: should be \"%s %s %s\"", argv[0], argv[1], "scroll number pages|units")); - Tcl_SetErrorCode(interp, "TCL", "WRONGARGS", NULL); + Tcl_SetErrorCode(interp, "TCL", "WRONGARGS", (char *)NULL); return TK_SCROLL_ERROR; } if (Tcl_GetDouble(interp, argv[3], &d) != TCL_OK) { @@ -692,13 +692,13 @@ Tk_GetScrollInfo( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad argument \"%s\": must be pages or units", argv[4])); - Tcl_SetErrorCode(interp, "TK", "VALUE", "SCROLL_UNITS", NULL); + Tcl_SetErrorCode(interp, "TK", "VALUE", "SCROLL_UNITS", (char *)NULL); return TK_SCROLL_ERROR; } Tcl_SetObjResult(interp, Tcl_ObjPrintf( "unknown option \"%s\": must be moveto or scroll", argv[2])); Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "INDEX", "option", argv[2], - NULL); + (char *)NULL); return TK_SCROLL_ERROR; } @@ -779,12 +779,12 @@ Tk_GetScrollInfoObj( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad argument \"%s\": must be pages or units", arg)); - Tcl_SetErrorCode(interp, "TK", "VALUE", "SCROLL_UNITS", NULL); + Tcl_SetErrorCode(interp, "TK", "VALUE", "SCROLL_UNITS", (char *)NULL); return TK_SCROLL_ERROR; } Tcl_SetObjResult(interp, Tcl_ObjPrintf( "unknown option \"%s\": must be moveto or scroll", arg)); - Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "INDEX", "option", arg, NULL); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "INDEX", "option", arg, (char *)NULL); return TK_SCROLL_ERROR; } @@ -958,7 +958,7 @@ TkFindStateNum( ((mPtr[1].strKey != NULL) ? "" : "or "), mPtr->strKey); } Tcl_SetObjResult(interp, msgObj); - Tcl_SetErrorCode(interp, "TK", "LOOKUP", option, strKey, NULL); + Tcl_SetErrorCode(interp, "TK", "LOOKUP", option, strKey, (char *)NULL); } return mPtr->numKey; } @@ -1019,7 +1019,7 @@ TkFindStateNumObj( } Tcl_SetObjResult(interp, msgObj); Tcl_SetErrorCode(interp, "TK", "LOOKUP", Tcl_GetString(optionPtr), - key, NULL); + key, (char *)NULL); } return mPtr->numKey; } @@ -1154,7 +1154,7 @@ TkMakeEnsemble( nameObj = Tcl_NewStringObj(map[i].name, TCL_INDEX_NONE); fqdnObj = Tcl_NewStringObj(Tcl_DStringValue(&ds), Tcl_DStringLength(&ds)); - Tcl_AppendStringsToObj(fqdnObj, "::", map[i].name, NULL); + Tcl_AppendStringsToObj(fqdnObj, "::", map[i].name, (char *)NULL); Tcl_DictObjPut(NULL, dictObj, nameObj, fqdnObj); if (map[i].proc) { #if TCL_MAJOR_VERSION > 8 diff --git a/generic/tkVisual.c b/generic/tkVisual.c index bda0c4b..9089e74 100644 --- a/generic/tkVisual.c +++ b/generic/tkVisual.c @@ -175,7 +175,7 @@ Tk_GetVisual( if (Tcl_GetInt(interp, string, &visualId) == TCL_ERROR) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad X identifier for visual: \"%s\"", string)); - Tcl_SetErrorCode(interp, "TK", "VALUE", "VISUALID", NULL); + Tcl_SetErrorCode(interp, "TK", "VALUE", "VISUALID", (char *)NULL); return NULL; } templ.visualid = visualId; @@ -210,7 +210,7 @@ Tk_GetVisual( } Tcl_AppendToObj(msgObj, "or default", TCL_INDEX_NONE); Tcl_SetObjResult(interp, msgObj); - Tcl_SetErrorCode(interp, "TK", "LOOKUP", "VISUAL", string, NULL); + Tcl_SetErrorCode(interp, "TK", "LOOKUP", "VISUAL", string, (char *)NULL); return NULL; } while (isspace(UCHAR(*p))) { @@ -240,7 +240,7 @@ Tk_GetVisual( if (visInfoList == NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "couldn't find an appropriate visual", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "VISUAL", "INAPPROPRIATE", NULL); + Tcl_SetErrorCode(interp, "TK", "VISUAL", "INAPPROPRIATE", (char *)NULL); return NULL; } @@ -407,13 +407,13 @@ Tk_GetColormap( if (Tk_Screen(other) != Tk_Screen(tkwin)) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "can't use colormap for %s: not on same screen", string)); - Tcl_SetErrorCode(interp, "TK", "COLORMAP", "SCREEN", NULL); + Tcl_SetErrorCode(interp, "TK", "COLORMAP", "SCREEN", (char *)NULL); return None; } if (Tk_Visual(other) != Tk_Visual(tkwin)) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "can't use colormap for %s: incompatible visuals", string)); - Tcl_SetErrorCode(interp, "TK", "COLORMAP", "INCOMPATIBLE", NULL); + Tcl_SetErrorCode(interp, "TK", "COLORMAP", "INCOMPATIBLE", (char *)NULL); return None; } colormap = Tk_Colormap(other); diff --git a/generic/tkWindow.c b/generic/tkWindow.c index a23e457..ee0e1b8 100644 --- a/generic/tkWindow.c +++ b/generic/tkWindow.c @@ -436,7 +436,7 @@ GetScreen( if (screenName == NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "no display name and no $DISPLAY environment variable", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "NO_DISPLAY", NULL); + Tcl_SetErrorCode(interp, "TK", "NO_DISPLAY", (char *)NULL); return NULL; } length = strlen(screenName); @@ -466,7 +466,7 @@ GetScreen( if (dispPtr == NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "couldn't connect to display \"%s\"", screenName)); - Tcl_SetErrorCode(interp, "TK", "DISPLAY", "CONNECT", NULL); + Tcl_SetErrorCode(interp, "TK", "DISPLAY", "CONNECT", (char *)NULL); return NULL; } dispPtr->nextPtr = tsdPtr->displayList; /* TkGetDisplayList(); */ @@ -500,7 +500,7 @@ GetScreen( if (screenId >= ScreenCount(dispPtr->display)) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad screen number \"%d\"", screenId)); - Tcl_SetErrorCode(interp, "TK", "DISPLAY", "SCREEN_NUMBER", NULL); + Tcl_SetErrorCode(interp, "TK", "DISPLAY", "SCREEN_NUMBER", (char *)NULL); return NULL; } *screenPtr = screenId; @@ -748,7 +748,7 @@ NameWindow( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "window name starts with an upper-case letter: \"%s\"", name)); - Tcl_SetErrorCode(interp, "TK", "VALUE", "WINDOW", "NOTCLASS", NULL); + Tcl_SetErrorCode(interp, "TK", "VALUE", "WINDOW", "NOTCLASS", (char *)NULL); return TCL_ERROR; } @@ -787,7 +787,7 @@ NameWindow( if (!isNew) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "window name \"%s\" already exists in parent", name)); - Tcl_SetErrorCode(interp, "TK", "VALUE", "WINDOW", "EXISTS", NULL); + Tcl_SetErrorCode(interp, "TK", "VALUE", "WINDOW", "EXISTS", (char *)NULL); return TCL_ERROR; } Tcl_SetHashValue(hPtr, winPtr); @@ -1104,13 +1104,13 @@ Tk_CreateWindow( if (parentPtr->flags & TK_ALREADY_DEAD) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "can't create window: parent has been destroyed", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "CREATE", "DEAD_PARENT", NULL); + Tcl_SetErrorCode(interp, "TK", "CREATE", "DEAD_PARENT", (char *)NULL); return NULL; } else if (parentPtr->flags & TK_CONTAINER) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "can't create window: its parent has -container = yes", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "CREATE", "CONTAINER", NULL); + Tcl_SetErrorCode(interp, "TK", "CREATE", "CONTAINER", (char *)NULL); return NULL; } else if (screenName == NULL) { TkWindow *winPtr = TkAllocWindow(parentPtr->dispPtr, @@ -1168,13 +1168,13 @@ Tk_CreateAnonymousWindow( if (parentPtr->flags & TK_ALREADY_DEAD) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "can't create window: parent has been destroyed", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "CREATE", "DEAD_PARENT", NULL); + Tcl_SetErrorCode(interp, "TK", "CREATE", "DEAD_PARENT", (char *)NULL); return NULL; } else if (parentPtr->flags & TK_CONTAINER) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "can't create window: its parent has -container = yes", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "CREATE", "CONTAINER", NULL); + Tcl_SetErrorCode(interp, "TK", "CREATE", "CONTAINER", (char *)NULL); return NULL; } else if (screenName == NULL) { TkWindow *winPtr = TkAllocWindow(parentPtr->dispPtr, @@ -1252,7 +1252,7 @@ Tk_CreateWindowFromPath( if (p == NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad window path name \"%s\"", pathName)); - Tcl_SetErrorCode(interp, "TK", "VALUE", "WINDOW_PATH", NULL); + Tcl_SetErrorCode(interp, "TK", "VALUE", "WINDOW_PATH", (char *)NULL); return NULL; } numChars = (size_t)(p - pathName); @@ -1283,12 +1283,12 @@ Tk_CreateWindowFromPath( if (((TkWindow *) parent)->flags & TK_ALREADY_DEAD) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "can't create window: parent has been destroyed", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "CREATE", "DEAD_PARENT", NULL); + Tcl_SetErrorCode(interp, "TK", "CREATE", "DEAD_PARENT", (char *)NULL); return NULL; } else if (((TkWindow *) parent)->flags & TK_CONTAINER) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "can't create window: its parent has -container = yes", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "CREATE", "CONTAINER", NULL); + Tcl_SetErrorCode(interp, "TK", "CREATE", "CONTAINER", (char *)NULL); return NULL; } @@ -2420,7 +2420,7 @@ Tk_NameToWindow( if (interp != NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj("NULL main window",TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "NO_MAIN_WINDOW", NULL); + Tcl_SetErrorCode(interp, "TK", "NO_MAIN_WINDOW", (char *)NULL); } return NULL; } @@ -2432,7 +2432,7 @@ Tk_NameToWindow( Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad window path name \"%s\"", pathName)); Tcl_SetErrorCode(interp, "TK", "LOOKUP", "WINDOW", pathName, - NULL); + (char *)NULL); } return NULL; } @@ -2750,7 +2750,7 @@ Tk_MainWindow( } Tcl_SetObjResult(interp, Tcl_NewStringObj( "this isn't a Tk application", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "NO_MAIN_WINDOW", NULL); + Tcl_SetErrorCode(interp, "TK", "NO_MAIN_WINDOW", (char *)NULL); return NULL; } @@ -2910,8 +2910,8 @@ DeleteWindowsExitProc( */ for (dispPtr = tsdPtr->displayList; dispPtr != NULL; - dispPtr = dispPtr->nextPtr) { - XSync(dispPtr->display, False); + dispPtr = dispPtr->nextPtr) { + XSync(dispPtr->display, False); } /* @@ -3221,7 +3221,7 @@ Initialize( if (parent == NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "no controlling parent interpreter", TCL_INDEX_NONE)); - Tcl_SetErrorCode(interp, "TK", "SAFE", "NO_PARENT", NULL); + Tcl_SetErrorCode(interp, "TK", "SAFE", "NO_PARENT", (char *)NULL); return TCL_ERROR; } } |