- Implement call :label by creating a new batch context; this way calls can be nested and have their own %0-%9 parameters.

- GetBatchVar: Implement %~n. Remove %? (an old FreeDOS-ism; the Windows equivalent is %ERRORLEVEL%)

svn path=/trunk/; revision=35681
This commit is contained in:
Jeffrey Morlan 2008-08-26 20:36:38 +00:00
parent 317fe611cb
commit 6c2116d0cf
5 changed files with 50 additions and 38 deletions

View file

@ -75,15 +75,7 @@ INT cmd_goto (LPTSTR param)
/* jump to end of the file */
if ( _tcsicmp( param, _T(":eof"))==0)
{
/* when lCallPosition != 0 we have to return to the caller */
if (bc->lCallPosition == 0)
SetFilePointer (bc->hBatchFile, 0, &lNewPosHigh, FILE_END);
else
{
SetFilePointer (bc->hBatchFile, (LONG)bc->lCallPosition, &bc->lCallPositionHigh, FILE_BEGIN);
bc->lCallPosition = 0;
bc->lCallPositionHigh = 0;
}
SetFilePointer (bc->hBatchFile, 0, &lNewPosHigh, FILE_END);
return 0;
}