Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
a8b26a96
Commit
a8b26a96
authored
Sep 17, 2015
by
Iván Matellanes
Committed by
Alexandre Julliard
Sep 18, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcirt: Implement strstreambuf::freeze.
parent
aa4e2740
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
2 deletions
+22
-2
msvcirt.c
dlls/msvcirt/msvcirt.c
+3
-1
msvcirt.c
dlls/msvcirt/tests/msvcirt.c
+19
-1
No files found.
dlls/msvcirt/msvcirt.c
View file @
a8b26a96
...
...
@@ -1289,7 +1289,9 @@ int __thiscall strstreambuf_doallocate(strstreambuf *this)
DEFINE_THISCALL_WRAPPER
(
strstreambuf_freeze
,
8
)
void
__thiscall
strstreambuf_freeze
(
strstreambuf
*
this
,
int
frozen
)
{
FIXME
(
"(%p %d) stub
\n
"
,
this
,
frozen
);
TRACE
(
"(%p %d)
\n
"
,
this
,
frozen
);
if
(
!
this
->
constant
)
this
->
dynamic
=
!
frozen
;
}
/* ?overflow@strstreambuf@@UAEHH@Z */
...
...
dlls/msvcirt/tests/msvcirt.c
View file @
a8b26a96
...
...
@@ -193,6 +193,7 @@ static strstreambuf* (*__thiscall p_strstreambuf_buffer_ctor)(strstreambuf*, cha
static
strstreambuf
*
(
*
__thiscall
p_strstreambuf_ubuffer_ctor
)(
strstreambuf
*
,
unsigned
char
*
,
int
,
unsigned
char
*
);
static
strstreambuf
*
(
*
__thiscall
p_strstreambuf_ctor
)(
strstreambuf
*
);
static
void
(
*
__thiscall
p_strstreambuf_dtor
)(
strstreambuf
*
);
static
void
(
*
__thiscall
p_strstreambuf_freeze
)(
strstreambuf
*
,
int
);
/* ios */
static
ios
*
(
*
__thiscall
p_ios_copy_ctor
)(
ios
*
,
const
ios
*
);
...
...
@@ -345,6 +346,7 @@ static BOOL init(void)
SET
(
p_strstreambuf_ubuffer_ctor
,
"??0strstreambuf@@QEAA@PEAEH0@Z"
);
SET
(
p_strstreambuf_ctor
,
"??0strstreambuf@@QEAA@XZ"
);
SET
(
p_strstreambuf_dtor
,
"??1strstreambuf@@UEAA@XZ"
);
SET
(
p_strstreambuf_freeze
,
"?freeze@strstreambuf@@QEAAXH@Z"
);
SET
(
p_ios_copy_ctor
,
"??0ios@@IEAA@AEBV0@@Z"
);
SET
(
p_ios_ctor
,
"??0ios@@IEAA@XZ"
);
...
...
@@ -417,6 +419,7 @@ static BOOL init(void)
SET
(
p_strstreambuf_ubuffer_ctor
,
"??0strstreambuf@@QAE@PAEH0@Z"
);
SET
(
p_strstreambuf_ctor
,
"??0strstreambuf@@QAE@XZ"
);
SET
(
p_strstreambuf_dtor
,
"??1strstreambuf@@UAE@XZ"
);
SET
(
p_strstreambuf_freeze
,
"?freeze@strstreambuf@@QAEXH@Z"
);
SET
(
p_ios_copy_ctor
,
"??0ios@@IAE@ABV0@@Z"
);
SET
(
p_ios_ctor
,
"??0ios@@IAE@XZ"
);
...
...
@@ -1518,7 +1521,6 @@ static void test_strstreambuf(void)
"wrong put end, expected %p + 0x7fffffff or -1, got %p
\n
"
,
buffer
,
ssb1
.
base
.
epptr
);
ok
(
ssb1
.
dynamic
==
0
,
"expected 0, got %d
\n
"
,
ssb1
.
dynamic
);
ok
(
ssb1
.
constant
==
1
,
"expected 1, got %d
\n
"
,
ssb1
.
constant
);
call_func1
(
p_strstreambuf_dtor
,
&
ssb1
);
call_func1
(
p_strstreambuf_ctor
,
&
ssb2
);
ok
(
ssb2
.
base
.
allocated
==
0
,
"wrong allocate value, expected 0 got %d
\n
"
,
ssb2
.
base
.
allocated
);
ok
(
ssb2
.
base
.
unbuffered
==
0
,
"wrong unbuffered value, expected 0 got %d
\n
"
,
ssb2
.
base
.
unbuffered
);
...
...
@@ -1527,6 +1529,22 @@ static void test_strstreambuf(void)
ok
(
ssb2
.
constant
==
0
,
"expected 0, got %d
\n
"
,
ssb2
.
constant
);
ok
(
ssb2
.
f_alloc
==
NULL
,
"expected %p, got %p
\n
"
,
NULL
,
ssb2
.
f_alloc
);
ok
(
ssb2
.
f_free
==
NULL
,
"expected %p, got %p
\n
"
,
NULL
,
ssb2
.
f_free
);
/* freeze */
call_func2
(
p_strstreambuf_freeze
,
&
ssb1
,
0
);
ok
(
ssb1
.
dynamic
==
0
,
"expected 0, got %d
\n
"
,
ssb1
.
dynamic
);
ssb1
.
constant
=
0
;
call_func2
(
p_strstreambuf_freeze
,
&
ssb1
,
0
);
ok
(
ssb1
.
dynamic
==
1
,
"expected 1, got %d
\n
"
,
ssb1
.
dynamic
);
call_func2
(
p_strstreambuf_freeze
,
&
ssb1
,
3
);
ok
(
ssb1
.
dynamic
==
0
,
"expected 0, got %d
\n
"
,
ssb1
.
dynamic
);
ssb1
.
constant
=
1
;
call_func2
(
p_strstreambuf_freeze
,
&
ssb2
,
5
);
ok
(
ssb2
.
dynamic
==
0
,
"expected 0, got %d
\n
"
,
ssb2
.
dynamic
);
call_func2
(
p_strstreambuf_freeze
,
&
ssb2
,
0
);
ok
(
ssb2
.
dynamic
==
1
,
"expected 1, got %d
\n
"
,
ssb2
.
dynamic
);
call_func1
(
p_strstreambuf_dtor
,
&
ssb1
);
call_func1
(
p_strstreambuf_dtor
,
&
ssb2
);
}
...
...
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