From d1731eb98a2d1143fe7b7b7d58abb2c3c57a1754 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Delanoy?= Date: Sat, 20 Aug 2011 01:58:53 +0200 Subject: [PATCH] cmd: Use CSTR_* instead of hardcoded values as result of CompareStringW. --- programs/cmd/builtins.c | 12 ++++++------ programs/cmd/wcmdmain.c | 16 ++++++++-------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index 09c166fb0f1..254b2c7455b 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -1003,7 +1003,7 @@ void WCMD_for (WCHAR *p, CMD_LIST **cmdList) { WINE_TRACE("Looking for 'do' in %p\n", *cmdList); if ((*cmdList == NULL) || (CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, - (*cmdList)->command, 3, doW, -1) != 2)) { + (*cmdList)->command, 3, doW, -1) != CSTR_EQUAL)) { WCMD_output (WCMD_LoadMessage(WCMD_SYNTAXERR)); return; } @@ -1277,7 +1277,7 @@ void WCMD_part_execute(CMD_LIST **cmdList, WCHAR *firstcmd, WCHAR *variable, } else { if (isIF && CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, - (*cmdList)->command, 5, ifElse, -1) == 2) { + (*cmdList)->command, 5, ifElse, -1) == CSTR_EQUAL) { /* Swap between if and else processing */ processThese = !processThese; @@ -1320,7 +1320,7 @@ void WCMD_give_help (WCHAR *command) { else { for (i=0; i<=WCMD_EXIT; i++) { if (CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, - command, -1, inbuilt[i], -1) == 2) { + command, -1, inbuilt[i], -1) == CSTR_EQUAL) { WCMD_output_asis (WCMD_LoadMessage(i)); return; } @@ -2090,7 +2090,7 @@ void WCMD_setshow_default (WCHAR *command) { /* Skip /D and trailing whitespace if on the front of the command line */ if (CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, - command, 2, parmD, -1) == 2) { + command, 2, parmD, -1) == CSTR_EQUAL) { command += 2; while (*command && *command==' ') command++; } @@ -2262,7 +2262,7 @@ static int WCMD_setshow_sortenv(const WCHAR *s, const WCHAR *stub) for( i=0; i