]>
Commit | Line | Data |
---|---|---|
602d9786 | 1 | #include <libio.h> |
96aa2d94 RM |
2 | |
3 | /* These emulate stdio functionality, but with a different name | |
4 | (_IO_ungetc instead of ungetc), and using _IO_FILE instead of FILE. */ | |
5 | ||
6 | #ifdef __cplusplus | |
7 | extern "C" { | |
8 | #endif | |
9 | ||
102070bc UD |
10 | extern int _IO_fclose (_IO_FILE*); |
11 | extern int _IO_new_fclose (_IO_FILE*); | |
12 | extern int _IO_old_fclose (_IO_FILE*); | |
79937577 | 13 | extern _IO_FILE *_IO_fdopen (int, const char*) __THROW; |
d18ea0c5 | 14 | libc_hidden_proto (_IO_fdopen) |
79937577 UD |
15 | extern _IO_FILE *_IO_old_fdopen (int, const char*) __THROW; |
16 | extern _IO_FILE *_IO_new_fdopen (int, const char*) __THROW; | |
102070bc | 17 | extern int _IO_fflush (_IO_FILE*); |
d18ea0c5 | 18 | libc_hidden_proto (_IO_fflush) |
102070bc UD |
19 | extern int _IO_fgetpos (_IO_FILE*, _IO_fpos_t*); |
20 | extern int _IO_fgetpos64 (_IO_FILE*, _IO_fpos64_t*); | |
21 | extern char* _IO_fgets (char*, int, _IO_FILE*); | |
22 | extern _IO_FILE *_IO_fopen (const char*, const char*); | |
23 | extern _IO_FILE *_IO_old_fopen (const char*, const char*); | |
24 | extern _IO_FILE *_IO_new_fopen (const char*, const char*); | |
25 | extern _IO_FILE *_IO_fopen64 (const char*, const char*); | |
26 | extern _IO_FILE *__fopen_internal (const char*, const char*, int); | |
79937577 | 27 | extern _IO_FILE *__fopen_maybe_mmap (_IO_FILE *) __THROW; |
102070bc UD |
28 | extern int _IO_fprintf (_IO_FILE*, const char*, ...); |
29 | extern int _IO_fputs (const char*, _IO_FILE*); | |
3ba06713 | 30 | libc_hidden_proto (_IO_fputs) |
102070bc UD |
31 | extern int _IO_fsetpos (_IO_FILE*, const _IO_fpos_t *); |
32 | extern int _IO_fsetpos64 (_IO_FILE*, const _IO_fpos64_t *); | |
33 | extern long int _IO_ftell (_IO_FILE*); | |
d18ea0c5 | 34 | libc_hidden_proto (_IO_ftell) |
102070bc | 35 | extern _IO_size_t _IO_fread (void*, _IO_size_t, _IO_size_t, _IO_FILE*); |
d18ea0c5 | 36 | libc_hidden_proto (_IO_fread) |
102070bc | 37 | extern _IO_size_t _IO_fwrite (const void*, _IO_size_t, _IO_size_t, _IO_FILE*); |
d18ea0c5 | 38 | libc_hidden_proto (_IO_fwrite) |
102070bc | 39 | extern char* _IO_gets (char*); |
79937577 | 40 | extern void _IO_perror (const char*) __THROW; |
102070bc UD |
41 | extern int _IO_printf (const char*, ...); |
42 | extern int _IO_puts (const char*); | |
43 | extern int _IO_scanf (const char*, ...); | |
79937577 | 44 | extern void _IO_setbuffer (_IO_FILE *, char*, _IO_size_t) __THROW; |
d18ea0c5 | 45 | libc_hidden_proto (_IO_setbuffer) |
79937577 | 46 | extern int _IO_setvbuf (_IO_FILE*, char*, int, _IO_size_t) __THROW; |
d18ea0c5 | 47 | libc_hidden_proto (_IO_setvbuf) |
79937577 UD |
48 | extern int _IO_sscanf (const char*, const char*, ...) __THROW; |
49 | extern int _IO_sprintf (char *, const char*, ...) __THROW; | |
50 | extern int _IO_ungetc (int, _IO_FILE*) __THROW; | |
51 | extern int _IO_vsscanf (const char *, const char *, _IO_va_list) __THROW; | |
52 | extern int _IO_vsprintf (char*, const char*, _IO_va_list) __THROW; | |
d18ea0c5 | 53 | libc_hidden_proto (_IO_vsprintf) |
79937577 UD |
54 | extern int _IO_vswprintf (wchar_t*, _IO_size_t, const wchar_t*, _IO_va_list) |
55 | __THROW; | |
2c6fe0bd UD |
56 | |
57 | struct obstack; | |
79937577 UD |
58 | extern int _IO_obstack_vprintf (struct obstack *, const char *, _IO_va_list) |
59 | __THROW; | |
60 | extern int _IO_obstack_printf (struct obstack *, const char *, ...) __THROW; | |
96aa2d94 | 61 | #ifndef _IO_pos_BAD |
d64b6ad0 | 62 | #define _IO_pos_BAD ((_IO_off64_t)(-1)) |
96aa2d94 RM |
63 | #endif |
64 | #define _IO_clearerr(FP) ((FP)->_flags &= ~(_IO_ERR_SEEN|_IO_EOF_SEEN)) | |
65 | #define _IO_fseek(__fp, __offset, __whence) \ | |
52a16e58 | 66 | (_IO_seekoff_unlocked (__fp, __offset, __whence, _IOS_INPUT|_IOS_OUTPUT) \ |
77fe0b9c UD |
67 | == _IO_pos_BAD ? EOF : 0) |
68 | #define _IO_rewind(FILE) \ | |
52a16e58 | 69 | (void) _IO_seekoff_unlocked (FILE, 0, 0, _IOS_INPUT|_IOS_OUTPUT) |
77fe0b9c | 70 | #define _IO_vprintf(FORMAT, ARGS) \ |
d18ea0c5 | 71 | _IO_vfprintf (_IO_stdout, FORMAT, ARGS) |
96aa2d94 | 72 | #define _IO_freopen(FILENAME, MODE, FP) \ |
d18ea0c5 AS |
73 | (_IO_file_close_it (FP), \ |
74 | _IO_file_fopen (FP, FILENAME, MODE, 1)) | |
1ea89a40 | 75 | #define _IO_old_freopen(FILENAME, MODE, FP) \ |
6973fc01 | 76 | (_IO_old_file_close_it (FP), _IO_old_file_fopen(FP, FILENAME, MODE)) |
dfd2257a | 77 | #define _IO_freopen64(FILENAME, MODE, FP) \ |
d18ea0c5 AS |
78 | (_IO_file_close_it (FP), \ |
79 | _IO_file_fopen (FP, FILENAME, MODE, 0)) | |
96aa2d94 | 80 | #define _IO_fileno(FP) ((FP)->_fileno) |
79937577 UD |
81 | extern _IO_FILE* _IO_popen (const char*, const char*) __THROW; |
82 | extern _IO_FILE* _IO_new_popen (const char*, const char*) __THROW; | |
83 | extern _IO_FILE* _IO_old_popen (const char*, const char*) __THROW; | |
84 | extern int __new_pclose (_IO_FILE *) __THROW; | |
85 | extern int __old_pclose (_IO_FILE *) __THROW; | |
96aa2d94 | 86 | #define _IO_pclose _IO_fclose |
d18ea0c5 AS |
87 | #define _IO_setbuf(_FP, _BUF) _IO_setbuffer (_FP, _BUF, _IO_BUFSIZ) |
88 | #define _IO_setlinebuf(_FP) _IO_setvbuf (_FP, NULL, 1, 0) | |
96aa2d94 | 89 | |
79937577 UD |
90 | _IO_FILE *__new_freopen (const char *, const char *, _IO_FILE *) __THROW; |
91 | _IO_FILE *__old_freopen (const char *, const char *, _IO_FILE *) __THROW; | |
1ea89a40 | 92 | |
96aa2d94 RM |
93 | #ifdef __cplusplus |
94 | } | |
95 | #endif |