cmd.exe: Add basic support for && and (...) syntax.
diff --git a/programs/cmd/batch.c b/programs/cmd/batch.c
index c301bcc..b2a07cb 100644
--- a/programs/cmd/batch.c
+++ b/programs/cmd/batch.c
@@ -105,15 +105,13 @@
* the rest are handled by the main command processor.
*/
- while (context -> skip_rest == FALSE && WCMD_fgets (string, sizeof(string), h)) {
- if (strlenW(string) == MAXSTRING -1) {
- WCMD_output_asis( WCMD_LoadMessage(WCMD_TRUNCATEDLINE));
- WCMD_output_asis( string);
- WCMD_output_asis( newline);
- }
- if (string[0] != ':') { /* Skip over labels */
- WCMD_process_command (string);
- }
+ while (context -> skip_rest == FALSE) {
+ CMD_LIST *toExecute = NULL; /* Commands left to be executed */
+ if (WCMD_ReadAndParseLine(NULL, &toExecute, h) == NULL)
+ break;
+ WCMD_process_commands(toExecute);
+ WCMD_free_commands(toExecute);
+ toExecute = NULL;
}
CloseHandle (h);