Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
6cd0eb20
Commit
6cd0eb20
authored
Dec 24, 2014
by
Seán de Búrca
Committed by
Alexandre Julliard
Jan 06, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Implement Get{Time,Date}FormatEx.
parent
adc091b8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
77 additions
and
2 deletions
+77
-2
api-ms-win-core-datetime-l1-1-1.spec
...core-datetime-l1-1-1/api-ms-win-core-datetime-l1-1-1.spec
+2
-2
kernel32.spec
dlls/kernel32/kernel32.spec
+2
-0
lcformat.c
dlls/kernel32/lcformat.c
+71
-0
locale.c
dlls/kernel32/tests/locale.c
+0
-0
winnls.h
include/winnls.h
+2
-0
No files found.
dlls/api-ms-win-core-datetime-l1-1-1/api-ms-win-core-datetime-l1-1-1.spec
View file @
6cd0eb20
@ stdcall GetDateFormatA(long long ptr str ptr long) kernel32.GetDateFormatA
@ st
ub
GetDateFormatEx
@ st
dcall GetDateFormatEx(wstr long ptr wstr ptr long wstr) kernel32.
GetDateFormatEx
@ stdcall GetDateFormatW(long long ptr wstr ptr long) kernel32.GetDateFormatW
@ stdcall GetTimeFormatA(long long ptr str ptr long) kernel32.GetTimeFormatA
@ st
ub
GetTimeFormatEx
@ st
dcall GetTimeFormatEx(wstr long ptr wstr ptr long) kernel32.
GetTimeFormatEx
@ stdcall GetTimeFormatW(long long ptr wstr ptr long) kernel32.GetTimeFormatW
dlls/kernel32/kernel32.spec
View file @
6cd0eb20
...
...
@@ -510,6 +510,7 @@
@ stdcall -norelay GetCurrentThread()
@ stdcall -norelay GetCurrentThreadId()
@ stdcall GetDateFormatA(long long ptr str ptr long)
@ stdcall GetDateFormatEx(wstr long ptr wstr ptr long wstr)
@ stdcall GetDateFormatW(long long ptr wstr ptr long)
@ stdcall GetDaylightFlag()
@ stdcall GetDefaultCommConfigA(str ptr long)
...
...
@@ -680,6 +681,7 @@
@ stdcall GetTickCount()
@ stdcall -ret64 GetTickCount64()
@ stdcall GetTimeFormatA(long long ptr str ptr long)
@ stdcall GetTimeFormatEx(wstr long ptr wstr ptr long)
@ stdcall GetTimeFormatW(long long ptr wstr ptr long)
@ stdcall GetTimeZoneInformation(ptr)
@ stdcall GetThreadUILanguage()
...
...
dlls/kernel32/lcformat.c
View file @
6cd0eb20
...
...
@@ -846,6 +846,45 @@ INT WINAPI GetDateFormatA( LCID lcid, DWORD dwFlags, const SYSTEMTIME* lpTime,
lpFormat
,
lpDateStr
,
cchOut
);
}
/******************************************************************************
* GetDateFormatEx [KERNEL32.@]
*
* Format a date for a given locale.
*
* PARAMS
* localename [I] Locale to format for
* flags [I] LOCALE_ and DATE_ flags from "winnls.h"
* date [I] Date to format
* format [I] Format string, or NULL to use the locale defaults
* outbuf [O] Destination for formatted string
* bufsize [I] Size of outbuf, or 0 to calculate the resulting size
* calendar [I] Reserved, must be NULL
*
* See GetDateFormatA for notes.
*
* RETURNS
* Success: The number of characters written to outbuf, or that would have
* been written if bufsize is 0.
* Failure: 0. Use GetLastError() to determine the cause.
*/
INT
WINAPI
GetDateFormatEx
(
LPCWSTR
localename
,
DWORD
flags
,
const
SYSTEMTIME
*
date
,
LPCWSTR
format
,
LPWSTR
outbuf
,
INT
bufsize
,
LPCWSTR
calendar
)
{
TRACE
(
"(%s,0x%08x,%p,%s,%p,%d,%s)
\n
"
,
debugstr_w
(
localename
),
flags
,
date
,
debugstr_w
(
format
),
outbuf
,
bufsize
,
debugstr_w
(
calendar
));
/* Parameter is currently reserved and Windows errors if set */
if
(
calendar
!=
NULL
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
0
;
}
return
NLS_GetDateTimeFormatW
(
LocaleNameToLCID
(
localename
,
0
),
flags
|
DATE_DATEVARSONLY
,
date
,
format
,
outbuf
,
bufsize
);
}
/******************************************************************************
* GetDateFormatW [KERNEL32.@]
...
...
@@ -914,6 +953,38 @@ INT WINAPI GetTimeFormatA(LCID lcid, DWORD dwFlags, const SYSTEMTIME* lpTime,
}
/******************************************************************************
* GetTimeFormatEx [KERNEL32.@]
*
* Format a date for a given locale.
*
* PARAMS
* localename [I] Locale to format for
* flags [I] LOCALE_ and TIME_ flags from "winnls.h"
* time [I] Time to format
* format [I] Formatting overrides
* outbuf [O] Destination for formatted string
* bufsize [I] Size of outbuf, or 0 to calculate the resulting size
*
* See GetTimeFormatA for notes.
*
* RETURNS
* Success: The number of characters written to outbuf, or that would have
* have been written if bufsize is 0.
* Failure: 0. Use GetLastError() to determine the cause.
*/
INT
WINAPI
GetTimeFormatEx
(
LPCWSTR
localename
,
DWORD
flags
,
const
SYSTEMTIME
*
time
,
LPCWSTR
format
,
LPWSTR
outbuf
,
INT
bufsize
)
{
TRACE
(
"(%s,0x%08x,%p,%s,%p,%d)
\n
"
,
debugstr_w
(
localename
),
flags
,
time
,
debugstr_w
(
format
),
outbuf
,
bufsize
);
return
NLS_GetDateTimeFormatW
(
LocaleNameToLCID
(
localename
,
0
),
flags
|
TIME_TIMEVARSONLY
,
time
,
format
,
outbuf
,
bufsize
);
}
/******************************************************************************
* GetTimeFormatW [KERNEL32.@]
*
* See GetTimeFormatA.
...
...
dlls/kernel32/tests/locale.c
View file @
6cd0eb20
This diff is collapsed.
Click to expand it.
include/winnls.h
View file @
6cd0eb20
...
...
@@ -827,6 +827,7 @@ WINBASEAPI INT WINAPI GetCurrencyFormatA(LCID,DWORD,LPCSTR,const CURRENC
WINBASEAPI
INT
WINAPI
GetCurrencyFormatW
(
LCID
,
DWORD
,
LPCWSTR
,
const
CURRENCYFMTW
*
,
LPWSTR
,
INT
);
#define GetCurrencyFormat WINELIB_NAME_AW(GetCurrencyFormat)
WINBASEAPI
INT
WINAPI
GetDateFormatA
(
LCID
,
DWORD
,
const
SYSTEMTIME
*
,
LPCSTR
,
LPSTR
,
INT
);
WINBASEAPI
INT
WINAPI
GetDateFormatEx
(
LPCWSTR
,
DWORD
,
const
SYSTEMTIME
*
,
LPCWSTR
,
LPWSTR
,
INT
,
LPCWSTR
);
WINBASEAPI
INT
WINAPI
GetDateFormatW
(
LCID
,
DWORD
,
const
SYSTEMTIME
*
,
LPCWSTR
,
LPWSTR
,
INT
);
#define GetDateFormat WINELIB_NAME_AW(GetDateFormat)
WINBASEAPI
INT
WINAPI
GetGeoInfoA
(
GEOID
,
GEOTYPE
,
LPSTR
,
INT
,
LANGID
);
...
...
@@ -850,6 +851,7 @@ WINBASEAPI LCID WINAPI GetSystemDefaultLCID(void);
WINBASEAPI
LANGID
WINAPI
GetSystemDefaultUILanguage
(
void
);
WINBASEAPI
LCID
WINAPI
GetThreadLocale
(
void
);
WINBASEAPI
INT
WINAPI
GetTimeFormatA
(
LCID
,
DWORD
,
const
SYSTEMTIME
*
,
LPCSTR
,
LPSTR
,
INT
);
WINBASEAPI
INT
WINAPI
GetTimeFormatEx
(
LPCWSTR
,
DWORD
,
const
SYSTEMTIME
*
,
LPCWSTR
,
LPWSTR
,
INT
);
WINBASEAPI
INT
WINAPI
GetTimeFormatW
(
LCID
,
DWORD
,
const
SYSTEMTIME
*
,
LPCWSTR
,
LPWSTR
,
INT
);
#define GetTimeFormat WINELIB_NAME_AW(GetTimeFormat)
WINBASEAPI
LANGID
WINAPI
GetUserDefaultLangID
(
void
);
...
...
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