Module: wine Branch: master Commit: f357f4a575827f3c4b75de8d0b00caeef7fdf309 URL: http://source.winehq.org/git/wine.git/?a=commit;h=f357f4a575827f3c4b75de8d0b...
Author: Piotr Caban piotr@codeweavers.com Date: Wed Aug 24 14:39:03 2011 +0200
msvcp90: Added basic_streambuf<char> buffer accessing functions implementation.
---
dlls/msvcp90/ios.c | 30 ++++++++++++++++++------------ 1 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/dlls/msvcp90/ios.c b/dlls/msvcp90/ios.c index 47d3d5c..eef506a 100644 --- a/dlls/msvcp90/ios.c +++ b/dlls/msvcp90/ios.c @@ -977,8 +977,8 @@ basic_streambuf_char* __thiscall MSVCP_basic_streambuf_char_vector_dtor(basic_st DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gnavail, 4) streamsize __thiscall basic_streambuf_char__Gnavail(const basic_streambuf_char *this) { - FIXME("(%p) stub\n", this); - return 0; + TRACE("(%p)\n", this); + return *this->prpos ? *this->prsize : 0; }
/* ?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */ @@ -986,8 +986,10 @@ streamsize __thiscall basic_streambuf_char__Gnavail(const basic_streambuf_char * DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gndec, 4) char* __thiscall basic_streambuf_char__Gndec(basic_streambuf_char *this) { - FIXME("(%p) stub\n", this); - return NULL; + TRACE("(%p)\n", this); + (*this->prsize)++; + (*this->prpos)--; + return *this->prpos; }
/* ?_Gninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */ @@ -995,8 +997,9 @@ char* __thiscall basic_streambuf_char__Gndec(basic_streambuf_char *this) DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gninc, 4) char* __thiscall basic_streambuf_char__Gninc(basic_streambuf_char *this) { - FIXME("(%p) stub\n", this); - return NULL; + TRACE("(%p)\n", this); + (*this->prsize)--; + return (*this->prpos)++; }
/* ?_Gnpreinc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */ @@ -1004,8 +1007,10 @@ char* __thiscall basic_streambuf_char__Gninc(basic_streambuf_char *this) DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Gnpreinc, 4) char* __thiscall basic_streambuf_char__Gnpreinc(basic_streambuf_char *this) { - FIXME("(%p) stub\n", this); - return NULL; + TRACE("(%p)\n", this); + (*this->prsize)--; + (*this->prpos)++; + return *this->prpos; }
/* ?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEXPAPAD0PAH001@Z */ @@ -1054,8 +1059,8 @@ void __thiscall basic_streambuf_char__Lock(basic_streambuf_char *this) DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Pnavail, 4) streamsize __thiscall basic_streambuf_char__Pnavail(const basic_streambuf_char *this) { - FIXME("(%p) stub\n", this); - return 0; + TRACE("(%p)\n", this); + return *this->pwpos ? *this->pwsize : 0; }
/* ?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IAEPADXZ */ @@ -1063,8 +1068,9 @@ streamsize __thiscall basic_streambuf_char__Pnavail(const basic_streambuf_char * DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Pninc, 4) char* __thiscall basic_streambuf_char__Pninc(basic_streambuf_char *this) { - FIXME("(%p) stub\n", this); - return NULL; + TRACE("(%p)\n", this); + (*this->pwsize)--; + return (*this->pwpos)++; }
/* ?_Sgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPADIH@Z */