Piotr Caban : msvcp90: Add time_get<char>::do_get_year implementation.
Alexandre Julliard
julliard at winehq.org
Wed Aug 15 14:39:55 CDT 2018
Module: wine
Branch: master
Commit: fe90fdfebd1dee2681a8b7555220cb536e072c75
URL: https://source.winehq.org/git/wine.git/?a=commit;h=fe90fdfebd1dee2681a8b7555220cb536e072c75
Author: Piotr Caban <piotr at codeweavers.com>
Date: Wed Aug 15 12:49:05 2018 +0200
msvcp90: Add time_get<char>::do_get_year implementation.
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/msvcp90/locale.c | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c
index 656aa65..b506c9e 100644
--- a/dlls/msvcp90/locale.c
+++ b/dlls/msvcp90/locale.c
@@ -10216,8 +10216,24 @@ istreambuf_iterator_char* __thiscall time_get_char_do_get_year(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;
+ int year;
+
+ TRACE("(%p %p %p %p %p)\n", this, ret, base, err, t);
+
+ /* The function supports only dates from [1900-2035] range */
+ *err |= time_get_char__Getint(this, &s, &e, 0, 2035, &year);
+ if (!(*err & IOSTATE_failbit))
+ {
+ if (year >= 1900)
+ year -= 1900;
+ if (year > 135)
+ *err |= IOSTATE_failbit;
+ else
+ t->tm_year = year;
+ }
+
+ *ret = s;
+ return ret;
}
/* ?get_year@?$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