Changeset 6607 for trunk/src


Ignore:
Timestamp:
Aug 29, 2001, 7:15:11 PM (24 years ago)
Author:
phaller
Message:

.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/ole2nls.cpp

    r5764 r6607  
    3939#ifdef __WIN32OS2__
    4040#include <wctype.h>
     41#include <unicode.h>
    4142
    4243#define DBG_LOCALLOG    DBG_kernel32
     
    32423243                              LPWSTR date, INT datelen)
    32433244{
     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
    32443272   unsigned short datearr[] = {'1','9','9','4','-','1','-','1',0};
    32453273
     
    32473275   lstrcpynW(date, datearr, datelen);
    32483276   return (  datelen < 9) ? datelen : 9;
    3249    
    3250    
     3277#endif
    32513278}
    32523279
Note: See TracChangeset for help on using the changeset viewer.