1.1 --- a/epoc32/include/stdapis/stlport/cstd/cwchar Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/stdapis/stlport/cstd/cwchar Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,260 @@
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 +# if defined (__FreeBSD__) || defined (__Lynx__) || defined (__WINS__) || defined (__SYMBIAN32__)
1.52 +# ifndef _WINT_T
1.53 +#ifdef __SYMBIAN32__
1.54 +# include <wchar.h>
1.55 +#else
1.56 +# include _STLP_NATIVE_C_HEADER(wchar.h)
1.57 +#endif
1.58 +# define _WINT_T
1.59 +# endif /* _WINT_T */
1.60 +# endif
1.61 +
1.62 +# else
1.63 +# include _STLP_NATIVE_C_HEADER(wchar.h)
1.64 +
1.65 +# if defined(__sun) && (defined(_XOPEN_SOURCE) || (_XOPEN_VERSION - 0 == 4))
1.66 +extern wint_t btowc();
1.67 +extern int fwprintf();
1.68 +extern int fwscanf();
1.69 +extern int fwide();
1.70 +extern int mbsinit();
1.71 +extern size_t mbrlen();
1.72 +extern size_t mbrtowc();
1.73 +extern size_t mbsrtowcs();
1.74 +extern int swprintf();
1.75 +extern int swscanf();
1.76 +extern int vfwprintf();
1.77 +extern int vwprintf();
1.78 +extern int vswprintf();
1.79 +extern size_t wcrtomb();
1.80 +extern size_t wcsrtombs();
1.81 +extern wchar_t *wcsstr();
1.82 +extern int wctob();
1.83 +extern wchar_t *wmemchr();
1.84 +extern int wmemcmp();
1.85 +extern wchar_t *wmemcpy();
1.86 +extern wchar_t *wmemmove();
1.87 +extern wchar_t *wmemset();
1.88 +extern int wprintf();
1.89 +extern int wscanf();
1.90 +# endif
1.91 +# endif
1.92 +
1.93 +#if defined(__MSL__) && __MSL__ <= 0x51FF /* dwa 2/28/99 - not yet implemented by MSL */
1.94 +# define _STLP_WCHAR_MSL_EXCLUDE 1
1.95 +namespace std
1.96 +{
1.97 + extern "C" size_t wcsftime(wchar_t * str, size_t max_size, const wchar_t * format_str, const struct tm * timeptr);
1.98 +}
1.99 +# define _STLP_NO_MBSTATE_T 1
1.100 +#elif defined (__BORLANDC__)
1.101 +# ifdef _STLP_OWN_IOSTREAMS
1.102 +# define _STLP_NO_NATIVE_MBSTATE_T
1.103 +# endif
1.104 +# define _STLP_WCHAR_BORLAND_EXCLUDE 1
1.105 +# if (__BORLANDC__ < 0x540 )
1.106 +# define _STLP_NO_MBSTATE_T 1
1.107 +# define _STLP_WCHAR_SUNPRO_EXCLUDE
1.108 +# endif
1.109 +#endif
1.110 +
1.111 +#ifndef _STLP_CWCHAR_H
1.112 +# include <stl/_cwchar.h>
1.113 +#endif
1.114 +
1.115 +# ifdef _STLP_IMPORT_VENDOR_CSTD
1.116 +
1.117 +#if defined (__SUNPRO_CC) && defined (_STLP_NO_OWN_IOSTREAMS) && !defined (_STLP_HAS_NO_NEW_C_HEADERS)
1.118 +using _STLP_VENDOR_CSTD::wint_t;
1.119 +#endif
1.120 +
1.121 +_STLP_BEGIN_NAMESPACE
1.122 +# ifdef _STLP_NO_WCHAR_T
1.123 +typedef int wint_t;
1.124 +# else
1.125 +// gcc 3.0 has a glitch : wint_t only sucked into the global namespace if _GLIBCPP_USE_WCHAR_T is defined
1.126 +# if defined (__GNUC__) && ! defined (_GLIBCPP_USE_WCHAR_T)
1.127 +using ::wint_t;
1.128 +# else
1.129 +using _STLP_VENDOR_CSTD::wint_t;
1.130 +# endif
1.131 +# endif
1.132 +
1.133 +
1.134 +using _STLP_VENDOR_CSTD::size_t;
1.135 +
1.136 +# if !defined (_STLP_NO_NATIVE_MBSTATE_T) && ! defined (_STLP_USE_OWN_MBSTATE_T)
1.137 +using _STLP_VENDOR_MB_NAMESPACE::mbstate_t;
1.138 +
1.139 +# if !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS) && !defined(_STLP_WCHAR_BORLAND_EXCLUDE) \
1.140 + && (!defined(__MSL__) || __MSL__ > 0x6001)
1.141 +# if ! (defined (__KCC) || defined (__GNUC__))
1.142 +using _STLP_VENDOR_MB_NAMESPACE::btowc;
1.143 +# if (!defined(__MSL__) || __MSL__ > 0x7001)
1.144 +using _STLP_VENDOR_MB_NAMESPACE::mbsinit;
1.145 +# endif
1.146 +# endif
1.147 +# if ! defined (__GNUC__)
1.148 +using _STLP_VENDOR_MB_NAMESPACE::mbrlen;
1.149 +using _STLP_VENDOR_MB_NAMESPACE::mbrtowc;
1.150 +using _STLP_VENDOR_MB_NAMESPACE::mbsrtowcs;
1.151 +using _STLP_VENDOR_MB_NAMESPACE::wcrtomb;
1.152 +using _STLP_VENDOR_MB_NAMESPACE::wcsrtombs;
1.153 +# endif
1.154 +# endif /* BORLAND && !__MSL__ || __MSL__ > 0x6001 */
1.155 +
1.156 +# endif /* _STLP_NO_NATIVE_MBSTATE_T */
1.157 +
1.158 +# if !defined (_STLP_NO_NATIVE_WIDE_FUNCTIONS) && ! defined (_STLP_NO_CSTD_FUNCTION_IMPORTS)
1.159 +
1.160 +# if !defined (_STLP_WCHAR_BORLAND_EXCLUDE) && ! defined (_STLP_NO_CSTD_FUNCTION_IMPORTS)
1.161 +using _STLP_VENDOR_CSTD::fgetwc;
1.162 +using _STLP_VENDOR_CSTD::fgetws;
1.163 +using _STLP_VENDOR_CSTD::fputwc;
1.164 +using _STLP_VENDOR_CSTD::fputws;
1.165 +# endif
1.166 +
1.167 +# if !( defined (_STLP_WCHAR_SUNPRO_EXCLUDE) || defined (_STLP_WCHAR_BORLAND_EXCLUDE) \
1.168 + || defined(_STLP_WCHAR_HPACC_EXCLUDE) )
1.169 +# ifndef __DECCXX
1.170 +using _STLP_VENDOR_CSTD::fwide;
1.171 +# endif
1.172 +using _STLP_VENDOR_CSTD::fwprintf;
1.173 +using _STLP_VENDOR_CSTD::fwscanf;
1.174 +using _STLP_VENDOR_CSTD::getwchar;
1.175 +# endif
1.176 +
1.177 +# ifndef _STLP_WCHAR_BORLAND_EXCLUDE
1.178 +using _STLP_VENDOR_CSTD::getwc;
1.179 +using _STLP_VENDOR_CSTD::ungetwc;
1.180 +
1.181 +using _STLP_VENDOR_CSTD::putwc;
1.182 +using _STLP_VENDOR_CSTD::putwchar;
1.183 +# endif
1.184 +
1.185 +# if !( defined (_STLP_WCHAR_SUNPRO_EXCLUDE) || defined (_STLP_WCHAR_BORLAND_EXCLUDE)\
1.186 + || defined(_STLP_WCHAR_HPACC_EXCLUDE) )
1.187 +using _STLP_VENDOR_CSTD::swprintf;
1.188 +using _STLP_VENDOR_CSTD::swscanf;
1.189 +using _STLP_VENDOR_CSTD::vfwprintf;
1.190 +using _STLP_VENDOR_CSTD::vwprintf;
1.191 +using _STLP_VENDOR_CSTD::vswprintf;
1.192 +
1.193 +# if !defined(__MSL__) || __MSL__ > 0x7001
1.194 +using _STLP_VENDOR_CSTD::wcsftime;
1.195 +# endif
1.196 +using _STLP_VENDOR_CSTD::wcstok;
1.197 +
1.198 +# endif
1.199 +
1.200 +# if !(defined (__BORLANDC__) && (__BORLANDC__ < 0x540))
1.201 +using _STLP_VENDOR_CSTD::wcscat;
1.202 +using _STLP_VENDOR_CSTD::wcsrchr;
1.203 +using _STLP_VENDOR_CSTD::wcscmp;
1.204 +using _STLP_VENDOR_CSTD::wcscoll;
1.205 +
1.206 +using _STLP_VENDOR_CSTD::wcscpy;
1.207 +using _STLP_VENDOR_CSTD::wcscspn;
1.208 +
1.209 +using _STLP_VENDOR_CSTD::wcslen;
1.210 +using _STLP_VENDOR_CSTD::wcsncat;
1.211 +using _STLP_VENDOR_CSTD::wcsncmp;
1.212 +using _STLP_VENDOR_CSTD::wcsncpy;
1.213 +using _STLP_VENDOR_CSTD::wcspbrk;
1.214 +using _STLP_VENDOR_CSTD::wcschr;
1.215 +
1.216 +using _STLP_VENDOR_CSTD::wcsspn;
1.217 +using _STLP_VENDOR_CSTD::wcsxfrm;
1.218 +
1.219 +# endif
1.220 +
1.221 +# if !defined (_STLP_WCHAR_BORLAND_EXCLUDE)
1.222 +
1.223 +using _STLP_VENDOR_CSTD::wcstod;
1.224 +using _STLP_VENDOR_CSTD::wcstol;
1.225 +
1.226 +# endif
1.227 +
1.228 +# if !( defined (_STLP_WCHAR_SUNPRO_EXCLUDE) || defined(_STLP_WCHAR_HPACC_EXCLUDE) )
1.229 +
1.230 +using _STLP_VENDOR_CSTD::wcsstr;
1.231 +using _STLP_VENDOR_CSTD::wmemchr;
1.232 +
1.233 +# if !defined (_STLP_WCHAR_BORLAND_EXCLUDE)
1.234 +
1.235 +#ifndef __DMC__
1.236 +using _STLP_VENDOR_CSTD::wctob;
1.237 +using _STLP_VENDOR_CSTD::wmemcmp;
1.238 +#endif
1.239 +using _STLP_VENDOR_CSTD::wmemmove;
1.240 +using _STLP_VENDOR_CSTD::wprintf;
1.241 +using _STLP_VENDOR_CSTD::wscanf;
1.242 +
1.243 +# endif
1.244 +
1.245 +using _STLP_VENDOR_CSTD::wmemcpy;
1.246 +using _STLP_VENDOR_CSTD::wmemset;
1.247 +# endif
1.248 +
1.249 +# endif /* _STLP_NO_NATIVE_WIDE_FUNCTIONS */
1.250 +_STLP_END_NAMESPACE
1.251 +# endif /* _STLP_IMPORT_VENDOR_CSTD */
1.252 +
1.253 +# undef _STLP_WCHAR_SUNPRO_EXCLUDE
1.254 +# undef _STLP_WCHAR_MSL_EXCLUDE
1.255 +
1.256 +# endif /* WINCE */
1.257 +
1.258 +# if (_STLP_OUTERMOST_HEADER_ID == 0x120)
1.259 +# include <stl/_epilog.h>
1.260 +# undef _STLP_OUTERMOST_HEADER_ID
1.261 +# endif
1.262 +
1.263 +#endif /* _STLP_CWCHAR */
1.264 +