Alexandre Julliard : kernelbase: Reimplement date/time format strings in GetLocaleInfoW/Ex using the locale.nls data.

Alexandre Julliard julliard at winehq.org
Tue Mar 29 15:09:53 CDT 2022


Module: wine
Branch: master
Commit: 30e8a28c3df80ce9549ff3b43c8935b28936e1ff
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=30e8a28c3df80ce9549ff3b43c8935b28936e1ff

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Mar 29 08:37:12 2022 +0200

kernelbase: Reimplement date/time format strings in GetLocaleInfoW/Ex using the locale.nls data.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/kernelbase/locale.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/dlls/kernelbase/locale.c b/dlls/kernelbase/locale.c
index 16b923915a9..529cc663cd5 100644
--- a/dlls/kernelbase/locale.c
+++ b/dlls/kernelbase/locale.c
@@ -1030,10 +1030,10 @@ static int get_locale_info( const NLS_LOCALE_DATA *locale, LCID lcid, LCTYPE typ
         return -1;
 
     case LOCALE_SSHORTDATE:
-        return -1;
+        return locale_return_strarray( locale->sshortdate, 0, type, buffer, len );
 
     case LOCALE_SLONGDATE:
-        return -1;
+        return locale_return_strarray( locale->slongdate, 0, type, buffer, len );
 
     case LOCALE_IDATE:
         return -1;
@@ -1159,7 +1159,7 @@ static int get_locale_info( const NLS_LOCALE_DATA *locale, LCID lcid, LCTYPE typ
         return locale_return_string( locale->sname, type, buffer, len );
 
     case LOCALE_SDURATION:
-        return -1;
+        return locale_return_strarray( locale->sduration, 0, type, buffer, len );
 
     case LOCALE_SKEYBOARDSTOINSTALL:
         return -1;
@@ -1227,10 +1227,10 @@ static int get_locale_info( const NLS_LOCALE_DATA *locale, LCID lcid, LCTYPE typ
         return locale_return_data( spermille, ARRAY_SIZE(spermille), type, buffer, len );
 
     case LOCALE_SMONTHDAY:
-        return -1;
+        return locale_return_strarray( locale->smonthday, 0, type, buffer, len );
 
     case LOCALE_SSHORTTIME:
-        return -1;
+        return locale_return_strarray( locale->sshorttime, 0, type, buffer, len );
 
     case LOCALE_SOPENTYPELANGUAGETAG:
         return -1;
@@ -1239,7 +1239,7 @@ static int get_locale_info( const NLS_LOCALE_DATA *locale, LCID lcid, LCTYPE typ
         return -1;
 
     case LOCALE_SRELATIVELONGDATE:
-        return -1;
+        return locale_return_string( locale->srelativelongdate, type, buffer, len );
 
     case 0x007d: /* undocumented */
         return -1;
@@ -1257,7 +1257,7 @@ static int get_locale_info( const NLS_LOCALE_DATA *locale, LCID lcid, LCTYPE typ
         return locale_return_string( locale->sengcountry, type, buffer, len );
 
     case LOCALE_STIMEFORMAT:
-        return -1;
+        return locale_return_strarray( locale->stimeformat, 0, type, buffer, len );
 
     case LOCALE_IDEFAULTANSICODEPAGE:
         val = locale->idefaultansicodepage == CP_UTF8 ? CP_ACP : locale->idefaultansicodepage;
@@ -1267,7 +1267,7 @@ static int get_locale_info( const NLS_LOCALE_DATA *locale, LCID lcid, LCTYPE typ
         return -1;
 
     case LOCALE_SYEARMONTH:
-        return -1;
+        return locale_return_strarray( locale->syearmonth, 0, type, buffer, len );
 
     case LOCALE_SENGCURRNAME:
         return locale_return_string( locale->sengcurrname, type, buffer, len );




More information about the wine-cvs mailing list