|
|
1.1 root 1: /*
2: Copyright (C) 1993 Free Software Foundation
3:
4: This file is part of the GNU IO Library. This library is free
5: software; you can redistribute it and/or modify it under the
6: terms of the GNU General Public License as published by the
7: Free Software Foundation; either version 2, or (at your option)
8: any later version.
9:
10: This library is distributed in the hope that it will be useful,
11: but WITHOUT ANY WARRANTY; without even the implied warranty of
12: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13: GNU General Public License for more details.
14:
15: You should have received a copy of the GNU General Public License
16: along with GNU CC; see the file COPYING. If not, write to
17: the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, 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 not cause
21: the resulting executable to be covered by the GNU General Public License.
22: This exception does not however invalidate any other reasons why
23: the executable file might be covered by the GNU General Public License. */
24:
25: /* This file defines a stdio-like environment, except that it avoid
26: link-time name clashes with an existing stdio.
27: It allows for testing the libio using stdio-using programs
28: with an incompatible libc.a.
29: It is not predantically correct - e.g. some macros are used
30: that may evaluate a stream argument more than once. */
31: #pragma cplusplus
32: #include "iolibio.h"
33:
34: typedef _IO_FILE FILE;
35: #ifndef EOF
36: #define EOF (-1)
37: #endif
38: #ifndef BUFSIZ
39: #define BUFSIZ 1024
40: #endif
41:
42: /* #define size_t, fpos_t L_tmpname TMP_MAX */
43:
44: #define _IOFBF 0 /* Fully buffered. */
45: #define _IOLBF 1 /* Line buffered. */
46: #define _IONBF 2 /* No buffering. */
47:
48: #define SEEK_SET 0
49: #define SEEK_CUR 1
50: #define SEEK_END 2
51:
52: #define stdin _IO_stdin
53: #define stdout _IO_stdout
54: #define stderr _IO_stderr
55:
56: #define getc(_fp) _IO_getc(_fp)
57: #define putc(_ch, _fp) _IO_putc(_ch, _fp)
58:
59: #define clearerr _IO_clearerr
60: #define fclose _IO_fclose
61: #define feof _IO_feof
62: #define ferror _IO_ferror
63: #define fflush _IO_fflush
64: #define fgetc(__fp) _IO_getc(_fp)
65: #define fgetpos _IO_fgetpos
66: #define fgets _IO_fgets
67: #define fopen _IO_fopen
68: #define fprintf _IO_fprintf
69: #define fputc(_ch, _fp) _IO_putc(_ch, _fp)
70: #define fputs _IO_fputs
71: #define fread _IO_fread
72: #define freopen _IO_freopen
73: #define fscanf _IO_fscanf
74: #define fseek _IO_fseek
75: #define fsetpos _IO_fsetpos
76: #define ftell _IO_ftell
77: #define fwrite _IO_fwrite
78: #define gets _IO_gets
79: #define perror _IO_perror
80: #define printf _IO_printf
81: #define puts _IO_puts
82: #define remove ??? _ARGS((const char*))
83: #define rename ??? _ARGS((const char* _old, const char* _new))
84: #define rewind _IO_rewind
85: #define scanf _IO_scanf
86: #define setbuf _IO_setbuf
87: #define setbuffer ??? _ARGS((FILE*, char*, int))
88: #define setvbuf _IO_setvbuf
89: #define sprintf _IO_sprintf
90: #define sscanf _IO_sscanf
91: #define tmpfile ??? _ARGS((void))
92: #define tmpnam ??? _ARGS((char*))
93: #define ungetc _IO_ungetc
94: #define vfprintf _IO_vfprintf
95: #define vprintf(__fmt, __args) vfprintf(stdout, __fmt, __args)
96: #define vsprintf _IO_vsprintf
97:
98: #if !defined(__STRICT_ANSI__) || defined(_POSIX_SOURCE)
99: #define fdopen _IO_fdopen
100: #define fileno _IO_fileno
101: #define popen _IO_popen
102: #define pclose _IO_pclose
103: #define setbuf _IO_setbuf
104: #define setlinebuf _IO_setlinebuf
105: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.