+ else
+ {
+ Tcl_DString command;
+ char input_buf[1024];
+ int count;
+
+ printf ("xx\n");
+ Tcl_DStringInit (&command);
+ while (fgets (input_buf, 1024, stdin))
+ {
+ count = strlen(input_buf);
+ Tcl_DStringAppend (&command, input_buf, count);
+ if (Tcl_CommandComplete (Tcl_DStringValue (&command)))
+ {
+ int code = Tcl_Eval (interp, Tcl_DStringValue (&command));
+ Tcl_DStringFree (&command);
+ if (code)
+ printf ("Error: %s\n", interp->result);
+ }
+ }
+ tcl_mainloop (interp, 0);
+ }