summaryrefslogtreecommitdiffstats
path: root/Doc/lib/libselect.tex
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-04-04 12:29:37 (GMT)
committerGuido van Rossum <guido@python.org>1995-04-04 12:29:37 (GMT)
commit02ee80d408727c5b9ddebdbdedbfbb03a17f24ea (patch)
tree38c22002616aae2deebeaf4a968790d8f4a6f671 /Doc/lib/libselect.tex
parent25f6fcc55049e6e3e4e5073817d7b8243186c812 (diff)
downloadcpython-02ee80d408727c5b9ddebdbdedbfbb03a17f24ea.zip
cpython-02ee80d408727c5b9ddebdbdedbfbb03a17f24ea.tar.gz
cpython-02ee80d408727c5b9ddebdbdedbfbb03a17f24ea.tar.bz2
minor things
Diffstat (limited to 'Doc/lib/libselect.tex')
-rw-r--r--Doc/lib/libselect.tex4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/lib/libselect.tex b/Doc/lib/libselect.tex
index 421d1aa..0b50101 100644
--- a/Doc/lib/libselect.tex
+++ b/Doc/lib/libselect.tex
@@ -12,14 +12,14 @@ corresponding string, as would be printed by the C function
\code{perror()}.
\end{excdesc}
-\begin{funcdesc}{select}{iwtd\, owtd\, ewtd\, timeout}
+\begin{funcdesc}{select}{iwtd\, owtd\, ewtd\optional{\, timeout}}
This is a straightforward interface to the \UNIX{} \code{select()}
system call. The first three arguments are lists of `waitable
objects': either integers representing \UNIX{} file descriptors or
objects with a parameterless method named \code{fileno()} returning
such an integer. The three lists of waitable objects are for input,
output and `exceptional conditions', respectively. Empty lists are
-allowed. The optional last argument is a time-out specified as a
+allowed. The optional \var{timeout} argument specifies a time-out as a
floating point number in seconds. When the \var{timeout} argument
is omitted the function blocks until at least one file descriptor is
ready. A time-out value of zero specifies a poll and never blocks.
> Tk is a free and open-source, cross-platform widget toolkit that provides a library of basic elements of GUI widgets for building a graphical user interface (GUI) in many programming languages.
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat
-rw-r--r--generic/tkAtom.c4
-rw-r--r--generic/tkBind.c6
-rw-r--r--generic/tkBitmap.c14
-rw-r--r--generic/tkButton.c8
-rw-r--r--generic/tkCanvImg.c10
-rw-r--r--generic/tkCanvUtil.c4
-rw-r--r--generic/tkCanvWind.c40
-rw-r--r--generic/tkCanvas.c12
-rw-r--r--generic/tkClipboard.c4
-rw-r--r--generic/tkCmds.c76
-rw-r--r--generic/tkConsole.c7
-rw-r--r--generic/tkEntry.c4
-rw-r--r--generic/tkEvent.c39
-rw-r--r--generic/tkFont.c5
-rw-r--r--generic/tkFrame.c10
-rw-r--r--generic/tkGC.c8
-rw-r--r--generic/tkGet.c6
-rw-r--r--generic/tkGrid.c6
-rw-r--r--generic/tkImgBmap.c4
-rw-r--r--generic/tkImgPhoto.c10
-rw-r--r--generic/tkListbox.c92
-rw-r--r--generic/tkMacWinMenu.c10
-rw-r--r--generic/tkMenu.c4
-rw-r--r--generic/tkMenuDraw.c30
-rw-r--r--generic/tkMenubutton.c3
-rw-r--r--generic/tkMessage.c6
-rw-r--r--generic/tkPanedWindow.c5
-rw-r--r--generic/tkPlace.c23
-rw-r--r--generic/tkPointer.c18
-rw-r--r--generic/tkScale.c4
-rw-r--r--generic/tkSelect.c18
-rw-r--r--generic/tkStyle.c4
-rw-r--r--generic/tkText.c15
-rw-r--r--generic/tkTextBTree.c4
-rw-r--r--generic/tkTextDisp.c4
-rw-r--r--generic/tkTextImage.c37
-rw-r--r--generic/tkTextMark.c6
-rw-r--r--generic/tkTextTag.c4
-rw-r--r--generic/tkTextWind.c46
39 files changed, 295 insertions, 315 deletions
diff --git a/generic/tkAtom.c b/generic/tkAtom.c
index a9503c7..57e6923 100644
--- a/generic/tkAtom.c
+++ b/generic/tkAtom.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkAtom.c,v 1.11 2008/10/30 23:18:59 nijtmans Exp $
+ * RCS: @(#) $Id: tkAtom.c,v 1.12 2010/01/02 22:52:38 dkf Exp $
*/
#include "tkInt.h"
@@ -145,7 +145,7 @@ Tk_GetAtomName(
char *mustFree = NULL;
handler = Tk_CreateErrorHandler(dispPtr->display, BadAtom, -1, -1,
- NULL, (ClientData) NULL);
+ NULL, NULL);
name = mustFree = XGetAtomName(dispPtr->display, atom);
if (name == NULL) {
name = "?bad atom?";
diff --git a/generic/tkBind.c b/generic/tkBind.c
index 2277917..1dafaa2 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.58 2009/12/16 22:00:31 nijtmans Exp $
+ * RCS: @(#) $Id: tkBind.c,v 1.59 2010/01/02 22:52:38 dkf Exp $
*/
#include "tkInt.h"
@@ -1622,8 +1622,8 @@ Tk_BindEvent(
Tcl_Panic("Tk_BindEvent: missing command");
}
if (sourcePtr->eventProc == EvalTclBinding) {
- ExpandPercents(winPtr, (char *) sourcePtr->clientData,
- eventPtr, detail.keySym, &scripts);
+ ExpandPercents(winPtr, sourcePtr->clientData, eventPtr,
+ detail.keySym, &scripts);
} else {
if (matchCount >= matchSpace) {
PendingBinding *newPtr;
diff --git a/generic/tkBitmap.c b/generic/tkBitmap.c
index 14b4985..f7f648f 100644
--- a/generic/tkBitmap.c
+++ b/generic/tkBitmap.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: tkBitmap.c,v 1.27 2009/11/21 17:24:42 dkf Exp $
+ * RCS: @(#) $Id: tkBitmap.c,v 1.28 2010/01/02 22:52:38 dkf Exp $
*/
#include "tkInt.h"
@@ -309,7 +309,7 @@ GetBitmap(
Pixmap bitmap;
int isNew, width, height, dummy2;
TkDisplay *dispPtr = ((TkWindow *) tkwin)->dispPtr;
- ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
+ ThreadSpecificData *tsdPtr =
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
if (!dispPtr->bitmapInit) {
@@ -483,7 +483,7 @@ Tk_DefineBitmap(
int isNew;
Tcl_HashEntry *predefHashPtr;
TkPredefBitmap *predefPtr;
- ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
+ ThreadSpecificData *tsdPtr =
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
/*
@@ -679,7 +679,7 @@ Tk_FreeBitmap(
if (idHashPtr == NULL) {
Tcl_Panic("Tk_FreeBitmap received unknown bitmap argument");
}
- FreeBitmap((TkBitmap *) Tcl_GetHashValue(idHashPtr));
+ FreeBitmap(Tcl_GetHashValue(idHashPtr));
}
/*
@@ -838,7 +838,7 @@ Tk_GetBitmapFromData(
char string[16 + TCL_INTEGER_SPACE];
char *name;
TkDisplay *dispPtr = ((TkWindow *) tkwin)->dispPtr;
- ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
+ ThreadSpecificData *tsdPtr =
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
if (!tsdPtr->initialized) {
@@ -1030,7 +1030,7 @@ BitmapInit(
* or NULL if unavailable. */
{
Tcl_Interp *dummy;
- ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
+ ThreadSpecificData *tsdPtr =
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
/*
@@ -1208,7 +1208,7 @@ TkDebugBitmap(
Tcl_HashTable *
TkGetBitmapPredefTable(void)
{
- ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
+ ThreadSpecificData *tsdPtr =
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
return &tsdPtr->predefBitmapTable;
diff --git a/generic/tkButton.c b/generic/tkButton.c
index a0968bc..70b77d0 100644
--- a/generic/tkButton.c
+++ b/generic/tkButton.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: tkButton.c,v 1.35 2009/06/29 14:35:01 das Exp $
+ * RCS: @(#) $Id: tkButton.c,v 1.36 2010/01/02 22:52:38 dkf Exp $
*/
#include "tkInt.h"
@@ -633,7 +633,7 @@ ButtonCreate(
TkButton *butPtr;
Tk_OptionTable optionTable;
Tk_Window tkwin;
- ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
+ ThreadSpecificData *tsdPtr =
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
if (!tsdPtr->defaultsInitialized) {
@@ -1336,9 +1336,7 @@ TkButtonWorldChanged(
XGCValues gcValues;
GC newGC;
unsigned long mask;
- TkButton *butPtr;
-
- butPtr = (TkButton *) instanceData;
+ TkButton *butPtr = instanceData;
/*
* Recompute GCs.
diff --git a/generic/tkCanvImg.c b/generic/tkCanvImg.c
index 5cf3b6c..afcc3a5 100644
--- a/generic/tkCanvImg.c
+++ b/generic/tkCanvImg.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkCanvImg.c,v 1.14 2009/02/03 23:55:47 nijtmans Exp $
+ * RCS: @(#) $Id: tkCanvImg.c,v 1.15 2010/01/02 22:52:38 dkf Exp $
*/
#include <stdio.h>
@@ -321,7 +321,7 @@ ConfigureImage(
}
if (imgPtr->imageString != NULL) {
image = Tk_GetImage(interp, tkwin, imgPtr->imageString,
- ImageChangedProc, (ClientData) imgPtr);
+ ImageChangedProc, imgPtr);
if (image == NULL) {
return TCL_ERROR;
}
@@ -334,7 +334,7 @@ ConfigureImage(
imgPtr->image = image;
if (imgPtr->activeImageString != NULL) {
image = Tk_GetImage(interp, tkwin, imgPtr->activeImageString,
- ImageChangedProc, (ClientData) imgPtr);
+ ImageChangedProc, imgPtr);
if (image == NULL) {
return TCL_ERROR;
}
@@ -347,7 +347,7 @@ ConfigureImage(
imgPtr->activeImage = image;
if (imgPtr->disabledImageString != NULL) {
image = Tk_GetImage(interp, tkwin, imgPtr->disabledImageString,
- ImageChangedProc, (ClientData) imgPtr);
+ ImageChangedProc, imgPtr);
if (image == NULL) {
return TCL_ERROR;
}
@@ -851,7 +851,7 @@ ImageChangedProc(
* 0). */
int imgWidth, int imgHeight)/* New dimensions of image. */
{
- ImageItem *imgPtr = (ImageItem *) clientData;
+ ImageItem *imgPtr = clientData;
/*
* If the image's size changed and it's not anchored at its northwest
diff --git a/generic/tkCanvUtil.c b/generic/tkCanvUtil.c
index 0856927..9c8e576 100644
--- a/generic/tkCanvUtil.c
+++ b/generic/tkCanvUtil.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkCanvUtil.c,v 1.26 2009/06/23 05:16:59 nijtmans Exp $
+ * RCS: @(#) $Id: tkCanvUtil.c,v 1.27 2010/01/02 22:52:38 dkf Exp $
*/
#include "tkInt.h"
@@ -716,7 +716,7 @@ SmoothMethodCleanupProc(
int
TkSmoothParseProc(
- ClientData clientData, /* some flags.*/
+ ClientData clientData, /* Ignored. */
Tcl_Interp *interp, /* Used for reporting errors. */
Tk_Window tkwin, /* Window containing canvas widget. */
const char *value, /* Value of option. */
diff --git a/generic/tkCanvWind.c b/generic/tkCanvWind.c
index 850586c..bf5555c 100644
--- a/generic/tkCanvWind.c
+++ b/generic/tkCanvWind.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkCanvWind.c,v 1.19 2009/02/03 23:55:47 nijtmans Exp $
+ * RCS: @(#) $Id: tkCanvWind.c,v 1.20 2010/01/02 22:52:38 dkf Exp $
*/
#include <stdio.h>
@@ -328,8 +328,8 @@ ConfigureWinItem(
if (oldWindow != winItemPtr->tkwin) {
if (oldWindow != NULL) {
Tk_DeleteEventHandler(oldWindow, StructureNotifyMask,
- WinItemStructureProc, (ClientData) winItemPtr);
- Tk_ManageGeometry(oldWindow, NULL, (ClientData) NULL);
+ WinItemStructureProc, winItemPtr);
+ Tk_ManageGeometry(oldWindow, NULL, NULL);
Tk_UnmaintainGeometry(oldWindow, canvasTkwin);
Tk_UnmapWindow(oldWindow);
}
@@ -349,25 +349,19 @@ ConfigureWinItem(
if (ancestor == parent) {
break;
}
- if (((Tk_FakeWin *) (ancestor))->flags & TK_TOP_HIERARCHY) {
- badWindow:
- Tcl_AppendResult(interp, "can't use ",
- Tk_PathName(winItemPtr->tkwin),
- " in a window item of this canvas", NULL);
- winItemPtr->tkwin = NULL;
- return TCL_ERROR;
+ if (((Tk_FakeWin *) ancestor)->flags & TK_TOP_HIERARCHY) {
+ goto badWindow;
}
}
- if (((Tk_FakeWin *) (winItemPtr->tkwin))->flags & TK_TOP_HIERARCHY) {
+ if (((Tk_FakeWin *) winItemPtr->tkwin)->flags & TK_TOP_HIERARCHY){
goto badWindow;
}
if (winItemPtr->tkwin == canvasTkwin) {
goto badWindow;
}
Tk_CreateEventHandler(winItemPtr->tkwin, StructureNotifyMask,
- WinItemStructureProc, (ClientData) winItemPtr);
- Tk_ManageGeometry(winItemPtr->tkwin, &canvasGeomType,
- (ClientData) winItemPtr);
+ WinItemStructureProc, winItemPtr);
+ Tk_ManageGeometry(winItemPtr->tkwin, &canvasGeomType, winItemPtr);
}
}
if ((winItemPtr->tkwin != NULL)
@@ -380,8 +374,13 @@ ConfigureWinItem(
}
ComputeWindowBbox(canvas, winItemPtr);
-
return TCL_OK;
+
+ badWindow:
+ Tcl_AppendResult(interp, "can't use ", Tk_PathName(winItemPtr->tkwin),
+ " in a window item of this canvas", NULL);
+ winItemPtr->tkwin = NULL;
+ return TCL_ERROR;
}
/*
@@ -412,9 +411,8 @@ DeleteWinItem(
if (winItemPtr->tkwin != NULL) {
Tk_DeleteEventHandler(winItemPtr->tkwin, StructureNotifyMask,
- WinItemStructureProc, (ClientData) winItemPtr);
- Tk_ManageGeometry(winItemPtr->tkwin, NULL,
- (ClientData) NULL);
+ WinItemStructureProc, winItemPtr);
+ Tk_ManageGeometry(winItemPtr->tkwin, NULL, NULL);
if (canvasTkwin != Tk_Parent(winItemPtr->tkwin)) {
Tk_UnmaintainGeometry(winItemPtr->tkwin, canvasTkwin);
}
@@ -878,7 +876,7 @@ CanvasPsWindow(
#ifdef X_GetImage
handle = Tk_CreateErrorHandler(Tk_Display(tkwin), BadMatch,
- X_GetImage, -1, xerrorhandler, (ClientData) tkwin);
+ X_GetImage, -1, xerrorhandler, tkwin);
#endif
/*
@@ -999,7 +997,7 @@ WinItemStructureProc(
ClientData clientData, /* Pointer to record describing window item. */
XEvent *eventPtr) /* Describes what just happened. */
{
- WindowItem *winItemPtr = (WindowItem *) clientData;
+ WindowItem *winItemPtr = clientData;
if (eventPtr->type == DestroyNotify) {
winItemPtr->tkwin = NULL;
@@ -1029,7 +1027,7 @@ WinItemRequestProc(
ClientData clientData, /* Pointer to record for window item. */
Tk_Window tkwin) /* Window that changed its desired size. */
{
- WindowItem *winItemPtr = (WindowItem *) clientData;
+ WindowItem *winItemPtr = clientData;
ComputeWindowBbox(winItemPtr->canvas, winItemPtr);
diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c
index 3a8ea99..f14d2d0 100644
--- a/generic/tkCanvas.c
+++ b/generic/tkCanvas.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkCanvas.c,v 1.60 2009/11/19 22:28:12 ferrieux Exp $
+ * RCS: @(#) $Id: tkCanvas.c,v 1.61 2010/01/02 22:52:38 dkf Exp $
*/
/* #define USE_OLD_TAG_SEARCH 1 */
@@ -911,7 +911,7 @@ CanvasWidgetCmd(
* tag).
*/
- object = 0;
+ object = NULL;
#ifdef USE_OLD_TAG_SEARCH
if (isdigit(UCHAR(Tcl_GetString(objv[2])[0]))) {
int id;
@@ -928,7 +928,7 @@ CanvasWidgetCmd(
object = itemPtr;
}
- if (object == 0) {
+ if (object == NULL) {
Tcl_AppendResult(interp, "item \"", Tcl_GetString(objv[2]),
"\" doesn't exist", NULL);
result = TCL_ERROR;
@@ -3216,7 +3216,7 @@ NextItem(
static SearchUids *
GetStaticUids(void)
{
- SearchUids *searchUids = (SearchUids *)
+ SearchUids *searchUids =
Tcl_GetThreadData(&dataKey, sizeof(SearchUids));
if (searchUids->allUid == NULL) {
@@ -5105,8 +5105,8 @@ CanvasDoEvent(
if (numObjects <= NUM_STATIC) {
objectPtr = staticObjects;
} else {
- objectPtr = (ClientData *) ckalloc((unsigned)
- (numObjects * sizeof(ClientData)));
+ objectPtr = (ClientData *)
+ ckalloc((unsigned) numObjects * sizeof(ClientData));
}
#ifdef USE_OLD_TAG_SEARCH
objectPtr[0] = (ClientData) Tk_GetUid("all");
diff --git a/generic/tkClipboard.c b/generic/tkClipboard.c
index 138a528..e2064c1 100644
--- a/generic/tkClipboard.c
+++ b/generic/tkClipboard.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: tkClipboard.c,v 1.23 2009/01/02 23:20:32 nijtmans Exp $
+ * RCS: @(#) $Id: tkClipboard.c,v 1.24 2010/01/02 22:52:38 dkf Exp $
*/
#include "tkInt.h"
@@ -599,7 +599,7 @@ Tk_ClipboardObjCmd(
Tcl_DStringInit(&selBytes);
result = Tk_GetSelection(interp, tkwin, selection, target,
- ClipboardGetProc, (ClientData) &selBytes);
+ ClipboardGetProc, &selBytes);
if (result == TCL_OK) {
Tcl_DStringResult(interp, &selBytes);
} else {
diff --git a/generic/tkCmds.c b/generic/tkCmds.c
index c6ed614..b93c27b 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.50 2009/02/03 23:55:47 nijtmans Exp $
+ * RCS: @(#) $Id: tkCmds.c,v 1.51 2010/01/02 22:52:38 dkf Exp $
*/
#include "tkInt.h"
@@ -101,7 +101,7 @@ Tk_BellObjCmd(
"-displayof", "-nice", NULL
};
enum options { TK_BELL_DISPLAYOF, TK_BELL_NICE };
- Tk_Window tkwin = (Tk_Window) clientData;
+ Tk_Window tkwin = clientData;
int i, index, nice = 0;
if (objc > 4) {
@@ -162,7 +162,7 @@ Tk_BindObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- Tk_Window tkwin = (Tk_Window) clientData;
+ Tk_Window tkwin = clientData;
TkWindow *winPtr;
ClientData object;
const char *string;
@@ -186,7 +186,7 @@ Tk_BindObjCmd(
}
object = (ClientData) winPtr->pathName;
} else {
- winPtr = (TkWindow *) clientData;
+ winPtr = clientData;
object = (ClientData) Tk_GetUid(string);
}
@@ -200,9 +200,8 @@ Tk_BindObjCmd(
if (objc == 4) {
int append = 0;
unsigned long mask;
- const char *sequence, *script;
- sequence = Tcl_GetString(objv[2]);
- script = Tcl_GetString(objv[3]);
+ const char *sequence = Tcl_GetString(objv[2]);
+ const char *script = Tcl_GetString(objv[3]);
/*
* If the script is null, just delete the binding.
@@ -285,8 +284,8 @@ TkBindEventProc(
*/
if (winPtr->numTags > MAX_OBJS) {
- objPtr = (ClientData *) ckalloc((unsigned)
- (winPtr->numTags * sizeof(ClientData)));
+ objPtr = (ClientData *)
+ ckalloc((unsigned) winPtr->numTags * sizeof(ClientData));
}
for (i = 0; i < winPtr->numTags; i++) {
p = winPtr->tagPtr[i];
@@ -348,7 +347,7 @@ Tk_BindtagsObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- Tk_Window tkwin = (Tk_Window) clientData;
+ Tk_Window tkwin = clientData;
TkWindow *winPtr, *winPtr2;
int i, length;
const char *p;
@@ -402,8 +401,8 @@ Tk_BindtagsObjCmd(
}
winPtr->numTags = length;
- winPtr->tagPtr = (ClientData *) ckalloc((unsigned)
- (length * sizeof(ClientData)));
+ winPtr->tagPtr = (ClientData *)
+ ckalloc((unsigned) length * sizeof(ClientData));
for (i = 0; i < length; i++) {
p = Tcl_GetString(tags[i]);
if (p[0] == '.') {
@@ -416,7 +415,7 @@ Tk_BindtagsObjCmd(
* is one.
*/
- copy = (char *) ckalloc((unsigned) (strlen(p) + 1));
+ copy = ckalloc((unsigned) strlen(p) + 1);
strcpy(copy, p);
winPtr->tagPtr[i] = (ClientData) copy;
} else {
@@ -492,7 +491,7 @@ Tk_DestroyObjCmd(
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tk_Window window;
- Tk_Window tkwin = (Tk_Window) clientData;
+ Tk_Window tkwin = clientData;
int i;
for (i = 1; i < objc; i++) {
@@ -539,7 +538,7 @@ Tk_LowerObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- Tk_Window mainwin = (Tk_Window) clientData;
+ Tk_Window mainwin = clientData;
Tk_Window tkwin, other;
if ((objc != 2) && (objc != 3)) {
@@ -593,7 +592,7 @@ Tk_RaiseObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- Tk_Window mainwin = (Tk_Window) clientData;
+ Tk_Window mainwin = clientData;
Tk_Window tkwin, other;
if ((objc != 2) && (objc != 3)) {
@@ -639,7 +638,9 @@ Tk_RaiseObjCmd(
*/
int
-TkInitTkCmd(Tcl_Interp *interp, ClientData clientData)
+TkInitTkCmd(
+ Tcl_Interp *interp,
+ ClientData clientData)
{
TkMakeEnsemble(interp, "::", "tk", clientData, tkCmdMap);
#if defined(__WIN32__) || defined(MAC_OSX_TK)
@@ -803,8 +804,7 @@ ScalingCmd(
double d;
if (Tcl_IsSafe(interp)) {
- Tcl_SetResult(interp,
- "scaling not accessible in a safe interpreter",
+ Tcl_SetResult(interp, "scaling not accessible in a safe interpreter",
TCL_STATIC);
return TCL_ERROR;
}
@@ -835,8 +835,7 @@ ScalingCmd(
WidthMMOfScreen(screenPtr) = width;
HeightMMOfScreen(screenPtr) = height;
} else {
- Tcl_WrongNumArgs(interp, 1, objv,
- "?-displayof window? ?factor?");
+ Tcl_WrongNumArgs(interp, 1, objv, "?-displayof window? ?factor?");
return TCL_ERROR;
}
return TCL_OK;
@@ -990,7 +989,7 @@ Tk_TkwaitObjCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- Tk_Window tkwin = (Tk_Window) clientData;
+ Tk_Window tkwin = clientData;
int done, index;
int code = TCL_OK;
static const char *const optionStrings[] = {
@@ -1014,7 +1013,7 @@ Tk_TkwaitObjCmd(
case TKWAIT_VARIABLE:
if (Tcl_TraceVar(interp, Tcl_GetString(objv[2]),
TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
- WaitVariableProc, (ClientData) &done) != TCL_OK) {
+ WaitVariableProc, &done) != TCL_OK) {
return TCL_ERROR;
}
done = 0;
@@ -1027,7 +1026,7 @@ Tk_TkwaitObjCmd(
}
Tcl_UntraceVar(interp, Tcl_GetString(objv[2]),
TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
- WaitVariableProc, (ClientData) &done);
+ WaitVariableProc, &done);
break;
case TKWAIT_VISIBILITY: {
@@ -1039,7 +1038,7 @@ Tk_TkwaitObjCmd(
}
Tk_CreateEventHandler(window,
VisibilityChangeMask|StructureNotifyMask,
- WaitVisibilityProc, (ClientData) &done);
+ WaitVisibilityProc, &done);
done = 0;
while (!done) {
if (Tcl_Canceled(interp, TCL_LEAVE_ERR_MSG) == TCL_ERROR) {
@@ -1061,7 +1060,7 @@ Tk_TkwaitObjCmd(
}
Tk_DeleteEventHandler(window,
VisibilityChangeMask|StructureNotifyMask,
- WaitVisibilityProc, (ClientData) &done);
+ WaitVisibilityProc, &done);
break;
}
@@ -1073,7 +1072,7 @@ Tk_TkwaitObjCmd(
return TCL_ERROR;
}
Tk_CreateEventHandler(window, StructureNotifyMask,
- WaitWindowProc, (ClientData) &done);
+ WaitWindowProc, &done);
done = 0;
while (!done) {
if (Tcl_Canceled(interp, TCL_LEAVE_ERR_MSG) == TCL_ERROR) {
@@ -1084,15 +1083,14 @@ Tk_TkwaitObjCmd(
}
/*
- * Note: normally there's no need to delete the event handler. It was deleted
- * automatically when the window was destroyed; however, if the wait operation
- * was canceled, we need to delete it.
+ * Note: normally there's no need to delete the event handler. It was
+ * deleted automatically when the window was destroyed; however, if
+ * the wait operation was canceled, we need to delete it.
*/
if (done == 0) {
- Tk_DeleteEventHandler(window,
- StructureNotifyMask,
- WaitWindowProc, (ClientData) &done);
+ Tk_DeleteEventHandler(window, StructureNotifyMask,
+ WaitWindowProc, &done);
}
break;
}
@@ -1119,7 +1117,7 @@ WaitVariableProc(
const char *name2, /* Second part of variable name. */
int flags) /* Information about what happened. */
{
- int *donePtr = (int *) clientData;
+ int *donePtr = clientData;
*donePtr = 1;
return NULL;
@@ -1131,7 +1129,7 @@ WaitVisibilityProc(
ClientData clientData, /* Pointer to integer to set to 1. */
XEvent *eventPtr) /* Information about event (not used). */
{
- int *donePtr = (int *) clientData;
+ int *donePtr = clientData;
if (eventPtr->type == VisibilityNotify) {
*donePtr = 1;
@@ -1146,7 +1144,7 @@ WaitWindowProc(
ClientData clientData, /* Pointer to integer to set to 1. */
XEvent *eventPtr) /* Information about event. */
{
- int *donePtr = (int *) clientData;
+ int *donePtr = clientData;
if (eventPtr->type == DestroyNotify) {
*donePtr = 1;
@@ -1279,7 +1277,7 @@ Tk_WinfoObjCmd(
int index, x, y, width, height, useX, useY, class, skip;
const char *string;
TkWindow *winPtr;
- Tk_Window tkwin;
+ Tk_Window tkwin = clientData;
static const TkStateMap visualMap[] = {
{PseudoColor, "pseudocolor"},
@@ -1329,8 +1327,6 @@ Tk_WinfoObjCmd(
WIN_VISUALSAVAILABLE
};
- tkwin = (Tk_Window) clientData;
-
if (objc < 2) {
Tcl_WrongNumArgs(interp, 1, objv, "option ?arg?");
return TCL_ERROR;
@@ -2009,7 +2005,7 @@ Tk_WmObjCmd(
updateGeom:
if (!(wmPtr->flags & (WM_UPDATE_PENDING|WM_NEVER_MAPPED))) {
- Tcl_DoWhenIdle(UpdateGeometryInfo, (ClientData) winPtr);
+ Tcl_DoWhenIdle(UpdateGeometryInfo, winPtr);
wmPtr->flags |= WM_UPDATE_PENDING;
}
return TCL_OK;
diff --git a/generic/tkConsole.c b/generic/tkConsole.c
index 79f16f0..a2d348d 100644
--- a/generic/tkConsole.c
+++ b/generic/tkConsole.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkConsole.c,v 1.39 2009/09/07 07:29:03 das Exp $
+ * RCS: @(#) $Id: tkConsole.c,v 1.40 2010/01/02 22:52:38 dkf Exp $
*/
#include "tkInt.h"
@@ -673,10 +673,11 @@ ConsoleObjCmd(
Tcl_Obj *const objv[]) /* Argument objects */
{
int index, result;
- static const char *const options[] = {"eval", "hide", "show", "title", NULL};
+ static const char *const options[] = {
+ "eval", "hide", "show", "title", NULL};
enum option {CON_EVAL, CON_HIDE, CON_SHOW, CON_TITLE};
Tcl_Obj *cmd = NULL;
- ConsoleInfo *info = (ConsoleInfo *) clientData;
+ ConsoleInfo *info = clientData;
Tcl_Interp *consoleInterp = info->consoleInterp;
if (objc < 2) {
diff --git a/generic/tkEntry.c b/generic/tkEntry.c
index 8bc738f..c5181f8 100644
--- a/generic/tkEntry.c
+++ b/generic/tkEntry.c
@@ -14,7 +14,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkEntry.c,v 1.58 2009/02/03 23:55:47 nijtmans Exp $
+ * RCS: @(#) $Id: tkEntry.c,v 1.59 2010/01/02 22:52:38 dkf Exp $
*/
#include "tkInt.h"
@@ -1391,7 +1391,7 @@ EntryWorldChanged(
unsigned long mask;
Tk_3DBorder border;
XColor *colorPtr;
- Entry *entryPtr = (Entry *) instanceData;
+ Entry *entryPtr = instanceData;
entryPtr->avgWidth = Tk_TextWidth(entryPtr->tkfont, "0", 1);
if (entryPtr->avgWidth == 0) {
diff --git a/generic/tkEvent.c b/generic/tkEvent.c
index fd5c129..08f2f85 100644
--- a/generic/tkEvent.c
+++ b/generic/tkEvent.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkEvent.c,v 1.41 2010/01/02 11:07:56 dkf Exp $
+ * RCS: @(#) $Id: tkEvent.c,v 1.42 2010/01/02 22:52:38 dkf Exp $
*/
#include "tkInt.h"
@@ -869,7 +869,7 @@ Tk_DeleteEventHandler(
register InProgress *ipPtr;
TkEventHandler *prevPtr;
register TkWindow *winPtr = (TkWindow *) token;
- ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
+ ThreadSpecificData *tsdPtr =
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
/*
@@ -941,7 +941,7 @@ Tk_CreateGenericHandler(
ClientData clientData) /* One-word value to pass to proc. */
{
GenericHandler *handlerPtr;
- ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
+ ThreadSpecificData *tsdPtr =
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
handlerPtr = (GenericHandler *) ckalloc(sizeof(GenericHandler));
@@ -982,7 +982,7 @@ Tk_DeleteGenericHandler(
ClientData clientData)
{
GenericHandler * handler;
- ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
+ ThreadSpecificData *tsdPtr =
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
for (handler=tsdPtr->genericList ; handler ; handler=handler->nextPtr) {
@@ -1015,7 +1015,7 @@ Tk_CreateClientMessageHandler(
Tk_ClientMessageProc *proc) /* Function to call on event. */
{
GenericHandler *handlerPtr;
- ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
+ ThreadSpecificData *tsdPtr =
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
/*
@@ -1061,7 +1061,7 @@ Tk_DeleteClientMessageHandler(
Tk_ClientMessageProc *proc)
{
GenericHandler * handler;
- ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
+ ThreadSpecificData *tsdPtr =
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
for (handler=tsdPtr->cmList ; handler!=NULL ; handler=handler->nextPtr) {
@@ -1092,7 +1092,7 @@ Tk_DeleteClientMessageHandler(
void
TkEventInit(void)
{
- ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
+ ThreadSpecificData *tsdPtr =
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
tsdPtr->handlersActive = 0;
@@ -1127,9 +1127,8 @@ TkXErrorHandler(
ClientData clientData, /* Pointer to flag we set. */
XErrorEvent *errEventPtr) /* X error info. */
{
- int *error;
+ int *error = clientData;
- error = (int *) clientData;
*error = 1;
return 0;
}
@@ -1170,7 +1169,7 @@ ParentXId(
gotXError = 0;
handler = Tk_CreateErrorHandler(display, -1, -1, -1,
- TkXErrorHandler, (ClientData) (&gotXError));
+ TkXErrorHandler, &gotXError);
/*
* Get the parent window.
@@ -1414,7 +1413,7 @@ TkEventDeadWindow(
{
register TkEventHandler *handlerPtr;
register InProgress *ipPtr;
- ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
+ ThreadSpecificData *tsdPtr =
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
/*
@@ -1463,7 +1462,7 @@ TkCurrentTime(
TkDisplay *dispPtr) /* Display for which the time is desired. */
{
register XEvent *eventPtr;
- ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
+ ThreadSpecificData *tsdPtr =
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
if (tsdPtr->pendingPtr == NULL) {
@@ -1517,7 +1516,7 @@ Tk_RestrictEvents(
* argument. */
{
Tk_RestrictProc *prev;
- ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
+ ThreadSpecificData *tsdPtr =
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
prev = tsdPtr->restrictProc;
@@ -1638,7 +1637,7 @@ Tk_QueueWindowEvent(
Tcl_QueueEvent(&dispPtr->delayedMotionPtr->header, position);
dispPtr->delayedMotionPtr = NULL;
- Tcl_CancelIdleCall(DelayedMotionProc, (ClientData) dispPtr);
+ Tcl_CancelIdleCall(DelayedMotionProc, dispPtr);
}
}
@@ -1656,7 +1655,7 @@ Tk_QueueWindowEvent(
Tcl_Panic("Tk_QueueWindowEvent found unexpected delayed motion event");
}
dispPtr->delayedMotionPtr = wevPtr;
- Tcl_DoWhenIdle(DelayedMotionProc, (ClientData) dispPtr);
+ Tcl_DoWhenIdle(DelayedMotionProc, dispPtr);
} else {
Tcl_QueueEvent(&wevPtr->header, position);
}
@@ -1732,7 +1731,7 @@ WindowEventProc(
{
TkWindowEvent *wevPtr = (TkWindowEvent *) evPtr;
Tk_RestrictAction result;
- ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
+ ThreadSpecificData *tsdPtr =
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
if (!(flags & TCL_WINDOW_EVENTS)) {
@@ -1831,7 +1830,7 @@ DelayedMotionProc(
ClientData clientData) /* Pointer to display containing a delayed
* motion event to be serviced. */
{
- TkDisplay *dispPtr = (TkDisplay *) clientData;
+ TkDisplay *dispPtr = clientData;
if (dispPtr->delayedMotionPtr == NULL) {
Tcl_Panic("DelayedMotionProc found no delayed mouse motion event");
@@ -1959,7 +1958,7 @@ TkCreateThreadExitHandler(
ClientData clientData) /* Arbitrary value to pass to proc. */
{
ExitHandler *exitPtr;
- ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
+ ThreadSpecificData *tsdPtr =
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
exitPtr = (ExitHandler *) ckalloc(sizeof(ExitHandler));
@@ -2000,7 +1999,7 @@ TkDeleteThreadExitHandler(
ClientData clientData) /* Arbitrary value to pass to proc. */
{
ExitHandler *exitPtr, *prevPtr;
- ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
+ ThreadSpecificData *tsdPtr =
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
for (prevPtr = NULL, exitPtr = tsdPtr->firstExitPtr; exitPtr != NULL;
@@ -2088,7 +2087,7 @@ TkFinalizeThread(
ClientData clientData) /* Arbitrary value to pass to proc. */
{
ExitHandler *exitPtr;
- ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
+ ThreadSpecificData *tsdPtr =
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
Tcl_DeleteThreadExitHandler(TkFinalizeThread, NULL);
diff --git a/generic/tkFont.c b/generic/tkFont.c
index 21368fc..749f64b 100644
--- a/generic/tkFont.c
+++ b/generic/tkFont.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkFont.c,v 1.61 2009/11/21 17:24:42 dkf Exp $
+ * RCS: @(#) $Id: tkFont.c,v 1.62 2010/01/02 22:52:38 dkf Exp $
*/
#include "tkInt.h"
@@ -475,7 +475,7 @@ Tk_FontObjCmd(
Tcl_Obj *const objv[]) /* Argument objects. */
{
int index;
- Tk_Window tkwin;
+ Tk_Window tkwin = clientData;
TkFontInfo *fiPtr;
static const char *const optionStrings[] = {
"actual", "configure", "create", "delete",
@@ -487,7 +487,6 @@ Tk_FontObjCmd(
FONT_FAMILIES, FONT_MEASURE, FONT_METRICS, FONT_NAMES
};
- tkwin = (Tk_Window) clientData;
fiPtr = ((TkWindow *) tkwin)->mainPtr->fontInfoPtr;
if (objc < 2) {
diff --git a/generic/tkFrame.c b/generic/tkFrame.c
index 67c0fab..c204742 100644
--- a/generic/tkFrame.c
+++ b/generic/tkFrame.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: tkFrame.c,v 1.38 2009/02/03 23:55:47 nijtmans Exp $
+ * RCS: @(#) $Id: tkFrame.c,v 1.39 2010/01/02 22:52:38 dkf Exp $
*/
#include "default.h"
@@ -450,7 +450,7 @@ CreateFrame(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[], /* Argument objects. */
enum FrameType type, /* What widget type to create. */
- const char *appName) /* Should only be non-NULL if there are no
+ const char *appName) /* Should only be non-NULL if there are no
* Main window associated with the
* interpreter. Gives the base name to use for
* the new application. */
@@ -986,7 +986,7 @@ ConfigureFrame(
if (oldWindow != NULL) {
Tk_DeleteEventHandler(oldWindow, StructureNotifyMask,
FrameStructureProc, framePtr);
- Tk_ManageGeometry(oldWindow, NULL, (ClientData) NULL);
+ Tk_ManageGeometry(oldWindow, NULL, NULL);
Tk_UnmaintainGeometry(oldWindow, framePtr->tkwin);
Tk_UnmapWindow(oldWindow);
}
@@ -1805,7 +1805,7 @@ TkInstallFrameMenu(
TkWindow *winPtr = (TkWindow *) tkwin;
if (winPtr->mainPtr != NULL) {
- Frame *framePtr = (Frame *) winPtr->instanceData;
+ Frame *framePtr = winPtr->instanceData;
if (framePtr == NULL) {
Tcl_Panic("TkInstallFrameMenu couldn't get frame pointer");
@@ -1928,7 +1928,7 @@ void
TkMapTopFrame(
Tk_Window tkwin)
{
- Frame *framePtr = ((TkWindow*)tkwin)->instanceData;
+ Frame *framePtr = ((TkWindow *) tkwin)->instanceData;
Tk_OptionTable optionTable;
if (Tk_IsTopLevel(tkwin) && framePtr->type == TYPE_FRAME) {
diff --git a/generic/tkGC.c b/generic/tkGC.c
index a591b64..07f6014 100644
--- a/generic/tkGC.c
+++ b/generic/tkGC.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkGC.c,v 1.10 2007/12/13 15:24:14 dgp Exp $
+ * RCS: @(#) $Id: tkGC.c,v 1.11 2010/01/02 22:52:38 dkf Exp $
*/
#include "tkInt.h"
@@ -220,7 +220,7 @@ Tk_GetGC(
valueHashPtr = Tcl_CreateHashEntry(&dispPtr->gcValueTable,
(char *) &valueKey, &isNew);
if (!isNew) {
- gcPtr = (TkGC *) Tcl_GetHashValue(valueHashPtr);
+ gcPtr = Tcl_GetHashValue(valueHashPtr);
gcPtr->refCount++;
return gcPtr->gc;
}
@@ -313,7 +313,7 @@ Tk_FreeGC(
if (idHashPtr == NULL) {
Tcl_Panic("Tk_FreeGC received unknown gc argument");
}
- gcPtr = (TkGC *) Tcl_GetHashValue(idHashPtr);
+ gcPtr = Tcl_GetHashValue(idHashPtr);
gcPtr->refCount--;
if (gcPtr->refCount == 0) {
Tk_FreeXId(gcPtr->display, (XID) XGContextFromGC(gcPtr->gc));
@@ -351,7 +351,7 @@ TkGCCleanup(
for (entryPtr = Tcl_FirstHashEntry(&dispPtr->gcIdTable, &search);
entryPtr != NULL; entryPtr = Tcl_NextHashEntry(&search)) {
- gcPtr = (TkGC *) Tcl_GetHashValue(entryPtr);
+ gcPtr = Tcl_GetHashValue(entryPtr);
/*
* This call is not needed, as it is only used on Unix to restore the
diff --git a/generic/tkGet.c b/generic/tkGet.c
index de6b5fe..ad0de63 100644
--- a/generic/tkGet.c
+++ b/generic/tkGet.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkGet.c,v 1.15 2008/10/17 23:18:37 nijtmans Exp $
+ * RCS: @(#) $Id: tkGet.c,v 1.16 2010/01/02 22:52:38 dkf Exp $
*/
#include "tkInt.h"
@@ -489,7 +489,7 @@ static void
FreeUidThreadExitProc(
ClientData clientData) /* Not used. */
{
- ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
+ ThreadSpecificData *tsdPtr =
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
Tcl_DeleteHashTable(&tsdPtr->uidTable);
@@ -523,7 +523,7 @@ Tk_GetUid(
const char *string) /* String to convert. */
{
int dummy;
- ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
+ ThreadSpecificData *tsdPtr =
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
Tcl_HashTable *tablePtr = &tsdPtr->uidTable;
diff --git a/generic/tkGrid.c b/generic/tkGrid.c
index 2ea78c0..b5a439a 100644
--- a/generic/tkGrid.c
+++ b/generic/tkGrid.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkGrid.c,v 1.54 2009/09/18 22:35:00 pspjuth Exp $
+ * RCS: @(#) $Id: tkGrid.c,v 1.55 2010/01/02 22:52:38 dkf Exp $
*/
#include "tkInt.h"
@@ -664,7 +664,7 @@ GridForgetRemoveCommand(
slavePtr->flags = 0;
slavePtr->sticky = 0;
}
- Tk_ManageGeometry(slave, NULL, (ClientData) NULL);
+ Tk_ManageGeometry(slave, NULL, NULL);
if (slavePtr->masterPtr->tkwin != Tk_Parent(slavePtr->tkwin)) {
Tk_UnmaintainGeometry(slavePtr->tkwin,
slavePtr->masterPtr->tkwin);
@@ -2410,7 +2410,7 @@ GetGrid(
hPtr = Tcl_CreateHashEntry(&dispPtr->gridHashTable, (char*) tkwin, &isNew);
if (!isNew) {
- return (Gridder *) Tcl_GetHashValue(hPtr);
+ return Tcl_GetHashValue(hPtr);
}
gridPtr = (Gridder *) ckalloc(sizeof(Gridder));
gridPtr->tkwin = tkwin;
diff --git a/generic/tkImgBmap.c b/generic/tkImgBmap.c
index 167b252..1dd736e 100644
--- a/generic/tkImgBmap.c
+++ b/generic/tkImgBmap.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkImgBmap.c,v 1.28 2008/12/09 21:22:56 dgp Exp $
+ * RCS: @(#) $Id: tkImgBmap.c,v 1.29 2010/01/02 22:52:38 dkf Exp $
*/
#include "tkInt.h"
@@ -179,7 +179,7 @@ ImgBmapCreate(
int argc, /* Number of arguments. */
Tcl_Obj *const argv[], /* Argument objects for options (doesn't
* include image name or type). */
- const Tk_ImageType *typePtr, /* Pointer to our type record (not used). */
+ const Tk_ImageType *typePtr,/* Pointer to our type record (not used). */
Tk_ImageMaster master, /* Token for image, to be used by us in later
* callbacks. */
ClientData *clientDataPtr) /* Store manager's token for image here; it
diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c