cmd.exe: Support :EOF in goto labels.

This commit is contained in:
Jason Edmeades 2007-02-20 18:00:37 +00:00 committed by Alexandre Julliard
parent e7dc3f1a35
commit 5482924735
1 changed files with 7 additions and 0 deletions

View File

@ -433,6 +433,13 @@ char string[MAX_PATH];
return; return;
} }
if (context != NULL) { if (context != NULL) {
/* Handle special :EOF label */
if (lstrcmpi (":eof", param1) == 0) {
context -> skip_rest = TRUE;
return;
}
SetFilePointer (context -> h, 0, NULL, FILE_BEGIN); SetFilePointer (context -> h, 0, NULL, FILE_BEGIN);
while (WCMD_fgets (string, sizeof(string), context -> h)) { while (WCMD_fgets (string, sizeof(string), context -> h)) {
if ((string[0] == ':') && (lstrcmpi (&string[1], param1) == 0)) return; if ((string[0] == ':') && (lstrcmpi (&string[1], param1) == 0)) return;