source: trunk/gcc/libstdc++-v3/libio/iolibio.h

Last change on this file was 1477, checked in by bird, 21 years ago

This commit was generated by cvs2svn to compensate for changes in r1476,
which included commits to RCS files with non-trunk default branches.

  • Property cvs2svn:cvs-rev set to 1.1.1.2
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 4.8 KB
Line 
1/* Copyright (C) 1999, 2000, 2004 Free Software Foundation, Inc.
2 This file is part of the GNU IO Library.
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License as
6 published by the Free Software Foundation; either version 2, or (at
7 your option) any later version.
8
9 This library is distributed in the hope that it will be useful, but
10 WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this library; see the file COPYING. If not, write to
16 the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
17 MA 02111-1307, USA.
18
19 As a special exception, if you link this library with files
20 compiled with a GNU compiler to produce an executable, this does
21 not cause the resulting executable to be covered by the GNU General
22 Public License. This exception does not however invalidate any
23 other reasons why the executable file might be covered by the GNU
24 General Public License. */
25
26#include "libio.h"
27
28/* These emulate stdio functionality, but with a different name
29 (_IO_ungetc instead of ungetc), and using _IO_FILE instead of FILE. */
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35extern int _IO_fclose __P((_IO_FILE*));
36extern int _IO_new_fclose __P((_IO_FILE*));
37extern int _IO_old_fclose __P((_IO_FILE*));
38extern _IO_FILE *_IO_fdopen __P((int, const char*));
39extern _IO_FILE *_IO_old_fdopen __P((int, const char*));
40extern _IO_FILE *_IO_new_fdopen __P((int, const char*));
41extern int _IO_fflush __P((_IO_FILE*));
42extern int _IO_fgetpos __P((_IO_FILE*, _IO_fpos_t*));
43extern int _IO_fgetpos64 __P((_IO_FILE*, _IO_fpos64_t*));
44extern char* _IO_fgets __P((char*, int, _IO_FILE*));
45extern _IO_FILE *_IO_fopen __P((const char*, const char*));
46extern _IO_FILE *_IO_old_fopen __P((const char*, const char*));
47extern _IO_FILE *_IO_new_fopen __P((const char*, const char*));
48extern _IO_FILE *_IO_fopen64 __P((const char*, const char*));
49extern int _IO_fprintf __P((_IO_FILE*, const char*, ...));
50extern int _IO_fputs __P((const char*, _IO_FILE*));
51extern int _IO_fsetpos __P((_IO_FILE*, const _IO_fpos_t *));
52extern int _IO_fsetpos64 __P((_IO_FILE*, const _IO_fpos64_t *));
53extern long int _IO_ftell __P((_IO_FILE*));
54extern _IO_size_t _IO_fread __P((void*, _IO_size_t, _IO_size_t, _IO_FILE*));
55extern _IO_size_t _IO_fwrite __P((const void*,
56 _IO_size_t, _IO_size_t, _IO_FILE*));
57extern char* _IO_gets __P((char*));
58extern void _IO_perror __P((const char*));
59extern int _IO_printf __P((const char*, ...));
60extern int _IO_puts __P((const char*));
61extern int _IO_scanf __P((const char*, ...));
62extern void _IO_setbuffer __P((_IO_FILE *, char*, _IO_size_t));
63extern int _IO_setvbuf __P((_IO_FILE*, char*, int, _IO_size_t));
64extern int _IO_sscanf __P((const char*, const char*, ...));
65extern int _IO_sprintf __P((char *, const char*, ...));
66extern int _IO_ungetc __P((int, _IO_FILE*));
67extern int _IO_vsscanf __P((const char *, const char *, _IO_va_list));
68extern int _IO_vsprintf __P((char*, const char*, _IO_va_list));
69extern int _IO_vswprintf __P((wchar_t*, _IO_size_t, const wchar_t*,
70 _IO_va_list));
71
72struct obstack;
73extern int _IO_obstack_vprintf __P ((struct obstack *, const char *,
74 _IO_va_list));
75extern int _IO_obstack_printf __P ((struct obstack *, const char *, ...));
76#ifndef _IO_pos_BAD
77#define _IO_pos_BAD ((_IO_off64_t)(-1))
78#endif
79#define _IO_clearerr(FP) ((FP)->_flags &= ~(_IO_ERR_SEEN|_IO_EOF_SEEN))
80#define _IO_fseek(__fp, __offset, __whence) \
81 (_IO_seekoff(__fp, __offset, __whence, _IOS_INPUT|_IOS_OUTPUT) == _IO_pos_BAD ? EOF : 0)
82#define _IO_rewind(FILE) (void)_IO_seekoff(FILE, 0, 0, _IOS_INPUT|_IOS_OUTPUT)
83#define _IO_vprintf(FORMAT, ARGS) _IO_vfprintf(_IO_stdout, FORMAT, ARGS)
84#define _IO_freopen(FILENAME, MODE, FP) \
85 (_IO_file_close_it(FP), _IO_file_fopen(FP, FILENAME, MODE, 0))
86#define _IO_old_freopen(FILENAME, MODE, FP) \
87 (_IO_old_file_close_it (FP), _IO_old_file_fopen(FP, FILENAME, MODE))
88#define _IO_freopen64(FILENAME, MODE, FP) \
89 (_IO_file_close_it(FP), _IO_file_fopen(FP, FILENAME, MODE, 1))
90#define _IO_fileno(FP) ((FP)->_fileno)
91extern _IO_FILE* _IO_popen __P((const char*, const char*));
92extern _IO_FILE* _IO_new_popen __P((const char*, const char*));
93extern _IO_FILE* _IO_old_popen __P((const char*, const char*));
94extern int __new_pclose __P((_IO_FILE *));
95extern int __old_pclose __P((_IO_FILE *));
96#define _IO_pclose _IO_fclose
97#define _IO_setbuf(_FP, _BUF) _IO_setbuffer(_FP, _BUF, _IO_BUFSIZ)
98#define _IO_setlinebuf(_FP) _IO_setvbuf(_FP, NULL, 1, 0)
99
100_IO_FILE *__new_freopen __P ((const char *, const char *, _IO_FILE *));
101_IO_FILE *__old_freopen __P ((const char *, const char *, _IO_FILE *));
102
103#ifdef __cplusplus
104}
105#endif
106
107
Note: See TracBrowser for help on using the repository browser.