diff options
-rw-r--r-- | macosx/tkMacOSXWm.c | 4 | ||||
-rw-r--r-- | macosx/ttkMacOSXTheme.c | 2 | ||||
-rw-r--r-- | unix/tkUnixWm.c | 4 | ||||
-rw-r--r-- | win/tkWinWm.c | 4 | ||||
-rw-r--r-- | win/tkWinX.c | 2 |
5 files changed, 10 insertions, 6 deletions
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index 38daca4..c0177c7 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -1984,6 +1984,7 @@ WmFrameCmd( { WmInfo *wmPtr = winPtr->wmInfoPtr; Window window; + char buf[TCL_INTEGER_SPACE]; if (objc != 3) { Tcl_WrongNumArgs(interp, 2, objv, "window"); @@ -1993,7 +1994,8 @@ WmFrameCmd( if (window == None) { window = Tk_WindowId((Tk_Window) winPtr); } - Tcl_SetObjResult(interp, Tcl_ObjPrintf("0x%x", (unsigned) window)); + sprintf(buf, "0x%" TCL_Z_MODIFIER "x", (size_t)window); + Tcl_SetObjResult(interp, Tcl_NewStringObj(buf, -1)); return TCL_OK; } diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c index 60e768d..3d88ef7 100644 --- a/macosx/ttkMacOSXTheme.c +++ b/macosx/ttkMacOSXTheme.c @@ -1064,7 +1064,7 @@ static void DrawDarkFocusRing( { CGRect insetBounds = CGRectInset(bounds, -3, -3); CHECK_RADIUS(4, insetBounds) - + NSColorSpace *deviceRGB = [NSColorSpace deviceRGBColorSpace]; NSColor *strokeColor; NSColor *fillColor = [NSColor colorWithColorSpace:deviceRGB diff --git a/unix/tkUnixWm.c b/unix/tkUnixWm.c index 1cf0402..773186d 100644 --- a/unix/tkUnixWm.c +++ b/unix/tkUnixWm.c @@ -1870,6 +1870,7 @@ WmFrameCmd( { WmInfo *wmPtr = winPtr->wmInfoPtr; Window window; + char buf[TCL_INTEGER_SPACE]; if (objc != 3) { Tcl_WrongNumArgs(interp, 2, objv, "window"); @@ -1879,7 +1880,8 @@ WmFrameCmd( if (window == None) { window = Tk_WindowId((Tk_Window) winPtr); } - Tcl_SetObjResult(interp, Tcl_ObjPrintf("0x%x", (unsigned) window)); + sprintf(buf, "0x%" TCL_Z_MODIFIER "x", (size_t)window); + Tcl_SetObjResult(interp, Tcl_NewStringObj(buf, -1)); return TCL_OK; } diff --git a/win/tkWinWm.c b/win/tkWinWm.c index cf354c7..217cc57 100644 --- a/win/tkWinWm.c +++ b/win/tkWinWm.c @@ -3709,7 +3709,7 @@ WmFrameCmd( { WmInfo *wmPtr = winPtr->wmInfoPtr; HWND hwnd; - char buf[TCL_INTEGER_SPACE]; + char buf[TCL_INTEGER_SPACE]; if (objc != 3) { Tcl_WrongNumArgs(interp, 2, objv, "window"); @@ -3722,7 +3722,7 @@ WmFrameCmd( if (hwnd == NULL) { hwnd = Tk_GetHWND(Tk_WindowId((Tk_Window) winPtr)); } - sprintf(buf, "0x%" TCL_Z_MODIFIER "x", (size_t)PTR2INT(hwnd)); + sprintf(buf, "0x%" TCL_Z_MODIFIER "x", (size_t)hwnd); Tcl_SetObjResult(interp, Tcl_NewStringObj(buf, -1)); return TCL_OK; } diff --git a/win/tkWinX.c b/win/tkWinX.c index 33e34da..96a6958 100644 --- a/win/tkWinX.c +++ b/win/tkWinX.c @@ -1495,7 +1495,7 @@ UpdateInputLanguage( return; } - wsprintfA(codepage, "cp%d", charsetInfo.ciACP); + sprintf(codepage, "cp%d", charsetInfo.ciACP); if ((encoding = Tcl_GetEncoding(NULL, codepage)) == NULL) { /* |