From 3c1a04c3c1aa9f80cd7b3f9a884968e6fc1b7220 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 21 Feb 1996 14:58:01 +0000 Subject: [PATCH] Modified to use ir_tcl_select_set. --- www/wirtcl.c | 90 ++++++++++++++++++++++------------------------------------ 1 file changed, 34 insertions(+), 56 deletions(-) diff --git a/www/wirtcl.c b/www/wirtcl.c index f70cbcb..942abdc 100644 --- a/www/wirtcl.c +++ b/www/wirtcl.c @@ -41,7 +41,10 @@ * USE OR PERFORMANCE OF THIS SOFTWARE. * * $Log: wirtcl.c,v $ - * Revision 1.14 1996/02/12 10:10:31 adam + * Revision 1.15 1996/02/21 14:58:01 adam + * Modified to use ir_tcl_select_set. + * + * Revision 1.14 1996/02/12 10:10:31 adam * Resource/config system used by the gateway. * * Revision 1.13 1996/01/24 08:26:54 adam @@ -134,7 +137,6 @@ struct tcl_info { WCLIENT wcl; }; - static int events (struct tcl_info *p, char *waitVar, int tout); static int proc_zwait_invoke (ClientData clientData, Tcl_Interp *interp, @@ -147,14 +149,11 @@ static int proc_zwait_invoke (ClientData clientData, Tcl_Interp *interp, return events (p, argv[1], (argc == 3) ? atoi(argv[2]) : 0); } - - -/* select(2) callbacks */ +/* select callbacks */ struct callback { - void (*r_handle)(ClientData); - void (*w_handle)(ClientData); - void (*x_handle)(ClientData); - void *obj; + void (*handle)(ClientData, int, int, int); + int r, w, e; + ClientData obj; }; #define MAX_CALLBACK 200 @@ -187,11 +186,7 @@ static void *do_create (WCLIENT wcl, void *args) /* initialize irtcl */ Tcl_CreateCommand (p->interp, "egw_wait", proc_zwait_invoke, p, NULL); for (i=0; i max_fd) max_fd = fd; } -void ir_select_add_write (int fd, void *obj) -{ - callback_table[fd].w_handle = ir_select_write; - if (fd > max_fd) - max_fd = fd; -} - -void ir_select_remove_write (int fd, void *obj) -{ - callback_table[fd].w_handle = NULL; -} - -void ir_select_remove (int fd, void *obj) -{ - callback_table[fd].r_handle = NULL; - callback_table[fd].w_handle = NULL; - callback_table[fd].x_handle = NULL; -} - static int do_load (char *parms, void *mydata) { struct tcl_info *p = mydata; -- 1.7.10.4