Xref: utzoo comp.lang.c:31691 alt.lang.cfutures:53 Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!usc!snorkelwacker!ai-lab!churchy.ai.mit.edu!roland From: roland@ai.mit.edu (Roland McGrath) Newsgroups: comp.lang.c,alt.lang.cfutures Subject: Re: STDIO (Re: TRUE and FALSE) Message-ID: Date: 8 Sep 90 17:58:44 GMT References: <17632@haddock.ima.isc.com> <38Q5QG2@xds13.ferranti.com> <26431@mimsy.umd.edu> Sender: news@ai.mit.edu Organization: Hackers Anonymous International, Ltd., Inc. (Applications welcome) Lines: 12 In-reply-to: chris@mimsy.umd.edu's message of 7 Sep 90 21:43:28 GMT The GNU C Library (when I release it--don't ask) allows user-specified read, write, seek, and close functions that operate on magic cookies (void *). There is also another level of customization that can be made: user-specified input_room and output_room functions. These must understand stdio internals, but are very useful for things like a self-expanding buffer (this is how I implement asprintf, which is sprintf but gives you back a malloc'd string of just the right length). -- Roland McGrath Free Software Foundation, Inc. roland@ai.mit.edu, uunet!ai.mit.edu!roland