diff options
author | hobbs <hobbs> | 2001-09-21 21:19:02 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2001-09-21 21:19:02 (GMT) |
commit | c15e4544e15f656682ebe0fe43619fdeb2e00a1f (patch) | |
tree | 1686ef49473c533f38a745ab133fe62396dff979 /generic | |
parent | e5568a988e863496a20b1dbfb19c9ed04450e90a (diff) | |
download | tk-c15e4544e15f656682ebe0fe43619fdeb2e00a1f.zip tk-c15e4544e15f656682ebe0fe43619fdeb2e00a1f.tar.gz tk-c15e4544e15f656682ebe0fe43619fdeb2e00a1f.tar.bz2 |
correct Window id's to be of type Window
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkBind.c | 8 | ||||
-rw-r--r-- | generic/tkCmds.c | 7 |
2 files changed, 7 insertions, 8 deletions
diff --git a/generic/tkBind.c b/generic/tkBind.c index f0627de..b382cf0 100644 --- a/generic/tkBind.c +++ b/generic/tkBind.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkBind.c,v 1.16 2001/08/01 16:21:11 dgp Exp $ + * RCS: @(#) $Id: tkBind.c,v 1.17 2001/09/21 21:19:02 hobbs Exp $ */ #include "tkPort.h" @@ -2298,7 +2298,7 @@ ExpandPercents(winPtr, before, eventPtr, keySym, dsPtr) /* Empty loop body. */ } if (string != before) { - Tcl_DStringAppend(dsPtr, before, string-before); + Tcl_DStringAppend(dsPtr, before, (int) (string-before)); before = string; } if (*before == 0) { @@ -3715,7 +3715,7 @@ NameToWindow(interp, mainWin, objPtr, tkwinPtr) { char *name; Tk_Window tkwin; - int id; + Window id; name = Tcl_GetStringFromObj(objPtr, NULL); if (name[0] == '.') { @@ -3731,7 +3731,7 @@ NameToWindow(interp, mainWin, objPtr, tkwinPtr) */ if ((TkpScanWindowId(NULL, name, &id) != TCL_OK) || - ((*tkwinPtr = Tk_IdToWindow(Tk_Display(mainWin), (Window) id)) + ((*tkwinPtr = Tk_IdToWindow(Tk_Display(mainWin), id)) == NULL)) { Tcl_AppendResult(interp, "bad window name/identifier \"", name, "\"", (char *) NULL); diff --git a/generic/tkCmds.c b/generic/tkCmds.c index 6be5557..2149d58 100644 --- a/generic/tkCmds.c +++ b/generic/tkCmds.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkCmds.c,v 1.19 2000/10/05 18:31:25 ericm Exp $ + * RCS: @(#) $Id: tkCmds.c,v 1.20 2001/09/21 21:19:02 hobbs Exp $ */ #include "tkPort.h" @@ -1391,7 +1391,7 @@ Tk_WinfoObjCmd(clientData, interp, objc, objv) return result; } case WIN_PATHNAME: { - int id; + Window id; skip = TkGetDisplayOf(interp, objc - 2, objv + 2, &tkwin); if (skip < 0) { @@ -1405,8 +1405,7 @@ Tk_WinfoObjCmd(clientData, interp, objc, objv) if (TkpScanWindowId(interp, string, &id) != TCL_OK) { return TCL_ERROR; } - winPtr = (TkWindow *) - Tk_IdToWindow(Tk_Display(tkwin), (Window) id); + winPtr = (TkWindow *)Tk_IdToWindow(Tk_Display(tkwin), id); if ((winPtr == NULL) || (winPtr->mainPtr != ((TkWindow *) tkwin)->mainPtr)) { Tcl_AppendStringsToObj(resultPtr, "window id \"", string, |