Avoid formatted output in a few more places where formatting is not
really needed and output could be large enough to be truncated.
This commit is contained in:
parent
9f59c164b8
commit
0bf64a4706
|
@ -94,7 +94,9 @@ BATCH_CONTEXT *prev_context;
|
||||||
|
|
||||||
while (WCMD_fgets (string, sizeof(string), h)) {
|
while (WCMD_fgets (string, sizeof(string), h)) {
|
||||||
if (strlen(string) == MAXSTRING -1)
|
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 */
|
if (string[0] != ':') { /* Skip over labels */
|
||||||
WCMD_batch_command (string);
|
WCMD_batch_command (string);
|
||||||
}
|
}
|
||||||
|
@ -179,7 +181,8 @@ int i;
|
||||||
/* Show prompt before batch line IF echo is on */
|
/* Show prompt before batch line IF echo is on */
|
||||||
if (echo_mode && (line[0] != '@')) {
|
if (echo_mode && (line[0] != '@')) {
|
||||||
WCMD_show_prompt();
|
WCMD_show_prompt();
|
||||||
WCMD_output ("%s\n", cmd2);
|
WCMD_output_asis ( cmd2);
|
||||||
|
WCMD_output_asis ( "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
WCMD_process_command (cmd2);
|
WCMD_process_command (cmd2);
|
||||||
|
|
|
@ -827,7 +827,10 @@ char buffer[1048];
|
||||||
*/
|
*/
|
||||||
status = GetEnvironmentVariable(s, buffer, sizeof(buffer));
|
status = GetEnvironmentVariable(s, buffer, sizeof(buffer));
|
||||||
if (status) {
|
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 {
|
} else {
|
||||||
WCMD_output ("Environment variable %s not defined\n", s);
|
WCMD_output ("Environment variable %s not defined\n", s);
|
||||||
}
|
}
|
||||||
|
@ -856,7 +859,9 @@ DWORD status;
|
||||||
if (strlen(param1) == 0) {
|
if (strlen(param1) == 0) {
|
||||||
status = GetEnvironmentVariable ("PATH", string, sizeof(string));
|
status = GetEnvironmentVariable ("PATH", string, sizeof(string));
|
||||||
if (status != 0) {
|
if (status != 0) {
|
||||||
WCMD_output ("PATH=%s\n", string);
|
WCMD_output_asis ( "PATH=");
|
||||||
|
WCMD_output_asis ( string);
|
||||||
|
WCMD_output_asis ( "\n");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
WCMD_output ("PATH not found\n");
|
WCMD_output ("PATH not found\n");
|
||||||
|
|
|
@ -698,7 +698,7 @@ char *p, *q;
|
||||||
*q = '\0';
|
*q = '\0';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
WCMD_output (out_string);
|
WCMD_output_asis (out_string);
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
@ -720,9 +720,9 @@ int status;
|
||||||
error_code, GetLastError());
|
error_code, GetLastError());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
WCMD_output (lpMsgBuf);
|
WCMD_output_asis (lpMsgBuf);
|
||||||
LocalFree ((HLOCAL)lpMsgBuf);
|
LocalFree ((HLOCAL)lpMsgBuf);
|
||||||
WCMD_output (newline);
|
WCMD_output_asis (newline);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue