aboutsummaryrefslogtreecommitdiff
path: root/arch/all/core/include/stdio_ext.h
blob: 47a21771a690f14463524d39b0f748fe161235c0 (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
/* ****************************************************************************
 * Extended standard I/O utilities.
 * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
 * ************************************************************************* */
#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