williamr@2: /* williamr@2: * Copyright (c) 1999 williamr@2: * Boris Fomitchev williamr@2: * williamr@2: * This material is provided "as is", with absolutely no warranty expressed williamr@2: * or implied. Any use is at your own risk. williamr@2: * williamr@2: * Permission to use or copy this software for any purpose is hereby granted williamr@2: * without fee, provided the above notices are retained on all copies. williamr@2: * Permission to modify the code and to distribute modified code is granted, williamr@2: * provided the above notices are retained, and a notice that the code was williamr@2: * modified is included with the above copyright notice. williamr@2: * williamr@2: */ williamr@2: williamr@2: #ifndef _STLP_INTERNAL_CSTDIO williamr@2: #define _STLP_INTERNAL_CSTDIO williamr@2: williamr@2: #if defined (__Lynx__) williamr@2: # include _STLP_NATIVE_C_HEADER(stdarg.h) williamr@2: #endif williamr@2: williamr@2: #if defined (_STLP_USE_NEW_C_HEADERS) williamr@2: # include _STLP_NATIVE_CPP_C_HEADER(cstdio) williamr@2: #else williamr@2: # include _STLP_NATIVE_C_HEADER(stdio.h) williamr@2: #endif williamr@2: williamr@2: #if (defined (__MWERKS__) && !defined (N_PLAT_NLM)) || defined (__BORLANDC__) williamr@2: # undef stdin williamr@2: # undef stdout williamr@2: # undef stderr williamr@2: # if defined (__MWERKS__) williamr@2: # define stdin (&_STLP_VENDOR_CSTD::__files[0]) williamr@2: # define stdout (&_STLP_VENDOR_CSTD::__files[1]) williamr@2: # define stderr (&_STLP_VENDOR_CSTD::__files[2]) williamr@2: # elif defined (__BORLANDC__) williamr@2: # define stdin (&_STLP_VENDOR_CSTD::_streams[0]) williamr@2: # define stdout (&_STLP_VENDOR_CSTD::_streams[1]) williamr@2: # define stderr (&_STLP_VENDOR_CSTD::_streams[2]) williamr@2: # endif williamr@2: #endif williamr@2: williamr@2: #if defined (_STLP_MSVC_LIB) && (_STLP_MSVC_LIB < 1400) || defined (_STLP_USING_PLATFORM_SDK_COMPILER) williamr@2: inline int vsnprintf(char *s1, size_t n, const char *s2, va_list v) williamr@2: { return _STLP_VENDOR_CSTD::_vsnprintf(s1, n, s2, v); } williamr@2: #endif williamr@2: williamr@2: #if defined (_STLP_IMPORT_VENDOR_CSTD ) williamr@2: _STLP_BEGIN_NAMESPACE williamr@2: using _STLP_VENDOR_CSTD::FILE; williamr@2: using _STLP_VENDOR_CSTD::fpos_t; williamr@2: using _STLP_VENDOR_CSTD::size_t; williamr@2: williamr@2: // undef obsolete macros williamr@2: # undef putc williamr@2: # undef getc williamr@2: # undef getchar williamr@2: # undef putchar williamr@2: # undef feof williamr@2: # undef ferror williamr@2: williamr@2: # if !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS) williamr@2: using _STLP_VENDOR_CSTD::clearerr; williamr@2: using _STLP_VENDOR_CSTD::fclose; williamr@2: using _STLP_VENDOR_CSTD::feof; williamr@2: using _STLP_VENDOR_CSTD::ferror; williamr@2: using _STLP_VENDOR_CSTD::fflush; williamr@2: using _STLP_VENDOR_CSTD::fgetc; williamr@2: using _STLP_VENDOR_CSTD::fgetpos; williamr@2: using _STLP_VENDOR_CSTD::fgets; williamr@2: using _STLP_VENDOR_CSTD::fopen; williamr@2: using _STLP_VENDOR_CSTD::fprintf; williamr@2: using _STLP_VENDOR_CSTD::fputc; williamr@2: using _STLP_VENDOR_CSTD::fputs; williamr@2: using _STLP_VENDOR_CSTD::fread; williamr@2: # if _WIN32_WCE < 0x500 // CE5 stopped supplying this williamr@2: using _STLP_VENDOR_CSTD::freopen; williamr@2: # endif williamr@2: using _STLP_VENDOR_CSTD::fscanf; williamr@2: using _STLP_VENDOR_CSTD::fseek; williamr@2: using _STLP_VENDOR_CSTD::fsetpos; williamr@2: using _STLP_VENDOR_CSTD::ftell; williamr@2: using _STLP_VENDOR_CSTD::fwrite; williamr@2: williamr@2: # if !(defined (__IBMCPP__) && (__IBMCPP__ >= 500)) williamr@2: # if _WIN32_WCE < 0x500 // CE5 stopped supplying this except as macros. TODO: use inline function to redirect to the macros? williamr@2: using _STLP_VENDOR_CSTD::getc; williamr@2: using _STLP_VENDOR_CSTD::putc; williamr@2: # endif williamr@2: using _STLP_VENDOR_CSTD::getchar; williamr@2: using _STLP_VENDOR_CSTD::putchar; williamr@2: # endif williamr@2: williamr@2: using _STLP_VENDOR_CSTD::gets; williamr@2: # if _WIN32_WCE < 0x500 // CE5 stopped supplying this williamr@2: using _STLP_VENDOR_CSTD::perror; williamr@2: # endif williamr@2: using _STLP_VENDOR_CSTD::printf; williamr@2: using _STLP_VENDOR_CSTD::puts; williamr@2: # if _WIN32_WCE < 0x500 // CE5 stopped supplying this williamr@2: using _STLP_VENDOR_CSTD::remove; williamr@2: using _STLP_VENDOR_CSTD::rename; williamr@2: using _STLP_VENDOR_CSTD::rewind; williamr@2: using _STLP_VENDOR_CSTD::setbuf; williamr@2: using _STLP_VENDOR_CSTD::tmpfile; williamr@2: using _STLP_VENDOR_CSTD::tmpnam; williamr@2: # endif williamr@2: using _STLP_VENDOR_CSTD::scanf; williamr@2: using _STLP_VENDOR_CSTD::setvbuf; williamr@2: using _STLP_VENDOR_CSTD::sprintf; williamr@2: using _STLP_VENDOR_CSTD::sscanf; williamr@2: using _STLP_VENDOR_CSTD::ungetc; williamr@2: using _STLP_VENDOR_CSTD::vfprintf; williamr@2: using _STLP_VENDOR_CSTD::vprintf; williamr@2: using _STLP_VENDOR_CSTD::vsprintf; williamr@2: # if ((defined (__MWERKS__) && !defined (N_PLAT_NLM)) || (defined (_STLP_MSVC_LIB) && (_STLP_MSVC_LIB < 1400)) || \ williamr@2: (defined (__BORLANDC__))) williamr@2: using _STLP_VENDOR_CSTD::vsnprintf; williamr@2: # endif williamr@2: # endif /* _STLP_NO_CSTD_FUNCTION_IMPORTS */ williamr@2: _STLP_END_NAMESPACE williamr@2: #endif /* _STLP_IMPORT_VENDOR_CSTD */ williamr@2: williamr@2: #endif /* _STLP_INTERNAL_CSTDIO */