mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
Made the loading of resource strings more unicode compatibly.
svn path=/trunk/; revision=14908
This commit is contained in:
parent
7ce3991a5c
commit
ea130b3ba2
47 changed files with 552 additions and 547 deletions
|
@ -237,7 +237,7 @@ VOID DestroyAlias (VOID)
|
|||
/* specified routines */
|
||||
VOID ExpandAlias (LPTSTR cmd, INT maxlen)
|
||||
{
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
unsigned n = 0,
|
||||
m,
|
||||
i,
|
||||
|
@ -281,8 +281,8 @@ VOID ExpandAlias (LPTSTR cmd, INT maxlen)
|
|||
m = _tcslen (ptr->lpSubst);
|
||||
if ((int)(_tcslen (cmd) - len + m - n) > maxlen)
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_ALIAS_ERROR, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_ALIAS_ERROR, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg);
|
||||
/* the parser won't cause any problems with an empty line */
|
||||
cmd[0] = _T('\0');
|
||||
}
|
||||
|
@ -306,12 +306,12 @@ VOID ExpandAlias (LPTSTR cmd, INT maxlen)
|
|||
INT CommandAlias (LPTSTR cmd, LPTSTR param)
|
||||
{
|
||||
LPTSTR ptr;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_ALIAS_HELP, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_ALIAS_HELP, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts (szMsg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -197,7 +197,7 @@ INT CommandAttrib (LPTSTR cmd, LPTSTR param)
|
|||
BOOL bDirectories = FALSE;
|
||||
DWORD dwAttrib = 0;
|
||||
DWORD dwMask = 0;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
/* initialize strings */
|
||||
szPath[0] = _T('\0');
|
||||
|
@ -206,8 +206,8 @@ INT CommandAttrib (LPTSTR cmd, LPTSTR param)
|
|||
/* print help */
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_ATTRIB_HELP, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_ATTRIB_HELP, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts (szMsg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -219,7 +219,7 @@ VOID ExitBatch (LPTSTR msg)
|
|||
BOOL Batch (LPTSTR fullname, LPTSTR firstword, LPTSTR param)
|
||||
{
|
||||
HANDLE hFile;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
hFile = CreateFile (fullname, GENERIC_READ, FILE_SHARE_READ, NULL,
|
||||
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL |
|
||||
|
@ -232,8 +232,8 @@ BOOL Batch (LPTSTR fullname, LPTSTR firstword, LPTSTR param)
|
|||
|
||||
if (hFile == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_BATCH_ERROR, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_BATCH_ERROR, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -32,12 +32,12 @@
|
|||
|
||||
INT cmd_beep (LPTSTR cmd, LPTSTR param)
|
||||
{
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
if (_tcsncmp (param, _T("/?"), 2) == 0)
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_ALIAS_HELP, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_ALIAS_HELP, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -45,15 +45,15 @@
|
|||
INT cmd_call (LPTSTR cmd, LPTSTR param)
|
||||
{
|
||||
LPBATCH_CONTEXT n = NULL;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
#ifdef _DEBUG
|
||||
DebugPrintf (_T("cmd_call: (\'%s\',\'%s\')\n"), cmd, param);
|
||||
#endif
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_CALL_HELP, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_CALL_HELP, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -22,13 +22,13 @@ INT CommandChcp (LPTSTR cmd, LPTSTR param)
|
|||
INT args;
|
||||
UINT uOldCodePage;
|
||||
UINT uNewCodePage;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
/* print help */
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_CHCP_HELP, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_CHCP_HELP, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts (szMsg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -38,8 +38,8 @@ INT CommandChcp (LPTSTR cmd, LPTSTR param)
|
|||
if (args == 0)
|
||||
{
|
||||
/* display active code page number */
|
||||
LoadString( GetModuleHandle(NULL), STRING_CHCP_ERROR1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg, GetConsoleCP ());
|
||||
LoadString( GetModuleHandle(NULL), STRING_CHCP_ERROR1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg, GetConsoleCP ());
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -47,8 +47,8 @@ INT CommandChcp (LPTSTR cmd, LPTSTR param)
|
|||
if (args >= 2)
|
||||
{
|
||||
/* too many parameters */
|
||||
LoadString( GetModuleHandle(NULL), STRING_CHCP_ERROR2, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg, param);
|
||||
LoadString( GetModuleHandle(NULL), STRING_CHCP_ERROR2, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg, param);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -61,16 +61,16 @@ INT CommandChcp (LPTSTR cmd, LPTSTR param)
|
|||
|
||||
if (uNewCodePage == 0)
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_CHCP_ERROR3, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg, arg[0]);
|
||||
LoadString( GetModuleHandle(NULL), STRING_CHCP_ERROR3, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg, arg[0]);
|
||||
freep (arg);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!SetConsoleCP (uNewCodePage))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_CHCP_ERROR4, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_CHCP_ERROR4, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -121,17 +121,16 @@ CommandChoice (LPTSTR cmd, LPTSTR param)
|
|||
INT GCret;
|
||||
TCHAR Ch;
|
||||
DWORD amount,clk;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
LoadString( GetModuleHandle(NULL), STRING_CHOICE_OPTION, (LPTSTR) Options,sizeof(lpOptions));
|
||||
lpOptions = _T(Options);
|
||||
LoadString( GetModuleHandle(NULL), STRING_CHOICE_OPTION, Options,sizeof(lpOptions)/sizeof(TCHAR));
|
||||
lpOptions = Options;
|
||||
|
||||
if (_tcsncmp (param, _T("/?"), 2) == 0)
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_CHOICE_HELP, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
|
||||
return 0;
|
||||
LoadString( GetModuleHandle(NULL), STRING_CHOICE_HELP, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts (szMsg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* retrieve text */
|
||||
|
@ -171,8 +170,8 @@ CommandChoice (LPTSTR cmd, LPTSTR param)
|
|||
if (_tcslen (lpOptions) == 0)
|
||||
{
|
||||
|
||||
LoadString( GetModuleHandle(NULL), STRING_CHOICE_ERROR, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_CHOICE_ERROR, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPuts (szMsg);
|
||||
freep (arg);
|
||||
return 1;
|
||||
}
|
||||
|
@ -202,8 +201,8 @@ CommandChoice (LPTSTR cmd, LPTSTR param)
|
|||
|
||||
if (*s != _T(','))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_CHOICE_ERROR_TXT, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_CHOICE_ERROR_TXT, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPuts (szMsg);
|
||||
freep (arg);
|
||||
return 1;
|
||||
}
|
||||
|
@ -214,8 +213,8 @@ CommandChoice (LPTSTR cmd, LPTSTR param)
|
|||
}
|
||||
else if (arg[i][0] == _T('/'))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_CHOICE_ERROR_OPTION, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg, arg[i]);
|
||||
LoadString( GetModuleHandle(NULL), STRING_CHOICE_ERROR_OPTION, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg, arg[i]);
|
||||
freep (arg);
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -36,12 +36,12 @@ INT cmd_cls (LPTSTR cmd, LPTSTR param)
|
|||
DWORD dwWritten;
|
||||
CONSOLE_SCREEN_BUFFER_INFO csbi;
|
||||
COORD coPos;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_CLS_HELP, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_CLS_HELP, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts (szMsg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -552,7 +552,7 @@ VOID ParseCommandLine (LPTSTR cmd)
|
|||
{
|
||||
TCHAR cmdline[CMDLINE_LENGTH];
|
||||
LPTSTR s;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
#ifdef FEATURE_REDIRECTION
|
||||
TCHAR in[CMDLINE_LENGTH] = _T("");
|
||||
TCHAR out[CMDLINE_LENGTH] = _T("");
|
||||
|
@ -634,15 +634,15 @@ VOID ParseCommandLine (LPTSTR cmd)
|
|||
FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
if (hFile == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_CMD_ERROR1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg, in);
|
||||
LoadString( GetModuleHandle(NULL), STRING_CMD_ERROR1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg, in);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!SetStdHandle (STD_INPUT_HANDLE, hFile))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_CMD_ERROR1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg, in);
|
||||
LoadString( GetModuleHandle(NULL), STRING_CMD_ERROR1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg, in);
|
||||
return;
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
@ -667,8 +667,8 @@ VOID ParseCommandLine (LPTSTR cmd)
|
|||
|
||||
if (hFile[1] == INVALID_HANDLE_VALUE){
|
||||
|
||||
LoadString( GetModuleHandle(NULL), STRING_CMD_ERROR2, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_CMD_ERROR2, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -720,16 +720,16 @@ VOID ParseCommandLine (LPTSTR cmd)
|
|||
FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
if (hFile == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_CMD_ERROR3, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg, out);
|
||||
LoadString( GetModuleHandle(NULL), STRING_CMD_ERROR3, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg, out);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (!SetStdHandle (STD_OUTPUT_HANDLE, hFile))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_CMD_ERROR3, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg, out);
|
||||
LoadString( GetModuleHandle(NULL), STRING_CMD_ERROR3, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg, out);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -782,16 +782,16 @@ VOID ParseCommandLine (LPTSTR cmd)
|
|||
NULL);
|
||||
if (hFile == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_CMD_ERROR3, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg, err);
|
||||
LoadString( GetModuleHandle(NULL), STRING_CMD_ERROR3, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg, err);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!SetStdHandle (STD_ERROR_HANDLE, hFile))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_CMD_ERROR3, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg, err);
|
||||
LoadString( GetModuleHandle(NULL), STRING_CMD_ERROR3, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg, err);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -1076,36 +1076,36 @@ VOID RemoveBreakHandler (VOID)
|
|||
static VOID
|
||||
ShowCommands (VOID)
|
||||
{
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
/* print command list */
|
||||
LoadString( GetModuleHandle(NULL), STRING_CMD_HELP1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPrintf ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_CMD_HELP1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPrintf (szMsg);
|
||||
PrintCommandList ();
|
||||
|
||||
/* print feature list */
|
||||
LoadString( GetModuleHandle(NULL), STRING_CMD_HELP2, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_CMD_HELP2, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts (szMsg);
|
||||
|
||||
#ifdef FEATURE_ALIASES
|
||||
LoadString( GetModuleHandle(NULL), STRING_CMD_HELP3, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_CMD_HELP3, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts (szMsg);
|
||||
#endif
|
||||
#ifdef FEATURE_HISTORY
|
||||
LoadString( GetModuleHandle(NULL), STRING_CMD_HELP4, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_CMD_HELP4, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts (szMsg);
|
||||
#endif
|
||||
#ifdef FEATURE_UNIX_FILENAME_COMPLETION
|
||||
LoadString( GetModuleHandle(NULL), STRING_CMD_HELP5, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_CMD_HELP5, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts (szMsg);
|
||||
#endif
|
||||
#ifdef FEATURE_DIRECTORY_STACK
|
||||
LoadString( GetModuleHandle(NULL), STRING_CMD_HELP6, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_CMD_HELP6, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts (szMsg);
|
||||
#endif
|
||||
#ifdef FEATURE_REDIRECTION
|
||||
LoadString( GetModuleHandle(NULL), STRING_CMD_HELP7, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_CMD_HELP7, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts (szMsg);
|
||||
#endif
|
||||
ConOutChar (_T('\n'));
|
||||
}
|
||||
|
@ -1124,7 +1124,7 @@ Initialize (int argc, TCHAR* argv[])
|
|||
TCHAR commandline[CMDLINE_LENGTH];
|
||||
TCHAR ModuleName[_MAX_PATH + 1];
|
||||
INT i;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
//INT len;
|
||||
//TCHAR *ptr, *cmdLine;
|
||||
|
@ -1154,8 +1154,8 @@ Initialize (int argc, TCHAR* argv[])
|
|||
|
||||
if (argc >= 2 && !_tcsncmp (argv[1], _T("/?"), 2))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_CMD_HELP8, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_CMD_HELP8, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts (szMsg);
|
||||
ExitProcess (0);
|
||||
}
|
||||
SetConsoleMode (hIn, ENABLE_PROCESSED_INPUT);
|
||||
|
@ -1259,8 +1259,8 @@ Initialize (int argc, TCHAR* argv[])
|
|||
|
||||
if (IsExistingFile (_T("commandline")))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_CMD_ERROR4, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg, commandline);
|
||||
LoadString( GetModuleHandle(NULL), STRING_CMD_ERROR4, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg, commandline);
|
||||
ParseCommandLine (commandline);
|
||||
}
|
||||
}
|
||||
|
@ -1291,20 +1291,20 @@ Initialize (int argc, TCHAR* argv[])
|
|||
|
||||
static VOID Cleanup (int argc, TCHAR *argv[])
|
||||
{
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
/* run cmdexit.bat */
|
||||
if (IsExistingFile (_T("cmdexit.bat")))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_CMD_ERROR5, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_CMD_ERROR5, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg);
|
||||
|
||||
ParseCommandLine (_T("cmdexit.bat"));
|
||||
}
|
||||
else if (IsExistingFile (_T("\\cmdexit.bat")))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_CMD_ERROR5, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_CMD_ERROR5, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg);
|
||||
ParseCommandLine (_T("\\cmdexit.bat"));
|
||||
}
|
||||
#ifndef __REACTOS__
|
||||
|
@ -1320,8 +1320,8 @@ static VOID Cleanup (int argc, TCHAR *argv[])
|
|||
|
||||
if (IsExistingFile (_T("commandline")))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_CMD_ERROR4, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg, commandline);
|
||||
LoadString( GetModuleHandle(NULL), STRING_CMD_ERROR4, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg, commandline);
|
||||
ParseCommandLine (commandline);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,9 +29,9 @@
|
|||
|
||||
static VOID ColorHelp (VOID)
|
||||
{
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
LoadString( GetModuleHandle(NULL), STRING_COLOR_HELP1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
LoadString( GetModuleHandle(NULL), STRING_COLOR_HELP1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts (szMsg);
|
||||
|
||||
}
|
||||
|
||||
|
@ -41,29 +41,29 @@ VOID SetScreenColor (WORD wColor, BOOL bFill)
|
|||
DWORD dwWritten;
|
||||
CONSOLE_SCREEN_BUFFER_INFO csbi;
|
||||
COORD coPos;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
if ((wColor & 0xF) == (wColor &0xF0) >> 4)
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_COLOR_ERROR1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPuts ((LPTSTR)szMsg);
|
||||
}
|
||||
else
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_COLOR_ERROR1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPuts (szMsg);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (bFill == TRUE)
|
||||
{
|
||||
GetConsoleScreenBufferInfo (hConsole, &csbi);
|
||||
{
|
||||
GetConsoleScreenBufferInfo (hConsole, &csbi);
|
||||
|
||||
coPos.X = 0;
|
||||
coPos.Y = 0;
|
||||
FillConsoleOutputAttribute (hConsole,
|
||||
coPos.X = 0;
|
||||
coPos.Y = 0;
|
||||
FillConsoleOutputAttribute (hConsole,
|
||||
(WORD)(wColor & 0x00FF),
|
||||
(csbi.dwSize.X)*(csbi.dwSize.Y),
|
||||
coPos,
|
||||
&dwWritten);
|
||||
}
|
||||
SetConsoleTextAttribute (hConsole, (WORD)(wColor & 0x00FF));
|
||||
}
|
||||
}
|
||||
SetConsoleTextAttribute (hConsole, (WORD)(wColor & 0x00FF));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -74,7 +74,7 @@ VOID SetScreenColor (WORD wColor, BOOL bFill)
|
|||
*/
|
||||
INT CommandColor (LPTSTR first, LPTSTR rest)
|
||||
{
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
if (_tcsncmp (rest, _T("/?"), 2) == 0)
|
||||
{
|
||||
|
@ -92,18 +92,18 @@ INT CommandColor (LPTSTR first, LPTSTR rest)
|
|||
|
||||
if (StringToColor (&wColor, &rest) == FALSE)
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_COLOR_ERROR2, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_COLOR_ERROR2, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPuts (szMsg);
|
||||
return 1;
|
||||
}
|
||||
|
||||
LoadString( GetModuleHandle(NULL), STRING_COLOR_ERROR3, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg, wColor);
|
||||
LoadString( GetModuleHandle(NULL), STRING_COLOR_ERROR3, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg, wColor);
|
||||
|
||||
if ((wColor & 0xF) == (wColor &0xF0) >> 4)
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_COLOR_ERROR4, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg, wColor);
|
||||
LoadString( GetModuleHandle(NULL), STRING_COLOR_ERROR4, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg, wColor);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -214,7 +214,7 @@ VOID ConOutFormatMessage (DWORD MessageId, ...)
|
|||
DWORD ret;
|
||||
LPTSTR text;
|
||||
va_list arg_ptr;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
va_start (arg_ptr, MessageId);
|
||||
ret = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
|
@ -233,8 +233,8 @@ VOID ConOutFormatMessage (DWORD MessageId, ...)
|
|||
}
|
||||
else
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_CONSOLE_ERROR, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_CONSOLE_ERROR, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -301,13 +301,13 @@ Overwrite (LPTSTR fn)
|
|||
|
||||
LPTSTR lpOptions;
|
||||
TCHAR Options[3];
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
LoadString( GetModuleHandle(NULL), STRING_COPY_OPTION, (LPTSTR) Options,sizeof(Options)+sizeof(WCHAR));
|
||||
lpOptions = _T(Options);
|
||||
LoadString( GetModuleHandle(NULL), STRING_COPY_OPTION, Options,sizeof(Options)/sizeof(TCHAR));
|
||||
lpOptions = Options;
|
||||
|
||||
LoadString( GetModuleHandle(NULL), STRING_COPY_HELP1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPrintf ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_COPY_HELP1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPrintf (szMsg);
|
||||
|
||||
ConInString (inp, 10);
|
||||
ConOutPuts (_T(""));
|
||||
|
@ -339,7 +339,7 @@ int copy (LPTSTR source, LPTSTR dest, int append, LPDWORD lpdwFlags)
|
|||
DWORD dwWritten;
|
||||
DWORD i;
|
||||
BOOL bEof = FALSE;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
#ifdef _DEBUG
|
||||
DebugPrintf (_T("checking mode\n"));
|
||||
|
@ -351,8 +351,8 @@ int copy (LPTSTR source, LPTSTR dest, int append, LPDWORD lpdwFlags)
|
|||
NULL, OPEN_EXISTING, 0, NULL);
|
||||
if (hFileSrc == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_COPY_ERROR1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg, source);
|
||||
LoadString( GetModuleHandle(NULL), STRING_COPY_ERROR1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg, source);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -379,8 +379,8 @@ int copy (LPTSTR source, LPTSTR dest, int append, LPDWORD lpdwFlags)
|
|||
{
|
||||
if (!_tcscmp (dest, source))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_COPY_ERROR2, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg, source);
|
||||
LoadString( GetModuleHandle(NULL), STRING_COPY_ERROR2, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg, source);
|
||||
|
||||
CloseHandle (hFileSrc);
|
||||
return 0;
|
||||
|
@ -456,8 +456,8 @@ int copy (LPTSTR source, LPTSTR dest, int append, LPDWORD lpdwFlags)
|
|||
if (dwWritten != dwRead)
|
||||
{
|
||||
|
||||
LoadString( GetModuleHandle(NULL), STRING_COPY_ERROR3, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_COPY_ERROR3, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg);
|
||||
|
||||
free (buffer);
|
||||
CloseHandle (hFileDest);
|
||||
|
@ -638,7 +638,7 @@ INT cmd_copy (LPTSTR first, LPTSTR rest)
|
|||
TCHAR dir_d[_MAX_DIR];
|
||||
TCHAR file_d[_MAX_FNAME];
|
||||
TCHAR ext_d[_MAX_EXT];
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
int argc;
|
||||
int append;
|
||||
|
@ -655,8 +655,8 @@ INT cmd_copy (LPTSTR first, LPTSTR rest)
|
|||
|
||||
if (!_tcsncmp (rest, _T("/?"), 2))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_COPY_HELP2, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_COPY_HELP2, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts (szMsg);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -728,8 +728,8 @@ INT cmd_copy (LPTSTR first, LPTSTR rest)
|
|||
}
|
||||
else if (bDestFound && bWildcards)
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_COPY_ERROR4, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_COPY_ERROR4, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg);
|
||||
|
||||
DeleteFileList (sources);
|
||||
freep (p);
|
||||
|
|
|
@ -47,24 +47,24 @@ static WORD awMonths[2][13] =
|
|||
static VOID
|
||||
PrintDateString (VOID)
|
||||
{
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
switch (nDateFormat)
|
||||
{
|
||||
case 0: /* mmddyy */
|
||||
default:
|
||||
LoadString( GetModuleHandle(NULL), STRING_DATE_HELP1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPrintf ((LPTSTR)szMsg, cDateSeparator, cDateSeparator);
|
||||
LoadString( GetModuleHandle(NULL), STRING_DATE_HELP1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPrintf (szMsg, cDateSeparator, cDateSeparator);
|
||||
break;
|
||||
|
||||
case 1: /* ddmmyy */
|
||||
LoadString( GetModuleHandle(NULL), STRING_DATE_HELP2, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPrintf ((LPTSTR)szMsg, cDateSeparator, cDateSeparator);
|
||||
LoadString( GetModuleHandle(NULL), STRING_DATE_HELP2, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPrintf (szMsg, cDateSeparator, cDateSeparator);
|
||||
break;
|
||||
|
||||
case 2: /* yymmdd */
|
||||
LoadString( GetModuleHandle(NULL), STRING_DATE_HELP3, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPrintf ((LPTSTR)szMsg, cDateSeparator, cDateSeparator);
|
||||
LoadString( GetModuleHandle(NULL), STRING_DATE_HELP3, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPrintf (szMsg, cDateSeparator, cDateSeparator);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -189,12 +189,12 @@ INT cmd_date (LPTSTR cmd, LPTSTR param)
|
|||
INT i;
|
||||
BOOL bPrompt = TRUE;
|
||||
INT nDateString = -1;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_DATE_HELP4, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_DATE_HELP4, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -247,8 +247,8 @@ INT cmd_date (LPTSTR cmd, LPTSTR param)
|
|||
freep (arg);
|
||||
return 0;
|
||||
}
|
||||
LoadString( GetModuleHandle(NULL), STRING_DATE_ERROR, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_DATE_ERROR, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPuts (szMsg);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -111,22 +111,22 @@ INT CommandDelete (LPTSTR cmd, LPTSTR param)
|
|||
|
||||
LPTSTR lpOptions;
|
||||
TCHAR Options[11];
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
LONG ch;
|
||||
|
||||
|
||||
|
||||
LoadString( GetModuleHandle(NULL), STRING_DEL_OPTION, (LPTSTR) Options,sizeof(Options)+sizeof(WCHAR));
|
||||
lpOptions = _T(Options);
|
||||
LoadString( GetModuleHandle(NULL), STRING_DEL_OPTION, Options,sizeof(Options)/sizeof(TCHAR));
|
||||
lpOptions = Options;
|
||||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_DEL_HELP1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPrintf ((LPTSTR)szMsg,
|
||||
lpOptions[2],Options[3],lpOptions[6],lpOptions[4],lpOptions[7],lpOptions[9],lpOptions[10],
|
||||
lpOptions[2],Options[3],lpOptions[6],lpOptions[4],lpOptions[7],lpOptions[9],lpOptions[10],
|
||||
lpOptions[2],Options[3],lpOptions[6],lpOptions[4],lpOptions[7],lpOptions[9],lpOptions[10],
|
||||
lpOptions[2],Options[3],lpOptions[6],lpOptions[4],lpOptions[7],lpOptions[9],lpOptions[10]
|
||||
LoadString( GetModuleHandle(NULL), STRING_DEL_HELP1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPrintf (szMsg,
|
||||
lpOptions[2],Options[3],lpOptions[6],lpOptions[4],lpOptions[7],lpOptions[9],lpOptions[10],
|
||||
lpOptions[2],Options[3],lpOptions[6],lpOptions[4],lpOptions[7],lpOptions[9],lpOptions[10],
|
||||
lpOptions[2],Options[3],lpOptions[6],lpOptions[4],lpOptions[7],lpOptions[9],lpOptions[10],
|
||||
lpOptions[2],Options[3],lpOptions[6],lpOptions[4],lpOptions[7],lpOptions[9],lpOptions[10]
|
||||
);
|
||||
return 0;
|
||||
}
|
||||
|
@ -212,9 +212,9 @@ INT CommandDelete (LPTSTR cmd, LPTSTR param)
|
|||
if (!((dwFlags & DEL_YES) || (dwFlags & DEL_QUIET) || (dwFlags & DEL_PROMPT)))
|
||||
{
|
||||
|
||||
LoadString( GetModuleHandle(NULL), STRING_DEL_HELP2, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
LoadString( GetModuleHandle(NULL), STRING_DEL_HELP2, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
|
||||
res = FilePromptYN (_T( (LPTSTR) szMsg));
|
||||
res = FilePromptYN (szMsg);
|
||||
|
||||
if ((res == PROMPT_NO) || (res == PROMPT_BREAK))
|
||||
break;
|
||||
|
@ -231,8 +231,8 @@ INT CommandDelete (LPTSTR cmd, LPTSTR param)
|
|||
{
|
||||
/* wildcards in filespec */
|
||||
#ifdef _DEBUG
|
||||
LoadString( GetModuleHandle(NULL), STRING_DEL_ERROR1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_DEL_ERROR1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf ((LPTSTR)szMsg);
|
||||
#endif
|
||||
|
||||
GetFullPathName (arg[i],
|
||||
|
@ -241,11 +241,11 @@ INT CommandDelete (LPTSTR cmd, LPTSTR param)
|
|||
&pFilePart);
|
||||
|
||||
#ifdef _DEBUG
|
||||
LoadString( GetModuleHandle(NULL), STRING_DEL_ERROR2, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg, szFullPath);
|
||||
LoadString( GetModuleHandle(NULL), STRING_DEL_ERROR2, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg, szFullPath);
|
||||
|
||||
LoadString( GetModuleHandle(NULL), STRING_DEL_ERROR3, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg, pFilePart);
|
||||
LoadString( GetModuleHandle(NULL), STRING_DEL_ERROR3, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (pFilePart);
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -268,18 +268,18 @@ INT CommandDelete (LPTSTR cmd, LPTSTR param)
|
|||
_tcscpy (pFilePart, f.cFileName);
|
||||
|
||||
#ifdef _DEBUG
|
||||
LoadString( GetModuleHandle(NULL), STRING_DEL_ERROR4, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_DEL_ERROR4, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg);
|
||||
|
||||
#endif
|
||||
/* ask for deleting */
|
||||
if (dwFlags & DEL_PROMPT)
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_DEL_ERROR5, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg, szFullPath);
|
||||
LoadString( GetModuleHandle(NULL), STRING_DEL_ERROR5, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szFullPath);
|
||||
|
||||
LoadString( GetModuleHandle(NULL), STRING_DEL_ERROR6, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
res = FilePromptYN ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_DEL_ERROR6, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
res = FilePromptYN (szMsg);
|
||||
|
||||
if ((res == PROMPT_NO) || (res == PROMPT_BREAK))
|
||||
{
|
||||
|
@ -288,10 +288,10 @@ INT CommandDelete (LPTSTR cmd, LPTSTR param)
|
|||
}
|
||||
|
||||
if (!(dwFlags & DEL_QUIET) && !(dwFlags & DEL_TOTAL))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_DEL_ERROR7, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg, szFullPath);
|
||||
}
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_DEL_ERROR7, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg, szFullPath);
|
||||
}
|
||||
|
||||
/* delete the file */
|
||||
if (!(dwFlags & DEL_NOTHING))
|
||||
|
@ -334,8 +334,8 @@ INT CommandDelete (LPTSTR cmd, LPTSTR param)
|
|||
{
|
||||
/* no wildcards in filespec */
|
||||
#ifdef _DEBUG
|
||||
LoadString( GetModuleHandle(NULL), STRING_DEL_ERROR8, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_DEL_ERROR8, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg);
|
||||
#endif
|
||||
GetFullPathName (arg[i],
|
||||
MAX_PATH,
|
||||
|
@ -345,11 +345,11 @@ INT CommandDelete (LPTSTR cmd, LPTSTR param)
|
|||
/*ask for deleting */
|
||||
if((dwFlags & DEL_PROMPT) && (FindFirstFile(szFullPath, &f) != INVALID_HANDLE_VALUE)) //Don't ask if the file doesn't exist, the following code will make the error-msg
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_DEL_ERROR5, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg, szFullPath);
|
||||
LoadString( GetModuleHandle(NULL), STRING_DEL_ERROR5, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg, szFullPath);
|
||||
|
||||
LoadString( GetModuleHandle(NULL), STRING_DEL_ERROR6, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
res = FilePromptYN ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_DEL_ERROR6, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
res = FilePromptYN (szMsg);
|
||||
|
||||
if ((res == PROMPT_NO) || (res == PROMPT_BREAK))
|
||||
{
|
||||
|
@ -358,14 +358,14 @@ INT CommandDelete (LPTSTR cmd, LPTSTR param)
|
|||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
LoadString( GetModuleHandle(NULL), STRING_DEL_ERROR3, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg, szFullPath);
|
||||
LoadString( GetModuleHandle(NULL), STRING_DEL_ERROR3, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg, szFullPath);
|
||||
#endif
|
||||
if (!(dwFlags & DEL_QUIET) && !(dwFlags & DEL_TOTAL))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_DEL_ERROR7, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg, szFullPath);
|
||||
}
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_DEL_ERROR7, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg, szFullPath);
|
||||
}
|
||||
|
||||
if (!(dwFlags & DEL_NOTHING))
|
||||
{
|
||||
|
@ -416,15 +416,15 @@ INT CommandDelete (LPTSTR cmd, LPTSTR param)
|
|||
if (!(dwFlags & DEL_QUIET))
|
||||
{
|
||||
if (dwFiles < 2)
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_DEL_HELP3, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
}
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_DEL_HELP3, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
}
|
||||
else
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_DEL_HELP4, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
}
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_DEL_HELP4, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
}
|
||||
|
||||
ConOutPrintf ((LPTSTR)szMsg, dwFiles);
|
||||
ConOutPrintf (szMsg, dwFiles);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -19,14 +19,14 @@ INT CommandDelay (LPTSTR cmd, LPTSTR param)
|
|||
{
|
||||
DWORD val;
|
||||
DWORD mul=1000;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
if (_tcsncmp (param, _T("/?"), 2) == 0)
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_DELAY_HELP, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_DELAY_HELP, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts (szMsg);
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (*param==0)
|
||||
|
|
|
@ -210,9 +210,9 @@ static ULARGE_INTEGER recurse_bytes;
|
|||
static VOID
|
||||
DirHelp (VOID)
|
||||
{
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
LoadString( GetModuleHandle(NULL), STRING_DIR_HELP1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
LoadString( GetModuleHandle(NULL), STRING_DIR_HELP1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts (szMsg);
|
||||
}
|
||||
|
||||
|
||||
|
@ -228,13 +228,13 @@ DirReadParam (LPTSTR line, /* [IN] The line with the parameters & switches */
|
|||
LPDIRSWITCHFLAGS lpFlags /* [IN/OUT] The flags after calculating switches */
|
||||
)
|
||||
{
|
||||
TCHAR cCurSwitch; /* The current switch */
|
||||
TCHAR cCurChar; /* Current examing character */
|
||||
TCHAR cCurUChar; /* Current upper examing character */
|
||||
BOOL bNegative; /* Negative switch */
|
||||
BOOL bPNegative; /* Negative switch parameter */
|
||||
BOOL bIntoQuotes; /* A flag showing if we are in quotes (") */
|
||||
LPTSTR ptrLast; /* A pointer to the last character of param */
|
||||
TCHAR cCurSwitch; /* The current switch */
|
||||
TCHAR cCurChar; /* Current examing character */
|
||||
TCHAR cCurUChar; /* Current upper examing character */
|
||||
BOOL bNegative; /* Negative switch */
|
||||
BOOL bPNegative; /* Negative switch parameter */
|
||||
BOOL bIntoQuotes; /* A flag showing if we are in quotes (") */
|
||||
LPTSTR ptrLast; /* A pointer to the last character of param */
|
||||
|
||||
/* Initialize variables; */
|
||||
cCurSwitch = _T(' ');
|
||||
|
@ -773,7 +773,7 @@ PrintDirectoryHeader (LPTSTR szPath, LPINT pLine, LPDIRSWITCHFLAGS lpFlags)
|
|||
TCHAR szVolName[80];
|
||||
DWORD dwSerialNr;
|
||||
LPTSTR p;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
if (lpFlags->bBareFormat)
|
||||
return(TRUE);
|
||||
|
@ -828,22 +828,22 @@ PrintDirectoryHeader (LPTSTR szPath, LPINT pLine, LPDIRSWITCHFLAGS lpFlags)
|
|||
|
||||
if (szVolName[0] != _T('\0'))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_DIR_HELP2, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPrintf ((LPTSTR)szMsg, szRootName[0], szVolName);
|
||||
}
|
||||
LoadString( GetModuleHandle(NULL), STRING_DIR_HELP2, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPrintf (szMsg, szRootName[0], szVolName);
|
||||
}
|
||||
else
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_DIR_HELP3, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPrintf ((LPTSTR)szMsg, szRootName[0]);
|
||||
}
|
||||
LoadString( GetModuleHandle(NULL), STRING_DIR_HELP3, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPrintf (szMsg, szRootName[0]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* print the volume serial number if the return was successful */
|
||||
|
||||
LoadString( GetModuleHandle(NULL), STRING_DIR_HELP4, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPrintf ((LPTSTR)szMsg,
|
||||
LoadString( GetModuleHandle(NULL), STRING_DIR_HELP4, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPrintf (szMsg,
|
||||
HIWORD(dwSerialNr),
|
||||
LOWORD(dwSerialNr));
|
||||
|
||||
|
@ -926,11 +926,11 @@ DirPrintFileDateTime (TCHAR * lpDate,
|
|||
LPWIN32_FIND_DATA lpFile,
|
||||
LPDIRSWITCHFLAGS lpFlags)
|
||||
{
|
||||
FILETIME ft;
|
||||
SYSTEMTIME dt;
|
||||
TCHAR szDate[30];
|
||||
TCHAR szTime[30];
|
||||
WORD wYear;
|
||||
FILETIME ft;
|
||||
SYSTEMTIME dt;
|
||||
TCHAR szDate[30];
|
||||
TCHAR szTime[30];
|
||||
WORD wYear;
|
||||
|
||||
/* Select the right time field */
|
||||
switch (lpFlags->stTimeField.eTimeField)
|
||||
|
@ -1053,10 +1053,10 @@ PrintSummary(LPTSTR szPath,
|
|||
LPINT pLine,
|
||||
LPDIRSWITCHFLAGS lpFlags)
|
||||
{
|
||||
TCHAR szBuffer[64];
|
||||
ULARGE_INTEGER uliFree;
|
||||
TCHAR szRoot[] = _T("A:\\");
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szBuffer[64];
|
||||
ULARGE_INTEGER uliFree;
|
||||
TCHAR szRoot[] = _T("A:\\");
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
|
||||
/* Here we check if we didn't find anything */
|
||||
|
@ -1074,16 +1074,16 @@ WCHAR szMsg[RC_STRING_MAX_SIZE];
|
|||
{
|
||||
ConvertULargeInteger (u64Bytes, szBuffer, sizeof(szBuffer), lpFlags->bTSeperator);
|
||||
|
||||
LoadString( GetModuleHandle(NULL), STRING_DIR_HELP5, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPrintf ((LPTSTR)szMsg,ulFiles, szBuffer);
|
||||
}
|
||||
LoadString( GetModuleHandle(NULL), STRING_DIR_HELP5, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPrintf (szMsg,ulFiles, szBuffer);
|
||||
}
|
||||
|
||||
/* Print total directories and freespace */
|
||||
szRoot[0] = szPath[0];
|
||||
GetUserDiskFreeSpace(szRoot, &uliFree);
|
||||
ConvertULargeInteger (uliFree, szBuffer, sizeof(szBuffer), lpFlags->bTSeperator);
|
||||
LoadString( GetModuleHandle(NULL), STRING_DIR_HELP6, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPrintf ((LPTSTR)szMsg,ulDirs, szBuffer);
|
||||
LoadString( GetModuleHandle(NULL), STRING_DIR_HELP6, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPrintf (szMsg,ulDirs, szBuffer);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1096,8 +1096,8 @@ WCHAR szMsg[RC_STRING_MAX_SIZE];
|
|||
TCHAR* getExt(const TCHAR* file)
|
||||
{
|
||||
|
||||
TCHAR* tmp = _tcsrchr(file,'.');
|
||||
return tmp?tmp+1:"";
|
||||
TCHAR* tmp = _tcsrchr(file,_T('.'));
|
||||
return tmp?tmp+1:_T("");
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1169,13 +1169,13 @@ ULARGE_INTEGER u64FileSize; /* The file size */
|
|||
/* Calculate short name */
|
||||
szShortName[0] = _T('\0');
|
||||
if (lpFlags->bShortName)
|
||||
_stprintf(szShortName," %-12s", ptrFiles[i]->cAlternateFileName);
|
||||
_stprintf(szShortName,_T(" %-12s"), ptrFiles[i]->cAlternateFileName);
|
||||
|
||||
/* Format date and time */
|
||||
DirPrintFileDateTime(szDate,szTime,ptrFiles[i],lpFlags);
|
||||
|
||||
/* Print the line */
|
||||
ConOutPrintf("%10s %-8s %*s%s %s\n",
|
||||
ConOutPrintf(_T("%10s %-8s %*s%s %s\n"),
|
||||
szDate,
|
||||
szTime,
|
||||
iSizeFormat,
|
||||
|
@ -1244,13 +1244,13 @@ TCHAR szTempFname[MAX_PATH]; /* Temporary string */
|
|||
DWORD temp = (j*iLines)+i;
|
||||
if (temp >= dwCount) break;
|
||||
if (ptrFiles[temp]->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
|
||||
_stprintf(szTempFname, "[%s]", ptrFiles[temp]->cFileName);
|
||||
_stprintf(szTempFname, _T("[%s]"), ptrFiles[temp]->cFileName);
|
||||
else
|
||||
_stprintf(szTempFname, "%s", ptrFiles[temp]->cFileName);
|
||||
_stprintf(szTempFname, _T("%s"), ptrFiles[temp]->cFileName);
|
||||
|
||||
ConOutPrintf("%-*s",iBiggestName + 1 , szTempFname );
|
||||
ConOutPrintf(_T("%-*s"),iBiggestName + 1 , szTempFname );
|
||||
}
|
||||
ConOutPrintf("\n");
|
||||
ConOutPrintf(_T("\n"));
|
||||
}
|
||||
}
|
||||
/* Print Line sorted */
|
||||
|
@ -1259,18 +1259,18 @@ TCHAR szTempFname[MAX_PATH]; /* Temporary string */
|
|||
for (i = 0;i < dwCount;i++)
|
||||
{
|
||||
if (ptrFiles[i]->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
|
||||
_stprintf(szTempFname, "[%s]", ptrFiles[i]->cFileName);
|
||||
_stprintf(szTempFname, _T("[%s]"), ptrFiles[i]->cFileName);
|
||||
else
|
||||
_stprintf(szTempFname, "%s", ptrFiles[i]->cFileName);
|
||||
_stprintf(szTempFname, _T("%s"), ptrFiles[i]->cFileName);
|
||||
|
||||
ConOutPrintf("%-*s", iBiggestName + 1, szTempFname );
|
||||
ConOutPrintf(_T("%-*s"), iBiggestName + 1, szTempFname );
|
||||
/* We print a new line at the end of each column
|
||||
except for the case that it is the last item.*/
|
||||
if (!((i+1)%iColumns) && (i < (dwCount-1)))
|
||||
ConOutPrintf("\n");
|
||||
ConOutPrintf(_T("\n"));
|
||||
}
|
||||
/* Add a new line after the last item */
|
||||
ConOutPrintf("\n");
|
||||
ConOutPrintf(_T("\n"));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -1329,7 +1329,7 @@ ULARGE_INTEGER u64FileSize; /* The file size */
|
|||
DirPrintFileDateTime(szDate,szTime,ptrFiles[i],lpFlags);
|
||||
|
||||
/* Print the line */
|
||||
ConOutPrintf("%-8s %-3s %*s %s %s\n",
|
||||
ConOutPrintf(_T("%-8s %-3s %*s %s %s\n"),
|
||||
szName, /* The file's 8.3 name */
|
||||
szExt, /* The file's 8.3 extension */
|
||||
iSizeFormat, /* print format for size column */
|
||||
|
@ -1367,11 +1367,11 @@ TCHAR szFullName[MAX_PATH]; /* The fullpath name of file */
|
|||
{
|
||||
_tcscpy(szFullName, szCurPath);
|
||||
_tcscat(szFullName, ptrFiles[i]->cFileName);
|
||||
ConOutPrintf("%s\n", szFullName);
|
||||
ConOutPrintf(_T("%s\n"), szFullName);
|
||||
}
|
||||
/* if we are not in recursive mode we print the file names */
|
||||
else
|
||||
ConOutPrintf("%s\n",ptrFiles[i]->cFileName);
|
||||
ConOutPrintf(_T("%s\n"),ptrFiles[i]->cFileName);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -1388,7 +1388,7 @@ DirPrintFiles(LPWIN32_FIND_DATA ptrFiles[], /* [IN] Files' Info */
|
|||
LPDIRSWITCHFLAGS lpFlags) /* [IN] The flags used */
|
||||
{
|
||||
TCHAR szTemp[MAX_PATH]; /* A buffer to format the directory header */
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
/* Print directory header */
|
||||
_tcscpy(szTemp, szCurPath);
|
||||
|
@ -1399,8 +1399,8 @@ WCHAR szMsg[RC_STRING_MAX_SIZE];
|
|||
and if we are in recursive mode... we must have results */
|
||||
if (!(lpFlags->bBareFormat ) && !((lpFlags->bRecursive) && (dwCount <= 0)))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_DIR_HELP7, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPrintf (_T( (LPTSTR)szMsg), szTemp);
|
||||
LoadString( GetModuleHandle(NULL), STRING_DIR_HELP7, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPrintf (szMsg, szTemp);
|
||||
}
|
||||
|
||||
/* Bare format */
|
||||
|
@ -1478,10 +1478,10 @@ long iComp = 0; /* The comparison result */
|
|||
(lpFile1->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY));
|
||||
break;
|
||||
case ORDER_EXTENSION: /* Order by extension name /o:e */
|
||||
iComp = _stricmp(getExt(lpFile1->cFileName),getExt(lpFile2->cFileName));
|
||||
iComp = _tcsicmp(getExt(lpFile1->cFileName),getExt(lpFile2->cFileName));
|
||||
break;
|
||||
case ORDER_NAME: /* Order by filename /o:n */
|
||||
iComp = _stricmp(lpFile1->cFileName, lpFile2->cFileName);
|
||||
iComp = _tcsicmp(lpFile1->cFileName, lpFile2->cFileName);
|
||||
break;
|
||||
case ORDER_TIME: /* Order by file's time /o:t */
|
||||
|
||||
|
@ -1610,7 +1610,7 @@ DWORD dwCountFiles; /* Counter for files */
|
|||
DWORD dwCountDirs; /* Counter for directories */
|
||||
ULARGE_INTEGER u64CountBytes; /* Counter for bytes */
|
||||
ULARGE_INTEGER u64Temp; /* A temporary counter */
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
/* Initialize Variables */
|
||||
ptrStartNode = NULL;
|
||||
|
@ -1728,8 +1728,8 @@ WCHAR szMsg[RC_STRING_MAX_SIZE];
|
|||
if (!(lpFlags->bBareFormat) && (dwCount > 0))
|
||||
{
|
||||
ConvertULargeInteger(u64CountBytes, szBytes, 20, lpFlags->bTSeperator);
|
||||
LoadString( GetModuleHandle(NULL), STRING_DIR_HELP8, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPrintf ((LPTSTR)szMsg,dwCountFiles, szBytes);
|
||||
LoadString( GetModuleHandle(NULL), STRING_DIR_HELP8, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPrintf (szMsg,dwCountFiles, szBytes);
|
||||
}
|
||||
|
||||
/* Add statistics to recursive statistics*/
|
||||
|
@ -1751,8 +1751,8 @@ WCHAR szMsg[RC_STRING_MAX_SIZE];
|
|||
if (hRecSearch != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
/* We search for directories other than "." and ".." */
|
||||
if ((_stricmp(wfdFileInfo.cFileName, _T(".")) != 0)
|
||||
&& (_stricmp(wfdFileInfo.cFileName, _T("..")) != 0 )
|
||||
if ((_tcsicmp(wfdFileInfo.cFileName, _T(".")) != 0)
|
||||
&& (_tcsicmp(wfdFileInfo.cFileName, _T("..")) != 0 )
|
||||
&& (wfdFileInfo.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
|
||||
{
|
||||
/* Concat the path and the directory to do recursive */
|
||||
|
|
|
@ -140,12 +140,12 @@ INT CommandPushd (LPTSTR first, LPTSTR rest)
|
|||
TCHAR curPath[MAX_PATH];
|
||||
TCHAR newPath[MAX_PATH];
|
||||
BOOL bChangePath = FALSE;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
if (!_tcsncmp (rest, _T("/?"), 2))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_DIRSTACK_HELP1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_DIRSTACK_HELP1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -173,12 +173,12 @@ INT CommandPushd (LPTSTR first, LPTSTR rest)
|
|||
INT CommandPopd (LPTSTR first, LPTSTR rest)
|
||||
{
|
||||
TCHAR szPath[MAX_PATH];
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
if (!_tcsncmp(rest, _T("/?"), 2))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_DIRSTACK_HELP2, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_DIRSTACK_HELP2, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts (szMsg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -201,12 +201,12 @@ INT CommandPopd (LPTSTR first, LPTSTR rest)
|
|||
INT CommandDirs (LPTSTR first, LPTSTR rest)
|
||||
{
|
||||
LPDIRENTRY lpDir;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
if (!_tcsncmp(rest, _T("/?"), 2))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_DIRSTACK_HELP3, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_DIRSTACK_HELP3, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts (szMsg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -216,8 +216,8 @@ INT CommandDirs (LPTSTR first, LPTSTR rest)
|
|||
|
||||
if (lpDir == NULL)
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_DIRSTACK_HELP4, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_DIRSTACK_HELP4, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts (szMsg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
INT CommandEcho (LPTSTR cmd, LPTSTR param)
|
||||
{
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
#ifdef _DEBUG
|
||||
DebugPrintf (_T("CommandEcho '%s' : '%s'\n"), cmd, param);
|
||||
|
@ -41,8 +41,8 @@ INT CommandEcho (LPTSTR cmd, LPTSTR param)
|
|||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_ECHO_HELP4, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_ECHO_HELP4, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts (szMsg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -62,8 +62,8 @@ INT CommandEcho (LPTSTR cmd, LPTSTR param)
|
|||
else if (*param)
|
||||
ConOutPuts (param);
|
||||
else {
|
||||
LoadString( GetModuleHandle(NULL), STRING_ECHO_HELP4, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPrintf ((LPTSTR)szMsg, bEcho ? D_ON : D_OFF);
|
||||
LoadString( GetModuleHandle(NULL), STRING_ECHO_HELP4, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPrintf (szMsg, bEcho ? D_ON : D_OFF);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ INT CommandEcho (LPTSTR cmd, LPTSTR param)
|
|||
|
||||
INT CommandEchos (LPTSTR cmd, LPTSTR param)
|
||||
{
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
#ifdef _DEBUG
|
||||
DebugPrintf (_T("CommandEchos '%s' : '%s'\n"), cmd, param);
|
||||
|
@ -80,8 +80,8 @@ INT CommandEchos (LPTSTR cmd, LPTSTR param)
|
|||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_ECHO_HELP1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_ECHO_HELP1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts(szMsg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ INT CommandEchos (LPTSTR cmd, LPTSTR param)
|
|||
|
||||
INT CommandEchoerr (LPTSTR cmd, LPTSTR param)
|
||||
{
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
#ifdef _DEBUG
|
||||
DebugPrintf (_T("CommandEchoerr '%s' : '%s'\n"), cmd, param);
|
||||
|
@ -103,8 +103,8 @@ INT CommandEchoerr (LPTSTR cmd, LPTSTR param)
|
|||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_ECHO_HELP2, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_ECHO_HELP2, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts((LPTSTR)szMsg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ INT CommandEchoerr (LPTSTR cmd, LPTSTR param)
|
|||
|
||||
INT CommandEchoserr (LPTSTR cmd, LPTSTR param)
|
||||
{
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
#ifdef _DEBUG
|
||||
DebugPrintf (_T("CommandEchoserr '%s' : '%s'\n"), cmd, param);
|
||||
|
@ -136,8 +136,8 @@ INT CommandEchoserr (LPTSTR cmd, LPTSTR param)
|
|||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_ECHO_HELP3, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_ECHO_HELP3, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts(szMsg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ VOID ErrorMessage (DWORD dwErrorCode, LPTSTR szFormat, ...)
|
|||
LPTSTR szError;
|
||||
#endif
|
||||
va_list arg_ptr;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
if (dwErrorCode == ERROR_SUCCESS)
|
||||
return;
|
||||
|
@ -71,8 +71,8 @@ VOID ErrorMessage (DWORD dwErrorCode, LPTSTR szFormat, ...)
|
|||
}
|
||||
else
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_ERROR_ERROR1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg, dwErrorCode);
|
||||
LoadString( GetModuleHandle(NULL), STRING_ERROR_ERROR1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg, dwErrorCode);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -81,20 +81,20 @@ VOID ErrorMessage (DWORD dwErrorCode, LPTSTR szFormat, ...)
|
|||
switch (dwErrorCode)
|
||||
{
|
||||
case ERROR_FILE_NOT_FOUND:
|
||||
LoadString( GetModuleHandle(NULL), STRING_ERROR_FILE_NOT_FOUND, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
LoadString( GetModuleHandle(NULL), STRING_ERROR_FILE_NOT_FOUND, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
break;
|
||||
|
||||
case ERROR_PATH_NOT_FOUND:
|
||||
LoadString( GetModuleHandle(NULL), STRING_ERROR_PATH_NOT_FOUND, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
LoadString( GetModuleHandle(NULL), STRING_ERROR_PATH_NOT_FOUND, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
break;
|
||||
|
||||
case ERROR_NOT_READY:
|
||||
LoadString( GetModuleHandle(NULL), STRING_ERROR_DRIVER_NOT_READY, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
LoadString( GetModuleHandle(NULL), STRING_ERROR_DRIVER_NOT_READY, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
break;
|
||||
|
||||
default:
|
||||
LoadString( GetModuleHandle(NULL), STRING_ERROR_ERROR1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_ERROR_ERROR1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -107,117 +107,115 @@ VOID ErrorMessage (DWORD dwErrorCode, LPTSTR szFormat, ...)
|
|||
|
||||
VOID error_parameter_format(TCHAR ch)
|
||||
{
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
LoadString( GetModuleHandle(NULL), STRING_ERROR_PARAMETERF_ERROR, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg, ch);
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
LoadString( GetModuleHandle(NULL), STRING_ERROR_PARAMETERF_ERROR, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg, ch);
|
||||
}
|
||||
|
||||
|
||||
VOID error_invalid_switch (TCHAR ch)
|
||||
{
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
LoadString( GetModuleHandle(NULL), STRING_ERROR_INVALID_SWITCH, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg, ch);
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
LoadString( GetModuleHandle(NULL), STRING_ERROR_INVALID_SWITCH, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg, ch);
|
||||
}
|
||||
|
||||
|
||||
VOID error_too_many_parameters (LPTSTR s)
|
||||
{
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
LoadString( GetModuleHandle(NULL), STRING_ERROR_TOO_MANY_PARAMETERS, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg, s);
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
LoadString( GetModuleHandle(NULL), STRING_ERROR_TOO_MANY_PARAMETERS, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg, s);
|
||||
}
|
||||
|
||||
|
||||
VOID error_path_not_found (VOID)
|
||||
{
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
LoadString( GetModuleHandle(NULL), STRING_ERROR_PATH_NOT_FOUND, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg);
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
LoadString( GetModuleHandle(NULL), STRING_ERROR_PATH_NOT_FOUND, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg);
|
||||
}
|
||||
|
||||
|
||||
VOID error_file_not_found (VOID)
|
||||
{
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
LoadString( GetModuleHandle(NULL), STRING_ERROR_FILE_NOT_FOUND, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg);
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
LoadString( GetModuleHandle(NULL), STRING_ERROR_FILE_NOT_FOUND, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf ((LPTSTR)szMsg);
|
||||
}
|
||||
|
||||
|
||||
VOID error_sfile_not_found (LPTSTR f)
|
||||
{
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
LoadString( GetModuleHandle(NULL), STRING_ERROR_FILE_NOT_FOUND, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ("%s - %s\n", (LPTSTR)szMsg,f);
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
LoadString( GetModuleHandle(NULL), STRING_ERROR_FILE_NOT_FOUND, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (_T("%s - %s\n"), szMsg,f);
|
||||
}
|
||||
|
||||
|
||||
VOID error_req_param_missing (VOID)
|
||||
{
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
LoadString( GetModuleHandle(NULL), STRING_ERROR_REQ_PARAM_MISSING, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg);
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
LoadString( GetModuleHandle(NULL), STRING_ERROR_REQ_PARAM_MISSING, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg);
|
||||
}
|
||||
|
||||
|
||||
VOID error_invalid_drive (VOID)
|
||||
{
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
LoadString( GetModuleHandle(NULL), STRING_ERROR_INVALID_DRIVE, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg);
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
LoadString( GetModuleHandle(NULL), STRING_ERROR_INVALID_DRIVE, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg);
|
||||
}
|
||||
|
||||
|
||||
VOID error_bad_command (VOID)
|
||||
{
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
LoadString( GetModuleHandle(NULL), STRING_ERROR_BADCOMMAND, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg);
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
LoadString( GetModuleHandle(NULL), STRING_ERROR_BADCOMMAND, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg);
|
||||
}
|
||||
|
||||
|
||||
VOID error_no_pipe (VOID)
|
||||
{
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
LoadString( GetModuleHandle(NULL), STRING_ERROR_CANNOTPIPE, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg);
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
LoadString( GetModuleHandle(NULL), STRING_ERROR_CANNOTPIPE, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg);
|
||||
}
|
||||
|
||||
|
||||
VOID error_out_of_memory (VOID)
|
||||
{
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
LoadString( GetModuleHandle(NULL), STRING_ERROR_OUT_OF_MEMORY, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg);
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
LoadString( GetModuleHandle(NULL), STRING_ERROR_OUT_OF_MEMORY, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg);
|
||||
}
|
||||
|
||||
|
||||
VOID error_invalid_parameter_format (LPTSTR s)
|
||||
{
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
LoadString( GetModuleHandle(NULL), STRING_ERROR_INVALID_PARAM_FORMAT, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg, s);
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
LoadString( GetModuleHandle(NULL), STRING_ERROR_INVALID_PARAM_FORMAT, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg, s);
|
||||
}
|
||||
|
||||
|
||||
VOID error_syntax (LPTSTR s)
|
||||
{
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
LoadString( GetModuleHandle(NULL), STRING_ERROR_ERROR2, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
LoadString( GetModuleHandle(NULL), STRING_ERROR_ERROR2, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
if (s)
|
||||
ConErrPrintf (_T("%s - %s\n"),(LPTSTR)szMsg, s);
|
||||
ConErrPrintf (_T("%s - %s\n"),szMsg, s);
|
||||
else
|
||||
ConErrPrintf (_T("%s.\n"), (LPTSTR)szMsg );
|
||||
ConErrPrintf (_T("%s.\n"), szMsg );
|
||||
}
|
||||
|
||||
|
||||
VOID msg_pause (VOID)
|
||||
{
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
LoadString( GetModuleHandle(NULL), STRING_ERROR_D_PAUSEMSG, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_ERROR_D_PAUSEMSG, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts (szMsg);
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ INT cmd_for (LPTSTR cmd, LPTSTR param)
|
|||
LPBATCH_CONTEXT lpNew;
|
||||
LPTSTR pp;
|
||||
TCHAR var;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
#ifdef _DEBUG
|
||||
DebugPrintf (_T("cmd_for (\'%s\', \'%s\'\n"), cmd, param);
|
||||
|
@ -61,8 +61,8 @@ INT cmd_for (LPTSTR cmd, LPTSTR param)
|
|||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_FOR_HELP1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_FOR_HELP1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -83,8 +83,8 @@ INT cmd_for (LPTSTR cmd, LPTSTR param)
|
|||
/* Check next element is 'IN' */
|
||||
if ((_tcsnicmp (param, _T("in"), 2) != 0) || !_istspace (*(param + 2)))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_FOR_ERROR1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
error_syntax ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_FOR_ERROR1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
error_syntax (szMsg);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -95,8 +95,8 @@ INT cmd_for (LPTSTR cmd, LPTSTR param)
|
|||
/* Folowed by a '(', find also matching ')' */
|
||||
if ((*param != _T('(')) || (NULL == (pp = _tcsrchr (param, _T(')')))))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_FOR_ERROR2, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
error_syntax ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_FOR_ERROR2, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
error_syntax (szMsg);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -110,8 +110,8 @@ INT cmd_for (LPTSTR cmd, LPTSTR param)
|
|||
/* Check DO follows */
|
||||
if ((_tcsnicmp (pp, _T("do"), 2) != 0) || !_istspace (*(pp + 2)))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_FOR_ERROR3, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
error_syntax ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_FOR_ERROR3, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
error_syntax (szMsg);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -122,8 +122,8 @@ INT cmd_for (LPTSTR cmd, LPTSTR param)
|
|||
/* Check that command tail is not empty */
|
||||
if (*pp == _T('\0'))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_FOR_ERROR4, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
error_syntax ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_FOR_ERROR4, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
error_syntax (szMsg);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -71,13 +71,13 @@ PrintDiskInfo (LPTSTR szDisk)
|
|||
DWORD dwBytPerSec;
|
||||
DWORD dwFreeCl;
|
||||
DWORD dwTotCl;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
if (_tcslen (szDisk) < 2 || szDisk[1] != _T(':'))
|
||||
{
|
||||
|
||||
LoadString( GetModuleHandle(NULL), STRING_FREE_ERROR1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_FREE_ERROR1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -88,16 +88,16 @@ PrintDiskInfo (LPTSTR szDisk)
|
|||
if (!GetVolumeInformation (szRootPath, szVolume, 64, &dwSerial,
|
||||
NULL, NULL, NULL, 0))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_FREE_ERROR1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf (_T("%s %s:\n"),(LPTSTR)szMsg, szDrive);
|
||||
LoadString( GetModuleHandle(NULL), STRING_FREE_ERROR1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (_T("%s %s:\n"),szMsg, szDrive);
|
||||
return;
|
||||
}
|
||||
|
||||
if (szVolume[0] == _T('\0'))
|
||||
{
|
||||
|
||||
LoadString( GetModuleHandle(NULL), STRING_FREE_ERROR2, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
_tcscpy (szVolume, (LPTSTR) szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_FREE_ERROR2, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
_tcscpy (szVolume, szMsg);
|
||||
}
|
||||
|
||||
_stprintf (szSerial,
|
||||
|
@ -108,8 +108,8 @@ PrintDiskInfo (LPTSTR szDisk)
|
|||
if (!GetDiskFreeSpace (szRootPath, &dwSecPerCl,
|
||||
&dwBytPerSec, &dwFreeCl, &dwTotCl))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_FREE_ERROR1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf (_T("%s %s:\n"),(LPTSTR)szMsg, szDrive);
|
||||
LoadString( GetModuleHandle(NULL), STRING_FREE_ERROR1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (_T("%s %s:\n"),szMsg, szDrive);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -123,8 +123,8 @@ PrintDiskInfo (LPTSTR szDisk)
|
|||
ConvertULargeInteger (uliSize, szFree, 40);
|
||||
|
||||
|
||||
LoadString( GetModuleHandle(NULL), STRING_FREE_HELP1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPrintf ((LPTSTR)szMsg,szDrive, szVolume, szSerial,szTotal, szUsed, szFree);
|
||||
LoadString( GetModuleHandle(NULL), STRING_FREE_HELP1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPrintf (szMsg,szDrive, szVolume, szSerial,szTotal, szUsed, szFree);
|
||||
}
|
||||
|
||||
|
||||
|
@ -134,12 +134,12 @@ INT CommandFree (LPTSTR cmd, LPTSTR param)
|
|||
TCHAR szDefPath[MAX_PATH];
|
||||
INT argc, i;
|
||||
LPTSTR *arg;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_FREE_HELP2, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_FREE_HELP2, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts (szMsg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ INT cmd_goto (LPTSTR cmd, LPTSTR param)
|
|||
{
|
||||
LPTSTR tmp;
|
||||
LONG lNewPosHigh;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
#ifdef _DEBUG
|
||||
DebugPrintf (_T("cmd_goto (\'%s\', \'%s\'\n"), cmd, param);
|
||||
|
@ -49,8 +49,8 @@ INT cmd_goto (LPTSTR cmd, LPTSTR param)
|
|||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_GOTO_HELP1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_GOTO_HELP1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts (szMsg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -64,8 +64,8 @@ INT cmd_goto (LPTSTR cmd, LPTSTR param)
|
|||
if (*param == _T('\0'))
|
||||
{
|
||||
|
||||
LoadString( GetModuleHandle(NULL), STRING_GOTO_ERROR1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ExitBatch ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_GOTO_ERROR1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ExitBatch (szMsg);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -97,8 +97,8 @@ INT cmd_goto (LPTSTR cmd, LPTSTR param)
|
|||
return 0;
|
||||
}
|
||||
|
||||
LoadString( GetModuleHandle(NULL), STRING_GOTO_ERROR2, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg,param);
|
||||
LoadString( GetModuleHandle(NULL), STRING_GOTO_ERROR2, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg,param);
|
||||
ExitBatch (NULL);
|
||||
|
||||
return 1;
|
||||
|
|
|
@ -41,7 +41,7 @@ INT cmd_if (LPTSTR cmd, LPTSTR param)
|
|||
{
|
||||
INT x_flag = 0; /* when set cause 'then' clause to be executed */
|
||||
LPTSTR pp;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
#ifdef _DEBUG
|
||||
DebugPrintf (_T("cmd_if: (\'%S\', \'%S\')\n"), cmd, param);
|
||||
|
@ -49,8 +49,8 @@ INT cmd_if (LPTSTR cmd, LPTSTR param)
|
|||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_IF_HELP1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_IF_HELP1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts(szMsg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -158,15 +158,15 @@ INT cmd_chdir (LPTSTR cmd, LPTSTR param)
|
|||
LPTSTR lpOldPath;
|
||||
LPTSTR endofstring; /* pointer to the null character in the directory to change to */
|
||||
LPTSTR lastquote; /* pointer to the last quotation mark in the directory to change to */
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
/*Should we better declare a variable containing _tsclen(dir) ? It's used a few times,
|
||||
but on the other hand paths are generally not very long*/
|
||||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_CD_HELP, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts (_T((LPTSTR)szMsg));
|
||||
LoadString(GetModuleHandle(NULL), STRING_CD_HELP, szMsg, sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts (szMsg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -279,12 +279,12 @@ INT cmd_mkdir (LPTSTR cmd, LPTSTR param)
|
|||
LPTSTR place; /* used to search for the \ when no space is used */
|
||||
LPTSTR *p = NULL;
|
||||
INT argc;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_MKDIR_HELP, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts (_T((LPTSTR)szMsg));
|
||||
LoadString( GetModuleHandle(NULL), STRING_MKDIR_HELP, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts (szMsg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -320,8 +320,8 @@ INT cmd_mkdir (LPTSTR cmd, LPTSTR param)
|
|||
|
||||
if (!dir)
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_PARAM_ERROR, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf (_T((LPTSTR)szMsg));
|
||||
LoadString( GetModuleHandle(NULL), STRING_PARAM_ERROR, szMsg, sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -358,13 +358,13 @@ INT cmd_rmdir (LPTSTR cmd, LPTSTR param)
|
|||
INT argc;
|
||||
|
||||
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_RMDIR_HELP, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
LoadString( GetModuleHandle(NULL), STRING_RMDIR_HELP, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
|
||||
ConOutPuts (_T((LPTSTR)szMsg));
|
||||
ConOutPuts (szMsg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -399,8 +399,8 @@ INT cmd_rmdir (LPTSTR cmd, LPTSTR param)
|
|||
|
||||
if (!dir)
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_PARAM_ERROR, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf (_T((LPTSTR)szMsg));
|
||||
LoadString( GetModuleHandle(NULL), STRING_PARAM_ERROR, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -430,12 +430,12 @@ INT cmd_rmdir (LPTSTR cmd, LPTSTR param)
|
|||
*/
|
||||
INT CommandExit (LPTSTR cmd, LPTSTR param)
|
||||
{
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_EXIT_HELP, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts (_T((LPTSTR)szMsg));
|
||||
LoadString( GetModuleHandle(NULL), STRING_EXIT_HELP, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts (szMsg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -451,12 +451,12 @@ INT CommandExit (LPTSTR cmd, LPTSTR param)
|
|||
*/
|
||||
INT CommandRem (LPTSTR cmd, LPTSTR param)
|
||||
{
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_REM_HELP, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts (_T((LPTSTR)szMsg));
|
||||
LoadString( GetModuleHandle(NULL), STRING_REM_HELP, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts (szMsg);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -31,7 +31,7 @@ INT cmd_label (LPTSTR cmd, LPTSTR param)
|
|||
DWORD dwSerialNr;
|
||||
LPTSTR *arg;
|
||||
INT args;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
/* set empty label string */
|
||||
szLabel[0] = _T('\0');
|
||||
|
@ -39,8 +39,8 @@ INT cmd_label (LPTSTR cmd, LPTSTR param)
|
|||
/* print help */
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_LABEL_HELP1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPrintf ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_LABEL_HELP1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPrintf (szMsg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -94,25 +94,25 @@ INT cmd_label (LPTSTR cmd, LPTSTR param)
|
|||
/* print drive info */
|
||||
if (szOldLabel[0] != _T('\0'))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_LABEL_HELP2, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPrintf ((LPTSTR) szMsg, _totupper (szRootPath[0]), szOldLabel);
|
||||
LoadString( GetModuleHandle(NULL), STRING_LABEL_HELP2, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPrintf (szMsg, _totupper (szRootPath[0]), szOldLabel);
|
||||
}
|
||||
else
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_LABEL_HELP3, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPrintf ((LPTSTR) szMsg, _totupper (szRootPath[0]));
|
||||
LoadString( GetModuleHandle(NULL), STRING_LABEL_HELP3, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPrintf (szMsg, _totupper (szRootPath[0]));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* print the volume serial number */
|
||||
LoadString( GetModuleHandle(NULL), STRING_LABEL_HELP4, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPrintf ((LPTSTR)szMsg, HIWORD(dwSerialNr), LOWORD(dwSerialNr));
|
||||
LoadString( GetModuleHandle(NULL), STRING_LABEL_HELP4, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPrintf (szMsg, HIWORD(dwSerialNr), LOWORD(dwSerialNr));
|
||||
|
||||
if (szLabel[0] == _T('\0'))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_LABEL_HELP5, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPrintf ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_LABEL_HELP5, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPrintf (szMsg);
|
||||
|
||||
ConInString (szLabel, 80);
|
||||
}
|
||||
|
|
|
@ -33,24 +33,32 @@ VOID InitLocale (VOID)
|
|||
|
||||
/* date settings */
|
||||
GetLocaleInfo (LOCALE_USER_DEFAULT, LOCALE_SDATE, szBuffer, 256);
|
||||
CharToOem (szBuffer, szBuffer);
|
||||
#if !defined(_UNICODE) && !defined(UNICODE)
|
||||
CharToOem (szBuffer, szBuffer);
|
||||
#endif
|
||||
cDateSeparator = szBuffer[0];
|
||||
GetLocaleInfo (LOCALE_USER_DEFAULT, LOCALE_IDATE, szBuffer, 256);
|
||||
nDateFormat = _ttoi (szBuffer);
|
||||
|
||||
/* time settings */
|
||||
GetLocaleInfo (LOCALE_USER_DEFAULT, LOCALE_STIME, szBuffer, 256);
|
||||
#if !defined(_UNICODE) && !defined(UNICODE)
|
||||
CharToOem (szBuffer, szBuffer);
|
||||
#endif
|
||||
cTimeSeparator = szBuffer[0];
|
||||
GetLocaleInfo (LOCALE_USER_DEFAULT, LOCALE_ITIME, szBuffer, 256);
|
||||
nTimeFormat = _ttoi (szBuffer);
|
||||
|
||||
/* number settings */
|
||||
GetLocaleInfo (LOCALE_USER_DEFAULT, LOCALE_STHOUSAND, szBuffer, 256);
|
||||
#if !defined(_UNICODE) && !defined(UNICODE)
|
||||
CharToOem (szBuffer, szBuffer);
|
||||
#endif
|
||||
cThousandSeparator = szBuffer[0];
|
||||
GetLocaleInfo (LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, szBuffer, 256);
|
||||
#if !defined(_UNICODE) && !defined(UNICODE)
|
||||
CharToOem (szBuffer, szBuffer);
|
||||
#endif
|
||||
cDecimalSeparator = szBuffer[0];
|
||||
GetLocaleInfo (LOCALE_USER_DEFAULT, LOCALE_SGROUPING, szBuffer, 256);
|
||||
nNumberGroups = _ttoi (szBuffer);
|
||||
|
@ -59,7 +67,9 @@ VOID InitLocale (VOID)
|
|||
for (i = 0; i < 7; i++)
|
||||
{
|
||||
GetLocaleInfo (LOCALE_USER_DEFAULT, LOCALE_SABBREVDAYNAME1 + i, szBuffer, 256);
|
||||
#if !defined(_UNICODE) && !defined(UNICODE)
|
||||
CharToOem (szBuffer, szBuffer);
|
||||
#endif
|
||||
_tcscpy (aszDayNames[(i+1)%7], szBuffer); /* little hack */
|
||||
}
|
||||
#endif
|
||||
|
@ -149,24 +159,24 @@ VOID PrintTime (VOID)
|
|||
{
|
||||
#ifdef __REACTOS__
|
||||
SYSTEMTIME st;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
GetLocalTime (&st);
|
||||
|
||||
LoadString( GetModuleHandle(NULL), STRING_LOCALE_HELP1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
LoadString( GetModuleHandle(NULL), STRING_LOCALE_HELP1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
|
||||
switch (nTimeFormat)
|
||||
{
|
||||
case 0: /* 12 hour format */
|
||||
default:
|
||||
ConOutPrintf (_T("%s %2d%c%02d%c%02d%c%02d%c\n"),(LPTSTR)szMsg,
|
||||
ConOutPrintf (_T("%s %2d%c%02d%c%02d%c%02d%c\n"),szMsg,
|
||||
(st.wHour == 0 ? 12 : (st.wHour <= 12 ? st.wHour : st.wHour - 12)),
|
||||
cTimeSeparator, st.wMinute, cTimeSeparator, st.wSecond, cDecimalSeparator,
|
||||
st.wMilliseconds / 10, (st.wHour <= 11 ? 'a' : 'p'));
|
||||
break;
|
||||
|
||||
case 1: /* 24 hour format */
|
||||
ConOutPrintf (_T("%s %2d%c%02d%c%02d%c%02d\n"),(LPTSTR)szMsg,
|
||||
ConOutPrintf (_T("%s %2d%c%02d%c%02d%c%02d\n"),szMsg,
|
||||
st.wHour, cTimeSeparator, st.wMinute, cTimeSeparator,
|
||||
st.wSecond, cDecimalSeparator, st.wMilliseconds / 10);
|
||||
break;
|
||||
|
@ -174,10 +184,10 @@ VOID PrintTime (VOID)
|
|||
#else
|
||||
TCHAR szTime[32];
|
||||
|
||||
GetTimeFormat (LOCALE_USER_DEFAULT, 0, NULL, NULL,
|
||||
GetTimeFormat (LOCALE_USER_DEFAULT, 0, NULL, NULL,
|
||||
szTime, sizeof (szTime));
|
||||
|
||||
LoadString( GetModuleHandle(NULL), STRING_LOCALE_HELP1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPrintf (_T("%s: %s\n"),(LPTSTR)szMsg, szTime);
|
||||
LoadString( GetModuleHandle(NULL), STRING_LOCALE_HELP1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPrintf (_T("%s: %s\n"),(LPTSTR)szMsg, szTime);
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ TARGET_PCH = precomp.h
|
|||
TARGET_INSTALLDIR = system32
|
||||
|
||||
TARGET_CFLAGS = -D__USE_W32API -DANONYMOUSUNIONS -Wall -Werror \
|
||||
-I$(PATH_TO_TOP)/include/wine -D_WIN32_WINNT=0x0501
|
||||
-I$(PATH_TO_TOP)/include/wine -D_WIN32_WINNT=0x0501 #-DUNICODE -D_UNICODE
|
||||
|
||||
TARGET_OBJECTS = \
|
||||
cmd.o attrib.o alias.o batch.o beep.o call.o chcp.o choice.o \
|
||||
|
|
|
@ -64,12 +64,12 @@ INT CommandMemory (LPTSTR cmd, LPTSTR param)
|
|||
TCHAR szAvailPageFile[20];
|
||||
TCHAR szTotalVirtual[20];
|
||||
TCHAR szAvailVirtual[20];
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_MEMMORY_HELP1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_MEMMORY_HELP1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts (szMsg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -85,8 +85,8 @@ INT CommandMemory (LPTSTR cmd, LPTSTR param)
|
|||
ConvertDWord (ms.dwTotalVirtual, szTotalVirtual, 20, TRUE);
|
||||
ConvertDWord (ms.dwAvailVirtual, szAvailVirtual, 20, TRUE);
|
||||
|
||||
LoadString( GetModuleHandle(NULL), STRING_MEMMORY_HELP2, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPrintf ((LPTSTR)szMsg,
|
||||
LoadString( GetModuleHandle(NULL), STRING_MEMMORY_HELP2, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPrintf (szMsg,
|
||||
szMemoryLoad, szTotalPhys, szAvailPhys, szTotalPageFile,
|
||||
szAvailPageFile, szTotalVirtual, szAvailVirtual);
|
||||
|
||||
|
|
|
@ -438,10 +438,10 @@ HWND GetConsoleWindow (VOID)
|
|||
INT PagePrompt (VOID)
|
||||
{
|
||||
INPUT_RECORD ir;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
LoadString( GetModuleHandle(NULL), STRING_MISC_HELP1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPrintf((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_MISC_HELP1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPrintf(szMsg);
|
||||
|
||||
RemoveBreakHandler ();
|
||||
ConInDisable ();
|
||||
|
@ -470,7 +470,7 @@ INT FilePromptYN (LPTSTR szFormat, ...)
|
|||
{
|
||||
TCHAR szOut[512];
|
||||
va_list arg_ptr;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
// TCHAR cKey = 0;
|
||||
// LPTSTR szKeys = _T("yna");
|
||||
|
@ -489,17 +489,16 @@ INT FilePromptYN (LPTSTR szFormat, ...)
|
|||
ConOutPrintf (_T("\n"));
|
||||
|
||||
_tcsupr (szIn);
|
||||
for (p = szIn; _istspace (*p); p++)
|
||||
;
|
||||
for (p = szIn; _istspace (*p); p++);
|
||||
|
||||
LoadString( GetModuleHandle(NULL), STRING_CHOICE_OPTION, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
LoadString( GetModuleHandle(NULL), STRING_CHOICE_OPTION, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
|
||||
|
||||
|
||||
if (wcsncmp(((WCHAR*) p),&szMsg[0],1)==0)
|
||||
return PROMPT_YES;
|
||||
else if (wcsncmp(((WCHAR*) p),&szMsg[1],1)==0)
|
||||
return PROMPT_NO;
|
||||
if (_tcsncmp(p,&szMsg[0],1)==0)
|
||||
return PROMPT_YES;
|
||||
else if (_tcsncmp(p,&szMsg[1],1)==0)
|
||||
return PROMPT_NO;
|
||||
|
||||
|
||||
#if 0
|
||||
|
@ -547,7 +546,7 @@ INT FilePromptYNA (LPTSTR szFormat, ...)
|
|||
va_list arg_ptr;
|
||||
// TCHAR cKey = 0;
|
||||
// LPTSTR szKeys = _T("yna");
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
|
||||
TCHAR szIn[10];
|
||||
|
@ -564,18 +563,17 @@ INT FilePromptYNA (LPTSTR szFormat, ...)
|
|||
ConOutPrintf (_T("\n"));
|
||||
|
||||
_tcsupr (szIn);
|
||||
for (p = szIn; _istspace (*p); p++)
|
||||
;
|
||||
for (p = szIn; _istspace (*p); p++);
|
||||
|
||||
LoadString( GetModuleHandle(NULL), STRING_COPY_OPTION, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
LoadString( GetModuleHandle(NULL), STRING_COPY_OPTION, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
|
||||
|
||||
if (wcsncmp(((WCHAR*) p),&szMsg[0],1)==0)
|
||||
return PROMPT_YES;
|
||||
else if (wcsncmp(((WCHAR*) p),&szMsg[1],1)==0)
|
||||
return PROMPT_NO;
|
||||
else if (wcsncmp( ((WCHAR*) p),&szMsg[2],1)==0)
|
||||
return PROMPT_ALL;
|
||||
if (_tcsncmp(p,&szMsg[0],1)==0)
|
||||
return PROMPT_YES;
|
||||
else if (_tcsncmp(p,&szMsg[1],1)==0)
|
||||
return PROMPT_NO;
|
||||
else if (_tcsncmp(p,&szMsg[2],1)==0)
|
||||
return PROMPT_ALL;
|
||||
|
||||
#if 0
|
||||
else if (*p == _T('\03'))
|
||||
|
|
|
@ -41,10 +41,10 @@ static INT Overwrite (LPTSTR fn)
|
|||
{
|
||||
TCHAR inp[10];
|
||||
LPTSTR p;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
LoadString( GetModuleHandle(NULL), STRING_MOVE_HELP1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPrintf ((LPTSTR)szMsg, fn);
|
||||
LoadString( GetModuleHandle(NULL), STRING_MOVE_HELP1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPrintf (szMsg, fn);
|
||||
ConInString (inp, 10);
|
||||
|
||||
_tcsupr (inp);
|
||||
|
@ -73,7 +73,7 @@ INT cmd_move (LPTSTR cmd, LPTSTR param)
|
|||
HANDLE hFile;
|
||||
LPTSTR pszFile;
|
||||
BOOL bNothing = FALSE;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
|
@ -92,8 +92,8 @@ INT cmd_move (LPTSTR cmd, LPTSTR param)
|
|||
" /-Y\n"
|
||||
"..."));
|
||||
#else
|
||||
LoadString( GetModuleHandle(NULL), STRING_MOVE_HELP2, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_MOVE_HELP2, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts (szMsg);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ INT cmd_move (LPTSTR cmd, LPTSTR param)
|
|||
arg = split (param, &argc, FALSE);
|
||||
nFiles = argc;
|
||||
|
||||
LoadString( GetModuleHandle(NULL), STRING_COPY_OPTION, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
LoadString( GetModuleHandle(NULL), STRING_COPY_OPTION, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
|
||||
/* read options */
|
||||
for (i = 0; i < argc; i++)
|
||||
|
@ -114,14 +114,14 @@ INT cmd_move (LPTSTR cmd, LPTSTR param)
|
|||
if (*p == _T('-'))
|
||||
{
|
||||
p++;
|
||||
if ((WCHAR*) _totupper (*p) == &szMsg[0])
|
||||
if (_totupper (*p) == szMsg[0])
|
||||
bPrompt = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((WCHAR*) _totupper (*p) == &szMsg[0])
|
||||
if (_totupper (*p) == szMsg[0])
|
||||
bPrompt = FALSE;
|
||||
else if ((WCHAR*) _totupper (*p) == &szMsg[1])
|
||||
else if (_totupper (*p) == szMsg[1])
|
||||
bNothing = TRUE;
|
||||
}
|
||||
nFiles--;
|
||||
|
@ -194,9 +194,9 @@ INT cmd_move (LPTSTR cmd, LPTSTR param)
|
|||
if (!bNothing)
|
||||
{
|
||||
if (MoveFile (szSrcPath, szFullDestPath))
|
||||
LoadString( GetModuleHandle(NULL), STRING_MOVE_ERROR1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
LoadString( GetModuleHandle(NULL), STRING_MOVE_ERROR1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
else
|
||||
LoadString( GetModuleHandle(NULL), STRING_MOVE_ERROR2, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
LoadString( GetModuleHandle(NULL), STRING_MOVE_ERROR2, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
|
||||
ConOutPrintf ((LPTSTR)szMsg);
|
||||
}
|
||||
|
@ -218,9 +218,9 @@ INT cmd_move (LPTSTR cmd, LPTSTR param)
|
|||
if (!bNothing)
|
||||
{
|
||||
if (MoveFile (szSrcPath, szDestPath))
|
||||
LoadString( GetModuleHandle(NULL), STRING_MOVE_ERROR1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
LoadString( GetModuleHandle(NULL), STRING_MOVE_ERROR1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
else
|
||||
LoadString( GetModuleHandle(NULL), STRING_MOVE_ERROR2, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
LoadString( GetModuleHandle(NULL), STRING_MOVE_ERROR2, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPrintf ((LPTSTR)szMsg);
|
||||
}
|
||||
}
|
||||
|
@ -238,10 +238,10 @@ INT cmd_move (LPTSTR cmd, LPTSTR param)
|
|||
if (!bNothing)
|
||||
{
|
||||
if (MoveFile (szSrcPath, szFullDestPath))
|
||||
LoadString( GetModuleHandle(NULL), STRING_MOVE_ERROR1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
LoadString( GetModuleHandle(NULL), STRING_MOVE_ERROR1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
else
|
||||
LoadString( GetModuleHandle(NULL), STRING_MOVE_ERROR2, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPrintf ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_MOVE_ERROR2, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPrintf ((LPTSTR)szMsg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ INT CommandMsgbox (LPTSTR cmd, LPTSTR param)
|
|||
//and to find window handle to pass to MessageBox
|
||||
HWND hWnd;
|
||||
TCHAR buff[128];
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
//these are MessabeBox() parameters
|
||||
LPTSTR title, prompt="";
|
||||
|
@ -44,8 +44,8 @@ INT CommandMsgbox (LPTSTR cmd, LPTSTR param)
|
|||
|
||||
if (_tcsncmp (param, _T("/?"), 2) == 0)
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_MSGBOX_HELP, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_MSGBOX_HELP, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts(szMsg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -36,12 +36,12 @@
|
|||
|
||||
INT cmd_path (LPTSTR cmd, LPTSTR param)
|
||||
{
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_PATH_HELP1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_PATH_HELP1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts (szMsg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -56,8 +56,8 @@ INT cmd_path (LPTSTR cmd, LPTSTR param)
|
|||
dwBuffer = GetEnvironmentVariable (_T("PATH"), pszBuffer, ENV_BUFFER_SIZE);
|
||||
if (dwBuffer == 0)
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_PATH_ERROR, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_PATH_ERROR, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg);
|
||||
return 0;
|
||||
}
|
||||
else if (dwBuffer > ENV_BUFFER_SIZE)
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
INT cmd_pause (LPTSTR cmd, LPTSTR param)
|
||||
{
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
#ifdef _DEBUG
|
||||
DebugPrintf (_T("cmd_pause: \'%s\' : \'%s\')\n"), cmd, param);
|
||||
|
@ -45,8 +45,8 @@ INT cmd_pause (LPTSTR cmd, LPTSTR param)
|
|||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_PAUSE_HELP1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_PAUSE_HELP1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts (szMsg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -182,19 +182,19 @@ VOID PrintPrompt(VOID)
|
|||
|
||||
INT cmd_prompt (LPTSTR cmd, LPTSTR param)
|
||||
{
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_PROMPT_HELP1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_PROMPT_HELP1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts (szMsg);
|
||||
|
||||
#ifdef FEATURE_DIRECTORY_STACK
|
||||
LoadString( GetModuleHandle(NULL), STRING_PROMPT_HELP2, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_PROMPT_HELP2, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts (szMsg);
|
||||
#endif
|
||||
LoadString( GetModuleHandle(NULL), STRING_PROMPT_HELP3, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_PROMPT_HELP3, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts (szMsg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -58,14 +58,14 @@ INT cmd_rename (LPTSTR cmd, LPTSTR param)
|
|||
|
||||
HANDLE hFile;
|
||||
WIN32_FIND_DATA f;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
if (!_tcsncmp(param, _T("/?"), 2))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_REN_HELP1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_REN_HELP1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts(szMsg);
|
||||
|
||||
return(0);
|
||||
return(0);
|
||||
}
|
||||
|
||||
/* split the argument list */
|
||||
|
@ -239,8 +239,8 @@ INT cmd_rename (LPTSTR cmd, LPTSTR param)
|
|||
{
|
||||
if (!(dwFlags & REN_ERROR))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_REN_ERROR1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg, GetLastError());
|
||||
LoadString( GetModuleHandle(NULL), STRING_REN_ERROR1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPrintf (szMsg, GetLastError());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -252,11 +252,11 @@ INT cmd_rename (LPTSTR cmd, LPTSTR param)
|
|||
if (!(dwFlags & REN_QUIET))
|
||||
{
|
||||
if (dwFiles == 1)
|
||||
LoadString( GetModuleHandle(NULL), STRING_REN_HELP2, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
LoadString( GetModuleHandle(NULL), STRING_REN_HELP2, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
else
|
||||
LoadString( GetModuleHandle(NULL), STRING_REN_HELP3, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
LoadString( GetModuleHandle(NULL), STRING_REN_HELP3, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
|
||||
ConOutPrintf((LPTSTR)szMsg,dwFiles);
|
||||
ConOutPrintf(szMsg,dwFiles);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -21,12 +21,12 @@ INT CommandScreen (LPTSTR cmd, LPTSTR param)
|
|||
{
|
||||
SHORT x,y;
|
||||
BOOL bSkipText = FALSE;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
if (_tcsncmp (param, _T("/?"), 2) == 0)
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_SCREEN_HELP, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_SCREEN_HELP, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts((LPTSTR)szMsg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -47,12 +47,12 @@
|
|||
INT cmd_set (LPTSTR cmd, LPTSTR param)
|
||||
{
|
||||
LPTSTR p;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_SET_HELP, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_SET_HELP, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts (szMsg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
INT cmd_shift (LPTSTR cmd, LPTSTR param)
|
||||
{
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
#ifdef _DEBUG
|
||||
DebugPrintf (_T("cmd_shift: (\'%s\', \'%s\')\n"), cmd, param);
|
||||
|
@ -47,8 +47,8 @@ INT cmd_shift (LPTSTR cmd, LPTSTR param)
|
|||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_SHIFT_HELP, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_SHIFT_HELP, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts(szMsg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -22,13 +22,13 @@ INT cmd_start (LPTSTR first, LPTSTR rest)
|
|||
TCHAR szFullName[MAX_PATH];
|
||||
BOOL bWait = FALSE;
|
||||
TCHAR *param;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
if (_tcsncmp (rest, _T("/?"), 2) == 0)
|
||||
{
|
||||
|
||||
LoadString( GetModuleHandle(NULL), STRING_START_HELP1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_START_HELP1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts(szMsg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -73,8 +73,8 @@ INT cmd_start (LPTSTR first, LPTSTR rest)
|
|||
DebugPrintf (_T("[BATCH: %s %s]\n"), szFullName, rest);
|
||||
#endif
|
||||
|
||||
LoadString( GetModuleHandle(NULL), STRING_START_ERROR1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_START_ERROR1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPuts (szMsg);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -137,13 +137,13 @@ INT cmd_time (LPTSTR cmd, LPTSTR param)
|
|||
INT i;
|
||||
BOOL bPrompt = TRUE;
|
||||
INT nTimeString = -1;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_TIME_HELP1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_TIME_HELP1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts(szMsg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -175,8 +175,8 @@ INT cmd_time (LPTSTR cmd, LPTSTR param)
|
|||
{
|
||||
TCHAR s[40];
|
||||
|
||||
LoadString( GetModuleHandle(NULL), STRING_TIME_HELP2, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPrintf ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_TIME_HELP2, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPrintf (szMsg);
|
||||
|
||||
ConInString (s, 40);
|
||||
|
||||
|
@ -204,8 +204,8 @@ INT cmd_time (LPTSTR cmd, LPTSTR param)
|
|||
/* force input the next time around. */
|
||||
nTimeString = -1;
|
||||
}
|
||||
LoadString( GetModuleHandle(NULL), STRING_TIME_ERROR1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_TIME_ERROR1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPuts (szMsg);
|
||||
}
|
||||
|
||||
freep (arg);
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
static VOID
|
||||
PrintElapsedTime (DWORD time,INT format)
|
||||
{
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
DWORD h,m,s,ms;
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
@ -47,8 +47,8 @@ PrintElapsedTime (DWORD time,INT format)
|
|||
switch (format)
|
||||
{
|
||||
case 0:
|
||||
LoadString( GetModuleHandle(NULL), STRING_TIMER_HELP1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPrintf((LPTSTR)szMsg,time);
|
||||
LoadString( GetModuleHandle(NULL), STRING_TIMER_HELP1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPrintf(szMsg,time);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
|
@ -58,8 +58,8 @@ PrintElapsedTime (DWORD time,INT format)
|
|||
time /=60;
|
||||
m = time % 60;
|
||||
h = time / 60;
|
||||
LoadString( GetModuleHandle(NULL), STRING_TIMER_HELP2, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPrintf((LPTSTR)szMsg,
|
||||
LoadString( GetModuleHandle(NULL), STRING_TIMER_HELP2, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPrintf(szMsg,
|
||||
h,cTimeSeparator,
|
||||
m,cTimeSeparator,
|
||||
s,cDecimalSeparator,ms/10);
|
||||
|
@ -70,7 +70,7 @@ PrintElapsedTime (DWORD time,INT format)
|
|||
|
||||
INT CommandTimer (LPTSTR cmd, LPTSTR param)
|
||||
{
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
// all timers are kept
|
||||
static DWORD clksT[10];
|
||||
|
@ -104,8 +104,8 @@ INT CommandTimer (LPTSTR cmd, LPTSTR param)
|
|||
|
||||
if (_tcsncmp (param, _T("/?"), 2) == 0)
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_TIMER_HELP3, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPrintf ((LPTSTR)szMsg,cTimeSeparator,cTimeSeparator,cDecimalSeparator);
|
||||
LoadString( GetModuleHandle(NULL), STRING_TIMER_HELP3, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPrintf (szMsg,cTimeSeparator,cTimeSeparator,cDecimalSeparator);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
INT cmd_title (LPTSTR cmd, LPTSTR param)
|
||||
{
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
/* Do nothing if no args */
|
||||
if (*param == _T('\0'))
|
||||
|
@ -26,8 +26,8 @@ INT cmd_title (LPTSTR cmd, LPTSTR param)
|
|||
/* Asking help? */
|
||||
if (!_tcsncmp(param, _T("/?"), 2))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_TITLE_HELP, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_TITLE_HELP, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts(szMsg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -42,14 +42,14 @@ INT cmd_type (LPTSTR cmd, LPTSTR param)
|
|||
INT argc,i;
|
||||
LPTSTR *argv;
|
||||
LPTSTR errmsg;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
hConsoleOut=GetStdHandle (STD_OUTPUT_HANDLE);
|
||||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_TYPE_HELP1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
ConOutPuts (szMsg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@ INT cmd_type (LPTSTR cmd, LPTSTR param)
|
|||
if (_T('/') == argv[i][0])
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_TYPE_ERROR1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPrintf ((LPTSTR)szMsg, argv[i] + 1);
|
||||
ConErrPrintf (szMsg, argv[i] + 1);
|
||||
continue;
|
||||
}
|
||||
hFile = CreateFile(argv[i],
|
||||
|
|
|
@ -64,14 +64,14 @@ VOID ShortVersion (VOID)
|
|||
INT cmd_ver (LPTSTR cmd, LPTSTR param)
|
||||
{
|
||||
INT i;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
WCHAR rosdev[RC_STRING_MAX_SIZE];
|
||||
WCHAR fredev[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR rosdev[RC_STRING_MAX_SIZE];
|
||||
TCHAR fredev[RC_STRING_MAX_SIZE];
|
||||
|
||||
if (_tcsstr (param, _T("/?")) != NULL)
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_VERSION_HELP1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
ConOutPuts (szMsg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -84,8 +84,8 @@ INT cmd_ver (LPTSTR cmd, LPTSTR param)
|
|||
if (param[0] == _T('\0'))
|
||||
{
|
||||
ConOutPuts (_T("\n"SHELLINFO));
|
||||
LoadString( GetModuleHandle(NULL), STRING_VERSION_HELP2, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_VERSION_HELP2, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts (szMsg);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -110,22 +110,22 @@ INT cmd_ver (LPTSTR cmd, LPTSTR param)
|
|||
{
|
||||
/* Warranty notice */
|
||||
LoadString( GetModuleHandle(NULL), STRING_VERSION_HELP3, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
ConOutPuts (szMsg);
|
||||
}
|
||||
else if (_totupper (param[i]) == _T('R'))
|
||||
{
|
||||
/* Redistribution notice */
|
||||
LoadString( GetModuleHandle(NULL), STRING_VERSION_HELP4, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
ConOutPuts (szMsg);
|
||||
}
|
||||
else if (_totupper (param[i]) == _T('C'))
|
||||
{
|
||||
/* Developer listing */
|
||||
|
||||
LoadString( GetModuleHandle(NULL), STRING_REACTOS_DEV, (LPTSTR) rosdev,sizeof(rosdev));
|
||||
LoadString( GetModuleHandle(NULL), STRING_FreeDOS_DEV, (LPTSTR) fredev,sizeof(fredev));
|
||||
LoadString( GetModuleHandle(NULL), STRING_VERSION_HELP6, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPrintf ((LPTSTR)szMsg,fredev,rosdev);
|
||||
LoadString( GetModuleHandle(NULL), STRING_REACTOS_DEV, rosdev,sizeof(rosdev)/sizeof(TCHAR));
|
||||
LoadString( GetModuleHandle(NULL), STRING_FreeDOS_DEV, fredev,sizeof(fredev)/sizeof(TCHAR));
|
||||
LoadString( GetModuleHandle(NULL), STRING_VERSION_HELP6, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPrintf ((LPTSTR)szMsg,fredev,rosdev);
|
||||
|
||||
/*
|
||||
ConOutPuts (_T("\n"
|
||||
|
@ -151,7 +151,7 @@ INT cmd_ver (LPTSTR cmd, LPTSTR param)
|
|||
}
|
||||
|
||||
LoadString( GetModuleHandle(NULL), STRING_VERSION_HELP5, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
ConOutPuts (szMsg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -30,27 +30,27 @@ static BOOL bVerify = FALSE;
|
|||
|
||||
INT cmd_verify (LPTSTR cmd, LPTSTR param)
|
||||
{
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_VERIFY_HELP1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_VERIFY_HELP1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts (szMsg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!*param)
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_VERIFY_HELP2, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPrintf ((LPTSTR)szMsg, bVerify ? D_ON : D_OFF);
|
||||
LoadString( GetModuleHandle(NULL), STRING_VERIFY_HELP2, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPrintf (szMsg, bVerify ? D_ON : D_OFF);
|
||||
}
|
||||
else if (_tcsicmp (param, D_OFF) == 0)
|
||||
bVerify = FALSE;
|
||||
else if (_tcsicmp (param, D_ON) == 0)
|
||||
bVerify = TRUE;
|
||||
else
|
||||
LoadString( GetModuleHandle(NULL), STRING_VERIFY_HELP3, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_VERIFY_HELP3, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts (szMsg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ PrintVolumeHeader (LPTSTR pszRootPath)
|
|||
{
|
||||
TCHAR szVolName[80];
|
||||
DWORD dwSerialNr;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
|
||||
/* get the volume information of the drive */
|
||||
|
@ -55,21 +55,21 @@ PrintVolumeHeader (LPTSTR pszRootPath)
|
|||
|
||||
if (szVolName[0] != '\0')
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_VOL_HELP1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPrintf ((LPTSTR)szMsg, pszRootPath[0],szVolName);
|
||||
LoadString( GetModuleHandle(NULL), STRING_VOL_HELP1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPrintf (szMsg, pszRootPath[0],szVolName);
|
||||
}
|
||||
else
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_VOL_HELP2, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPrintf ((LPTSTR)szMsg, pszRootPath[0]);
|
||||
LoadString( GetModuleHandle(NULL), STRING_VOL_HELP2, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPrintf (szMsg, pszRootPath[0]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* print the volume serial number */
|
||||
LoadString( GetModuleHandle(NULL), STRING_VOL_HELP3, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPrintf ((LPTSTR)szMsg,
|
||||
LoadString( GetModuleHandle(NULL), STRING_VOL_HELP3, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPrintf (szMsg,
|
||||
HIWORD(dwSerialNr),
|
||||
LOWORD(dwSerialNr));
|
||||
return 0;
|
||||
|
@ -80,12 +80,12 @@ INT cmd_vol (LPTSTR cmd, LPTSTR param)
|
|||
{
|
||||
TCHAR szRootPath[] = _T("A:\\");
|
||||
TCHAR szPath[MAX_PATH];
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_VOL_HELP4, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_VOL_HELP4, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -177,12 +177,12 @@ INT ServiceActivate (LPTSTR param, HWND hWnd)
|
|||
INT CommandWindow (LPTSTR cmd, LPTSTR param)
|
||||
{
|
||||
HWND h;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
if (_tcsncmp (param, _T("/?"), 2) == 0)
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_WINDOW_HELP1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_WINDOW_HELP1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts (szMsg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -197,12 +197,12 @@ INT CommandActivate (LPTSTR cmd, LPTSTR param)
|
|||
{
|
||||
LPTSTR str;
|
||||
HWND h;
|
||||
WCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
if (_tcsncmp (param, _T("/?"), 2) == 0)
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_WINDOW_HELP2, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConOutPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_WINDOW_HELP2, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConOutPuts (szMsg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -222,8 +222,8 @@ INT CommandActivate (LPTSTR cmd, LPTSTR param)
|
|||
h=FindWindow(NULL, param);
|
||||
if (!h)
|
||||
{
|
||||
LoadString( GetModuleHandle(NULL), STRING_WINDOW_ERROR1, (LPTSTR) szMsg,sizeof(szMsg));
|
||||
ConErrPuts ((LPTSTR)szMsg);
|
||||
LoadString( GetModuleHandle(NULL), STRING_WINDOW_ERROR1, szMsg,sizeof(szMsg)/sizeof(TCHAR));
|
||||
ConErrPuts (szMsg);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue