X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=blobdiff_plain;f=www%2Fwirtcl.c;h=76e169033da2fab055e6ba4b1dd072b1e05fb921;hb=c250a69a70d23cbdef13eee21a39e733b69084f5;hp=942abdc52d26d02b0d0622c8e06a8385352a7d4b;hpb=3c1a04c3c1aa9f80cd7b3f9a884968e6fc1b7220;p=egate.git diff --git a/www/wirtcl.c b/www/wirtcl.c index 942abdc..76e1690 100644 --- a/www/wirtcl.c +++ b/www/wirtcl.c @@ -41,7 +41,15 @@ * USE OR PERFORMANCE OF THIS SOFTWARE. * * $Log: wirtcl.c,v $ - * Revision 1.15 1996/02/21 14:58:01 adam + * Revision 1.17 1996/03/15 14:43:26 adam + * Function egw_wait returns 'cancel' if new request is pending (user + * has cancelled); or egw_wait returns 'timeout' on timeout. + * + * Revision 1.16 1996/02/29 15:40:23 adam + * New function w_interp_irtcl_get that returns Tcl interpreter of + * IrTcl interpreter. + * + * 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 @@ -286,12 +294,14 @@ static int events (struct tcl_info *p, char *waitVar, int tout) if (!r) { gw_log (GW_LOG_DEBUG, mod, "timeout"); + p->interp->result = "timeout"; free (waitVarVal); return TCL_ERROR; } if (FD_ISSET (fifo_in, &fdset_tcl_r)) { gw_log (GW_LOG_DEBUG, mod, "FIFO closed"); + p->interp->result = "cancel"; free (waitVarVal); return TCL_ERROR; } @@ -344,3 +354,16 @@ static int do_save (char *parms, void *mydata) return w_interp_save_state (p->w_interp, parms); } +Tcl_Interp *w_interp_irtcl_get (W_Interp w_interp) +{ + struct tcl_info *p; + + if (strcmp (w_interp->ctrl->name, "irtcl")) + { + gw_log (GW_LOG_FATAL, mod, "Internal failure"); + assert (0); + } + p = (struct tcl_info*) w_interp->mydata; + return p->interp; +} +