mirror of
https://github.com/reactos/reactos.git
synced 2025-07-23 02:53:38 +00:00
support else
handle negative values in special envvars stdin,out,err can't be redirected for windows gui apps svn path=/trunk/; revision=32068
This commit is contained in:
parent
00e33fbce3
commit
11ca34b0e3
2 changed files with 42 additions and 14 deletions
|
@ -458,10 +458,21 @@ LPTSTR ReadBatchLine (LPBOOL bLocalEcho)
|
|||
{
|
||||
if (*first == _T(')'))
|
||||
{
|
||||
bc->bCmdBlock--;
|
||||
first++;
|
||||
/* Strip leading spaces and trailing space/control chars */
|
||||
while(_istspace (*first))
|
||||
first++;
|
||||
if ((_tcsncicmp (first, _T("else"), 4) == 0) && (_tcschr(first, _T('('))))
|
||||
{
|
||||
bc->bExecuteBlock[bc->bCmdBlock] = !bc->bExecuteBlock[bc->bCmdBlock];
|
||||
}
|
||||
else
|
||||
{
|
||||
bc->bCmdBlock--;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if ((bc->bCmdBlock >= 0) && (bc->bCmdBlock < MAX_PATH))
|
||||
if (bc->bCmdBlock < MAX_PATH)
|
||||
if (!bc->bExecuteBlock[bc->bCmdBlock])
|
||||
{
|
||||
/* increase the bCmdBlock count when there is another conditon which opens a new bracket */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue