Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
6eae7a24
Commit
6eae7a24
authored
Apr 12, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Export a few more codepage functions from ntdll.so.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b47379c1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
0 deletions
+50
-0
env.c
dlls/ntdll/unix/env.c
+50
-0
No files found.
dlls/ntdll/unix/env.c
View file @
6eae7a24
...
...
@@ -2252,6 +2252,39 @@ WCHAR WINAPI RtlDowncaseUnicodeChar( WCHAR wch )
return
ntdll_towlower
(
wch
);
}
/******************************************************************
* RtlInitCodePageTable (ntdll.so)
*/
void
WINAPI
RtlInitCodePageTable
(
USHORT
*
ptr
,
CPTABLEINFO
*
info
)
{
static
const
CPTABLEINFO
utf8_cpinfo
=
{
CP_UTF8
,
4
,
'?'
,
0xfffd
,
'?'
,
'?'
};
if
(
ptr
[
1
]
==
CP_UTF8
)
*
info
=
utf8_cpinfo
;
else
init_codepage_table
(
ptr
,
info
);
}
/**************************************************************************
* RtlCustomCPToUnicodeN (ntdll.so)
*/
NTSTATUS
WINAPI
RtlCustomCPToUnicodeN
(
CPTABLEINFO
*
info
,
WCHAR
*
dst
,
DWORD
dstlen
,
DWORD
*
reslen
,
const
char
*
src
,
DWORD
srclen
)
{
unsigned
int
ret
=
cp_mbstowcs
(
info
,
dst
,
dstlen
/
sizeof
(
WCHAR
),
src
,
srclen
);
if
(
reslen
)
*
reslen
=
ret
*
sizeof
(
WCHAR
);
return
STATUS_SUCCESS
;
}
/**************************************************************************
* RtlUnicodeToCustomCPN (ntdll.so)
*/
NTSTATUS
WINAPI
RtlUnicodeToCustomCPN
(
CPTABLEINFO
*
info
,
char
*
dst
,
DWORD
dstlen
,
DWORD
*
reslen
,
const
WCHAR
*
src
,
DWORD
srclen
)
{
unsigned
int
ret
=
cp_wcstombs
(
info
,
dst
,
dstlen
,
src
,
srclen
/
sizeof
(
WCHAR
)
);
if
(
reslen
)
*
reslen
=
ret
;
return
STATUS_SUCCESS
;
}
/**********************************************************************
* RtlUTF8ToUnicodeN (ntdll.so)
*/
...
...
@@ -2269,6 +2302,23 @@ NTSTATUS WINAPI RtlUTF8ToUnicodeN( WCHAR *dst, DWORD dstlen, DWORD *reslen, cons
return
status
;
}
/**************************************************************************
* RtlUnicodeToUTF8N (ntdll.so)
*/
NTSTATUS
WINAPI
RtlUnicodeToUTF8N
(
char
*
dst
,
DWORD
dstlen
,
DWORD
*
reslen
,
const
WCHAR
*
src
,
DWORD
srclen
)
{
unsigned
int
ret
;
NTSTATUS
status
;
if
(
!
dst
)
status
=
utf8_wcstombs_size
(
src
,
srclen
/
sizeof
(
WCHAR
),
&
ret
);
else
status
=
utf8_wcstombs
(
dst
,
dstlen
,
&
ret
,
src
,
srclen
/
sizeof
(
WCHAR
)
);
*
reslen
=
ret
;
return
status
;
}
/**********************************************************************
* RtlNtStatusToDosError (ntdll.so)
*/
...
...
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