1#ifndef _IOLIBIO_H
2#define _IOLIBIO_H 1
3
4#include <stdio.h>
5#include <libio/libio.h>
6
7/* Alternative names for many of the stdio.h functions, used
8 internally and exposed for backward compatibility's sake. */
9
10extern int _IO_fclose (FILE*);
11extern int _IO_new_fclose (FILE*);
12extern int _IO_old_fclose (FILE*);
13extern FILE *_IO_fdopen (int, const char*) __THROW;
14libc_hidden_proto (_IO_fdopen)
15extern FILE *_IO_old_fdopen (int, const char*) __THROW;
16extern FILE *_IO_new_fdopen (int, const char*) __THROW;
17extern int _IO_fflush (FILE*);
18libc_hidden_proto (_IO_fflush)
19extern int _IO_fgetpos (FILE*, __fpos_t*);
20extern int _IO_fgetpos64 (FILE*, __fpos64_t*);
21extern char* _IO_fgets (char*, int, FILE*);
22extern FILE *_IO_fopen (const char*, const char*);
23extern FILE *_IO_old_fopen (const char*, const char*);
24extern FILE *_IO_new_fopen (const char*, const char*);
25extern FILE *_IO_fopen64 (const char*, const char*);
26extern FILE *__fopen_internal (const char*, const char*, int)
27 attribute_hidden;
28extern FILE *__fopen_maybe_mmap (FILE *) __THROW attribute_hidden;
29extern int _IO_fprintf (FILE*, const char*, ...);
30extern int _IO_fputs (const char*, FILE*);
31libc_hidden_proto (_IO_fputs)
32extern int _IO_fsetpos (FILE*, const __fpos_t *);
33extern int _IO_fsetpos64 (FILE*, const __fpos64_t *);
34extern long int _IO_ftell (FILE*);
35libc_hidden_proto (_IO_ftell)
36extern size_t _IO_fread (void*, size_t, size_t, FILE*);
37libc_hidden_proto (_IO_fread)
38extern size_t _IO_fwrite (const void*, size_t, size_t, FILE*);
39libc_hidden_proto (_IO_fwrite)
40extern char* _IO_gets (char*);
41extern void _IO_perror (const char*) __THROW;
42extern int _IO_printf (const char*, ...);
43extern int _IO_puts (const char*);
44libc_hidden_proto (_IO_puts)
45extern int _IO_scanf (const char*, ...);
46extern void _IO_setbuffer (FILE *, char*, size_t) __THROW;
47libc_hidden_proto (_IO_setbuffer)
48extern int _IO_setvbuf (FILE*, char*, int, size_t) __THROW;
49libc_hidden_proto (_IO_setvbuf)
50extern int _IO_sscanf (const char*, const char*, ...) __THROW;
51extern int _IO_sprintf (char *, const char*, ...) __THROW;
52extern int _IO_ungetc (int, FILE*) __THROW;
53extern int _IO_vsscanf (const char *, const char *, __gnuc_va_list) __THROW;
54
55#define _IO_clearerr(FP) ((FP)->_flags &= ~(_IO_ERR_SEEN|_IO_EOF_SEEN))
56#define _IO_fseek(__fp, __offset, __whence) \
57 (_IO_seekoff_unlocked (__fp, __offset, __whence, _IOS_INPUT|_IOS_OUTPUT) \
58 == _IO_pos_BAD ? EOF : 0)
59#define _IO_rewind(FILE) \
60 (void) _IO_seekoff_unlocked (FILE, 0, 0, _IOS_INPUT|_IOS_OUTPUT)
61#define _IO_freopen(FILENAME, MODE, FP) \
62 (_IO_file_close_it (FP), \
63 _IO_file_fopen (FP, FILENAME, MODE, 1))
64#define _IO_old_freopen(FILENAME, MODE, FP) \
65 (_IO_old_file_close_it (FP), _IO_old_file_fopen(FP, FILENAME, MODE))
66#define _IO_freopen64(FILENAME, MODE, FP) \
67 (_IO_file_close_it (FP), \
68 _IO_file_fopen (FP, FILENAME, MODE, 0))
69#define _IO_fileno(FP) ((FP)->_fileno)
70extern FILE* _IO_popen (const char*, const char*) __THROW;
71extern FILE* _IO_new_popen (const char*, const char*) __THROW;
72extern FILE* _IO_old_popen (const char*, const char*) __THROW;
73extern int __new_pclose (FILE *) __THROW;
74extern int __old_pclose (FILE *) __THROW;
75#define _IO_pclose _IO_fclose
76#define _IO_setbuf(_FP, _BUF) _IO_setbuffer (_FP, _BUF, BUFSIZ)
77#define _IO_setlinebuf(_FP) _IO_setvbuf (_FP, NULL, 1, 0)
78
79FILE *__new_freopen (const char *, const char *, FILE *) __THROW;
80FILE *__old_freopen (const char *, const char *, FILE *) __THROW;
81
82#endif /* iolibio.h. */
83