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
42ccd8d9
Commit
42ccd8d9
authored
Apr 14, 2017
by
Piotr Caban
Committed by
Alexandre Julliard
Apr 19, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcr120: Add wctype implementation.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
307e5e8f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
66 additions
and
4 deletions
+66
-4
api-ms-win-crt-string-l1-1-0.spec
...s-win-crt-string-l1-1-0/api-ms-win-crt-string-l1-1-0.spec
+1
-1
msvcr120.spec
dlls/msvcr120/msvcr120.spec
+1
-1
msvcr120.c
dlls/msvcr120/tests/msvcr120.c
+32
-0
msvcr120_app.spec
dlls/msvcr120_app/msvcr120_app.spec
+1
-1
ctype.c
dlls/msvcrt/ctype.c
+30
-0
ucrtbase.spec
dlls/ucrtbase/ucrtbase.spec
+1
-1
No files found.
dlls/api-ms-win-crt-string-l1-1-0/api-ms-win-crt-string-l1-1-0.spec
View file @
42ccd8d9
...
...
@@ -173,6 +173,6 @@
@ cdecl wcstok(wstr wstr) ucrtbase.wcstok
@ cdecl wcstok_s(ptr wstr ptr) ucrtbase.wcstok_s
@ cdecl wcsxfrm(ptr wstr long) ucrtbase.wcsxfrm
@
stub
wctype
@
cdecl wctype(str) ucrtbase.
wctype
@ cdecl wmemcpy_s(ptr long ptr long) ucrtbase.wmemcpy_s
@ cdecl wmemmove_s(ptr long ptr long) ucrtbase.wmemmove_s
dlls/msvcr120/msvcr120.spec
View file @
42ccd8d9
...
...
@@ -2487,7 +2487,7 @@
@ cdecl wctomb(ptr long) MSVCRT_wctomb
@ cdecl wctomb_s(ptr ptr long long) MSVCRT_wctomb_s
@ stub wctrans
@
stub wctype
@
cdecl wctype(str)
@ cdecl wmemcpy_s(ptr long ptr long)
@ cdecl wmemmove_s(ptr long ptr long)
@ varargs wprintf(wstr) MSVCRT_wprintf
...
...
dlls/msvcr120/tests/msvcr120.c
View file @
42ccd8d9
...
...
@@ -182,6 +182,7 @@ static int (CDECL *p_fegetenv)(fenv_t*);
static
int
(
CDECL
*
p__clearfp
)(
void
);
static
_locale_t
(
__cdecl
*
p_wcreate_locale
)(
int
,
const
wchar_t
*
);
static
void
(
__cdecl
*
p_free_locale
)(
_locale_t
);
static
unsigned
short
(
__cdecl
*
p_wctype
)(
const
char
*
);
/* make sure we use the correct errno */
#undef errno
...
...
@@ -236,6 +237,7 @@ static BOOL init(void)
p_errno
=
(
void
*
)
GetProcAddress
(
module
,
"_errno"
);
p_wcreate_locale
=
(
void
*
)
GetProcAddress
(
module
,
"_wcreate_locale"
);
p_free_locale
=
(
void
*
)
GetProcAddress
(
module
,
"_free_locale"
);
SET
(
p_wctype
,
"wctype"
);
SET
(
p_fegetenv
,
"fegetenv"
);
SET
(
p__clearfp
,
"_clearfp"
);
if
(
sizeof
(
void
*
)
==
8
)
{
/* 64-bit initialization */
...
...
@@ -880,6 +882,35 @@ static void test__Condition_variable(void)
CloseHandle
(
thread_initialized
);
}
static
void
test_wctype
(
void
)
{
static
const
struct
{
const
char
*
name
;
unsigned
short
mask
;
}
properties
[]
=
{
{
"alnum"
,
0x107
},
{
"alpha"
,
0x103
},
{
"cntrl"
,
0x020
},
{
"digit"
,
0x004
},
{
"graph"
,
0x117
},
{
"lower"
,
0x002
},
{
"print"
,
0x157
},
{
"punct"
,
0x010
},
{
"space"
,
0x008
},
{
"upper"
,
0x001
},
{
"xdigit"
,
0x080
},
{
"ALNUM"
,
0x000
},
{
"Alnum"
,
0x000
},
{
""
,
0x000
}
};
int
i
,
ret
;
for
(
i
=
0
;
i
<
sizeof
(
properties
)
/
sizeof
(
properties
[
0
]);
i
++
)
{
ret
=
p_wctype
(
properties
[
i
].
name
);
ok
(
properties
[
i
].
mask
==
ret
,
"%d - Expected %x, got %x
\n
"
,
i
,
properties
[
i
].
mask
,
ret
);
}
}
START_TEST
(
msvcr120
)
{
if
(
!
init
())
return
;
...
...
@@ -896,4 +927,5 @@ START_TEST(msvcr120)
test_fegetenv
();
test__wcreate_locale
();
test__Condition_variable
();
test_wctype
();
}
dlls/msvcr120_app/msvcr120_app.spec
View file @
42ccd8d9
...
...
@@ -2149,7 +2149,7 @@
@ cdecl wctomb(ptr long) msvcr120.wctomb
@ cdecl wctomb_s(ptr ptr long long) msvcr120.wctomb_s
@ stub wctrans
@
stub
wctype
@
cdecl wctype(str) msvcr120.
wctype
@ cdecl wmemcpy_s(ptr long ptr long) msvcr120.wmemcpy_s
@ cdecl wmemmove_s(ptr long ptr long) msvcr120.wmemmove_s
@ varargs wprintf(wstr) msvcr120.wprintf
...
...
dlls/msvcrt/ctype.c
View file @
42ccd8d9
...
...
@@ -468,3 +468,33 @@ int CDECL MSVCRT__tolower(int c)
{
return
c
+
0x20
;
/* sic */
}
/*********************************************************************
* wctype (MSVCR120.@)
*/
unsigned
short
__cdecl
wctype
(
const
char
*
property
)
{
static
const
struct
{
const
char
*
name
;
unsigned
short
mask
;
}
properties
[]
=
{
{
"alnum"
,
MSVCRT__DIGIT
|
MSVCRT__ALPHA
},
{
"alpha"
,
MSVCRT__ALPHA
},
{
"cntrl"
,
MSVCRT__CONTROL
},
{
"digit"
,
MSVCRT__DIGIT
},
{
"graph"
,
MSVCRT__DIGIT
|
MSVCRT__PUNCT
|
MSVCRT__ALPHA
},
{
"lower"
,
MSVCRT__LOWER
},
{
"print"
,
MSVCRT__DIGIT
|
MSVCRT__PUNCT
|
MSVCRT__BLANK
|
MSVCRT__ALPHA
},
{
"punct"
,
MSVCRT__PUNCT
},
{
"space"
,
MSVCRT__SPACE
},
{
"upper"
,
MSVCRT__UPPER
},
{
"xdigit"
,
MSVCRT__HEX
}
};
unsigned
int
i
;
for
(
i
=
0
;
i
<
sizeof
(
properties
)
/
sizeof
(
properties
[
0
]);
i
++
)
if
(
!
strcmp
(
property
,
properties
[
i
].
name
))
return
properties
[
i
].
mask
;
return
0
;
}
dlls/ucrtbase/ucrtbase.spec
View file @
42ccd8d9
...
...
@@ -2594,6 +2594,6 @@
@ cdecl wctomb(ptr long) MSVCRT_wctomb
@ cdecl wctomb_s(ptr ptr long long) MSVCRT_wctomb_s
@ stub wctrans
@
stub wctype
@
cdecl wctype(str)
@ cdecl wmemcpy_s(ptr long ptr long)
@ cdecl wmemmove_s(ptr long ptr long)
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