Commit 3b729284 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

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

parent d255efbd
...@@ -361,7 +361,7 @@ void WCMD_choice (const WCHAR * command) { ...@@ -361,7 +361,7 @@ void WCMD_choice (const WCHAR * command) {
ptr = strchrW(opt_c, answer[0]); ptr = strchrW(opt_c, answer[0]);
if (ptr) { if (ptr) {
WCMD_output_asis(answer); WCMD_output_asis(answer);
WCMD_output(newline); WCMD_output_asis(newline);
if (have_console) if (have_console)
SetConsoleMode(GetStdHandle(STD_INPUT_HANDLE), oldmode); SetConsoleMode(GetStdHandle(STD_INPUT_HANDLE), oldmode);
...@@ -964,7 +964,7 @@ void WCMD_echo (const WCHAR *command) ...@@ -964,7 +964,7 @@ void WCMD_echo (const WCHAR *command)
echo_mode = FALSE; echo_mode = FALSE;
else { else {
WCMD_output_asis (command); WCMD_output_asis (command);
WCMD_output (newline); WCMD_output_asis (newline);
} }
HeapFree(GetProcessHeap(), 0, trimmed); HeapFree(GetProcessHeap(), 0, trimmed);
} }
...@@ -1777,7 +1777,7 @@ void WCMD_pause (void) ...@@ -1777,7 +1777,7 @@ void WCMD_pause (void)
if (have_console) if (have_console)
SetConsoleMode(hIn, 0); SetConsoleMode(hIn, 0);
WCMD_output(anykey); WCMD_output_asis(anykey);
WCMD_ReadFile(hIn, &key, 1, &count); WCMD_ReadFile(hIn, &key, 1, &count);
if (have_console) if (have_console)
SetConsoleMode(hIn, oldmode); SetConsoleMode(hIn, oldmode);
...@@ -2114,7 +2114,7 @@ void WCMD_setshow_default (const WCHAR *command) { ...@@ -2114,7 +2114,7 @@ void WCMD_setshow_default (const WCHAR *command) {
GetCurrentDirectoryW(sizeof(cwd)/sizeof(WCHAR), cwd); GetCurrentDirectoryW(sizeof(cwd)/sizeof(WCHAR), cwd);
if (strlenW(command) == 0) { if (strlenW(command) == 0) {
strcatW (cwd, newline); strcatW (cwd, newline);
WCMD_output (cwd); WCMD_output_asis (cwd);
} }
else { else {
/* Remove any double quotes, which may be in the /* Remove any double quotes, which may be in the
...@@ -2325,7 +2325,7 @@ void WCMD_setshow_env (WCHAR *s) { ...@@ -2325,7 +2325,7 @@ void WCMD_setshow_env (WCHAR *s) {
/* Output the prompt */ /* Output the prompt */
*p++ = '\0'; *p++ = '\0';
if (strlenW(p) != 0) WCMD_output(p); if (strlenW(p) != 0) WCMD_output_asis(p);
/* Read the reply */ /* Read the reply */
WCMD_ReadFile(GetStdHandle(STD_INPUT_HANDLE), string, sizeof(string)/sizeof(WCHAR), &count); WCMD_ReadFile(GetStdHandle(STD_INPUT_HANDLE), string, sizeof(string)/sizeof(WCHAR), &count);
...@@ -2697,7 +2697,7 @@ void WCMD_verify (const WCHAR *command) { ...@@ -2697,7 +2697,7 @@ void WCMD_verify (const WCHAR *command) {
void WCMD_version (void) { void WCMD_version (void) {
WCMD_output (version_string); WCMD_output_asis (version_string);
} }
......
...@@ -326,7 +326,7 @@ static DIRECTORY_STACK *WCMD_list_directory (DIRECTORY_STACK *inputparms, int le ...@@ -326,7 +326,7 @@ static DIRECTORY_STACK *WCMD_list_directory (DIRECTORY_STACK *inputparms, int le
/* Output the results */ /* Output the results */
if (!bare) { 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)) { if (!recurse || ((entry_count > 0) && done_header==FALSE)) {
static const WCHAR headerW[] = {'D','i','r','e','c','t','o','r','y',' ','o','f', static const WCHAR headerW[] = {'D','i','r','e','c','t','o','r','y',' ','o','f',
' ','%','s','\n','\n','\0'}; ' ','%','s','\n','\n','\0'};
...@@ -430,13 +430,13 @@ static DIRECTORY_STACK *WCMD_list_directory (DIRECTORY_STACK *inputparms, int le ...@@ -430,13 +430,13 @@ static DIRECTORY_STACK *WCMD_list_directory (DIRECTORY_STACK *inputparms, int le
strcatW(&temp[toWrite], space); strcatW(&temp[toWrite], space);
toWrite++; toWrite++;
if (toWrite > 99) { if (toWrite > 99) {
WCMD_output(temp); WCMD_output_asis(temp);
toWrite = 0; toWrite = 0;
strcpyW(temp, nullW); strcpyW(temp, nullW);
} }
padding--; padding--;
} }
WCMD_output(temp); WCMD_output_asis(temp);
} }
} else if ((fd+i)->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { } else if ((fd+i)->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
...@@ -472,7 +472,7 @@ static DIRECTORY_STACK *WCMD_list_directory (DIRECTORY_STACK *inputparms, int le ...@@ -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; cur_width = 0;
} }
...@@ -949,7 +949,7 @@ void WCMD_directory (WCHAR *cmd) ...@@ -949,7 +949,7 @@ void WCMD_directory (WCHAR *cmd)
} }
} else { } else {
static const WCHAR newLine2[] = {'\n','\n','\0'}; 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 */ /* Clear any errors from previous invocations, and process it */
......
...@@ -1512,7 +1512,7 @@ void WCMD_execute (const WCHAR *command, const WCHAR *redirects, ...@@ -1512,7 +1512,7 @@ void WCMD_execute (const WCHAR *command, const WCHAR *redirects,
WCMD_type (p); WCMD_type (p);
break; break;
case WCMD_VER: case WCMD_VER:
WCMD_output(newline); WCMD_output_asis(newline);
WCMD_version (); WCMD_version ();
break; break;
case WCMD_VERIFY: case WCMD_VERIFY:
......
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