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
65cff869
Commit
65cff869
authored
Feb 28, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Remove no longer needed Unix codepage functions from the PE side.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
45bfa4ee
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
1 addition
and
93 deletions
+1
-93
loader.c
dlls/ntdll/loader.c
+0
-1
locale.c
dlls/ntdll/locale.c
+0
-74
ntdll_misc.h
dlls/ntdll/ntdll_misc.h
+0
-3
env.c
dlls/ntdll/unix/env.c
+0
-11
loader.c
dlls/ntdll/unix/loader.c
+0
-1
unix_private.h
dlls/ntdll/unix/unix_private.h
+0
-1
unixlib.h
dlls/ntdll/unixlib.h
+1
-2
No files found.
dlls/ntdll/loader.c
View file @
65cff869
...
...
@@ -3968,7 +3968,6 @@ static NTSTATUS process_init(void)
is_wow64
=
!!
NtCurrentTeb64
();
#endif
init_unix_codepage
();
init_user_process_params
();
params
=
peb
->
ProcessParameters
;
...
...
dlls/ntdll/locale.c
View file @
65cff869
...
...
@@ -104,7 +104,6 @@ LCID user_lcid = 0, system_lcid = 0;
static
NLSTABLEINFO
nls_info
;
static
HMODULE
kernel32_handle
;
static
CPTABLEINFO
unix_table
;
static
struct
norm_table
*
norm_tables
[
16
];
...
...
@@ -534,13 +533,6 @@ static unsigned int compose_string( const struct norm_table *info, WCHAR *str, u
}
void
init_unix_codepage
(
void
)
{
USHORT
*
data
=
unix_funcs
->
get_unix_codepage_data
();
if
(
data
)
RtlInitCodePageTable
(
data
,
&
unix_table
);
}
static
LCID
locale_to_lcid
(
WCHAR
*
win_name
)
{
WCHAR
*
p
;
...
...
@@ -586,72 +578,6 @@ void init_locale( HMODULE module )
}
/******************************************************************
* ntdll_umbstowcs
*/
DWORD
ntdll_umbstowcs
(
const
char
*
src
,
DWORD
srclen
,
WCHAR
*
dst
,
DWORD
dstlen
)
{
DWORD
reslen
;
if
(
unix_table
.
CodePage
)
RtlCustomCPToUnicodeN
(
&
unix_table
,
dst
,
dstlen
*
sizeof
(
WCHAR
),
&
reslen
,
src
,
srclen
);
else
RtlUTF8ToUnicodeN
(
dst
,
dstlen
*
sizeof
(
WCHAR
),
&
reslen
,
src
,
srclen
);
return
reslen
/
sizeof
(
WCHAR
);
}
/******************************************************************
* ntdll_wcstoumbs
*/
int
ntdll_wcstoumbs
(
const
WCHAR
*
src
,
DWORD
srclen
,
char
*
dst
,
DWORD
dstlen
,
BOOL
strict
)
{
DWORD
i
,
reslen
;
if
(
!
unix_table
.
CodePage
)
RtlUnicodeToUTF8N
(
dst
,
dstlen
,
&
reslen
,
src
,
srclen
*
sizeof
(
WCHAR
)
);
else
if
(
!
strict
)
RtlUnicodeToCustomCPN
(
&
unix_table
,
dst
,
dstlen
,
&
reslen
,
src
,
srclen
*
sizeof
(
WCHAR
)
);
else
/* do it by hand to make sure every character roundtrips correctly */
{
if
(
unix_table
.
DBCSOffsets
)
{
const
unsigned
short
*
uni2cp
=
unix_table
.
WideCharTable
;
for
(
i
=
dstlen
;
srclen
&&
i
;
i
--
,
srclen
--
,
src
++
)
{
unsigned
short
ch
=
uni2cp
[
*
src
];
if
(
ch
>>
8
)
{
if
(
unix_table
.
DBCSOffsets
[
unix_table
.
DBCSOffsets
[
ch
>>
8
]
+
(
ch
&
0xff
)]
!=
*
src
)
return
-
1
;
if
(
i
==
1
)
break
;
/* do not output a partial char */
i
--
;
*
dst
++
=
ch
>>
8
;
}
else
{
if
(
unix_table
.
MultiByteTable
[
ch
]
!=
*
src
)
return
-
1
;
*
dst
++
=
(
char
)
ch
;
}
}
reslen
=
dstlen
-
i
;
}
else
{
const
unsigned
char
*
uni2cp
=
unix_table
.
WideCharTable
;
reslen
=
min
(
srclen
,
dstlen
);
for
(
i
=
0
;
i
<
reslen
;
i
++
)
{
unsigned
char
ch
=
uni2cp
[
src
[
i
]];
if
(
unix_table
.
MultiByteTable
[
ch
]
!=
src
[
i
])
return
-
1
;
dst
[
i
]
=
ch
;
}
}
}
return
reslen
;
}
static
NTSTATUS
get_dummy_preferred_ui_language
(
DWORD
flags
,
LANGID
lang
,
ULONG
*
count
,
WCHAR
*
buffer
,
ULONG
*
size
)
{
...
...
dlls/ntdll/ntdll_misc.h
View file @
65cff869
...
...
@@ -61,7 +61,6 @@ extern void version_init(void) DECLSPEC_HIDDEN;
extern
void
debug_init
(
void
)
DECLSPEC_HIDDEN
;
extern
void
actctx_init
(
void
)
DECLSPEC_HIDDEN
;
extern
void
heap_set_debug_flags
(
HANDLE
handle
)
DECLSPEC_HIDDEN
;
extern
void
init_unix_codepage
(
void
)
DECLSPEC_HIDDEN
;
extern
void
init_locale
(
HMODULE
module
)
DECLSPEC_HIDDEN
;
extern
void
init_user_process_params
(
void
)
DECLSPEC_HIDDEN
;
extern
void
CDECL
DECLSPEC_NORETURN
signal_start_thread
(
CONTEXT
*
ctx
)
DECLSPEC_HIDDEN
;
...
...
@@ -88,8 +87,6 @@ extern struct _KUSER_SHARED_DATA *user_shared_data DECLSPEC_HIDDEN;
/* locale */
extern
LCID
user_lcid
,
system_lcid
;
extern
DWORD
ntdll_umbstowcs
(
const
char
*
src
,
DWORD
srclen
,
WCHAR
*
dst
,
DWORD
dstlen
)
DECLSPEC_HIDDEN
;
extern
int
ntdll_wcstoumbs
(
const
WCHAR
*
src
,
DWORD
srclen
,
char
*
dst
,
DWORD
dstlen
,
BOOL
strict
)
DECLSPEC_HIDDEN
;
extern
int
CDECL
NTDLL__vsnprintf
(
char
*
str
,
SIZE_T
len
,
const
char
*
format
,
__ms_va_list
args
)
DECLSPEC_HIDDEN
;
extern
int
CDECL
NTDLL__vsnwprintf
(
WCHAR
*
str
,
SIZE_T
len
,
const
WCHAR
*
format
,
__ms_va_list
args
)
DECLSPEC_HIDDEN
;
...
...
dlls/ntdll/unix/env.c
View file @
65cff869
...
...
@@ -1356,17 +1356,6 @@ static void get_initial_directory( UNICODE_STRING *dir )
/*************************************************************************
* get_unix_codepage_data
*
* Return the Unix codepage data.
*/
USHORT
*
CDECL
get_unix_codepage_data
(
void
)
{
return
unix_cp
.
data
;
}
/*************************************************************************
* get_locales
*
* Return the system and user locales. Buffers must be at least LOCALE_NAME_MAX_LENGTH chars long.
...
...
dlls/ntdll/unix/loader.c
View file @
65cff869
...
...
@@ -1715,7 +1715,6 @@ static struct unix_funcs unix_funcs =
ntdll_sin
,
ntdll_sqrt
,
ntdll_tan
,
get_unix_codepage_data
,
get_locales
,
virtual_release_address_space
,
load_so_dll
,
...
...
dlls/ntdll/unix/unix_private.h
View file @
65cff869
...
...
@@ -100,7 +100,6 @@ extern LONGLONG CDECL fast_RtlGetSystemTimePrecise(void) DECLSPEC_HIDDEN;
extern
NTSTATUS
CDECL
fast_wait_cv
(
RTL_CONDITION_VARIABLE
*
variable
,
const
void
*
value
,
const
LARGE_INTEGER
*
timeout
)
DECLSPEC_HIDDEN
;
extern
USHORT
*
CDECL
get_unix_codepage_data
(
void
)
DECLSPEC_HIDDEN
;
extern
void
CDECL
get_locales
(
WCHAR
*
sys
,
WCHAR
*
user
)
DECLSPEC_HIDDEN
;
extern
void
CDECL
virtual_release_address_space
(
void
)
DECLSPEC_HIDDEN
;
...
...
dlls/ntdll/unixlib.h
View file @
65cff869
...
...
@@ -26,7 +26,7 @@
struct
_DISPATCHER_CONTEXT
;
/* increment this when you change the function table */
#define NTDLL_UNIXLIB_VERSION 11
3
#define NTDLL_UNIXLIB_VERSION 11
4
struct
unix_funcs
{
...
...
@@ -70,7 +70,6 @@ struct unix_funcs
double
(
CDECL
*
tan
)(
double
d
);
/* environment functions */
USHORT
*
(
CDECL
*
get_unix_codepage_data
)(
void
);
void
(
CDECL
*
get_locales
)(
WCHAR
*
sys
,
WCHAR
*
user
);
/* virtual memory functions */
...
...
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