cmd: Display 'set' sort ordering correctly.
This commit is contained in:
parent
a810e41e47
commit
cd9451c499
@ -2234,13 +2234,16 @@ void WCMD_setshow_date (void) {
|
|||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* WCMD_compare
|
* WCMD_compare
|
||||||
|
* Note: Native displays 'fred' before 'fred ', so need to only compare up to
|
||||||
|
* the equals sign.
|
||||||
*/
|
*/
|
||||||
static int WCMD_compare( const void *a, const void *b )
|
static int WCMD_compare( const void *a, const void *b )
|
||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
const WCHAR * const *str_a = a, * const *str_b = b;
|
const WCHAR * const *str_a = a, * const *str_b = b;
|
||||||
|
static const WCHAR eqW[] = {'=','\0'};
|
||||||
r = CompareStringW( LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT,
|
r = CompareStringW( LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT,
|
||||||
*str_a, -1, *str_b, -1 );
|
*str_a, strcspnW(*str_a, eqW), *str_b, strcspnW(*str_b, eqW) );
|
||||||
if( r == CSTR_LESS_THAN ) return -1;
|
if( r == CSTR_LESS_THAN ) return -1;
|
||||||
if( r == CSTR_GREATER_THAN ) return 1;
|
if( r == CSTR_GREATER_THAN ) return 1;
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -235,8 +235,8 @@ FOOBAR = baz
|
|||||||
baz2
|
baz2
|
||||||
0
|
0
|
||||||
bar
|
bar
|
||||||
@todo_wine@FOOBAR= bar
|
FOOBAR= bar
|
||||||
@todo_wine@FOOBAR = baz2
|
FOOBAR = baz2
|
||||||
FOOBAR = baz2
|
FOOBAR = baz2
|
||||||
FOOBAR not defined
|
FOOBAR not defined
|
||||||
1
|
1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user