[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: operations on FILE streams
From: |
Bruno Haible |
Subject: |
Re: operations on FILE streams |
Date: |
Fri, 13 Apr 2007 12:26:49 +0200 |
User-agent: |
KMail/1.5.4 |
Eric Blake wrote:
> > The primitives for "fp is not open for writing" can be written in the
> > same spirit as the 'fseterr' and 'fpending' modules.
>
> It sounds like you are asking for __freading:
>
> http://docs.sun.com/app/docs/doc/806-0627/6j9vhfmre?q=__fpurge&a=view
>
> We probably should provide modules for all of the following useful stdio
> functions that the standards developers left out:
>
> __fbufsize
> __flbf
> __fpending - done
> __fpurge
> __freadable
> __freading
> __fsetlocking
> __fwritable
> __fwriting
> __flushlbf
Interesting that Solaris has all these. Yes I think such modules would be
useful in gnulib. Except that the gnulib function names should not have a
'__' prefix, since '__' is in the system's namespace.
> __fbufsize
Yes, we need a function 'fbufsize'. It is stupid to be able to replace
the existing buffer of a stream but not to be able to inquire the size of
the current buffer.
> __flbf
Here I would prefer a function that returns the file's mode, one of
_IONBF, _IOLBF, _IOFBF, for symmetry with setvbuf.
> __fpurge
Yes, an fpurge function is useful, since fflush is not guaranteed to do it
on unbuffered input streams.
> __freadable
> __fwritable
Yes, call them freadable and fwritable.
> __freading
> __fwriting
Yes, call them freading and fwriting.
> __fsetlocking
This is probably not implementable. I would drop it.
> __flushlbf
Likewise: we have no portable way to enumerate all open FILE streams
(except for overriding 'fopen', urghh).
Bruno
- 'fflush' test failure on Cygwin, Bruno Haible, 2007/04/12
- Re: 'fflush' test failure on Cygwin, Eric Blake, 2007/04/12
- Re: operations on FILE streams,
Bruno Haible <=
- Re: operations on FILE streams, Paul Eggert, 2007/04/13
- Re: operations on FILE streams, Bruno Haible, 2007/04/13
- Re: operations on FILE streams, Eric Blake-1, 2007/04/13
- Re: operations on FILE streams, Bruno Haible, 2007/04/13
- Re: operations on FILE streams, Paul Eggert, 2007/04/13
- Re: operations on FILE streams, Bruno Haible, 2007/04/13
- Re: 'fflush' test failure on Cygwin, Eric Blake, 2007/04/16
- Re: 'fflush' test failure on Cygwin, Bruno Haible, 2007/04/23
- Re: 'fflush' test failure on Cygwin, Eric Blake, 2007/04/23
- new module 'fseeko', Bruno Haible, 2007/04/25