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
5da1c0ad
Commit
5da1c0ad
authored
Jul 28, 2005
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jul 28, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement EnumDateFormatsEx.
parent
72fba73a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
77 additions
and
8 deletions
+77
-8
lcformat.c
dlls/kernel/lcformat.c
+77
-8
No files found.
dlls/kernel/lcformat.c
View file @
5da1c0ad
...
...
@@ -1584,22 +1584,91 @@ GetCurrencyFormatW_Error:
/**************************************************************************
* EnumDateFormatsExA (KERNEL32.@)
*
* FIXME: MSDN mentions only LOCALE_USE_CP_ACP, should we handle
* LOCALE_NOUSEROVERRIDE here as well?
*/
BOOL
WINAPI
EnumDateFormatsExA
(
DATEFMT_ENUMPROCEXA
lpDateFmtEnumProc
,
LCID
Locale
,
DWORD
dwFlags
)
BOOL
WINAPI
EnumDateFormatsExA
(
DATEFMT_ENUMPROCEXA
proc
,
LCID
lcid
,
DWORD
flags
)
{
FIXME
(
"(%p, %ld, %ld): stub
\n
"
,
lpDateFmtEnumProc
,
Locale
,
dwFlags
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
FALSE
;
CALID
cal_id
;
char
buf
[
256
];
if
(
!
proc
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
if
(
!
GetLocaleInfoW
(
lcid
,
LOCALE_ICALENDARTYPE
|
LOCALE_RETURN_NUMBER
,
(
LPWSTR
)
&
cal_id
,
sizeof
(
cal_id
)
/
sizeof
(
WCHAR
)))
return
FALSE
;
switch
(
flags
&
~
LOCALE_USE_CP_ACP
)
{
case
0
:
case
DATE_SHORTDATE
:
if
(
GetLocaleInfoA
(
lcid
,
LOCALE_SSHORTDATE
|
(
flags
&
LOCALE_USE_CP_ACP
),
buf
,
256
))
proc
(
buf
,
cal_id
);
break
;
case
DATE_LONGDATE
:
if
(
GetLocaleInfoA
(
lcid
,
LOCALE_SLONGDATE
|
(
flags
&
LOCALE_USE_CP_ACP
),
buf
,
256
))
proc
(
buf
,
cal_id
);
break
;
case
DATE_YEARMONTH
:
if
(
GetLocaleInfoA
(
lcid
,
LOCALE_SYEARMONTH
|
(
flags
&
LOCALE_USE_CP_ACP
),
buf
,
256
))
proc
(
buf
,
cal_id
);
break
;
default:
FIXME
(
"Unknown date format (%ld)
\n
"
,
flags
);
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
return
TRUE
;
}
/**************************************************************************
* EnumDateFormatsExW (KERNEL32.@)
*/
BOOL
WINAPI
EnumDateFormatsExW
(
DATEFMT_ENUMPROCEXW
lpDateFmtEnumProc
,
LCID
Locale
,
DWORD
dwFlags
)
BOOL
WINAPI
EnumDateFormatsExW
(
DATEFMT_ENUMPROCEXW
proc
,
LCID
lcid
,
DWORD
flags
)
{
FIXME
(
"(%p, %ld, %ld): stub
\n
"
,
lpDateFmtEnumProc
,
Locale
,
dwFlags
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
FALSE
;
CALID
cal_id
;
WCHAR
buf
[
256
];
if
(
!
proc
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
if
(
!
GetLocaleInfoW
(
lcid
,
LOCALE_ICALENDARTYPE
|
LOCALE_RETURN_NUMBER
,
(
LPWSTR
)
&
cal_id
,
sizeof
(
cal_id
)
/
sizeof
(
WCHAR
)))
return
FALSE
;
switch
(
flags
&
~
LOCALE_USE_CP_ACP
)
{
case
0
:
case
DATE_SHORTDATE
:
if
(
GetLocaleInfoW
(
lcid
,
LOCALE_SSHORTDATE
|
(
flags
&
LOCALE_USE_CP_ACP
),
buf
,
256
))
proc
(
buf
,
cal_id
);
break
;
case
DATE_LONGDATE
:
if
(
GetLocaleInfoW
(
lcid
,
LOCALE_SLONGDATE
|
(
flags
&
LOCALE_USE_CP_ACP
),
buf
,
256
))
proc
(
buf
,
cal_id
);
break
;
case
DATE_YEARMONTH
:
if
(
GetLocaleInfoW
(
lcid
,
LOCALE_SYEARMONTH
|
(
flags
&
LOCALE_USE_CP_ACP
),
buf
,
256
))
proc
(
buf
,
cal_id
);
break
;
default:
FIXME
(
"Unknown date format (%ld)
\n
"
,
flags
);
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
return
TRUE
;
}
/**************************************************************************
...
...
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