Correctly handle m68k long double format.
[glibc/pb-stable.git] / libio / stdio_ext.h
blob69d6a0ff2b9378d4b7c8dcda50aee8e0853d041e
1 /* Functions to access FILE structure internals.
2 Copyright (C) 2000 Free Software Foundation, Inc.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public License as
6 published by the Free Software Foundation; either version 2 of the
7 License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public
15 License along with the GNU C Library; see the file COPYING.LIB. If not,
16 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA. */
19 /* This header contains the same definitions as the header of the same name
20 on Sun's Solaris OS. */
22 #ifndef _STDIO_EXT_H
23 #define _STDIO_EXT_H 1
25 #include <stdio.h>
27 enum
29 /* Query current state of the locking status. */
30 FSETLOCKING_QUERY = 0,
31 #define FSETLOCKING_QUERY FSETLOCKING_QUERY
32 /* The library protects all uses of the stream functions, except for
33 uses of the *_unlocked functions, by calls equivalent to flockfile(). */
34 FSETLOCKING_INTERNAL,
35 #define FSETLOCKING_INTERNAL FSETLOCKING_INTERNAL
36 /* The user will take care of locking. */
37 FSETLOCKING_BYCALLER
38 #define FSETLOCKING_BYCALLER FSETLOCKING_BYCALLER
42 __BEGIN_DECLS
44 /* Return the size of the buffer of FP in bytes currently in use by
45 the given stream. */
46 extern size_t __fbufsize (FILE *__fp);
49 /* Return non-zero value iff the stream FP is opened readonly, or if the
50 last operation on the stream was a read operation. */
51 extern int __freading (FILE *__fp);
53 /* Return non-zero value iff the stream FP is opened write-only or
54 append-only, or if the last operation on the stream was a write
55 operation. */
56 extern int __fwriting (FILE *__fp);
59 /* Return non-zero value iff stream FP is not opened write-only or
60 append-only. */
61 extern int __freadable (FILE *__fp);
63 /* Return non-zero value iff stream FP is not opened read-only. */
64 extern int __fwritable (FILE *__fp);
67 /* Return non-zero value iff the stream FP is line-buffered. */
68 extern int __flbf (FILE *__fp);
71 /* Discard all pending buffered I/O on the stream FP. */
72 extern void __fpurge (FILE *__fp);
74 /* Return amount of output in bytes pending on a stream FP. */
75 extern size_t __fpending (FILE *__fp);
77 /* Flush all line-buffered files. */
78 extern void _flushlbf (void);
81 /* Set locking statis of stream FP to TYPE. */
82 extern int __fsetlocking (FILE *__fp, int __type);
84 __END_DECLS
86 #endif /* stdio_ext.h */