1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/build/stlport/src/string.cpp Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,93 @@ 1.4 +#include "stlport_prefix.h" 1.5 + 1.6 +#include <string> 1.7 + 1.8 +_STLP_BEGIN_NAMESPACE 1.9 + 1.10 +#if defined(_STLP_USE_WIDE_INTERFACE) 1.11 +_STLP_MOVE_TO_PRIV_NAMESPACE 1.12 + 1.13 +wstring __ASCIIToWide(const char *ascii) { 1.14 + size_t size = strlen(ascii); 1.15 + wchar_t* buff = new wchar_t[size+1]; 1.16 + mbstowcs(buff, ascii, size); 1.17 + buff[size] = 0x00; 1.18 + wstring ret(buff); 1.19 + delete[] buff; 1.20 + return ret; 1.21 +} 1.22 +string __WideToASCII(const wchar_t *wide) { 1.23 + size_t size = wcslen(wide); 1.24 + char* buff = new char[size+1]; 1.25 + wcstombs(buff, wide, size); 1.26 + buff[size] = 0; 1.27 + string ret(buff); 1.28 + delete[] buff; 1.29 + return ret; 1.30 +} 1.31 +_STLP_MOVE_TO_STD_NAMESPACE 1.32 +#endif 1.33 + 1.34 +#if !defined (_STLP_NO_FORCE_INSTANTIATE) 1.35 + 1.36 +template class _STLP_CLASS_DECLSPEC allocator<char>; 1.37 + 1.38 +_STLP_MOVE_TO_PRIV_NAMESPACE 1.39 + 1.40 +template class _STLP_CLASS_DECLSPEC _STLP_alloc_proxy<char*, char, allocator<char> >; 1.41 +template class _STLP_CLASS_DECLSPEC _String_base<char, allocator<char> >; 1.42 + 1.43 +# if defined (_STLP_DEBUG) && !defined (__SUNPRO_CC) && !defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND) 1.44 +# define basic_string _STLP_NON_DBG_NAME(str) 1.45 + 1.46 +template class _STLP_CLASS_DECLSPEC basic_string<char, char_traits<char>, allocator<char> >; 1.47 +template class _STLP_CLASS_DECLSPEC __construct_checker<basic_string<char, char_traits<char>, allocator<char> > >; 1.48 + 1.49 +# undef basic_string 1.50 +# endif 1.51 + 1.52 +# if defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND) 1.53 +# define basic_string _STLP_NO_MEM_T_NAME(str) 1.54 +# else 1.55 +_STLP_MOVE_TO_STD_NAMESPACE 1.56 +# endif 1.57 + 1.58 +template class _STLP_CLASS_DECLSPEC basic_string<char, char_traits<char>, allocator<char> >; 1.59 + 1.60 +# if defined (basic_string) 1.61 +_STLP_MOVE_TO_STD_NAMESPACE 1.62 +# undef basic_string 1.63 +# endif 1.64 + 1.65 +# if !defined (_STLP_NO_WCHAR_T) 1.66 +template class _STLP_CLASS_DECLSPEC allocator<wchar_t>; 1.67 + 1.68 +_STLP_MOVE_TO_PRIV_NAMESPACE 1.69 + 1.70 +template class _STLP_CLASS_DECLSPEC _String_base<wchar_t, allocator<wchar_t> >; 1.71 + 1.72 +# if defined (_STLP_DEBUG) && !defined (__SUNPRO_CC) && !defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND) 1.73 +# define basic_string _STLP_NON_DBG_NAME(str) 1.74 + 1.75 +template class _STLP_CLASS_DECLSPEC basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> >; 1.76 +template class _STLP_CLASS_DECLSPEC __construct_checker<basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > >; 1.77 + 1.78 +# undef basic_string 1.79 +# endif 1.80 + 1.81 +# if defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND) 1.82 +# define basic_string _STLP_NO_MEM_T_NAME(str) 1.83 +# else 1.84 +_STLP_MOVE_TO_STD_NAMESPACE 1.85 +# endif 1.86 + 1.87 +template class _STLP_CLASS_DECLSPEC basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> >; 1.88 + 1.89 +# if defined (basic_string) 1.90 +_STLP_MOVE_TO_STD_NAMESPACE 1.91 +# undef basic_string 1.92 +# endif 1.93 +# endif 1.94 +#endif 1.95 + 1.96 +_STLP_END_NAMESPACE