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
1ad48d1b
Commit
1ad48d1b
authored
Jun 04, 2019
by
Piotr Caban
Committed by
Alexandre Julliard
Jun 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcp: Add _Strxfrm implementation.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1c5b5ce2
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
72 additions
and
10 deletions
+72
-10
msvcp100.spec
dlls/msvcp100/msvcp100.spec
+1
-1
msvcp110.spec
dlls/msvcp110/msvcp110.spec
+1
-1
msvcp120.spec
dlls/msvcp120/msvcp120.spec
+1
-1
msvcp120_app.spec
dlls/msvcp120_app/msvcp120_app.spec
+1
-1
msvcp140.spec
dlls/msvcp140/msvcp140.spec
+1
-1
msvcp60.spec
dlls/msvcp60/msvcp60.spec
+1
-1
msvcp70.spec
dlls/msvcp70/msvcp70.spec
+1
-1
msvcp71.spec
dlls/msvcp71/msvcp71.spec
+1
-1
msvcp80.spec
dlls/msvcp80/msvcp80.spec
+1
-1
locale.c
dlls/msvcp90/locale.c
+39
-0
msvcp90.spec
dlls/msvcp90/msvcp90.spec
+1
-1
misc.c
dlls/msvcp90/tests/misc.c
+23
-0
No files found.
dlls/msvcp100/msvcp100.spec
View file @
1ad48d1b
...
@@ -2958,7 +2958,7 @@
...
@@ -2958,7 +2958,7 @@
@ cdecl -ret64 _Stoullx(ptr ptr long ptr)
@ cdecl -ret64 _Stoullx(ptr ptr long ptr)
@ cdecl _Stoulx(ptr ptr long ptr)
@ cdecl _Stoulx(ptr ptr long ptr)
@ cdecl _Strcoll(ptr ptr ptr ptr ptr)
@ cdecl _Strcoll(ptr ptr ptr ptr ptr)
@
stub _Strxfrm
@
cdecl _Strxfrm(ptr ptr ptr ptr ptr)
@ cdecl _Tolower(long ptr)
@ cdecl _Tolower(long ptr)
@ cdecl _Toupper(long ptr)
@ cdecl _Toupper(long ptr)
@ cdecl _Towlower(long ptr)
@ cdecl _Towlower(long ptr)
...
...
dlls/msvcp110/msvcp110.spec
View file @
1ad48d1b
...
@@ -3854,7 +3854,7 @@
...
@@ -3854,7 +3854,7 @@
@ cdecl _Stoulx(ptr ptr long ptr)
@ cdecl _Stoulx(ptr ptr long ptr)
@ stub _Stoxflt
@ stub _Stoxflt
@ cdecl _Strcoll(ptr ptr ptr ptr ptr)
@ cdecl _Strcoll(ptr ptr ptr ptr ptr)
@
stub _Strxfrm
@
cdecl _Strxfrm(ptr ptr ptr ptr ptr)
@ stub _Thrd_abort
@ stub _Thrd_abort
@ cdecl _Thrd_create(ptr ptr ptr)
@ cdecl _Thrd_create(ptr ptr ptr)
@ cdecl -norelay _Thrd_current()
@ cdecl -norelay _Thrd_current()
...
...
dlls/msvcp120/msvcp120.spec
View file @
1ad48d1b
...
@@ -3801,7 +3801,7 @@
...
@@ -3801,7 +3801,7 @@
@ cdecl _Stoulx(ptr ptr long ptr)
@ cdecl _Stoulx(ptr ptr long ptr)
@ stub _Stoxflt
@ stub _Stoxflt
@ cdecl _Strcoll(ptr ptr ptr ptr ptr)
@ cdecl _Strcoll(ptr ptr ptr ptr ptr)
@
stub _Strxfrm
@
cdecl _Strxfrm(ptr ptr ptr ptr ptr)
@ stub _Thrd_abort
@ stub _Thrd_abort
@ cdecl _Thrd_create(ptr ptr ptr)
@ cdecl _Thrd_create(ptr ptr ptr)
@ cdecl -norelay _Thrd_current()
@ cdecl -norelay _Thrd_current()
...
...
dlls/msvcp120_app/msvcp120_app.spec
View file @
1ad48d1b
...
@@ -3801,7 +3801,7 @@
...
@@ -3801,7 +3801,7 @@
@ cdecl _Stoulx(ptr ptr long ptr) msvcp120._Stoulx
@ cdecl _Stoulx(ptr ptr long ptr) msvcp120._Stoulx
@ stub _Stoxflt
@ stub _Stoxflt
@ cdecl _Strcoll(ptr ptr ptr ptr ptr) msvcp120._Strcoll
@ cdecl _Strcoll(ptr ptr ptr ptr ptr) msvcp120._Strcoll
@
stub
_Strxfrm
@
cdecl _Strxfrm(ptr ptr ptr ptr ptr) msvcp120.
_Strxfrm
@ stub _Thrd_abort
@ stub _Thrd_abort
@ cdecl _Thrd_create(ptr ptr ptr) msvcp120._Thrd_create
@ cdecl _Thrd_create(ptr ptr ptr) msvcp120._Thrd_create
@ cdecl -norelay _Thrd_current() msvcp120._Thrd_current
@ cdecl -norelay _Thrd_current() msvcp120._Thrd_current
...
...
dlls/msvcp140/msvcp140.spec
View file @
1ad48d1b
...
@@ -3715,7 +3715,7 @@
...
@@ -3715,7 +3715,7 @@
@ cdecl -ret64 _Stoullx(ptr ptr long ptr) _Stoullx
@ cdecl -ret64 _Stoullx(ptr ptr long ptr) _Stoullx
@ cdecl _Stoulx(ptr ptr long ptr) _Stoulx
@ cdecl _Stoulx(ptr ptr long ptr) _Stoulx
@ cdecl _Strcoll(ptr ptr ptr ptr ptr) _Strcoll
@ cdecl _Strcoll(ptr ptr ptr ptr ptr) _Strcoll
@
stub _Strxfrm
@
cdecl _Strxfrm(ptr ptr ptr ptr ptr)
@ cdecl _Symlink(wstr wstr) tr2_sys__Symlink_wchar
@ cdecl _Symlink(wstr wstr) tr2_sys__Symlink_wchar
@ stub _Symlink_get
@ stub _Symlink_get
@ cdecl _Temp_get(ptr)
@ cdecl _Temp_get(ptr)
...
...
dlls/msvcp60/msvcp60.spec
View file @
1ad48d1b
...
@@ -4302,7 +4302,7 @@
...
@@ -4302,7 +4302,7 @@
@ cdecl _Stof(ptr ptr long)
@ cdecl _Stof(ptr ptr long)
@ cdecl _Stold(ptr ptr long) _Stod
@ cdecl _Stold(ptr ptr long) _Stod
@ cdecl _Strcoll(ptr ptr ptr ptr ptr)
@ cdecl _Strcoll(ptr ptr ptr ptr ptr)
@
stub _Strxfrm
@
cdecl _Strxfrm(ptr ptr ptr ptr ptr)
@ cdecl _Tolower(long ptr)
@ cdecl _Tolower(long ptr)
@ cdecl _Toupper(long ptr)
@ cdecl _Toupper(long ptr)
@ cdecl _Wcrtomb(ptr long ptr ptr)
@ cdecl _Wcrtomb(ptr long ptr ptr)
...
...
dlls/msvcp70/msvcp70.spec
View file @
1ad48d1b
...
@@ -5090,7 +5090,7 @@
...
@@ -5090,7 +5090,7 @@
@ cdecl _Stof(ptr ptr long)
@ cdecl _Stof(ptr ptr long)
@ cdecl _Stold(ptr ptr long) _Stod
@ cdecl _Stold(ptr ptr long) _Stod
@ cdecl _Strcoll(ptr ptr ptr ptr ptr)
@ cdecl _Strcoll(ptr ptr ptr ptr ptr)
@
stub _Strxfrm
@
cdecl _Strxfrm(ptr ptr ptr ptr ptr)
@ cdecl _Tolower(long ptr)
@ cdecl _Tolower(long ptr)
@ cdecl _Toupper(long ptr)
@ cdecl _Toupper(long ptr)
@ cdecl _Wcrtomb(ptr long ptr ptr)
@ cdecl _Wcrtomb(ptr long ptr ptr)
...
...
dlls/msvcp71/msvcp71.spec
View file @
1ad48d1b
...
@@ -5146,7 +5146,7 @@
...
@@ -5146,7 +5146,7 @@
@ cdecl _Stof(ptr ptr long)
@ cdecl _Stof(ptr ptr long)
@ cdecl _Stold(ptr ptr long) _Stod
@ cdecl _Stold(ptr ptr long) _Stod
@ cdecl _Strcoll(ptr ptr ptr ptr ptr)
@ cdecl _Strcoll(ptr ptr ptr ptr ptr)
@
stub _Strxfrm
@
cdecl _Strxfrm(ptr ptr ptr ptr ptr)
@ cdecl _Tolower(long ptr)
@ cdecl _Tolower(long ptr)
@ cdecl _Toupper(long ptr)
@ cdecl _Toupper(long ptr)
@ cdecl _Towlower(long ptr)
@ cdecl _Towlower(long ptr)
...
...
dlls/msvcp80/msvcp80.spec
View file @
1ad48d1b
...
@@ -5772,7 +5772,7 @@
...
@@ -5772,7 +5772,7 @@
@ cdecl _Stoulx(ptr ptr long ptr)
@ cdecl _Stoulx(ptr ptr long ptr)
@ stub _Stoxflt
@ stub _Stoxflt
@ cdecl _Strcoll(ptr ptr ptr ptr ptr)
@ cdecl _Strcoll(ptr ptr ptr ptr ptr)
@
stub _Strxfrm
@
cdecl _Strxfrm(ptr ptr ptr ptr ptr)
@ cdecl _Tolower(long ptr)
@ cdecl _Tolower(long ptr)
@ cdecl _Toupper(long ptr)
@ cdecl _Toupper(long ptr)
@ cdecl _Towlower(long ptr)
@ cdecl _Towlower(long ptr)
...
...
dlls/msvcp90/locale.c
View file @
1ad48d1b
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
#include "winbase.h"
#include "winbase.h"
#include "winnls.h"
#include "winnls.h"
#include "msvcp90.h"
#include "msvcp90.h"
#include "wine/heap.h"
#include "wine/list.h"
#include "wine/list.h"
#include "wine/debug.h"
#include "wine/debug.h"
...
@@ -12664,6 +12665,44 @@ int __cdecl _To_wide(const char *src, wchar_t *dst)
...
@@ -12664,6 +12665,44 @@ int __cdecl _To_wide(const char *src, wchar_t *dst)
return
MultiByteToWideChar
(
CP_ACP
,
0
,
src
,
-
1
,
dst
,
MAX_PATH
);
return
MultiByteToWideChar
(
CP_ACP
,
0
,
src
,
-
1
,
dst
,
MAX_PATH
);
}
}
MSVCP_size_t
__cdecl
_Strxfrm
(
char
*
dest
,
char
*
dest_end
,
const
char
*
src
,
const
char
*
src_end
,
_Collvec
*
coll
)
{
MSVCP_size_t
dest_len
=
dest_end
-
dest
;
MSVCP_size_t
src_len
=
src_end
-
src
;
_Collvec
cv
;
WCHAR
*
buf
;
LCID
lcid
;
int
len
;
TRACE
(
"(%p %p %p %p %p)
\n
"
,
dest
,
dest_end
,
src
,
src_end
,
coll
);
if
(
coll
)
cv
=
*
coll
;
else
getcoll
(
&
cv
);
#if _MSVCP_VER < 110
lcid
=
cv
.
handle
;
#else
lcid
=
LocaleNameToLCID
(
cv
.
lc_name
,
0
);
#endif
if
(
!
lcid
&&
!
cv
.
page
)
{
if
(
src_len
>
dest_len
)
return
src_len
;
memcpy
(
dest
,
src
,
src_len
);
return
src_len
;
}
len
=
MultiByteToWideChar
(
cv
.
page
,
MB_ERR_INVALID_CHARS
,
src
,
src_len
,
NULL
,
0
);
if
(
!
len
)
return
0
;
buf
=
heap_alloc
(
len
*
sizeof
(
WCHAR
));
if
(
!
buf
)
return
0
;
MultiByteToWideChar
(
cv
.
page
,
MB_ERR_INVALID_CHARS
,
src
,
src_len
,
buf
,
len
);
len
=
LCMapStringW
(
lcid
,
LCMAP_SORTKEY
,
buf
,
len
,
(
WCHAR
*
)
dest
,
dest_len
);
heap_free
(
buf
);
return
len
;
}
DEFINE_RTTI_DATA0
(
_Facet_base
,
0
,
".?AV_Facet_base@std@@"
)
DEFINE_RTTI_DATA0
(
_Facet_base
,
0
,
".?AV_Facet_base@std@@"
)
DEFINE_RTTI_DATA0
(
locale_facet
,
0
,
".?AVfacet@locale@std@@"
)
DEFINE_RTTI_DATA0
(
locale_facet
,
0
,
".?AVfacet@locale@std@@"
)
DEFINE_RTTI_DATA1
(
locale__Locimp
,
0
,
&
locale_facet_rtti_base_descriptor
,
".?AV_Locimp@locale@std@@"
)
DEFINE_RTTI_DATA1
(
locale__Locimp
,
0
,
&
locale_facet_rtti_base_descriptor
,
".?AV_Locimp@locale@std@@"
)
...
...
dlls/msvcp90/msvcp90.spec
View file @
1ad48d1b
...
@@ -6547,7 +6547,7 @@
...
@@ -6547,7 +6547,7 @@
@ cdecl -ret64 _Stoullx(ptr ptr long ptr)
@ cdecl -ret64 _Stoullx(ptr ptr long ptr)
@ cdecl _Stoulx(ptr ptr long ptr)
@ cdecl _Stoulx(ptr ptr long ptr)
@ cdecl _Strcoll(ptr ptr ptr ptr ptr)
@ cdecl _Strcoll(ptr ptr ptr ptr ptr)
@
stub _Strxfrm
@
cdecl _Strxfrm(ptr ptr ptr ptr ptr)
@ cdecl _Tolower(long ptr)
@ cdecl _Tolower(long ptr)
@ cdecl _Toupper(long ptr)
@ cdecl _Toupper(long ptr)
@ cdecl _Towlower(long ptr)
@ cdecl _Towlower(long ptr)
...
...
dlls/msvcp90/tests/misc.c
View file @
1ad48d1b
...
@@ -105,6 +105,7 @@ static /*MSVCP__Collvec*/ULONGLONG (__cdecl *p__Getcoll)(void);
...
@@ -105,6 +105,7 @@ static /*MSVCP__Collvec*/ULONGLONG (__cdecl *p__Getcoll)(void);
static
wctrans_t
(
__cdecl
*
p_wctrans
)(
const
char
*
);
static
wctrans_t
(
__cdecl
*
p_wctrans
)(
const
char
*
);
static
wint_t
(
__cdecl
*
p_towctrans
)(
wint_t
,
wctrans_t
);
static
wint_t
(
__cdecl
*
p_towctrans
)(
wint_t
,
wctrans_t
);
static
void
(
__cdecl
*
p_locale__Locimp__Locimp_Addfac
)(
locale__Locimp
*
,
locale_facet
*
,
size_t
);
static
void
(
__cdecl
*
p_locale__Locimp__Locimp_Addfac
)(
locale__Locimp
*
,
locale_facet
*
,
size_t
);
static
size_t
(
__cdecl
*
p__Strxfrm
)(
char
*
,
char
*
,
const
char
*
,
const
char
*
,
const
MSVCP__Collvec
*
);
#undef __thiscall
#undef __thiscall
#ifdef __i386__
#ifdef __i386__
...
@@ -248,6 +249,7 @@ static BOOL init(void)
...
@@ -248,6 +249,7 @@ static BOOL init(void)
SET
(
p__Getcoll
,
"_Getcoll"
);
SET
(
p__Getcoll
,
"_Getcoll"
);
SET
(
p_wctrans
,
"wctrans"
);
SET
(
p_wctrans
,
"wctrans"
);
SET
(
p_towctrans
,
"towctrans"
);
SET
(
p_towctrans
,
"towctrans"
);
SET
(
p__Strxfrm
,
"_Strxfrm"
);
SET
(
basic_ostringstream_char_vbtable
,
"??_8?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B@"
);
SET
(
basic_ostringstream_char_vbtable
,
"??_8?$basic_ostringstream@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@7B@"
);
SET
(
p_std_Ctraits_float__Isnan
,
"?_Isnan@?$_Ctraits@M@std@@SA_NM@Z"
);
SET
(
p_std_Ctraits_float__Isnan
,
"?_Isnan@?$_Ctraits@M@std@@SA_NM@Z"
);
...
@@ -1088,6 +1090,26 @@ static void test_raise_handler(void)
...
@@ -1088,6 +1090,26 @@ static void test_raise_handler(void)
*
p_Raise_handler
=
NULL
;
*
p_Raise_handler
=
NULL
;
}
}
static
void
test__Strxfrm
(
void
)
{
const
char
in
[]
=
"abc"
;
MSVCP__Collvec
coll
;
char
out
[
64
];
size_t
ret
;
memset
(
&
coll
,
0
,
sizeof
(
coll
));
out
[
0
]
=
'z'
;
ret
=
p__Strxfrm
(
out
,
out
+
1
,
in
,
in
+
2
,
&
coll
);
ok
(
ret
==
2
,
"ret = %d
\n
"
,
(
int
)
ret
);
ok
(
out
[
0
]
==
'z'
,
"out[0] = %x
\n
"
,
out
[
0
]);
ret
=
p__Strxfrm
(
out
,
out
+
sizeof
(
out
),
in
,
in
+
4
,
&
coll
);
ok
(
ret
==
4
,
"ret = %d
\n
"
,
(
int
)
ret
);
ok
(
!
strcmp
(
in
,
out
),
"out = %s
\n
"
,
out
);
}
START_TEST
(
misc
)
START_TEST
(
misc
)
{
{
if
(
!
init
())
if
(
!
init
())
...
@@ -1108,6 +1130,7 @@ START_TEST(misc)
...
@@ -1108,6 +1130,7 @@ START_TEST(misc)
test_vbtable_size_exports
();
test_vbtable_size_exports
();
test_locale__Locimp__Locimp_Addfac
();
test_locale__Locimp__Locimp_Addfac
();
test_raise_handler
();
test_raise_handler
();
test__Strxfrm
();
ok
(
!
invalid_parameter
,
"invalid_parameter_handler was invoked too many times
\n
"
);
ok
(
!
invalid_parameter
,
"invalid_parameter_handler was invoked too many times
\n
"
);
...
...
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