[ros-diffs] [dchapyshev] 37553: - Fix 2 wine tests for GetTimeFormatA/W

dchapyshev at svn.reactos.org dchapyshev at svn.reactos.org
Sat Nov 22 13:15:24 CET 2008


Author: dchapyshev
Date: Sat Nov 22 06:15:24 2008
New Revision: 37553

URL: http://svn.reactos.org/svn/reactos?rev=37553&view=rev
Log:
- Fix 2 wine tests for GetTimeFormatA/W

Modified:
    trunk/reactos/dll/win32/kernel32/misc/lcformat.c

Modified: trunk/reactos/dll/win32/kernel32/misc/lcformat.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/lcformat.c?rev=37553&r1=37552&r2=37553&view=diff
==============================================================================
--- trunk/reactos/dll/win32/kernel32/misc/lcformat.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/misc/lcformat.c [iso-8859-1] Sat Nov 22 06:15:24 2008
@@ -346,6 +346,8 @@
  */
 BOOL NLS_IsUnicodeOnlyLcid(LCID lcid)
 {
+  lcid = ConvertDefaultLocale(lcid);
+
   switch (PRIMARYLANGID(lcid))
   {
   case LANG_ARMENIAN:
@@ -374,10 +376,10 @@
 #define IsTimeFmtChar(p)   (p == 'H'||p == 'h'||p == 'm'||p == 's'||p == 't')
 
 /* Only the following flags can be given if a date/time format is specified */
-#define DATE_FORMAT_FLAGS (DATE_DATEVARSONLY|LOCALE_NOUSEROVERRIDE)
+#define DATE_FORMAT_FLAGS (DATE_DATEVARSONLY)
 #define TIME_FORMAT_FLAGS (TIME_TIMEVARSONLY|TIME_FORCE24HOURFORMAT| \
                            TIME_NOMINUTESORSECONDS|TIME_NOSECONDS| \
-                           TIME_NOTIMEMARKER|LOCALE_NOUSEROVERRIDE)
+                           TIME_NOTIMEMARKER)
 
 /******************************************************************************
  * NLS_GetDateTimeFormatW <internal>
@@ -755,7 +757,7 @@
   if (lpStr)
   {
     if (szOut[0])
-      WideCharToMultiByte(cp, 0, szOut, -1, lpStr, cchOut, 0, 0);
+      WideCharToMultiByte(cp, 0, szOut, iRet ? -1 : cchOut, lpStr, cchOut, 0, 0);
     else if (cchOut && iRet)
       *lpStr = '\0';
   }



More information about the Ros-diffs mailing list