source: branches/libc-0.6/src/emx/include/stdio_ext.h

Last change on this file was 1907, checked in by bird, 20 years ago

stdio_ext.h, fbufsize and fpending.

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 2.8 KB
Line 
1/** @file
2 * GNU GLIBC
3 */
4/* Functions to access FILE structure internals.
5 Copyright (C) 2000, 2001 Free Software Foundation, Inc.
6 This file is part of the GNU C Library.
7
8 The GNU C Library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Lesser General Public
10 License as published by the Free Software Foundation; either
11 version 2.1 of the License, or (at your option) any later version.
12
13 The GNU C Library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public
19 License along with the GNU C Library; if not, write to the Free
20 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
21 02111-1307 USA. */
22
23/* This header contains the same definitions as the header of the same name
24 on Sun's Solaris OS. */
25
26#ifndef _STDIO_EXT_H
27#define _STDIO_EXT_H 1
28
29#include <stdio.h>
30
31#if 0 /*bird: no support for these yet */
32enum
33{
34 /* Query current state of the locking status. */
35 FSETLOCKING_QUERY = 0,
36#define FSETLOCKING_QUERY FSETLOCKING_QUERY
37 /* The library protects all uses of the stream functions, except for
38 uses of the *_unlocked functions, by calls equivalent to flockfile(). */
39 FSETLOCKING_INTERNAL,
40#define FSETLOCKING_INTERNAL FSETLOCKING_INTERNAL
41 /* The user will take care of locking. */
42 FSETLOCKING_BYCALLER
43#define FSETLOCKING_BYCALLER FSETLOCKING_BYCALLER
44};
45#endif /* bird */
46
47__BEGIN_DECLS
48
49/* Return the size of the buffer of FP in bytes currently in use by
50 the given stream. */
51extern size_t __fbufsize (FILE *__fp);
52
53
54/* Return non-zero value iff the stream FP is opened readonly, or if the
55 last operation on the stream was a read operation. */
56extern int __freading (FILE *__fp);
57
58/* Return non-zero value iff the stream FP is opened write-only or
59 append-only, or if the last operation on the stream was a write
60 operation. */
61extern int __fwriting (FILE *__fp);
62
63
64/* Return non-zero value iff stream FP is not opened write-only or
65 append-only. */
66extern int __freadable (FILE *__fp);
67
68/* Return non-zero value iff stream FP is not opened read-only. */
69extern int __fwritable (FILE *__fp);
70
71
72/* Return non-zero value iff the stream FP is line-buffered. */
73extern int __flbf (FILE *__fp);
74
75
76/* Discard all pending buffered I/O on the stream FP. */
77extern void __fpurge (FILE *__fp);
78
79/* Return amount of output in bytes pending on a stream FP. */
80extern size_t __fpending (FILE *__fp);
81
82/* Flush all line-buffered files. */
83extern void _flushlbf (void);
84
85
86/* Set locking status of stream FP to TYPE. */
87extern int __fsetlocking (FILE *__fp, int __type);
88
89__END_DECLS
90
91#endif /* stdio_ext.h */
Note: See TracBrowser for help on using the repository browser.