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) { ...@@ -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 ...@@ -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
......
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