summaryrefslogtreecommitdiffstats
path: root/generic/tkEvent.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkEvent.c')
-rw-r--r--generic/tkEvent.c72
1 files changed, 36 insertions, 36 deletions
diff --git a/generic/tkEvent.c b/generic/tkEvent.c
index 0994a07..456b86d 100644
--- a/generic/tkEvent.c
+++ b/generic/tkEvent.c
@@ -685,8 +685,8 @@ Tk_CreateEventHandler(
Tk_EventProc *proc, /* Function to call for each selected event */
ClientData clientData) /* Arbitrary data to pass to proc. */
{
- register TkEventHandler *handlerPtr;
- register TkWindow *winPtr = (TkWindow *) token;
+ TkEventHandler *handlerPtr;
+ TkWindow *winPtr = (TkWindow *)token;
/*
* Skim through the list of existing handlers to (a) compute the overall
@@ -701,7 +701,7 @@ Tk_CreateEventHandler(
* No event handlers defined at all, so must create.
*/
- handlerPtr = ckalloc(sizeof(TkEventHandler));
+ handlerPtr = (TkEventHandler *)ckalloc(sizeof(TkEventHandler));
winPtr->handlerList = handlerPtr;
} else {
int found = 0;
@@ -732,7 +732,7 @@ Tk_CreateEventHandler(
* No event handler matched, so create a new one.
*/
- handlerPtr->nextPtr = ckalloc(sizeof(TkEventHandler));
+ handlerPtr->nextPtr = (TkEventHandler *)ckalloc(sizeof(TkEventHandler));
handlerPtr = handlerPtr->nextPtr;
}
@@ -775,11 +775,11 @@ Tk_DeleteEventHandler(
Tk_EventProc *proc,
ClientData clientData)
{
- register TkEventHandler *handlerPtr;
- register InProgress *ipPtr;
+ TkEventHandler *handlerPtr;
+ InProgress *ipPtr;
TkEventHandler *prevPtr;
- register TkWindow *winPtr = (TkWindow *) token;
- ThreadSpecificData *tsdPtr =
+ TkWindow *winPtr = (TkWindow *) token;
+ ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
/*
@@ -851,10 +851,10 @@ Tk_CreateGenericHandler(
ClientData clientData) /* One-word value to pass to proc. */
{
GenericHandler *handlerPtr;
- ThreadSpecificData *tsdPtr =
+ ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
- handlerPtr = ckalloc(sizeof(GenericHandler));
+ handlerPtr = (GenericHandler *)ckalloc(sizeof(GenericHandler));
handlerPtr->proc = proc;
handlerPtr->clientData = clientData;
@@ -892,7 +892,7 @@ Tk_DeleteGenericHandler(
ClientData clientData)
{
GenericHandler * handler;
- ThreadSpecificData *tsdPtr =
+ ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
for (handler=tsdPtr->genericList ; handler ; handler=handler->nextPtr) {
@@ -925,7 +925,7 @@ Tk_CreateClientMessageHandler(
Tk_ClientMessageProc *proc) /* Function to call on event. */
{
GenericHandler *handlerPtr;
- ThreadSpecificData *tsdPtr =
+ ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
/*
@@ -933,7 +933,7 @@ Tk_CreateClientMessageHandler(
* with an extra clientData field we'll never use.
*/
- handlerPtr = ckalloc(sizeof(GenericHandler));
+ handlerPtr = (GenericHandler *)ckalloc(sizeof(GenericHandler));
handlerPtr->proc = (Tk_GenericProc *) proc;
handlerPtr->clientData = NULL; /* never used */
@@ -971,7 +971,7 @@ Tk_DeleteClientMessageHandler(
Tk_ClientMessageProc *proc)
{
GenericHandler * handler;
- ThreadSpecificData *tsdPtr =
+ ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
for (handler=tsdPtr->cmList ; handler!=NULL ; handler=handler->nextPtr) {
@@ -1002,7 +1002,7 @@ Tk_DeleteClientMessageHandler(
void
TkEventInit(void)
{
- ThreadSpecificData *tsdPtr =
+ ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
tsdPtr->handlersActive = 0;
@@ -1035,9 +1035,9 @@ TkEventInit(void)
static int
TkXErrorHandler(
ClientData clientData, /* Pointer to flag we set. */
- XErrorEvent *errEventPtr) /* X error info. */
+ TCL_UNUSED(XErrorEvent *)) /* X error info. */
{
- int *error = clientData;
+ int *error = (int *)clientData;
*error = 1;
return 0;
@@ -1124,12 +1124,12 @@ void
Tk_HandleEvent(
XEvent *eventPtr) /* Event to dispatch. */
{
- register TkEventHandler *handlerPtr;
+ TkEventHandler *handlerPtr;
TkWindow *winPtr;
unsigned long mask;
InProgress ip;
Tcl_Interp *interp = NULL;
- ThreadSpecificData *tsdPtr =
+ ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
#if !defined(MAC_OSX_TK) && !defined(_WIN32)
@@ -1337,9 +1337,9 @@ TkEventDeadWindow(
TkWindow *winPtr) /* Information about the window that is being
* deleted. */
{
- register TkEventHandler *handlerPtr;
- register InProgress *ipPtr;
- ThreadSpecificData *tsdPtr =
+ TkEventHandler *handlerPtr;
+ InProgress *ipPtr;
+ ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
/*
@@ -1387,8 +1387,8 @@ Time
TkCurrentTime(
TkDisplay *dispPtr) /* Display for which the time is desired. */
{
- register XEvent *eventPtr;
- ThreadSpecificData *tsdPtr =
+ XEvent *eventPtr;
+ ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
if (tsdPtr->pendingPtr == NULL) {
@@ -1442,7 +1442,7 @@ Tk_RestrictEvents(
* argument. */
{
Tk_RestrictProc *prev;
- ThreadSpecificData *tsdPtr =
+ ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
prev = tsdPtr->restrictProc;
@@ -1535,7 +1535,7 @@ Tk_QueueWindowEvent(
*/
if (!(dispPtr->flags & TK_DISPLAY_COLLAPSE_MOTION_EVENTS)) {
- wevPtr = ckalloc(sizeof(TkWindowEvent));
+ wevPtr = (TkWindowEvent *)ckalloc(sizeof(TkWindowEvent));
wevPtr->header.proc = WindowEventProc;
wevPtr->event = *eventPtr;
Tcl_QueueEvent(&wevPtr->header, position);
@@ -1567,7 +1567,7 @@ Tk_QueueWindowEvent(
}
}
- wevPtr = ckalloc(sizeof(TkWindowEvent));
+ wevPtr = (TkWindowEvent *)ckalloc(sizeof(TkWindowEvent));
wevPtr->header.proc = WindowEventProc;
wevPtr->event = *eventPtr;
if ((eventPtr->type == MotionNotify) && (position == TCL_QUEUE_TAIL)) {
@@ -1698,7 +1698,7 @@ WindowEventProc(
{
TkWindowEvent *wevPtr = (TkWindowEvent *) evPtr;
Tk_RestrictAction result;
- ThreadSpecificData *tsdPtr =
+ ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
if (!(flags & TCL_WINDOW_EVENTS)) {
@@ -1799,7 +1799,7 @@ DelayedMotionProc(
ClientData clientData) /* Pointer to display containing a delayed
* motion event to be serviced. */
{
- TkDisplay *dispPtr = clientData;
+ TkDisplay *dispPtr = (TkDisplay *)clientData;
if (dispPtr->delayedMotionPtr == NULL) {
Tcl_Panic("DelayedMotionProc found no delayed mouse motion event");
@@ -1831,7 +1831,7 @@ TkCreateExitHandler(
{
ExitHandler *exitPtr;
- exitPtr = ckalloc(sizeof(ExitHandler));
+ exitPtr = (ExitHandler *)ckalloc(sizeof(ExitHandler));
exitPtr->proc = proc;
exitPtr->clientData = clientData;
Tcl_MutexLock(&exitMutex);
@@ -1927,10 +1927,10 @@ TkCreateThreadExitHandler(
ClientData clientData) /* Arbitrary value to pass to proc. */
{
ExitHandler *exitPtr;
- ThreadSpecificData *tsdPtr =
+ ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
- exitPtr = ckalloc(sizeof(ExitHandler));
+ exitPtr = (ExitHandler *)ckalloc(sizeof(ExitHandler));
exitPtr->proc = proc;
exitPtr->clientData = clientData;
@@ -1968,7 +1968,7 @@ TkDeleteThreadExitHandler(
ClientData clientData) /* Arbitrary value to pass to proc. */
{
ExitHandler *exitPtr, *prevPtr;
- ThreadSpecificData *tsdPtr =
+ ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
for (prevPtr = NULL, exitPtr = tsdPtr->firstExitPtr; exitPtr != NULL;
@@ -2007,7 +2007,7 @@ TkDeleteThreadExitHandler(
void
TkFinalize(
- ClientData clientData) /* Arbitrary value to pass to proc. */
+ TCL_UNUSED(void *)) /* Arbitrary value to pass to proc. */
{
ExitHandler *exitPtr;
@@ -2059,10 +2059,10 @@ TkFinalize(
void
TkFinalizeThread(
- ClientData clientData) /* Arbitrary value to pass to proc. */
+ TCL_UNUSED(void *)) /* Arbitrary value to pass to proc. */
{
ExitHandler *exitPtr;
- ThreadSpecificData *tsdPtr =
+ ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
Tcl_DeleteThreadExitHandler(TkFinalizeThread, NULL);