diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index 2438b5ea06..66ec34c6b5 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -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) diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index dbbf05ffbd..2a3a813801 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -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) diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec index 6f6a9809d9..0c66cc22ce 100644 --- a/dlls/msvcr120_app/msvcr120_app.spec +++ b/dlls/msvcr120_app/msvcr120_app.spec @@ -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 diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c index 8a5c1103ef..3e9e99b188 100644 --- a/dlls/msvcrt/locale.c +++ b/dlls/msvcrt/locale.c @@ -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.@) */