[2/3] msvcirt: Add implementation of streambuf::sputbackc

Iván Matellanes matellanesivan at gmail.com
Mon Jun 29 03:01:53 CDT 2015


---
 dlls/msvcirt/msvcirt.c      | 10 ++++++++++
 dlls/msvcirt/msvcirt.spec   |  4 ++--
 dlls/msvcrt20/msvcrt20.spec |  4 ++--
 dlls/msvcrt40/msvcrt40.spec |  4 ++--
 4 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/dlls/msvcirt/msvcirt.c b/dlls/msvcirt/msvcirt.c
index 70e92e7..a56fd61 100644
--- a/dlls/msvcirt/msvcirt.c
+++ b/dlls/msvcirt/msvcirt.c
@@ -365,6 +365,7 @@ int __thiscall streambuf_overflow(streambuf *this, int c)
 /* ?pbackfail at streambuf@@UAEHH at Z */
 /* ?pbackfail at streambuf@@UEAAHH at Z */
 DEFINE_THISCALL_WRAPPER(streambuf_pbackfail, 8)
+#define call_streambuf_pbackfail(this, c) CALL_VTBL_FUNC(this, 36, int, (streambuf*, int), (this, c))
 int __thiscall streambuf_pbackfail(streambuf *this, int c)
 {
     TRACE("(%p %d)\n", this, c);
@@ -657,6 +658,15 @@ void __thiscall streambuf_stossc(streambuf *this)
     }
 }
 
+/* ?sputbackc at streambuf@@QAEHD at Z */
+/* ?sputbackc at streambuf@@QEAAHD at Z */
+DEFINE_THISCALL_WRAPPER(streambuf_sputbackc, 8)
+int __thiscall streambuf_sputbackc(streambuf *this, char ch)
+{
+    TRACE("(%p %d)\n", this, ch);
+    return call_streambuf_pbackfail(this, ch);
+}
+
 /******************************************************************
  *		 ??1ios@@UAE at XZ (MSVCRTI.@)
  *        class ios & __thiscall ios::-ios<<(void)
diff --git a/dlls/msvcirt/msvcirt.spec b/dlls/msvcirt/msvcirt.spec
index 913f186..f14821e 100644
--- a/dlls/msvcirt/msvcirt.spec
+++ b/dlls/msvcirt/msvcirt.spec
@@ -702,8 +702,8 @@
 # @ extern ?sh_write at filebuf@@2HB  # static int const filebuf::sh_write
 @ thiscall -arch=win32 ?snextc at streambuf@@QAEHXZ(ptr) streambuf_snextc
 @ cdecl -arch=win64 ?snextc at streambuf@@QEAAHXZ(ptr) streambuf_snextc
-@ stub -arch=win32 ?sputbackc at streambuf@@QAEHD at Z  # int __thiscall streambuf::sputbackc(char)
-@ stub -arch=win64 ?sputbackc at streambuf@@QEAAHD at Z
+@ thiscall -arch=win32 ?sputbackc at streambuf@@QAEHD at Z(ptr long) streambuf_sputbackc
+@ cdecl -arch=win64 ?sputbackc at streambuf@@QEAAHD at Z(ptr long) streambuf_sputbackc
 @ thiscall -arch=win32 ?sputc at streambuf@@QAEHH at Z(ptr long) streambuf_sputc
 @ cdecl -arch=win64 ?sputc at streambuf@@QEAAHH at Z(ptr long) streambuf_sputc
 @ thiscall -arch=win32 ?sputn at streambuf@@QAEHPBDH at Z(ptr str long) streambuf_sputn
diff --git a/dlls/msvcrt20/msvcrt20.spec b/dlls/msvcrt20/msvcrt20.spec
index f37d876..c7dd035 100644
--- a/dlls/msvcrt20/msvcrt20.spec
+++ b/dlls/msvcrt20/msvcrt20.spec
@@ -690,8 +690,8 @@
 # @ extern ?sh_write at filebuf@@2HB
 @ thiscall -arch=win32 ?snextc at streambuf@@QAEHXZ(ptr) msvcirt.?snextc at streambuf@@QAEHXZ
 @ cdecl -arch=win64 ?snextc at streambuf@@QEAAHXZ(ptr) msvcirt.?snextc at streambuf@@QEAAHXZ
-@ stub -arch=win32 ?sputbackc at streambuf@@QAEHD at Z
-@ stub -arch=win64 ?sputbackc at streambuf@@QEAAHD at Z
+@ thiscall -arch=win32 ?sputbackc at streambuf@@QAEHD at Z(ptr long) msvcirt.?sputbackc at streambuf@@QAEHD at Z
+@ cdecl -arch=win64 ?sputbackc at streambuf@@QEAAHD at Z(ptr long) msvcirt.?sputbackc at streambuf@@QEAAHD at Z
 @ thiscall -arch=win32 ?sputc at streambuf@@QAEHH at Z(ptr long) msvcirt.?sputc at streambuf@@QAEHH at Z
 @ cdecl -arch=win64 ?sputc at streambuf@@QEAAHH at Z(ptr long) msvcirt.?sputc at streambuf@@QEAAHH at Z
 @ thiscall -arch=win32 ?sputn at streambuf@@QAEHPBDH at Z(ptr str long) msvcirt.?sputn at streambuf@@QAEHPBDH at Z
diff --git a/dlls/msvcrt40/msvcrt40.spec b/dlls/msvcrt40/msvcrt40.spec
index 9173aef..bda6e2c 100644
--- a/dlls/msvcrt40/msvcrt40.spec
+++ b/dlls/msvcrt40/msvcrt40.spec
@@ -762,8 +762,8 @@
 # @ extern ?sh_write at filebuf@@2HB
 @ thiscall -arch=win32 ?snextc at streambuf@@QAEHXZ(ptr) msvcirt.?snextc at streambuf@@QAEHXZ
 @ cdecl -arch=win64 ?snextc at streambuf@@QEAAHXZ(ptr) msvcirt.?snextc at streambuf@@QEAAHXZ
-@ stub -arch=win32 ?sputbackc at streambuf@@QAEHD at Z
-@ stub -arch=win64 ?sputbackc at streambuf@@QEAAHD at Z
+@ thiscall -arch=win32 ?sputbackc at streambuf@@QAEHD at Z(ptr long) msvcirt.?sputbackc at streambuf@@QAEHD at Z
+@ cdecl -arch=win64 ?sputbackc at streambuf@@QEAAHD at Z(ptr long) msvcirt.?sputbackc at streambuf@@QEAAHD at Z
 @ thiscall -arch=win32 ?sputc at streambuf@@QAEHH at Z(ptr long) msvcirt.?sputc at streambuf@@QAEHH at Z
 @ cdecl -arch=win64 ?sputc at streambuf@@QEAAHH at Z(ptr long) msvcirt.?sputc at streambuf@@QEAAHH at Z
 @ thiscall -arch=win32 ?sputn at streambuf@@QAEHPBDH at Z(ptr str long) msvcirt.?sputn at streambuf@@QAEHPBDH at Z
-- 
2.1.4




More information about the wine-patches mailing list