Commit 1a4db7cd authored by Daniel Lehman's avatar Daniel Lehman Committed by Alexandre Julliard

msvcrt: Add _W_GetMonths.

parent bc1eaf7a
......@@ -865,7 +865,7 @@
@ cdecl _Strftime(str long str ptr ptr)
@ stub _Unlock_shared_ptr_spin_lock
@ cdecl _W_Getdays()
@ stub _W_Getmonths
@ cdecl _W_Getmonths()
@ stub _W_Gettnames
@ stub _Wcsftime
@ cdecl _XcptFilter(long ptr)
......
......@@ -847,7 +847,7 @@
@ stub -arch=win64 _SetThrowImageBase
@ cdecl _Strftime(str long str ptr ptr)
@ cdecl _W_Getdays()
@ stub _W_Getmonths
@ cdecl _W_Getmonths()
@ stub _W_Gettnames
@ stub _Wcsftime
@ cdecl _XcptFilter(long ptr)
......
......@@ -843,7 +843,7 @@
@ stub -arch=win64 _SetThrowImageBase
@ cdecl _Strftime(str long str ptr ptr) msvcr120._Strftime
@ cdecl _W_Getdays() msvcr120._W_Getdays
@ stub _W_Getmonths
@ cdecl _W_Getmonths() msvcr120._W_Getmonths
@ stub _W_Gettnames
@ stub _Wcsftime
@ cdecl _XcptFilter(long ptr) msvcr120._XcptFilter
......
......@@ -507,6 +507,39 @@ char* CDECL _Getmonths(void)
}
/*********************************************************************
* _W_Getmonths (MSVCRT.@)
*/
MSVCRT_wchar_t* CDECL _W_Getmonths(void)
{
MSVCRT___lc_time_data *cur = get_locinfo()->lc_time_curr;
MSVCRT_wchar_t *out;
int i, len, size;
TRACE("\n");
size = cur->wstr.names.am-cur->wstr.names.short_mon[0];
out = MSVCRT_malloc((size+1)*sizeof(*out));
if(!out)
return NULL;
size = 0;
for(i=0; i<12; i++) {
out[size++] = ':';
len = strlenW(cur->wstr.names.short_mon[i]);
memcpy(&out[size], cur->wstr.names.short_mon[i], len*sizeof(*out));
size += len;
out[size++] = ':';
len = strlenW(cur->wstr.names.mon[i]);
memcpy(&out[size], cur->wstr.names.mon[i], len*sizeof(*out));
size += len;
}
out[size] = '\0';
return out;
}
/*********************************************************************
* _Gettnames (MSVCRT.@)
*/
void* CDECL _Gettnames(void)
......
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