cmd: Use WCMD_output_asis*() for strings that are not supposed to contain formating directives.

This commit is contained in:
Francois Gouget 2011-11-24 00:30:23 +01:00 committed by Alexandre Julliard
parent d255efbde1
commit 3b72928464
3 changed files with 12 additions and 12 deletions

View File

@ -361,7 +361,7 @@ void WCMD_choice (const WCHAR * command) {
ptr = strchrW(opt_c, answer[0]);
if (ptr) {
WCMD_output_asis(answer);
WCMD_output(newline);
WCMD_output_asis(newline);
if (have_console)
SetConsoleMode(GetStdHandle(STD_INPUT_HANDLE), oldmode);
@ -964,7 +964,7 @@ void WCMD_echo (const WCHAR *command)
echo_mode = FALSE;
else {
WCMD_output_asis (command);
WCMD_output (newline);
WCMD_output_asis (newline);
}
HeapFree(GetProcessHeap(), 0, trimmed);
}
@ -1777,7 +1777,7 @@ void WCMD_pause (void)
if (have_console)
SetConsoleMode(hIn, 0);
WCMD_output(anykey);
WCMD_output_asis(anykey);
WCMD_ReadFile(hIn, &key, 1, &count);
if (have_console)
SetConsoleMode(hIn, oldmode);
@ -2114,7 +2114,7 @@ void WCMD_setshow_default (const WCHAR *command) {
GetCurrentDirectoryW(sizeof(cwd)/sizeof(WCHAR), cwd);
if (strlenW(command) == 0) {
strcatW (cwd, newline);
WCMD_output (cwd);
WCMD_output_asis (cwd);
}
else {
/* Remove any double quotes, which may be in the
@ -2325,7 +2325,7 @@ void WCMD_setshow_env (WCHAR *s) {
/* Output the prompt */
*p++ = '\0';
if (strlenW(p) != 0) WCMD_output(p);
if (strlenW(p) != 0) WCMD_output_asis(p);
/* Read the reply */
WCMD_ReadFile(GetStdHandle(STD_INPUT_HANDLE), string, sizeof(string)/sizeof(WCHAR), &count);
@ -2697,7 +2697,7 @@ void WCMD_verify (const WCHAR *command) {
void WCMD_version (void) {
WCMD_output (version_string);
WCMD_output_asis (version_string);
}

View File

@ -326,7 +326,7 @@ static DIRECTORY_STACK *WCMD_list_directory (DIRECTORY_STACK *inputparms, int le
/* Output the results */
if (!bare) {
if (level != 0 && (entry_count > 0)) WCMD_output (newline);
if (level != 0 && (entry_count > 0)) WCMD_output_asis (newline);
if (!recurse || ((entry_count > 0) && done_header==FALSE)) {
static const WCHAR headerW[] = {'D','i','r','e','c','t','o','r','y',' ','o','f',
' ','%','s','\n','\n','\0'};
@ -430,13 +430,13 @@ static DIRECTORY_STACK *WCMD_list_directory (DIRECTORY_STACK *inputparms, int le
strcatW(&temp[toWrite], space);
toWrite++;
if (toWrite > 99) {
WCMD_output(temp);
WCMD_output_asis(temp);
toWrite = 0;
strcpyW(temp, nullW);
}
padding--;
}
WCMD_output(temp);
WCMD_output_asis(temp);
}
} else if ((fd+i)->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
@ -472,7 +472,7 @@ static DIRECTORY_STACK *WCMD_list_directory (DIRECTORY_STACK *inputparms, int le
}
}
}
if (addNewLine) WCMD_output (newline);
if (addNewLine) WCMD_output_asis (newline);
cur_width = 0;
}
@ -949,7 +949,7 @@ void WCMD_directory (WCHAR *cmd)
}
} else {
static const WCHAR newLine2[] = {'\n','\n','\0'};
if (!bare) WCMD_output (newLine2);
if (!bare) WCMD_output_asis (newLine2);
}
/* Clear any errors from previous invocations, and process it */

View File

@ -1512,7 +1512,7 @@ void WCMD_execute (const WCHAR *command, const WCHAR *redirects,
WCMD_type (p);
break;
case WCMD_VER:
WCMD_output(newline);
WCMD_output_asis(newline);
WCMD_version ();
break;
case WCMD_VERIFY: