On Thu, Nov 24, 2011 at 00:30, Francois Gouget <fgouget(a)free.fr> wrote:
> Using WCMD_output*() instead could cause crashes.
> ---
>
> For instance if a filename is '%s'.
> This patch should not interfere with the previous one.
> - WCMD_output(newline);
> + WCMD_output_asis(newline);
...
> static const WCHAR newLine2[] = {'\n','\n','\0'};
> - if (!bare) WCMD_output (newLine2);
> + if (!bare) WCMD_output_asis (newLine2);
...
> - WCMD_output(anykey);
> + WCMD_output_asis(anykey);
No need to change those, since we control those strings, and those are
generic strings with no '%' directive.
> - WCMD_output (version_string);
> + WCMD_output_asis (version_string);
This one does contain a %s ( WCMD_VERSION,"CMD Version %s\n"), but we
control the version string as well (currently Wine version), so
shouldn't probably be changed.
> @@ -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);
> }
It's just doing padding with plain spaces, so no changes needed here.
The remaining hunks should be OK.
Frédéric