mirror of
https://github.com/reactos/wine.git
synced 2025-02-22 22:01:51 +00:00
cmd.exe: Add "if defined ..." support.
This commit is contained in:
parent
953940aada
commit
758a397755
6
programs/cmd/builtins.c
Normal file → Executable file
6
programs/cmd/builtins.c
Normal file → Executable file
@ -472,6 +472,12 @@ char condition[MAX_PATH], *command, *s;
|
||||
}
|
||||
WCMD_parameter (p, 2+negate, &command);
|
||||
}
|
||||
else if (!lstrcmpi (condition, "defined")) {
|
||||
if (GetEnvironmentVariableA(WCMD_parameter (p, 1+negate, NULL), NULL, 0) > 0) {
|
||||
test = 1;
|
||||
}
|
||||
WCMD_parameter (p, 2+negate, &command);
|
||||
}
|
||||
else if ((s = strstr (p, "=="))) {
|
||||
s += 2;
|
||||
if (!lstrcmpi (condition, WCMD_parameter (s, 0, NULL))) test = 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user