Avoid formatted output in a few more places where formatting is not

really needed and output could be large enough to be truncated.
oldstable
Rein Klazes 2005-12-02 11:25:51 +01:00 committed by Alexandre Julliard
parent 9f59c164b8
commit 0bf64a4706
3 changed files with 15 additions and 7 deletions

View File

@ -94,7 +94,9 @@ BATCH_CONTEXT *prev_context;
while (WCMD_fgets (string, sizeof(string), h)) {
if (strlen(string) == MAXSTRING -1)
WCMD_output("Line in Batch processing possible truncated. Using:\n%s\n",string);
WCMD_output_asis( "Line in Batch processing possible truncated. Using:\n");
WCMD_output_asis( string);
WCMD_output_asis( "\n");
if (string[0] != ':') { /* Skip over labels */
WCMD_batch_command (string);
}
@ -179,7 +181,8 @@ int i;
/* Show prompt before batch line IF echo is on */
if (echo_mode && (line[0] != '@')) {
WCMD_show_prompt();
WCMD_output ("%s\n", cmd2);
WCMD_output_asis ( cmd2);
WCMD_output_asis ( "\n");
}
WCMD_process_command (cmd2);

View File

@ -827,7 +827,10 @@ char buffer[1048];
*/
status = GetEnvironmentVariable(s, buffer, sizeof(buffer));
if (status) {
WCMD_output("%s=%s\n", s, buffer);
WCMD_output_asis( s);
WCMD_output_asis( "=");
WCMD_output_asis( buffer);
WCMD_output_asis( "\n");
} else {
WCMD_output ("Environment variable %s not defined\n", s);
}
@ -856,7 +859,9 @@ DWORD status;
if (strlen(param1) == 0) {
status = GetEnvironmentVariable ("PATH", string, sizeof(string));
if (status != 0) {
WCMD_output ("PATH=%s\n", string);
WCMD_output_asis ( "PATH=");
WCMD_output_asis ( string);
WCMD_output_asis ( "\n");
}
else {
WCMD_output ("PATH not found\n");

View File

@ -698,7 +698,7 @@ char *p, *q;
*q = '\0';
}
}
WCMD_output (out_string);
WCMD_output_asis (out_string);
}
/****************************************************************************
@ -720,9 +720,9 @@ int status;
error_code, GetLastError());
return;
}
WCMD_output (lpMsgBuf);
WCMD_output_asis (lpMsgBuf);
LocalFree ((HLOCAL)lpMsgBuf);
WCMD_output (newline);
WCMD_output_asis (newline);
return;
}