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
86c905ab
Commit
86c905ab
authored
Dec 04, 2003
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
We no longer need a special case for codepages on startup,
initialization is done in the correct order now.
parent
1bacc584
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
22 deletions
+9
-22
rtlstr.c
dlls/ntdll/rtlstr.c
+9
-22
No files found.
dlls/ntdll/rtlstr.c
View file @
86c905ab
...
...
@@ -38,26 +38,13 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
ntdll
);
UINT
NlsAnsiCodePage
=
1252
;
UINT
NlsAnsiCodePage
=
0
;
BYTE
NlsMbCodePageTag
=
0
;
BYTE
NlsMbOemCodePageTag
=
0
;
static
const
union
cptable
*
ansi_table
;
static
const
union
cptable
*
oem_table
;
inline
static
const
union
cptable
*
get_ansi_table
(
void
)
{
if
(
!
ansi_table
)
ansi_table
=
wine_cp_get_table
(
1252
);
return
ansi_table
;
}
inline
static
const
union
cptable
*
get_oem_table
(
void
)
{
if
(
!
oem_table
)
oem_table
=
wine_cp_get_table
(
437
);
return
oem_table
;
}
/**************************************************************************
* __wine_init_codepages (NTDLL.@)
*
...
...
@@ -719,7 +706,7 @@ NTSTATUS WINAPI RtlMultiByteToUnicodeN( LPWSTR dst, DWORD dstlen, LPDWORD reslen
LPCSTR
src
,
DWORD
srclen
)
{
int
ret
=
wine_cp_mbstowcs
(
get_ansi_table
()
,
0
,
src
,
srclen
,
dst
,
dstlen
/
sizeof
(
WCHAR
)
);
int
ret
=
wine_cp_mbstowcs
(
ansi_table
,
0
,
src
,
srclen
,
dst
,
dstlen
/
sizeof
(
WCHAR
)
);
if
(
reslen
)
*
reslen
=
(
ret
>=
0
)
?
ret
*
sizeof
(
WCHAR
)
:
dstlen
;
/* overflow -> we filled up to dstlen */
return
STATUS_SUCCESS
;
...
...
@@ -732,7 +719,7 @@ NTSTATUS WINAPI RtlMultiByteToUnicodeN( LPWSTR dst, DWORD dstlen, LPDWORD reslen
NTSTATUS
WINAPI
RtlOemToUnicodeN
(
LPWSTR
dst
,
DWORD
dstlen
,
LPDWORD
reslen
,
LPCSTR
src
,
DWORD
srclen
)
{
int
ret
=
wine_cp_mbstowcs
(
get_oem_table
()
,
0
,
src
,
srclen
,
dst
,
dstlen
/
sizeof
(
WCHAR
)
);
int
ret
=
wine_cp_mbstowcs
(
oem_table
,
0
,
src
,
srclen
,
dst
,
dstlen
/
sizeof
(
WCHAR
)
);
if
(
reslen
)
*
reslen
=
(
ret
>=
0
)
?
ret
*
sizeof
(
WCHAR
)
:
dstlen
;
/* overflow -> we filled up to dstlen */
return
STATUS_SUCCESS
;
...
...
@@ -745,7 +732,7 @@ NTSTATUS WINAPI RtlOemToUnicodeN( LPWSTR dst, DWORD dstlen, LPDWORD reslen,
NTSTATUS
WINAPI
RtlUnicodeToMultiByteN
(
LPSTR
dst
,
DWORD
dstlen
,
LPDWORD
reslen
,
LPCWSTR
src
,
DWORD
srclen
)
{
int
ret
=
wine_cp_wcstombs
(
get_ansi_table
()
,
0
,
src
,
srclen
/
sizeof
(
WCHAR
),
int
ret
=
wine_cp_wcstombs
(
ansi_table
,
0
,
src
,
srclen
/
sizeof
(
WCHAR
),
dst
,
dstlen
,
NULL
,
NULL
);
if
(
reslen
)
*
reslen
=
(
ret
>=
0
)
?
ret
:
dstlen
;
/* overflow -> we filled up to dstlen */
...
...
@@ -759,7 +746,7 @@ NTSTATUS WINAPI RtlUnicodeToMultiByteN( LPSTR dst, DWORD dstlen, LPDWORD reslen,
NTSTATUS
WINAPI
RtlUnicodeToOemN
(
LPSTR
dst
,
DWORD
dstlen
,
LPDWORD
reslen
,
LPCWSTR
src
,
DWORD
srclen
)
{
int
ret
=
wine_cp_wcstombs
(
get_oem_table
()
,
0
,
src
,
srclen
/
sizeof
(
WCHAR
),
int
ret
=
wine_cp_wcstombs
(
oem_table
,
0
,
src
,
srclen
/
sizeof
(
WCHAR
),
dst
,
dstlen
,
NULL
,
NULL
);
if
(
reslen
)
*
reslen
=
(
ret
>=
0
)
?
ret
:
dstlen
;
/* overflow -> we filled up to dstlen */
...
...
@@ -1083,7 +1070,7 @@ NTSTATUS WINAPI RtlUpcaseUnicodeToOemN( LPSTR dst, DWORD dstlen, LPDWORD reslen,
*/
UINT
WINAPI
RtlOemStringToUnicodeSize
(
const
STRING
*
str
)
{
int
ret
=
wine_cp_mbstowcs
(
get_oem_table
()
,
0
,
str
->
Buffer
,
str
->
Length
,
NULL
,
0
);
int
ret
=
wine_cp_mbstowcs
(
oem_table
,
0
,
str
->
Buffer
,
str
->
Length
,
NULL
,
0
);
return
(
ret
+
1
)
*
sizeof
(
WCHAR
);
}
...
...
@@ -1125,7 +1112,7 @@ DWORD WINAPI RtlAnsiStringToUnicodeSize( const STRING *str )
*/
NTSTATUS
WINAPI
RtlMultiByteToUnicodeSize
(
DWORD
*
size
,
LPCSTR
str
,
UINT
len
)
{
*
size
=
wine_cp_mbstowcs
(
get_ansi_table
()
,
0
,
str
,
len
,
NULL
,
0
)
*
sizeof
(
WCHAR
);
*
size
=
wine_cp_mbstowcs
(
ansi_table
,
0
,
str
,
len
,
NULL
,
0
)
*
sizeof
(
WCHAR
);
return
STATUS_SUCCESS
;
}
...
...
@@ -1146,7 +1133,7 @@ NTSTATUS WINAPI RtlMultiByteToUnicodeSize( DWORD *size, LPCSTR str, UINT len )
*/
NTSTATUS
WINAPI
RtlUnicodeToMultiByteSize
(
PULONG
size
,
LPCWSTR
str
,
ULONG
len
)
{
*
size
=
wine_cp_wcstombs
(
get_ansi_table
()
,
0
,
str
,
len
/
sizeof
(
WCHAR
),
NULL
,
0
,
NULL
,
NULL
);
*
size
=
wine_cp_wcstombs
(
ansi_table
,
0
,
str
,
len
/
sizeof
(
WCHAR
),
NULL
,
0
,
NULL
,
NULL
);
return
STATUS_SUCCESS
;
}
...
...
@@ -1187,7 +1174,7 @@ DWORD WINAPI RtlUnicodeStringToAnsiSize( const UNICODE_STRING *str )
*/
DWORD
WINAPI
RtlUnicodeStringToOemSize
(
const
UNICODE_STRING
*
str
)
{
return
wine_cp_wcstombs
(
get_oem_table
()
,
0
,
str
->
Buffer
,
str
->
Length
/
sizeof
(
WCHAR
),
return
wine_cp_wcstombs
(
oem_table
,
0
,
str
->
Buffer
,
str
->
Length
/
sizeof
(
WCHAR
),
NULL
,
0
,
NULL
,
NULL
)
+
1
;
}
...
...
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