STDIO (Re: TRUE and FALSE)

Peter da Silva peter at sugar.hackercorp.com
Sat Sep 8 09:25:08 AEST 1990


In article <STEPHEN.90Sep7125034 at estragon.uchicago.edu> stephen at estragon.uchicago.edu (Stephen P Spackman) writes:
> 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's pretty cool, man. I like it. Except that in my ideal stdio the
mode is back to being a binary mask, but that was easy to miss. The
mas would have values like:

	O_RONLY	O_RDWR	O_WRONLY
	O_BINARY
	O_APPEND
	O_UNBUFFERED
	etc...

> That signature needs further thought - maybe it needs a flush/close
> function as well, e.g.; but it's not so far away.

Sounds good.
-- 
Peter da Silva.   `-_-'
<peter at sugar.hackercorp.com>.



More information about the Comp.lang.c mailing list