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
bb2210bc
Commit
bb2210bc
authored
Feb 01, 2003
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Store mbstok() next pointer in the per-thread data.
parent
d76455df
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
mbcs.c
dlls/msvcrt/mbcs.c
+3
-3
msvcrt.h
dlls/msvcrt/msvcrt.h
+1
-0
No files found.
dlls/msvcrt/mbcs.c
View file @
bb2210bc
...
...
@@ -557,7 +557,7 @@ unsigned char* _mbsrchr(const unsigned char* s, unsigned int x)
*/
unsigned
char
*
_mbstok
(
unsigned
char
*
str
,
const
unsigned
char
*
delim
)
{
static
char
*
next
=
NULL
;
MSVCRT_thread_data
*
data
=
msvcrt_get_thread_data
()
;
char
*
ret
;
if
(
MSVCRT___mb_cur_max
>
1
)
...
...
@@ -565,7 +565,7 @@ unsigned char* _mbstok(unsigned char *str, const unsigned char *delim)
unsigned
int
c
;
if
(
!
str
)
if
(
!
(
str
=
next
))
return
NULL
;
if
(
!
(
str
=
data
->
mbstok_
next
))
return
NULL
;
while
((
c
=
_mbsnextc
(
str
))
&&
_mbschr
(
delim
,
c
))
{
str
+=
c
>
255
?
2
:
1
;
...
...
@@ -579,7 +579,7 @@ unsigned char* _mbstok(unsigned char *str, const unsigned char *delim)
*
str
++
=
0
;
if
(
c
>
255
)
*
str
++
=
0
;
}
next
=
str
;
data
->
mbstok_
next
=
str
;
return
ret
;
}
return
strtok
(
str
,
delim
);
/* ASCII CP */
...
...
dlls/msvcrt/msvcrt.h
View file @
bb2210bc
...
...
@@ -38,6 +38,7 @@ typedef struct __MSVCRT_thread_data
{
int
errno
;
unsigned
long
doserrno
;
char
*
mbstok_next
;
/* next ptr for mbstok() */
terminate_function
terminate_handler
;
unexpected_function
unexpected_handler
;
_se_translator_function
se_translator
;
...
...
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