[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug: missing finish-output after writing prompt in REP
- To: clisp-list@[129.13.115.2]
- Subject: bug: missing finish-output after writing prompt in REP
- From: hoehle@zeus.gmd.de (Joerg Hoehle)
- Date: Tue, 11 Mar 1997 14:33:08 +0100
Hi,
debug.d:read_form() should call FINISH-OUTPUT after writing the prompt.
The following doesn't work nicely:
> (make-buffered-output-stream #'(lambda (s) (princ s *terminal-io*)))
#<BUFFERED-OUTPUT-STREAM #<CLOSURE :LAMBDA (S) (PRINC S *TERMINAL-IO*)>>
> (setq *standard-output* *)
#<BUFFERED-OUTPUT-STREAM #<CLOSURE :LAMBDA (S) (PRINC S *TERMINAL-IO*)>>
() ; <- my input
> ; <- the prompt
NIL ; <- the output
I'm wondering why it worked so far. I suppose that the std C library
flushes stdout itself before reading something from stdin or that no
buffering at all was involved.
Here's an *untested* diff to read_form():
*** debug.d Mon Apr 15 16:29:35 1996
--- /tmp/debug.d Tue Mar 11 14:11:43 1997
***************
*** 27,30 ****
--- 27,31 ----
# (terpri ostream)
# (write-string prompt ostream)
+ # (finish-output ostream)
# )
# (let* ((eof-value "EOF")
***************
*** 77,80 ****
--- 78,82 ----
#endif
write_string(ostream_ptr,STACK_2); # (WRITE-STRING prompt ostream)
+ finish_output(STACK_4); # (FINISH-OUTPUT ostream)
}
# Prompt OK
Rather use finish_output(*ostream_ptr) ??
I'm still using CLISP-1996-05-30, but the CHANGES.LOG file doesn't
mention anything about this bug, so I must assume it's still there.
Jo"rg Ho"hle.
Joerg.Hoehle@gmd.de http://zeus.gmd.de/~hoehle/amiga-clisp.html