diff options
Diffstat (limited to 'unix/tclXtNotify.c')
-rw-r--r-- | unix/tclXtNotify.c | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/unix/tclXtNotify.c b/unix/tclXtNotify.c index 50eb4a2..a5d92d6 100644 --- a/unix/tclXtNotify.c +++ b/unix/tclXtNotify.c @@ -16,9 +16,6 @@ #include <X11/Intrinsic.h> #include "tclInt.h" -#ifndef CONST86 -# define CONST86 -#endif /* * This structure is used to keep track of the notifier info for a a * registered file. @@ -80,15 +77,15 @@ static int initialized = 0; */ static int FileHandlerEventProc(Tcl_Event *evPtr, int flags); -static void FileProc(ClientData clientData, int *source, +static void FileProc(XtPointer clientData, int *source, XtInputId *id); static void NotifierExitHandler(ClientData clientData); -static void TimerProc(ClientData clientData, XtIntervalId *id); +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(CONST86 Tcl_Time * timePtr); -static int WaitForEvent(CONST86 Tcl_Time * timePtr); +static void SetTimer(const Tcl_Time * timePtr); +static int WaitForEvent(const Tcl_Time * timePtr); /* * Functions defined in this file for use by users of the Xt Notifier: @@ -184,7 +181,7 @@ TclSetAppContext( void InitNotifier(void) { - Tcl_NotifierProcs notifier; + Tcl_NotifierProcs np; /* * Only reinitialize if we are not in exit handling. The notifier can get @@ -196,11 +193,15 @@ InitNotifier(void) return; } - notifier.createFileHandlerProc = CreateFileHandler; - notifier.deleteFileHandlerProc = DeleteFileHandler; - notifier.setTimerProc = SetTimer; - notifier.waitForEventProc = WaitForEvent; - Tcl_SetNotifier(¬ifier); + np.createFileHandlerProc = CreateFileHandler; + np.deleteFileHandlerProc = DeleteFileHandler; + np.setTimerProc = SetTimer; + np.waitForEventProc = WaitForEvent; + np.initNotifierProc = Tcl_InitNotifier; + np.finalizeNotifierProc = Tcl_FinalizeNotifier; + np.alertNotifierProc = Tcl_AlertNotifier; + np.serviceModeHookProc = Tcl_ServiceModeHook; + Tcl_SetNotifier(&np); /* * DO NOT create the application context yet; doing so would prevent @@ -208,7 +209,7 @@ InitNotifier(void) */ initialized = 1; - memset(¬ifier, 0, sizeof(notifier)); + memset(&np, 0, sizeof(np)); Tcl_CreateExitHandler(NotifierExitHandler, NULL); } @@ -265,7 +266,7 @@ NotifierExitHandler( static void SetTimer( - CONST86 Tcl_Time *timePtr) /* Timeout value, may be NULL. */ + const Tcl_Time *timePtr) /* Timeout value, may be NULL. */ { long timeout; @@ -304,7 +305,7 @@ SetTimer( static void TimerProc( - ClientData clientData, /* Not used. */ + XtPointer clientData, /* Not used. */ XtIntervalId *id) { if (*id != notifier.currentTimeout) { @@ -491,7 +492,7 @@ DeleteFileHandler( static void FileProc( - ClientData clientData, + XtPointer clientData, int *fd, XtInputId *id) { @@ -629,7 +630,7 @@ FileHandlerEventProc( static int WaitForEvent( - CONST86 Tcl_Time *timePtr) /* Maximum block time, or NULL. */ + const Tcl_Time *timePtr) /* Maximum block time, or NULL. */ { int timeout; |