From: noemail@basdxcqvbe.com   
      
   On Wed, 8 Dec 2021 19:31:55 -0800 (PST)   
   "muta...@gmail.com" wrote:   
      
   > Maybe an extension to C90 could be (with FILE *):   
   >   
   > single = combine_stream(in_stream, out_stream);   
   >   
   > split_stream(single, &in_stream, &out_stream);   
   >   
   > If you have a single stream, you can do both input and   
   > output on it so long as you fseek first.   
   >   
      
   AIUI ..., you can already do both input and output on a single stream   
   for C89. You just need to:   
      
   a) open the file with a "+" for update mode, e.g., "r+", "w+", or "a+",   
   where "a+" (append-update) forces the write to be at the end-of-stream,   
   "w+" (write-update) wipes an existing file's content, and "r+"   
   (read-update) requires the file to exist   
      
   b) call one of (fseek, fsetpos, rewind, fflush) to change from input to   
   output or change from output to input, i.e., one of the C functions   
   must be called in between switching modes   
      
      
   I suspect what you need is an excellent reference book on C, such as   
   Samuel P. Harbison's and Guy L. Steele Jr.'s "C: A Reference Manual".   
      
   Forget about the ANSI/ISO C Specifications, The C Rationale, and   
   Technical Corrigendum's, for now, as their abuse of the English language   
   seems to be confusing you somewhat (and many other people on Usenet too,   
   e.g., on c.lang.c, on c.std.c., on c.compilers, ...).   
      
   > If you have a dual stream, it will need to have a link to   
   > its counterpart so that it knows whether it needs to   
   > fseek or not.   
   >   
      
   Sigh, I don't know how to respond to this.   
      
      
   --   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|