diff -r e1b950c65cb4 -r 837f303aceeb epoc32/include/stdapis/stlportv5/stl/_streambuf.c --- a/epoc32/include/stdapis/stlportv5/stl/_streambuf.c Wed Mar 31 12:27:01 2010 +0100 +++ b/epoc32/include/stdapis/stlportv5/stl/_streambuf.c Wed Mar 31 12:33:34 2010 +0100 @@ -1,51 +1,47 @@ /* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * * Copyright (c) 1999 * Silicon Graphics Computer Systems, Inc. * - * Copyright (c) 1999 + * Copyright (c) 1999 * Boris Fomitchev * * This material is provided "as is", with absolutely no warranty expressed * or implied. Any use is at your own risk. * - * Permission to use or copy this software for any purpose is hereby granted + * Permission to use or copy this software for any purpose is hereby granted * without fee, provided the above notices are retained on all copies. * Permission to modify the code and to distribute modified code is granted, * provided the above notices are retained, and a notice that the code was * modified is included with the above copyright notice. * - */ + */ #ifndef _STLP_STREAMBUF_C #define _STLP_STREAMBUF_C #ifndef _STLP_INTERNAL_STREAMBUF -# include +# include #endif -# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) - _STLP_BEGIN_NAMESPACE //---------------------------------------------------------------------- // Non-inline basic_streambuf<> member functions. +#if !defined (_STLP_MSVC) || (_STLP_MSVC >= 1300) || !defined (_STLP_USE_STATIC_LIB) template -_STLP_EXP_DECLSPEC basic_streambuf<_CharT, _Traits>::basic_streambuf() +basic_streambuf<_CharT, _Traits>::basic_streambuf() : _M_gbegin(0), _M_gnext(0), _M_gend(0), _M_pbegin(0), _M_pnext(0), _M_pend(0), - _M_locale() -{ + _M_locale() { // _M_lock._M_initialize(); } +#endif template -_STLP_EXP_DECLSPEC basic_streambuf<_CharT, _Traits>::~basic_streambuf() +basic_streambuf<_CharT, _Traits>::~basic_streambuf() {} - template -_STLP_EXP_DECLSPEC locale +locale basic_streambuf<_CharT, _Traits>::pubimbue(const locale& __loc) { this->imbue(__loc); locale __tmp = _M_locale; @@ -54,16 +50,15 @@ } template -_STLP_EXP_DECLSPEC streamsize -basic_streambuf<_CharT, _Traits>::xsgetn(_CharT* __s, streamsize __n) -{ +streamsize +basic_streambuf<_CharT, _Traits>::xsgetn(_CharT* __s, streamsize __n) { streamsize __result = 0; const int_type __eof = _Traits::eof(); while (__result < __n) { if (_M_gnext < _M_gend) { size_t __chunk = (min) (__STATIC_CAST(size_t,_M_gend - _M_gnext), - __STATIC_CAST(size_t,__n - __result)); + __STATIC_CAST(size_t,__n - __result)); _Traits::copy(__s, _M_gnext, __chunk); __result += __chunk; __s += __chunk; @@ -72,20 +67,20 @@ else { int_type __c = this->sbumpc(); if (!_Traits::eq_int_type(__c, __eof)) { - *__s = __c; + *__s = _Traits::to_char_type(__c); ++__result; - ++__s; + ++__s; } else - break; + break; } } - + return __result; } template -_STLP_EXP_DECLSPEC streamsize +streamsize basic_streambuf<_CharT, _Traits>::xsputn(const _CharT* __s, streamsize __n) { streamsize __result = 0; @@ -113,7 +108,7 @@ } template -_STLP_EXP_DECLSPEC streamsize +streamsize basic_streambuf<_CharT, _Traits>::_M_xsputnc(_CharT __c, streamsize __n) { streamsize __result = 0; @@ -138,8 +133,8 @@ } template -_STLP_EXP_DECLSPEC _STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::int_type -basic_streambuf<_CharT, _Traits>::_M_snextc_aux() +_STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::int_type +basic_streambuf<_CharT, _Traits>::_M_snextc_aux() { int_type __eof = _Traits::eof(); if (_M_gend == _M_gnext) @@ -151,19 +146,19 @@ } template -_STLP_EXP_DECLSPEC _STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::int_type -basic_streambuf<_CharT, _Traits>::pbackfail(int_type) { - return _Traits::eof(); +_STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::int_type +basic_streambuf<_CharT, _Traits>::pbackfail(int_type) { + return _Traits::eof(); } template -_STLP_EXP_DECLSPEC _STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::int_type -basic_streambuf<_CharT, _Traits>::overflow(int_type) { - return _Traits::eof(); +_STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::int_type +basic_streambuf<_CharT, _Traits>::overflow(int_type) { + return _Traits::eof(); } template -_STLP_EXP_DECLSPEC _STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::int_type +_STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::int_type basic_streambuf<_CharT, _Traits>::uflow() { return ( _Traits::eq_int_type(this->underflow(),_Traits::eof()) ? _Traits::eof() : @@ -171,48 +166,43 @@ } template -_STLP_EXP_DECLSPEC _STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::int_type +_STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::int_type basic_streambuf<_CharT, _Traits>::underflow() { return _Traits::eof(); } template -_STLP_EXP_DECLSPEC streamsize +streamsize basic_streambuf<_CharT, _Traits>::showmanyc() { return 0; } template -_STLP_EXP_DECLSPEC void +void basic_streambuf<_CharT, _Traits>::imbue(const locale&) {} template -_STLP_EXP_DECLSPEC int +int basic_streambuf<_CharT, _Traits>::sync() { return 0; } template -_STLP_EXP_DECLSPEC _STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::pos_type +_STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::pos_type basic_streambuf<_CharT, _Traits>::seekpos(pos_type, ios_base::openmode) { return pos_type(-1); } template -_STLP_EXP_DECLSPEC _STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::pos_type +_STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::pos_type basic_streambuf<_CharT, _Traits>::seekoff(off_type, ios_base::seekdir, - ios_base::openmode) + ios_base::openmode) { return pos_type(-1); } template -_STLP_EXP_DECLSPEC basic_streambuf<_CharT, _Traits>* +basic_streambuf<_CharT, _Traits>* basic_streambuf<_CharT, _Traits>:: setbuf(char_type*, streamsize) { return this; } - -# if defined (_STLP_USE_TEMPLATE_EXPORT) -# if !defined (_STLP_NO_WCHAR_T) -_STLP_EXPORT_TEMPLATE_CLASS basic_streambuf >; -# endif -# endif /* _STLP_USE_TEMPLATE_EXPORT */ - _STLP_END_NAMESPACE -# endif /* EXPOSE */ +#endif -#endif +// Local Variables: +// mode:C++ +// End: