mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 08:03:03 +00:00
adding %cmdcmdline%, example how to use it echo %CMDCMDLINE%
svn path=/trunk/; revision=16494
This commit is contained in:
parent
497eba8519
commit
610ec85471
1 changed files with 13 additions and 1 deletions
|
@ -1028,6 +1028,15 @@ ProcessInput (BOOL bFlag)
|
||||||
cp = _stpcpy (cp, szRand);
|
cp = _stpcpy (cp, szRand);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* %CMDCMDLINE% */
|
||||||
|
else if (_tcsicmp(ip,_T("cmdcmdline")) ==0)
|
||||||
|
{
|
||||||
|
TCHAR *pargv;
|
||||||
|
/* Get random number */
|
||||||
|
pargv = GetCommandLine();
|
||||||
|
cp = _stpcpy (cp, pargv);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* %ERRORLEVEL% */
|
/* %ERRORLEVEL% */
|
||||||
else if (_tcsicmp(ip,_T("errorlevel")) ==0)
|
else if (_tcsicmp(ip,_T("errorlevel")) ==0)
|
||||||
|
@ -1493,6 +1502,7 @@ int main (int argc, char *argv[])
|
||||||
argv = CommandLineToArgvW(GetCommandLineW(), &argc);
|
argv = CommandLineToArgvW(GetCommandLineW(), &argc);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
SetFileApisToOEM();
|
SetFileApisToOEM();
|
||||||
InputCodePage= 0;
|
InputCodePage= 0;
|
||||||
|
@ -1512,16 +1522,18 @@ int main (int argc, char *argv[])
|
||||||
InputCodePage= GetConsoleCP();
|
InputCodePage= GetConsoleCP();
|
||||||
OutputCodePage = GetConsoleOutputCP();
|
OutputCodePage = GetConsoleOutputCP();
|
||||||
CMD_ModuleHandle = GetModuleHandle(NULL);
|
CMD_ModuleHandle = GetModuleHandle(NULL);
|
||||||
|
|
||||||
/* check switches on command-line */
|
/* check switches on command-line */
|
||||||
Initialize(argc, argv);
|
Initialize(argc, argv);
|
||||||
|
|
||||||
/* call prompt routine */
|
/* call prompt routine */
|
||||||
nExitCode = ProcessInput(FALSE);
|
nExitCode = ProcessInput(FALSE);
|
||||||
|
|
||||||
|
|
||||||
/* do the cleanup */
|
/* do the cleanup */
|
||||||
Cleanup(argc, argv);
|
Cleanup(argc, argv);
|
||||||
|
|
||||||
|
|
||||||
return(nExitCode);
|
return(nExitCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue