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
a2149ba7
Commit
a2149ba7
authored
Mar 16, 2015
by
Akihiro Sagawa
Committed by
Alexandre Julliard
Mar 17, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Fix _ismbckata() for Halfwidth Katakana characters.
parent
5db44d15
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
4 deletions
+32
-4
mbcs.c
dlls/msvcrt/mbcs.c
+0
-4
string.c
dlls/msvcrt/tests/string.c
+32
-0
No files found.
dlls/msvcrt/mbcs.c
View file @
a2149ba7
...
...
@@ -1350,7 +1350,6 @@ int CDECL _ismbcpunct(unsigned int ch)
*/
int
CDECL
_ismbchira
(
unsigned
int
c
)
{
/* FIXME: use lc_ctype when supported, not lc_all */
if
(
get_mbcinfo
()
->
mbcodepage
==
932
)
{
/* Japanese/Hiragana, CP 932 */
...
...
@@ -1364,11 +1363,8 @@ int CDECL _ismbchira(unsigned int c)
*/
int
CDECL
_ismbckata
(
unsigned
int
c
)
{
/* FIXME: use lc_ctype when supported, not lc_all */
if
(
get_mbcinfo
()
->
mbcodepage
==
932
)
{
if
(
c
<
256
)
return
_ismbbkana
(
c
);
/* Japanese/Katakana, CP 932 */
return
(
c
>=
0x8340
&&
c
<=
0x8396
&&
c
!=
0x837f
);
}
...
...
dlls/msvcrt/tests/string.c
View file @
a2149ba7
...
...
@@ -1190,6 +1190,37 @@ static void test_mbctombb(void)
_setmbcp
(
prev_cp
);
}
static
void
test_ismbckata
(
void
)
{
struct
katakana_pair
{
UINT
c
;
BOOL
exp
;
};
static
const
struct
katakana_pair
tests
[]
=
{
{
0x8152
,
FALSE
},
{
0x8153
,
FALSE
},
{
0x8154
,
FALSE
},
{
0x8155
,
FALSE
},
{
0x82a0
,
FALSE
},
{
0x833f
,
FALSE
},
{
0x8340
,
TRUE
},
{
0x837e
,
TRUE
},
{
0x837f
,
FALSE
},
{
0x8380
,
TRUE
},
{
0x8396
,
TRUE
},
{
0x8397
,
FALSE
},
{
0xa5
,
FALSE
},
{
0xb0
,
FALSE
},
{
0xdd
,
FALSE
}
};
unsigned
int
prev_cp
=
_getmbcp
();
int
ret
;
unsigned
int
i
;
_setmbcp
(
_MB_CP_SBCS
);
for
(
i
=
0
;
i
<
sizeof
(
tests
)
/
sizeof
(
tests
[
0
]);
i
++
)
{
ret
=
_ismbckata
(
tests
[
i
].
c
);
ok
(
!
ret
,
"expected 0, got %d for %04x
\n
"
,
ret
,
tests
[
i
].
c
);
}
_setmbcp
(
932
);
for
(
i
=
0
;
i
<
sizeof
(
tests
)
/
sizeof
(
tests
[
0
]);
i
++
)
{
ret
=
_ismbckata
(
tests
[
i
].
c
);
ok
(
!!
ret
==
tests
[
i
].
exp
,
"expected %d, got %d for %04x
\n
"
,
tests
[
i
].
exp
,
!!
ret
,
tests
[
i
].
c
);
}
_setmbcp
(
prev_cp
);
}
static
void
test_ismbclegal
(
void
)
{
unsigned
int
prev_cp
=
_getmbcp
();
int
ret
,
exp
,
err
;
...
...
@@ -2859,6 +2890,7 @@ START_TEST(string)
test_mbcjmsjis
();
test_mbbtombc
();
test_mbctombb
();
test_ismbckata
();
test_ismbclegal
();
test_strtok
();
test__mbstok
();
...
...
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