- Timestamp:
- Aug 29, 2001, 7:15:11 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/ole2nls.cpp
r5764 r6607 39 39 #ifdef __WIN32OS2__ 40 40 #include <wctype.h> 41 #include <unicode.h> 41 42 42 43 #define DBG_LOCALLOG DBG_kernel32 … … 3242 3243 LPWSTR date, INT datelen) 3243 3244 { 3245 // convert "format" on passing in into ASCII 3246 LPSTR pszAsciiFormat = UnicodeToAsciiString((LPWSTR) format); 3247 LPSTR pszAsciiDate = (char *)alloca(datelen); 3248 3249 TRACE("Kernel32-ole2nls: GetDateFormatW(0x%04lx,0x%08lx,%p,%s,%p,%d) not yet complete\n", 3250 locale,flags,xtime,pszAsciiFormat,date,datelen); 3251 3252 // call ASCII variant 3253 int rc = GetDateFormatA(locale, 3254 flags, 3255 xtime, 3256 pszAsciiFormat, 3257 pszAsciiDate, 3258 datelen); // is in "characters", not bytes 3259 3260 FreeAsciiString(pszAsciiFormat); 3261 3262 // convert "date" on returning to UNICODE 3263 if (datelen != 0) 3264 { 3265 // in this case 'rc' holds the number of characters to convert 3266 lstrcpynAtoW(date, pszAsciiDate, rc); 3267 } 3268 3269 return rc; 3270 3271 #if PH_OFF 3244 3272 unsigned short datearr[] = {'1','9','9','4','-','1','-','1',0}; 3245 3273 … … 3247 3275 lstrcpynW(date, datearr, datelen); 3248 3276 return ( datelen < 9) ? datelen : 9; 3249 3250 3277 #endif 3251 3278 } 3252 3279
Note:
See TracChangeset
for help on using the changeset viewer.