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
4b0f1163
Commit
4b0f1163
authored
Mar 22, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Load the locale.nls file at startup.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f1611958
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
1 deletion
+36
-1
loader.c
dlls/ntdll/loader.c
+1
-0
locale.c
dlls/ntdll/locale.c
+34
-1
ntdll_misc.h
dlls/ntdll/ntdll_misc.h
+1
-0
No files found.
dlls/ntdll/loader.c
View file @
4b0f1163
...
...
@@ -4129,6 +4129,7 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, ULONG_PTR unknown2, ULONG_PTR
RtlInitAnsiString
(
&
func_name
,
"CtrlRoutine"
);
LdrGetProcedureAddress
(
kernel32_handle
,
&
func_name
,
0
,
(
void
**
)
&
pCtrlRoutine
);
locale_init
();
actctx_init
();
if
(
wm
->
ldr
.
Flags
&
LDR_COR_ILONLY
)
status
=
fixup_imports_ilonly
(
wm
,
NULL
,
entry
);
...
...
dlls/ntdll/locale.c
View file @
4b0f1163
...
...
@@ -100,9 +100,12 @@ struct norm_table
/* WORD[] composition character sequences */
};
static
const
WCHAR
*
locale_strings
;
static
NLSTABLEINFO
nls_info
;
static
struct
norm_table
*
norm_tables
[
16
];
static
const
NLS_LOCALE_LCID_INDEX
*
lcids_index
;
static
const
NLS_LOCALE_LCNAME_INDEX
*
lcnames_index
;
static
const
NLS_LOCALE_HEADER
*
locale_table
;
static
NTSTATUS
load_string
(
ULONG
id
,
LANGID
lang
,
WCHAR
*
buffer
,
ULONG
len
)
{
...
...
@@ -235,6 +238,36 @@ invalid:
}
void
locale_init
(
void
)
{
LARGE_INTEGER
unused
;
LCID
system_lcid
;
NTSTATUS
status
;
struct
{
UINT
ctypes
;
UINT
unknown1
;
UINT
unknown2
;
UINT
unknown3
;
UINT
locales
;
UINT
charmaps
;
UINT
geoids
;
UINT
scripts
;
}
*
header
;
status
=
RtlGetLocaleFileMappingAddress
(
(
void
**
)
&
header
,
&
system_lcid
,
&
unused
);
if
(
status
)
{
ERR
(
"locale init failed %x
\n
"
,
status
);
return
;
}
locale_table
=
(
const
NLS_LOCALE_HEADER
*
)((
char
*
)
header
+
header
->
locales
);
lcids_index
=
(
const
NLS_LOCALE_LCID_INDEX
*
)((
char
*
)
locale_table
+
locale_table
->
lcids_offset
);
lcnames_index
=
(
const
NLS_LOCALE_LCNAME_INDEX
*
)((
char
*
)
locale_table
+
locale_table
->
lcnames_offset
);
locale_strings
=
(
const
WCHAR
*
)((
char
*
)
locale_table
+
locale_table
->
strings_offset
);
}
static
BYTE
rol
(
BYTE
val
,
BYTE
count
)
{
return
(
val
<<
count
)
|
(
val
>>
(
8
-
count
));
...
...
dlls/ntdll/ntdll_misc.h
View file @
4b0f1163
...
...
@@ -66,6 +66,7 @@ extern const char *debugstr_exception_code( DWORD code ) DECLSPEC_HIDDEN;
extern
void
version_init
(
void
)
DECLSPEC_HIDDEN
;
extern
void
debug_init
(
void
)
DECLSPEC_HIDDEN
;
extern
void
actctx_init
(
void
)
DECLSPEC_HIDDEN
;
extern
void
locale_init
(
void
)
DECLSPEC_HIDDEN
;
extern
void
init_user_process_params
(
void
)
DECLSPEC_HIDDEN
;
extern
void
CDECL
DECLSPEC_NORETURN
signal_start_thread
(
CONTEXT
*
ctx
)
DECLSPEC_HIDDEN
;
...
...
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