Commit cd9451c4 authored by Jason Edmeades's avatar Jason Edmeades Committed by Alexandre Julliard

cmd: Display 'set' sort ordering correctly.

parent a810e41e
......@@ -2234,13 +2234,16 @@ void WCMD_setshow_date (void) {
/****************************************************************************
* 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 )
{
int r;
const WCHAR * const *str_a = a, * const *str_b = b;
static const WCHAR eqW[] = {'=','\0'};
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_GREATER_THAN ) return 1;
return 0;
......
......@@ -235,8 +235,8 @@ FOOBAR = baz
baz2
0
bar
@todo_wine@FOOBAR= bar
@todo_wine@FOOBAR = baz2
FOOBAR= bar
FOOBAR = baz2
FOOBAR = baz2
FOOBAR not defined
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