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
99cbbb89
Commit
99cbbb89
authored
May 31, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Remove no longer needed case table initialization.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e613d294
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
11 deletions
+13
-11
locale.c
dlls/kernelbase/locale.c
+13
-11
No files found.
dlls/kernelbase/locale.c
View file @
99cbbb89
...
...
@@ -300,7 +300,8 @@ struct norm_table
/* WORD[] composition character sequences */
};
static
NLSTABLEINFO
nls_info
;
static
CPTABLEINFO
ansi_cpinfo
;
static
CPTABLEINFO
oem_cpinfo
;
static
UINT
unix_cp
=
CP_UTF8
;
static
LCID
system_lcid
;
static
LCID
user_lcid
;
...
...
@@ -1933,7 +1934,8 @@ void init_locale( HMODULE module )
ansi_ptr
=
NtCurrentTeb
()
->
Peb
->
AnsiCodePageData
?
NtCurrentTeb
()
->
Peb
->
AnsiCodePageData
:
utf8
;
oem_ptr
=
NtCurrentTeb
()
->
Peb
->
OemCodePageData
?
NtCurrentTeb
()
->
Peb
->
OemCodePageData
:
utf8
;
RtlInitNlsTables
(
ansi_ptr
,
oem_ptr
,
(
USHORT
*
)
sort
.
casemap
,
&
nls_info
);
RtlInitCodePageTable
(
ansi_ptr
,
&
ansi_cpinfo
);
RtlInitCodePageTable
(
oem_ptr
,
&
oem_cpinfo
);
RegCreateKeyExW
(
HKEY_LOCAL_MACHINE
,
L"System
\\
CurrentControlSet
\\
Control
\\
Nls"
,
0
,
NULL
,
REG_OPTION_NON_VOLATILE
,
KEY_ALL_ACCESS
,
NULL
,
&
nls_key
,
NULL
);
...
...
@@ -2092,14 +2094,14 @@ static WCHAR compose_chars( WCHAR ch1, WCHAR ch2 )
static
UINT
get_locale_codepage
(
const
NLS_LOCALE_DATA
*
locale
,
ULONG
flags
)
{
UINT
ret
=
locale
->
idefaultansicodepage
;
if
((
flags
&
LOCALE_USE_CP_ACP
)
||
ret
==
CP_UTF8
)
ret
=
nls_info
.
AnsiTableI
nfo
.
CodePage
;
if
((
flags
&
LOCALE_USE_CP_ACP
)
||
ret
==
CP_UTF8
)
ret
=
ansi_cpi
nfo
.
CodePage
;
return
ret
;
}
static
UINT
get_lcid_codepage
(
LCID
lcid
,
ULONG
flags
)
{
UINT
ret
=
nls_info
.
AnsiTableI
nfo
.
CodePage
;
UINT
ret
=
ansi_cpi
nfo
.
CodePage
;
if
(
!
(
flags
&
LOCALE_USE_CP_ACP
)
&&
lcid
!=
system_lcid
)
{
...
...
@@ -2121,9 +2123,9 @@ static const CPTABLEINFO *get_codepage_table( UINT codepage )
switch
(
codepage
)
{
case
CP_ACP
:
return
&
nls_info
.
AnsiTableI
nfo
;
return
&
ansi_cpi
nfo
;
case
CP_OEMCP
:
return
&
nls_info
.
OemTableI
nfo
;
return
&
oem_cpi
nfo
;
case
CP_MACCP
:
codepage
=
system_locale
->
idefaultmaccodepage
;
break
;
...
...
@@ -2131,8 +2133,8 @@ static const CPTABLEINFO *get_codepage_table( UINT codepage )
codepage
=
get_lcid_codepage
(
NtCurrentTeb
()
->
CurrentLocale
,
0
);
break
;
}
if
(
codepage
==
nls_info
.
AnsiTableInfo
.
CodePage
)
return
&
nls_info
.
AnsiTableI
nfo
;
if
(
codepage
==
nls_info
.
OemTableInfo
.
CodePage
)
return
&
nls_info
.
OemTableI
nfo
;
if
(
codepage
==
ansi_cpinfo
.
CodePage
)
return
&
ansi_cpi
nfo
;
if
(
codepage
==
oem_cpinfo
.
CodePage
)
return
&
oem_cpi
nfo
;
if
(
codepage
==
CP_UTF8
)
return
&
utf8_cpinfo
;
if
(
codepage
==
CP_UTF7
)
return
&
utf7_cpinfo
;
...
...
@@ -5271,7 +5273,7 @@ DWORD WINAPI DECLSPEC_HOTPATCH FormatMessageW( DWORD flags, const void *source,
*/
UINT
WINAPI
GetACP
(
void
)
{
return
nls_info
.
AnsiTableI
nfo
.
CodePage
;
return
ansi_cpi
nfo
.
CodePage
;
}
...
...
@@ -5653,7 +5655,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH GetNLSVersionEx( NLS_FUNCTION func, const WCHAR *l
*/
UINT
WINAPI
GetOEMCP
(
void
)
{
return
nls_info
.
OemTableI
nfo
.
CodePage
;
return
oem_cpi
nfo
.
CodePage
;
}
...
...
@@ -6149,7 +6151,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH IsCharXDigitW( WCHAR wc )
*/
BOOL
WINAPI
DECLSPEC_HOTPATCH
IsDBCSLeadByte
(
BYTE
testchar
)
{
return
nls_info
.
AnsiTableInfo
.
DBCSCodePage
&&
nls_info
.
AnsiTableI
nfo
.
DBCSOffsets
[
testchar
];
return
ansi_cpinfo
.
DBCSCodePage
&&
ansi_cpi
nfo
.
DBCSOffsets
[
testchar
];
}
...
...
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