Back to index

glibc  2.9
iolibio.h
Go to the documentation of this file.
00001 #include <libio.h>
00002 
00003 /* These emulate stdio functionality, but with a different name
00004    (_IO_ungetc instead of ungetc), and using _IO_FILE instead of FILE. */
00005 
00006 #ifdef __cplusplus
00007 extern "C" {
00008 #endif
00009 
00010 extern int _IO_fclose (_IO_FILE*);
00011 extern int _IO_new_fclose (_IO_FILE*);
00012 extern int _IO_old_fclose (_IO_FILE*);
00013 extern _IO_FILE *_IO_fdopen (int, const char*) __THROW;
00014 extern _IO_FILE *_IO_old_fdopen (int, const char*) __THROW;
00015 extern _IO_FILE *_IO_new_fdopen (int, const char*) __THROW;
00016 extern int _IO_fflush (_IO_FILE*);
00017 extern int _IO_fgetpos (_IO_FILE*, _IO_fpos_t*);
00018 extern int _IO_fgetpos64 (_IO_FILE*, _IO_fpos64_t*);
00019 extern char* _IO_fgets (char*, int, _IO_FILE*);
00020 extern _IO_FILE *_IO_fopen (const char*, const char*);
00021 extern _IO_FILE *_IO_old_fopen (const char*, const char*);
00022 extern _IO_FILE *_IO_new_fopen (const char*, const char*);
00023 extern _IO_FILE *_IO_fopen64 (const char*, const char*);
00024 extern _IO_FILE *__fopen_internal (const char*, const char*, int);
00025 extern _IO_FILE *__fopen_maybe_mmap (_IO_FILE *) __THROW;
00026 extern int _IO_fprintf (_IO_FILE*, const char*, ...);
00027 extern int _IO_fputs (const char*, _IO_FILE*);
00028 libc_hidden_proto (_IO_fputs)
00029 extern int _IO_fsetpos (_IO_FILE*, const _IO_fpos_t *);
00030 extern int _IO_fsetpos64 (_IO_FILE*, const _IO_fpos64_t *);
00031 extern long int _IO_ftell (_IO_FILE*);
00032 extern _IO_size_t _IO_fread (void*, _IO_size_t, _IO_size_t, _IO_FILE*);
00033 extern _IO_size_t _IO_fwrite (const void*, _IO_size_t, _IO_size_t, _IO_FILE*);
00034 extern char* _IO_gets (char*);
00035 extern void _IO_perror (const char*) __THROW;
00036 extern int _IO_printf (const char*, ...);
00037 extern int _IO_puts (const char*);
00038 extern int _IO_scanf (const char*, ...);
00039 extern void _IO_setbuffer (_IO_FILE *, char*, _IO_size_t) __THROW;
00040 extern int _IO_setvbuf (_IO_FILE*, char*, int, _IO_size_t) __THROW;
00041 extern int _IO_sscanf (const char*, const char*, ...) __THROW;
00042 extern int _IO_sprintf (char *, const char*, ...) __THROW;
00043 extern int _IO_ungetc (int, _IO_FILE*) __THROW;
00044 extern int _IO_vsscanf (const char *, const char *, _IO_va_list) __THROW;
00045 extern int _IO_vsprintf (char*, const char*, _IO_va_list) __THROW;
00046 extern int _IO_vswprintf (wchar_t*, _IO_size_t, const wchar_t*, _IO_va_list)
00047        __THROW;
00048 
00049 struct obstack;
00050 extern int _IO_obstack_vprintf (struct obstack *, const char *, _IO_va_list)
00051        __THROW;
00052 extern int _IO_obstack_printf (struct obstack *, const char *, ...) __THROW;
00053 #ifndef _IO_pos_BAD
00054 #define _IO_pos_BAD ((_IO_off64_t)(-1))
00055 #endif
00056 #define _IO_clearerr(FP) ((FP)->_flags &= ~(_IO_ERR_SEEN|_IO_EOF_SEEN))
00057 #define _IO_fseek(__fp, __offset, __whence) \
00058   (_IO_seekoff_unlocked (__fp, __offset, __whence, _IOS_INPUT|_IOS_OUTPUT) \
00059    == _IO_pos_BAD ? EOF : 0)
00060 #define _IO_rewind(FILE) \
00061   (void) _IO_seekoff_unlocked (FILE, 0, 0, _IOS_INPUT|_IOS_OUTPUT)
00062 #define _IO_vprintf(FORMAT, ARGS) \
00063   INTUSE(_IO_vfprintf) (_IO_stdout, FORMAT, ARGS)
00064 #define _IO_freopen(FILENAME, MODE, FP) \
00065   (INTUSE(_IO_file_close_it)(FP), \
00066    INTUSE(_IO_file_fopen)(FP, FILENAME, MODE, 1))
00067 #define _IO_old_freopen(FILENAME, MODE, FP) \
00068   (_IO_old_file_close_it (FP), _IO_old_file_fopen(FP, FILENAME, MODE))
00069 #define _IO_freopen64(FILENAME, MODE, FP) \
00070   (INTUSE(_IO_file_close_it)(FP), \
00071    INTUSE(_IO_file_fopen)(FP, FILENAME, MODE, 0))
00072 #define _IO_fileno(FP) ((FP)->_fileno)
00073 extern _IO_FILE* _IO_popen (const char*, const char*) __THROW;
00074 extern _IO_FILE* _IO_new_popen (const char*, const char*) __THROW;
00075 extern _IO_FILE* _IO_old_popen (const char*, const char*) __THROW;
00076 extern int __new_pclose (_IO_FILE *) __THROW;
00077 extern int __old_pclose (_IO_FILE *) __THROW;
00078 #define _IO_pclose _IO_fclose
00079 #define _IO_setbuf(_FP, _BUF) INTUSE(_IO_setbuffer)(_FP, _BUF, _IO_BUFSIZ)
00080 #define _IO_setlinebuf(_FP) INTUSE(_IO_setvbuf)(_FP, NULL, 1, 0)
00081 
00082 _IO_FILE *__new_freopen (const char *, const char *, _IO_FILE *) __THROW;
00083 _IO_FILE *__old_freopen (const char *, const char *, _IO_FILE *) __THROW;
00084 
00085 /* Prototype for functions with alternative entry point.  */
00086 extern void _IO_setbuffer_internal (_IO_FILE *, char*, _IO_size_t) __THROW;
00087 extern _IO_size_t _IO_fread_internal (void*, _IO_size_t, _IO_size_t, _IO_FILE*)
00088        __THROW;
00089 extern _IO_FILE *_IO_fdopen_internal (int, const char*) __THROW;
00090 extern int _IO_vsprintf_internal (char*, const char*, _IO_va_list) __THROW;
00091 extern int _IO_fflush_internal (_IO_FILE*);
00092 extern _IO_size_t _IO_fwrite_internal (const void*, _IO_size_t,
00093                                    _IO_size_t, _IO_FILE*);
00094 extern long int _IO_ftell_internal (_IO_FILE*);
00095 extern int _IO_fputs_internal (const char*, _IO_FILE*);
00096 extern int _IO_setvbuf_internal (_IO_FILE*, char*, int, _IO_size_t) __THROW;
00097 
00098 #ifdef __cplusplus
00099 }
00100 #endif