#include <stdio.h>
#include <tcl.h>
#include <tk.h>

#include <gc/gc.h>

Tcl_Channel Tcl_Exec(Tcl_Interp *interp, char *process)
{
  Tcl_Channel chan ;
  char *argv[1] = {process} ;
  chan = Tcl_OpenCommandChannel(interp, 1, argv, TCL_STDOUT|TCL_STDIN) ;
  if (chan == NULL) {
    fprintf(stderr,
	    "Unable to open Tcl Command Channel\ninterp->result = %s\n",
	    interp->result) ;
    fflush(stderr) ;
    exit(1) ;
  }
  Tcl_RegisterChannel(interp, chan) ;
  return chan ;
}
