summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixNotfy.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix/tclUnixNotfy.c')
-rw-r--r--unix/tclUnixNotfy.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/unix/tclUnixNotfy.c b/unix/tclUnixNotfy.c
index 5a0d222..4053e4a 100644
--- a/unix/tclUnixNotfy.c
+++ b/unix/tclUnixNotfy.c
@@ -11,13 +11,15 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnixNotfy.c,v 1.4 1999/06/10 04:27:44 stanton Exp $
+ * RCS: @(#) $Id: tclUnixNotfy.c,v 1.5 1999/07/02 06:05:34 welch Exp $
*/
#include "tclInt.h"
#include "tclPort.h"
#include <signal.h>
+extern TclStubs tclStubs;
+
/*
* This structure is used to keep track of the notifier info for a
* a registered file.
@@ -336,6 +338,10 @@ Tcl_SetTimer(timePtr)
* because the only event loop is via Tcl_DoOneEvent, which passes
* timeout values to Tcl_WaitForEvent.
*/
+
+ if (tclStubs.tcl_SetTimer != Tcl_SetTimer) {
+ tclStubs.tcl_SetTimer(timePtr);
+ }
}
/*
@@ -392,6 +398,11 @@ Tcl_CreateFileHandler(fd, mask, proc, clientData)
FileHandler *filePtr;
int index, bit;
+ if (tclStubs.tcl_CreateFileHandler != Tcl_CreateFileHandler) {
+ tclStubs.tcl_CreateFileHandler(fd, mask, proc, clientData);
+ return;
+ }
+
for (filePtr = tsdPtr->firstFileHandlerPtr; filePtr != NULL;
filePtr = filePtr->nextPtr) {
if (filePtr->fd == fd) {
@@ -461,6 +472,11 @@ Tcl_DeleteFileHandler(fd)
unsigned long flags;
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
+ if (tclStubs.tcl_DeleteFileHandler != Tcl_DeleteFileHandler) {
+ tclStubs.tcl_DeleteFileHandler(fd);
+ return;
+ }
+
/*
* Find the entry for the given file (and return if there isn't one).
*/
@@ -632,6 +648,10 @@ Tcl_WaitForEvent(timePtr)
#endif
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
+ if (tclStubs.tcl_WaitForEvent != Tcl_WaitForEvent) {
+ return tclStubs.tcl_WaitForEvent(timePtr);
+ }
+
/*
* Set up the timeout structure. Note that if there are no events to
* check for, we return with a negative result rather than blocking