[1/2] msvcirt: Add initial implementation of streambuf (try 3)

Iván Matellanes matellanesivan at gmail.com
Wed Jun 3 06:50:47 CDT 2015


Try 3: use typedefs to LONG instead of long
Supersedes 111676-111677

---
 dlls/msvcirt/msvcirt.c      | 268 ++++++++++++++++++++++++++++++++++++++++++++
 dlls/msvcirt/msvcirt.h      |   3 +
 dlls/msvcirt/msvcirt.spec   |  70 ++++++------
 dlls/msvcrt20/msvcrt20.spec |  70 ++++++------
 dlls/msvcrt40/msvcrt40.spec |  70 ++++++------
 5 files changed, 376 insertions(+), 105 deletions(-)

diff --git a/dlls/msvcirt/msvcirt.c b/dlls/msvcirt/msvcirt.c
index e73f93e..c04e94b 100644
--- a/dlls/msvcirt/msvcirt.c
+++ b/dlls/msvcirt/msvcirt.c
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2007 Alexandre Julliard
+ * Copyright (C) 2015 Iván Matellanes
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -19,6 +20,7 @@
 #include "config.h"
 
 #include <stdarg.h>
+#include <stdio.h>
 
 #include "msvcirt.h"
 #include "windef.h"
@@ -27,6 +29,28 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(msvcirt);
 
+/* class streambuf */
+typedef struct {
+    const vtable_ptr *vtable;
+    int allocated;
+    int unbuffered;
+    int unknown;
+    char *base;
+    char *ebuf;
+    char *pbase;
+    char *pptr;
+    char *epptr;
+    char *eback;
+    char *gptr;
+    char *egptr;
+    int unknown2;
+    CRITICAL_SECTION lock;
+} streambuf;
+
+streambuf* __thiscall streambuf_setbuf(streambuf*, char*, int);
+void __thiscall streambuf_setg(streambuf*, char*, char*, char*);
+void __thiscall streambuf_setp(streambuf*, char*, char*);
+
 typedef struct {
     LPVOID VTable;
 } class_ios;
@@ -39,6 +63,250 @@ typedef struct {
     LPVOID VTable;
 } class_strstreambuf;
 
+/* ??_7streambuf@@6B@ */
+extern const vtable_ptr MSVCP_streambuf_vtable;
+
+#ifndef __GNUC__
+void __asm_dummy_vtables(void) {
+#endif
+    __ASM_VTABLE(streambuf,
+            VTABLE_ADD_FUNC(streambuf_vector_dtor)
+            VTABLE_ADD_FUNC(streambuf_sync)
+            VTABLE_ADD_FUNC(streambuf_setbuf)
+            VTABLE_ADD_FUNC(streambuf_seekoff)
+            VTABLE_ADD_FUNC(streambuf_seekpos)
+            VTABLE_ADD_FUNC(streambuf_xsputn)
+            VTABLE_ADD_FUNC(streambuf_xsgetn)
+            VTABLE_ADD_FUNC(streambuf_overflow)
+            VTABLE_ADD_FUNC(streambuf_underflow)
+            VTABLE_ADD_FUNC(streambuf_pbackfail)
+            VTABLE_ADD_FUNC(streambuf_doallocate));
+#ifndef __GNUC__
+}
+#endif
+
+DEFINE_RTTI_DATA0(streambuf, 0, ".?AVstreambuf@@")
+
+/* ??0streambuf@@IAE at PADH@Z */
+/* ??0streambuf@@IEAA at PEADH@Z */
+DEFINE_THISCALL_WRAPPER(streambuf_reserve_ctor, 12)
+streambuf* __thiscall streambuf_reserve_ctor(streambuf *this, char *buffer, int length)
+{
+    TRACE("(%p %p %d)\n", this, buffer, length);
+    this->vtable = &MSVCP_streambuf_vtable;
+    this->allocated = 0;
+    this->unknown = -1;
+    this->unknown2 = -1;
+    this->base = NULL;
+    streambuf_setbuf(this, buffer, length);
+    streambuf_setg(this, NULL, NULL, NULL);
+    streambuf_setp(this, NULL, NULL);
+    InitializeCriticalSection(&this->lock);
+    return this;
+}
+
+/* ??0streambuf@@IAE at XZ */
+/* ??0streambuf@@IEAA at XZ */
+DEFINE_THISCALL_WRAPPER(streambuf_ctor, 4)
+streambuf* __thiscall streambuf_ctor(streambuf *this)
+{
+    streambuf_reserve_ctor(this, NULL, 0);
+    this->unbuffered = 0;
+    return this;
+}
+
+/* ??0streambuf@@QAE at ABV0@@Z */
+/* ??0streambuf@@QEAA at AEBV0@@Z */
+DEFINE_THISCALL_WRAPPER(streambuf_copy_ctor, 8)
+streambuf* __thiscall streambuf_copy_ctor(streambuf *this, const streambuf *copy)
+{
+    TRACE("(%p %p)\n", this, copy);
+    *this = *copy;
+    this->vtable = &MSVCP_streambuf_vtable;
+    return this;
+}
+
+/* ??1streambuf@@UAE at XZ */
+/* ??1streambuf@@UEAA at XZ */
+DEFINE_THISCALL_WRAPPER(streambuf_dtor, 4)
+void __thiscall streambuf_dtor(streambuf *this)
+{
+    TRACE("(%p)\n", this);
+    if (this->allocated)
+        MSVCRT_operator_delete(this->base);
+    DeleteCriticalSection(&this->lock);
+}
+
+/* ??4streambuf@@QAEAAV0 at ABV0@@Z */
+/* ??4streambuf@@QEAAAEAV0 at AEBV0@@Z */
+DEFINE_THISCALL_WRAPPER(streambuf_assign, 8)
+streambuf* __thiscall streambuf_assign(streambuf *this, const streambuf *rhs)
+{
+    streambuf_dtor(this);
+    return streambuf_copy_ctor(this, rhs);
+}
+
+/* ??_Estreambuf@@UAEPAXI at Z */
+DEFINE_THISCALL_WRAPPER(streambuf_vector_dtor, 8)
+streambuf* __thiscall streambuf_vector_dtor(streambuf *this, unsigned int flags)
+{
+    TRACE("(%p %x)\n", this, flags);
+    if (flags & 2) {
+        /* we have an array, with the number of elements stored before the first object */
+        INT_PTR i, *ptr = (INT_PTR *)this-1;
+
+        for (i = *ptr-1; i >= 0; i--)
+            streambuf_dtor(this+i);
+        MSVCRT_operator_delete(ptr);
+    } else {
+        streambuf_dtor(this);
+        if (flags & 1)
+            MSVCRT_operator_delete(this);
+    }
+    return this;
+}
+
+/* ??_Gstreambuf@@UAEPAXI at Z */
+DEFINE_THISCALL_WRAPPER(streambuf_scalar_dtor, 8)
+streambuf* __thiscall streambuf_scalar_dtor(streambuf *this, unsigned int flags)
+{
+    TRACE("(%p %x)\n", this, flags);
+    streambuf_dtor(this);
+    if (flags & 1) MSVCRT_operator_delete(this);
+    return this;
+}
+
+/* ?doallocate at streambuf@@MAEHXZ */
+/* ?doallocate at streambuf@@MEAAHXZ */
+DEFINE_THISCALL_WRAPPER(streambuf_doallocate, 4)
+int __thiscall streambuf_doallocate(streambuf *this)
+{
+    FIXME("(%p): stub\n", this);
+    return EOF;
+}
+
+/* Unexported */
+DEFINE_THISCALL_WRAPPER(streambuf_overflow, 8)
+int __thiscall streambuf_overflow(streambuf *this, int c)
+{
+    return EOF;
+}
+
+/* ?pbackfail at streambuf@@UAEHH at Z */
+/* ?pbackfail at streambuf@@UEAAHH at Z */
+DEFINE_THISCALL_WRAPPER(streambuf_pbackfail, 8)
+int __thiscall streambuf_pbackfail(streambuf *this, int c)
+{
+    FIXME("(%p %d): stub\n", this, c);
+    return 0;
+}
+
+/* ?seekoff at streambuf@@UAEJJW4seek_dir at ios@@H at Z */
+/* ?seekoff at streambuf@@UEAAJJW4seek_dir at ios@@H at Z */
+DEFINE_THISCALL_WRAPPER(streambuf_seekoff, 16)
+streampos __thiscall streambuf_seekoff(streambuf *this, streamoff offset, int dir, int mode)
+{
+    FIXME("(%p %d %d %d): stub\n", this, offset, dir, mode);
+    return EOF;
+}
+
+/* ?seekpos at streambuf@@UAEJJH at Z */
+/* ?seekpos at streambuf@@UEAAJJH at Z */
+DEFINE_THISCALL_WRAPPER(streambuf_seekpos, 12)
+streampos __thiscall streambuf_seekpos(streambuf *this, streampos pos, int mode)
+{
+    FIXME("(%p %d %d): stub\n", this, pos, mode);
+    return EOF;
+}
+
+/* ?setb at streambuf@@IAEXPAD0H at Z */
+/* ?setb at streambuf@@IEAAXPEAD0H at Z */
+DEFINE_THISCALL_WRAPPER(streambuf_setb, 16)
+void __thiscall streambuf_setb(streambuf *this, char *ba, char *eb, int delete)
+{
+    TRACE("(%p %p %p %d)\n", this, ba, eb, delete);
+    if (this->allocated)
+        MSVCRT_operator_delete(this->base);
+    this->allocated = delete;
+    this->base = ba;
+    this->ebuf = eb;
+}
+
+/* ?setbuf at streambuf@@UAEPAV1 at PADH@Z */
+/* ?setbuf at streambuf@@UEAAPEAV1 at PEADH@Z */
+DEFINE_THISCALL_WRAPPER(streambuf_setbuf, 12)
+streambuf* __thiscall streambuf_setbuf(streambuf *this, char *buffer, int length)
+{
+    TRACE("(%p %p %d)\n", this, buffer, length);
+    if (this->base != NULL)
+        return NULL;
+
+    if (buffer == NULL || !length) {
+        this->unbuffered = 1;
+        this->base = this->ebuf = NULL;
+    } else {
+        this->unbuffered = 0;
+        this->base = buffer;
+        this->ebuf = buffer + length;
+    }
+    return this;
+}
+
+/* ?setg at streambuf@@IAEXPAD00 at Z */
+/* ?setg at streambuf@@IEAAXPEAD00 at Z */
+DEFINE_THISCALL_WRAPPER(streambuf_setg, 16)
+void __thiscall streambuf_setg(streambuf *this, char *ek, char *gp, char *eg)
+{
+    TRACE("(%p %p %p %p)\n", this, ek, gp, eg);
+    this->eback = ek;
+    this->gptr = gp;
+    this->egptr = eg;
+}
+
+/* ?setp at streambuf@@IAEXPAD0 at Z */
+/* ?setp at streambuf@@IEAAXPEAD0 at Z */
+DEFINE_THISCALL_WRAPPER(streambuf_setp, 12)
+void __thiscall streambuf_setp(streambuf *this, char *pb, char *ep)
+{
+    TRACE("(%p %p %p)\n", this, pb, ep);
+    this->pbase = this->pptr = pb;
+    this->epptr = ep;
+}
+
+/* ?sync at streambuf@@UAEHXZ */
+/* ?sync at streambuf@@UEAAHXZ */
+DEFINE_THISCALL_WRAPPER(streambuf_sync, 4)
+int __thiscall streambuf_sync(streambuf *this)
+{
+    FIXME("(%p): stub\n", this);
+    return EOF;
+}
+
+/* Unexported */
+DEFINE_THISCALL_WRAPPER(streambuf_underflow, 4)
+int __thiscall streambuf_underflow(streambuf *this)
+{
+    return EOF;
+}
+
+/* ?xsgetn at streambuf@@UAEHPADH at Z */
+/* ?xsgetn at streambuf@@UEAAHPEADH at Z */
+DEFINE_THISCALL_WRAPPER(streambuf_xsgetn, 12)
+int __thiscall streambuf_xsgetn(streambuf *this, char *buffer, int count)
+{
+    FIXME("(%p %p %d): stub\n", this, buffer, count);
+    return 0;
+}
+
+/* ?xsputn at streambuf@@UAEHPBDH at Z */
+/* ?xsputn at streambuf@@UEAAHPEBDH at Z */
+DEFINE_THISCALL_WRAPPER(streambuf_xsputn, 12)
+int __thiscall streambuf_xsputn(streambuf *this, const char *data, int length)
+{
+    FIXME("(%p %p %d): stub\n", this, data, length);
+    return 0;
+}
+
 /******************************************************************
  *		 ??1ios@@UAE at XZ (MSVCRTI.@)
  *        class ios & __thiscall ios::-ios<<(void)
diff --git a/dlls/msvcirt/msvcirt.h b/dlls/msvcirt/msvcirt.h
index 4301528..bdcd7d8 100644
--- a/dlls/msvcirt/msvcirt.h
+++ b/dlls/msvcirt/msvcirt.h
@@ -20,6 +20,9 @@
 #include "windef.h"
 #include "cxx.h"
 
+typedef LONG streamoff;
+typedef LONG streampos;
+
 extern void (__cdecl *MSVCRT_operator_delete)(void*);
 
 void init_exception(void*);
diff --git a/dlls/msvcirt/msvcirt.spec b/dlls/msvcirt/msvcirt.spec
index 3399b5d..dfb2734 100644
--- a/dlls/msvcirt/msvcirt.spec
+++ b/dlls/msvcirt/msvcirt.spec
@@ -106,12 +106,12 @@
 @ stub -arch=win64 ??0stdiostream@@QEAA at AEBV0@@Z
 @ stub -arch=win32 ??0stdiostream@@QAE at PAU_iobuf@@@Z  # __thiscall stdiostream::stdiostream(struct _iobuf *)
 @ stub -arch=win64 ??0stdiostream@@QEAA at PEAU_iobuf@@@Z
-@ stub -arch=win32 ??0streambuf@@IAE at PADH@Z  # __thiscall streambuf::streambuf(char *,int)
-@ stub -arch=win64 ??0streambuf@@IEAA at PEADH@Z
-@ stub -arch=win32 ??0streambuf@@IAE at XZ  # __thiscall streambuf::streambuf(void)
-@ stub -arch=win64 ??0streambuf@@IEAA at XZ
-@ stub -arch=win32 ??0streambuf@@QAE at ABV0@@Z  # __thiscall streambuf::streambuf(class streambuf const &)
-@ stub -arch=win64 ??0streambuf@@QEAA at AEBV0@@Z
+@ thiscall -arch=win32 ??0streambuf@@IAE at PADH@Z(ptr ptr long) streambuf_reserve_ctor
+@ cdecl -arch=win64 ??0streambuf@@IEAA at PEADH@Z(ptr ptr long) streambuf_reserve_ctor
+@ thiscall -arch=win32 ??0streambuf@@IAE at XZ(ptr) streambuf_ctor
+@ cdecl -arch=win64 ??0streambuf@@IEAA at XZ(ptr) streambuf_ctor
+@ thiscall -arch=win32 ??0streambuf@@QAE at ABV0@@Z(ptr ptr) streambuf_copy_ctor
+@ cdecl -arch=win64 ??0streambuf@@QEAA at AEBV0@@Z(ptr ptr) streambuf_copy_ctor
 @ stub -arch=win32 ??0strstream@@QAE at ABV0@@Z  # __thiscall strstream::strstream(class strstream const &)
 @ stub -arch=win64 ??0strstream@@QEAA at AEBV0@@Z
 @ stub -arch=win32 ??0strstream@@QAE at PADHH@Z  # __thiscall strstream::strstream(char *,int,int)
@@ -164,8 +164,8 @@
 @ stub -arch=win64 ??1stdiobuf@@UEAA at XZ
 @ stub -arch=win32 ??1stdiostream@@UAE at XZ  # virtual __thiscall stdiostream::~stdiostream(void)
 @ stub -arch=win64 ??1stdiostream@@UEAA at XZ
-@ stub -arch=win32 ??1streambuf@@UAE at XZ  # virtual __thiscall streambuf::~streambuf(void)
-@ stub -arch=win64 ??1streambuf@@UEAA at XZ
+@ thiscall -arch=win32 ??1streambuf@@UAE at XZ(ptr) streambuf_dtor
+@ cdecl -arch=win64 ??1streambuf@@UEAA at XZ(ptr) streambuf_dtor
 @ stub -arch=win32 ??1strstream@@UAE at XZ  # virtual __thiscall strstream::~strstream(void)
 @ stub -arch=win64 ??1strstream@@UEAA at XZ
 @ stub -arch=win32 ??1strstreambuf@@UAE at XZ  # virtual __thiscall strstreambuf::~strstreambuf(void)
@@ -218,8 +218,8 @@
 @ stub -arch=win64 ??4stdiobuf@@QEAAAEAV0 at AEBV0@@Z
 @ stub -arch=win32 ??4stdiostream@@QAEAAV0 at AAV0@@Z  # class stdiostream & __thiscall stdiostream::operator=(class stdiostream &)
 @ stub -arch=win64 ??4stdiostream@@QEAAAEAV0 at AEAV0@@Z
-@ stub -arch=win32 ??4streambuf@@QAEAAV0 at ABV0@@Z  # class streambuf & __thiscall streambuf::operator=(class streambuf const &)
-@ stub -arch=win64 ??4streambuf@@QEAAAEAV0 at AEBV0@@Z
+@ thiscall -arch=win32 ??4streambuf@@QAEAAV0 at ABV0@@Z(ptr ptr) streambuf_assign
+@ cdecl -arch=win64 ??4streambuf@@QEAAAEAV0 at AEBV0@@Z(ptr ptr) streambuf_assign
 @ stub -arch=win32 ??4strstream@@QAEAAV0 at AAV0@@Z  # class strstream & __thiscall strstream::operator=(class strstream &)
 @ stub -arch=win64 ??4strstream@@QEAAAEAV0 at AEAV0@@Z
 @ stub -arch=win32 ??4strstreambuf@@QAEAAV0 at ABV0@@Z  # class strstreambuf & __thiscall strstreambuf::operator=(class strstreambuf const &)
@@ -318,7 +318,7 @@
 # @ extern ??_7ostrstream@@6B@  # const ostrstream::`vftable'
 # @ extern ??_7stdiobuf@@6B@  # const stdiobuf::`vftable'
 # @ extern ??_7stdiostream@@6B@  # const stdiostream::`vftable'
-# @ extern ??_7streambuf@@6B@  # const streambuf::`vftable'
+@ extern ??_7streambuf@@6B@ MSVCP_streambuf_vtable
 # @ extern ??_7strstream@@6B@  # const strstream::`vftable'
 # @ extern ??_7strstreambuf@@6B@  # const strstreambuf::`vftable'
 # @ extern ??_8fstream@@7Bistream@@@  # const fstream::`vbtable'{for `istream'}
@@ -377,7 +377,7 @@
 @ stub -arch=win32 ??_Eostrstream@@UAEPAXI at Z  # virtual void * __thiscall ostrstream::`vector deleting destructor'(unsigned int)
 @ stub -arch=win32 ??_Estdiobuf@@UAEPAXI at Z  # virtual void * __thiscall stdiobuf::`vector deleting destructor'(unsigned int)
 @ stub -arch=win32 ??_Estdiostream@@UAEPAXI at Z  # virtual void * __thiscall stdiostream::`vector deleting destructor'(unsigned int)
-@ stub -arch=win32 ??_Estreambuf@@UAEPAXI at Z  # virtual void * __thiscall streambuf::`vector deleting destructor'(unsigned int)
+@ thiscall -arch=win32 ??_Estreambuf@@UAEPAXI at Z(ptr long) streambuf_vector_dtor
 @ stub -arch=win32 ??_Estrstream@@UAEPAXI at Z  # virtual void * __thiscall strstream::`vector deleting destructor'(unsigned int)
 @ stub -arch=win32 ??_Estrstreambuf@@UAEPAXI at Z  # virtual void * __thiscall strstreambuf::`vector deleting destructor'(unsigned int)
 @ thiscall -arch=win32 ??_Gexception@@UAEPAXI at Z(ptr long) MSVCP_exception_scalar_dtor
@@ -396,7 +396,7 @@
 @ stub -arch=win32 ??_Gostrstream@@UAEPAXI at Z  # virtual void * __thiscall ostrstream::`scalar deleting destructor'(unsigned int)
 @ stub -arch=win32 ??_Gstdiobuf@@UAEPAXI at Z  # virtual void * __thiscall stdiobuf::`scalar deleting destructor'(unsigned int)
 @ stub -arch=win32 ??_Gstdiostream@@UAEPAXI at Z  # virtual void * __thiscall stdiostream::`scalar deleting destructor'(unsigned int)
-@ stub -arch=win32 ??_Gstreambuf@@UAEPAXI at Z  # virtual void * __thiscall streambuf::`scalar deleting destructor'(unsigned int)
+@ thiscall -arch=win32 ??_Gstreambuf@@UAEPAXI at Z(ptr long) streambuf_scalar_dtor
 @ stub -arch=win32 ??_Gstrstream@@UAEPAXI at Z  # virtual void * __thiscall strstream::`scalar deleting destructor'(unsigned int)
 @ stub -arch=win32 ??_Gstrstreambuf@@UAEPAXI at Z  # virtual void * __thiscall strstreambuf::`scalar deleting destructor'(unsigned int)
 # @ extern ?adjustfield at ios@@2JB  # static long const ios::adjustfield
@@ -445,8 +445,8 @@
 @ stub -arch=win64 ?delbuf at ios@@QEAAXH at Z
 @ stub -arch=win32 ?delbuf at ios@@QBEHXZ  # int __thiscall ios::delbuf(void)const 
 @ stub -arch=win64 ?delbuf at ios@@QEBAHXZ
-@ stub -arch=win32 ?doallocate at streambuf@@MAEHXZ  # virtual int __thiscall streambuf::doallocate(void)
-@ stub -arch=win64 ?doallocate at streambuf@@MEAAHXZ
+@ thiscall -arch=win32 ?doallocate at streambuf@@MAEHXZ(ptr) streambuf_doallocate
+@ cdecl -arch=win64 ?doallocate at streambuf@@MEAAHXZ(ptr) streambuf_doallocate
 @ stub -arch=win32 ?doallocate at strstreambuf@@MAEHXZ  # virtual int __thiscall strstreambuf::doallocate(void)
 @ stub -arch=win64 ?doallocate at strstreambuf@@MEAAHXZ
 @ stub -arch=win32 ?eatwhite at istream@@QAEXXZ  # void __thiscall istream::eatwhite(void)
@@ -585,8 +585,8 @@
 @ stub -arch=win64 ?overflow at strstreambuf@@UEAAHH at Z
 @ stub -arch=win32 ?pbackfail at stdiobuf@@UAEHH at Z  # virtual int __thiscall stdiobuf::pbackfail(int)
 @ stub -arch=win64 ?pbackfail at stdiobuf@@UEAAHH at Z
-@ stub -arch=win32 ?pbackfail at streambuf@@UAEHH at Z  # virtual int __thiscall streambuf::pbackfail(int)
-@ stub -arch=win64 ?pbackfail at streambuf@@UEAAHH at Z
+@ thiscall -arch=win32 ?pbackfail at streambuf@@UAEHH at Z(ptr long) streambuf_pbackfail
+@ cdecl -arch=win64 ?pbackfail at streambuf@@UEAAHH at Z(ptr long) streambuf_pbackfail
 @ stub -arch=win32 ?pbase at streambuf@@IBEPADXZ  # char * __thiscall streambuf::pbase(void)const 
 @ stub -arch=win64 ?pbase at streambuf@@IEBAPEADXZ
 @ stub -arch=win32 ?pbump at streambuf@@IAEXH at Z  # void __thiscall streambuf::pbump(int)
@@ -647,18 +647,18 @@
 @ stub -arch=win64 ?seekoff at filebuf@@UEAAJJW4seek_dir at ios@@H at Z
 @ stub -arch=win32 ?seekoff at stdiobuf@@UAEJJW4seek_dir at ios@@H at Z  # virtual long __thiscall stdiobuf::seekoff(long,enum ios::seek_dir,int)
 @ stub -arch=win64 ?seekoff at stdiobuf@@UEAAJJW4seek_dir at ios@@H at Z
-@ stub -arch=win32 ?seekoff at streambuf@@UAEJJW4seek_dir at ios@@H at Z  # virtual long __thiscall streambuf::seekoff(long,enum ios::seek_dir,int)
-@ stub -arch=win64 ?seekoff at streambuf@@UEAAJJW4seek_dir at ios@@H at Z
+@ thiscall -arch=win32 ?seekoff at streambuf@@UAEJJW4seek_dir at ios@@H at Z(ptr long long long) streambuf_seekoff
+@ cdecl -arch=win64 ?seekoff at streambuf@@UEAAJJW4seek_dir at ios@@H at Z(ptr long long long) streambuf_seekoff
 @ stub -arch=win32 ?seekoff at strstreambuf@@UAEJJW4seek_dir at ios@@H at Z  # virtual long __thiscall strstreambuf::seekoff(long,enum ios::seek_dir,int)
 @ stub -arch=win64 ?seekoff at strstreambuf@@UEAAJJW4seek_dir at ios@@H at Z
 @ stub -arch=win32 ?seekp at ostream@@QAEAAV1 at J@Z  # class ostream & __thiscall ostream::seekp(long)
 @ stub -arch=win64 ?seekp at ostream@@QEAAAEAV1 at J@Z
 @ stub -arch=win32 ?seekp at ostream@@QAEAAV1 at JW4seek_dir@ios@@@Z  # class ostream & __thiscall ostream::seekp(long,enum ios::seek_dir)
 @ stub -arch=win64 ?seekp at ostream@@QEAAAEAV1 at JW4seek_dir@ios@@@Z
-@ stub -arch=win32 ?seekpos at streambuf@@UAEJJH at Z  # virtual long __thiscall streambuf::seekpos(long,int)
-@ stub -arch=win64 ?seekpos at streambuf@@UEAAJJH at Z
-@ stub -arch=win32 ?setb at streambuf@@IAEXPAD0H at Z  # void __thiscall streambuf::setb(char *,char *,int)
-@ stub -arch=win64 ?setb at streambuf@@IEAAXPEAD0H at Z
+@ thiscall -arch=win32 ?seekpos at streambuf@@UAEJJH at Z(ptr long long) streambuf_seekpos
+@ cdecl -arch=win64 ?seekpos at streambuf@@UEAAJJH at Z(ptr long long) streambuf_seekpos
+@ thiscall -arch=win32 ?setb at streambuf@@IAEXPAD0H at Z(ptr ptr ptr long) streambuf_setb
+@ cdecl -arch=win64 ?setb at streambuf@@IEAAXPEAD0H at Z(ptr ptr ptr long) streambuf_setb
 @ stub -arch=win32 ?setbuf at filebuf@@UAEPAVstreambuf@@PADH at Z  # virtual class streambuf * __thiscall filebuf::setbuf(char *,int)
 @ stub -arch=win64 ?setbuf at filebuf@@UEAAPEAVstreambuf@@PEADH at Z
 @ stub -arch=win32 ?setbuf at fstream@@QAEPAVstreambuf@@PADH at Z  # class streambuf * __thiscall fstream::setbuf(char *,int)
@@ -667,16 +667,16 @@
 @ stub -arch=win64 ?setbuf at ifstream@@QEAAPEAVstreambuf@@PEADH at Z
 @ stub -arch=win32 ?setbuf at ofstream@@QAEPAVstreambuf@@PADH at Z  # class streambuf * __thiscall ofstream::setbuf(char *,int)
 @ stub -arch=win64 ?setbuf at ofstream@@QEAAPEAVstreambuf@@PEADH at Z
-@ stub -arch=win32 ?setbuf at streambuf@@UAEPAV1 at PADH@Z  # virtual class streambuf * __thiscall streambuf::setbuf(char *,int)
-@ stub -arch=win64 ?setbuf at streambuf@@UEAAPEAV1 at PEADH@Z
+@ thiscall -arch=win32 ?setbuf at streambuf@@UAEPAV1 at PADH@Z(ptr ptr long) streambuf_setbuf
+@ cdecl -arch=win64 ?setbuf at streambuf@@UEAAPEAV1 at PEADH@Z(ptr ptr long) streambuf_setbuf
 @ stub -arch=win32 ?setbuf at strstreambuf@@UAEPAVstreambuf@@PADH at Z  # virtual class streambuf * __thiscall strstreambuf::setbuf(char *,int)
 @ stub -arch=win64 ?setbuf at strstreambuf@@UEAAPEAVstreambuf@@PEADH at Z
 @ stub -arch=win32 ?setf at ios@@QAEJJ at Z  # long __thiscall ios::setf(long)
 @ stub -arch=win64 ?setf at ios@@QEAAJJ at Z
 @ stub -arch=win32 ?setf at ios@@QAEJJJ at Z  # long __thiscall ios::setf(long,long)
 @ stub -arch=win64 ?setf at ios@@QEAAJJJ at Z
-@ stub -arch=win32 ?setg at streambuf@@IAEXPAD00 at Z  # void __thiscall streambuf::setg(char *,char *,char *)
-@ stub -arch=win64 ?setg at streambuf@@IEAAXPEAD00 at Z
+@ thiscall -arch=win32 ?setg at streambuf@@IAEXPAD00 at Z(ptr ptr ptr ptr) streambuf_setg
+@ cdecl -arch=win64 ?setg at streambuf@@IEAAXPEAD00 at Z(ptr ptr ptr ptr) streambuf_setg
 @ stub -arch=win32 ?setlock at ios@@QAAXXZ  # void __cdecl ios::setlock(void)
 @ stub -arch=win64 ?setlock at ios@@QEAAXXZ
 @ stub -arch=win32 ?setlock at streambuf@@QAEXXZ  # void __thiscall streambuf::setlock(void)
@@ -689,8 +689,8 @@
 @ stub -arch=win64 ?setmode at ifstream@@QEAAHH at Z
 @ stub -arch=win32 ?setmode at ofstream@@QAEHH at Z  # int __thiscall ofstream::setmode(int)
 @ stub -arch=win64 ?setmode at ofstream@@QEAAHH at Z
-@ stub -arch=win32 ?setp at streambuf@@IAEXPAD0 at Z  # void __thiscall streambuf::setp(char *,char *)
-@ stub -arch=win64 ?setp at streambuf@@IEAAXPEAD0 at Z
+@ thiscall -arch=win32 ?setp at streambuf@@IAEXPAD0 at Z(ptr ptr ptr) streambuf_setp
+@ cdecl -arch=win64 ?setp at streambuf@@IEAAXPEAD0 at Z(ptr ptr ptr) streambuf_setp
 @ stub -arch=win32 ?setrwbuf at stdiobuf@@QAEHHH at Z  # int __thiscall stdiobuf::setrwbuf(int,int)
 @ stub -arch=win64 ?setrwbuf at stdiobuf@@QEAAHHH at Z
 @ stub -arch=win32 ?sgetc at streambuf@@QAEHXZ  # int __thiscall streambuf::sgetc(void)
@@ -727,8 +727,8 @@
 @ stub -arch=win64 ?sync at istream@@QEAAHXZ
 @ stub -arch=win32 ?sync at stdiobuf@@UAEHXZ  # virtual int __thiscall stdiobuf::sync(void)
 @ stub -arch=win64 ?sync at stdiobuf@@UEAAHXZ
-@ stub -arch=win32 ?sync at streambuf@@UAEHXZ  # virtual int __thiscall streambuf::sync(void)
-@ stub -arch=win64 ?sync at streambuf@@UEAAHXZ
+@ thiscall -arch=win32 ?sync at streambuf@@UAEHXZ(ptr) streambuf_sync
+@ cdecl -arch=win64 ?sync at streambuf@@UEAAHXZ(ptr) streambuf_sync
 @ stub -arch=win32 ?sync at strstreambuf@@UAEHXZ  # virtual int __thiscall strstreambuf::sync(void)
 @ stub -arch=win64 ?sync at strstreambuf@@UEAAHXZ
 @ stub ?sync_with_stdio at ios@@SAXXZ  # static void __cdecl ios::sync_with_stdio(void)
@@ -781,10 +781,10 @@
 # @ extern ?x_maxbit at ios@@0JA  # static long ios::x_maxbit
 # @ extern ?x_statebuf at ios@@0PAJA  # static long * ios::x_statebuf
 @ stub ?xalloc at ios@@SAHXZ  # static int __cdecl ios::xalloc(void)
-@ stub -arch=win32 ?xsgetn at streambuf@@UAEHPADH at Z  # virtual int __thiscall streambuf::xsgetn(char *,int)
-@ stub -arch=win64 ?xsgetn at streambuf@@UEAAHPEADH at Z
-@ stub -arch=win32 ?xsputn at streambuf@@UAEHPBDH at Z  # virtual int __thiscall streambuf::xsputn(char const *,int)
-@ stub -arch=win64 ?xsputn at streambuf@@UEAAHPEBDH at Z
+@ thiscall -arch=win32 ?xsgetn at streambuf@@UAEHPADH at Z(ptr ptr long) streambuf_xsgetn
+@ cdecl -arch=win64 ?xsgetn at streambuf@@UEAAHPEADH at Z(ptr ptr long) streambuf_xsgetn
+@ thiscall -arch=win32 ?xsputn at streambuf@@UAEHPBDH at Z(ptr ptr long) streambuf_xsputn
+@ cdecl -arch=win64 ?xsputn at streambuf@@UEAAHPEBDH at Z(ptr ptr long) streambuf_xsputn
 @ stub __dummy_export
 @ stub _mtlock
 @ stub _mtunlock
diff --git a/dlls/msvcrt20/msvcrt20.spec b/dlls/msvcrt20/msvcrt20.spec
index b166ada..3cefd74 100644
--- a/dlls/msvcrt20/msvcrt20.spec
+++ b/dlls/msvcrt20/msvcrt20.spec
@@ -96,12 +96,12 @@
 @ stub -arch=win64 ??0stdiostream@@QEAA at AEBV0@@Z
 @ stub -arch=win32 ??0stdiostream@@QAE at PAU_iobuf@@@Z
 @ stub -arch=win64 ??0stdiostream@@QEAA at PEAU_iobuf@@@Z
-@ stub -arch=win32 ??0streambuf@@IAE at PADH@Z
-@ stub -arch=win64 ??0streambuf@@IEAA at PEADH@Z
-@ stub -arch=win32 ??0streambuf@@IAE at XZ
-@ stub -arch=win64 ??0streambuf@@IEAA at XZ
-@ stub -arch=win32 ??0streambuf@@QAE at ABV0@@Z
-@ stub -arch=win64 ??0streambuf@@QEAA at AEBV0@@Z
+@ thiscall -arch=win32 ??0streambuf@@IAE at PADH@Z(ptr ptr long) msvcirt.??0streambuf@@IAE at PADH@Z
+@ cdecl -arch=win64 ??0streambuf@@IEAA at PEADH@Z(ptr ptr long) msvcirt.??0streambuf@@IEAA at PEADH@Z
+@ thiscall -arch=win32 ??0streambuf@@IAE at XZ(ptr) msvcirt.??0streambuf@@IAE at XZ
+@ cdecl -arch=win64 ??0streambuf@@IEAA at XZ(ptr) msvcirt.??0streambuf@@IEAA at XZ
+@ thiscall -arch=win32 ??0streambuf@@QAE at ABV0@@Z(ptr ptr) msvcirt.??0streambuf@@QAE at ABV0@@Z
+@ cdecl -arch=win64 ??0streambuf@@QEAA at AEBV0@@Z(ptr ptr) msvcirt.??0streambuf@@QEAA at AEBV0@@Z
 @ stub -arch=win32 ??0strstream@@QAE at ABV0@@Z
 @ stub -arch=win64 ??0strstream@@QEAA at AEBV0@@Z
 @ stub -arch=win32 ??0strstream@@QAE at PADHH@Z
@@ -148,8 +148,8 @@
 @ stub -arch=win64 ??1stdiobuf@@UEAA at XZ
 @ stub -arch=win32 ??1stdiostream@@UAE at XZ
 @ stub -arch=win64 ??1stdiostream@@UEAA at XZ
-@ stub -arch=win32 ??1streambuf@@UAE at XZ
-@ stub -arch=win64 ??1streambuf@@UEAA at XZ
+@ thiscall -arch=win32 ??1streambuf@@UAE at XZ(ptr) msvcirt.??1streambuf@@UAE at XZ
+@ cdecl -arch=win64 ??1streambuf@@UEAA at XZ(ptr) msvcirt.??1streambuf@@UEAA at XZ
 @ stub -arch=win32 ??1strstream@@UAE at XZ
 @ stub -arch=win64 ??1strstream@@UEAA at XZ
 @ stub -arch=win32 ??1strstreambuf@@UAE at XZ
@@ -202,8 +202,8 @@
 @ stub -arch=win64 ??4stdiobuf@@QEAAAEAV0 at AEBV0@@Z
 @ stub -arch=win32 ??4stdiostream@@QAEAAV0 at AAV0@@Z
 @ stub -arch=win64 ??4stdiostream@@QEAAAEAV0 at AEAV0@@Z
-@ stub -arch=win32 ??4streambuf@@QAEAAV0 at ABV0@@Z
-@ stub -arch=win64 ??4streambuf@@QEAAAEAV0 at AEBV0@@Z
+@ thiscall -arch=win32 ??4streambuf@@QAEAAV0 at ABV0@@Z(ptr ptr) msvcirt.??4streambuf@@QAEAAV0 at ABV0@@Z
+@ cdecl -arch=win64 ??4streambuf@@QEAAAEAV0 at AEBV0@@Z(ptr ptr) msvcirt.??4streambuf@@QEAAAEAV0 at AEBV0@@Z
 @ stub -arch=win32 ??4strstream@@QAEAAV0 at AAV0@@Z
 @ stub -arch=win64 ??4strstream@@QEAAAEAV0 at AEAV0@@Z
 @ stub -arch=win32 ??4strstreambuf@@QAEAAV0 at ABV0@@Z
@@ -300,7 +300,7 @@
 # @ extern ??_7ostrstream@@6B@
 # @ extern ??_7stdiobuf@@6B@
 # @ extern ??_7stdiostream@@6B@
-# @ extern ??_7streambuf@@6B@
+@ extern ??_7streambuf@@6B@ msvcirt.??_7streambuf@@6B@
 # @ extern ??_7strstream@@6B@
 # @ extern ??_7strstreambuf@@6B@
 # @ extern ??_8fstream@@7Bistream@@@
@@ -358,7 +358,7 @@
 @ stub -arch=win32 ??_Eostrstream@@UAEPAXI at Z
 @ stub -arch=win32 ??_Estdiobuf@@UAEPAXI at Z
 @ stub -arch=win32 ??_Estdiostream@@UAEPAXI at Z
-@ stub -arch=win32 ??_Estreambuf@@UAEPAXI at Z
+@ thiscall -arch=win32 ??_Estreambuf@@UAEPAXI at Z(ptr long) msvcirt.??_Estreambuf@@UAEPAXI at Z
 @ stub -arch=win32 ??_Estrstream@@UAEPAXI at Z
 @ stub -arch=win32 ??_Estrstreambuf@@UAEPAXI at Z
 @ stub -arch=win32 ??_GIostream_init@@QAEPAXI at Z
@@ -376,7 +376,7 @@
 @ stub -arch=win32 ??_Gostrstream@@UAEPAXI at Z
 @ stub -arch=win32 ??_Gstdiobuf@@UAEPAXI at Z
 @ stub -arch=win32 ??_Gstdiostream@@UAEPAXI at Z
-@ stub -arch=win32 ??_Gstreambuf@@UAEPAXI at Z
+@ thiscall -arch=win32 ??_Gstreambuf@@UAEPAXI at Z(ptr long) msvcirt.??_Gstreambuf@@UAEPAXI at Z
 @ stub -arch=win32 ??_Gstrstream@@UAEPAXI at Z
 @ stub -arch=win32 ??_Gstrstreambuf@@UAEPAXI at Z
 @ cdecl -arch=win32 ?_query_new_handler@@YAP6AHI at ZXZ() msvcrt.?_query_new_handler@@YAP6AHI at ZXZ
@@ -433,8 +433,8 @@
 @ stub -arch=win64 ?delbuf at ios@@QEAAXH at Z
 @ stub -arch=win32 ?delbuf at ios@@QBEHXZ
 @ stub -arch=win64 ?delbuf at ios@@QEBAHXZ
-@ stub -arch=win32 ?doallocate at streambuf@@MAEHXZ
-@ stub -arch=win64 ?doallocate at streambuf@@MEAAHXZ
+@ thiscall -arch=win32 ?doallocate at streambuf@@MAEHXZ(ptr) msvcirt.?doallocate at streambuf@@MAEHXZ
+@ cdecl -arch=win64 ?doallocate at streambuf@@MEAAHXZ(ptr) msvcirt.?doallocate at streambuf@@MEAAHXZ
 @ stub -arch=win32 ?doallocate at strstreambuf@@MAEHXZ
 @ stub -arch=win64 ?doallocate at strstreambuf@@MEAAHXZ
 @ stub -arch=win32 ?eatwhite at istream@@QAEXXZ
@@ -571,8 +571,8 @@
 @ stub -arch=win64 ?overflow at strstreambuf@@UEAAHH at Z
 @ stub -arch=win32 ?pbackfail at stdiobuf@@UAEHH at Z
 @ stub -arch=win64 ?pbackfail at stdiobuf@@UEAAHH at Z
-@ stub -arch=win32 ?pbackfail at streambuf@@UAEHH at Z
-@ stub -arch=win64 ?pbackfail at streambuf@@UEAAHH at Z
+@ thiscall -arch=win32 ?pbackfail at streambuf@@UAEHH at Z(ptr long) msvcirt.?pbackfail at streambuf@@UAEHH at Z
+@ cdecl -arch=win64 ?pbackfail at streambuf@@UEAAHH at Z(ptr long) msvcirt.?pbackfail at streambuf@@UEAAHH at Z
 @ stub -arch=win32 ?pbase at streambuf@@IBEPADXZ
 @ stub -arch=win64 ?pbase at streambuf@@IEBAPEADXZ
 @ stub -arch=win32 ?pbump at streambuf@@IAEXH at Z
@@ -633,20 +633,20 @@
 @ stub -arch=win64 ?seekoff at filebuf@@UEAAJJW4seek_dir at ios@@H at Z
 @ stub -arch=win32 ?seekoff at stdiobuf@@UAEJJW4seek_dir at ios@@H at Z
 @ stub -arch=win64 ?seekoff at stdiobuf@@UEAAJJW4seek_dir at ios@@H at Z
-@ stub -arch=win32 ?seekoff at streambuf@@UAEJJW4seek_dir at ios@@H at Z
-@ stub -arch=win64 ?seekoff at streambuf@@UEAAJJW4seek_dir at ios@@H at Z
+@ thiscall -arch=win32 ?seekoff at streambuf@@UAEJJW4seek_dir at ios@@H at Z(ptr long long long) msvcirt.?seekoff at streambuf@@UAEJJW4seek_dir at ios@@H at Z
+@ cdecl -arch=win64 ?seekoff at streambuf@@UEAAJJW4seek_dir at ios@@H at Z(ptr long long long) msvcirt.?seekoff at streambuf@@UEAAJJW4seek_dir at ios@@H at Z
 @ stub -arch=win32 ?seekoff at strstreambuf@@UAEJJW4seek_dir at ios@@H at Z
 @ stub -arch=win64 ?seekoff at strstreambuf@@UEAAJJW4seek_dir at ios@@H at Z
 @ stub -arch=win32 ?seekp at ostream@@QAEAAV1 at J@Z
 @ stub -arch=win64 ?seekp at ostream@@QEAAAEAV1 at J@Z
 @ stub -arch=win32 ?seekp at ostream@@QAEAAV1 at JW4seek_dir@ios@@@Z
 @ stub -arch=win64 ?seekp at ostream@@QEAAAEAV1 at JW4seek_dir@ios@@@Z
-@ stub -arch=win32 ?seekpos at streambuf@@UAEJJH at Z
-@ stub -arch=win64 ?seekpos at streambuf@@UEAAJJH at Z
+@ thiscall -arch=win32 ?seekpos at streambuf@@UAEJJH at Z(ptr long long) msvcirt.?seekpos at streambuf@@UAEJJH at Z
+@ cdecl -arch=win64 ?seekpos at streambuf@@UEAAJJH at Z(ptr long long) msvcirt.?seekpos at streambuf@@UEAAJJH at Z
 @ cdecl ?set_terminate@@YAP6AXXZP6AXXZ at Z(ptr) msvcrt.?set_terminate@@YAP6AXXZP6AXXZ at Z
 @ cdecl ?set_unexpected@@YAP6AXXZP6AXXZ at Z(ptr) msvcrt.?set_unexpected@@YAP6AXXZP6AXXZ at Z
-@ stub -arch=win32 ?setb at streambuf@@IAEXPAD0H at Z
-@ stub -arch=win64 ?setb at streambuf@@IEAAXPEAD0H at Z
+@ thiscall -arch=win32 ?setb at streambuf@@IAEXPAD0H at Z(ptr ptr ptr long) msvcirt.?setb at streambuf@@IAEXPAD0H at Z
+@ cdecl -arch=win64 ?setb at streambuf@@IEAAXPEAD0H at Z(ptr ptr ptr long) msvcirt.?setb at streambuf@@IEAAXPEAD0H at Z
 @ stub -arch=win32 ?setbuf at filebuf@@UAEPAVstreambuf@@PADH at Z
 @ stub -arch=win64 ?setbuf at filebuf@@UEAAPEAVstreambuf@@PEADH at Z
 @ stub -arch=win32 ?setbuf at fstream@@QAEPAVstreambuf@@PADH at Z
@@ -655,16 +655,16 @@
 @ stub -arch=win64 ?setbuf at ifstream@@QEAAPEAVstreambuf@@PEADH at Z
 @ stub -arch=win32 ?setbuf at ofstream@@QAEPAVstreambuf@@PADH at Z
 @ stub -arch=win64 ?setbuf at ofstream@@QEAAPEAVstreambuf@@PEADH at Z
-@ stub -arch=win32 ?setbuf at streambuf@@UAEPAV1 at PADH@Z
-@ stub -arch=win64 ?setbuf at streambuf@@UEAAPEAV1 at PEADH@Z
+@ thiscall -arch=win32 ?setbuf at streambuf@@UAEPAV1 at PADH@Z(ptr ptr long) msvcirt.?setbuf at streambuf@@UAEPAV1 at PADH@Z
+@ cdecl -arch=win64 ?setbuf at streambuf@@UEAAPEAV1 at PEADH@Z(ptr ptr long) msvcirt.?setbuf at streambuf@@UEAAPEAV1 at PEADH@Z
 @ stub -arch=win32 ?setbuf at strstreambuf@@UAEPAVstreambuf@@PADH at Z
 @ stub -arch=win64 ?setbuf at strstreambuf@@UEAAPEAVstreambuf@@PEADH at Z
 @ stub -arch=win32 ?setf at ios@@QAEJJ at Z
 @ stub -arch=win64 ?setf at ios@@QEAAJJ at Z
 @ stub -arch=win32 ?setf at ios@@QAEJJJ at Z
 @ stub -arch=win64 ?setf at ios@@QEAAJJJ at Z
-@ stub -arch=win32 ?setg at streambuf@@IAEXPAD00 at Z
-@ stub -arch=win64 ?setg at streambuf@@IEAAXPEAD00 at Z
+@ thiscall -arch=win32 ?setg at streambuf@@IAEXPAD00 at Z(ptr ptr ptr ptr) msvcirt.?setg at streambuf@@IAEXPAD00 at Z
+@ cdecl -arch=win64 ?setg at streambuf@@IEAAXPEAD00 at Z(ptr ptr ptr ptr) msvcirt.?setg at streambuf@@IEAAXPEAD00 at Z
 @ stub -arch=win32 ?setlock at ios@@QAAXXZ
 @ stub -arch=win64 ?setlock at ios@@QEAAXXZ
 @ stub -arch=win32 ?setlock at streambuf@@QAEXXZ
@@ -677,8 +677,8 @@
 @ stub -arch=win64 ?setmode at ifstream@@QEAAHH at Z
 @ stub -arch=win32 ?setmode at ofstream@@QAEHH at Z
 @ stub -arch=win64 ?setmode at ofstream@@QEAAHH at Z
-@ stub -arch=win32 ?setp at streambuf@@IAEXPAD0 at Z
-@ stub -arch=win64 ?setp at streambuf@@IEAAXPEAD0 at Z
+@ thiscall -arch=win32 ?setp at streambuf@@IAEXPAD0 at Z(ptr ptr ptr) msvcirt.?setp at streambuf@@IAEXPAD0 at Z
+@ cdecl -arch=win64 ?setp at streambuf@@IEAAXPEAD0 at Z(ptr ptr ptr) msvcirt.?setp at streambuf@@IEAAXPEAD0 at Z
 @ stub -arch=win32 ?setrwbuf at stdiobuf@@QAEHHH at Z
 @ stub -arch=win64 ?setrwbuf at stdiobuf@@QEAAHHH at Z
 @ stub -arch=win32 ?sgetc at streambuf@@QAEHXZ
@@ -715,8 +715,8 @@
 @ stub -arch=win64 ?sync at istream@@QEAAHXZ
 @ stub -arch=win32 ?sync at stdiobuf@@UAEHXZ
 @ stub -arch=win64 ?sync at stdiobuf@@UEAAHXZ
-@ stub -arch=win32 ?sync at streambuf@@UAEHXZ
-@ stub -arch=win64 ?sync at streambuf@@UEAAHXZ
+@ thiscall -arch=win32 ?sync at streambuf@@UAEHXZ(ptr) msvcirt.?sync at streambuf@@UAEHXZ
+@ cdecl -arch=win64 ?sync at streambuf@@UEAAHXZ(ptr) msvcirt.?sync at streambuf@@UEAAHXZ
 @ stub -arch=win32 ?sync at strstreambuf@@UAEHXZ
 @ stub -arch=win64 ?sync at strstreambuf@@UEAAHXZ
 @ stub ?sync_with_stdio at ios@@SAXXZ
@@ -769,10 +769,10 @@
 # @ extern ?x_maxbit at ios@@0JA
 # @ extern ?x_statebuf at ios@@0QAJA
 @ stub ?xalloc at ios@@SAHXZ
-@ stub -arch=win32 ?xsgetn at streambuf@@UAEHPADH at Z
-@ stub -arch=win64 ?xsgetn at streambuf@@UEAAHPEADH at Z
-@ stub -arch=win32 ?xsputn at streambuf@@UAEHPBDH at Z
-@ stub -arch=win64 ?xsputn at streambuf@@UEAAHPEBDH at Z
+@ thiscall -arch=win32 ?xsgetn at streambuf@@UAEHPADH at Z(ptr ptr long) msvcirt.?xsgetn at streambuf@@UAEHPADH at Z
+@ cdecl -arch=win64 ?xsgetn at streambuf@@UEAAHPEADH at Z(ptr ptr long) msvcirt.?xsgetn at streambuf@@UEAAHPEADH at Z
+@ thiscall -arch=win32 ?xsputn at streambuf@@UAEHPBDH at Z(ptr ptr long) msvcirt.?xsputn at streambuf@@UAEHPBDH at Z
+@ cdecl -arch=win64 ?xsputn at streambuf@@UEAAHPEBDH at Z(ptr ptr long) msvcirt.?xsputn at streambuf@@UEAAHPEBDH at Z
 @ cdecl -norelay $I10_OUTPUT(double long long long ptr) msvcrt.$I10_OUTPUT
 @ cdecl -arch=i386 _CIacos() msvcrt._CIacos
 @ cdecl -arch=i386 _CIasin() msvcrt._CIasin
diff --git a/dlls/msvcrt40/msvcrt40.spec b/dlls/msvcrt40/msvcrt40.spec
index 3b6b0d7..705521a 100644
--- a/dlls/msvcrt40/msvcrt40.spec
+++ b/dlls/msvcrt40/msvcrt40.spec
@@ -118,12 +118,12 @@
 @ stub -arch=win64 ??0stdiostream@@QEAA at AEBV0@@Z
 @ stub -arch=win32 ??0stdiostream@@QAE at PAU_iobuf@@@Z
 @ stub -arch=win64 ??0stdiostream@@QEAA at PEAU_iobuf@@@Z
-@ stub -arch=win32 ??0streambuf@@IAE at PADH@Z
-@ stub -arch=win64 ??0streambuf@@IEAA at PEADH@Z
-@ stub -arch=win32 ??0streambuf@@IAE at XZ
-@ stub -arch=win64 ??0streambuf@@IEAA at XZ
-@ stub -arch=win32 ??0streambuf@@QAE at ABV0@@Z
-@ stub -arch=win64 ??0streambuf@@QEAA at AEBV0@@Z
+@ thiscall -arch=win32 ??0streambuf@@IAE at PADH@Z(ptr ptr long) msvcirt.??0streambuf@@IAE at PADH@Z
+@ cdecl -arch=win64 ??0streambuf@@IEAA at PEADH@Z(ptr ptr long) msvcirt.??0streambuf@@IEAA at PEADH@Z
+@ thiscall -arch=win32 ??0streambuf@@IAE at XZ(ptr) msvcirt.??0streambuf@@IAE at XZ
+@ cdecl -arch=win64 ??0streambuf@@IEAA at XZ(ptr) msvcirt.??0streambuf@@IEAA at XZ
+@ thiscall -arch=win32 ??0streambuf@@QAE at ABV0@@Z(ptr ptr) msvcirt.??0streambuf@@QAE at ABV0@@Z
+@ cdecl -arch=win64 ??0streambuf@@QEAA at AEBV0@@Z(ptr ptr) msvcirt.??0streambuf@@QEAA at AEBV0@@Z
 @ stub -arch=win32 ??0strstream@@QAE at ABV0@@Z
 @ stub -arch=win64 ??0strstream@@QEAA at AEBV0@@Z
 @ stub -arch=win32 ??0strstream@@QAE at PADHH@Z
@@ -180,8 +180,8 @@
 @ stub -arch=win64 ??1stdiobuf@@UEAA at XZ
 @ stub -arch=win32 ??1stdiostream@@UAE at XZ
 @ stub -arch=win64 ??1stdiostream@@UEAA at XZ
-@ stub -arch=win32 ??1streambuf@@UAE at XZ
-@ stub -arch=win64 ??1streambuf@@UEAA at XZ
+@ thiscall -arch=win32 ??1streambuf@@UAE at XZ(ptr) msvcirt.??1streambuf@@UAE at XZ
+@ cdecl -arch=win64 ??1streambuf@@UEAA at XZ(ptr) msvcirt.??1streambuf@@UEAA at XZ
 @ stub -arch=win32 ??1strstream@@UAE at XZ
 @ stub -arch=win64 ??1strstream@@UEAA at XZ
 @ stub -arch=win32 ??1strstreambuf@@UAE at XZ
@@ -246,8 +246,8 @@
 @ stub -arch=win64 ??4stdiobuf@@QEAAAEAV0 at AEBV0@@Z
 @ stub -arch=win32 ??4stdiostream@@QAEAAV0 at AAV0@@Z
 @ stub -arch=win64 ??4stdiostream@@QEAAAEAV0 at AEAV0@@Z
-@ stub -arch=win32 ??4streambuf@@QAEAAV0 at ABV0@@Z
-@ stub -arch=win64 ??4streambuf@@QEAAAEAV0 at AEBV0@@Z
+@ thiscall -arch=win32 ??4streambuf@@QAEAAV0 at ABV0@@Z(ptr ptr) msvcirt.??4streambuf@@QAEAAV0 at ABV0@@Z
+@ cdecl -arch=win64 ??4streambuf@@QEAAAEAV0 at AEBV0@@Z(ptr ptr) msvcirt.??4streambuf@@QEAAAEAV0 at AEBV0@@Z
 @ stub -arch=win32 ??4strstream@@QAEAAV0 at AAV0@@Z
 @ stub -arch=win64 ??4strstream@@QEAAAEAV0 at AEAV0@@Z
 @ stub -arch=win32 ??4strstreambuf@@QAEAAV0 at ABV0@@Z
@@ -353,7 +353,7 @@
 # @ extern ??_7ostrstream@@6B@
 # @ extern ??_7stdiobuf@@6B@
 # @ extern ??_7stdiostream@@6B@
-# @ extern ??_7streambuf@@6B@
+@ extern ??_7streambuf@@6B@ msvcirt.??_7streambuf@@6B@
 # @ extern ??_7strstream@@6B@
 # @ extern ??_7strstreambuf@@6B@
 # @ extern ??_8fstream@@7Bistream@@@
@@ -416,7 +416,7 @@
 @ stub -arch=win32 ??_Eostrstream@@UAEPAXI at Z
 @ stub -arch=win32 ??_Estdiobuf@@UAEPAXI at Z
 @ stub -arch=win32 ??_Estdiostream@@UAEPAXI at Z
-@ stub -arch=win32 ??_Estreambuf@@UAEPAXI at Z
+@ thiscall -arch=win32 ??_Estreambuf@@UAEPAXI at Z(ptr long) msvcirt.??_Estreambuf@@UAEPAXI at Z
 @ stub -arch=win32 ??_Estrstream@@UAEPAXI at Z
 @ stub -arch=win32 ??_Estrstreambuf@@UAEPAXI at Z
 @ stub -arch=win32 ??_GIostream_init@@QAEPAXI at Z
@@ -439,7 +439,7 @@
 @ stub -arch=win32 ??_Gostrstream@@UAEPAXI at Z
 @ stub -arch=win32 ??_Gstdiobuf@@UAEPAXI at Z
 @ stub -arch=win32 ??_Gstdiostream@@UAEPAXI at Z
-@ stub -arch=win32 ??_Gstreambuf@@UAEPAXI at Z
+@ thiscall -arch=win32 ??_Gstreambuf@@UAEPAXI at Z(ptr long) msvcirt.??_Gstreambuf@@UAEPAXI at Z
 @ stub -arch=win32 ??_Gstrstream@@UAEPAXI at Z
 @ stub -arch=win32 ??_Gstrstreambuf@@UAEPAXI at Z
 @ cdecl -arch=win32 ?_query_new_handler@@YAP6AHI at ZXZ() msvcrt.?_query_new_handler@@YAP6AHI at ZXZ
@@ -498,8 +498,8 @@
 @ stub -arch=win64 ?delbuf at ios@@QEAAXH at Z
 @ stub -arch=win32 ?delbuf at ios@@QBEHXZ
 @ stub -arch=win64 ?delbuf at ios@@QEBAHXZ
-@ stub -arch=win32 ?doallocate at streambuf@@MAEHXZ
-@ stub -arch=win64 ?doallocate at streambuf@@MEAAHXZ
+@ thiscall -arch=win32 ?doallocate at streambuf@@MAEHXZ(ptr) msvcirt.?doallocate at streambuf@@MAEHXZ
+@ cdecl -arch=win64 ?doallocate at streambuf@@MEAAHXZ(ptr) msvcirt.?doallocate at streambuf@@MEAAHXZ
 @ stub -arch=win32 ?doallocate at strstreambuf@@MAEHXZ
 @ stub -arch=win64 ?doallocate at strstreambuf@@MEAAHXZ
 @ stub -arch=win32 ?eatwhite at istream@@QAEXXZ
@@ -640,8 +640,8 @@
 @ stub -arch=win64 ?overflow at strstreambuf@@UEAAHH at Z
 @ stub -arch=win32 ?pbackfail at stdiobuf@@UAEHH at Z
 @ stub -arch=win64 ?pbackfail at stdiobuf@@UEAAHH at Z
-@ stub -arch=win32 ?pbackfail at streambuf@@UAEHH at Z
-@ stub -arch=win64 ?pbackfail at streambuf@@UEAAHH at Z
+@ thiscall -arch=win32 ?pbackfail at streambuf@@UAEHH at Z(ptr long) msvcirt.?pbackfail at streambuf@@UAEHH at Z
+@ cdecl -arch=win64 ?pbackfail at streambuf@@UEAAHH at Z(ptr long) msvcirt.?pbackfail at streambuf@@UEAAHH at Z
 @ stub -arch=win32 ?pbase at streambuf@@IBEPADXZ
 @ stub -arch=win64 ?pbase at streambuf@@IEBAPEADXZ
 @ stub -arch=win32 ?pbump at streambuf@@IAEXH at Z
@@ -704,21 +704,21 @@
 @ stub -arch=win64 ?seekoff at filebuf@@UEAAJJW4seek_dir at ios@@H at Z
 @ stub -arch=win32 ?seekoff at stdiobuf@@UAEJJW4seek_dir at ios@@H at Z
 @ stub -arch=win64 ?seekoff at stdiobuf@@UEAAJJW4seek_dir at ios@@H at Z
-@ stub -arch=win32 ?seekoff at streambuf@@UAEJJW4seek_dir at ios@@H at Z
-@ stub -arch=win64 ?seekoff at streambuf@@UEAAJJW4seek_dir at ios@@H at Z
+@ thiscall -arch=win32 ?seekoff at streambuf@@UAEJJW4seek_dir at ios@@H at Z(ptr long long long) msvcirt.?seekoff at streambuf@@UAEJJW4seek_dir at ios@@H at Z
+@ cdecl -arch=win64 ?seekoff at streambuf@@UEAAJJW4seek_dir at ios@@H at Z(ptr long long long) msvcirt.?seekoff at streambuf@@UEAAJJW4seek_dir at ios@@H at Z
 @ stub -arch=win32 ?seekoff at strstreambuf@@UAEJJW4seek_dir at ios@@H at Z
 @ stub -arch=win64 ?seekoff at strstreambuf@@UEAAJJW4seek_dir at ios@@H at Z
 @ stub -arch=win32 ?seekp at ostream@@QAEAAV1 at J@Z
 @ stub -arch=win64 ?seekp at ostream@@QEAAAEAV1 at J@Z
 @ stub -arch=win32 ?seekp at ostream@@QAEAAV1 at JW4seek_dir@ios@@@Z
 @ stub -arch=win64 ?seekp at ostream@@QEAAAEAV1 at JW4seek_dir@ios@@@Z
-@ stub -arch=win32 ?seekpos at streambuf@@UAEJJH at Z
-@ stub -arch=win64 ?seekpos at streambuf@@UEAAJJH at Z
+@ thiscall -arch=win32 ?seekpos at streambuf@@UAEJJH at Z(ptr long long) msvcirt.?seekpos at streambuf@@UAEJJH at Z
+@ cdecl -arch=win64 ?seekpos at streambuf@@UEAAJJH at Z(ptr long long) msvcirt.?seekpos at streambuf@@UEAAJJH at Z
 @ cdecl ?set_new_handler@@YAP6AXXZP6AXXZ at Z(ptr) msvcrt.?set_new_handler@@YAP6AXXZP6AXXZ at Z
 @ cdecl ?set_terminate@@YAP6AXXZP6AXXZ at Z(ptr) msvcrt.?set_terminate@@YAP6AXXZP6AXXZ at Z
 @ cdecl ?set_unexpected@@YAP6AXXZP6AXXZ at Z(ptr) msvcrt.?set_unexpected@@YAP6AXXZP6AXXZ at Z
-@ stub -arch=win32 ?setb at streambuf@@IAEXPAD0H at Z
-@ stub -arch=win64 ?setb at streambuf@@IEAAXPEAD0H at Z
+@ thiscall -arch=win32 ?setb at streambuf@@IAEXPAD0H at Z(ptr ptr ptr long) msvcirt.?setb at streambuf@@IAEXPAD0H at Z
+@ cdecl -arch=win64 ?setb at streambuf@@IEAAXPEAD0H at Z(ptr ptr ptr long) msvcirt.?setb at streambuf@@IEAAXPEAD0H at Z
 @ stub -arch=win32 ?setbuf at filebuf@@UAEPAVstreambuf@@PADH at Z
 @ stub -arch=win64 ?setbuf at filebuf@@UEAAPEAVstreambuf@@PEADH at Z
 @ stub -arch=win32 ?setbuf at fstream@@QAEPAVstreambuf@@PADH at Z
@@ -727,16 +727,16 @@
 @ stub -arch=win64 ?setbuf at ifstream@@QEAAPEAVstreambuf@@PEADH at Z
 @ stub -arch=win32 ?setbuf at ofstream@@QAEPAVstreambuf@@PADH at Z
 @ stub -arch=win64 ?setbuf at ofstream@@QEAAPEAVstreambuf@@PEADH at Z
-@ stub -arch=win32 ?setbuf at streambuf@@UAEPAV1 at PADH@Z
-@ stub -arch=win64 ?setbuf at streambuf@@UEAAPEAV1 at PEADH@Z
+@ thiscall -arch=win32 ?setbuf at streambuf@@UAEPAV1 at PADH@Z(ptr ptr long) msvcirt.?setbuf at streambuf@@UAEPAV1 at PADH@Z
+@ cdecl -arch=win64 ?setbuf at streambuf@@UEAAPEAV1 at PEADH@Z(ptr ptr long) msvcirt.?setbuf at streambuf@@UEAAPEAV1 at PEADH@Z
 @ stub -arch=win32 ?setbuf at strstreambuf@@UAEPAVstreambuf@@PADH at Z
 @ stub -arch=win64 ?setbuf at strstreambuf@@UEAAPEAVstreambuf@@PEADH at Z
 @ stub -arch=win32 ?setf at ios@@QAEJJ at Z
 @ stub -arch=win64 ?setf at ios@@QEAAJJ at Z
 @ stub -arch=win32 ?setf at ios@@QAEJJJ at Z
 @ stub -arch=win64 ?setf at ios@@QEAAJJJ at Z
-@ stub -arch=win32 ?setg at streambuf@@IAEXPAD00 at Z
-@ stub -arch=win64 ?setg at streambuf@@IEAAXPEAD00 at Z
+@ thiscall -arch=win32 ?setg at streambuf@@IAEXPAD00 at Z(ptr ptr ptr ptr) msvcirt.?setg at streambuf@@IAEXPAD00 at Z
+@ cdecl -arch=win64 ?setg at streambuf@@IEAAXPEAD00 at Z(ptr ptr ptr ptr) msvcirt.?setg at streambuf@@IEAAXPEAD00 at Z
 @ stub -arch=win32 ?setlock at ios@@QAAXXZ
 @ stub -arch=win64 ?setlock at ios@@QEAAXXZ
 @ stub -arch=win32 ?setlock at streambuf@@QAEXXZ
@@ -749,8 +749,8 @@
 @ stub -arch=win64 ?setmode at ifstream@@QEAAHH at Z
 @ stub -arch=win32 ?setmode at ofstream@@QAEHH at Z
 @ stub -arch=win64 ?setmode at ofstream@@QEAAHH at Z
-@ stub -arch=win32 ?setp at streambuf@@IAEXPAD0 at Z
-@ stub -arch=win64 ?setp at streambuf@@IEAAXPEAD0 at Z
+@ thiscall -arch=win32 ?setp at streambuf@@IAEXPAD0 at Z(ptr ptr ptr) msvcirt.?setp at streambuf@@IAEXPAD0 at Z
+@ cdecl -arch=win64 ?setp at streambuf@@IEAAXPEAD0 at Z(ptr ptr ptr) msvcirt.?setp at streambuf@@IEAAXPEAD0 at Z
 @ stub -arch=win32 ?setrwbuf at stdiobuf@@QAEHHH at Z
 @ stub -arch=win64 ?setrwbuf at stdiobuf@@QEAAHHH at Z
 @ stub -arch=win32 ?sgetc at streambuf@@QAEHXZ
@@ -787,8 +787,8 @@
 @ stub -arch=win64 ?sync at istream@@QEAAHXZ
 @ stub -arch=win32 ?sync at stdiobuf@@UAEHXZ
 @ stub -arch=win64 ?sync at stdiobuf@@UEAAHXZ
-@ stub -arch=win32 ?sync at streambuf@@UAEHXZ
-@ stub -arch=win64 ?sync at streambuf@@UEAAHXZ
+@ thiscall -arch=win32 ?sync at streambuf@@UAEHXZ(ptr) msvcirt.?sync at streambuf@@UAEHXZ
+@ cdecl -arch=win64 ?sync at streambuf@@UEAAHXZ(ptr) msvcirt.?sync at streambuf@@UEAAHXZ
 @ stub -arch=win32 ?sync at strstreambuf@@UAEHXZ
 @ stub -arch=win64 ?sync at strstreambuf@@UEAAHXZ
 @ stub ?sync_with_stdio at ios@@SAXXZ
@@ -843,10 +843,10 @@
 # @ extern ?x_maxbit at ios@@0JA
 # @ extern ?x_statebuf at ios@@0PAJA
 @ stub ?xalloc at ios@@SAHXZ
-@ stub -arch=win32 ?xsgetn at streambuf@@UAEHPADH at Z
-@ stub -arch=win64 ?xsgetn at streambuf@@UEAAHPEADH at Z
-@ stub -arch=win32 ?xsputn at streambuf@@UAEHPBDH at Z
-@ stub -arch=win64 ?xsputn at streambuf@@UEAAHPEBDH at Z
+@ thiscall -arch=win32 ?xsgetn at streambuf@@UAEHPADH at Z(ptr ptr long) msvcirt.?xsgetn at streambuf@@UAEHPADH at Z
+@ cdecl -arch=win64 ?xsgetn at streambuf@@UEAAHPEADH at Z(ptr ptr long) msvcirt.?xsgetn at streambuf@@UEAAHPEADH at Z
+@ thiscall -arch=win32 ?xsputn at streambuf@@UAEHPBDH at Z(ptr ptr long) msvcirt.?xsputn at streambuf@@UAEHPBDH at Z
+@ cdecl -arch=win64 ?xsputn at streambuf@@UEAAHPEBDH at Z(ptr ptr long) msvcirt.?xsputn at streambuf@@UEAAHPEBDH at Z
 @ cdecl -norelay $I10_OUTPUT(double long long long ptr) msvcrt.$I10_OUTPUT
 @ cdecl -arch=i386 _CIacos() msvcrt._CIacos
 @ cdecl -arch=i386 _CIasin() msvcrt._CIasin
-- 
2.1.4




More information about the wine-patches mailing list