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 
10 extern int _IO_fclose (FILE*);
11 extern int _IO_new_fclose (FILE*);
12 extern int _IO_old_fclose (FILE*);
13 extern FILE *_IO_fdopen (int, const char*) __THROW;
14 libc_hidden_proto (_IO_fdopen)
15 extern FILE *_IO_old_fdopen (int, const char*) __THROW;
16 extern FILE *_IO_new_fdopen (int, const char*) __THROW;
17 extern int _IO_fflush (FILE*);
18 libc_hidden_proto (_IO_fflush)
19 extern int _IO_fgetpos (FILE*, __fpos_t*);
20 extern int _IO_fgetpos64 (FILE*, __fpos64_t*);
21 extern char* _IO_fgets (char*, int, FILE*);
22 extern FILE *_IO_fopen (const char*, const char*);
23 extern FILE *_IO_old_fopen (const char*, const char*);
24 extern FILE *_IO_new_fopen (const char*, const char*);
25 extern FILE *_IO_fopen64 (const char*, const char*);
26 extern FILE *__fopen_internal (const char*, const char*, int)
27 	attribute_hidden;
28 extern FILE *__fopen_maybe_mmap (FILE *) __THROW attribute_hidden;
29 extern int _IO_fprintf (FILE*, const char*, ...);
30 extern int _IO_fputs (const char*, FILE*);
31 libc_hidden_proto (_IO_fputs)
32 extern int _IO_fsetpos (FILE*, const __fpos_t *);
33 extern int _IO_fsetpos64 (FILE*, const __fpos64_t *);
34 extern long int _IO_ftell (FILE*);
35 libc_hidden_proto (_IO_ftell)
36 extern size_t _IO_fread (void*, size_t, size_t, FILE*);
37 libc_hidden_proto (_IO_fread)
38 extern size_t _IO_fwrite (const void*, size_t, size_t, FILE*);
39 libc_hidden_proto (_IO_fwrite)
40 extern char* _IO_gets (char*);
41 extern void _IO_perror (const char*) __THROW;
42 extern int _IO_printf (const char*, ...);
43 extern int _IO_puts (const char*);
44 libc_hidden_proto (_IO_puts)
45 extern int _IO_scanf (const char*, ...);
46 extern void _IO_setbuffer (FILE *, char*, size_t) __THROW;
47 libc_hidden_proto (_IO_setbuffer)
48 extern int _IO_setvbuf (FILE*, char*, int, size_t) __THROW;
49 libc_hidden_proto (_IO_setvbuf)
50 extern int _IO_sscanf (const char*, const char*, ...) __THROW;
51 extern int _IO_sprintf (char *, const char*, ...) __THROW;
52 extern int _IO_ungetc (int, FILE*) __THROW;
53 extern 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)
70 extern FILE* _IO_popen (const char*, const char*) __THROW;
71 extern FILE* _IO_new_popen (const char*, const char*) __THROW;
72 extern FILE* _IO_old_popen (const char*, const char*) __THROW;
73 extern int __new_pclose (FILE *) __THROW;
74 extern 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 
79 FILE *__new_freopen (const char *, const char *, FILE *) __THROW;
80 FILE *__old_freopen (const char *, const char *, FILE *) __THROW;
81 
82 #endif /* iolibio.h.  */
83