Rein Klazes : wcmd: Increase maximum length of commands.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Dec 19 14:21:59 CST 2005
Module: wine
Branch: refs/heads/master
Commit: 80e695a6a46f40b7e99011620d4a20a61e7b9911
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=80e695a6a46f40b7e99011620d4a20a61e7b9911
Author: Rein Klazes <wijn at wanadoo.nl>
Date: Mon Dec 19 17:42:11 2005 +0100
wcmd: Increase maximum length of commands.
Increase maximum length of commands to 8192 bytes as on Windows XP.
Add needed braces to a multi line "if" statement.
---
programs/wcmd/batch.c | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/programs/wcmd/batch.c b/programs/wcmd/batch.c
index 89d50aa..4751076 100644
--- a/programs/wcmd/batch.c
+++ b/programs/wcmd/batch.c
@@ -27,7 +27,8 @@ extern char quals[MAX_PATH], param1[MAX_
extern BATCH_CONTEXT *context;
extern DWORD errorlevel;
-#define MAXSTRING 1024
+/* msdn specified max for Win XP */
+#define MAXSTRING 8192
/****************************************************************************
* WCMD_batch
@@ -93,13 +94,14 @@ BATCH_CONTEXT *prev_context;
*/
while (WCMD_fgets (string, sizeof(string), h)) {
- if (strlen(string) == MAXSTRING -1)
- 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);
- }
+ if (strlen(string) == MAXSTRING -1) {
+ WCMD_output_asis( "Line in Batch processing possibly truncated. Using:\n");
+ WCMD_output_asis( string);
+ WCMD_output_asis( "\n");
+ }
+ if (string[0] != ':') { /* Skip over labels */
+ WCMD_batch_command (string);
+ }
}
CloseHandle (h);
More information about the wine-cvs
mailing list