diff options
Diffstat (limited to 'unix/tclXtNotify.c')
-rw-r--r-- | unix/tclXtNotify.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/unix/tclXtNotify.c b/unix/tclXtNotify.c index 26db9f2..b2d1f4d 100644 --- a/unix/tclXtNotify.c +++ b/unix/tclXtNotify.c @@ -10,9 +10,6 @@ * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ -#ifndef USE_TCL_STUBS -# define USE_TCL_STUBS -#endif #include <X11/Intrinsic.h> #include "tclInt.h" @@ -42,7 +39,7 @@ typedef struct FileHandler { * handlers are ready to fire. */ -typedef struct { +typedef struct FileHandlerEvent { Tcl_Event header; /* Information that is standard for all * events. */ int fd; /* File descriptor that is ready. Used to find @@ -84,8 +81,8 @@ static void TimerProc(XtPointer clientData, XtIntervalId *id); static void CreateFileHandler(int fd, int mask, Tcl_FileProc *proc, ClientData clientData); static void DeleteFileHandler(int fd); -static void SetTimer(const Tcl_Time * timePtr); -static int WaitForEvent(const Tcl_Time * timePtr); +static void SetTimer(Tcl_Time * timePtr); +static int WaitForEvent(Tcl_Time * timePtr); /* * Functions defined in this file for use by users of the Xt Notifier: @@ -266,7 +263,7 @@ NotifierExitHandler( static void SetTimer( - const Tcl_Time *timePtr) /* Timeout value, may be NULL. */ + Tcl_Time *timePtr) /* Timeout value, may be NULL. */ { long timeout; @@ -359,7 +356,7 @@ CreateFileHandler( } } if (filePtr == NULL) { - filePtr = ckalloc(sizeof(FileHandler)); + filePtr = (FileHandler*) ckalloc(sizeof(FileHandler)); filePtr->fd = fd; filePtr->read = 0; filePtr->write = 0; @@ -470,7 +467,7 @@ DeleteFileHandler( if (filePtr->mask & TCL_EXCEPTION) { XtRemoveInput(filePtr->except); } - ckfree(filePtr); + ckfree((char *) filePtr); } /* @@ -525,7 +522,7 @@ FileProc( */ filePtr->readyMask |= mask; - fileEvPtr = ckalloc(sizeof(FileHandlerEvent)); + fileEvPtr = (FileHandlerEvent *) ckalloc(sizeof(FileHandlerEvent)); fileEvPtr->header.proc = FileHandlerEventProc; fileEvPtr->fd = filePtr->fd; Tcl_QueueEvent((Tcl_Event *) fileEvPtr, TCL_QUEUE_TAIL); @@ -601,7 +598,7 @@ FileHandlerEventProc( mask = filePtr->readyMask & filePtr->mask; filePtr->readyMask = 0; if (mask != 0) { - filePtr->proc(filePtr->clientData, mask); + (*filePtr->proc)(filePtr->clientData, mask); } break; } @@ -630,7 +627,7 @@ FileHandlerEventProc( static int WaitForEvent( - const Tcl_Time *timePtr) /* Maximum block time, or NULL. */ + Tcl_Time *timePtr) /* Maximum block time, or NULL. */ { int timeout; |