Commit c9571587 authored by Alexandre Julliard's avatar Alexandre Julliard

kernelbase: Reimplement values computed from currency formats in GetLocaleInfoW/Ex.

parent 08a9dc50
...@@ -1042,6 +1042,9 @@ static int get_locale_info( const NLS_LOCALE_DATA *locale, LCID lcid, LCTYPE typ ...@@ -1042,6 +1042,9 @@ static int get_locale_info( const NLS_LOCALE_DATA *locale, LCID lcid, LCTYPE typ
WCHAR *buffer, int len ) WCHAR *buffer, int len )
{ {
static const WCHAR spermille[] = { 0x2030, 0 }; /* this one seems hardcoded */ static const WCHAR spermille[] = { 0x2030, 0 }; /* this one seems hardcoded */
static const BYTE ipossignposn[] = { 3, 3, 4, 2, 1, 1, 3, 4, 1, 3, 4, 2, 4, 3, 3, 1 };
static const BYTE inegsignposn[] = { 0, 3, 4, 2, 0, 1, 3, 4, 1, 3, 4, 2, 4, 3, 0, 0 };
static const BYTE inegsymprecedes[] = { 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, };
const WCHAR *sort; const WCHAR *sort;
UINT val; UINT val;
...@@ -1234,22 +1237,40 @@ static int get_locale_info( const NLS_LOCALE_DATA *locale, LCID lcid, LCTYPE typ ...@@ -1234,22 +1237,40 @@ static int get_locale_info( const NLS_LOCALE_DATA *locale, LCID lcid, LCTYPE typ
return locale_return_string( locale->snegativesign, type, buffer, len ); return locale_return_string( locale->snegativesign, type, buffer, len );
case LOCALE_IPOSSIGNPOSN: case LOCALE_IPOSSIGNPOSN:
return -1; if (!get_locale_info( locale, lcid,
LOCALE_INEGCURR | LOCALE_RETURN_NUMBER | (type & LOCALE_NOUSEROVERRIDE),
(WCHAR *)&val, sizeof(val)/sizeof(WCHAR) )) break;
return locale_return_number( ipossignposn[val], type, buffer, len );
case LOCALE_INEGSIGNPOSN: case LOCALE_INEGSIGNPOSN:
return -1; if (!get_locale_info( locale, lcid,
LOCALE_INEGCURR | LOCALE_RETURN_NUMBER | (type & LOCALE_NOUSEROVERRIDE),
(WCHAR *)&val, sizeof(val)/sizeof(WCHAR) )) break;
return locale_return_number( inegsignposn[val], type, buffer, len );
case LOCALE_IPOSSYMPRECEDES: case LOCALE_IPOSSYMPRECEDES:
return -1; if (!get_locale_info( locale, lcid,
LOCALE_ICURRENCY | LOCALE_RETURN_NUMBER | (type & LOCALE_NOUSEROVERRIDE),
(WCHAR *)&val, sizeof(val)/sizeof(WCHAR) )) break;
return locale_return_number( !(val & 1), type, buffer, len );
case LOCALE_IPOSSEPBYSPACE: case LOCALE_IPOSSEPBYSPACE:
return -1; if (!get_locale_info( locale, lcid,
LOCALE_ICURRENCY | LOCALE_RETURN_NUMBER | (type & LOCALE_NOUSEROVERRIDE),
(WCHAR *)&val, sizeof(val)/sizeof(WCHAR) )) break;
return locale_return_number( !!(val & 2), type, buffer, len );
case LOCALE_INEGSYMPRECEDES: case LOCALE_INEGSYMPRECEDES:
return -1; if (!get_locale_info( locale, lcid,
LOCALE_INEGCURR | LOCALE_RETURN_NUMBER | (type & LOCALE_NOUSEROVERRIDE),
(WCHAR *)&val, sizeof(val)/sizeof(WCHAR) )) break;
return locale_return_number( inegsymprecedes[val], type, buffer, len );
case LOCALE_INEGSEPBYSPACE: case LOCALE_INEGSEPBYSPACE:
return -1; if (!get_locale_info( locale, lcid,
LOCALE_INEGCURR | LOCALE_RETURN_NUMBER | (type & LOCALE_NOUSEROVERRIDE),
(WCHAR *)&val, sizeof(val)/sizeof(WCHAR) )) break;
return locale_return_number( (val >= 8), type, buffer, len );
case LOCALE_FONTSIGNATURE: case LOCALE_FONTSIGNATURE:
return locale_return_data( locale_strings + locale->fontsignature + 1, return locale_return_data( locale_strings + locale->fontsignature + 1,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment