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
ba43c67f
Commit
ba43c67f
authored
Aug 19, 2007
by
Mikolaj Zalewski
Committed by
Alexandre Julliard
Aug 21, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Implement _ismbblead/_ismbbtrail using _mbctype (with tests).
parent
ea824f83
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
mbcs.c
dlls/msvcrt/mbcs.c
+2
-4
string.c
dlls/msvcrt/tests/string.c
+6
-2
No files found.
dlls/msvcrt/mbcs.c
View file @
ba43c67f
...
...
@@ -1056,8 +1056,7 @@ int CDECL _ismbckata(unsigned int c)
*/
int
CDECL
_ismbblead
(
unsigned
int
c
)
{
/* FIXME: should reference MSVCRT_mbctype */
return
MSVCRT_isleadbyte
(
c
);
return
(
MSVCRT_mbctype
[(
c
&
0xff
)
+
1
]
&
_M1
)
!=
0
;
}
...
...
@@ -1066,8 +1065,7 @@ int CDECL _ismbblead(unsigned int c)
*/
int
CDECL
_ismbbtrail
(
unsigned
int
c
)
{
/* FIXME: should reference MSVCRT_mbctype */
return
!
_ismbblead
(
c
);
return
(
MSVCRT_mbctype
[(
c
&
0xff
)
+
1
]
&
_M2
)
!=
0
;
}
/*********************************************************************
...
...
dlls/msvcrt/tests/string.c
View file @
ba43c67f
...
...
@@ -161,7 +161,6 @@ void test_cp_table(int cp, int *result, int *todo)
static
void
test_mbcp
(
void
)
{
unsigned
int
s
=
'\354'
;
int
mb_orig_max
=
__mb_cur_max
;
int
curr_mbcp
=
_getmbcp
();
...
...
@@ -177,7 +176,12 @@ static void test_mbcp(void)
_setmbcp
(
936
);
ok
(
__mb_cur_max
==
mb_orig_max
,
"__mb_cur_max shouldn't be updated (is %d != %d)
\n
"
,
__mb_cur_max
,
mb_orig_max
);
todo_wine
ok
(
_ismbblead
(
s
),
"got result %d
\n
"
,
_ismbblead
(
s
));
ok
(
_ismbblead
(
'\354'
),
"
\354
should be a lead byte
\n
"
);
ok
(
_ismbblead
(
' '
)
==
FALSE
,
"' ' should not be a lead byte
\n
"
);
ok
(
_ismbblead
(
0x1234b0
),
"0x1234b0 should not be a lead byte
\n
"
);
ok
(
_ismbblead
(
0x123420
)
==
FALSE
,
"0x123420 should not be a lead byte
\n
"
);
ok
(
_ismbbtrail
(
'\xb0'
),
"
\xa0
should be a trail byte
\n
"
);
ok
(
_ismbbtrail
(
' '
)
==
FALSE
,
"' ' should not be a trail byte
\n
"
);
_setmbcp
(
curr_mbcp
);
}
...
...
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