Next: , Previous: sscanf, Up: Stdio


4.63 stdio_ext,__fbufsize,__fpending,__flbf,__freadable,__fwritable,__freading,__fwriting—access internals of FILE structure

Synopsis

     #include <stdio.h>
     #include <stdio_ext.h>
     size_t __fbufsize(FILE *fp);
     size_t __fpending(FILE *fp);
     int __flbf(FILE *fp);
     int __freadable(FILE *fp);
     int __fwritable(FILE *fp);
     int __freading(FILE *fp);
     int __fwriting(FILE *fp);
     

Description
These functions provides access to the internals of the FILE structure fp.


Returns
__fbufsize returns the number of bytes in the buffer of stream fp.

__fpending returns the number of bytes in the output buffer of stream fp.

__flbf returns nonzero if stream fp is line-buffered, and 0 if not.

__freadable returns nonzero if stream fp may be read, and 0 if not.

__fwritable returns nonzero if stream fp may be written, and 0 if not.

__freading returns nonzero if stream fp if the last operation on it was a read, or if it read-only, and 0 if not.

__fwriting returns nonzero if stream fp if the last operation on it was a write, or if it write-only, and 0 if not.


Portability
These functions originate from Solaris and are also provided by GNU libc.

No supporting OS subroutines are required.