Changeset 8777 for trunk/src/kernel32/time.cpp
- Timestamp:
- Jun 26, 2002, 9:42:35 AM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/time.cpp
r8765 r8777 1 /* $Id: time.cpp,v 1.2 0 2002-06-25 18:01:53sandervl Exp $ */1 /* $Id: time.cpp,v 1.21 2002-06-26 07:42:35 sandervl Exp $ */ 2 2 3 3 /* … … 36 36 #define DBG_LOCALLOG DBG_time 37 37 #include "dbglocal.h" 38 39 /*****************************************************************************40 * Defines *41 *****************************************************************************/42 43 ODINDEBUGCHANNEL(KERNEL32-TIME)44 45 46 47 #define lstrcpynAtoW(unicode,ascii,asciilen) AsciiToUnicodeN(ascii,unicode,asciilen);48 49 #define WPRINTF_LEFTALIGN 0x0001 /* Align output on the left ('-' prefix) */50 #define WPRINTF_PREFIX_HEX 0x0002 /* Prefix hex with 0x ('#' prefix) */51 #define WPRINTF_ZEROPAD 0x0004 /* Pad with zeros ('0' prefix) */52 #define WPRINTF_LONG 0x0008 /* Long arg ('l' prefix) */53 #define WPRINTF_SHORT 0x0010 /* Short arg ('h' prefix) */54 #define WPRINTF_UPPER_HEX 0x0020 /* Upper-case hex ('X' specifier) */55 #define WPRINTF_WIDE 0x0040 /* Wide arg ('w' prefix) */56 57 typedef enum58 {59 WPR_UNKNOWN,60 WPR_CHAR,61 WPR_WCHAR,62 WPR_STRING,63 WPR_WSTRING,64 WPR_SIGNED,65 WPR_UNSIGNED,66 WPR_HEXA67 } WPRINTF_TYPE;68 69 typedef struct70 {71 UINT flags;72 UINT width;73 UINT precision;74 WPRINTF_TYPE type;75 } WPRINTF_FORMAT;76 77 typedef union {78 WCHAR wchar_view;79 CHAR char_view;80 LPCSTR lpcstr_view;81 LPCWSTR lpcwstr_view;82 INT int_view;83 } WPRINTF_DATA;84 85 static const CHAR null_stringA[] = "(null)";86 static const WCHAR null_stringW[] = { '(', 'n', 'u', 'l', 'l', ')', 0 };87 38 88 39 //****************************************************************************** … … 129 80 BOOL WIN32API DosDateTimeToFileTime(WORD arg1, WORD arg2, LPFILETIME arg3) 130 81 { 131 BOOL rc; 132 rc = O32_DosDateTimeToFileTime(arg1, arg2, arg3); 133 /* Bug in WGSS after that we must have UCT file time on return, 134 instead we have local! */ 135 if (rc) 136 { 137 FILETIME dummy; 138 /* Convert it to UCT */ 139 rc = LocalFileTimeToFileTime(arg3,&dummy); 140 memcpy(arg3,&dummy,sizeof(FILETIME)); 141 } 142 return rc; 82 return O32_DosDateTimeToFileTime(arg1, arg2, arg3); 143 83 } 144 84 //****************************************************************************** … … 166 106 LPFILETIME arg2) 167 107 { 168 BOOL rc; 169 rc = O32_SystemTimeToFileTime(arg1, arg2); 170 /* Bug in WGSS after that we must have UCT file time on return, 171 instead we have local! */ 172 if (rc) 173 { 174 FILETIME dummy; 175 /* Convert it to local */ 176 rc = LocalFileTimeToFileTime(arg2,&dummy); 177 memcpy(arg2,&dummy,sizeof(FILETIME)); 178 } 179 return rc; 108 return O32_SystemTimeToFileTime(arg1, arg2); 180 109 } 181 110 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.