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