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
a0f0138c
Commit
a0f0138c
authored
Aug 03, 2000
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Aug 03, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
LOCALE_NOUSEROVERRIDE means: do not get user redefined settings from
the registry. Instead, use system default values.
parent
559692a5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
6 deletions
+14
-6
winnls.h
include/winnls.h
+3
-0
ole2nls.c
ole/ole2nls.c
+11
-6
No files found.
include/winnls.h
View file @
a0f0138c
...
...
@@ -165,6 +165,9 @@
#define PRIMARYLANGID(l) ((WORD)(l) & 0x3ff)
#define SUBLANGID(l) ((WORD)(l) >> 10)
#define LANGIDFROMLCID(lcid) ((WORD)(lcid))
#define SORTIDFROMLCID(lcid) ((WORD)((((DWORD)(lcid)) >> 16) & 0x0f))
#define LANG_SYSTEM_DEFAULT (MAKELANGID(LANG_NEUTRAL, SUBLANG_SYS_DEFAULT))
#define LANG_USER_DEFAULT (MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT))
#define LOCALE_SYSTEM_DEFAULT (MAKELCID(LANG_SYSTEM_DEFAULT, SORT_DEFAULT))
...
...
ole/ole2nls.c
View file @
a0f0138c
...
...
@@ -289,6 +289,7 @@ INT WINAPI GetLocaleInfoA(LCID lcid,LCTYPE LCType,LPSTR buf,INT len)
char
*
pacKey
;
char
acBuffer
[
128
];
DWORD
dwBufferSize
=
128
;
BOOL
NoUserOverride
;
TRACE
(
"(lcid=0x%lx,lctype=0x%lx,%p,%x)
\n
"
,
lcid
,
LCType
,
buf
,
len
);
...
...
@@ -297,7 +298,7 @@ INT WINAPI GetLocaleInfoA(LCID lcid,LCTYPE LCType,LPSTR buf,INT len)
return
0
;
}
if
(
lcid
==
LOCALE_NEUTRAL
||
lcid
==
LANG_SYSTEM_DEFAULT
||
(
LCType
&
LOCALE_NOUSEROVERRIDE
)
)
if
(
lcid
==
LOCALE_NEUTRAL
||
lcid
==
LANG_SYSTEM_DEFAULT
)
{
lcid
=
GetSystemDefaultLCID
();
}
...
...
@@ -305,12 +306,16 @@ INT WINAPI GetLocaleInfoA(LCID lcid,LCTYPE LCType,LPSTR buf,INT len)
{
lcid
=
GetUserDefaultLCID
();
}
/* LOCALE_NOUSEROVERRIDE means: do not get user redefined settings
from the registry. Instead, use system default values. */
NoUserOverride
=
(
LCType
&
LOCALE_NOUSEROVERRIDE
)
!=
0
;
LCType
&=
~
(
LOCALE_NOUSEROVERRIDE
|
LOCALE_USE_CP_ACP
);
/* First, check if it's in the registry. */
/* All user customized values are stored in the registry by SetLocaleInfo */
if
(
(
pacKey
=
GetLocaleSubkeyName
(
LCType
))
)
if
(
!
NoUserOverride
&&
(
pacKey
=
GetLocaleSubkeyName
(
LCType
))
)
{
char
acRealKey
[
128
];
HKEY
hKey
;
...
...
@@ -336,7 +341,7 @@ INT WINAPI GetLocaleInfoA(LCID lcid,LCTYPE LCType,LPSTR buf,INT len)
int
res_size
;
/* check if language is registered in the kernel32 resources */
if
((
res_size
=
NLS_LoadStringExW
(
GetModuleHandleA
(
"KERNEL32"
),
L
OWOR
D
(
lcid
),
if
((
res_size
=
NLS_LoadStringExW
(
GetModuleHandleA
(
"KERNEL32"
),
L
ANGIDFROMLCI
D
(
lcid
),
LCType
,
wcBuffer
,
sizeof
(
wcBuffer
)
/
sizeof
(
wcBuffer
[
0
]))))
{
WideCharToMultiByte
(
CP_ACP
,
0
,
wcBuffer
,
res_size
,
acBuffer
,
dwBufferSize
,
NULL
,
NULL
);
retString
=
acBuffer
;
...
...
@@ -1278,7 +1283,7 @@ DWORD WINAPI VerLanguageNameA( UINT wLang, LPSTR szLang, UINT nSize )
if
(
!
szLang
)
return
0
;
return
GetLocaleInfoA
(
MAKELCID
(
wLang
,
SORT_DEFAULT
)
,
LOCALE_SENGLANGUAGE
,
szLang
,
nSize
);
return
GetLocaleInfoA
(
MAKELCID
(
wLang
,
SORT_DEFAULT
),
LOCALE_SENGLANGUAGE
,
szLang
,
nSize
);
}
/***********************************************************************
...
...
@@ -1289,7 +1294,7 @@ DWORD WINAPI VerLanguageNameW( UINT wLang, LPWSTR szLang, UINT nSize )
if
(
!
szLang
)
return
0
;
return
GetLocaleInfoW
(
MAKELCID
(
wLang
,
SORT_DEFAULT
)
,
LOCALE_SENGLANGUAGE
,
szLang
,
nSize
);
return
GetLocaleInfoW
(
MAKELCID
(
wLang
,
SORT_DEFAULT
),
LOCALE_SENGLANGUAGE
,
szLang
,
nSize
);
}
...
...
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