msvcrt: Add _W_GetMonths.

oldstable
Daniel Lehman 2015-06-08 17:10:01 -07:00 committed by Alexandre Julliard
parent bc1eaf7a0f
commit 1a4db7cdf5
4 changed files with 36 additions and 3 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -506,6 +506,39 @@ char* CDECL _Getmonths(void)
return out;
}
/*********************************************************************
* _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.@)
*/