]> git.buserror.net Git - polintos/scott/priv.git/blob - include/c++/stl/stl/_cstdio.h
Add STLport 5.1.4
[polintos/scott/priv.git] / include / c++ / stl / stl / _cstdio.h
1 /*
2  * Copyright (c) 1999
3  * Boris Fomitchev
4  *
5  * This material is provided "as is", with absolutely no warranty expressed
6  * or implied. Any use is at your own risk.
7  *
8  * Permission to use or copy this software for any purpose is hereby granted
9  * without fee, provided the above notices are retained on all copies.
10  * Permission to modify the code and to distribute modified code is granted,
11  * provided the above notices are retained, and a notice that the code was
12  * modified is included with the above copyright notice.
13  *
14  */
15
16 #ifndef _STLP_INTERNAL_CSTDIO
17 #define _STLP_INTERNAL_CSTDIO
18
19 #if defined (__Lynx__)
20 #  include _STLP_NATIVE_C_HEADER(stdarg.h)
21 #endif
22
23 #if defined (_STLP_USE_NEW_C_HEADERS)
24 #  include _STLP_NATIVE_CPP_C_HEADER(cstdio)
25 #else
26 #  include _STLP_NATIVE_C_HEADER(stdio.h)
27 #endif
28
29 #if (defined (__MWERKS__) && !defined (N_PLAT_NLM))  || defined (__BORLANDC__)
30 #  undef stdin
31 #  undef stdout
32 #  undef stderr
33 #  if defined (__MWERKS__)
34 #  define stdin   (&_STLP_VENDOR_CSTD::__files[0])
35 #  define stdout  (&_STLP_VENDOR_CSTD::__files[1])
36 #  define stderr  (&_STLP_VENDOR_CSTD::__files[2])
37 #  elif defined (__BORLANDC__)
38 #    define stdin   (&_STLP_VENDOR_CSTD::_streams[0])
39 #    define stdout  (&_STLP_VENDOR_CSTD::_streams[1])
40 #    define stderr  (&_STLP_VENDOR_CSTD::_streams[2])
41 #  endif
42 #endif
43
44 #if defined (_STLP_MSVC_LIB) && (_STLP_MSVC_LIB < 1400) || defined (_STLP_USING_PLATFORM_SDK_COMPILER)
45 inline int vsnprintf(char *s1, size_t n, const char *s2, va_list v)
46 { return _STLP_VENDOR_CSTD::_vsnprintf(s1, n, s2, v); }
47 #endif
48
49 #if defined (_STLP_IMPORT_VENDOR_CSTD )
50 _STLP_BEGIN_NAMESPACE
51 using _STLP_VENDOR_CSTD::FILE;
52 using _STLP_VENDOR_CSTD::fpos_t;
53 using _STLP_VENDOR_CSTD::size_t;
54
55 // undef obsolete macros
56 #  undef putc
57 #  undef getc
58 #  undef getchar
59 #  undef putchar
60 #  undef feof
61 #  undef ferror
62
63 #  if !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS)
64 using _STLP_VENDOR_CSTD::clearerr;
65 using _STLP_VENDOR_CSTD::fclose;
66 using _STLP_VENDOR_CSTD::feof;
67 using _STLP_VENDOR_CSTD::ferror;
68 using _STLP_VENDOR_CSTD::fflush;
69 using _STLP_VENDOR_CSTD::fgetc;
70 using _STLP_VENDOR_CSTD::fgetpos;
71 using _STLP_VENDOR_CSTD::fgets;
72 using _STLP_VENDOR_CSTD::fopen;
73 using _STLP_VENDOR_CSTD::fprintf;
74 using _STLP_VENDOR_CSTD::fputc;
75 using _STLP_VENDOR_CSTD::fputs;
76 using _STLP_VENDOR_CSTD::fread;
77 #    if !defined (_WIN32_WCE) || (_WIN32_WCE < 0x500) // CE5 stopped supplying this
78 using _STLP_VENDOR_CSTD::freopen;
79 #    endif
80 using _STLP_VENDOR_CSTD::fscanf;
81 using _STLP_VENDOR_CSTD::fseek;
82 using _STLP_VENDOR_CSTD::fsetpos;
83 using _STLP_VENDOR_CSTD::ftell;
84 using _STLP_VENDOR_CSTD::fwrite;
85
86 #    if  !(defined (__IBMCPP__) && (__IBMCPP__ >= 500))
87 #      if !defined (_WIN32_WCE) || (_WIN32_WCE < 0x500) // CE5 stopped supplying this except as macros. TODO: use inline function to redirect to the macros?
88  using _STLP_VENDOR_CSTD::getc;
89  using _STLP_VENDOR_CSTD::putc;
90 #      endif
91  using _STLP_VENDOR_CSTD::getchar;
92  using _STLP_VENDOR_CSTD::putchar;
93 #    endif
94
95 using _STLP_VENDOR_CSTD::gets;
96 #    if !defined (_WIN32_WCE) || (_WIN32_WCE < 0x500) // CE5 stopped supplying this
97 using _STLP_VENDOR_CSTD::perror;
98 #    endif
99 using _STLP_VENDOR_CSTD::printf;
100 using _STLP_VENDOR_CSTD::puts;
101 #    if !defined (_WIN32_WCE) || (_WIN32_WCE < 0x500) // CE5 stopped supplying this
102 using _STLP_VENDOR_CSTD::remove;
103 using _STLP_VENDOR_CSTD::rename;
104 using _STLP_VENDOR_CSTD::rewind;
105 using _STLP_VENDOR_CSTD::setbuf;
106 using _STLP_VENDOR_CSTD::tmpfile;
107 using _STLP_VENDOR_CSTD::tmpnam;
108 #    endif
109 using _STLP_VENDOR_CSTD::scanf;
110 using _STLP_VENDOR_CSTD::setvbuf;
111 using _STLP_VENDOR_CSTD::sprintf;
112 using _STLP_VENDOR_CSTD::sscanf;
113 using _STLP_VENDOR_CSTD::ungetc;
114 using _STLP_VENDOR_CSTD::vfprintf;
115 using _STLP_VENDOR_CSTD::vprintf;
116 using _STLP_VENDOR_CSTD::vsprintf;
117 #    if ((defined (__MWERKS__) && !defined (N_PLAT_NLM)) || (defined (_STLP_MSVC_LIB) && (_STLP_MSVC_LIB < 1400)) || \
118         (defined (__BORLANDC__)))
119 using _STLP_VENDOR_CSTD::vsnprintf;
120 #    endif
121 #  endif /* _STLP_NO_CSTD_FUNCTION_IMPORTS */
122 _STLP_END_NAMESPACE
123 #endif /* _STLP_IMPORT_VENDOR_CSTD */
124
125 #endif /* _STLP_INTERNAL_CSTDIO */