mirror of
https://github.com/reactos/reactos.git
synced 2024-09-30 14:37:45 +00:00
fix a bug in goto
a stubs for setlocal and endlocal (our default is delayed expansion) svn path=/trunk/; revision=32073
This commit is contained in:
parent
8c1cafd4fb
commit
cf39f6646d
|
@ -361,6 +361,9 @@ INT CommandScreen (LPTSTR, LPTSTR);
|
||||||
/* Prototypes for SET.C */
|
/* Prototypes for SET.C */
|
||||||
INT cmd_set (LPTSTR, LPTSTR);
|
INT cmd_set (LPTSTR, LPTSTR);
|
||||||
|
|
||||||
|
/* Prototypes for SETLOCAL.C */
|
||||||
|
INT cmd_setlocal (LPTSTR, LPTSTR);
|
||||||
|
INT cmd_endlocal (LPTSTR, LPTSTR);
|
||||||
|
|
||||||
/* Prototypes for START.C */
|
/* Prototypes for START.C */
|
||||||
INT cmd_start (LPTSTR, LPTSTR);
|
INT cmd_start (LPTSTR, LPTSTR);
|
||||||
|
|
|
@ -54,6 +54,7 @@
|
||||||
<file>replace.c</file>
|
<file>replace.c</file>
|
||||||
<file>screen.c</file>
|
<file>screen.c</file>
|
||||||
<file>set.c</file>
|
<file>set.c</file>
|
||||||
|
<file>setlocal.c</file>
|
||||||
<file>shift.c</file>
|
<file>shift.c</file>
|
||||||
<file>start.c</file>
|
<file>start.c</file>
|
||||||
<file>strtoclr.c</file>
|
<file>strtoclr.c</file>
|
||||||
|
|
|
@ -100,6 +100,8 @@ COMMAND cmds[] =
|
||||||
{_T("echoerr."), CMD_HIDE, CommandEchoerr},
|
{_T("echoerr."), CMD_HIDE, CommandEchoerr},
|
||||||
{_T("echoserr"), 0, CommandEchoserr},
|
{_T("echoserr"), 0, CommandEchoserr},
|
||||||
|
|
||||||
|
{_T("endlocal"), 0, cmd_endlocal},
|
||||||
|
|
||||||
#ifdef INCLUDE_CMD_DEL
|
#ifdef INCLUDE_CMD_DEL
|
||||||
{_T("erase"), 0, CommandDelete},
|
{_T("erase"), 0, CommandDelete},
|
||||||
#endif
|
#endif
|
||||||
|
@ -192,6 +194,8 @@ COMMAND cmds[] =
|
||||||
{_T("set"), 0, cmd_set},
|
{_T("set"), 0, cmd_set},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
{_T("setlocal"), 0, cmd_setlocal},
|
||||||
|
|
||||||
{_T("shift"), CMD_BATCHONLY, cmd_shift},
|
{_T("shift"), CMD_BATCHONLY, cmd_shift},
|
||||||
|
|
||||||
#ifdef INCLUDE_CMD_START
|
#ifdef INCLUDE_CMD_START
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
INT cmd_goto (LPTSTR cmd, LPTSTR param)
|
INT cmd_goto (LPTSTR cmd, LPTSTR param)
|
||||||
{
|
{
|
||||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||||
LPTSTR tmp;
|
LPTSTR tmp, tmp2;
|
||||||
LONG lNewPosHigh = 0;
|
LONG lNewPosHigh = 0;
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
|
@ -119,8 +119,9 @@ INT cmd_goto (LPTSTR cmd, LPTSTR param)
|
||||||
pos++;
|
pos++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tmp2 = param;
|
||||||
/* use whole label name */
|
/* use whole label name */
|
||||||
if ((*tmp == _T(':')) && ((_tcsicmp (++tmp, param) == 0) || (_tcsicmp (tmp, ++param) == 0)))
|
if ((*tmp == _T(':')) && ((_tcsicmp (++tmp, param) == 0) || (_tcsicmp (tmp, ++tmp2) == 0)))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
27
reactos/base/shell/cmd/setlocal.c
Normal file
27
reactos/base/shell/cmd/setlocal.c
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
/*
|
||||||
|
* GOTO.C - goto internal batch command.
|
||||||
|
*
|
||||||
|
* History:
|
||||||
|
*
|
||||||
|
* 1 Feb 2008 (Christoph von Wittich)
|
||||||
|
* started.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <precomp.h>
|
||||||
|
|
||||||
|
|
||||||
|
/* unimplemented */
|
||||||
|
|
||||||
|
/* our current default is delayedexpansion */
|
||||||
|
|
||||||
|
INT cmd_setlocal (LPTSTR cmd, LPTSTR param)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* endlocal doesn't take any params */
|
||||||
|
INT cmd_endlocal (LPTSTR cmd, LPTSTR param)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue