genericopenlibs/cppstdlib/stl/stlport/stl/_streambuf.c
changeset 31 ce057bb09d0b
child 45 4b03adbd26ca
equal deleted inserted replaced
30:e20de85af2ee 31:ce057bb09d0b
       
     1 /*
       
     2  * Copyright (c) 1999
       
     3  * Silicon Graphics Computer Systems, Inc.
       
     4  *
       
     5  * Copyright (c) 1999
       
     6  * Boris Fomitchev
       
     7  *
       
     8  * This material is provided "as is", with absolutely no warranty expressed
       
     9  * or implied. Any use is at your own risk.
       
    10  *
       
    11  * Permission to use or copy this software for any purpose is hereby granted
       
    12  * without fee, provided the above notices are retained on all copies.
       
    13  * Permission to modify the code and to distribute modified code is granted,
       
    14  * provided the above notices are retained, and a notice that the code was
       
    15  * modified is included with the above copyright notice.
       
    16  *
       
    17  */
       
    18 #ifndef _STLP_STREAMBUF_C
       
    19 #define _STLP_STREAMBUF_C
       
    20 
       
    21 #ifndef _STLP_INTERNAL_STREAMBUF
       
    22 #  include <stl/_streambuf.h>
       
    23 #endif
       
    24 
       
    25 _STLP_BEGIN_NAMESPACE
       
    26 //----------------------------------------------------------------------
       
    27 // Non-inline basic_streambuf<> member functions.
       
    28 
       
    29 #if !defined (_STLP_MSVC) || (_STLP_MSVC >= 1300) || !defined (_STLP_USE_STATIC_LIB)
       
    30 template <class _CharT, class _Traits>
       
    31 basic_streambuf<_CharT, _Traits>::basic_streambuf()
       
    32   : _M_gbegin(0), _M_gnext(0), _M_gend(0),
       
    33     _M_pbegin(0), _M_pnext(0), _M_pend(0),
       
    34     _M_locale() {
       
    35   //  _M_lock._M_initialize();
       
    36 }
       
    37 #endif
       
    38 
       
    39 
       
    40 
       
    41 template <class _CharT, class _Traits>
       
    42 locale
       
    43 basic_streambuf<_CharT, _Traits>::pubimbue(const locale& __loc) {
       
    44   this->imbue(__loc);
       
    45   locale __tmp = _M_locale;
       
    46   _M_locale = __loc;
       
    47   return __tmp;
       
    48 }
       
    49 
       
    50 
       
    51 
       
    52 template <class _CharT, class _Traits>
       
    53 _STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::int_type
       
    54 basic_streambuf<_CharT, _Traits>::_M_snextc_aux()
       
    55 {
       
    56   int_type __eof = _Traits::eof();
       
    57   if (_M_gend == _M_gnext)
       
    58     return _Traits::eq_int_type(this->uflow(), __eof) ? __eof : this->sgetc();
       
    59   else {
       
    60     _M_gnext = _M_gend;
       
    61     return this->underflow();
       
    62   }
       
    63 }
       
    64 
       
    65 
       
    66 
       
    67 _STLP_END_NAMESPACE
       
    68 
       
    69 #endif
       
    70 
       
    71 // Local Variables:
       
    72 // mode:C++
       
    73 // End: