5 * This material is provided "as is", with absolutely no warranty expressed
6 * or implied. Any use is at your own risk.
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.
16 #ifndef _STLP_INTERNAL_CSTDIO
17 #define _STLP_INTERNAL_CSTDIO
19 #if defined (__Lynx__)
20 # include _STLP_NATIVE_C_HEADER(stdarg.h)
23 #if defined (_STLP_USE_NEW_C_HEADERS)
24 # include _STLP_NATIVE_CPP_C_HEADER(cstdio)
26 # include _STLP_NATIVE_C_HEADER(stdio.h)
29 #if (defined (__MWERKS__) && !defined (N_PLAT_NLM)) || defined (__BORLANDC__)
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])
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); }
49 #if defined (_STLP_IMPORT_VENDOR_CSTD )
51 using _STLP_VENDOR_CSTD::FILE;
52 using _STLP_VENDOR_CSTD::fpos_t;
53 using _STLP_VENDOR_CSTD::size_t;
55 // undef obsolete macros
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 _WIN32_WCE < 0x500 // CE5 stopped supplying this
78 using _STLP_VENDOR_CSTD::freopen;
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;
86 # if !(defined (__IBMCPP__) && (__IBMCPP__ >= 500))
87 # if _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;
91 using _STLP_VENDOR_CSTD::getchar;
92 using _STLP_VENDOR_CSTD::putchar;
95 using _STLP_VENDOR_CSTD::gets;
96 # if _WIN32_WCE < 0x500 // CE5 stopped supplying this
97 using _STLP_VENDOR_CSTD::perror;
99 using _STLP_VENDOR_CSTD::printf;
100 using _STLP_VENDOR_CSTD::puts;
101 # if _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;
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;
121 # endif /* _STLP_NO_CSTD_FUNCTION_IMPORTS */
123 #endif /* _STLP_IMPORT_VENDOR_CSTD */
125 #endif /* _STLP_INTERNAL_CSTDIO */