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
c9f1489c
Commit
c9f1489c
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: Implement _mbcjmstojis.
parent
08005722
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
7 deletions
+20
-7
mbcs.c
dlls/msvcrt/mbcs.c
+17
-1
msvcrt.h
dlls/msvcrt/msvcrt.h
+1
-0
string.c
dlls/msvcrt/tests/string.c
+2
-6
No files found.
dlls/msvcrt/mbcs.c
View file @
c9f1489c
...
@@ -474,7 +474,23 @@ unsigned int CDECL _mbcjmstojis(unsigned int c)
...
@@ -474,7 +474,23 @@ unsigned int CDECL _mbcjmstojis(unsigned int c)
In all other cases, c is returned unchanged */
In all other cases, c is returned unchanged */
if
(
get_mbcinfo
()
->
mbcodepage
==
932
)
if
(
get_mbcinfo
()
->
mbcodepage
==
932
)
{
{
FIXME
(
"(%x): stub
\n
"
,
c
);
if
(
_ismbclegal
(
c
)
&&
HIBYTE
(
c
)
<
0xf0
)
{
if
(
HIBYTE
(
c
)
>=
0xe0
)
c
-=
0x4000
;
c
=
(((
HIBYTE
(
c
)
-
0x81
)
*
2
+
0x21
)
<<
8
)
|
LOBYTE
(
c
);
if
(
LOBYTE
(
c
)
>
0x7f
)
c
-=
0x1
;
if
(
LOBYTE
(
c
)
>
0x9d
)
c
+=
0x83
;
else
c
-=
0x1f
;
}
else
return
0
;
/* Codepage is 932, but c can't be converted */
}
}
return
c
;
return
c
;
...
...
dlls/msvcrt/msvcrt.h
View file @
c9f1489c
...
@@ -913,6 +913,7 @@ int _setmbcp_l(int, LCID, MSVCRT_pthreadmbcinfo) DECLSPEC_HIDDEN;
...
@@ -913,6 +913,7 @@ int _setmbcp_l(int, LCID, MSVCRT_pthreadmbcinfo) DECLSPEC_HIDDEN;
int
__cdecl
MSVCRT__write
(
int
,
const
void
*
,
unsigned
int
);
int
__cdecl
MSVCRT__write
(
int
,
const
void
*
,
unsigned
int
);
int
__cdecl
_getch
(
void
);
int
__cdecl
_getch
(
void
);
int
__cdecl
_ismbblead
(
unsigned
int
);
int
__cdecl
_ismbblead
(
unsigned
int
);
int
__cdecl
_ismbclegal
(
unsigned
int
c
);
int
__cdecl
_ismbstrail
(
const
unsigned
char
*
start
,
const
unsigned
char
*
str
);
int
__cdecl
_ismbstrail
(
const
unsigned
char
*
start
,
const
unsigned
char
*
str
);
MSVCRT_size_t
__cdecl
MSVCRT_mbstowcs
(
MSVCRT_wchar_t
*
,
const
char
*
,
MSVCRT_size_t
);
MSVCRT_size_t
__cdecl
MSVCRT_mbstowcs
(
MSVCRT_wchar_t
*
,
const
char
*
,
MSVCRT_size_t
);
MSVCRT_intptr_t
__cdecl
MSVCRT__spawnve
(
int
,
const
char
*
,
const
char
*
const
*
,
const
char
*
const
*
);
MSVCRT_intptr_t
__cdecl
MSVCRT__spawnve
(
int
,
const
char
*
,
const
char
*
const
*
,
const
char
*
const
*
);
...
...
dlls/msvcrt/tests/string.c
View file @
c9f1489c
...
@@ -901,12 +901,8 @@ static void test_mbcjmsjis(void)
...
@@ -901,12 +901,8 @@ static void test_mbcjmsjis(void)
unsigned
int
ret
,
exp
;
unsigned
int
ret
,
exp
;
ret
=
_mbcjmstojis
(
jmsjis
[
j
][
0
]);
ret
=
_mbcjmstojis
(
jmsjis
[
j
][
0
]);
exp
=
(
cp
[
i
]
==
932
)
?
jmsjis
[
j
][
1
]
:
jmsjis
[
j
][
0
];
exp
=
(
cp
[
i
]
==
932
)
?
jmsjis
[
j
][
1
]
:
jmsjis
[
j
][
0
];
if
(
cp
[
i
]
==
932
)
ok
(
ret
==
exp
,
"Expected 0x%x, got 0x%x (0x%x, codepage=%d)
\n
"
,
todo_wine
ok
(
ret
==
exp
,
"Expected 0x%x, got 0x%x (0x%x, codepage=%d)
\n
"
,
exp
,
ret
,
jmsjis
[
j
][
0
],
cp
[
i
]);
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
);
_setmbcp
(
prev_cp
);
...
...
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