chiark / gitweb /
slight improvements to scriptinv, including scriptinv_invoke_fg
[chiark-tcl.git] / base / chiark-tcl.h
index 4c022cb82c8c5922ecf2ac7046af64643a8e4216..f3f0922bdc1320708687bc25c23f3015f6b57979 100644 (file)
@@ -39,7 +39,7 @@ typedef struct { /* semi-opaque - read only, and then only where commented */
   Tcl_Interp *ip; /* valid, non-0 and useable if set */
   Tcl_Obj *obj; /* non-0 iff set (but only test for 0/non-0) */
   Tcl_Obj *xargs;
-  int llength;
+  int llength; /* after set, is llength of script + xargs */
 } ScriptToInvoke;
 
 void cht_scriptinv_init(ScriptToInvoke *si);
@@ -48,7 +48,12 @@ int cht_scriptinv_set(ScriptToInvoke *si, Tcl_Interp *ip,
 void cht_scriptinv_cancel(ScriptToInvoke *si); /* then don't invoke */
   /* no separate free function - just cancel */
 
+int cht_scriptinv_invoke_fg(ScriptToInvoke *si, int argc,
+                           Tcl_Obj *const *argv);
+  /* if script fails, returns that error */
+
 void cht_scriptinv_invoke(ScriptToInvoke *si, int argc, Tcl_Obj *const *argv);
+  /* if script fails, reports it with Tcl_BackgroundError */
 
 /* from idtable.c */