Commit ad7fa239 authored by Arkadiusz Hiler's avatar Arkadiusz Hiler Committed by Alexandre Julliard

msvcirt: Implement ifstream::setbuf().

parent f4bb6abe
......@@ -4276,6 +4276,24 @@ void __thiscall ifstream_open(istream *this, const char *name, ios_open_mode mod
ios_clear(base, base->state | IOSTATE_failbit);
}
/* ?setbuf@ifstream@@QAEPAVstreambuf@@PADH@Z */
/* ?setbuf@ifstream@@QEAAPEAVstreambuf@@PEADH@Z */
DEFINE_THISCALL_WRAPPER(ifstream_setbuf, 12)
streambuf* __thiscall ifstream_setbuf(istream *this, char *buffer, int length)
{
ios *base = istream_get_ios(this);
filebuf* fb = ifstream_rdbuf(this);
TRACE("(%p %p %d)\n", this, buffer, length);
if (filebuf_is_open(fb)) {
ios_clear(base, base->state | IOSTATE_failbit);
return NULL;
}
return filebuf_setbuf(fb, buffer, length);
}
/* ?setmode@ifstream@@QAEHH@Z */
/* ?setmode@ifstream@@QEAAHH@Z */
DEFINE_THISCALL_WRAPPER(ifstream_setmode, 8)
......
......@@ -663,8 +663,8 @@
@ cdecl -arch=win64 ?setbuf@filebuf@@UEAAPEAVstreambuf@@PEADH@Z(ptr ptr long) filebuf_setbuf
@ stub -arch=win32 ?setbuf@fstream@@QAEPAVstreambuf@@PADH@Z # class streambuf * __thiscall fstream::setbuf(char *,int)
@ stub -arch=win64 ?setbuf@fstream@@QEAAPEAVstreambuf@@PEADH@Z
@ stub -arch=win32 ?setbuf@ifstream@@QAEPAVstreambuf@@PADH@Z # class streambuf * __thiscall ifstream::setbuf(char *,int)
@ stub -arch=win64 ?setbuf@ifstream@@QEAAPEAVstreambuf@@PEADH@Z
@ thiscall -arch=win32 ?setbuf@ifstream@@QAEPAVstreambuf@@PADH@Z(ptr ptr long) ifstream_setbuf
@ cdecl -arch=win64 ?setbuf@ifstream@@QEAAPEAVstreambuf@@PEADH@Z(ptr ptr long) ifstream_setbuf
@ stub -arch=win32 ?setbuf@ofstream@@QAEPAVstreambuf@@PADH@Z # class streambuf * __thiscall ofstream::setbuf(char *,int)
@ stub -arch=win64 ?setbuf@ofstream@@QEAAPEAVstreambuf@@PEADH@Z
@ thiscall -arch=win32 ?setbuf@streambuf@@UAEPAV1@PADH@Z(ptr ptr long) streambuf_setbuf
......
......@@ -651,8 +651,8 @@
@ cdecl -arch=win64 ?setbuf@filebuf@@UEAAPEAVstreambuf@@PEADH@Z(ptr ptr long) msvcirt.?setbuf@filebuf@@UEAAPEAVstreambuf@@PEADH@Z
@ stub -arch=win32 ?setbuf@fstream@@QAEPAVstreambuf@@PADH@Z
@ stub -arch=win64 ?setbuf@fstream@@QEAAPEAVstreambuf@@PEADH@Z
@ stub -arch=win32 ?setbuf@ifstream@@QAEPAVstreambuf@@PADH@Z
@ stub -arch=win64 ?setbuf@ifstream@@QEAAPEAVstreambuf@@PEADH@Z
@ thiscall -arch=win32 ?setbuf@ifstream@@QAEPAVstreambuf@@PADH@Z(ptr ptr long) msvcirt.?setbuf@ifstream@@QAEPAVstreambuf@@PADH@Z
@ cdecl -arch=win64 ?setbuf@ifstream@@QEAAPEAVstreambuf@@PEADH@Z(ptr ptr long) msvcirt.?setbuf@ifstream@@QEAAPEAVstreambuf@@PEADH@Z
@ stub -arch=win32 ?setbuf@ofstream@@QAEPAVstreambuf@@PADH@Z
@ stub -arch=win64 ?setbuf@ofstream@@QEAAPEAVstreambuf@@PEADH@Z
@ thiscall -arch=win32 ?setbuf@streambuf@@UAEPAV1@PADH@Z(ptr ptr long) msvcirt.?setbuf@streambuf@@UAEPAV1@PADH@Z
......
......@@ -723,8 +723,8 @@
@ cdecl -arch=win64 ?setbuf@filebuf@@UEAAPEAVstreambuf@@PEADH@Z(ptr ptr long) msvcirt.?setbuf@filebuf@@UEAAPEAVstreambuf@@PEADH@Z
@ stub -arch=win32 ?setbuf@fstream@@QAEPAVstreambuf@@PADH@Z
@ stub -arch=win64 ?setbuf@fstream@@QEAAPEAVstreambuf@@PEADH@Z
@ stub -arch=win32 ?setbuf@ifstream@@QAEPAVstreambuf@@PADH@Z
@ stub -arch=win64 ?setbuf@ifstream@@QEAAPEAVstreambuf@@PEADH@Z
@ thiscall -arch=win32 ?setbuf@ifstream@@QAEPAVstreambuf@@PADH@Z(ptr ptr long) msvcirt.?setbuf@ifstream@@QAEPAVstreambuf@@PADH@Z
@ cdecl -arch=win64 ?setbuf@ifstream@@QEAAPEAVstreambuf@@PEADH@Z(ptr ptr long) msvcirt.?setbuf@ifstream@@QEAAPEAVstreambuf@@PEADH@Z
@ stub -arch=win32 ?setbuf@ofstream@@QAEPAVstreambuf@@PADH@Z
@ stub -arch=win64 ?setbuf@ofstream@@QEAAPEAVstreambuf@@PEADH@Z
@ thiscall -arch=win32 ?setbuf@streambuf@@UAEPAV1@PADH@Z(ptr ptr long) msvcirt.?setbuf@streambuf@@UAEPAV1@PADH@Z
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment