Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
c9f1489c
Commit
c9f1489c
authored
13 years ago
by
Akihiro Sagawa
Committed by
Alexandre Julliard
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
msvcrt: Implement _mbcjmstojis.
parent
08005722
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dlls/msvcrt/mbcs.c
+17
-1
17 additions, 1 deletion
dlls/msvcrt/mbcs.c
dlls/msvcrt/msvcrt.h
+1
-0
1 addition, 0 deletions
dlls/msvcrt/msvcrt.h
dlls/msvcrt/tests/string.c
+2
-6
2 additions, 6 deletions
dlls/msvcrt/tests/string.c
with
20 additions
and
7 deletions
dlls/msvcrt/mbcs.c
+
17
−
1
View file @
c9f1489c
...
...
@@ -474,7 +474,23 @@ unsigned int CDECL _mbcjmstojis(unsigned int c)
In all other cases, c is returned unchanged */
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
;
...
...
This diff is collapsed.
Click to expand it.
dlls/msvcrt/msvcrt.h
+
1
−
0
View file @
c9f1489c
...
...
@@ -913,6 +913,7 @@ int _setmbcp_l(int, LCID, MSVCRT_pthreadmbcinfo) DECLSPEC_HIDDEN;
int
__cdecl
MSVCRT__write
(
int
,
const
void
*
,
unsigned
int
);
int
__cdecl
_getch
(
void
);
int
__cdecl
_ismbblead
(
unsigned
int
);
int
__cdecl
_ismbclegal
(
unsigned
int
c
);
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_intptr_t
__cdecl
MSVCRT__spawnve
(
int
,
const
char
*
,
const
char
*
const
*
,
const
char
*
const
*
);
...
...
This diff is collapsed.
Click to expand it.
dlls/msvcrt/tests/string.c
+
2
−
6
View file @
c9f1489c
...
...
@@ -901,12 +901,8 @@ static void test_mbcjmsjis(void)
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
]);
ok
(
ret
==
exp
,
"Expected 0x%x, got 0x%x (0x%x, codepage=%d)
\n
"
,
exp
,
ret
,
jmsjis
[
j
][
0
],
cp
[
i
]);
}
}
_setmbcp
(
prev_cp
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment