home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.tcl
- Path: sparky!uunet!europa.asd.contel.com!awds.imsd.contel.com!andy
- From: andy@awds.imsd.contel.com (Andy Moskoff)
- Subject: Bug in Tcl_CommandComplete ?
- Message-ID: <1993Jan22.164743.6007@awds.imsd.contel.com>
- Organization: GTE Federal Systems, Westlake Village, CA
- Date: Fri, 22 Jan 1993 16:47:43 GMT
- Lines: 23
-
-
- Fellow TCLers:
-
- I want to be able to pipe a tcl script into wish and sometime later from
- another program (maybe C) send commands to the wish interpreter. For example:
-
- (cat tcl_script; my_program) | wish. (NOTE: tcl_script set up a Text widget
-
- and my_program issued text commands to standard output.)
-
- This never really worked though. After tracing through a lot of wish code,
- we determined that Tcl_CommandComplete was returning 1 even though a partial
- command was present. For example, ".w insert end {abc}\n.w" was considered
- a complete command, because it was at the end of the command buffer! Note:
- we modified StdinProc to do a fread of BUFSIZ, NOT a fgets. So, any time
- the piped script stradled the command buffer boundary, the error
- "ambiguous command .w" appeared.
-
- If anybody has a solution to 1) doing what I want to do conceptually or 2)
- a fix to the tcl code I would appreciate hearing from you.
-
-
- -Andy
-