[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Does READ-BYTE work on pipe-input-streams?



>>>>> "Bri" == Brian F Dennis <xjam@CS.Berkeley.EDU> writes:

Bri> The impnotes imply so under the entry for READ-BYTE-SEQUENCE but
Bri> it always fails when I actually try it.  

Yeah, the MAKE-PIPE-INPUT/OUTPUT-STREAM functions don't fill in
the byte pseudo-functions.  Here's how:

Index: stream.d
===================================================================
RCS file: /u/marcus/cvs/clisp/src/stream.d,v
retrieving revision 1.22
diff -c -r1.22 stream.d
*** stream.d	1996/01/26 03:22:31	1.22
--- stream.d	1996/02/13 05:03:31
***************
*** 10769,10774 ****
--- 10769,10775 ----
  
  # READ-CHAR - Pseudofunktion für Pipe-Input-Streams:
    #define rd_ch_pipe_in  rd_ch_handle
+   #define rd_by_pipe_in  rd_by_handle
  
  # Schließt einen Pipe-Input-Stream.
  # close_pipe_in(stream);
***************
*** 10897,10903 ****
      # Stream allozieren:
      { var reg1 object stream = # neuer Stream, nur READ-CHAR erlaubt
          allocate_stream(strmflags_rd_ch_B,strmtype_pipe_in,strm_len+4);
!       TheStream(stream)->strm_rd_by = P(rd_by_dummy);
        TheStream(stream)->strm_wr_by = P(wr_by_dummy);
        TheStream(stream)->strm_rd_ch = P(rd_ch_pipe_in);
        TheStream(stream)->strm_rd_ch_last = NIL;
--- 10898,10904 ----
      # Stream allozieren:
      { var reg1 object stream = # neuer Stream, nur READ-CHAR erlaubt
          allocate_stream(strmflags_rd_ch_B,strmtype_pipe_in,strm_len+4);
!       TheStream(stream)->strm_rd_by = P(rd_by_pipe_in);
        TheStream(stream)->strm_wr_by = P(wr_by_dummy);
        TheStream(stream)->strm_rd_ch = P(rd_ch_pipe_in);
        TheStream(stream)->strm_rd_ch_last = NIL;
***************
*** 10926,10931 ****
--- 10927,10933 ----
  
  # WRITE-CHAR - Pseudofunktion für Pipe-Output-Streams:
    #define wr_ch_pipe_out  wr_ch_handle_x
+   #define wr_by_pipe_out  wr_by_handle
  
  #ifdef STRM_WR_SS
  # WRITE-SIMPLE-STRING - Pseudofunktion für Pipe-Output-Streams:
***************
*** 11050,11056 ****
      { var reg1 object stream = # neuer Stream, nur WRITE-CHAR erlaubt
          allocate_stream(strmflags_wr_ch_B,strmtype_pipe_out,strm_len+4);
        TheStream(stream)->strm_rd_by = P(rd_by_dummy);
!       TheStream(stream)->strm_wr_by = P(wr_by_dummy);
        TheStream(stream)->strm_rd_ch = P(rd_ch_dummy);
        TheStream(stream)->strm_rd_ch_last = NIL;
        TheStream(stream)->strm_wr_ch = P(wr_ch_pipe_out);
--- 11052,11058 ----
      { var reg1 object stream = # neuer Stream, nur WRITE-CHAR erlaubt
          allocate_stream(strmflags_wr_ch_B,strmtype_pipe_out,strm_len+4);
        TheStream(stream)->strm_rd_by = P(rd_by_dummy);
!       TheStream(stream)->strm_wr_by = P(wr_by_pipe_out);
        TheStream(stream)->strm_rd_ch = P(rd_ch_dummy);
        TheStream(stream)->strm_rd_ch_last = NIL;
        TheStream(stream)->strm_wr_ch = P(wr_ch_pipe_out);