Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
db0a6fca
Commit
db0a6fca
authored
Dec 27, 2013
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcp: Don't forward the mbtowc functions to msvcrt.
parent
b2d030a9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
109 additions
and
7 deletions
+109
-7
msvcp71.spec
dlls/msvcp71/msvcp71.spec
+7
-7
locale.c
dlls/msvcp90/locale.c
+102
-0
No files found.
dlls/msvcp71/msvcp71.spec
View file @
db0a6fca
...
...
@@ -5157,13 +5157,13 @@
# extern _Xbig
# extern _Zero
@ stub __Wcrtomb_lk
@ cdecl btowc(long)
msvcrt.btowc
@ cdecl mbrlen(ptr long ptr)
msvcrt.mbrlen
@ cdecl mbrtowc(ptr str long ptr)
msvcrt.mbrtowc
@ cdecl mbsrtowcs(ptr ptr long ptr)
msvcrt.mbsrtowcs
@ cdecl btowc(long)
@ cdecl mbrlen(ptr long ptr)
@ cdecl mbrtowc(ptr str long ptr)
@ cdecl mbsrtowcs(ptr ptr long ptr)
@ cdecl towctrans(long long)
@ cdecl wcrtomb(ptr long ptr)
msvcrt.wcrtomb
@ cdecl wcsrtombs(ptr ptr long ptr)
msvcrt.wcsrtombs
@ cdecl wctob(long)
msvcrt.wctob
@ cdecl wcrtomb(ptr long ptr)
@ cdecl wcsrtombs(ptr ptr long ptr)
@ cdecl wctob(long)
@ cdecl wctrans(str)
@ cdecl wctype(str)
dlls/msvcp90/locale.c
View file @
db0a6fca
...
...
@@ -26,6 +26,7 @@
#include "limits.h"
#include "math.h"
#include "stdio.h"
#include "wchar.h"
#include "wctype.h"
#include "time.h"
...
...
@@ -9487,6 +9488,107 @@ wint_t __cdecl towctrans(wint_t c, wctrans_t category)
return
towlower
(
c
);
}
/* btowc */
wint_t
__cdecl
btowc
(
int
c
)
{
wchar_t
ret
;
int
state
=
0
;
char
ch
=
c
;
if
(
c
==
EOF
||
_Mbrtowc
(
&
ret
,
&
ch
,
1
,
&
state
,
NULL
)
!=
1
)
return
WEOF
;
return
ret
;
}
/* mbrlen */
size_t
__cdecl
mbrlen
(
const
char
*
str
,
size_t
n
,
mbstate_t
*
state
)
{
static
int
local_state
;
if
(
!
state
)
state
=
&
local_state
;
return
_Mbrtowc
(
NULL
,
str
,
n
,
state
,
NULL
);
}
/* mbrtowc */
size_t
__cdecl
mbrtowc
(
wchar_t
*
dst
,
const
char
*
str
,
size_t
n
,
mbstate_t
*
state
)
{
static
int
local_state
;
if
(
!
state
)
state
=
&
local_state
;
return
_Mbrtowc
(
dst
,
str
,
n
,
state
,
NULL
);
}
/* mbsrtowcs */
size_t
__cdecl
mbsrtowcs
(
wchar_t
*
dst
,
const
char
**
pstr
,
size_t
n
,
mbstate_t
*
state
)
{
static
int
local_state
;
size_t
ret
=
0
;
wchar_t
wc
;
const
char
*
src
;
if
(
!
pstr
)
{
*
_errno
()
=
EINVAL
;
_invalid_parameter
(
NULL
,
NULL
,
NULL
,
0
,
0
);
}
src
=
*
pstr
;
if
(
!
state
)
state
=
&
local_state
;
while
(
!
dst
||
n
>
ret
)
{
int
len
=
_Mbrtowc
(
&
wc
,
src
,
2
,
state
,
NULL
);
if
(
len
<
0
)
return
-
1
;
if
(
!
len
)
break
;
if
(
dst
)
dst
[
ret
]
=
wc
;
ret
++
;
if
(
!
wc
)
break
;
src
+=
len
;
}
return
ret
;
}
/* wctob */
int
__cdecl
wctob
(
wint_t
wc
)
{
char
ret
[
MB_LEN_MAX
];
if
(
wc
==
WEOF
||
_Wcrtomb
(
ret
,
wc
,
NULL
,
NULL
)
!=
-
1
)
return
EOF
;
return
ret
[
0
];
}
/* wcrtomb */
size_t
__cdecl
wcrtomb
(
char
*
dst
,
wchar_t
wc
,
mbstate_t
*
state
)
{
return
_Wcrtomb
(
dst
,
wc
,
state
,
NULL
);
}
/* wcsrtombs */
size_t
__cdecl
wcsrtombs
(
char
*
dst
,
const
wchar_t
**
pstr
,
size_t
n
,
mbstate_t
*
state
)
{
const
wchar_t
*
src
;
char
buffer
[
MB_LEN_MAX
];
size_t
ret
=
0
;
if
(
!
pstr
)
{
*
_errno
()
=
EINVAL
;
_invalid_parameter
(
NULL
,
NULL
,
NULL
,
0
,
0
);
}
src
=
*
pstr
;
while
(
!
dst
||
n
>
ret
)
{
int
len
=
_Wcrtomb
(
buffer
,
*
src
,
state
,
NULL
);
if
(
len
<=
0
)
return
-
1
;
if
(
n
<
ret
+
len
)
break
;
memcpy
(
dst
+
ret
,
buffer
,
len
);
ret
+=
len
;
if
(
!
buffer
[
0
])
break
;
src
++
;
}
return
ret
;
}
DEFINE_RTTI_DATA0
(
locale_facet
,
0
,
".?AVfacet@locale@std@@"
)
DEFINE_RTTI_DATA1
(
collate_char
,
0
,
&
locale_facet_rtti_base_descriptor
,
".?AV?$collate@D@std@@"
)
DEFINE_RTTI_DATA1
(
collate_wchar
,
0
,
&
locale_facet_rtti_base_descriptor
,
".?AV?$collate@_W@std@@"
)
...
...
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