Missing stdio features.

Chris Torek chris at umcp-cs.UUCP
Thu Sep 4 23:13:36 AEST 1986


In article <86900034 at haddock> karl at haddock writes:
>>>FILE *fopenfxn(int (*fxn)(), char *mode)
>Actually, the function argument should probably be analogous to read/write
>rather than getc/putc.  But there should be one more argument to fopenfxn(),
>viz. a (void *) argument to be passed to fxn() to distinguish streams.

Indeed, there would be a certain symmetry to the whole thing if one
could write

	reader(f, buf, len)
		FILE *f;
	{

		return (read(fileno(f), buf, len));
	}

	...
		FILE *f = fopenrf(reader, "r");
		fileno(f) = fd;

instead of

		FILE *f = fdopen(fd, "r");
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 1516)
UUCP:	seismo!umcp-cs!chris
CSNet:	chris at umcp-cs		ARPA:	chris at mimsy.umd.edu



More information about the Comp.lang.c mailing list