Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
1f1cf8a6
Commit
1f1cf8a6
authored
Jun 09, 2015
by
Iván Matellanes
Committed by
Alexandre Julliard
Jun 11, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcirt: Add implementation of streambuf::sync.
parent
7fe0b56e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
+17
-2
msvcirt.c
dlls/msvcirt/msvcirt.c
+2
-2
msvcirt.c
dlls/msvcirt/tests/msvcirt.c
+15
-0
No files found.
dlls/msvcirt/msvcirt.c
View file @
1f1cf8a6
...
...
@@ -437,8 +437,8 @@ void __thiscall streambuf_setp(streambuf *this, char *pb, char *ep)
DEFINE_THISCALL_WRAPPER
(
streambuf_sync
,
4
)
int
__thiscall
streambuf_sync
(
streambuf
*
this
)
{
FIXME
(
"(%p): stub
\n
"
,
this
);
return
EOF
;
TRACE
(
"(%p)
\n
"
,
this
);
return
(
this
->
gptr
==
this
->
egptr
&&
this
->
pbase
==
this
->
pptr
)
?
0
:
EOF
;
}
/* ?unbuffered@streambuf@@IAEXH@Z */
...
...
dlls/msvcirt/tests/msvcirt.c
View file @
1f1cf8a6
...
...
@@ -61,6 +61,7 @@ static void (*__thiscall p_streambuf_pbump)(streambuf*, int);
static
void
(
*
__thiscall
p_streambuf_setb
)(
streambuf
*
,
char
*
,
char
*
,
int
);
static
void
(
*
__thiscall
p_streambuf_setlock
)(
streambuf
*
);
static
streambuf
*
(
*
__thiscall
p_streambuf_setbuf
)(
streambuf
*
,
char
*
,
int
);
static
int
(
*
__thiscall
p_streambuf_sync
)(
streambuf
*
);
static
void
(
*
__thiscall
p_streambuf_unlock
)(
streambuf
*
);
/* Emulate a __thiscall */
...
...
@@ -144,6 +145,7 @@ static BOOL init(void)
SET
(
p_streambuf_setb
,
"?setb@streambuf@@IEAAXPEAD0H@Z"
);
SET
(
p_streambuf_setbuf
,
"?setbuf@streambuf@@UEAAPEAV1@PEADH@Z"
);
SET
(
p_streambuf_setlock
,
"?setlock@streambuf@@QEAAXXZ"
);
SET
(
p_streambuf_sync
,
"?sync@streambuf@@UEAAHXZ"
);
SET
(
p_streambuf_unlock
,
"?unlock@streambuf@@QEAAXXZ"
);
}
else
{
SET
(
p_streambuf_reserve_ctor
,
"??0streambuf@@IAE@PADH@Z"
);
...
...
@@ -158,6 +160,7 @@ static BOOL init(void)
SET
(
p_streambuf_setb
,
"?setb@streambuf@@IAEXPAD0H@Z"
);
SET
(
p_streambuf_setbuf
,
"?setbuf@streambuf@@UAEPAV1@PADH@Z"
);
SET
(
p_streambuf_setlock
,
"?setlock@streambuf@@QAEXXZ"
);
SET
(
p_streambuf_sync
,
"?sync@streambuf@@UAEHXZ"
);
SET
(
p_streambuf_unlock
,
"?unlock@streambuf@@QAEXXZ"
);
}
...
...
@@ -341,6 +344,18 @@ static void test_streambuf(void)
call_func2
(
p_streambuf_pbump
,
&
sb
,
20
);
ok
(
sb
.
pptr
==
sb
.
pbase
+
18
,
"advance put pointer failed, expected %p got %p
\n
"
,
sb
.
pbase
+
18
,
sb
.
pptr
);
/* sync */
ret
=
(
int
)
call_func1
(
p_streambuf_sync
,
&
sb
);
ok
(
ret
==
EOF
,
"sync failed, expected EOF got %d
\n
"
,
ret
);
sb
.
gptr
=
sb
.
egptr
;
ret
=
(
int
)
call_func1
(
p_streambuf_sync
,
&
sb
);
ok
(
ret
==
EOF
,
"sync failed, expected EOF got %d
\n
"
,
ret
);
sb
.
pptr
=
sb
.
pbase
;
ret
=
(
int
)
call_func1
(
p_streambuf_sync
,
&
sb
);
ok
(
ret
==
0
,
"sync failed, expected 0 got %d
\n
"
,
ret
);
ret
=
(
int
)
call_func1
(
p_streambuf_sync
,
&
sb2
);
ok
(
ret
==
0
,
"sync failed, expected 0 got %d
\n
"
,
ret
);
SetEvent
(
lock_arg
.
test
[
3
]);
WaitForSingleObject
(
thread
,
INFINITE
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment