aboutsummaryrefslogtreecommitdiff
path: root/arch/all/core/include/stdio_ext.h
blob: f3d486ff34100dcc8aa04f08aaa86999359fbaf0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/* ****************************************************************************
 * stdio_ext.h -- Extended standard I/O utilities.
 *
 * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
 *
 * This file is part of the 'all/core' module in libcarrot, an experimental
 * modular libc project.
 *
 * This file is free software: you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation, either version 3 of the License, or (at your option)
 * any later version.
 *
 * This file is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Lesser Public License
 * for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this file. If not, see <http://www.gnu.org/licenses/>.
 * ************************************************************************* */
#include <cdefs.h>
#include <stdio.h>
__BEGIN_NAMESPACE_STD
__BEGIN_DECLS

/* Return the size of the buffer of FP in bytes currently in use by
 * the given stream. */

extern size_t __fbufsize    _OF((FILE *__fp)) __THROW;

/* Return non-zero value if the stream FP is opened readonly/write-only, or if
 * the last operation on the stream was a read/write operation. */

extern int    __freading    _OF((FILE *__fp)) __THROW;
extern int    __fwriting    _OF((FILE *__fp)) __THROW;

/* Return non-zero if the stream FP is not opened
 * write-only or append-only/read-only. */

extern int    __freadable   _OF((FILE *__fp)) __THROW;
extern int    __fwritable   _OF((FILE *__fp)) __THROW;

/* Return non-zero value if the stream FP is line-buffered. */

extern int    __flbf        _OF((FILE *__fp)) __THROW;

/* Discard all pending buffered I/O on the stream FP. */

extern void   __fpurge      _OF((FILE *__fp)) __THROW;

/* Return amount of output in bytes pending on a stream FP. */

extern size_t __fpending    _OF((FILE *__fp)) __THROW;

/* Flush all line-buffered files. */

extern void    _flushlbf    _OF((void));

/* Set locking status of stream FP to TYPE. */

extern int    __fsetlocking _OF((FILE *__fp, int __type)) __THROW;

__END_DECLS
__END_NAMESPACE_STD