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
6f89103b
Commit
6f89103b
authored
Jul 16, 2015
by
Iván Matellanes
Committed by
Alexandre Julliard
Jul 17, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcirt: Implement ios::flags.
parent
277da0ea
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
4 deletions
+26
-4
msvcirt.c
dlls/msvcirt/msvcirt.c
+8
-4
msvcirt.c
dlls/msvcirt/tests/msvcirt.c
+18
-0
No files found.
dlls/msvcirt/msvcirt.c
View file @
6f89103b
...
...
@@ -937,8 +937,12 @@ char __thiscall ios_fill_get(const ios *this)
DEFINE_THISCALL_WRAPPER
(
ios_flags_set
,
8
)
LONG
__thiscall
ios_flags_set
(
ios
*
this
,
LONG
flags
)
{
FIXME
(
"(%p %x) stub
\n
"
,
this
,
flags
);
return
0
;
LONG
prev
=
this
->
flags
;
TRACE
(
"(%p %x)
\n
"
,
this
,
flags
);
this
->
flags
=
flags
;
return
prev
;
}
/* ?flags@ios@@QBEJXZ */
...
...
@@ -946,8 +950,8 @@ LONG __thiscall ios_flags_set(ios *this, LONG flags)
DEFINE_THISCALL_WRAPPER
(
ios_flags_get
,
4
)
LONG
__thiscall
ios_flags_get
(
const
ios
*
this
)
{
FIXME
(
"(%p) stub
\n
"
,
this
);
return
0
;
TRACE
(
"(%p)
\n
"
,
this
);
return
this
->
flags
;
}
/* ?good@ios@@QBEHXZ */
...
...
dlls/msvcirt/tests/msvcirt.c
View file @
6f89103b
...
...
@@ -137,6 +137,8 @@ static void (*__cdecl p_ios_unlockbuf)(ios*);
static
CRITICAL_SECTION
*
p_ios_static_lock
;
static
void
(
*
__cdecl
p_ios_lockc
)(
void
);
static
void
(
*
__cdecl
p_ios_unlockc
)(
void
);
static
LONG
(
*
__thiscall
p_ios_flags_set
)(
ios
*
,
LONG
);
static
LONG
(
*
__thiscall
p_ios_flags_get
)(
const
ios
*
);
/* Emulate a __thiscall */
#ifdef __i386__
...
...
@@ -245,6 +247,8 @@ static BOOL init(void)
SET
(
p_ios_unlock
,
"?unlock@ios@@QEAAXXZ"
);
SET
(
p_ios_lockbuf
,
"?lockbuf@ios@@QEAAXXZ"
);
SET
(
p_ios_unlockbuf
,
"?unlockbuf@ios@@QEAAXXZ"
);
SET
(
p_ios_flags_set
,
"?flags@ios@@QEAAJJ@Z"
);
SET
(
p_ios_flags_get
,
"?flags@ios@@QEBAJXZ"
);
}
else
{
p_operator_new
=
(
void
*
)
GetProcAddress
(
msvcrt
,
"??2@YAPAXI@Z"
);
...
...
@@ -283,6 +287,8 @@ static BOOL init(void)
SET
(
p_ios_unlock
,
"?unlock@ios@@QAAXXZ"
);
SET
(
p_ios_lockbuf
,
"?lockbuf@ios@@QAAXXZ"
);
SET
(
p_ios_unlockbuf
,
"?unlockbuf@ios@@QAAXXZ"
);
SET
(
p_ios_flags_set
,
"?flags@ios@@QAEJJ@Z"
);
SET
(
p_ios_flags_get
,
"?flags@ios@@QBEJXZ"
);
}
SET
(
p_ios_static_lock
,
"?x_lockc@ios@@0U_CRT_CRITICAL_SECTION@@A"
);
SET
(
p_ios_lockc
,
"?lockc@ios@@KAXXZ"
);
...
...
@@ -859,6 +865,7 @@ static void test_ios(void)
struct
ios_lock_arg
lock_arg
;
HANDLE
thread
;
BOOL
locked
;
LONG
ret
;
memset
(
&
ios_obj
,
0xab
,
sizeof
(
ios
));
memset
(
&
ios_obj2
,
0xab
,
sizeof
(
ios
));
...
...
@@ -984,6 +991,17 @@ static void test_ios(void)
locked
=
TryEnterCriticalSection
(
p_ios_static_lock
);
ok
(
locked
==
0
,
"the static critical section was not locked before
\n
"
);
/* flags */
ios_obj
.
flags
=
0x8000
;
ret
=
(
LONG
)
call_func1
(
p_ios_flags_get
,
&
ios_obj
);
ok
(
ret
==
0x8000
,
"expected %x got %x
\n
"
,
0x8000
,
ret
);
ret
=
(
LONG
)
call_func2
(
p_ios_flags_set
,
&
ios_obj
,
0x444
);
ok
(
ret
==
0x8000
,
"expected %x got %x
\n
"
,
0x8000
,
ret
);
ok
(
ios_obj
.
flags
==
0x444
,
"expected %x got %x
\n
"
,
0x444
,
ios_obj
.
flags
);
ret
=
(
LONG
)
call_func2
(
p_ios_flags_set
,
&
ios_obj
,
0
);
ok
(
ret
==
0x444
,
"expected %x got %x
\n
"
,
0x444
,
ret
);
ok
(
ios_obj
.
flags
==
0
,
"expected %x got %x
\n
"
,
0
,
ios_obj
.
flags
);
SetEvent
(
lock_arg
.
release
[
0
]);
SetEvent
(
lock_arg
.
release
[
1
]);
SetEvent
(
lock_arg
.
release
[
2
]);
...
...
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