Piotr Caban : msvcrt: Added _Gettnames implementation.
Alexandre Julliard
julliard at winehq.org
Wed Dec 7 13:57:14 CST 2011
Module: wine
Branch: master
Commit: 4bb1e9c32ad64aa5e668fd1ae0a3fcb970b848e7
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4bb1e9c32ad64aa5e668fd1ae0a3fcb970b848e7
Author: Piotr Caban <piotr at codeweavers.com>
Date: Wed Dec 7 13:48:36 2011 +0100
msvcrt: Added _Gettnames implementation.
---
dlls/msvcrt/locale.c | 25 +++++++++++++++++++++----
1 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c
index 1c91658..aa5fe84 100644
--- a/dlls/msvcrt/locale.c
+++ b/dlls/msvcrt/locale.c
@@ -444,11 +444,28 @@ const char* CDECL _Getmonths(void)
/*********************************************************************
* _Gettnames (MSVCRT.@)
*/
-const char* CDECL _Gettnames(void)
+void* CDECL _Gettnames(void)
{
- /* FIXME: */
- TRACE("(void) stub\n");
- return "";
+ MSVCRT___lc_time_data *ret, *cur = get_locinfo()->lc_time_curr;
+ int i, size = sizeof(MSVCRT___lc_time_data);
+
+ TRACE("\n");
+
+ for(i=0; i<sizeof(cur->str)/sizeof(cur->str[0]); i++)
+ size += strlen(cur->str[i])+1;
+
+ ret = MSVCRT_malloc(size);
+ if(!ret)
+ return NULL;
+ memcpy(ret, cur, size);
+
+ size = 0;
+ for(i=0; i<sizeof(cur->str)/sizeof(cur->str[0]); i++) {
+ ret->str[i] = &ret->data[size];
+ size += strlen(&ret->data[size])+1;
+ }
+
+ return ret;
}
/*********************************************************************
More information about the wine-cvs
mailing list