epoc32/include/stdapis/stlport/cwchar
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
     1.1 --- a/epoc32/include/stdapis/stlport/cwchar	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/stdapis/stlport/cwchar	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,267 @@
     1.4 -cwchar
     1.5 +/*
     1.6 + * © Portions copyright (c) 2006-2007 Nokia Corporation.  All rights reserved.
     1.7 + *
     1.8 + * Copyright (c) 1999 
     1.9 + * Boris Fomitchev
    1.10 + *
    1.11 + * This material is provided "as is", with absolutely no warranty expressed
    1.12 + * or implied. Any use is at your own risk.
    1.13 + *
    1.14 + * Permission to use or copy this software for any purpose is hereby granted 
    1.15 + * without fee, provided the above notices are retained on all copies.
    1.16 + * Permission to modify the code and to distribute modified code is granted,
    1.17 + * provided the above notices are retained, and a notice that the code was
    1.18 + * modified is included with the above copyright notice.
    1.19 + *
    1.20 + */
    1.21 +
    1.22 +#ifndef _STLP_CWCHAR
    1.23 +# define _STLP_CWCHAR
    1.24 +
    1.25 +# ifndef _STLP_OUTERMOST_HEADER_ID
    1.26 +#  define _STLP_OUTERMOST_HEADER_ID 0x120
    1.27 +#  include <stl/_prolog.h>
    1.28 +# endif
    1.29 +
    1.30 +# ifdef __GNUC__
    1.31 +#  include <cstddef>
    1.32 +# endif
    1.33 +
    1.34 +# if ! defined (_STLP_WINCE)
    1.35 +
    1.36 +# if defined (__BORLANDC__) &&  (__BORLANDC__ >= 0x530 ) && ! defined (_STLP_OWN_IOSTREAMS)
    1.37 +/*  Borland defines this stuff here */
    1.38 +#   include <iosfwd>
    1.39 +# endif
    1.40 +
    1.41 +# if !  defined (_STLP_NO_CWCHAR) && defined  (_STLP_USE_NEW_C_HEADERS)
    1.42 +#  include _STLP_NATIVE_CPP_C_HEADER(cwchar)
    1.43 +
    1.44 +# elif defined (__MRC__) || (defined (__SC__) && !defined (__DMC__)) || defined (__BORLANDC__) || defined(__FreeBSD__) || (defined (__GNUC__) && defined (__APPLE__) || defined( __Lynx__ )) || defined (__SYMBIAN32__) || defined (__WINS__) || defined (_STLP_NO_WCHAR_T)
    1.45 +
    1.46 +#ifdef __SYMBIAN32__
    1.47 +#  include <stddef.h>
    1.48 +#else
    1.49 +#  include _STLP_NATIVE_C_HEADER(stddef.h)
    1.50 +#endif
    1.51 +
    1.52 +#  if defined (__FreeBSD__) || defined (__Lynx__) || defined (__WINS__) || defined (__SYMBIAN32__)
    1.53 +#   ifndef _WINT_T
    1.54 +#ifdef __SYMBIAN32__
    1.55 +#  include <wchar.h>
    1.56 +#else
    1.57 +#  include _STLP_NATIVE_C_HEADER(wchar.h)
    1.58 +#endif
    1.59 +#    define _WINT_T
    1.60 +#   endif /* _WINT_T */
    1.61 +#  endif
    1.62 +
    1.63 +# else 
    1.64 +#  include _STLP_NATIVE_C_HEADER(wchar.h)
    1.65 +
    1.66 +#  if defined(__sun) && (defined(_XOPEN_SOURCE) || (_XOPEN_VERSION - 0 == 4))
    1.67 +extern wint_t   btowc();
    1.68 +extern int      fwprintf();
    1.69 +extern int      fwscanf();
    1.70 +extern int      fwide();
    1.71 +extern int      mbsinit();
    1.72 +extern size_t   mbrlen();
    1.73 +extern size_t   mbrtowc();
    1.74 +extern size_t   mbsrtowcs();
    1.75 +extern int      swprintf();
    1.76 +extern int      swscanf();
    1.77 +extern int      vfwprintf();
    1.78 +extern int      vwprintf();
    1.79 +extern int      vswprintf();
    1.80 +extern size_t   wcrtomb();
    1.81 +extern size_t   wcsrtombs();
    1.82 +extern wchar_t  *wcsstr();
    1.83 +extern int      wctob();
    1.84 +extern wchar_t  *wmemchr();
    1.85 +extern int      wmemcmp();
    1.86 +extern wchar_t  *wmemcpy();
    1.87 +extern wchar_t  *wmemmove();
    1.88 +extern wchar_t  *wmemset();
    1.89 +extern int      wprintf();
    1.90 +extern int      wscanf();
    1.91 +#  endif
    1.92 +# endif
    1.93 +
    1.94 +#if defined(__MSL__) && __MSL__ <= 0x51FF	/* dwa 2/28/99 - not yet implemented by MSL  */
    1.95 +#   define _STLP_WCHAR_MSL_EXCLUDE 1
    1.96 +namespace std
    1.97 +{ 
    1.98 +  extern "C" size_t wcsftime(wchar_t * str, size_t max_size, const wchar_t * format_str, const struct tm * timeptr);
    1.99 +}
   1.100 +#  define _STLP_NO_MBSTATE_T 1
   1.101 +#elif defined (__BORLANDC__)
   1.102 +#  ifdef _STLP_OWN_IOSTREAMS
   1.103 +#   define _STLP_NO_NATIVE_MBSTATE_T
   1.104 +#  endif
   1.105 +#  define _STLP_WCHAR_BORLAND_EXCLUDE 1
   1.106 +#  if (__BORLANDC__ < 0x540 )
   1.107 +#   define _STLP_NO_MBSTATE_T 1
   1.108 +#   define _STLP_WCHAR_SUNPRO_EXCLUDE
   1.109 +#  endif
   1.110 +#endif
   1.111 +
   1.112 +#ifndef _STLP_CWCHAR_H
   1.113 +# include <stl/_cwchar.h>
   1.114 +#endif
   1.115 +
   1.116 +# ifdef _STLP_IMPORT_VENDOR_CSTD
   1.117 +
   1.118 +#if defined (__SUNPRO_CC) && defined (_STLP_NO_OWN_IOSTREAMS) && !defined (_STLP_HAS_NO_NEW_C_HEADERS)
   1.119 +using _STLP_VENDOR_CSTD::wint_t; 
   1.120 +#endif
   1.121 +
   1.122 +_STLP_BEGIN_NAMESPACE
   1.123 +# ifdef _STLP_NO_WCHAR_T
   1.124 +typedef int wint_t;
   1.125 +# else
   1.126 +// gcc 3.0 has a glitch : wint_t only sucked into the global namespace if _GLIBCPP_USE_WCHAR_T is defined
   1.127 +#  if defined (__GNUC__) && ! defined (_GLIBCPP_USE_WCHAR_T)
   1.128 +using ::wint_t;
   1.129 +#  else
   1.130 +using _STLP_VENDOR_CSTD::wint_t;
   1.131 +#  endif
   1.132 +# endif
   1.133 +
   1.134 +
   1.135 +using _STLP_VENDOR_CSTD::size_t;
   1.136 +
   1.137 +#  if !defined (_STLP_NO_NATIVE_MBSTATE_T) && ! defined (_STLP_USE_OWN_MBSTATE_T)
   1.138 +using _STLP_VENDOR_MB_NAMESPACE::mbstate_t;
   1.139 +
   1.140 +# if !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS) && !defined(_STLP_WCHAR_BORLAND_EXCLUDE) \
   1.141 +  && (!defined(__MSL__) || __MSL__ > 0x6001)
   1.142 +#  if ! (defined (__KCC) || defined (__GNUC__))
   1.143 +using _STLP_VENDOR_MB_NAMESPACE::btowc;
   1.144 +#   if (!defined(__MSL__) || __MSL__ > 0x7001)
   1.145 +using _STLP_VENDOR_MB_NAMESPACE::mbsinit;
   1.146 +#   endif
   1.147 +#  endif
   1.148 +# if ! defined (__GNUC__)
   1.149 +using _STLP_VENDOR_MB_NAMESPACE::mbrlen;
   1.150 +using _STLP_VENDOR_MB_NAMESPACE::mbrtowc;
   1.151 +using _STLP_VENDOR_MB_NAMESPACE::mbsrtowcs;
   1.152 +using _STLP_VENDOR_MB_NAMESPACE::wcrtomb;
   1.153 +using _STLP_VENDOR_MB_NAMESPACE::wcsrtombs;
   1.154 +# endif
   1.155 +#    endif /* BORLAND && !__MSL__ || __MSL__ > 0x6001 */
   1.156 +
   1.157 +#  endif /* _STLP_NO_NATIVE_MBSTATE_T */
   1.158 +
   1.159 +# if !defined (_STLP_NO_NATIVE_WIDE_FUNCTIONS) && ! defined (_STLP_NO_CSTD_FUNCTION_IMPORTS)
   1.160 +
   1.161 +# if !defined (_STLP_WCHAR_BORLAND_EXCLUDE) && ! defined (_STLP_NO_CSTD_FUNCTION_IMPORTS)
   1.162 +using _STLP_VENDOR_CSTD::fgetwc;
   1.163 +using _STLP_VENDOR_CSTD::fgetws;
   1.164 +using _STLP_VENDOR_CSTD::fputwc;
   1.165 +using _STLP_VENDOR_CSTD::fputws;
   1.166 +# endif
   1.167 +
   1.168 +#  if !( defined (_STLP_WCHAR_SUNPRO_EXCLUDE) || defined (_STLP_WCHAR_BORLAND_EXCLUDE) \
   1.169 +      || defined(_STLP_WCHAR_HPACC_EXCLUDE) )
   1.170 +# ifndef __DECCXX
   1.171 +using _STLP_VENDOR_CSTD::fwide;
   1.172 +# endif
   1.173 +using _STLP_VENDOR_CSTD::fwprintf;
   1.174 +using _STLP_VENDOR_CSTD::fwscanf;
   1.175 +using _STLP_VENDOR_CSTD::getwchar;
   1.176 +#  endif
   1.177 +
   1.178 +# ifndef _STLP_WCHAR_BORLAND_EXCLUDE
   1.179 +using _STLP_VENDOR_CSTD::getwc;
   1.180 +using _STLP_VENDOR_CSTD::ungetwc;
   1.181 +
   1.182 +using _STLP_VENDOR_CSTD::putwc;
   1.183 +using _STLP_VENDOR_CSTD::putwchar;
   1.184 +# endif
   1.185 +
   1.186 +#  if !( defined (_STLP_WCHAR_SUNPRO_EXCLUDE) || defined (_STLP_WCHAR_BORLAND_EXCLUDE)\
   1.187 +      || defined(_STLP_WCHAR_HPACC_EXCLUDE) ) 
   1.188 +using _STLP_VENDOR_CSTD::swprintf;
   1.189 +using _STLP_VENDOR_CSTD::swscanf;
   1.190 +using _STLP_VENDOR_CSTD::vfwprintf;
   1.191 +using _STLP_VENDOR_CSTD::vwprintf;
   1.192 +using _STLP_VENDOR_CSTD::vswprintf;
   1.193 +
   1.194 +#   if !defined(__MSL__) || __MSL__ > 0x7001
   1.195 +using _STLP_VENDOR_CSTD::wcsftime;
   1.196 +#   endif
   1.197 +using _STLP_VENDOR_CSTD::wcstok;
   1.198 +
   1.199 +#  endif
   1.200 +
   1.201 +# if !(defined (__BORLANDC__) && (__BORLANDC__ < 0x540))
   1.202 +using _STLP_VENDOR_CSTD::wcscat;
   1.203 +using _STLP_VENDOR_CSTD::wcsrchr;
   1.204 +using _STLP_VENDOR_CSTD::wcscmp;
   1.205 +using _STLP_VENDOR_CSTD::wcscoll;
   1.206 +
   1.207 +using _STLP_VENDOR_CSTD::wcscpy;
   1.208 +using _STLP_VENDOR_CSTD::wcscspn;
   1.209 +
   1.210 +using _STLP_VENDOR_CSTD::wcslen;
   1.211 +using _STLP_VENDOR_CSTD::wcsncat;
   1.212 +using _STLP_VENDOR_CSTD::wcsncmp;
   1.213 +using _STLP_VENDOR_CSTD::wcsncpy;
   1.214 +using _STLP_VENDOR_CSTD::wcspbrk;
   1.215 +using _STLP_VENDOR_CSTD::wcschr;
   1.216 +
   1.217 +using _STLP_VENDOR_CSTD::wcsspn;
   1.218 +using _STLP_VENDOR_CSTD::wcsxfrm;
   1.219 +
   1.220 +# endif
   1.221 +
   1.222 +#  if !defined (_STLP_WCHAR_BORLAND_EXCLUDE)
   1.223 +
   1.224 +using _STLP_VENDOR_CSTD::wcstod;
   1.225 +using _STLP_VENDOR_CSTD::wcstol;
   1.226 +
   1.227 +# endif
   1.228 +
   1.229 +#ifdef __SYMBIAN32__
   1.230 +
   1.231 +using _STLP_VENDOR_CSTD::wcstoul;
   1.232 +
   1.233 +#endif //__SYMBIAN32__
   1.234 +
   1.235 +#  if !( defined (_STLP_WCHAR_SUNPRO_EXCLUDE) || defined(_STLP_WCHAR_HPACC_EXCLUDE) )
   1.236 +
   1.237 +using _STLP_VENDOR_CSTD::wcsstr;
   1.238 +using _STLP_VENDOR_CSTD::wmemchr;
   1.239 +
   1.240 +#  if !defined (_STLP_WCHAR_BORLAND_EXCLUDE)
   1.241 +
   1.242 +#ifndef __DMC__
   1.243 +using _STLP_VENDOR_CSTD::wctob;
   1.244 +using _STLP_VENDOR_CSTD::wmemcmp;
   1.245 +#endif
   1.246 +using _STLP_VENDOR_CSTD::wmemmove;
   1.247 +using _STLP_VENDOR_CSTD::wprintf;
   1.248 +using _STLP_VENDOR_CSTD::wscanf;
   1.249 +
   1.250 +#  endif
   1.251 +
   1.252 +using _STLP_VENDOR_CSTD::wmemcpy;
   1.253 +using _STLP_VENDOR_CSTD::wmemset;
   1.254 +#  endif
   1.255 +
   1.256 +# endif /* _STLP_NO_NATIVE_WIDE_FUNCTIONS */
   1.257 +_STLP_END_NAMESPACE
   1.258 +# endif /* _STLP_IMPORT_VENDOR_CSTD */
   1.259 +
   1.260 +# undef _STLP_WCHAR_SUNPRO_EXCLUDE
   1.261 +# undef _STLP_WCHAR_MSL_EXCLUDE
   1.262 +
   1.263 +# endif /* WINCE */
   1.264 +
   1.265 +# if (_STLP_OUTERMOST_HEADER_ID == 0x120)
   1.266 +#  include <stl/_epilog.h>
   1.267 +#  undef _STLP_OUTERMOST_HEADER_ID
   1.268 +# endif
   1.269 +
   1.270 +#endif /* _STLP_CWCHAR */
   1.271 +