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
d9339f83
Commit
d9339f83
authored
Dec 01, 2003
by
Jon Griffiths
Committed by
Alexandre Julliard
Dec 01, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fail GetCalendarInfoA for Unicode-only locales.
parent
87ae5ba8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
13 deletions
+24
-13
kernel_private.h
dlls/kernel/kernel_private.h
+2
-0
lcformat.c
dlls/kernel/lcformat.c
+7
-7
time.c
dlls/kernel/time.c
+15
-6
No files found.
dlls/kernel/kernel_private.h
View file @
d9339f83
...
...
@@ -56,6 +56,8 @@ extern VOID SYSLEVEL_CheckNotLevel( INT level );
extern
DWORD
INSTR_EmulateInstruction
(
EXCEPTION_RECORD
*
rec
,
CONTEXT86
*
context
);
extern
void
INSTR_CallBuiltinHandler
(
CONTEXT86
*
context
,
BYTE
intnum
);
extern
BOOL
NLS_IsUnicodeOnlyLcid
(
LCID
);
extern
WORD
SELECTOR_AllocBlock
(
const
void
*
base
,
DWORD
size
,
unsigned
char
flags
);
extern
WORD
SELECTOR_ReallocBlock
(
WORD
sel
,
const
void
*
base
,
DWORD
size
);
extern
void
SELECTOR_FreeBlock
(
WORD
sel
);
...
...
dlls/kernel/lcformat.c
View file @
d9339f83
...
...
@@ -95,7 +95,7 @@ static CRITICAL_SECTION NLS_FormatsCS = { &NLS_FormatsCS_debug, -1, 0, 0, 0, 0 }
*
* Get a numeric locale format value.
*/
static
WINAPI
DWORD
NLS_GetLocaleNumber
(
LCID
lcid
,
DWORD
dwFlags
)
static
DWORD
NLS_GetLocaleNumber
(
LCID
lcid
,
DWORD
dwFlags
)
{
WCHAR
szBuff
[
80
];
DWORD
dwVal
=
0
;
...
...
@@ -120,7 +120,7 @@ static WINAPI DWORD NLS_GetLocaleNumber(LCID lcid, DWORD dwFlags)
*
* Get a string locale format value.
*/
static
W
INAPI
W
CHAR
*
NLS_GetLocaleString
(
LCID
lcid
,
DWORD
dwFlags
)
static
WCHAR
*
NLS_GetLocaleString
(
LCID
lcid
,
DWORD
dwFlags
)
{
WCHAR
szBuff
[
80
],
*
str
;
DWORD
dwLen
;
...
...
@@ -145,7 +145,7 @@ static WINAPI WCHAR* NLS_GetLocaleString(LCID lcid, DWORD dwFlags)
*
* Calculate (and cache) the number formats for a locale.
*/
static
WINAPI
const
NLS_FORMAT_NODE
*
NLS_GetFormats
(
LCID
lcid
,
DWORD
dwFlags
)
static
const
NLS_FORMAT_NODE
*
NLS_GetFormats
(
LCID
lcid
,
DWORD
dwFlags
)
{
/* GetLocaleInfo() identifiers for cached formatting strings */
static
const
USHORT
NLS_LocaleIndices
[]
=
{
...
...
@@ -295,7 +295,7 @@ static WINAPI const NLS_FORMAT_NODE *NLS_GetFormats(LCID lcid, DWORD dwFlags)
*
* Determine if a locale is Unicode only, and thus invalid in ASCII calls.
*/
BOOL
WINAPI
NLS_IsUnicodeOnlyLcid
(
LCID
lcid
)
BOOL
NLS_IsUnicodeOnlyLcid
(
LCID
lcid
)
{
switch
(
PRIMARYLANGID
(
lcid
))
{
...
...
@@ -666,9 +666,9 @@ NLS_GetDateTimeFormatW_Overrun:
*
* ASCII wrapper for GetDateFormatA/GetTimeFormatA.
*/
static
INT
WINAPI
NLS_GetDateTimeFormatA
(
LCID
lcid
,
DWORD
dwFlags
,
const
SYSTEMTIME
*
lpTime
,
LPCSTR
lpFormat
,
LPSTR
lpStr
,
INT
cchOut
)
static
INT
NLS_GetDateTimeFormatA
(
LCID
lcid
,
DWORD
dwFlags
,
const
SYSTEMTIME
*
lpTime
,
LPCSTR
lpFormat
,
LPSTR
lpStr
,
INT
cchOut
)
{
DWORD
cp
=
CP_ACP
;
WCHAR
szFormat
[
128
],
szOut
[
128
];
...
...
dlls/kernel/time.c
View file @
d9339f83
...
...
@@ -39,6 +39,7 @@
#include "winternl.h"
#include "winerror.h"
#include "winnls.h"
#include "kernel_private.h"
#include "wine/unicode.h"
#include "wine/debug.h"
...
...
@@ -530,20 +531,28 @@ BOOL WINAPI GetProcessTimes(
* GetCalendarInfoA (KERNEL32.@)
*
*/
int
WINAPI
GetCalendarInfoA
(
LCID
Locale
,
CALID
Calendar
,
CALTYPE
CalType
,
int
WINAPI
GetCalendarInfoA
(
LCID
lcid
,
CALID
Calendar
,
CALTYPE
CalType
,
LPSTR
lpCalData
,
int
cchData
,
LPDWORD
lpValue
)
{
int
ret
;
LPWSTR
lpCalDataW
=
NULL
;
FIXME
(
"(%08lx,%08lx,%08lx,%p,%d,%p): quarter-stub
\n
"
,
Locale
,
Calendar
,
CalType
,
lpCalData
,
cchData
,
lpValue
);
/* FIXME: Should verify if Locale is allowable in ANSI, as per MSDN */
lcid
,
Calendar
,
CalType
,
lpCalData
,
cchData
,
lpValue
);
lcid
=
ConvertDefaultLocale
(
lcid
);
if
(
NLS_IsUnicodeOnlyLcid
(
lcid
))
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
0
;
}
if
(
cchData
)
if
(
!
(
lpCalDataW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
cchData
*
sizeof
(
WCHAR
))))
return
0
;
if
(
cchData
&&
!
(
lpCalDataW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
cchData
*
sizeof
(
WCHAR
))))
return
0
;
ret
=
GetCalendarInfoW
(
Locale
,
Calendar
,
CalType
,
lpCalDataW
,
cchData
,
lpValue
);
ret
=
GetCalendarInfoW
(
lcid
,
Calendar
,
CalType
,
lpCalDataW
,
cchData
,
lpValue
);
if
(
ret
&&
lpCalDataW
&&
lpCalData
)
WideCharToMultiByte
(
CP_ACP
,
0
,
lpCalDataW
,
cchData
,
lpCalData
,
cchData
,
NULL
,
NULL
);
if
(
lpCalDataW
)
...
...
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