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:
Jeffrey Morlan 2008-08-25 23:22:03 +00:00
parent c9b3cf161b
commit c49ed3a82c
46 changed files with 133 additions and 185 deletions

View file

@ -139,7 +139,7 @@ VOID ExpandAlias (LPTSTR cmd, INT maxlen)
}
INT CommandAlias (LPTSTR cmd, LPTSTR param)
INT CommandAlias (LPTSTR param)
{
LPTSTR ptr;

View file

@ -188,7 +188,7 @@ ChangeAttribute (LPTSTR pszPath, LPTSTR pszFile, DWORD dwMask,
}
INT CommandAttrib (LPTSTR cmd, LPTSTR param)
INT CommandAttrib (LPTSTR param)
{
LPTSTR *arg;
INT argc, i;

View file

@ -29,7 +29,7 @@
#ifdef INCLUDE_CMD_BEEP
INT cmd_beep (LPTSTR cmd, LPTSTR param)
INT cmd_beep (LPTSTR param)
{
if (_tcsncmp (param, _T("/?"), 2) == 0)
{

View file

@ -40,11 +40,11 @@
* context block.
*/
INT cmd_call (LPTSTR cmd, LPTSTR param)
INT cmd_call (LPTSTR param)
{
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))
{
ConOutResPaging(TRUE,STRING_CALL_HELP);
@ -54,7 +54,7 @@ INT cmd_call (LPTSTR cmd, LPTSTR param)
if (*param == _T(':') && (bc))
{
bc->lCallPosition = SetFilePointer(bc->hBatchFile, 0, &bc->lCallPositionHigh, FILE_CURRENT);
cmd_goto(_T("goto"), param);
cmd_goto(param);
return 0;
}

View file

@ -17,7 +17,7 @@
#ifdef INCLUDE_CMD_CHCP
INT CommandChcp (LPTSTR cmd, LPTSTR param)
INT CommandChcp (LPTSTR param)
{
LPTSTR *arg;
INT args;

View file

@ -100,7 +100,7 @@ IsKeyInString (LPTSTR lpString, TCHAR cKey, BOOL bCaseSensitive)
INT
CommandChoice (LPTSTR cmd, LPTSTR param)
CommandChoice (LPTSTR param)
{
LPTSTR lpOptions;
TCHAR Options[6];

View file

@ -30,7 +30,7 @@
#ifdef INCLUDE_CMD_CLS
INT cmd_cls (LPTSTR cmd, LPTSTR param)
INT cmd_cls (LPTSTR param)
{
CONSOLE_SCREEN_BUFFER_INFO csbi;
COORD coPos;

View file

@ -648,7 +648,7 @@ DoCommand (LPTSTR line)
if (!_tcscmp (com, cmdptr->name))
{
cmdptr->func (com, rest);
cmdptr->func (rest);
break;
}
@ -669,11 +669,8 @@ DoCommand (LPTSTR line)
{
/* OK its one of the specials...*/
/* Terminate first word properly */
com[cl] = _T('\0');
/* Call with new rest */
cmdptr->func (com, cstart + cl);
cmdptr->func (cstart + cl);
break;
}
}
@ -1541,10 +1538,10 @@ Initialize (int argc, const TCHAR* argv[])
if (!IsExistingFile (_T("\\autoexec.bat")))
{
#ifdef INCLUDE_CMD_DATE
cmd_date (_T(""), _T(""));
cmd_date (_T(""));
#endif
#ifdef INCLUDE_CMD_TIME
cmd_time (_T(""), _T(""));
cmd_time (_T(""));
#endif
}
else

View file

@ -68,30 +68,30 @@ extern OSVERSIONINFO osvi;
/* Prototypes for ALIAS.C */
VOID ExpandAlias (LPTSTR, INT);
INT CommandAlias (LPTSTR, LPTSTR);
INT CommandAlias (LPTSTR);
/* Prototypes for ATTRIB.C */
INT CommandAttrib (LPTSTR, LPTSTR);
INT CommandAttrib (LPTSTR);
/* Prototypes for BEEP.C */
INT cmd_beep (LPTSTR, LPTSTR);
INT cmd_beep (LPTSTR);
/* Prototypes for CALL.C */
INT cmd_call (LPTSTR, LPTSTR);
INT cmd_call (LPTSTR);
/* Prototypes for CHCP.C */
INT CommandChcp (LPTSTR, LPTSTR);
INT CommandChcp (LPTSTR);
/* Prototypes for CHOICE.C */
INT CommandChoice (LPTSTR, LPTSTR);
INT CommandChoice (LPTSTR);
/* Prototypes for CLS.C */
INT cmd_cls (LPTSTR, LPTSTR);
INT cmd_cls (LPTSTR);
/* Prototypes for CMD.C */
@ -122,7 +122,7 @@ typedef struct tagCOMMAND
{
LPTSTR name;
INT flags;
INT (*func) (LPTSTR, LPTSTR);
INT (*func)(LPTSTR);
} COMMAND, *LPCOMMAND;
extern COMMAND cmds[]; /* The internal command table */
@ -135,7 +135,7 @@ LPCTSTR GetParsedEnvVar ( LPCTSTR varName, UINT* varNameLen, BOOL ModeSetA );
/* Prototypes for COLOR.C */
VOID SetScreenColor(WORD wArgColor, BOOL bFill);
INT CommandColor (LPTSTR, LPTSTR);
INT CommandColor (LPTSTR);
VOID ConInDummy (VOID);
VOID ConInDisable (VOID);
@ -169,39 +169,39 @@ VOID ConErrResPrintf (UINT resID, ...);
VOID ConOutResPaging(BOOL NewPage, UINT resID);
/* Prototypes for COPY.C */
INT cmd_copy (LPTSTR, LPTSTR);
INT cmd_copy (LPTSTR);
/* Prototypes for DATE.C */
INT cmd_date (LPTSTR, LPTSTR);
INT cmd_date (LPTSTR);
/* Prototypes for DEL.C */
INT CommandDelete (LPTSTR, LPTSTR);
INT CommandDelete (LPTSTR);
/* Prototypes for DELAY.C */
INT CommandDelay (LPTSTR, LPTSTR);
INT CommandDelay (LPTSTR);
/* Prototypes for DIR.C */
INT CommandDir (LPTSTR, LPTSTR);
INT CommandDir (LPTSTR);
/* Prototypes for DIRSTACK.C */
VOID InitDirectoryStack (VOID);
VOID DestroyDirectoryStack (VOID);
INT GetDirectoryStackDepth (VOID);
INT CommandPushd (LPTSTR, LPTSTR);
INT CommandPopd (LPTSTR, LPTSTR);
INT CommandDirs (LPTSTR, LPTSTR);
INT CommandPushd (LPTSTR);
INT CommandPopd (LPTSTR);
INT CommandDirs (LPTSTR);
/* Prototypes for ECHO.C */
INT CommandEcho (LPTSTR, LPTSTR);
INT CommandEchos (LPTSTR, LPTSTR);
INT CommandEchoerr (LPTSTR, LPTSTR);
INT CommandEchoserr (LPTSTR, LPTSTR);
INT CommandEcho (LPTSTR);
INT CommandEchos (LPTSTR);
INT CommandEchoerr (LPTSTR);
INT CommandEchoserr (LPTSTR);
/* Prototypes for ERROR.C */
@ -235,15 +235,15 @@ VOID CompleteFilename (LPTSTR, BOOL, LPTSTR, UINT);
/* Prototypes for FOR.C */
INT cmd_for (LPTSTR, LPTSTR);
INT cmd_for (LPTSTR);
/* Prototypes for FREE.C */
INT CommandFree (LPTSTR, LPTSTR);
INT CommandFree (LPTSTR);
/* Prototypes for GOTO.C */
INT cmd_goto (LPTSTR, LPTSTR);
INT cmd_goto (LPTSTR);
/* Prototypes for HISTORY.C */
@ -254,23 +254,23 @@ VOID History_move_to_bottom(VOID);/*F3*/
VOID InitHistory(VOID);
VOID CleanHistory(VOID);
VOID History_del_current_entry(LPTSTR str);/*CTRL-D*/
INT CommandHistory (LPTSTR cmd, LPTSTR param);
INT CommandHistory (LPTSTR param);
#endif
/* Prototypes for INTERNAL.C */
VOID InitLastPath (VOID);
VOID FreeLastPath (VOID);
INT cmd_chdir (LPTSTR, LPTSTR);
INT cmd_mkdir (LPTSTR, LPTSTR);
INT cmd_rmdir (LPTSTR, LPTSTR);
INT CommandExit (LPTSTR, LPTSTR);
INT CommandRem (LPTSTR, LPTSTR);
INT CommandShowCommands (LPTSTR, LPTSTR);
INT CommandShowCommandsDetail (LPTSTR, LPTSTR);
INT cmd_chdir (LPTSTR);
INT cmd_mkdir (LPTSTR);
INT cmd_rmdir (LPTSTR);
INT CommandExit (LPTSTR);
INT CommandRem (LPTSTR);
INT CommandShowCommands (LPTSTR);
INT CommandShowCommandsDetail (LPTSTR);
/* Prototypes for LABEL.C */
INT cmd_label (LPTSTR, LPTSTR);
INT cmd_label (LPTSTR);
/* Prototypes for LOCALE.C */
@ -292,7 +292,7 @@ extern UINT InputCodePage;
extern UINT OutputCodePage;
/* Prototypes for MEMORY.C */
INT CommandMemory (LPTSTR, LPTSTR);
INT CommandMemory (LPTSTR);
/* Prototypes for MISC.C */
@ -322,11 +322,11 @@ INT FilePromptYNA (UINT);
/* Prototypes for MOVE.C */
INT cmd_move (LPTSTR, LPTSTR);
INT cmd_move (LPTSTR);
/* Prototypes for MSGBOX.C */
INT CommandMsgbox (LPTSTR, LPTSTR);
INT CommandMsgbox (LPTSTR);
/* Prototypes from PARSER.C */
@ -346,12 +346,12 @@ VOID FreeCommand(PARSED_COMMAND *Cmd);
/* Prototypes from PATH.C */
INT cmd_path (LPTSTR, LPTSTR);
INT cmd_path (LPTSTR);
/* Prototypes from PROMPT.C */
VOID PrintPrompt (VOID);
INT cmd_prompt (LPTSTR, LPTSTR);
INT cmd_prompt (LPTSTR);
/* Prototypes for REDIR.C */
@ -371,24 +371,24 @@ VOID FreeRedirection(REDIRECTION *);
/* Prototypes for REN.C */
INT cmd_rename (LPTSTR, LPTSTR);
INT cmd_rename (LPTSTR);
/* Prototypes for REN.C */
INT cmd_replace (LPTSTR, LPTSTR);
INT cmd_replace (LPTSTR);
/* Prototypes for SCREEN.C */
INT CommandScreen (LPTSTR, LPTSTR);
INT CommandScreen (LPTSTR);
/* Prototypes for SET.C */
INT cmd_set (LPTSTR, LPTSTR);
INT cmd_set (LPTSTR);
/* Prototypes for SETLOCAL.C */
INT cmd_setlocal (LPTSTR, LPTSTR);
INT cmd_endlocal (LPTSTR, LPTSTR);
INT cmd_setlocal (LPTSTR);
INT cmd_endlocal (LPTSTR);
/* Prototypes for START.C */
INT cmd_start (LPTSTR, LPTSTR);
INT cmd_start (LPTSTR);
/* Prototypes for STRTOCLR.C */
@ -396,45 +396,45 @@ BOOL StringToColor (LPWORD, LPTSTR *);
/* Prototypes for TIME.C */
INT cmd_time (LPTSTR, LPTSTR);
INT cmd_time (LPTSTR);
/* Prototypes for TIMER.C */
INT CommandTimer (LPTSTR cmd, LPTSTR param);
INT CommandTimer (LPTSTR param);
/* Prototypes for TITLE.C */
INT cmd_title (LPTSTR, LPTSTR);
INT cmd_title (LPTSTR);
/* Prototypes for TYPE.C */
INT cmd_type (LPTSTR, LPTSTR);
INT cmd_type (LPTSTR);
/* Prototypes for VER.C */
VOID ShortVersion (VOID);
INT cmd_ver (LPTSTR, LPTSTR);
INT cmd_ver (LPTSTR);
/* Prototypes for VERIFY.C */
INT cmd_verify (LPTSTR, LPTSTR);
INT cmd_verify (LPTSTR);
/* Prototypes for VOL.C */
INT cmd_vol (LPTSTR, LPTSTR);
INT cmd_vol (LPTSTR);
/* Prototypes for WHERE.C */
BOOL SearchForExecutable (LPCTSTR, LPTSTR);
/* Prototypes for WINDOW.C */
INT CommandActivate (LPTSTR, LPTSTR);
INT CommandWindow (LPTSTR, LPTSTR);
INT CommandActivate (LPTSTR);
INT CommandWindow (LPTSTR);
/* The MSDOS Batch Commands [MS-DOS 5.0 User's Guide and Reference p359] */
int cmd_if(TCHAR *, TCHAR *);
int cmd_pause(TCHAR *, TCHAR *);
int cmd_shift(TCHAR *, TCHAR *);
int cmd_if(TCHAR *);
int cmd_pause(TCHAR *);
int cmd_shift(TCHAR *);
#endif /* _CMD_H_INCLUDED_ */

View file

@ -93,11 +93,9 @@ COMMAND cmds[] =
{_T("dirs"), 0, CommandDirs},
#endif
{_T("echo"), 0, CommandEcho},
{_T("echo."), CMD_HIDE, CommandEcho},
{_T("echo"), CMD_SPECIAL, CommandEcho},
{_T("echos"), 0, CommandEchos},
{_T("echoerr"), 0, CommandEchoerr},
{_T("echoerr."), CMD_HIDE, CommandEchoerr},
{_T("echoerr"), CMD_SPECIAL, CommandEchoerr},
{_T("echoserr"), 0, CommandEchoserr},
{_T("endlocal"), 0, cmd_endlocal},

View file

@ -63,7 +63,7 @@ VOID SetScreenColor (WORD wColor, BOOL bNoFill)
*
* internal dir command
*/
INT CommandColor (LPTSTR first, LPTSTR rest)
INT CommandColor (LPTSTR rest)
{
if (_tcsncmp (rest, _T("/?"), 2) == 0)
{

View file

@ -290,7 +290,7 @@ static INT CopyOverwrite (LPTSTR fn)
}
INT cmd_copy (LPTSTR cmd, LPTSTR param)
INT cmd_copy (LPTSTR param)
{
LPTSTR *arg;
INT argc, i, nFiles, nOverwrite = 0, nSrc = -1, nDes = -1;

View file

@ -176,7 +176,7 @@ ParseDate (LPTSTR s)
}
INT cmd_date (LPTSTR cmd, LPTSTR param)
INT cmd_date (LPTSTR param)
{
LPTSTR *arg;
INT argc;

View file

@ -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"
param is whatever is given after the command*/

View file

@ -14,7 +14,7 @@
#ifdef INCLUDE_CMD_DELAY
INT CommandDelay (LPTSTR cmd, LPTSTR param)
INT CommandDelay (LPTSTR param)
{
DWORD val;
DWORD mul=1000;

View file

@ -1789,7 +1789,7 @@ ULARGE_INTEGER u64Temp; /* A temporary counter */
* internal dir command
*/
INT
CommandDir(LPTSTR first, LPTSTR rest)
CommandDir(LPTSTR rest)
{
TCHAR dircmd[256]; /* A variable to store the DIRCMD enviroment variable */
TCHAR path[MAX_PATH];

View file

@ -140,7 +140,7 @@ INT GetDirectoryStackDepth (VOID)
/*
* pushd command
*/
INT CommandPushd (LPTSTR first, LPTSTR rest)
INT CommandPushd (LPTSTR rest)
{
TCHAR curPath[MAX_PATH];
TCHAR newPath[MAX_PATH];
@ -174,7 +174,7 @@ INT CommandPushd (LPTSTR first, LPTSTR rest)
/*
* popd command
*/
INT CommandPopd (LPTSTR first, LPTSTR rest)
INT CommandPopd (LPTSTR rest)
{
TCHAR szPath[MAX_PATH];
@ -201,7 +201,7 @@ INT CommandPopd (LPTSTR first, LPTSTR rest)
/*
* dirs command
*/
INT CommandDirs (LPTSTR first, LPTSTR rest)
INT CommandDirs (LPTSTR rest)
{
LPDIRENTRY lpDir;

View file

@ -29,24 +29,11 @@
#include <precomp.h>
INT CommandEcho (LPTSTR cmd, LPTSTR param)
INT CommandEcho (LPTSTR param)
{
LPTSTR p1, p2;
TRACE ("CommandEcho '%s' : '%s'\n", debugstr_aw(cmd), 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++;
TRACE ("CommandEcho: '%s'\n", debugstr_aw(param));
/* skip all spaces for the check of '/?', 'ON' and 'OFF' */
p1 = param;
@ -83,22 +70,22 @@ INT CommandEcho (LPTSTR cmd, LPTSTR param)
}
if (*p1 != _T('\0'))
{
ConOutPuts (param);
/* skip the first character */
ConOutPuts(param + 1);
}
else
{
ConOutResPrintf(STRING_ECHO_HELP5, bEcho ? D_ON : D_OFF);
}
}
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))
{
@ -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))
{
@ -124,26 +111,16 @@ INT CommandEchoerr (LPTSTR cmd, LPTSTR param)
return 0;
}
if (_tcsicmp (cmd, _T("echoerr.")) == 0)
{
if (param[0] == 0)
ConErrChar (_T('\n'));
else
ConErrPuts (param);
}
else if (*param)
{
ConErrPuts (param);
}
ConErrPuts (param);
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))
{

View file

@ -47,14 +47,14 @@
* per list element.
*/
INT cmd_for (LPTSTR cmd, LPTSTR param)
INT cmd_for (LPTSTR param)
{
LPBATCH_CONTEXT lpNew;
LPTSTR pp;
TCHAR var;
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))
{

View file

@ -84,7 +84,7 @@ PrintDiskInfo (LPTSTR szDisk)
}
INT CommandFree (LPTSTR cmd, LPTSTR param)
INT CommandFree (LPTSTR param)
{
LPTSTR szParam;
TCHAR szDefPath[MAX_PATH];

View file

@ -36,13 +36,13 @@
*
*/
INT cmd_goto (LPTSTR cmd, LPTSTR param)
INT cmd_goto (LPTSTR param)
{
TCHAR szMsg[RC_STRING_MAX_SIZE];
LPTSTR tmp, tmp2;
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))
{

View file

@ -74,7 +74,7 @@ VOID set_size(INT new_size);
INT CommandHistory (LPTSTR cmd, LPTSTR param)
INT CommandHistory (LPTSTR param)
{
LPTSTR tmp;
INT tmp_int;

View file

@ -36,12 +36,12 @@
#define X_EXEC 1
#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 */
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))
{

View file

@ -267,7 +267,7 @@ BOOL SetRootPath(TCHAR *InPath)
* CD / CHDIR
*
*/
INT cmd_chdir (LPTSTR cmd, LPTSTR param)
INT cmd_chdir (LPTSTR param)
{
WIN32_FIND_DATA f;
@ -455,10 +455,9 @@ MakeFullPath(TCHAR * DirPath)
* MD / MKDIR
*
*/
INT cmd_mkdir (LPTSTR cmd, LPTSTR param)
INT cmd_mkdir (LPTSTR param)
{
LPTSTR dir; /* pointer to the directory to change to */
LPTSTR place; /* used to search for the \ when no space is used */
LPTSTR *p = NULL;
INT argc;
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);
if (argc > 1)
{
@ -501,7 +478,6 @@ INT cmd_mkdir (LPTSTR cmd, LPTSTR param)
}
else
dir = p[0];
}
if (!dir)
{
@ -573,7 +549,7 @@ BOOL DeleteFolder(LPTSTR 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 ch;
@ -707,7 +683,7 @@ INT cmd_rmdir (LPTSTR cmd, LPTSTR param)
* set the exitflag to true
*
*/
INT CommandExit (LPTSTR cmd, LPTSTR param)
INT CommandExit (LPTSTR param)
{
if (!_tcsncmp (param, _T("/?"), 2))
{
@ -741,7 +717,7 @@ INT CommandExit (LPTSTR cmd, LPTSTR param)
* does nothing
*
*/
INT CommandRem (LPTSTR cmd, LPTSTR param)
INT CommandRem (LPTSTR param)
{
if (!_tcsncmp (param, _T("/?"), 2))
{
@ -753,13 +729,13 @@ INT CommandRem (LPTSTR cmd, LPTSTR param)
#endif /* INCLUDE_CMD_REM */
INT CommandShowCommands (LPTSTR cmd, LPTSTR param)
INT CommandShowCommands (LPTSTR param)
{
PrintCommandList ();
return 0;
}
INT CommandShowCommandsDetail (LPTSTR cmd, LPTSTR param)
INT CommandShowCommandsDetail (LPTSTR param)
{
/* If a param was send, display help of correspondent command */
if (_tcslen(param))

View file

@ -22,7 +22,7 @@
#ifdef INCLUDE_CMD_LABEL
INT cmd_label (LPTSTR cmd, LPTSTR param)
INT cmd_label (LPTSTR param)
{
TCHAR szRootPath[] = _T("A:\\");
TCHAR szLabel[80];

View file

@ -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;
TCHAR szMemoryLoad[20];

View file

@ -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;
INT argc, i, nFiles;

View file

@ -22,7 +22,7 @@
#define _SYNTAX_CHECK
INT CommandMsgbox (LPTSTR cmd, LPTSTR param)
INT CommandMsgbox (LPTSTR param)
{
//used to parse command line

View file

@ -33,7 +33,7 @@
#define ENV_BUFFER_SIZE 1024
INT cmd_path (LPTSTR cmd, LPTSTR param)
INT cmd_path (LPTSTR param)
{
if (!_tcsncmp (param, _T("/?"), 2))

View file

@ -34,10 +34,10 @@
* 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))
{

View file

@ -190,7 +190,7 @@ VOID PrintPrompt(VOID)
#ifdef INCLUDE_CMD_PROMPT
INT cmd_prompt (LPTSTR cmd, LPTSTR param)
INT cmd_prompt (LPTSTR param)
{
if (!_tcsncmp (param, _T("/?"), 2))
{

View file

@ -40,7 +40,7 @@ enum
* file rename internal command.
*
*/
INT cmd_rename (LPTSTR cmd, LPTSTR param)
INT cmd_rename (LPTSTR param)
{
LPTSTR *arg = NULL;
INT args = 0;

View file

@ -358,7 +358,7 @@ INT recFindSubDirs(DWORD dwFlags,
return filesReplaced;
}
INT cmd_replace (LPTSTR cmd, LPTSTR param)
INT cmd_replace (LPTSTR param)
{
LPTSTR *arg;
INT argc, i,filesReplaced = 0, nFiles, srcIndex = -1, destIndex = -1;

View file

@ -16,7 +16,7 @@
#ifdef INCLUDE_CMD_SCREEN
INT CommandScreen (LPTSTR cmd, LPTSTR param)
INT CommandScreen (LPTSTR param)
{
SHORT x,y;
BOOL bSkipText = FALSE;

View file

@ -51,7 +51,7 @@ skip_ws ( LPCTSTR p )
return p + _tcsspn ( p, _T(" \t") );
}
INT cmd_set (LPTSTR cmd, LPTSTR param)
INT cmd_set (LPTSTR param)
{
LPTSTR p;

View file

@ -14,13 +14,13 @@
/* our current default is delayedexpansion */
INT cmd_setlocal (LPTSTR cmd, LPTSTR param)
INT cmd_setlocal (LPTSTR param)
{
return 0;
}
/* endlocal doesn't take any params */
INT cmd_endlocal (LPTSTR cmd, LPTSTR param)
INT cmd_endlocal (LPTSTR param)
{
return 0;
}

View file

@ -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))
{

View file

@ -34,7 +34,7 @@ static TCHAR *GetParameter(TCHAR **pPointer)
return start - 1;
}
INT cmd_start (LPTSTR First, LPTSTR Rest)
INT cmd_start (LPTSTR Rest)
{
TCHAR szFullName[CMDLINE_LENGTH];
TCHAR rest[CMDLINE_LENGTH];

View file

@ -129,7 +129,7 @@ static BOOL ParseTime (LPTSTR s)
}
INT cmd_time (LPTSTR cmd, LPTSTR param)
INT cmd_time (LPTSTR param)
{
LPTSTR *arg;
INT argc;

View file

@ -60,7 +60,7 @@ PrintElapsedTime (DWORD time,INT format)
}
INT CommandTimer (LPTSTR cmd, LPTSTR param)
INT CommandTimer (LPTSTR param)
{
// all timers are kept
static DWORD clksT[10];

View file

@ -14,7 +14,7 @@
#ifdef INCLUDE_CMD_TITLE
INT cmd_title (LPTSTR cmd, LPTSTR param)
INT cmd_title (LPTSTR param)
{
/* Do nothing if no args */

View file

@ -31,7 +31,7 @@
#ifdef INCLUDE_CMD_TYPE
INT cmd_type (LPTSTR cmd, LPTSTR param)
INT cmd_type (LPTSTR param)
{
TCHAR buff[256];
HANDLE hFile, hConsoleOut;

View file

@ -57,7 +57,7 @@ VOID ShortVersion (VOID)
*
*
*/
INT cmd_ver (LPTSTR cmd, LPTSTR param)
INT cmd_ver (LPTSTR param)
{
INT i;

View file

@ -27,7 +27,7 @@
static BOOL bVerify = FALSE;
INT cmd_verify (LPTSTR cmd, LPTSTR param)
INT cmd_verify (LPTSTR param)
{
if (!_tcsncmp (param, _T("/?"), 2))
{

View file

@ -61,7 +61,7 @@ PrintVolumeHeader (LPTSTR pszRootPath)
}
INT cmd_vol (LPTSTR cmd, LPTSTR param)
INT cmd_vol (LPTSTR param)
{
TCHAR szRootPath[] = _T("A:\\");
TCHAR szPath[MAX_PATH];

View file

@ -173,7 +173,7 @@ static INT ServiceActivate (LPTSTR param, HWND hWnd)
INT CommandWindow (LPTSTR cmd, LPTSTR param)
INT CommandWindow (LPTSTR param)
{
HWND hwnd;
@ -189,7 +189,7 @@ INT CommandWindow (LPTSTR cmd, LPTSTR param)
}
INT CommandActivate (LPTSTR cmd, LPTSTR param)
INT CommandActivate (LPTSTR param)
{
HWND hwnd;
LPTSTR *arg;