michael@0: #include "stlport_prefix.h" michael@0: michael@0: #include michael@0: michael@0: _STLP_BEGIN_NAMESPACE michael@0: michael@0: #if defined(_STLP_USE_WIDE_INTERFACE) michael@0: _STLP_MOVE_TO_PRIV_NAMESPACE michael@0: michael@0: wstring __ASCIIToWide(const char *ascii) { michael@0: size_t size = strlen(ascii); michael@0: wchar_t* buff = new wchar_t[size+1]; michael@0: mbstowcs(buff, ascii, size); michael@0: buff[size] = 0x00; michael@0: wstring ret(buff); michael@0: delete[] buff; michael@0: return ret; michael@0: } michael@0: string __WideToASCII(const wchar_t *wide) { michael@0: size_t size = wcslen(wide); michael@0: char* buff = new char[size+1]; michael@0: wcstombs(buff, wide, size); michael@0: buff[size] = 0; michael@0: string ret(buff); michael@0: delete[] buff; michael@0: return ret; michael@0: } michael@0: _STLP_MOVE_TO_STD_NAMESPACE michael@0: #endif michael@0: michael@0: #if !defined (_STLP_NO_FORCE_INSTANTIATE) michael@0: michael@0: template class _STLP_CLASS_DECLSPEC allocator; michael@0: michael@0: _STLP_MOVE_TO_PRIV_NAMESPACE michael@0: michael@0: template class _STLP_CLASS_DECLSPEC _STLP_alloc_proxy >; michael@0: template class _STLP_CLASS_DECLSPEC _String_base >; michael@0: michael@0: # if defined (_STLP_DEBUG) && !defined (__SUNPRO_CC) && !defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND) michael@0: # define basic_string _STLP_NON_DBG_NAME(str) michael@0: michael@0: template class _STLP_CLASS_DECLSPEC basic_string, allocator >; michael@0: template class _STLP_CLASS_DECLSPEC __construct_checker, allocator > >; michael@0: michael@0: # undef basic_string michael@0: # endif michael@0: michael@0: # if defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND) michael@0: # define basic_string _STLP_NO_MEM_T_NAME(str) michael@0: # else michael@0: _STLP_MOVE_TO_STD_NAMESPACE michael@0: # endif michael@0: michael@0: template class _STLP_CLASS_DECLSPEC basic_string, allocator >; michael@0: michael@0: # if defined (basic_string) michael@0: _STLP_MOVE_TO_STD_NAMESPACE michael@0: # undef basic_string michael@0: # endif michael@0: michael@0: # if !defined (_STLP_NO_WCHAR_T) michael@0: template class _STLP_CLASS_DECLSPEC allocator; michael@0: michael@0: _STLP_MOVE_TO_PRIV_NAMESPACE michael@0: michael@0: template class _STLP_CLASS_DECLSPEC _String_base >; michael@0: michael@0: # if defined (_STLP_DEBUG) && !defined (__SUNPRO_CC) && !defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND) michael@0: # define basic_string _STLP_NON_DBG_NAME(str) michael@0: michael@0: template class _STLP_CLASS_DECLSPEC basic_string, allocator >; michael@0: template class _STLP_CLASS_DECLSPEC __construct_checker, allocator > >; michael@0: michael@0: # undef basic_string michael@0: # endif michael@0: michael@0: # if defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND) michael@0: # define basic_string _STLP_NO_MEM_T_NAME(str) michael@0: # else michael@0: _STLP_MOVE_TO_STD_NAMESPACE michael@0: # endif michael@0: michael@0: template class _STLP_CLASS_DECLSPEC basic_string, allocator >; michael@0: michael@0: # if defined (basic_string) michael@0: _STLP_MOVE_TO_STD_NAMESPACE michael@0: # undef basic_string michael@0: # endif michael@0: # endif michael@0: #endif michael@0: michael@0: _STLP_END_NAMESPACE