mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 08:23:01 +00:00
Remove the "LPTSTR cmd" argument to internal commands; there's no need for a command to be told its own name. It was only used in two places:
- a hack in cmd_mkdir that was already obsolete a decade ago - to distinguish "echo" from "echo.", but that is the wrong way to implement this anyway. There's nothing particularly special about the period, "echo" is just one of those commands that is lenient about where its parameters begin, and when it echos a line, the first character (usually a space, but in the case of "echo." a period) is skipped. svn path=/trunk/; revision=35647
This commit is contained in:
parent
c9b3cf161b
commit
c49ed3a82c
46 changed files with 133 additions and 185 deletions
|
@ -139,7 +139,7 @@ VOID ExpandAlias (LPTSTR cmd, INT maxlen)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
INT CommandAlias (LPTSTR cmd, LPTSTR param)
|
INT CommandAlias (LPTSTR param)
|
||||||
{
|
{
|
||||||
LPTSTR ptr;
|
LPTSTR ptr;
|
||||||
|
|
||||||
|
|
|
@ -188,7 +188,7 @@ ChangeAttribute (LPTSTR pszPath, LPTSTR pszFile, DWORD dwMask,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
INT CommandAttrib (LPTSTR cmd, LPTSTR param)
|
INT CommandAttrib (LPTSTR param)
|
||||||
{
|
{
|
||||||
LPTSTR *arg;
|
LPTSTR *arg;
|
||||||
INT argc, i;
|
INT argc, i;
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#ifdef INCLUDE_CMD_BEEP
|
#ifdef INCLUDE_CMD_BEEP
|
||||||
|
|
||||||
|
|
||||||
INT cmd_beep (LPTSTR cmd, LPTSTR param)
|
INT cmd_beep (LPTSTR param)
|
||||||
{
|
{
|
||||||
if (_tcsncmp (param, _T("/?"), 2) == 0)
|
if (_tcsncmp (param, _T("/?"), 2) == 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -40,11 +40,11 @@
|
||||||
* context block.
|
* context block.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
INT cmd_call (LPTSTR cmd, LPTSTR param)
|
INT cmd_call (LPTSTR param)
|
||||||
{
|
{
|
||||||
LPBATCH_CONTEXT n = NULL;
|
LPBATCH_CONTEXT n = NULL;
|
||||||
|
|
||||||
TRACE ("cmd_call: (\'%s\',\'%s\')\n", debugstr_aw(cmd), debugstr_aw(param));
|
TRACE ("cmd_call: (\'%s\')\n", debugstr_aw(param));
|
||||||
if (!_tcsncmp (param, _T("/?"), 2))
|
if (!_tcsncmp (param, _T("/?"), 2))
|
||||||
{
|
{
|
||||||
ConOutResPaging(TRUE,STRING_CALL_HELP);
|
ConOutResPaging(TRUE,STRING_CALL_HELP);
|
||||||
|
@ -54,7 +54,7 @@ INT cmd_call (LPTSTR cmd, LPTSTR param)
|
||||||
if (*param == _T(':') && (bc))
|
if (*param == _T(':') && (bc))
|
||||||
{
|
{
|
||||||
bc->lCallPosition = SetFilePointer(bc->hBatchFile, 0, &bc->lCallPositionHigh, FILE_CURRENT);
|
bc->lCallPosition = SetFilePointer(bc->hBatchFile, 0, &bc->lCallPositionHigh, FILE_CURRENT);
|
||||||
cmd_goto(_T("goto"), param);
|
cmd_goto(param);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
#ifdef INCLUDE_CMD_CHCP
|
#ifdef INCLUDE_CMD_CHCP
|
||||||
|
|
||||||
INT CommandChcp (LPTSTR cmd, LPTSTR param)
|
INT CommandChcp (LPTSTR param)
|
||||||
{
|
{
|
||||||
LPTSTR *arg;
|
LPTSTR *arg;
|
||||||
INT args;
|
INT args;
|
||||||
|
|
|
@ -100,7 +100,7 @@ IsKeyInString (LPTSTR lpString, TCHAR cKey, BOOL bCaseSensitive)
|
||||||
|
|
||||||
|
|
||||||
INT
|
INT
|
||||||
CommandChoice (LPTSTR cmd, LPTSTR param)
|
CommandChoice (LPTSTR param)
|
||||||
{
|
{
|
||||||
LPTSTR lpOptions;
|
LPTSTR lpOptions;
|
||||||
TCHAR Options[6];
|
TCHAR Options[6];
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
#ifdef INCLUDE_CMD_CLS
|
#ifdef INCLUDE_CMD_CLS
|
||||||
|
|
||||||
INT cmd_cls (LPTSTR cmd, LPTSTR param)
|
INT cmd_cls (LPTSTR param)
|
||||||
{
|
{
|
||||||
CONSOLE_SCREEN_BUFFER_INFO csbi;
|
CONSOLE_SCREEN_BUFFER_INFO csbi;
|
||||||
COORD coPos;
|
COORD coPos;
|
||||||
|
|
|
@ -648,7 +648,7 @@ DoCommand (LPTSTR line)
|
||||||
|
|
||||||
if (!_tcscmp (com, cmdptr->name))
|
if (!_tcscmp (com, cmdptr->name))
|
||||||
{
|
{
|
||||||
cmdptr->func (com, rest);
|
cmdptr->func (rest);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -669,11 +669,8 @@ DoCommand (LPTSTR line)
|
||||||
{
|
{
|
||||||
/* OK its one of the specials...*/
|
/* OK its one of the specials...*/
|
||||||
|
|
||||||
/* Terminate first word properly */
|
|
||||||
com[cl] = _T('\0');
|
|
||||||
|
|
||||||
/* Call with new rest */
|
/* Call with new rest */
|
||||||
cmdptr->func (com, cstart + cl);
|
cmdptr->func (cstart + cl);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1541,10 +1538,10 @@ Initialize (int argc, const TCHAR* argv[])
|
||||||
if (!IsExistingFile (_T("\\autoexec.bat")))
|
if (!IsExistingFile (_T("\\autoexec.bat")))
|
||||||
{
|
{
|
||||||
#ifdef INCLUDE_CMD_DATE
|
#ifdef INCLUDE_CMD_DATE
|
||||||
cmd_date (_T(""), _T(""));
|
cmd_date (_T(""));
|
||||||
#endif
|
#endif
|
||||||
#ifdef INCLUDE_CMD_TIME
|
#ifdef INCLUDE_CMD_TIME
|
||||||
cmd_time (_T(""), _T(""));
|
cmd_time (_T(""));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -68,30 +68,30 @@ extern OSVERSIONINFO osvi;
|
||||||
|
|
||||||
/* Prototypes for ALIAS.C */
|
/* Prototypes for ALIAS.C */
|
||||||
VOID ExpandAlias (LPTSTR, INT);
|
VOID ExpandAlias (LPTSTR, INT);
|
||||||
INT CommandAlias (LPTSTR, LPTSTR);
|
INT CommandAlias (LPTSTR);
|
||||||
|
|
||||||
/* Prototypes for ATTRIB.C */
|
/* Prototypes for ATTRIB.C */
|
||||||
INT CommandAttrib (LPTSTR, LPTSTR);
|
INT CommandAttrib (LPTSTR);
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for BEEP.C */
|
/* Prototypes for BEEP.C */
|
||||||
INT cmd_beep (LPTSTR, LPTSTR);
|
INT cmd_beep (LPTSTR);
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for CALL.C */
|
/* Prototypes for CALL.C */
|
||||||
INT cmd_call (LPTSTR, LPTSTR);
|
INT cmd_call (LPTSTR);
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for CHCP.C */
|
/* Prototypes for CHCP.C */
|
||||||
INT CommandChcp (LPTSTR, LPTSTR);
|
INT CommandChcp (LPTSTR);
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for CHOICE.C */
|
/* Prototypes for CHOICE.C */
|
||||||
INT CommandChoice (LPTSTR, LPTSTR);
|
INT CommandChoice (LPTSTR);
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for CLS.C */
|
/* Prototypes for CLS.C */
|
||||||
INT cmd_cls (LPTSTR, LPTSTR);
|
INT cmd_cls (LPTSTR);
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for CMD.C */
|
/* Prototypes for CMD.C */
|
||||||
|
@ -122,7 +122,7 @@ typedef struct tagCOMMAND
|
||||||
{
|
{
|
||||||
LPTSTR name;
|
LPTSTR name;
|
||||||
INT flags;
|
INT flags;
|
||||||
INT (*func) (LPTSTR, LPTSTR);
|
INT (*func)(LPTSTR);
|
||||||
} COMMAND, *LPCOMMAND;
|
} COMMAND, *LPCOMMAND;
|
||||||
|
|
||||||
extern COMMAND cmds[]; /* The internal command table */
|
extern COMMAND cmds[]; /* The internal command table */
|
||||||
|
@ -135,7 +135,7 @@ LPCTSTR GetParsedEnvVar ( LPCTSTR varName, UINT* varNameLen, BOOL ModeSetA );
|
||||||
|
|
||||||
/* Prototypes for COLOR.C */
|
/* Prototypes for COLOR.C */
|
||||||
VOID SetScreenColor(WORD wArgColor, BOOL bFill);
|
VOID SetScreenColor(WORD wArgColor, BOOL bFill);
|
||||||
INT CommandColor (LPTSTR, LPTSTR);
|
INT CommandColor (LPTSTR);
|
||||||
|
|
||||||
VOID ConInDummy (VOID);
|
VOID ConInDummy (VOID);
|
||||||
VOID ConInDisable (VOID);
|
VOID ConInDisable (VOID);
|
||||||
|
@ -169,39 +169,39 @@ VOID ConErrResPrintf (UINT resID, ...);
|
||||||
VOID ConOutResPaging(BOOL NewPage, UINT resID);
|
VOID ConOutResPaging(BOOL NewPage, UINT resID);
|
||||||
|
|
||||||
/* Prototypes for COPY.C */
|
/* Prototypes for COPY.C */
|
||||||
INT cmd_copy (LPTSTR, LPTSTR);
|
INT cmd_copy (LPTSTR);
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for DATE.C */
|
/* Prototypes for DATE.C */
|
||||||
INT cmd_date (LPTSTR, LPTSTR);
|
INT cmd_date (LPTSTR);
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for DEL.C */
|
/* Prototypes for DEL.C */
|
||||||
INT CommandDelete (LPTSTR, LPTSTR);
|
INT CommandDelete (LPTSTR);
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for DELAY.C */
|
/* Prototypes for DELAY.C */
|
||||||
INT CommandDelay (LPTSTR, LPTSTR);
|
INT CommandDelay (LPTSTR);
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for DIR.C */
|
/* Prototypes for DIR.C */
|
||||||
INT CommandDir (LPTSTR, LPTSTR);
|
INT CommandDir (LPTSTR);
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for DIRSTACK.C */
|
/* Prototypes for DIRSTACK.C */
|
||||||
VOID InitDirectoryStack (VOID);
|
VOID InitDirectoryStack (VOID);
|
||||||
VOID DestroyDirectoryStack (VOID);
|
VOID DestroyDirectoryStack (VOID);
|
||||||
INT GetDirectoryStackDepth (VOID);
|
INT GetDirectoryStackDepth (VOID);
|
||||||
INT CommandPushd (LPTSTR, LPTSTR);
|
INT CommandPushd (LPTSTR);
|
||||||
INT CommandPopd (LPTSTR, LPTSTR);
|
INT CommandPopd (LPTSTR);
|
||||||
INT CommandDirs (LPTSTR, LPTSTR);
|
INT CommandDirs (LPTSTR);
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for ECHO.C */
|
/* Prototypes for ECHO.C */
|
||||||
INT CommandEcho (LPTSTR, LPTSTR);
|
INT CommandEcho (LPTSTR);
|
||||||
INT CommandEchos (LPTSTR, LPTSTR);
|
INT CommandEchos (LPTSTR);
|
||||||
INT CommandEchoerr (LPTSTR, LPTSTR);
|
INT CommandEchoerr (LPTSTR);
|
||||||
INT CommandEchoserr (LPTSTR, LPTSTR);
|
INT CommandEchoserr (LPTSTR);
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for ERROR.C */
|
/* Prototypes for ERROR.C */
|
||||||
|
@ -235,15 +235,15 @@ VOID CompleteFilename (LPTSTR, BOOL, LPTSTR, UINT);
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for FOR.C */
|
/* Prototypes for FOR.C */
|
||||||
INT cmd_for (LPTSTR, LPTSTR);
|
INT cmd_for (LPTSTR);
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for FREE.C */
|
/* Prototypes for FREE.C */
|
||||||
INT CommandFree (LPTSTR, LPTSTR);
|
INT CommandFree (LPTSTR);
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for GOTO.C */
|
/* Prototypes for GOTO.C */
|
||||||
INT cmd_goto (LPTSTR, LPTSTR);
|
INT cmd_goto (LPTSTR);
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for HISTORY.C */
|
/* Prototypes for HISTORY.C */
|
||||||
|
@ -254,23 +254,23 @@ VOID History_move_to_bottom(VOID);/*F3*/
|
||||||
VOID InitHistory(VOID);
|
VOID InitHistory(VOID);
|
||||||
VOID CleanHistory(VOID);
|
VOID CleanHistory(VOID);
|
||||||
VOID History_del_current_entry(LPTSTR str);/*CTRL-D*/
|
VOID History_del_current_entry(LPTSTR str);/*CTRL-D*/
|
||||||
INT CommandHistory (LPTSTR cmd, LPTSTR param);
|
INT CommandHistory (LPTSTR param);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for INTERNAL.C */
|
/* Prototypes for INTERNAL.C */
|
||||||
VOID InitLastPath (VOID);
|
VOID InitLastPath (VOID);
|
||||||
VOID FreeLastPath (VOID);
|
VOID FreeLastPath (VOID);
|
||||||
INT cmd_chdir (LPTSTR, LPTSTR);
|
INT cmd_chdir (LPTSTR);
|
||||||
INT cmd_mkdir (LPTSTR, LPTSTR);
|
INT cmd_mkdir (LPTSTR);
|
||||||
INT cmd_rmdir (LPTSTR, LPTSTR);
|
INT cmd_rmdir (LPTSTR);
|
||||||
INT CommandExit (LPTSTR, LPTSTR);
|
INT CommandExit (LPTSTR);
|
||||||
INT CommandRem (LPTSTR, LPTSTR);
|
INT CommandRem (LPTSTR);
|
||||||
INT CommandShowCommands (LPTSTR, LPTSTR);
|
INT CommandShowCommands (LPTSTR);
|
||||||
INT CommandShowCommandsDetail (LPTSTR, LPTSTR);
|
INT CommandShowCommandsDetail (LPTSTR);
|
||||||
|
|
||||||
/* Prototypes for LABEL.C */
|
/* Prototypes for LABEL.C */
|
||||||
INT cmd_label (LPTSTR, LPTSTR);
|
INT cmd_label (LPTSTR);
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for LOCALE.C */
|
/* Prototypes for LOCALE.C */
|
||||||
|
@ -292,7 +292,7 @@ extern UINT InputCodePage;
|
||||||
extern UINT OutputCodePage;
|
extern UINT OutputCodePage;
|
||||||
|
|
||||||
/* Prototypes for MEMORY.C */
|
/* Prototypes for MEMORY.C */
|
||||||
INT CommandMemory (LPTSTR, LPTSTR);
|
INT CommandMemory (LPTSTR);
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for MISC.C */
|
/* Prototypes for MISC.C */
|
||||||
|
@ -322,11 +322,11 @@ INT FilePromptYNA (UINT);
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for MOVE.C */
|
/* Prototypes for MOVE.C */
|
||||||
INT cmd_move (LPTSTR, LPTSTR);
|
INT cmd_move (LPTSTR);
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for MSGBOX.C */
|
/* Prototypes for MSGBOX.C */
|
||||||
INT CommandMsgbox (LPTSTR, LPTSTR);
|
INT CommandMsgbox (LPTSTR);
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes from PARSER.C */
|
/* Prototypes from PARSER.C */
|
||||||
|
@ -346,12 +346,12 @@ VOID FreeCommand(PARSED_COMMAND *Cmd);
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes from PATH.C */
|
/* Prototypes from PATH.C */
|
||||||
INT cmd_path (LPTSTR, LPTSTR);
|
INT cmd_path (LPTSTR);
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes from PROMPT.C */
|
/* Prototypes from PROMPT.C */
|
||||||
VOID PrintPrompt (VOID);
|
VOID PrintPrompt (VOID);
|
||||||
INT cmd_prompt (LPTSTR, LPTSTR);
|
INT cmd_prompt (LPTSTR);
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for REDIR.C */
|
/* Prototypes for REDIR.C */
|
||||||
|
@ -371,24 +371,24 @@ VOID FreeRedirection(REDIRECTION *);
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for REN.C */
|
/* Prototypes for REN.C */
|
||||||
INT cmd_rename (LPTSTR, LPTSTR);
|
INT cmd_rename (LPTSTR);
|
||||||
|
|
||||||
/* Prototypes for REN.C */
|
/* Prototypes for REN.C */
|
||||||
INT cmd_replace (LPTSTR, LPTSTR);
|
INT cmd_replace (LPTSTR);
|
||||||
|
|
||||||
/* Prototypes for SCREEN.C */
|
/* Prototypes for SCREEN.C */
|
||||||
INT CommandScreen (LPTSTR, LPTSTR);
|
INT CommandScreen (LPTSTR);
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for SET.C */
|
/* Prototypes for SET.C */
|
||||||
INT cmd_set (LPTSTR, LPTSTR);
|
INT cmd_set (LPTSTR);
|
||||||
|
|
||||||
/* Prototypes for SETLOCAL.C */
|
/* Prototypes for SETLOCAL.C */
|
||||||
INT cmd_setlocal (LPTSTR, LPTSTR);
|
INT cmd_setlocal (LPTSTR);
|
||||||
INT cmd_endlocal (LPTSTR, LPTSTR);
|
INT cmd_endlocal (LPTSTR);
|
||||||
|
|
||||||
/* Prototypes for START.C */
|
/* Prototypes for START.C */
|
||||||
INT cmd_start (LPTSTR, LPTSTR);
|
INT cmd_start (LPTSTR);
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for STRTOCLR.C */
|
/* Prototypes for STRTOCLR.C */
|
||||||
|
@ -396,45 +396,45 @@ BOOL StringToColor (LPWORD, LPTSTR *);
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for TIME.C */
|
/* Prototypes for TIME.C */
|
||||||
INT cmd_time (LPTSTR, LPTSTR);
|
INT cmd_time (LPTSTR);
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for TIMER.C */
|
/* Prototypes for TIMER.C */
|
||||||
INT CommandTimer (LPTSTR cmd, LPTSTR param);
|
INT CommandTimer (LPTSTR param);
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for TITLE.C */
|
/* Prototypes for TITLE.C */
|
||||||
INT cmd_title (LPTSTR, LPTSTR);
|
INT cmd_title (LPTSTR);
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for TYPE.C */
|
/* Prototypes for TYPE.C */
|
||||||
INT cmd_type (LPTSTR, LPTSTR);
|
INT cmd_type (LPTSTR);
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for VER.C */
|
/* Prototypes for VER.C */
|
||||||
VOID ShortVersion (VOID);
|
VOID ShortVersion (VOID);
|
||||||
INT cmd_ver (LPTSTR, LPTSTR);
|
INT cmd_ver (LPTSTR);
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for VERIFY.C */
|
/* Prototypes for VERIFY.C */
|
||||||
INT cmd_verify (LPTSTR, LPTSTR);
|
INT cmd_verify (LPTSTR);
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for VOL.C */
|
/* Prototypes for VOL.C */
|
||||||
INT cmd_vol (LPTSTR, LPTSTR);
|
INT cmd_vol (LPTSTR);
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for WHERE.C */
|
/* Prototypes for WHERE.C */
|
||||||
BOOL SearchForExecutable (LPCTSTR, LPTSTR);
|
BOOL SearchForExecutable (LPCTSTR, LPTSTR);
|
||||||
|
|
||||||
/* Prototypes for WINDOW.C */
|
/* Prototypes for WINDOW.C */
|
||||||
INT CommandActivate (LPTSTR, LPTSTR);
|
INT CommandActivate (LPTSTR);
|
||||||
INT CommandWindow (LPTSTR, LPTSTR);
|
INT CommandWindow (LPTSTR);
|
||||||
|
|
||||||
|
|
||||||
/* The MSDOS Batch Commands [MS-DOS 5.0 User's Guide and Reference p359] */
|
/* The MSDOS Batch Commands [MS-DOS 5.0 User's Guide and Reference p359] */
|
||||||
int cmd_if(TCHAR *, TCHAR *);
|
int cmd_if(TCHAR *);
|
||||||
int cmd_pause(TCHAR *, TCHAR *);
|
int cmd_pause(TCHAR *);
|
||||||
int cmd_shift(TCHAR *, TCHAR *);
|
int cmd_shift(TCHAR *);
|
||||||
|
|
||||||
#endif /* _CMD_H_INCLUDED_ */
|
#endif /* _CMD_H_INCLUDED_ */
|
||||||
|
|
|
@ -93,11 +93,9 @@ COMMAND cmds[] =
|
||||||
{_T("dirs"), 0, CommandDirs},
|
{_T("dirs"), 0, CommandDirs},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
{_T("echo"), 0, CommandEcho},
|
{_T("echo"), CMD_SPECIAL, CommandEcho},
|
||||||
{_T("echo."), CMD_HIDE, CommandEcho},
|
|
||||||
{_T("echos"), 0, CommandEchos},
|
{_T("echos"), 0, CommandEchos},
|
||||||
{_T("echoerr"), 0, CommandEchoerr},
|
{_T("echoerr"), CMD_SPECIAL, CommandEchoerr},
|
||||||
{_T("echoerr."), CMD_HIDE, CommandEchoerr},
|
|
||||||
{_T("echoserr"), 0, CommandEchoserr},
|
{_T("echoserr"), 0, CommandEchoserr},
|
||||||
|
|
||||||
{_T("endlocal"), 0, cmd_endlocal},
|
{_T("endlocal"), 0, cmd_endlocal},
|
||||||
|
|
|
@ -63,7 +63,7 @@ VOID SetScreenColor (WORD wColor, BOOL bNoFill)
|
||||||
*
|
*
|
||||||
* internal dir command
|
* internal dir command
|
||||||
*/
|
*/
|
||||||
INT CommandColor (LPTSTR first, LPTSTR rest)
|
INT CommandColor (LPTSTR rest)
|
||||||
{
|
{
|
||||||
if (_tcsncmp (rest, _T("/?"), 2) == 0)
|
if (_tcsncmp (rest, _T("/?"), 2) == 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -290,7 +290,7 @@ static INT CopyOverwrite (LPTSTR fn)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
INT cmd_copy (LPTSTR cmd, LPTSTR param)
|
INT cmd_copy (LPTSTR param)
|
||||||
{
|
{
|
||||||
LPTSTR *arg;
|
LPTSTR *arg;
|
||||||
INT argc, i, nFiles, nOverwrite = 0, nSrc = -1, nDes = -1;
|
INT argc, i, nFiles, nOverwrite = 0, nSrc = -1, nDes = -1;
|
||||||
|
|
|
@ -176,7 +176,7 @@ ParseDate (LPTSTR s)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
INT cmd_date (LPTSTR cmd, LPTSTR param)
|
INT cmd_date (LPTSTR param)
|
||||||
{
|
{
|
||||||
LPTSTR *arg;
|
LPTSTR *arg;
|
||||||
INT argc;
|
INT argc;
|
||||||
|
|
|
@ -354,7 +354,7 @@ ProcessDirectory(LPTSTR FileName, DWORD* dwFlags, DWORD dwAttrFlags)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
INT CommandDelete (LPTSTR cmd, LPTSTR param)
|
INT CommandDelete (LPTSTR param)
|
||||||
{
|
{
|
||||||
/*cmd is the command that was given, in this case it will always be "del" or "delete"
|
/*cmd is the command that was given, in this case it will always be "del" or "delete"
|
||||||
param is whatever is given after the command*/
|
param is whatever is given after the command*/
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#ifdef INCLUDE_CMD_DELAY
|
#ifdef INCLUDE_CMD_DELAY
|
||||||
|
|
||||||
|
|
||||||
INT CommandDelay (LPTSTR cmd, LPTSTR param)
|
INT CommandDelay (LPTSTR param)
|
||||||
{
|
{
|
||||||
DWORD val;
|
DWORD val;
|
||||||
DWORD mul=1000;
|
DWORD mul=1000;
|
||||||
|
|
|
@ -1789,7 +1789,7 @@ ULARGE_INTEGER u64Temp; /* A temporary counter */
|
||||||
* internal dir command
|
* internal dir command
|
||||||
*/
|
*/
|
||||||
INT
|
INT
|
||||||
CommandDir(LPTSTR first, LPTSTR rest)
|
CommandDir(LPTSTR rest)
|
||||||
{
|
{
|
||||||
TCHAR dircmd[256]; /* A variable to store the DIRCMD enviroment variable */
|
TCHAR dircmd[256]; /* A variable to store the DIRCMD enviroment variable */
|
||||||
TCHAR path[MAX_PATH];
|
TCHAR path[MAX_PATH];
|
||||||
|
|
|
@ -140,7 +140,7 @@ INT GetDirectoryStackDepth (VOID)
|
||||||
/*
|
/*
|
||||||
* pushd command
|
* pushd command
|
||||||
*/
|
*/
|
||||||
INT CommandPushd (LPTSTR first, LPTSTR rest)
|
INT CommandPushd (LPTSTR rest)
|
||||||
{
|
{
|
||||||
TCHAR curPath[MAX_PATH];
|
TCHAR curPath[MAX_PATH];
|
||||||
TCHAR newPath[MAX_PATH];
|
TCHAR newPath[MAX_PATH];
|
||||||
|
@ -174,7 +174,7 @@ INT CommandPushd (LPTSTR first, LPTSTR rest)
|
||||||
/*
|
/*
|
||||||
* popd command
|
* popd command
|
||||||
*/
|
*/
|
||||||
INT CommandPopd (LPTSTR first, LPTSTR rest)
|
INT CommandPopd (LPTSTR rest)
|
||||||
{
|
{
|
||||||
TCHAR szPath[MAX_PATH];
|
TCHAR szPath[MAX_PATH];
|
||||||
|
|
||||||
|
@ -201,7 +201,7 @@ INT CommandPopd (LPTSTR first, LPTSTR rest)
|
||||||
/*
|
/*
|
||||||
* dirs command
|
* dirs command
|
||||||
*/
|
*/
|
||||||
INT CommandDirs (LPTSTR first, LPTSTR rest)
|
INT CommandDirs (LPTSTR rest)
|
||||||
{
|
{
|
||||||
LPDIRENTRY lpDir;
|
LPDIRENTRY lpDir;
|
||||||
|
|
||||||
|
|
|
@ -29,24 +29,11 @@
|
||||||
#include <precomp.h>
|
#include <precomp.h>
|
||||||
|
|
||||||
|
|
||||||
INT CommandEcho (LPTSTR cmd, LPTSTR param)
|
INT CommandEcho (LPTSTR param)
|
||||||
{
|
{
|
||||||
LPTSTR p1, p2;
|
LPTSTR p1, p2;
|
||||||
|
|
||||||
TRACE ("CommandEcho '%s' : '%s'\n", debugstr_aw(cmd), debugstr_aw(param));
|
TRACE ("CommandEcho: '%s'\n", debugstr_aw(param));
|
||||||
|
|
||||||
if (_tcsicmp (cmd, _T("echo.")) == 0)
|
|
||||||
{
|
|
||||||
if (param[0] == 0)
|
|
||||||
ConOutChar (_T('\n'));
|
|
||||||
else
|
|
||||||
ConOutPuts (param);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* skip the first delimiter */
|
|
||||||
if (_istspace(*param))
|
|
||||||
param++;
|
|
||||||
|
|
||||||
/* skip all spaces for the check of '/?', 'ON' and 'OFF' */
|
/* skip all spaces for the check of '/?', 'ON' and 'OFF' */
|
||||||
p1 = param;
|
p1 = param;
|
||||||
|
@ -83,22 +70,22 @@ INT CommandEcho (LPTSTR cmd, LPTSTR param)
|
||||||
}
|
}
|
||||||
if (*p1 != _T('\0'))
|
if (*p1 != _T('\0'))
|
||||||
{
|
{
|
||||||
ConOutPuts (param);
|
/* skip the first character */
|
||||||
|
ConOutPuts(param + 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ConOutResPrintf(STRING_ECHO_HELP5, bEcho ? D_ON : D_OFF);
|
ConOutResPrintf(STRING_ECHO_HELP5, bEcho ? D_ON : D_OFF);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
INT CommandEchos (LPTSTR cmd, LPTSTR param)
|
INT CommandEchos (LPTSTR param)
|
||||||
{
|
{
|
||||||
|
|
||||||
TRACE ("CommandEchos '%s' : '%s'\n", debugstr_aw(cmd), debugstr_aw(param));
|
TRACE ("CommandEchos: '%s'\n", debugstr_aw(param));
|
||||||
|
|
||||||
if (!_tcsncmp (param, _T("/?"), 2))
|
if (!_tcsncmp (param, _T("/?"), 2))
|
||||||
{
|
{
|
||||||
|
@ -113,10 +100,10 @@ INT CommandEchos (LPTSTR cmd, LPTSTR param)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
INT CommandEchoerr (LPTSTR cmd, LPTSTR param)
|
INT CommandEchoerr (LPTSTR param)
|
||||||
{
|
{
|
||||||
|
|
||||||
TRACE ("CommandEchoerr '%s' : '%s'\n", debugstr_aw(cmd), debugstr_aw(param));
|
TRACE ("CommandEchoerr: '%s'\n", debugstr_aw(param));
|
||||||
|
|
||||||
if (!_tcsncmp (param, _T("/?"), 2))
|
if (!_tcsncmp (param, _T("/?"), 2))
|
||||||
{
|
{
|
||||||
|
@ -124,26 +111,16 @@ INT CommandEchoerr (LPTSTR cmd, LPTSTR param)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_tcsicmp (cmd, _T("echoerr.")) == 0)
|
|
||||||
{
|
|
||||||
if (param[0] == 0)
|
|
||||||
ConErrChar (_T('\n'));
|
|
||||||
else
|
|
||||||
ConErrPuts (param);
|
ConErrPuts (param);
|
||||||
}
|
|
||||||
else if (*param)
|
|
||||||
{
|
|
||||||
ConErrPuts (param);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
INT CommandEchoserr (LPTSTR cmd, LPTSTR param)
|
INT CommandEchoserr (LPTSTR param)
|
||||||
{
|
{
|
||||||
|
|
||||||
TRACE ("CommandEchoserr '%s' : '%s'\n", debugstr_aw(cmd), debugstr_aw(param));
|
TRACE ("CommandEchoserr: '%s'\n", debugstr_aw(param));
|
||||||
|
|
||||||
if (!_tcsncmp (param, _T("/?"), 2))
|
if (!_tcsncmp (param, _T("/?"), 2))
|
||||||
{
|
{
|
||||||
|
|
|
@ -47,14 +47,14 @@
|
||||||
* per list element.
|
* per list element.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
INT cmd_for (LPTSTR cmd, LPTSTR param)
|
INT cmd_for (LPTSTR param)
|
||||||
{
|
{
|
||||||
LPBATCH_CONTEXT lpNew;
|
LPBATCH_CONTEXT lpNew;
|
||||||
LPTSTR pp;
|
LPTSTR pp;
|
||||||
TCHAR var;
|
TCHAR var;
|
||||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||||
|
|
||||||
TRACE ("cmd_for (\'%s\', \'%s\'\n", debugstr_aw(cmd), debugstr_aw(param));
|
TRACE ("cmd_for (\'%s\')\n", debugstr_aw(param));
|
||||||
|
|
||||||
if (!_tcsncmp (param, _T("/?"), 2))
|
if (!_tcsncmp (param, _T("/?"), 2))
|
||||||
{
|
{
|
||||||
|
|
|
@ -84,7 +84,7 @@ PrintDiskInfo (LPTSTR szDisk)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
INT CommandFree (LPTSTR cmd, LPTSTR param)
|
INT CommandFree (LPTSTR param)
|
||||||
{
|
{
|
||||||
LPTSTR szParam;
|
LPTSTR szParam;
|
||||||
TCHAR szDefPath[MAX_PATH];
|
TCHAR szDefPath[MAX_PATH];
|
||||||
|
|
|
@ -36,13 +36,13 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
INT cmd_goto (LPTSTR cmd, LPTSTR param)
|
INT cmd_goto (LPTSTR param)
|
||||||
{
|
{
|
||||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||||
LPTSTR tmp, tmp2;
|
LPTSTR tmp, tmp2;
|
||||||
LONG lNewPosHigh = 0;
|
LONG lNewPosHigh = 0;
|
||||||
|
|
||||||
TRACE ("cmd_goto (\'%s\', \'%s\'\n", debugstr_aw(cmd), debugstr_aw(param));
|
TRACE ("cmd_goto (\'%s\')\n", debugstr_aw(param));
|
||||||
|
|
||||||
if (!_tcsncmp (param, _T("/?"), 2))
|
if (!_tcsncmp (param, _T("/?"), 2))
|
||||||
{
|
{
|
||||||
|
|
|
@ -74,7 +74,7 @@ VOID set_size(INT new_size);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
INT CommandHistory (LPTSTR cmd, LPTSTR param)
|
INT CommandHistory (LPTSTR param)
|
||||||
{
|
{
|
||||||
LPTSTR tmp;
|
LPTSTR tmp;
|
||||||
INT tmp_int;
|
INT tmp_int;
|
||||||
|
|
|
@ -36,12 +36,12 @@
|
||||||
#define X_EXEC 1
|
#define X_EXEC 1
|
||||||
#define X_EMPTY 0x80
|
#define X_EMPTY 0x80
|
||||||
|
|
||||||
INT cmd_if (LPTSTR cmd, LPTSTR param)
|
INT cmd_if (LPTSTR param)
|
||||||
{
|
{
|
||||||
INT x_flag = 0; /* when set cause 'then' clause to be executed */
|
INT x_flag = 0; /* when set cause 'then' clause to be executed */
|
||||||
LPTSTR pp;
|
LPTSTR pp;
|
||||||
|
|
||||||
TRACE ("cmd_if: (\'%s\', \'%s\')\n", debugstr_aw(cmd), debugstr_aw(param));
|
TRACE ("cmd_if: (\'%s\')\n", debugstr_aw(param));
|
||||||
|
|
||||||
if (!_tcsncmp (param, _T("/?"), 2))
|
if (!_tcsncmp (param, _T("/?"), 2))
|
||||||
{
|
{
|
||||||
|
|
|
@ -267,7 +267,7 @@ BOOL SetRootPath(TCHAR *InPath)
|
||||||
* CD / CHDIR
|
* CD / CHDIR
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
INT cmd_chdir (LPTSTR cmd, LPTSTR param)
|
INT cmd_chdir (LPTSTR param)
|
||||||
{
|
{
|
||||||
|
|
||||||
WIN32_FIND_DATA f;
|
WIN32_FIND_DATA f;
|
||||||
|
@ -455,10 +455,9 @@ MakeFullPath(TCHAR * DirPath)
|
||||||
* MD / MKDIR
|
* MD / MKDIR
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
INT cmd_mkdir (LPTSTR cmd, LPTSTR param)
|
INT cmd_mkdir (LPTSTR param)
|
||||||
{
|
{
|
||||||
LPTSTR dir; /* pointer to the directory to change to */
|
LPTSTR dir; /* pointer to the directory to change to */
|
||||||
LPTSTR place; /* used to search for the \ when no space is used */
|
|
||||||
LPTSTR *p = NULL;
|
LPTSTR *p = NULL;
|
||||||
INT argc;
|
INT argc;
|
||||||
nErrorLevel = 0;
|
nErrorLevel = 0;
|
||||||
|
@ -469,28 +468,6 @@ INT cmd_mkdir (LPTSTR cmd, LPTSTR param)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* check if there is no space between the command and the path */
|
|
||||||
if (param[0] == _T('\0'))
|
|
||||||
{
|
|
||||||
/* search for the \ or . so that both short & long names will work */
|
|
||||||
for (place = cmd; *place; place++)
|
|
||||||
if (*place == _T('.') || *place == _T('\\'))
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (*place)
|
|
||||||
{
|
|
||||||
argc = 0;
|
|
||||||
if (add_entry(&argc, &p, place))
|
|
||||||
dir = place;
|
|
||||||
else
|
|
||||||
dir = NULL;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
/* signal that there are no parameters */
|
|
||||||
dir = NULL;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
p = split (param, &argc, FALSE);
|
p = split (param, &argc, FALSE);
|
||||||
if (argc > 1)
|
if (argc > 1)
|
||||||
{
|
{
|
||||||
|
@ -501,7 +478,6 @@ INT cmd_mkdir (LPTSTR cmd, LPTSTR param)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
dir = p[0];
|
dir = p[0];
|
||||||
}
|
|
||||||
|
|
||||||
if (!dir)
|
if (!dir)
|
||||||
{
|
{
|
||||||
|
@ -573,7 +549,7 @@ BOOL DeleteFolder(LPTSTR FileName)
|
||||||
}
|
}
|
||||||
return RemoveDirectory(FileName);
|
return RemoveDirectory(FileName);
|
||||||
}
|
}
|
||||||
INT cmd_rmdir (LPTSTR cmd, LPTSTR param)
|
INT cmd_rmdir (LPTSTR param)
|
||||||
{
|
{
|
||||||
TCHAR dir[MAX_PATH]; /* pointer to the directory to change to */
|
TCHAR dir[MAX_PATH]; /* pointer to the directory to change to */
|
||||||
TCHAR ch;
|
TCHAR ch;
|
||||||
|
@ -707,7 +683,7 @@ INT cmd_rmdir (LPTSTR cmd, LPTSTR param)
|
||||||
* set the exitflag to true
|
* set the exitflag to true
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
INT CommandExit (LPTSTR cmd, LPTSTR param)
|
INT CommandExit (LPTSTR param)
|
||||||
{
|
{
|
||||||
if (!_tcsncmp (param, _T("/?"), 2))
|
if (!_tcsncmp (param, _T("/?"), 2))
|
||||||
{
|
{
|
||||||
|
@ -741,7 +717,7 @@ INT CommandExit (LPTSTR cmd, LPTSTR param)
|
||||||
* does nothing
|
* does nothing
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
INT CommandRem (LPTSTR cmd, LPTSTR param)
|
INT CommandRem (LPTSTR param)
|
||||||
{
|
{
|
||||||
if (!_tcsncmp (param, _T("/?"), 2))
|
if (!_tcsncmp (param, _T("/?"), 2))
|
||||||
{
|
{
|
||||||
|
@ -753,13 +729,13 @@ INT CommandRem (LPTSTR cmd, LPTSTR param)
|
||||||
#endif /* INCLUDE_CMD_REM */
|
#endif /* INCLUDE_CMD_REM */
|
||||||
|
|
||||||
|
|
||||||
INT CommandShowCommands (LPTSTR cmd, LPTSTR param)
|
INT CommandShowCommands (LPTSTR param)
|
||||||
{
|
{
|
||||||
PrintCommandList ();
|
PrintCommandList ();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
INT CommandShowCommandsDetail (LPTSTR cmd, LPTSTR param)
|
INT CommandShowCommandsDetail (LPTSTR param)
|
||||||
{
|
{
|
||||||
/* If a param was send, display help of correspondent command */
|
/* If a param was send, display help of correspondent command */
|
||||||
if (_tcslen(param))
|
if (_tcslen(param))
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#ifdef INCLUDE_CMD_LABEL
|
#ifdef INCLUDE_CMD_LABEL
|
||||||
|
|
||||||
|
|
||||||
INT cmd_label (LPTSTR cmd, LPTSTR param)
|
INT cmd_label (LPTSTR param)
|
||||||
{
|
{
|
||||||
TCHAR szRootPath[] = _T("A:\\");
|
TCHAR szRootPath[] = _T("A:\\");
|
||||||
TCHAR szLabel[80];
|
TCHAR szLabel[80];
|
||||||
|
|
|
@ -32,7 +32,7 @@ ConvertDWord (DWORD num, LPTSTR des, INT len, BOOL bSeparator)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
INT CommandMemory (LPTSTR cmd, LPTSTR param)
|
INT CommandMemory (LPTSTR param)
|
||||||
{
|
{
|
||||||
MEMORYSTATUS ms;
|
MEMORYSTATUS ms;
|
||||||
TCHAR szMemoryLoad[20];
|
TCHAR szMemoryLoad[20];
|
||||||
|
|
|
@ -83,7 +83,7 @@ void GetDirectory (LPTSTR wholepath, LPTSTR directory, BOOL CheckExisting)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
INT cmd_move (LPTSTR cmd, LPTSTR param)
|
INT cmd_move (LPTSTR param)
|
||||||
{
|
{
|
||||||
LPTSTR *arg;
|
LPTSTR *arg;
|
||||||
INT argc, i, nFiles;
|
INT argc, i, nFiles;
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#define _SYNTAX_CHECK
|
#define _SYNTAX_CHECK
|
||||||
|
|
||||||
|
|
||||||
INT CommandMsgbox (LPTSTR cmd, LPTSTR param)
|
INT CommandMsgbox (LPTSTR param)
|
||||||
{
|
{
|
||||||
|
|
||||||
//used to parse command line
|
//used to parse command line
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
#define ENV_BUFFER_SIZE 1024
|
#define ENV_BUFFER_SIZE 1024
|
||||||
|
|
||||||
|
|
||||||
INT cmd_path (LPTSTR cmd, LPTSTR param)
|
INT cmd_path (LPTSTR param)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!_tcsncmp (param, _T("/?"), 2))
|
if (!_tcsncmp (param, _T("/?"), 2))
|
||||||
|
|
|
@ -34,10 +34,10 @@
|
||||||
* Remove all hardcode string to En.rc
|
* Remove all hardcode string to En.rc
|
||||||
*/
|
*/
|
||||||
|
|
||||||
INT cmd_pause (LPTSTR cmd, LPTSTR param)
|
INT cmd_pause (LPTSTR param)
|
||||||
{
|
{
|
||||||
|
|
||||||
TRACE ("cmd_pause: \'%s\' : \'%s\')\n", debugstr_aw(cmd), debugstr_aw(param));
|
TRACE ("cmd_pause: \'%s\')\n", debugstr_aw(param));
|
||||||
|
|
||||||
if (!_tcsncmp (param, _T("/?"), 2))
|
if (!_tcsncmp (param, _T("/?"), 2))
|
||||||
{
|
{
|
||||||
|
|
|
@ -190,7 +190,7 @@ VOID PrintPrompt(VOID)
|
||||||
|
|
||||||
#ifdef INCLUDE_CMD_PROMPT
|
#ifdef INCLUDE_CMD_PROMPT
|
||||||
|
|
||||||
INT cmd_prompt (LPTSTR cmd, LPTSTR param)
|
INT cmd_prompt (LPTSTR param)
|
||||||
{
|
{
|
||||||
if (!_tcsncmp (param, _T("/?"), 2))
|
if (!_tcsncmp (param, _T("/?"), 2))
|
||||||
{
|
{
|
||||||
|
|
|
@ -40,7 +40,7 @@ enum
|
||||||
* file rename internal command.
|
* file rename internal command.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
INT cmd_rename (LPTSTR cmd, LPTSTR param)
|
INT cmd_rename (LPTSTR param)
|
||||||
{
|
{
|
||||||
LPTSTR *arg = NULL;
|
LPTSTR *arg = NULL;
|
||||||
INT args = 0;
|
INT args = 0;
|
||||||
|
|
|
@ -358,7 +358,7 @@ INT recFindSubDirs(DWORD dwFlags,
|
||||||
return filesReplaced;
|
return filesReplaced;
|
||||||
}
|
}
|
||||||
|
|
||||||
INT cmd_replace (LPTSTR cmd, LPTSTR param)
|
INT cmd_replace (LPTSTR param)
|
||||||
{
|
{
|
||||||
LPTSTR *arg;
|
LPTSTR *arg;
|
||||||
INT argc, i,filesReplaced = 0, nFiles, srcIndex = -1, destIndex = -1;
|
INT argc, i,filesReplaced = 0, nFiles, srcIndex = -1, destIndex = -1;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#ifdef INCLUDE_CMD_SCREEN
|
#ifdef INCLUDE_CMD_SCREEN
|
||||||
|
|
||||||
|
|
||||||
INT CommandScreen (LPTSTR cmd, LPTSTR param)
|
INT CommandScreen (LPTSTR param)
|
||||||
{
|
{
|
||||||
SHORT x,y;
|
SHORT x,y;
|
||||||
BOOL bSkipText = FALSE;
|
BOOL bSkipText = FALSE;
|
||||||
|
|
|
@ -51,7 +51,7 @@ skip_ws ( LPCTSTR p )
|
||||||
return p + _tcsspn ( p, _T(" \t") );
|
return p + _tcsspn ( p, _T(" \t") );
|
||||||
}
|
}
|
||||||
|
|
||||||
INT cmd_set (LPTSTR cmd, LPTSTR param)
|
INT cmd_set (LPTSTR param)
|
||||||
{
|
{
|
||||||
LPTSTR p;
|
LPTSTR p;
|
||||||
|
|
||||||
|
|
|
@ -14,13 +14,13 @@
|
||||||
|
|
||||||
/* our current default is delayedexpansion */
|
/* our current default is delayedexpansion */
|
||||||
|
|
||||||
INT cmd_setlocal (LPTSTR cmd, LPTSTR param)
|
INT cmd_setlocal (LPTSTR param)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* endlocal doesn't take any params */
|
/* endlocal doesn't take any params */
|
||||||
INT cmd_endlocal (LPTSTR cmd, LPTSTR param)
|
INT cmd_endlocal (LPTSTR param)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,10 +36,10 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
INT cmd_shift (LPTSTR cmd, LPTSTR param)
|
INT cmd_shift (LPTSTR param)
|
||||||
{
|
{
|
||||||
|
|
||||||
TRACE ("cmd_shift: (\'%s\', \'%s\')\n", debugstr_aw(cmd), debugstr_aw(param));
|
TRACE ("cmd_shift: (\'%s\')\n", debugstr_aw(param));
|
||||||
|
|
||||||
if (!_tcsncmp (param, _T("/?"), 2))
|
if (!_tcsncmp (param, _T("/?"), 2))
|
||||||
{
|
{
|
||||||
|
|
|
@ -34,7 +34,7 @@ static TCHAR *GetParameter(TCHAR **pPointer)
|
||||||
return start - 1;
|
return start - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
INT cmd_start (LPTSTR First, LPTSTR Rest)
|
INT cmd_start (LPTSTR Rest)
|
||||||
{
|
{
|
||||||
TCHAR szFullName[CMDLINE_LENGTH];
|
TCHAR szFullName[CMDLINE_LENGTH];
|
||||||
TCHAR rest[CMDLINE_LENGTH];
|
TCHAR rest[CMDLINE_LENGTH];
|
||||||
|
|
|
@ -129,7 +129,7 @@ static BOOL ParseTime (LPTSTR s)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
INT cmd_time (LPTSTR cmd, LPTSTR param)
|
INT cmd_time (LPTSTR param)
|
||||||
{
|
{
|
||||||
LPTSTR *arg;
|
LPTSTR *arg;
|
||||||
INT argc;
|
INT argc;
|
||||||
|
|
|
@ -60,7 +60,7 @@ PrintElapsedTime (DWORD time,INT format)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
INT CommandTimer (LPTSTR cmd, LPTSTR param)
|
INT CommandTimer (LPTSTR param)
|
||||||
{
|
{
|
||||||
// all timers are kept
|
// all timers are kept
|
||||||
static DWORD clksT[10];
|
static DWORD clksT[10];
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#ifdef INCLUDE_CMD_TITLE
|
#ifdef INCLUDE_CMD_TITLE
|
||||||
|
|
||||||
|
|
||||||
INT cmd_title (LPTSTR cmd, LPTSTR param)
|
INT cmd_title (LPTSTR param)
|
||||||
{
|
{
|
||||||
|
|
||||||
/* Do nothing if no args */
|
/* Do nothing if no args */
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
#ifdef INCLUDE_CMD_TYPE
|
#ifdef INCLUDE_CMD_TYPE
|
||||||
|
|
||||||
|
|
||||||
INT cmd_type (LPTSTR cmd, LPTSTR param)
|
INT cmd_type (LPTSTR param)
|
||||||
{
|
{
|
||||||
TCHAR buff[256];
|
TCHAR buff[256];
|
||||||
HANDLE hFile, hConsoleOut;
|
HANDLE hFile, hConsoleOut;
|
||||||
|
|
|
@ -57,7 +57,7 @@ VOID ShortVersion (VOID)
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
INT cmd_ver (LPTSTR cmd, LPTSTR param)
|
INT cmd_ver (LPTSTR param)
|
||||||
{
|
{
|
||||||
INT i;
|
INT i;
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
static BOOL bVerify = FALSE;
|
static BOOL bVerify = FALSE;
|
||||||
|
|
||||||
|
|
||||||
INT cmd_verify (LPTSTR cmd, LPTSTR param)
|
INT cmd_verify (LPTSTR param)
|
||||||
{
|
{
|
||||||
if (!_tcsncmp (param, _T("/?"), 2))
|
if (!_tcsncmp (param, _T("/?"), 2))
|
||||||
{
|
{
|
||||||
|
|
|
@ -61,7 +61,7 @@ PrintVolumeHeader (LPTSTR pszRootPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
INT cmd_vol (LPTSTR cmd, LPTSTR param)
|
INT cmd_vol (LPTSTR param)
|
||||||
{
|
{
|
||||||
TCHAR szRootPath[] = _T("A:\\");
|
TCHAR szRootPath[] = _T("A:\\");
|
||||||
TCHAR szPath[MAX_PATH];
|
TCHAR szPath[MAX_PATH];
|
||||||
|
|
|
@ -173,7 +173,7 @@ static INT ServiceActivate (LPTSTR param, HWND hWnd)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
INT CommandWindow (LPTSTR cmd, LPTSTR param)
|
INT CommandWindow (LPTSTR param)
|
||||||
{
|
{
|
||||||
HWND hwnd;
|
HWND hwnd;
|
||||||
|
|
||||||
|
@ -189,7 +189,7 @@ INT CommandWindow (LPTSTR cmd, LPTSTR param)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
INT CommandActivate (LPTSTR cmd, LPTSTR param)
|
INT CommandActivate (LPTSTR param)
|
||||||
{
|
{
|
||||||
HWND hwnd;
|
HWND hwnd;
|
||||||
LPTSTR *arg;
|
LPTSTR *arg;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue