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
d76455df
Commit
d76455df
authored
Feb 01, 2003
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Feb 01, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented _mbstok and _mbsnbset.
parent
0e85f48f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
2 deletions
+67
-2
mbcs.c
dlls/msvcrt/mbcs.c
+65
-0
msvcrt.spec
dlls/msvcrt/msvcrt.spec
+2
-2
No files found.
dlls/msvcrt/mbcs.c
View file @
d76455df
...
...
@@ -551,6 +551,41 @@ unsigned char* _mbsrchr(const unsigned char* s, unsigned int x)
}
/*********************************************************************
* _mbstok(MSVCRT.@)
*
* Find and extract tokens from strings
*/
unsigned
char
*
_mbstok
(
unsigned
char
*
str
,
const
unsigned
char
*
delim
)
{
static
char
*
next
=
NULL
;
char
*
ret
;
if
(
MSVCRT___mb_cur_max
>
1
)
{
unsigned
int
c
;
if
(
!
str
)
if
(
!
(
str
=
next
))
return
NULL
;
while
((
c
=
_mbsnextc
(
str
))
&&
_mbschr
(
delim
,
c
))
{
str
+=
c
>
255
?
2
:
1
;
}
if
(
!*
str
)
return
NULL
;
ret
=
str
++
;
while
((
c
=
_mbsnextc
(
str
))
&&
!
_mbschr
(
delim
,
c
))
{
str
+=
c
>
255
?
2
:
1
;
}
if
(
*
str
)
{
*
str
++
=
0
;
if
(
c
>
255
)
*
str
++
=
0
;
}
next
=
str
;
return
ret
;
}
return
strtok
(
str
,
delim
);
/* ASCII CP */
}
/*********************************************************************
* mbtowc(MSVCRT.@)
*/
int
MSVCRT_mbtowc
(
MSVCRT_wchar_t
*
dst
,
const
char
*
str
,
MSVCRT_size_t
n
)
...
...
@@ -793,6 +828,36 @@ unsigned char* _mbsset(unsigned char* str, unsigned int c)
}
/*********************************************************************
* _mbsnbset(MSVCRT.@)
*/
unsigned
char
*
_mbsnbset
(
unsigned
char
*
str
,
unsigned
int
c
,
MSVCRT_size_t
len
)
{
unsigned
char
*
ret
=
str
;
if
(
!
len
)
return
ret
;
if
(
MSVCRT___mb_cur_max
==
1
||
c
<
256
)
return
_strnset
(
str
,
c
,
len
);
/* ASCII CP or SB char */
c
&=
0xffff
;
/* Strip high bits */
while
(
str
[
0
]
&&
str
[
1
]
&&
(
len
>
1
))
{
*
str
++
=
c
>>
8
;
len
--
;
*
str
++
=
c
&
0xff
;
len
--
;
}
if
(
len
&&
str
[
0
])
{
/* as per msdn pad with a blank character */
str
[
0
]
=
' '
;
}
return
ret
;
}
/*********************************************************************
* _mbsnset(MSVCRT.@)
*/
unsigned
char
*
_mbsnset
(
unsigned
char
*
str
,
unsigned
int
c
,
MSVCRT_size_t
len
)
...
...
dlls/msvcrt/msvcrt.spec
View file @
d76455df
...
...
@@ -366,7 +366,7 @@
@ cdecl _mbsnbcpy(ptr str long) _mbsnbcpy
@ cdecl _mbsnbicmp(str str long) _mbsnbicmp
@ stub _mbsnbicoll #(str str long)
@
stub _mbsnbset #(str long long)
@
cdecl _mbsnbset(str long long) _mbsnbset
@ cdecl _mbsncat(str str long) _mbsncat
@ cdecl _mbsnccnt(str long) _mbsnccnt
@ cdecl _mbsncmp(str str long) _mbsncmp
...
...
@@ -384,7 +384,7 @@
@ cdecl _mbsspn(str str) _mbsspn
@ stub _mbsspnp #(str str)
@ cdecl _mbsstr(str str) strstr
@
stub _mbstok #(str str)
@
cdecl _mbstok(str str) _mbstok
@ cdecl _mbstrlen(str) _mbstrlen
@ cdecl _mbsupr(str) _mbsupr
@ cdecl _memccpy(ptr ptr long long) memccpy
...
...
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