FW: [04/16] CMD.exe: Support :EOF in goto labels
Ann & Jason Edmeades
us at edmeades.me.uk
Tue Feb 20 12:00:37 CST 2007
Try 3
-----Original Message-----
From: Ann & Jason Edmeades [mailto:us at edmeades.me.uk]
Sent: 20 February 2007 17:49
To: 'wine-patches at winehq.org'
Subject: FW: [04/16] CMD.exe: Support :EOF in goto labels
-----Original Message-----
From: Ann & Jason Edmeades [mailto:us at edmeades.me.uk]
Sent: 20 February 2007 00:36
To: 'wine-patches at winehq.org'
Subject: [04/16] CMD.exe: Support :EOF in goto labels
-------------- next part --------------
>From nobody Mon Sep 17 00:00:00 2001
From: Jason Edmeades <us at edmeades.me.uk>
Date: Thu Feb 15 22:19:11 2007 +0000
Subject: [PATCH] Support special :EOF label in batch programs
---
programs/cmd/builtins.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
1c74ba8984a2d67423bc92957120f8b621b3337c
diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c
index c8c8adc..9b77fe7 100755
--- a/programs/cmd/builtins.c
+++ b/programs/cmd/builtins.c
@@ -433,6 +433,13 @@ char string[MAX_PATH];
return;
}
if (context != NULL) {
+
+ /* Handle special :EOF label */
+ if (lstrcmpi (":eof", param1) == 0) {
+ context -> skip_rest = TRUE;
+ return;
+ }
+
SetFilePointer (context -> h, 0, NULL, FILE_BEGIN);
while (WCMD_fgets (string, sizeof(string), context -> h)) {
if ((string[0] == ':') && (lstrcmpi (&string[1], param1) == 0)) return;
--
1.3.0
More information about the wine-patches
mailing list