Xref: utzoo comp.lang.c:31670 alt.lang.cfutures:45 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!uwm.edu!linac!midway!tank!stephen From: stephen@estragon.uchicago.edu (Stephen P Spackman) Newsgroups: comp.lang.c,alt.lang.cfutures Subject: Re: STDIO (Re: TRUE and FALSE) Message-ID: Date: 7 Sep 90 17:50:34 GMT References: <17632@haddock.ima.isc.com> <38Q5QG2@xds13.ferranti.com> Sender: news@midway.uchicago.edu (News Administrator) Organization: University of Chicago CILS Lines: 22 In-Reply-To: peter@ficc.ferranti.com's message of 7 Sep 90 01:36:30 GMT In article <38Q5QG2@xds13.ferranti.com> peter@ficc.ferranti.com (Peter da Silva) writes: For that matter, the whole stdio suite is fubar. But, it's a standard. Perhaps a new library could be designed in alt.lang.cfutures [...] Another thing that is needed is a function FILE *pseudof ( int (*producer)(void *handle, char *buf, size_t len) , int (*consumer)(void *handle, char const *buf, size_t len) , void *handle , char const *mode ); that takes USER-DEFINED buffer readers and writers and makes a "FILE" object. That way, you gat all the sprintf analogues for free, and you can fake up portable I/O for nonstandard filesystems and all sorts of groovy stuff. That signature needs further thought - maybe it needs a flush/close function as well, e.g.; but it's not so far away. stephen p spackman stephen@estragon.uchicago.edu 312.702.3982