mirror of
https://github.com/reactos/wine.git
synced 2024-12-02 00:36:43 +00:00
msvcrt: Add _W_Getdays.
This commit is contained in:
parent
5ac70b2c23
commit
bc1eaf7a0f
@ -864,7 +864,7 @@
|
||||
@ stub -arch=win64 _SetThrowImageBase
|
||||
@ cdecl _Strftime(str long str ptr ptr)
|
||||
@ stub _Unlock_shared_ptr_spin_lock
|
||||
@ stub _W_Getdays
|
||||
@ cdecl _W_Getdays()
|
||||
@ stub _W_Getmonths
|
||||
@ stub _W_Gettnames
|
||||
@ stub _Wcsftime
|
||||
|
@ -846,7 +846,7 @@
|
||||
@ stub -arch=win64 _SetImageBase
|
||||
@ stub -arch=win64 _SetThrowImageBase
|
||||
@ cdecl _Strftime(str long str ptr ptr)
|
||||
@ stub _W_Getdays
|
||||
@ cdecl _W_Getdays()
|
||||
@ stub _W_Getmonths
|
||||
@ stub _W_Gettnames
|
||||
@ stub _Wcsftime
|
||||
|
@ -842,7 +842,7 @@
|
||||
@ stub -arch=win64 _SetImageBase
|
||||
@ stub -arch=win64 _SetThrowImageBase
|
||||
@ cdecl _Strftime(str long str ptr ptr) msvcr120._Strftime
|
||||
@ stub _W_Getdays
|
||||
@ cdecl _W_Getdays() msvcr120._W_Getdays
|
||||
@ stub _W_Getmonths
|
||||
@ stub _W_Gettnames
|
||||
@ stub _Wcsftime
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "mtdll.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
|
||||
|
||||
@ -439,6 +440,39 @@ char* CDECL _Getdays(void)
|
||||
return out;
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* _W_Getdays (MSVCRT.@)
|
||||
*/
|
||||
MSVCRT_wchar_t* CDECL _W_Getdays(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.short_mon[0]-cur->wstr.names.short_wday[0];
|
||||
out = MSVCRT_malloc((size+1)*sizeof(*out));
|
||||
if(!out)
|
||||
return NULL;
|
||||
|
||||
size = 0;
|
||||
for(i=0; i<7; i++) {
|
||||
out[size++] = ':';
|
||||
len = strlenW(cur->wstr.names.short_wday[i]);
|
||||
memcpy(&out[size], cur->wstr.names.short_wday[i], len*sizeof(*out));
|
||||
size += len;
|
||||
|
||||
out[size++] = ':';
|
||||
len = strlenW(cur->wstr.names.wday[i]);
|
||||
memcpy(&out[size], cur->wstr.names.wday[i], len*sizeof(*out));
|
||||
size += len;
|
||||
}
|
||||
out[size] = '\0';
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* _Getmonths (MSVCRT.@)
|
||||
*/
|
||||
@ -1381,7 +1415,7 @@ MSVCRT__locale_t CDECL MSVCRT__create_locale(int category, const char *locale)
|
||||
}
|
||||
}
|
||||
for(i=0; i<sizeof(time_data)/sizeof(time_data[0]); i++) {
|
||||
loc->locinfo->lc_time_curr->wstr[i] = (MSVCRT_wchar_t*)&loc->locinfo->lc_time_curr->data[ret];
|
||||
loc->locinfo->lc_time_curr->wstr.wstr[i] = (MSVCRT_wchar_t*)&loc->locinfo->lc_time_curr->data[ret];
|
||||
if(time_data[i]==LOCALE_SSHORTDATE && !lcid[MSVCRT_LC_TIME]) {
|
||||
memcpy(&loc->locinfo->lc_time_curr->data[ret], cloc_short_dateW, sizeof(cloc_short_dateW));
|
||||
ret += sizeof(cloc_short_dateW);
|
||||
|
@ -134,7 +134,20 @@ typedef struct {
|
||||
} str;
|
||||
LCID lcid;
|
||||
int unk[2];
|
||||
MSVCRT_wchar_t *wstr[43];
|
||||
union {
|
||||
MSVCRT_wchar_t *wstr[43];
|
||||
struct {
|
||||
MSVCRT_wchar_t *short_wday[7];
|
||||
MSVCRT_wchar_t *wday[7];
|
||||
MSVCRT_wchar_t *short_mon[12];
|
||||
MSVCRT_wchar_t *mon[12];
|
||||
MSVCRT_wchar_t *am;
|
||||
MSVCRT_wchar_t *pm;
|
||||
MSVCRT_wchar_t *short_date;
|
||||
MSVCRT_wchar_t *date;
|
||||
MSVCRT_wchar_t *time;
|
||||
} names;
|
||||
} wstr;
|
||||
char data[1];
|
||||
} MSVCRT___lc_time_data;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user