mirror of
https://github.com/reactos/reactos.git
synced 2025-07-23 19:54:06 +00:00
Fix debug output of strings
svn path=/trunk/; revision=33536
This commit is contained in:
parent
c65c9124fa
commit
c79d92ab52
22 changed files with 80 additions and 95 deletions
|
@ -170,7 +170,7 @@ LPTSTR BatchParams (LPTSTR s1, LPTSTR s2)
|
|||
|
||||
VOID ExitBatch (LPTSTR msg)
|
||||
{
|
||||
TRACE ("ExitBatch: (\'%s\')\n", msg);
|
||||
TRACE ("ExitBatch: (\'%s\')\n", debugstr_aw(msg));
|
||||
|
||||
if (bc != NULL)
|
||||
{
|
||||
|
@ -223,7 +223,7 @@ BOOL Batch (LPTSTR fullname, LPTSTR firstword, LPTSTR param)
|
|||
FILE_FLAG_SEQUENTIAL_SCAN, NULL);
|
||||
|
||||
TRACE ("Batch: (\'%s\', \'%s\', \'%s\') hFile = %x\n",
|
||||
fullname, firstword, param, hFile);
|
||||
debugstr_aw(fullname), debugstr_aw(firstword), debugstr_aw(param), hFile);
|
||||
|
||||
if (hFile == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
|
@ -434,7 +434,7 @@ LPTSTR ReadBatchLine (LPBOOL bLocalEcho)
|
|||
|
||||
continue;
|
||||
}
|
||||
TRACE ("ReadBatchLine(): textline: \'%s\'\n", textline);
|
||||
TRACE ("ReadBatchLine(): textline: \'%s\'\n", debugstr_aw(textline));
|
||||
|
||||
/* Strip leading spaces and trailing space/control chars */
|
||||
for (first = textline; _istspace (*first); first++)
|
||||
|
|
|
@ -44,7 +44,7 @@ INT cmd_call (LPTSTR cmd, LPTSTR param)
|
|||
{
|
||||
LPBATCH_CONTEXT n = NULL;
|
||||
|
||||
TRACE ("cmd_call: (\'%s\',\'%s\')\n", cmd, param);
|
||||
TRACE ("cmd_call: (\'%s\',\'%s\')\n", debugstr_aw(cmd), debugstr_aw(param));
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
ConOutResPaging(TRUE,STRING_CALL_HELP);
|
||||
|
|
|
@ -283,7 +283,7 @@ static BOOL RunFile(LPTSTR filename)
|
|||
MYEX hShExt;
|
||||
HINSTANCE ret;
|
||||
|
||||
TRACE ("RunFile(%s)\n", filename);
|
||||
TRACE ("RunFile(%s)\n", debugstr_aw(filename));
|
||||
hShell32 = LoadLibrary(_T("SHELL32.DLL"));
|
||||
if (!hShell32)
|
||||
{
|
||||
|
@ -330,7 +330,7 @@ Execute (LPTSTR Full, LPTSTR First, LPTSTR Rest)
|
|||
TCHAR szWindowTitle[MAX_PATH];
|
||||
DWORD dwExitCode = 0;
|
||||
|
||||
TRACE ("Execute: \'%s\' \'%s\'\n", first, rest);
|
||||
TRACE ("Execute: \'%s\' \'%s\'\n", debugstr_aw(first), debugstr_aw(rest));
|
||||
|
||||
/* we need biger buffer that First, Rest, Full are already
|
||||
need rewrite some code to use cmd_realloc when it need instead
|
||||
|
@ -465,7 +465,7 @@ Execute (LPTSTR Full, LPTSTR First, LPTSTR Rest)
|
|||
dot = _tcsrchr (szFullName, _T('.'));
|
||||
if (dot && (!_tcsicmp (dot, _T(".bat")) || !_tcsicmp (dot, _T(".cmd"))))
|
||||
{
|
||||
TRACE ("[BATCH: %s %s]\n", szFullName, rest);
|
||||
TRACE ("[BATCH: %s %s]\n", debugstr_aw(szFullName), debugstr_aw(rest));
|
||||
Batch (szFullName, first, rest);
|
||||
}
|
||||
else
|
||||
|
@ -474,7 +474,7 @@ Execute (LPTSTR Full, LPTSTR First, LPTSTR Rest)
|
|||
PROCESS_INFORMATION prci;
|
||||
STARTUPINFO stui;
|
||||
|
||||
TRACE ("[EXEC: %s %s]\n", full, rest);
|
||||
TRACE ("[EXEC: %s %s]\n", debugstr_aw(full), debugstr_aw(rest));
|
||||
/* build command line for CreateProcess() */
|
||||
|
||||
/* fill startup info */
|
||||
|
@ -522,11 +522,11 @@ Execute (LPTSTR Full, LPTSTR First, LPTSTR Rest)
|
|||
}
|
||||
else
|
||||
{
|
||||
TRACE ("[ShellExecute: %s]\n", full);
|
||||
TRACE ("[ShellExecute: %s]\n", debugstr_aw(full));
|
||||
// See if we can run this with ShellExecute() ie myfile.xls
|
||||
if (!RunFile(full))
|
||||
{
|
||||
TRACE ("[ShellExecute failed!: %s]\n", full);
|
||||
TRACE ("[ShellExecute failed!: %s]\n", debugstr_aw(full));
|
||||
error_bad_command ();
|
||||
nErrorLevel = 1;
|
||||
}
|
||||
|
@ -572,7 +572,7 @@ DoCommand (LPTSTR line)
|
|||
INT cl;
|
||||
LPCOMMAND cmdptr;
|
||||
|
||||
TRACE ("DoCommand: (\'%s\')\n", line);
|
||||
TRACE ("DoCommand: (\'%s\')\n", debugstr_aw(line));
|
||||
|
||||
com = cmd_alloc( (_tcslen(line) +512)*sizeof(TCHAR) );
|
||||
if (com == NULL)
|
||||
|
@ -707,7 +707,7 @@ VOID ParseCommandLine (LPTSTR cmd)
|
|||
_tcscpy (cmdline, cmd);
|
||||
s = &cmdline[0];
|
||||
|
||||
TRACE ("ParseCommandLine: (\'%s\')\n", s);
|
||||
TRACE ("ParseCommandLine: (\'%s\')\n", debugstr_aw(s));
|
||||
|
||||
#ifdef FEATURE_ALIASES
|
||||
/* expand all aliases */
|
||||
|
@ -793,7 +793,7 @@ VOID ParseCommandLine (LPTSTR cmd)
|
|||
ConErrPrintf(szMsg, in);
|
||||
return;
|
||||
}
|
||||
TRACE ("Input redirected from: %s\n", in);
|
||||
TRACE ("Input redirected from: %s\n", debugstr_aw(in));
|
||||
}
|
||||
|
||||
/* Now do all but the last pipe command */
|
||||
|
@ -913,7 +913,7 @@ VOID ParseCommandLine (LPTSTR cmd)
|
|||
if (GetFileType (hFile) == FILE_TYPE_DISK)
|
||||
SetFilePointer (hFile, 0, &lHighPos, FILE_END);
|
||||
}
|
||||
TRACE ("Output redirected to: %s\n", out);
|
||||
TRACE ("Output redirected to: %s\n", debugstr_aw(out));
|
||||
}
|
||||
else if (hOldConOut != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
|
@ -971,7 +971,7 @@ VOID ParseCommandLine (LPTSTR cmd)
|
|||
if (GetFileType (hFile) == FILE_TYPE_DISK)
|
||||
SetFilePointer (hFile, 0, &lHighPos, FILE_END);
|
||||
}
|
||||
TRACE ("Error redirected to: %s\n", err);
|
||||
TRACE ("Error redirected to: %s\n", debugstr_aw(err));
|
||||
}
|
||||
else if (hOldConErr != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
|
@ -1686,7 +1686,7 @@ Initialize (int argc, const TCHAR* argv[])
|
|||
TRACE ("[command args:\n");
|
||||
for (i = 0; i < argc; i++)
|
||||
{
|
||||
TRACE ("%d. %s\n", i, argv[i]);
|
||||
TRACE ("%d. %s\n", i, debugstr_aw(argv[i]));
|
||||
}
|
||||
TRACE ("]\n");
|
||||
|
||||
|
|
|
@ -244,4 +244,4 @@ cmd_exit(int code)
|
|||
ExitProcess(code);
|
||||
}
|
||||
|
||||
#endif /* _DEBUG */
|
||||
#endif /* _DEBUG_MEM */
|
||||
|
|
|
@ -12,9 +12,6 @@
|
|||
#ifndef _CONFIG_H_INCLUDED_
|
||||
#define _CONFIG_H_INCLUDED_
|
||||
|
||||
/* Define to enable debugging code */
|
||||
//#define _DEBUG
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
|
||||
//#define NT4_INTERNAL_COMMANDS
|
||||
|
|
|
@ -165,10 +165,10 @@ copy (TCHAR source[MAX_PATH],
|
|||
}
|
||||
else if (!append)
|
||||
{
|
||||
TRACE ("SetFileAttributes (%s, FILE_ATTRIBUTE_NORMAL);\n", dest);
|
||||
TRACE ("SetFileAttributes (%s, FILE_ATTRIBUTE_NORMAL);\n", debugstr_aw(dest));
|
||||
SetFileAttributes (dest, FILE_ATTRIBUTE_NORMAL);
|
||||
|
||||
TRACE ("DeleteFile (%s);\n", dest);
|
||||
TRACE ("DeleteFile (%s);\n", debugstr_aw(dest));
|
||||
DeleteFile (dest);
|
||||
|
||||
hFileDest = CreateFile (dest, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL);
|
||||
|
|
|
@ -226,7 +226,7 @@ INT cmd_date (LPTSTR cmd, LPTSTR param)
|
|||
|
||||
PrintDateString ();
|
||||
ConInString (s, 40);
|
||||
TRACE ("\'%s\'\n", s);
|
||||
TRACE ("\'%s\'\n", debugstr_aw(s));
|
||||
while (*s && s[_tcslen (s) - 1] < _T(' '))
|
||||
s[_tcslen (s) - 1] = _T('\0');
|
||||
if (ParseDate (s))
|
||||
|
|
|
@ -251,9 +251,7 @@ DeleteFiles(LPTSTR FileName, DWORD* dwFlags, DWORD dwAttrFlags)
|
|||
continue;
|
||||
|
||||
|
||||
#ifdef _DEBUG
|
||||
ConErrPrintf(_T("Full filename: %s\n"), szFullPath);
|
||||
#endif
|
||||
TRACE("Full filename: %s\n", debugstr_aw(szFullPath));
|
||||
|
||||
/* ask for deleting */
|
||||
if (*dwFlags & DEL_PROMPT)
|
||||
|
|
|
@ -1590,9 +1590,7 @@ ULARGE_INTEGER u64Temp; /* A temporary counter */
|
|||
ptrStartNode = cmd_alloc(sizeof(DIRFINDLISTNODE));
|
||||
if (ptrStartNode == NULL)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
ConErrPrintf(_T("DEBUG: Cannot allocate memory for ptrStartNode!\n"));
|
||||
#endif
|
||||
WARN("DEBUG: Cannot allocate memory for ptrStartNode!\n");
|
||||
return 1; /* Error cannot allocate memory for 1st object */
|
||||
}
|
||||
ptrNextNode = ptrStartNode;
|
||||
|
@ -1610,9 +1608,7 @@ ULARGE_INTEGER u64Temp; /* A temporary counter */
|
|||
ptrNextNode->ptrNext = cmd_alloc(sizeof(DIRFINDLISTNODE));
|
||||
if (ptrNextNode->ptrNext == NULL)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
ConErrPrintf(_T("DEBUG: Cannot allocate memory for ptrNextNode->ptrNext!\n"));
|
||||
#endif
|
||||
WARN("DEBUG: Cannot allocate memory for ptrNextNode->ptrNext!\n");
|
||||
while (ptrStartNode)
|
||||
{
|
||||
ptrNextNode = ptrStartNode->ptrNext;
|
||||
|
@ -1670,9 +1666,7 @@ ULARGE_INTEGER u64Temp; /* A temporary counter */
|
|||
ptrFileArray = cmd_alloc(sizeof(LPWIN32_FIND_DATA) * dwCount);
|
||||
if (ptrFileArray == NULL)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
ConErrPrintf(_T("DEBUG: Cannot allocate memory for ptrFileArray!\n"));
|
||||
#endif
|
||||
WARN("DEBUG: Cannot allocate memory for ptrFileArray!\n");
|
||||
while (ptrStartNode)
|
||||
{
|
||||
ptrNextNode = ptrStartNode->ptrNext;
|
||||
|
@ -1869,27 +1863,25 @@ CommandDir(LPTSTR first, LPTSTR rest)
|
|||
|
||||
/* <Debug :>
|
||||
Uncomment this to show the final state of switch flags*/
|
||||
#ifdef _DEBUG
|
||||
{
|
||||
int i;
|
||||
ConOutPrintf(_T("Attributes mask/value %x/%x\n"),stFlags.stAttribs.dwAttribMask,stFlags.stAttribs.dwAttribVal );
|
||||
ConOutPrintf(_T("(B) Bare format : %i\n"), stFlags.bBareFormat );
|
||||
ConOutPrintf(_T("(C) Thousand : %i\n"), stFlags.bTSeperator );
|
||||
ConOutPrintf(_T("(W) Wide list : %i\n"), stFlags.bWideList );
|
||||
ConOutPrintf(_T("(D) Wide list sort by column : %i\n"), stFlags.bWideListColSort );
|
||||
ConOutPrintf(_T("(L) Lowercase : %i\n"), stFlags.bLowerCase );
|
||||
ConOutPrintf(_T("(N) New : %i\n"), stFlags.bNewLongList );
|
||||
ConOutPrintf(_T("(O) Order : %i\n"), stFlags.stOrderBy.sCriteriaCount );
|
||||
for (i =0;i<stFlags.stOrderBy.sCriteriaCount;i++)
|
||||
ConOutPrintf(_T(" Order Criteria [%i]: %i (Reversed: %i)\n"),i, stFlags.stOrderBy.eCriteria[i], stFlags.stOrderBy.bCriteriaRev[i] );
|
||||
ConOutPrintf(_T("(P) Pause : %i\n"), stFlags.bPause );
|
||||
ConOutPrintf(_T("(Q) Owner : %i\n"), stFlags.bUser );
|
||||
ConOutPrintf(_T("(S) Recursive : %i\n"), stFlags.bRecursive );
|
||||
ConOutPrintf(_T("(T) Time field : %i\n"), stFlags.stTimeField.eTimeField );
|
||||
ConOutPrintf(_T("(X) Short names : %i\n"), stFlags.bShortName );
|
||||
ConOutPrintf(_T("Parameter : %s\n"), params[loop] );
|
||||
}
|
||||
#endif
|
||||
{
|
||||
int i;
|
||||
TRACE("Attributes mask/value %x/%x\n",stFlags.stAttribs.dwAttribMask,stFlags.stAttribs.dwAttribVal );
|
||||
TRACE("(B) Bare format : %i\n", stFlags.bBareFormat );
|
||||
TRACE("(C) Thousand : %i\n", stFlags.bTSeperator );
|
||||
TRACE("(W) Wide list : %i\n", stFlags.bWideList );
|
||||
TRACE("(D) Wide list sort by column : %i\n", stFlags.bWideListColSort );
|
||||
TRACE("(L) Lowercase : %i\n", stFlags.bLowerCase );
|
||||
TRACE("(N) New : %i\n", stFlags.bNewLongList );
|
||||
TRACE("(O) Order : %i\n", stFlags.stOrderBy.sCriteriaCount );
|
||||
for (i =0;i<stFlags.stOrderBy.sCriteriaCount;i++)
|
||||
TRACE(" Order Criteria [%i]: %i (Reversed: %i)\n",i, stFlags.stOrderBy.eCriteria[i], stFlags.stOrderBy.bCriteriaRev[i] );
|
||||
TRACE("(P) Pause : %i\n", stFlags.bPause );
|
||||
TRACE("(Q) Owner : %i\n", stFlags.bUser );
|
||||
TRACE("(S) Recursive : %i\n", stFlags.bRecursive );
|
||||
TRACE("(T) Time field : %i\n", stFlags.stTimeField.eTimeField );
|
||||
TRACE("(X) Short names : %i\n", stFlags.bShortName );
|
||||
TRACE("Parameter : %s\n", debugstr_aw(params[loop]) );
|
||||
}
|
||||
|
||||
/* Print the drive header if the volume changed */
|
||||
ChangedVolume = TRUE;
|
||||
|
|
|
@ -34,7 +34,7 @@ INT CommandEcho (LPTSTR cmd, LPTSTR param)
|
|||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
LPTSTR p1, p2;
|
||||
|
||||
TRACE ("CommandEcho '%s' : '%s'\n", cmd, param);
|
||||
TRACE ("CommandEcho '%s' : '%s'\n", debugstr_aw(cmd), debugstr_aw(param));
|
||||
|
||||
if (_tcsicmp (cmd, _T("echo.")) == 0)
|
||||
{
|
||||
|
@ -110,7 +110,7 @@ INT CommandEcho (LPTSTR cmd, LPTSTR param)
|
|||
INT CommandEchos (LPTSTR cmd, LPTSTR param)
|
||||
{
|
||||
|
||||
TRACE ("CommandEchos '%s' : '%s'\n", cmd, param);
|
||||
TRACE ("CommandEchos '%s' : '%s'\n", debugstr_aw(cmd), debugstr_aw(param));
|
||||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
|
@ -128,7 +128,7 @@ INT CommandEchos (LPTSTR cmd, LPTSTR param)
|
|||
INT CommandEchoerr (LPTSTR cmd, LPTSTR param)
|
||||
{
|
||||
|
||||
TRACE ("CommandEchoerr '%s' : '%s'\n", cmd, param);
|
||||
TRACE ("CommandEchoerr '%s' : '%s'\n", debugstr_aw(cmd), debugstr_aw(param));
|
||||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
|
@ -155,7 +155,7 @@ INT CommandEchoerr (LPTSTR cmd, LPTSTR param)
|
|||
INT CommandEchoserr (LPTSTR cmd, LPTSTR param)
|
||||
{
|
||||
|
||||
TRACE ("CommandEchoserr '%s' : '%s'\n", cmd, param);
|
||||
TRACE ("CommandEchoserr '%s' : '%s'\n", debugstr_aw(cmd), debugstr_aw(param));
|
||||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
|
|
|
@ -54,7 +54,7 @@ INT cmd_for (LPTSTR cmd, LPTSTR param)
|
|||
TCHAR var;
|
||||
TCHAR szMsg[RC_STRING_MAX_SIZE];
|
||||
|
||||
TRACE ("cmd_for (\'%s\', \'%s\'\n", cmd, param);
|
||||
TRACE ("cmd_for (\'%s\', \'%s\'\n", debugstr_aw(cmd), debugstr_aw(param));
|
||||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
|
|
|
@ -42,7 +42,7 @@ INT cmd_goto (LPTSTR cmd, LPTSTR param)
|
|||
LPTSTR tmp, tmp2;
|
||||
LONG lNewPosHigh = 0;
|
||||
|
||||
TRACE ("cmd_goto (\'%s\', \'%s\'\n", cmd, param);
|
||||
TRACE ("cmd_goto (\'%s\', \'%s\'\n", debugstr_aw(cmd), debugstr_aw(param));
|
||||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
||||
TRACE ("cmd_if: (\'%s\', \'%s\')\n", cmd, param);
|
||||
TRACE ("cmd_if: (\'%s\', \'%s\')\n", debugstr_aw(cmd), debugstr_aw(param));
|
||||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
|
|
|
@ -191,7 +191,7 @@ INT cmd_move (LPTSTR cmd, LPTSTR param)
|
|||
|
||||
/* get destination */
|
||||
GetFullPathName (arg[argc - 1], MAX_PATH, szDestPath, NULL);
|
||||
TRACE ("Destination: %s\n", szDestPath);
|
||||
TRACE ("Destination: %s\n", debugstr_aw(szDestPath));
|
||||
|
||||
/* get source folder */
|
||||
GetDirectory(arg[argc - 2], szSrcDirPath, 1);
|
||||
|
@ -202,7 +202,7 @@ INT cmd_move (LPTSTR cmd, LPTSTR param)
|
|||
GetFullPathName(arg[argc - 2], MAX_PATH, szSrcPath, &pszFile);
|
||||
if (_tcscmp(szSrcDirPath,szSrcPath) == 0)
|
||||
szSrcDirPath[pszFile - szSrcPath] = _T('\0');
|
||||
TRACE ("Source Folder: %s\n", szSrcDirPath);
|
||||
TRACE ("Source Folder: %s\n", debugstr_aw(szSrcDirPath));
|
||||
|
||||
hFile = FindFirstFile (arg[argc - 2], &findBuffer);
|
||||
if (hFile == INVALID_HANDLE_VALUE)
|
||||
|
@ -235,7 +235,7 @@ INT cmd_move (LPTSTR cmd, LPTSTR param)
|
|||
if(szSrcPath[_tcslen(szSrcPath) - 1] != _T('\\'))
|
||||
_tcscat (szSrcPath, _T("\\"));
|
||||
_tcscat(szSrcPath,findBuffer.cFileName);
|
||||
TRACE ("Source Path: %s\n", szSrcPath);
|
||||
TRACE ("Source Path: %s\n", debugstr_aw(szSrcPath));
|
||||
/* check if there can be found files as files have first priority */
|
||||
if (IsExistingFile(szSrcPath)) dwMoveStatusFlags |= MOVE_SOURCE_IS_FILE;
|
||||
else dwMoveStatusFlags |= MOVE_SOURCE_IS_DIR;
|
||||
|
@ -258,7 +258,7 @@ INT cmd_move (LPTSTR cmd, LPTSTR param)
|
|||
}
|
||||
FindClose(hFile);
|
||||
|
||||
TRACE ("Do we have only one file: %s\n", OnlyOneFile ? _T("TRUE") : _T("FALSE"));
|
||||
TRACE ("Do we have only one file: %s\n", OnlyOneFile ? "TRUE" : "FALSE");
|
||||
|
||||
/* we have to start again to be sure we don't miss any files or folders*/
|
||||
hFile = FindFirstFile (arg[argc - 2], &findBuffer);
|
||||
|
@ -293,7 +293,7 @@ INT cmd_move (LPTSTR cmd, LPTSTR param)
|
|||
/* move it */
|
||||
do
|
||||
{
|
||||
TRACE ("Found file/directory: %s\n", findBuffer.cFileName);
|
||||
TRACE ("Found file/directory: %s\n", debugstr_aw(findBuffer.cFileName));
|
||||
nOverwrite = 1;
|
||||
dwMoveFlags = 0;
|
||||
dwMoveStatusFlags &= ~MOVE_DEST_IS_FILE &
|
||||
|
@ -315,7 +315,7 @@ INT cmd_move (LPTSTR cmd, LPTSTR param)
|
|||
dwMoveStatusFlags |= MOVE_SRC_CURRENT_IS_DIR; /* source is file but at the current round we found a directory */
|
||||
continue;
|
||||
}
|
||||
TRACE ("Source is dir: %s\n", szSrcPath);
|
||||
TRACE ("Source is dir: %s\n", debugstr_aw(szSrcPath));
|
||||
dwMoveFlags = MOVEFILE_REPLACE_EXISTING | MOVEFILE_WRITE_THROUGH | MOVEFILE_COPY_ALLOWED;
|
||||
}
|
||||
|
||||
|
@ -324,7 +324,7 @@ INT cmd_move (LPTSTR cmd, LPTSTR param)
|
|||
if (IsExistingDirectory(szDestPath))
|
||||
{
|
||||
/* destination is existing directory */
|
||||
TRACE ("Destination is directory: %s\n", szDestPath);
|
||||
TRACE ("Destination is directory: %s\n", debugstr_aw(szDestPath));
|
||||
|
||||
dwMoveStatusFlags |= MOVE_DEST_IS_DIR;
|
||||
|
||||
|
@ -344,7 +344,7 @@ INT cmd_move (LPTSTR cmd, LPTSTR param)
|
|||
if (IsExistingFile(szDestPath))
|
||||
{
|
||||
/* destination is a file */
|
||||
TRACE ("Destination is file: %s\n", szDestPath);
|
||||
TRACE ("Destination is file: %s\n", debugstr_aw(szDestPath));
|
||||
|
||||
dwMoveStatusFlags |= MOVE_DEST_IS_FILE | MOVE_DEST_EXISTS;
|
||||
_tcscpy (szFullDestPath, szDestPath);
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
INT cmd_pause (LPTSTR cmd, LPTSTR param)
|
||||
{
|
||||
|
||||
TRACE ("cmd_pause: \'%s\' : \'%s\')\n", cmd, param);
|
||||
TRACE ("cmd_pause: \'%s\' : \'%s\')\n", debugstr_aw(cmd), debugstr_aw(param));
|
||||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
|
|
|
@ -38,5 +38,10 @@
|
|||
|
||||
#include <wine/debug.h>
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(cmd);
|
||||
#ifdef UNICODE
|
||||
#define debugstr_aw debugstr_w
|
||||
#else
|
||||
#define debugstr_aw debugstr_a
|
||||
#endif
|
||||
|
||||
#endif /* __CMD_PRECOMP_H */
|
||||
|
|
|
@ -148,10 +148,8 @@ INT cmd_rename (LPTSTR cmd, LPTSTR param)
|
|||
|
||||
srcPattern = arg[i];
|
||||
|
||||
#ifdef _DEBUG
|
||||
ConErrPrintf(_T("\n\nSourcePattern: %s\n"), srcPattern);
|
||||
ConErrPrintf(_T("DestinationPattern: %s\n"), dstPattern);
|
||||
#endif
|
||||
TRACE("\n\nSourcePattern: %s\n", debugstr_aw(srcPattern));
|
||||
TRACE("DestinationPattern: %s\n", debugstr_aw(dstPattern));
|
||||
|
||||
hFile = FindFirstFile(srcPattern, &f);
|
||||
if (hFile == INVALID_HANDLE_VALUE)
|
||||
|
@ -179,9 +177,7 @@ INT cmd_rename (LPTSTR cmd, LPTSTR param)
|
|||
&& !(dwFlags & REN_SUBDIR))
|
||||
continue;
|
||||
|
||||
#ifdef _DEBUG
|
||||
ConErrPrintf(_T("Found source name: %s\n"), f.cFileName);
|
||||
#endif
|
||||
TRACE("Found source name: %s\n", debugstr_aw(f.cFileName));
|
||||
|
||||
/* build destination file name */
|
||||
p = f.cFileName;
|
||||
|
@ -220,9 +216,7 @@ INT cmd_rename (LPTSTR cmd, LPTSTR param)
|
|||
}
|
||||
*r = 0;
|
||||
|
||||
#ifdef _DEBUG
|
||||
ConErrPrintf(_T("DestinationFile: %s\n"), dstFile);
|
||||
#endif
|
||||
TRACE("DestinationFile: %s\n", debugstr_aw(dstFile));
|
||||
|
||||
if (!(dwFlags & REN_QUIET) && !(dwFlags & REN_TOTAL))
|
||||
ConOutPrintf(_T("%s -> %s\n"), f.cFileName, dstFile);
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
INT cmd_shift (LPTSTR cmd, LPTSTR param)
|
||||
{
|
||||
|
||||
TRACE ("cmd_shift: (\'%s\', \'%s\')\n", cmd, param);
|
||||
TRACE ("cmd_shift: (\'%s\', \'%s\')\n", debugstr_aw(cmd), debugstr_aw(param));
|
||||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
|
|
|
@ -253,10 +253,10 @@ INT cmd_start (LPTSTR First, LPTSTR Rest)
|
|||
szFullCmdLine[_tcslen(szFullCmdLine)] = _T('\"');
|
||||
}
|
||||
|
||||
TRACE ("[BATCH: %s %s]\n", szFullName, rest);
|
||||
TRACE ("[BATCH: %s %s]\n", debugstr_aw(szFullName), debugstr_aw(rest));
|
||||
|
||||
|
||||
TRACE ("[EXEC: %s %s]\n", szFullName, rest);
|
||||
TRACE ("[EXEC: %s %s]\n", debugstr_aw(szFullName), debugstr_aw(rest));
|
||||
/* build command line for CreateProcess() */
|
||||
if (bBat == FALSE)
|
||||
{
|
||||
|
|
|
@ -177,7 +177,7 @@ INT cmd_time (LPTSTR cmd, LPTSTR param)
|
|||
|
||||
ConInString (s, 40);
|
||||
|
||||
TRACE ("\'%s\'\n", s);
|
||||
TRACE ("\'%s\'\n", debugstr_aw(s));
|
||||
|
||||
while (*s && s[_tcslen (s) - 1] < _T(' '))
|
||||
s[_tcslen(s) - 1] = _T('\0');
|
||||
|
|
|
@ -92,7 +92,8 @@ SearchForExecutableSingle (LPCTSTR pFileName, LPTSTR pFullName, LPTSTR pExtensio
|
|||
/* initialize full name buffer */
|
||||
*pFullName = _T('\0');
|
||||
|
||||
TRACE ("SearchForExecutableSingle: \'%s\' with ext: \'%s\'\n", pFileName, pExtension);
|
||||
TRACE ("SearchForExecutableSingle: \'%s\' with ext: \'%s\'\n",
|
||||
debugstr_aw(pFileName), debugstr_aw(pExtension));
|
||||
|
||||
/* Check if valid directly on specified path */
|
||||
if (_tcschr (pFileName, _T('\\')) != NULL)
|
||||
|
@ -114,7 +115,7 @@ SearchForExecutableSingle (LPCTSTR pFileName, LPTSTR pFullName, LPTSTR pExtensio
|
|||
|
||||
if (IsExistingFile (szPathBuffer))
|
||||
{
|
||||
TRACE ("Found: \'%s\'\n", szPathBuffer);
|
||||
TRACE ("Found: \'%s\'\n", debugstr_aw(szPathBuffer));
|
||||
_tcscpy (pFullName, szPathBuffer);
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -135,7 +136,7 @@ SearchForExecutableSingle (LPCTSTR pFileName, LPTSTR pFullName, LPTSTR pExtensio
|
|||
|
||||
if (IsExistingFile (szPathBuffer))
|
||||
{
|
||||
TRACE ("Found: \'%s\'\n", szPathBuffer);
|
||||
TRACE ("Found: \'%s\'\n", debugstr_aw(szPathBuffer));
|
||||
_tcscpy (pFullName, szPathBuffer);
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -183,7 +184,7 @@ SearchForExecutableSingle (LPCTSTR pFileName, LPTSTR pFullName, LPTSTR pExtensio
|
|||
|
||||
if (IsExistingFile (szPathBuffer))
|
||||
{
|
||||
TRACE ("Found: \'%s\'\n", szPathBuffer);
|
||||
TRACE ("Found: \'%s\'\n", debugstr_aw(szPathBuffer));
|
||||
cmd_free (pszBuffer);
|
||||
_tcscpy (pFullName, szPathBuffer);
|
||||
return TRUE;
|
||||
|
@ -202,7 +203,7 @@ SearchForExecutable (LPCTSTR pFileName, LPTSTR pFullName)
|
|||
LPTSTR pCh;
|
||||
LPTSTR pExt;
|
||||
DWORD dwBuffer;
|
||||
TRACE ("SearchForExecutable: \'%s\'\n", pFileName);
|
||||
TRACE ("SearchForExecutable: \'%s\'\n", debugstr_aw(pFileName));
|
||||
/* load environment varable PATHEXT */
|
||||
pszBuffer = (LPTSTR)cmd_alloc (ENV_BUFFER_SIZE * sizeof(TCHAR));
|
||||
dwBuffer = GetEnvironmentVariable (_T("PATHEXT"), pszBuffer, ENV_BUFFER_SIZE);
|
||||
|
@ -216,7 +217,7 @@ SearchForExecutable (LPCTSTR pFileName, LPTSTR pFullName)
|
|||
_tcscpy(pszBuffer, pszDefaultPathExt);
|
||||
}
|
||||
|
||||
TRACE ("SearchForExecutable(): Loaded PATHEXT: %s\n", pszBuffer);
|
||||
TRACE ("SearchForExecutable(): Loaded PATHEXT: %s\n", debugstr_aw(pszBuffer));
|
||||
|
||||
pExt = _tcsrchr(pFileName, _T('.'));
|
||||
if (pExt != NULL)
|
||||
|
|
|
@ -158,9 +158,7 @@ static INT ServiceActivate (LPTSTR param, HWND hWnd)
|
|||
|
||||
if (iAction & A_CLOSE)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
ConErrPrintf(_T("!!!FIXME: CLOSE Not implemented!!!\n"));
|
||||
#endif
|
||||
FIXME("!!!FIXME: CLOSE Not implemented!!!\n");
|
||||
}
|
||||
|
||||
wp.length = sizeof(WINDOWPLACEMENT);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue