X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=www%2Fwtcl.c;h=abf579d004a3d70b37d47b38aea61a528781769d;hb=d1fc0ff84894bba24f827a81597717e9f69b6c06;hp=fc641f90afb886a3edf0f80122ce1ce0f179a22c;hpb=b443634fbd412cea15ea527188c3e241bb1edf21;p=egate.git diff --git a/www/wtcl.c b/www/wtcl.c index fc641f9..abf579d 100644 --- a/www/wtcl.c +++ b/www/wtcl.c @@ -41,7 +41,10 @@ * USE OR PERFORMANCE OF THIS SOFTWARE. * * $Log: wtcl.c,v $ - * Revision 1.10 1995/11/08 16:14:35 adam + * Revision 1.11 1996/01/24 08:26:56 adam + * All tcl commands prefixed with egw_ (except the html command). + * + * Revision 1.10 1995/11/08 16:14:35 adam * Many improvements and bug fixes. * First version that ran on dtbsun. * @@ -156,21 +159,10 @@ static int proc_html_invoke (ClientData clientData, Tcl_Interp *interp, int i; for (i = 1; iwcl, argv[i]); + wo_write (p->wcl, argv[i], strlen(argv[i])); return TCL_OK; } -static int proc_htmlr_invoke (ClientData clientData, Tcl_Interp *interp, - int argc, char **argv) -{ - struct tcl_info *p = (struct tcl_info*) clientData; - int r; - - r = proc_html_invoke (clientData, interp, argc, argv); - wo_putc (p->wcl, '\n'); - return r; -} - static int proc_wform_invoke (ClientData clientData, Tcl_Interp *interp, int argc, char **argv) { @@ -261,11 +253,10 @@ static void *do_create (WCLIENT wcl, void *args) } Tcl_AppInit (p->interp); Tcl_CreateCommand (p->interp, "html", proc_html_invoke, p, NULL); - Tcl_CreateCommand (p->interp, "htmlr", proc_htmlr_invoke, p, NULL); - Tcl_CreateCommand (p->interp, "wform", proc_wform_invoke, p, NULL); - Tcl_CreateCommand (p->interp, "wabort", proc_wabort_invoke, p, NULL); - Tcl_CreateCommand (p->interp, "wflush", proc_wflush_invoke, p, NULL); - Tcl_CreateCommand (p->interp, "wlog", proc_wlog_invoke, p, NULL); + Tcl_CreateCommand (p->interp, "egw_form", proc_wform_invoke, p, NULL); + Tcl_CreateCommand (p->interp, "egw_abort", proc_wabort_invoke, p, NULL); + Tcl_CreateCommand (p->interp, "egw_flush", proc_wflush_invoke, p, NULL); + Tcl_CreateCommand (p->interp, "egw_log", proc_wlog_invoke, p, NULL); sprintf (tmp_str, "%d", wcl->id); Tcl_SetVar (p->interp, "sessionId", tmp_str, TCL_GLOBAL_ONLY); return p; @@ -405,9 +396,7 @@ static int do_load (char *parms, void *mydata) sprintf (fname, "tcl.state.%d", p->wcl->id); r = Tcl_EvalFile (p->interp, fname); if (r == TCL_ERROR) - report_error (p, p->interp->errorLine, - "Error in Tcl loadState in line", - Tcl_GetVar (p->interp, "errorInfo", 0)); + gw_log (GW_LOG_WARN, mod, "Cannot load Tcl state" ); return 0; }