Article View: net.lang.c
Article #9240Re: Missing stdio features.
From: Chris Torek
Date: Thu, 04 Sep 1986 13:13
Date: Thu, 04 Sep 1986 13:13
27 lines
1265 bytes
1265 bytes
In article <86900034@haddock> karl@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@umcp-cs ARPA: chris@mimsy.umd.edu
Technical Details
Message-ID:
<3265@umcp-cs.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!seismo!umcp-cs!chrisReferences:
<3438@robin.cs.nott.ac.uk> <86900034@haddock>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!umcp-cs!chris From: chris@umcp-cs.UUCP (Chris Torek) Newsgroups: net.lang.c Subject: Re: Missing stdio features. Message-ID: <3265@umcp-cs.UUCP> Date: Thu, 4-Sep-86 09:13:36 EDT Article-I.D.: umcp-cs.3265 Posted: Thu Sep 4 09:13:36 1986 Date-Received: Thu, 4-Sep-86 21:35:31 EDT References: <3438@robin.cs.nott.ac.uk> <86900034@haddock> Organization: Computer Sci. Dept, U of Maryland, College Park, MD Lines: 27