=?UTF-8?Q?Iv=C3=A1n=20Matellanes=20?=: msvcirt: Add implementation of streambuf::seekoff/seekpos.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Jun 11 09:46:11 CDT 2015
Module: wine
Branch: master
Commit: 6b6dc42d61ae08bb445f93e3ea00b20cf46fe827
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6b6dc42d61ae08bb445f93e3ea00b20cf46fe827
Author: Iván Matellanes <matellanesivan at gmail.com>
Date: Tue Jun 9 19:40:40 2015 +0200
msvcirt: Add implementation of streambuf::seekoff/seekpos.
---
dlls/msvcirt/msvcirt.c | 9 +++++----
dlls/msvcirt/msvcirt.h | 6 ++++++
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/dlls/msvcirt/msvcirt.c b/dlls/msvcirt/msvcirt.c
index e20fb68..7a31699 100644
--- a/dlls/msvcirt/msvcirt.c
+++ b/dlls/msvcirt/msvcirt.c
@@ -354,9 +354,10 @@ int __thiscall streambuf_pbackfail(streambuf *this, int c)
/* ?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)
+#define call_streambuf_seekoff(this, off, dir, mode) CALL_VTBL_FUNC(this, 12, streampos, (streambuf*, streamoff, ios_seek_dir, int), (this, off, dir, mode))
+streampos __thiscall streambuf_seekoff(streambuf *this, streamoff offset, ios_seek_dir dir, int mode)
{
- FIXME("(%p %d %d %d): stub\n", this, offset, dir, mode);
+ TRACE("(%p %d %d %d)\n", this, offset, dir, mode);
return EOF;
}
@@ -365,8 +366,8 @@ streampos __thiscall streambuf_seekoff(streambuf *this, streamoff offset, int di
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;
+ TRACE("(%p %d %d)\n", this, pos, mode);
+ return call_streambuf_seekoff(this, pos, SEEKDIR_beg, mode);
}
/* ?setb at streambuf@@IAEXPAD0H at Z */
diff --git a/dlls/msvcirt/msvcirt.h b/dlls/msvcirt/msvcirt.h
index 5cf15de..4751e8c 100644
--- a/dlls/msvcirt/msvcirt.h
+++ b/dlls/msvcirt/msvcirt.h
@@ -23,6 +23,12 @@
typedef LONG streamoff;
typedef LONG streampos;
+typedef enum {
+ SEEKDIR_beg = 0,
+ SEEKDIR_cur = 1,
+ SEEKDIR_end = 2
+} ios_seek_dir;
+
extern void* (__cdecl *MSVCRT_operator_new)(SIZE_T);
extern void (__cdecl *MSVCRT_operator_delete)(void*);
More information about the wine-cvs
mailing list