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
f2037e2e
Commit
f2037e2e
authored
Jul 17, 2015
by
Iván Matellanes
Committed by
Alexandre Julliard
Jul 20, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcirt: Implement ios::bitalloc.
parent
3c5328dc
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
6 deletions
+28
-6
msvcirt.c
dlls/msvcirt/msvcirt.c
+9
-2
msvcirt.spec
dlls/msvcirt/msvcirt.spec
+1
-1
msvcirt.c
dlls/msvcirt/tests/msvcirt.c
+16
-1
msvcrt20.spec
dlls/msvcrt20/msvcrt20.spec
+1
-1
msvcrt40.spec
dlls/msvcrt40/msvcrt40.spec
+1
-1
No files found.
dlls/msvcirt/msvcirt.c
View file @
f2037e2e
...
...
@@ -46,6 +46,8 @@ CRITICAL_SECTION_DEBUG ios_static_lock_debug =
0
,
0
,
{
(
DWORD_PTR
)(
__FILE__
": ios_static_lock"
)
}
};
CRITICAL_SECTION
ios_static_lock
=
{
&
ios_static_lock_debug
,
-
1
,
0
,
0
,
0
,
0
};
/* ?x_maxbit@ios@@0JA */
LONG
ios_maxbit
=
0x8000
;
/* class streambuf */
typedef
struct
{
...
...
@@ -90,8 +92,10 @@ typedef struct {
ios
*
__thiscall
ios_assign
(
ios
*
,
const
ios
*
);
int
__thiscall
ios_fail
(
const
ios
*
);
void
__cdecl
ios_lock
(
ios
*
);
void
__cdecl
ios_lockc
(
void
);
LONG
__thiscall
ios_setf_mask
(
ios
*
,
LONG
,
LONG
);
void
__cdecl
ios_unlock
(
ios
*
);
void
__cdecl
ios_unlockc
(
void
);
/* class ostream */
typedef
struct
_ostream
{
...
...
@@ -858,8 +862,11 @@ int __thiscall ios_bad(const ios *this)
/* ?bitalloc@ios@@SAJXZ */
LONG
__cdecl
ios_bitalloc
(
void
)
{
FIXME
(
"() stub
\n
"
);
return
0
;
TRACE
(
"()
\n
"
);
ios_lockc
();
ios_maxbit
<<=
1
;
ios_unlockc
();
return
ios_maxbit
;
}
/* ?clear@ios@@QAEXH@Z */
...
...
dlls/msvcirt/msvcirt.spec
View file @
f2037e2e
...
...
@@ -778,7 +778,7 @@
@ stub -arch=win64 ?ws@@YAAEAVistream@@AEAV1@@Z
# @ extern ?x_curindex@ios@@0HA # static int ios::x_curindex
@ extern ?x_lockc@ios@@0U_CRT_CRITICAL_SECTION@@A ios_static_lock
# @ extern ?x_maxbit@ios@@0JA # static long ios::x
_maxbit
@ extern ?x_maxbit@ios@@0JA ios
_maxbit
# @ extern ?x_statebuf@ios@@0PAJA # static long * ios::x_statebuf
@ cdecl ?xalloc@ios@@SAHXZ() ios_xalloc
@ thiscall -arch=win32 ?xsgetn@streambuf@@UAEHPADH@Z(ptr ptr long) streambuf_xsgetn
...
...
dlls/msvcirt/tests/msvcirt.c
View file @
f2037e2e
...
...
@@ -147,6 +147,8 @@ static int (*__thiscall p_ios_bad)(const ios*);
static
int
(
*
__thiscall
p_ios_eof
)(
const
ios
*
);
static
int
(
*
__thiscall
p_ios_fail
)(
const
ios
*
);
static
void
(
*
__thiscall
p_ios_clear
)(
ios
*
,
int
);
static
LONG
*
p_ios_maxbit
;
static
LONG
(
*
__cdecl
p_ios_bitalloc
)(
void
);
/* Emulate a __thiscall */
#ifdef __i386__
...
...
@@ -317,6 +319,8 @@ static BOOL init(void)
SET
(
p_ios_static_lock
,
"?x_lockc@ios@@0U_CRT_CRITICAL_SECTION@@A"
);
SET
(
p_ios_lockc
,
"?lockc@ios@@KAXXZ"
);
SET
(
p_ios_unlockc
,
"?unlockc@ios@@KAXXZ"
);
SET
(
p_ios_maxbit
,
"?x_maxbit@ios@@0JA"
);
SET
(
p_ios_bitalloc
,
"?bitalloc@ios@@SAJXZ"
);
init_thiscall_thunk
();
return
TRUE
;
...
...
@@ -889,7 +893,8 @@ static void test_ios(void)
struct
ios_lock_arg
lock_arg
;
HANDLE
thread
;
BOOL
locked
;
LONG
ret
;
LONG
expected
,
ret
;
int
i
;
memset
(
&
ios_obj
,
0xab
,
sizeof
(
ios
));
memset
(
&
ios_obj2
,
0xab
,
sizeof
(
ios
));
...
...
@@ -1084,6 +1089,16 @@ static void test_ios(void)
ios_obj
.
do_lock
=
-
1
;
SetEvent
(
lock_arg
.
release
[
0
]);
/* bitalloc */
expected
=
0x10000
;
for
(
i
=
0
;
i
<
20
;
i
++
)
{
ret
=
p_ios_bitalloc
();
ok
(
ret
==
expected
,
"expected %x got %x
\n
"
,
expected
,
ret
);
ok
(
*
p_ios_maxbit
==
expected
,
"expected %x got %x
\n
"
,
expected
,
*
p_ios_maxbit
);
expected
<<=
1
;
}
SetEvent
(
lock_arg
.
release
[
1
]);
SetEvent
(
lock_arg
.
release
[
2
]);
WaitForSingleObject
(
thread
,
INFINITE
);
...
...
dlls/msvcrt20/msvcrt20.spec
View file @
f2037e2e
...
...
@@ -766,7 +766,7 @@
@ stub -arch=win64 ?ws@@YAAEAVistream@@AEAV1@@Z
# @ extern ?x_curindex@ios@@0HA
@ extern ?x_lockc@ios@@0U_CRT_CRITICAL_SECTION@@A msvcirt.?x_lockc@ios@@0U_CRT_CRITICAL_SECTION@@A
# @ extern
?x_maxbit@ios@@0JA
@ extern ?x_maxbit@ios@@0JA msvcirt.
?x_maxbit@ios@@0JA
# @ extern ?x_statebuf@ios@@0QAJA
@ cdecl ?xalloc@ios@@SAHXZ() msvcirt.?xalloc@ios@@SAHXZ
@ thiscall -arch=win32 ?xsgetn@streambuf@@UAEHPADH@Z(ptr ptr long) msvcirt.?xsgetn@streambuf@@UAEHPADH@Z
...
...
dlls/msvcrt40/msvcrt40.spec
View file @
f2037e2e
...
...
@@ -840,7 +840,7 @@
@ stub -arch=win64 ?ws@@YAAEAVistream@@AEAV1@@Z
# @ extern ?x_curindex@ios@@0HA
@ extern ?x_lockc@ios@@0U_CRT_CRITICAL_SECTION@@A msvcirt.?x_lockc@ios@@0U_CRT_CRITICAL_SECTION@@A
# @ extern
?x_maxbit@ios@@0JA
@ extern ?x_maxbit@ios@@0JA msvcirt.
?x_maxbit@ios@@0JA
# @ extern ?x_statebuf@ios@@0PAJA
@ cdecl ?xalloc@ios@@SAHXZ() msvcirt.?xalloc@ios@@SAHXZ
@ thiscall -arch=win32 ?xsgetn@streambuf@@UAEHPADH@Z(ptr ptr long) msvcirt.?xsgetn@streambuf@@UAEHPADH@Z
...
...
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