Commit a074d0c3 authored by Alexandre Julliard's avatar Alexandre Julliard

kernelbase: Reimplement GetCalendarInfoEx/W using the locale.nls data.

parent 65fc470d
......@@ -1763,12 +1763,10 @@ int WINAPI GetCalendarInfoA( LCID lcid, CALID id, CALTYPE type, LPSTR data, int
int ret, sizeW = size;
LPWSTR dataW = NULL;
if (NLS_IsUnicodeOnlyLcid(lcid))
{
SetLastError(ERROR_INVALID_PARAMETER);
return 0;
}
if (!size && !(type & CAL_RETURN_NUMBER)) sizeW = GetCalendarInfoW( lcid, id, type, NULL, 0, NULL );
if (type & CAL_RETURN_NUMBER)
return GetCalendarInfoW( lcid, id, type, (WCHAR *)data, size, val ) * sizeof(WCHAR);
if (!size) sizeW = GetCalendarInfoW( lcid, id, type, NULL, 0, NULL );
if (!(dataW = HeapAlloc(GetProcessHeap(), 0, sizeW * sizeof(WCHAR)))) return 0;
ret = GetCalendarInfoW( lcid, id, type, dataW, sizeW, val );
......
......@@ -908,6 +908,7 @@ WINBASEAPI BOOL WINAPI GetCPInfoExA(UINT,DWORD,LPCPINFOEXA);
WINBASEAPI BOOL WINAPI GetCPInfoExW(UINT,DWORD,LPCPINFOEXW);
#define GetCPInfoEx WINELIB_NAME_AW(GetCPInfoEx)
WINBASEAPI INT WINAPI GetCalendarInfoA(LCID,DWORD,DWORD,LPSTR,INT,LPDWORD);
WINBASEAPI INT WINAPI GetCalendarInfoEx(const WCHAR*,CALID,const WCHAR*,CALTYPE,WCHAR*,INT,DWORD*);
WINBASEAPI INT WINAPI GetCalendarInfoW(LCID,DWORD,DWORD,LPWSTR,INT,LPDWORD);
#define GetCalendarInfo WINELIB_NAME_AW(GetCalendarInfo)
WINBASEAPI INT WINAPI GetCurrencyFormatA(LCID,DWORD,LPCSTR,const CURRENCYFMTA*,LPSTR,INT);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment