Dump a few more known variant types.

Don't call DateToTM() - it's going away soon.
This commit is contained in:
Jon Griffiths 2003-11-14 20:59:46 +00:00 committed by Alexandre Julliard
parent 998cdd650a
commit bb61fe35a2
1 changed files with 11 additions and 7 deletions

View File

@ -810,6 +810,11 @@ static void dump_VarType(VARTYPE vt,char *szVarType) {
if (vt & VT_VECTOR) if (vt & VT_VECTOR)
szVarType += strlen(strcpy(szVarType, "vector of ")); szVarType += strlen(strcpy(szVarType, "vector of "));
switch(vt & VT_TYPEMASK) { switch(vt & VT_TYPEMASK) {
case VT_EMPTY: sprintf(szVarType, "VT_EMPTY"); break;
case VT_NULL: sprintf(szVarType, "VT_NULL"); break;
case VT_RECORD: sprintf(szVarType, "VT_RECORD"); break;
case VT_I8: sprintf(szVarType, "VT_I8"); break;
case VT_UI8: sprintf(szVarType, "VT_UI8"); break;
case VT_UI1: sprintf(szVarType, "VT_UI"); break; case VT_UI1: sprintf(szVarType, "VT_UI"); break;
case VT_I2: sprintf(szVarType, "VT_I2"); break; case VT_I2: sprintf(szVarType, "VT_I2"); break;
case VT_I4: sprintf(szVarType, "VT_I4"); break; case VT_I4: sprintf(szVarType, "VT_I4"); break;
@ -1106,15 +1111,14 @@ void dump_Variant(VARIANT * pvar)
case VT_DATE: case VT_DATE:
{ {
struct tm TM; SYSTEMTIME st;
memset( &TM, 0, sizeof(TM) );
if( DateToTm( *(DATE*)ref, 0, &TM ) == FALSE ) { if(!VariantTimeToSystemTime(*(DATE*)ref, &st)) {
TRACE("invalid date? (?)%ld %f\n", *(long*)ref, *(double *)ref); TRACE("invalid date? (?)%ld %f\n", *(long*)ref, *(double *)ref);
} else { } else {
TRACE("(yyyymmdd) %4.4d-%2.2d-%2.2d (time) %2.2d:%2.2d:%2.2d [%f]\n", TRACE("(yyyymmdd) %4.4d-%2.2d-%2.2d (time) %2.2d:%2.2d:%2.2d [%f]\n",
TM.tm_year, TM.tm_mon+1, TM.tm_mday, st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute,
TM.tm_hour, TM.tm_min, TM.tm_sec, *(double *)ref); st.wSecond, *(double *)ref);
} }
break; break;
} }