Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
cd5a76b1
Commit
cd5a76b1
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: Add _mbctokata implementation.
parent
b6ab2b62
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
50 additions
and
8 deletions
+50
-8
msvcr100.spec
dlls/msvcr100/msvcr100.spec
+1
-1
msvcr110.spec
dlls/msvcr110/msvcr110.spec
+1
-1
msvcr120.spec
dlls/msvcr120/msvcr120.spec
+1
-1
msvcr70.spec
dlls/msvcr70/msvcr70.spec
+1
-1
msvcr71.spec
dlls/msvcr71/msvcr71.spec
+1
-1
msvcr80.spec
dlls/msvcr80/msvcr80.spec
+1
-1
msvcr90.spec
dlls/msvcr90/msvcr90.spec
+1
-1
mbcs.c
dlls/msvcrt/mbcs.c
+12
-0
msvcrt.spec
dlls/msvcrt/msvcrt.spec
+1
-1
string.c
dlls/msvcrt/tests/string.c
+30
-0
No files found.
dlls/msvcr100/msvcr100.spec
View file @
cd5a76b1
...
...
@@ -1084,7 +1084,7 @@
@ stub _mbclen_l
@ cdecl _mbctohira(long)
@ stub _mbctohira_l
@
stub
_mbctokata(long)
@
cdecl
_mbctokata(long)
@ stub _mbctokata_l
@ cdecl _mbctolower(long)
@ stub _mbctolower_l
...
...
dlls/msvcr110/msvcr110.spec
View file @
cd5a76b1
...
...
@@ -1442,7 +1442,7 @@
@ stub _mbclen_l
@ cdecl _mbctohira(long)
@ stub _mbctohira_l
@
stub
_mbctokata(long)
@
cdecl
_mbctokata(long)
@ stub _mbctokata_l
@ cdecl _mbctolower(long)
@ stub _mbctolower_l
...
...
dlls/msvcr120/msvcr120.spec
View file @
cd5a76b1
...
...
@@ -1450,7 +1450,7 @@
@ stub _mbclen_l
@ cdecl _mbctohira(long)
@ stub _mbctohira_l
@
stub
_mbctokata(long)
@
cdecl
_mbctokata(long)
@ stub _mbctokata_l
@ cdecl _mbctolower(long)
@ stub _mbctolower_l
...
...
dlls/msvcr70/msvcr70.spec
View file @
cd5a76b1
...
...
@@ -424,7 +424,7 @@
@ cdecl _mbcjmstojis(long)
@ cdecl _mbclen(ptr)
@ cdecl _mbctohira(long)
@
stub
_mbctokata(long)
@
cdecl
_mbctokata(long)
@ cdecl _mbctolower(long)
@ cdecl _mbctombb(long)
@ cdecl _mbctoupper(long)
...
...
dlls/msvcr71/msvcr71.spec
View file @
cd5a76b1
...
...
@@ -419,7 +419,7 @@
@ cdecl _mbcjmstojis(long)
@ cdecl _mbclen(ptr)
@ cdecl _mbctohira(long)
@
stub
_mbctokata(long)
@
cdecl
_mbctokata(long)
@ cdecl _mbctolower(long)
@ cdecl _mbctombb(long)
@ cdecl _mbctoupper(long)
...
...
dlls/msvcr80/msvcr80.spec
View file @
cd5a76b1
...
...
@@ -757,7 +757,7 @@
@ stub _mbclen_l
@ cdecl _mbctohira(long)
@ stub _mbctohira_l
@
stub
_mbctokata(long)
@
cdecl
_mbctokata(long)
@ stub _mbctokata_l
@ cdecl _mbctolower(long)
@ stub _mbctolower_l
...
...
dlls/msvcr90/msvcr90.spec
View file @
cd5a76b1
...
...
@@ -734,7 +734,7 @@
@ stub _mbclen_l
@ cdecl _mbctohira(long)
@ stub _mbctohira_l
@
stub
_mbctokata(long)
@
cdecl
_mbctokata(long)
@ stub _mbctokata_l
@ cdecl _mbctolower(long)
@ stub _mbctolower_l
...
...
dlls/msvcrt/mbcs.c
View file @
cd5a76b1
...
...
@@ -2288,3 +2288,15 @@ unsigned int CDECL _mbctohira(unsigned int c)
return
(
c
-
0x8340
-
(
c
>=
0x837f
?
1
:
0
))
+
0x829f
;
return
c
;
}
/*********************************************************************
* _mbctokata (MSVCRT.@)
*
* Converts a sjis hiragana character to katakana.
*/
unsigned
int
CDECL
_mbctokata
(
unsigned
int
c
)
{
if
(
_ismbchira
(
c
))
return
(
c
-
0x829f
)
+
0x8340
+
(
c
>=
0x82de
?
1
:
0
);
return
c
;
}
dlls/msvcrt/msvcrt.spec
View file @
cd5a76b1
...
...
@@ -700,7 +700,7 @@
# stub _mbclen_l(ptr ptr)
@ cdecl _mbctohira(long)
# stub _mbctohira_l(long ptr)
@
stub
_mbctokata(long)
@
cdecl
_mbctokata(long)
# stub _mbctokata_l(long ptr)
@ cdecl _mbctolower(long)
# stub _mbctolower_l(long ptr)
...
...
dlls/msvcrt/tests/string.c
View file @
cd5a76b1
...
...
@@ -1172,6 +1172,35 @@ static void test_mbctohira(void)
_setmbcp
(
prev_cp
);
}
static
void
test_mbctokata
(
void
)
{
static
const
unsigned
int
mbckata_932
[][
2
]
=
{
{
0x8152
,
0x8152
},
{
0x8153
,
0x8153
},
{
0x8154
,
0x8154
},
{
0x8155
,
0x8155
},
{
0x833f
,
0x833f
},
{
0x829f
,
0x8340
},
{
0x82dd
,
0x837e
},
{
0x837f
,
0x837f
},
{
0x82de
,
0x8380
},
{
0x8394
,
0x8394
},
{
0x8397
,
0x8397
},
{
0xa5
,
0xa5
},
{
0xb0
,
0xb0
},
{
0xdd
,
0xdd
}
};
unsigned
int
i
;
unsigned
int
prev_cp
=
_getmbcp
();
_setmbcp
(
_MB_CP_SBCS
);
for
(
i
=
0
;
i
<
sizeof
(
mbckata_932
)
/
sizeof
(
mbckata_932
[
0
]);
i
++
)
{
int
ret
,
exp
=
mbckata_932
[
i
][
0
];
ret
=
_mbctokata
(
mbckata_932
[
i
][
0
]);
ok
(
ret
==
exp
,
"Expected 0x%x, got 0x%x
\n
"
,
exp
,
ret
);
}
_setmbcp
(
932
);
for
(
i
=
0
;
i
<
sizeof
(
mbckata_932
)
/
sizeof
(
mbckata_932
[
0
]);
i
++
)
{
unsigned
int
ret
,
exp
;
ret
=
_mbctokata
(
mbckata_932
[
i
][
0
]);
exp
=
mbckata_932
[
i
][
1
];
ok
(
ret
==
exp
,
"Expected 0x%x, got 0x%x
\n
"
,
exp
,
ret
);
}
_setmbcp
(
prev_cp
);
}
static
void
test_mbbtombc
(
void
)
{
static
const
unsigned
int
mbbmbc
[][
2
]
=
{
...
...
@@ -2919,6 +2948,7 @@ START_TEST(string)
test_mbcjisjms
();
test_mbcjmsjis
();
test_mbctohira
();
test_mbctokata
();
test_mbbtombc
();
test_mbctombb
();
test_ismbckata
();
...
...
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