Commit 0bf71745 authored by Gijs Vermeulen's avatar Gijs Vermeulen Committed by Alexandre Julliard

cmd: Use terminated strings.

parent defb7d9c
...@@ -1533,8 +1533,6 @@ static void WCMD_part_execute(CMD_LIST **cmdList, const WCHAR *firstcmd, ...@@ -1533,8 +1533,6 @@ static void WCMD_part_execute(CMD_LIST **cmdList, const WCHAR *firstcmd,
BOOL processThese = executecmds; BOOL processThese = executecmds;
while (*cmdList) { while (*cmdList) {
static const WCHAR ifElse[] = {'e','l','s','e'};
/* execute all appropriate commands */ /* execute all appropriate commands */
curPosition = *cmdList; curPosition = *cmdList;
...@@ -1566,13 +1564,13 @@ static void WCMD_part_execute(CMD_LIST **cmdList, const WCHAR *firstcmd, ...@@ -1566,13 +1564,13 @@ static void WCMD_part_execute(CMD_LIST **cmdList, const WCHAR *firstcmd,
/* End of the command - does 'ELSE ' follow as the next command? */ /* End of the command - does 'ELSE ' follow as the next command? */
} else { } else {
if (isIF && WCMD_keyword_ws_found(ifElse, ARRAY_SIZE(ifElse), (*cmdList)->command)) { if (isIF && WCMD_keyword_ws_found(L"else", (*cmdList)->command)) {
/* Swap between if and else processing */ /* Swap between if and else processing */
processThese = !executecmds; processThese = !executecmds;
/* Process the ELSE part */ /* Process the ELSE part */
if (processThese) { if (processThese) {
const int keyw_len = ARRAY_SIZE(ifElse) + 1; const int keyw_len = lstrlenW(L"else") + 1;
WCHAR *cmd = ((*cmdList)->command) + keyw_len; WCHAR *cmd = ((*cmdList)->command) + keyw_len;
/* Skip leading whitespace between condition and the command */ /* Skip leading whitespace between condition and the command */
...@@ -1599,8 +1597,7 @@ static void WCMD_part_execute(CMD_LIST **cmdList, const WCHAR *firstcmd, ...@@ -1599,8 +1597,7 @@ static void WCMD_part_execute(CMD_LIST **cmdList, const WCHAR *firstcmd,
the same bracket depth as the IF, then the IF statement is over. This is required the same bracket depth as the IF, then the IF statement is over. This is required
to handle nested ifs properly */ to handle nested ifs properly */
} else if (isIF && (*cmdList)->bracketDepth == myDepth) { } else if (isIF && (*cmdList)->bracketDepth == myDepth) {
static const WCHAR doW[] = {'d','o'}; if (WCMD_keyword_ws_found(L"do", (*cmdList)->command)) {
if (WCMD_keyword_ws_found(doW, ARRAY_SIZE(doW), (*cmdList)->command)) {
WINE_TRACE("Still inside FOR-loop, not an end of IF statement\n"); WINE_TRACE("Still inside FOR-loop, not an end of IF statement\n");
*cmdList = (*cmdList)->nextcommand; *cmdList = (*cmdList)->nextcommand;
} else { } else {
...@@ -1642,11 +1639,11 @@ static BOOL WCMD_parse_forf_options(WCHAR *options, WCHAR *eol, int *skip, ...@@ -1642,11 +1639,11 @@ static BOOL WCMD_parse_forf_options(WCHAR *options, WCHAR *eol, int *skip,
WCHAR *pos = options; WCHAR *pos = options;
int len = lstrlenW(pos); int len = lstrlenW(pos);
static const WCHAR eolW[] = {'e','o','l','='}; const int eol_len = lstrlenW(L"eol=");
static const WCHAR skipW[] = {'s','k','i','p','='}; const int skip_len = lstrlenW(L"skip=");
static const WCHAR tokensW[] = {'t','o','k','e','n','s','='}; const int tokens_len = lstrlenW(L"tokens=");
static const WCHAR delimsW[] = {'d','e','l','i','m','s','='}; const int delims_len = lstrlenW(L"delims=");
static const WCHAR usebackqW[] = {'u','s','e','b','a','c','k','q'}; const int usebackq_len = lstrlenW(L"usebackq");
/* Initialize to defaults */ /* Initialize to defaults */
lstrcpyW(delims, L" \t"); lstrcpyW(delims, L" \t");
...@@ -1668,35 +1665,35 @@ static BOOL WCMD_parse_forf_options(WCHAR *options, WCHAR *eol, int *skip, ...@@ -1668,35 +1665,35 @@ static BOOL WCMD_parse_forf_options(WCHAR *options, WCHAR *eol, int *skip,
/* Save End of line character (Ignore line if first token (based on delims) starts with it) */ /* Save End of line character (Ignore line if first token (based on delims) starts with it) */
} else if (CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, } else if (CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT,
pos, ARRAY_SIZE(eolW), eolW, ARRAY_SIZE(eolW)) == CSTR_EQUAL) { pos, eol_len, L"eol=", eol_len) == CSTR_EQUAL) {
*eol = *(pos + ARRAY_SIZE(eolW)); *eol = *(pos + eol_len);
pos = pos + ARRAY_SIZE(eolW) + 1; pos = pos + eol_len + 1;
WINE_TRACE("Found eol as %c(%x)\n", *eol, *eol); WINE_TRACE("Found eol as %c(%x)\n", *eol, *eol);
/* Save number of lines to skip (Can be in base 10, hex (0x...) or octal (0xx) */ /* Save number of lines to skip (Can be in base 10, hex (0x...) or octal (0xx) */
} else if (CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, } else if (CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT,
pos, ARRAY_SIZE(skipW), skipW, ARRAY_SIZE(skipW)) == CSTR_EQUAL) { pos, skip_len, L"skip=", skip_len) == CSTR_EQUAL) {
WCHAR *nextchar = NULL; WCHAR *nextchar = NULL;
pos = pos + ARRAY_SIZE(skipW); pos = pos + skip_len;
*skip = wcstoul(pos, &nextchar, 0); *skip = wcstoul(pos, &nextchar, 0);
WINE_TRACE("Found skip as %d lines\n", *skip); WINE_TRACE("Found skip as %d lines\n", *skip);
pos = nextchar; pos = nextchar;
/* Save if usebackq semantics are in effect */ /* Save if usebackq semantics are in effect */
} else if (CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, pos, } else if (CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, pos,
ARRAY_SIZE(usebackqW), usebackqW, ARRAY_SIZE(usebackqW)) == CSTR_EQUAL) { usebackq_len, L"usebackq", usebackq_len) == CSTR_EQUAL) {
*usebackq = TRUE; *usebackq = TRUE;
pos = pos + ARRAY_SIZE(usebackqW); pos = pos + usebackq_len;
WINE_TRACE("Found usebackq\n"); WINE_TRACE("Found usebackq\n");
/* Save the supplied delims. Slightly odd as space can be a delimiter but only /* Save the supplied delims. Slightly odd as space can be a delimiter but only
if you finish the optionsroot string with delims= otherwise the space is if you finish the optionsroot string with delims= otherwise the space is
just a token delimiter! */ just a token delimiter! */
} else if (CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, } else if (CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT,
pos, ARRAY_SIZE(delimsW), delimsW, ARRAY_SIZE(delimsW)) == CSTR_EQUAL) { pos, delims_len, L"delims=", delims_len) == CSTR_EQUAL) {
int i=0; int i=0;
pos = pos + ARRAY_SIZE(delimsW); pos = pos + delims_len;
while (*pos && *pos != ' ') { while (*pos && *pos != ' ') {
delims[i++] = *pos; delims[i++] = *pos;
pos++; pos++;
...@@ -1707,10 +1704,10 @@ static BOOL WCMD_parse_forf_options(WCHAR *options, WCHAR *eol, int *skip, ...@@ -1707,10 +1704,10 @@ static BOOL WCMD_parse_forf_options(WCHAR *options, WCHAR *eol, int *skip,
/* Save the tokens being requested */ /* Save the tokens being requested */
} else if (CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, } else if (CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT,
pos, ARRAY_SIZE(tokensW), tokensW, ARRAY_SIZE(tokensW)) == CSTR_EQUAL) { pos, tokens_len, L"tokens=", tokens_len) == CSTR_EQUAL) {
int i=0; int i=0;
pos = pos + ARRAY_SIZE(tokensW); pos = pos + tokens_len;
while (*pos && *pos != ' ') { while (*pos && *pos != ' ') {
tokens[i++] = *pos; tokens[i++] = *pos;
pos++; pos++;
...@@ -2109,8 +2106,7 @@ void WCMD_for (WCHAR *p, CMD_LIST **cmdList) { ...@@ -2109,8 +2106,7 @@ void WCMD_for (WCHAR *p, CMD_LIST **cmdList) {
WIN32_FIND_DATAW fd; WIN32_FIND_DATAW fd;
HANDLE hff; HANDLE hff;
int i; int i;
static const WCHAR inW[] = {'i','n'}; const int in_len = lstrlenW(L"in");
static const WCHAR doW[] = {'d','o'};
CMD_LIST *setStart, *thisSet, *cmdStart, *cmdEnd; CMD_LIST *setStart, *thisSet, *cmdStart, *cmdEnd;
WCHAR variable[4]; WCHAR variable[4];
int varidx = -1; int varidx = -1;
...@@ -2210,7 +2206,7 @@ void WCMD_for (WCHAR *p, CMD_LIST **cmdList) { ...@@ -2210,7 +2206,7 @@ void WCMD_for (WCHAR *p, CMD_LIST **cmdList) {
thisArg = WCMD_parameter(p, parameterNo++, NULL, FALSE, FALSE); thisArg = WCMD_parameter(p, parameterNo++, NULL, FALSE, FALSE);
if (!thisArg if (!thisArg
|| !(CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, || !(CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT,
thisArg, ARRAY_SIZE(inW), inW, ARRAY_SIZE(inW)) == CSTR_EQUAL)) { thisArg, in_len, L"in", in_len) == CSTR_EQUAL)) {
WCMD_output_stderr (WCMD_LoadMessage(WCMD_SYNTAXERR)); WCMD_output_stderr (WCMD_LoadMessage(WCMD_SYNTAXERR));
return; return;
} }
...@@ -2235,7 +2231,7 @@ void WCMD_for (WCHAR *p, CMD_LIST **cmdList) { ...@@ -2235,7 +2231,7 @@ void WCMD_for (WCHAR *p, CMD_LIST **cmdList) {
/* Syntax error if missing close bracket, or nothing following it /* Syntax error if missing close bracket, or nothing following it
and once we have the complete set, we expect a DO */ and once we have the complete set, we expect a DO */
WINE_TRACE("Looking for 'do ' in %p\n", *cmdList); WINE_TRACE("Looking for 'do ' in %p\n", *cmdList);
if ((*cmdList == NULL) || !WCMD_keyword_ws_found(doW, ARRAY_SIZE(doW), (*cmdList)->command)) { if ((*cmdList == NULL) || !WCMD_keyword_ws_found(L"do", (*cmdList)->command)) {
WCMD_output_stderr (WCMD_LoadMessage(WCMD_SYNTAXERR)); WCMD_output_stderr (WCMD_LoadMessage(WCMD_SYNTAXERR));
return; return;
} }
......
...@@ -110,7 +110,7 @@ WCHAR *WCMD_parameter (WCHAR *s, int n, WCHAR **start, BOOL raw, BOOL wholecmdli ...@@ -110,7 +110,7 @@ WCHAR *WCMD_parameter (WCHAR *s, int n, WCHAR **start, BOOL raw, BOOL wholecmdli
WCHAR *WCMD_parameter_with_delims (WCHAR *s, int n, WCHAR **start, BOOL raw, WCHAR *WCMD_parameter_with_delims (WCHAR *s, int n, WCHAR **start, BOOL raw,
BOOL wholecmdline, const WCHAR *delims); BOOL wholecmdline, const WCHAR *delims);
WCHAR *WCMD_skip_leading_spaces (WCHAR *string); WCHAR *WCMD_skip_leading_spaces (WCHAR *string);
BOOL WCMD_keyword_ws_found(const WCHAR *keyword, int len, const WCHAR *ptr); BOOL WCMD_keyword_ws_found(const WCHAR *keyword, const WCHAR *ptr);
void WCMD_HandleTildeModifiers(WCHAR **start, BOOL atExecute); void WCMD_HandleTildeModifiers(WCHAR **start, BOOL atExecute);
WCHAR *WCMD_strip_quotes(WCHAR *cmd); WCHAR *WCMD_strip_quotes(WCHAR *cmd);
......
...@@ -473,7 +473,8 @@ WCHAR *WCMD_skip_leading_spaces (WCHAR *string) { ...@@ -473,7 +473,8 @@ WCHAR *WCMD_skip_leading_spaces (WCHAR *string) {
* Checks if the string located at ptr matches a keyword (of length len) * Checks if the string located at ptr matches a keyword (of length len)
* followed by a whitespace character (space or tab) * followed by a whitespace character (space or tab)
*/ */
BOOL WCMD_keyword_ws_found(const WCHAR *keyword, int len, const WCHAR *ptr) { BOOL WCMD_keyword_ws_found(const WCHAR *keyword, const WCHAR *ptr) {
const int len = lstrlenW(keyword);
return (CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT, return (CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT,
ptr, len, keyword, len) == CSTR_EQUAL) ptr, len, keyword, len) == CSTR_EQUAL)
&& ((*(ptr + len) == ' ') || (*(ptr + len) == '\t')); && ((*(ptr + len) == ' ') || (*(ptr + len) == '\t'));
...@@ -1813,11 +1814,6 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_LIST **output, HANDLE ...@@ -1813,11 +1814,6 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_LIST **output, HANDLE
CMD_LIST *lastEntry = NULL; CMD_LIST *lastEntry = NULL;
CMD_DELIMITERS prevDelim = CMD_NONE; CMD_DELIMITERS prevDelim = CMD_NONE;
static WCHAR *extraSpace = NULL; /* Deliberately never freed */ static WCHAR *extraSpace = NULL; /* Deliberately never freed */
static const WCHAR remCmd[] = {'r','e','m'};
static const WCHAR forCmd[] = {'f','o','r'};
static const WCHAR ifCmd[] = {'i','f'};
static const WCHAR ifElse[] = {'e','l','s','e'};
static const WCHAR setCmd[] = {'s','e','t'};
BOOL inOneLine = FALSE; BOOL inOneLine = FALSE;
BOOL inFor = FALSE; BOOL inFor = FALSE;
BOOL inIn = FALSE; BOOL inIn = FALSE;
...@@ -1870,10 +1866,7 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_LIST **output, HANDLE ...@@ -1870,10 +1866,7 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_LIST **output, HANDLE
/* Show prompt before batch line IF echo is on and in batch program */ /* Show prompt before batch line IF echo is on and in batch program */
if (context && echo_mode && *curPos && (*curPos != '@')) { if (context && echo_mode && *curPos && (*curPos != '@')) {
static const WCHAR echoDot[] = {'e','c','h','o','.'}; const DWORD len = lstrlenW(L"echo.");
static const WCHAR echoCol[] = {'e','c','h','o',':'};
static const WCHAR echoSlash[] = {'e','c','h','o','/'};
const DWORD len = ARRAY_SIZE(echoDot);
DWORD curr_size = lstrlenW(curPos); DWORD curr_size = lstrlenW(curPos);
DWORD min_len = (curr_size < len ? curr_size : len); DWORD min_len = (curr_size < len ? curr_size : len);
WCMD_show_prompt(TRUE); WCMD_show_prompt(TRUE);
...@@ -1881,11 +1874,11 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_LIST **output, HANDLE ...@@ -1881,11 +1874,11 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_LIST **output, HANDLE
/* I don't know why Windows puts a space here but it does */ /* I don't know why Windows puts a space here but it does */
/* Except for lines starting with 'echo.', 'echo:' or 'echo/'. Ask MS why */ /* Except for lines starting with 'echo.', 'echo:' or 'echo/'. Ask MS why */
if (CompareStringW(LOCALE_SYSTEM_DEFAULT, NORM_IGNORECASE, if (CompareStringW(LOCALE_SYSTEM_DEFAULT, NORM_IGNORECASE,
curPos, min_len, echoDot, len) != CSTR_EQUAL curPos, min_len, L"echo.", len) != CSTR_EQUAL
&& CompareStringW(LOCALE_SYSTEM_DEFAULT, NORM_IGNORECASE, && CompareStringW(LOCALE_SYSTEM_DEFAULT, NORM_IGNORECASE,
curPos, min_len, echoCol, len) != CSTR_EQUAL curPos, min_len, L"echo:", len) != CSTR_EQUAL
&& CompareStringW(LOCALE_SYSTEM_DEFAULT, NORM_IGNORECASE, && CompareStringW(LOCALE_SYSTEM_DEFAULT, NORM_IGNORECASE,
curPos, min_len, echoSlash, len) != CSTR_EQUAL) curPos, min_len, L"echo/", len) != CSTR_EQUAL)
{ {
WCMD_output_asis(L" "); WCMD_output_asis(L" ");
} }
...@@ -1921,13 +1914,11 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_LIST **output, HANDLE ...@@ -1921,13 +1914,11 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_LIST **output, HANDLE
/* Certain commands need special handling */ /* Certain commands need special handling */
if (curStringLen == 0 && curCopyTo == curString) { if (curStringLen == 0 && curCopyTo == curString) {
static const WCHAR forDO[] = {'d','o'};
/* If command starts with 'rem ' or identifies a label, ignore any &&, ( etc. */ /* If command starts with 'rem ' or identifies a label, ignore any &&, ( etc. */
if (WCMD_keyword_ws_found(remCmd, ARRAY_SIZE(remCmd), curPos) || *curPos == ':') { if (WCMD_keyword_ws_found(L"rem", curPos) || *curPos == ':') {
inOneLine = TRUE; inOneLine = TRUE;
} else if (WCMD_keyword_ws_found(forCmd, ARRAY_SIZE(forCmd), curPos)) { } else if (WCMD_keyword_ws_found(L"for", curPos)) {
inFor = TRUE; inFor = TRUE;
/* If command starts with 'if ' or 'else ', handle ('s mid line. We should ensure this /* If command starts with 'if ' or 'else ', handle ('s mid line. We should ensure this
...@@ -1935,14 +1926,14 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_LIST **output, HANDLE ...@@ -1935,14 +1926,14 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_LIST **output, HANDLE
should suffice for now. should suffice for now.
To be able to handle ('s in the condition part take as much as evaluate_if_condition To be able to handle ('s in the condition part take as much as evaluate_if_condition
would take and skip parsing it here. */ would take and skip parsing it here. */
} else if (WCMD_keyword_ws_found(ifCmd, ARRAY_SIZE(ifCmd), curPos)) { } else if (WCMD_keyword_ws_found(L"if", curPos)) {
int negate; /* Negate condition */ int negate; /* Negate condition */
int test; /* Condition evaluation result */ int test; /* Condition evaluation result */
WCHAR *p, *command; WCHAR *p, *command;
inIf = TRUE; inIf = TRUE;
p = curPos+(ARRAY_SIZE(ifCmd)); p = curPos+(lstrlenW(L"if"));
while (*p == ' ' || *p == '\t') while (*p == ' ' || *p == '\t')
p++; p++;
WCMD_parse (p, quals, param1, param2); WCMD_parse (p, quals, param1, param2);
...@@ -1960,11 +1951,11 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_LIST **output, HANDLE ...@@ -1960,11 +1951,11 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_LIST **output, HANDLE
curPos+=if_condition_len; curPos+=if_condition_len;
} }
if (WCMD_keyword_ws_found(setCmd, ARRAY_SIZE(setCmd), curPos)) if (WCMD_keyword_ws_found(L"set", curPos))
ignoreBracket = TRUE; ignoreBracket = TRUE;
} else if (WCMD_keyword_ws_found(ifElse, ARRAY_SIZE(ifElse), curPos)) { } else if (WCMD_keyword_ws_found(L"else", curPos)) {
const int keyw_len = ARRAY_SIZE(ifElse) + 1; const int keyw_len = lstrlenW(L"else") + 1;
inElse = TRUE; inElse = TRUE;
lastWasElse = TRUE; lastWasElse = TRUE;
onlyWhiteSpace = TRUE; onlyWhiteSpace = TRUE;
...@@ -1985,8 +1976,8 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_LIST **output, HANDLE ...@@ -1985,8 +1976,8 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_LIST **output, HANDLE
/* In a for loop, the DO command will follow a close bracket followed by /* In a for loop, the DO command will follow a close bracket followed by
whitespace, followed by DO, ie closeBracket inserts a NULL entry, curLen whitespace, followed by DO, ie closeBracket inserts a NULL entry, curLen
is then 0, and all whitespace is skipped */ is then 0, and all whitespace is skipped */
} else if (inFor && WCMD_keyword_ws_found(forDO, ARRAY_SIZE(forDO), curPos)) { } else if (inFor && WCMD_keyword_ws_found(L"do", curPos)) {
const int keyw_len = ARRAY_SIZE(forDO) + 1; const int keyw_len = lstrlenW(L"do") + 1;
WINE_TRACE("Found 'DO '\n"); WINE_TRACE("Found 'DO '\n");
lastWasDo = TRUE; lastWasDo = TRUE;
onlyWhiteSpace = TRUE; onlyWhiteSpace = TRUE;
...@@ -1999,12 +1990,10 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_LIST **output, HANDLE ...@@ -1999,12 +1990,10 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_LIST **output, HANDLE
/* Special handling for the 'FOR' command */ /* Special handling for the 'FOR' command */
if (inFor && lastWasWhiteSpace) { if (inFor && lastWasWhiteSpace) {
static const WCHAR forIN[] = {'i','n'};
WINE_TRACE("Found 'FOR ', comparing next parm: '%s'\n", wine_dbgstr_w(curPos)); WINE_TRACE("Found 'FOR ', comparing next parm: '%s'\n", wine_dbgstr_w(curPos));
if (WCMD_keyword_ws_found(forIN, ARRAY_SIZE(forIN), curPos)) { if (WCMD_keyword_ws_found(L"in", curPos)) {
const int keyw_len = ARRAY_SIZE(forIN) + 1; const int keyw_len = lstrlenW(L"in") + 1;
WINE_TRACE("Found 'IN '\n"); WINE_TRACE("Found 'IN '\n");
lastWasIn = TRUE; lastWasIn = TRUE;
onlyWhiteSpace = TRUE; onlyWhiteSpace = TRUE;
......
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