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
08005722
Commit
08005722
authored
Mar 15, 2012
by
Akihiro Sagawa
Committed by
Alexandre Julliard
Mar 16, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Add semi stub _mbcjmstojis implementation.
parent
fefb5a94
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
1 deletion
+51
-1
mbcs.c
dlls/msvcrt/mbcs.c
+17
-0
msvcrt.spec
dlls/msvcrt/msvcrt.spec
+1
-1
string.c
dlls/msvcrt/tests/string.c
+33
-0
No files found.
dlls/msvcrt/mbcs.c
View file @
08005722
...
...
@@ -464,6 +464,23 @@ unsigned int CDECL _mbcjistojms(unsigned int c)
}
/*********************************************************************
* _mbcjmstojis(MSVCRT.@)
*
* Converts a sjis character to jis.
*/
unsigned
int
CDECL
_mbcjmstojis
(
unsigned
int
c
)
{
/* Conversion takes place only when codepage is 932.
In all other cases, c is returned unchanged */
if
(
get_mbcinfo
()
->
mbcodepage
==
932
)
{
FIXME
(
"(%x): stub
\n
"
,
c
);
}
return
c
;
}
/*********************************************************************
* _mbsdec(MSVCRT.@)
*/
unsigned
char
*
CDECL
_mbsdec
(
const
unsigned
char
*
start
,
const
unsigned
char
*
cur
)
...
...
dlls/msvcrt/msvcrt.spec
View file @
08005722
...
...
@@ -664,7 +664,7 @@
# stub _mbccpy_s_l(ptr long ptr str ptr)
@ cdecl _mbcjistojms (long)
# stub _mbcjistojms_l(long ptr)
@
stub
_mbcjmstojis(long)
@
cdecl
_mbcjmstojis(long)
# stub _mbcjmstojis_l(long ptr)
@ cdecl _mbclen(ptr)
# stub _mbclen_l(ptr ptr)
...
...
dlls/msvcrt/tests/string.c
View file @
08005722
...
...
@@ -880,6 +880,38 @@ static void test_mbcjisjms(void)
}
while
(
jisjms
[
i
++
][
0
]
!=
0
);
}
static
void
test_mbcjmsjis
(
void
)
{
/* List of value-pairs to test. The test assumes the last pair to be {0, ..} */
unsigned
int
jmsjis
[][
2
]
=
{
{
0x80fc
,
0
},
{
0x813f
,
0
},
{
0x8140
,
0x2121
},
{
0x817e
,
0x215f
},
{
0x817f
,
0
},
{
0x8180
,
0x2160
},
{
0x819e
,
0x217e
},
{
0x819f
,
0x2221
},
{
0x81fc
,
0x227e
},
{
0x81fd
,
0
},
{
0x9ffc
,
0x5e7e
},
{
0x9ffd
,
0
},
{
0xa040
,
0
},
{
0xdffc
,
0
},
{
0xe040
,
0x5f21
},
{
0xeffc
,
0x7e7e
},
{
0xf040
,
0
},
{
0x21
,
0
},
{
0
,
0
}};
int
cp
[]
=
{
932
,
936
,
939
,
950
,
1361
,
_MB_CP_SBCS
};
unsigned
int
i
,
j
;
int
prev_cp
=
_getmbcp
();
for
(
i
=
0
;
i
<
sizeof
(
cp
)
/
sizeof
(
cp
[
0
]);
i
++
)
{
_setmbcp
(
cp
[
i
]);
for
(
j
=
0
;
jmsjis
[
j
][
0
]
!=
0
;
j
++
)
{
unsigned
int
ret
,
exp
;
ret
=
_mbcjmstojis
(
jmsjis
[
j
][
0
]);
exp
=
(
cp
[
i
]
==
932
)
?
jmsjis
[
j
][
1
]
:
jmsjis
[
j
][
0
];
if
(
cp
[
i
]
==
932
)
todo_wine
ok
(
ret
==
exp
,
"Expected 0x%x, got 0x%x (0x%x, codepage=%d)
\n
"
,
exp
,
ret
,
jmsjis
[
j
][
0
],
cp
[
i
]);
else
ok
(
ret
==
exp
,
"Expected 0x%x, got 0x%x (0x%x, codepage=%d)
\n
"
,
exp
,
ret
,
jmsjis
[
j
][
0
],
cp
[
i
]);
}
}
_setmbcp
(
prev_cp
);
}
static
void
test_mbctombb
(
void
)
{
static
const
unsigned
int
mbcmbb_932
[][
2
]
=
{
...
...
@@ -2105,6 +2137,7 @@ START_TEST(string)
test_strcat_s
();
test__mbsnbcpy_s
();
test_mbcjisjms
();
test_mbcjmsjis
();
test_mbctombb
();
test_ismbclegal
();
test_strtok
();
...
...
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