[4/4] msvcirt: Implement filebuf::setbuf
Piotr Caban
piotr.caban at gmail.com
Thu Aug 6 04:20:01 CDT 2015
On 08/05/15 20:32, Iván Matellanes wrote:
> @@ -1000,8 +1000,14 @@ streampos __thiscall filebuf_seekoff(filebuf *this, streamoff offset, ios_seek_d
> DEFINE_THISCALL_WRAPPER(filebuf_setbuf, 12)
> streambuf* __thiscall filebuf_setbuf(filebuf *this, char *buffer, int length)
> {
> - FIXME("(%p %p %d) stub\n", this, buffer, length);
> - return NULL;
> + streambuf *ret;
> +
> + TRACE("(%p %p %d)\n", this, buffer, length);
> +
> + streambuf_lock(&this->base);
> + ret = streambuf_setbuf(&this->base, buffer, length);
> + streambuf_unlock(&this->base);
> + return ret;
> }
It doesn't look correct if buffer was already set. Probably the function
needs to sync previous buffer or return error in this case.
Thanks,
Piotr
More information about the wine-devel
mailing list