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

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Piotr Caban 2018-08-15 12:49:05 +02:00 committed by Alexandre Julliard
parent 58123a2b6e
commit fe90fdfebd
1 changed files with 18 additions and 2 deletions

View File

@ -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@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AAVios_base@2@AAHPAUtm@@@Z */