Piotr Caban : msvcp90: Add time_get<char>::do_get_time implementation.

Alexandre Julliard julliard at winehq.org
Wed Aug 15 14:39:55 CDT 2018


Module: wine
Branch: master
Commit: 58123a2b6ec11ffa574904290f21103d7dda2b0e
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=58123a2b6ec11ffa574904290f21103d7dda2b0e

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Wed Aug 15 12:49:01 2018 +0200

msvcp90: Add time_get<char>::do_get_time implementation.

Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/msvcp90/locale.c | 24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c
index c100c9a..656aa65 100644
--- a/dlls/msvcp90/locale.c
+++ b/dlls/msvcp90/locale.c
@@ -10136,8 +10136,28 @@ istreambuf_iterator_char* __thiscall time_get_char_do_get_time(const time_get_ch
         istreambuf_iterator_char *ret, istreambuf_iterator_char s, istreambuf_iterator_char e,
         ios_base *base, int *err, struct tm *t)
 {
-    FIXME("(%p %p %p %p %p) stub\n", this, ret, base, err, t);
-    return NULL;
+    TRACE("(%p %p %p %p %p)\n", this, ret, base, err, t);
+
+    *err |= time_get_char__Getint(this, &s, &e, 0, 23, &t->tm_hour);
+    if (*err || istreambuf_iterator_char_val(&s)!=':')
+        *err |= IOSTATE_failbit;
+
+    if (!*err)
+    {
+        istreambuf_iterator_char_inc(&s);
+        *err |= time_get_char__Getint(this, &s, &e, 0, 59, &t->tm_min);
+    }
+    if (*err || istreambuf_iterator_char_val(&s)!=':')
+        *err |= IOSTATE_failbit;
+
+    if (!*err)
+    {
+        istreambuf_iterator_char_inc(&s);
+        *err |= time_get_char__Getint(this, &s, &e, 0, 59, &t->tm_sec);
+    }
+
+    *ret = s;
+    return ret;
 }
 
 /* ?get_time@?$time_get at DV?$istreambuf_iterator at DU?$char_traits at D@std@@@std@@@std@@QBE?AV?$istreambuf_iterator at DU?$char_traits at D@std@@@2 at V32@0AAVios_base at 2@AAHPAUtm@@@Z */




More information about the wine-cvs mailing list