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