Detlef Riekenberg wine.dev@web.de writes:
- while (!errorlevel) {
count = 0;
while (!count){
/* FIXME: Add support for option /T */
WCMD_ReadFile(GetStdHandle(STD_INPUT_HANDLE), answer, 1, &count, NULL);
if (!count) {
WINE_TRACE("no more data from stdin\n");
if (have_console)
SetConsoleMode(GetStdHandle(STD_INPUT_HANDLE), oldmode);
HeapFree(GetProcessHeap(), 0, my_command);
return;
}
}
if (!opt_s)
answer[0] = toupperW(answer[0]);
ptr = strchrW(opt_c, answer[0]);
if (ptr) {
WCMD_output_asis(answer);
WCMD_output(newline);
if (have_console)
SetConsoleMode(GetStdHandle(STD_INPUT_HANDLE), oldmode);
errorlevel = (ptr - opt_c) + 1;
WINE_TRACE("answer: %d\n", errorlevel);
HeapFree(GetProcessHeap(), 0, my_command);
return;
}
else
{
/* key not allowed: play a bell */
WINE_TRACE("key not allowed: %s\n", wine_dbgstr_w(answer));
WCMD_output_asis(bellW);
}
- }
- /* This location is never reached */
It doesn't make sense to have a loop condition that never happens.