Author: hpoussin
Date: Thu May 15 15:29:50 2008
New Revision: 33536
URL:
http://svn.reactos.org/svn/reactos?rev=33536&view=rev
Log:
Fix debug output of strings
Modified:
trunk/reactos/base/shell/cmd/batch.c
trunk/reactos/base/shell/cmd/call.c
trunk/reactos/base/shell/cmd/cmd.c
trunk/reactos/base/shell/cmd/cmddbg.c
trunk/reactos/base/shell/cmd/config.h
trunk/reactos/base/shell/cmd/copy.c
trunk/reactos/base/shell/cmd/date.c
trunk/reactos/base/shell/cmd/del.c
trunk/reactos/base/shell/cmd/dir.c
trunk/reactos/base/shell/cmd/echo.c
trunk/reactos/base/shell/cmd/for.c
trunk/reactos/base/shell/cmd/goto.c
trunk/reactos/base/shell/cmd/if.c
trunk/reactos/base/shell/cmd/move.c
trunk/reactos/base/shell/cmd/pause.c
trunk/reactos/base/shell/cmd/precomp.h
trunk/reactos/base/shell/cmd/ren.c
trunk/reactos/base/shell/cmd/shift.c
trunk/reactos/base/shell/cmd/start.c
trunk/reactos/base/shell/cmd/time.c
trunk/reactos/base/shell/cmd/where.c
trunk/reactos/base/shell/cmd/window.c
Modified: trunk/reactos/base/shell/cmd/batch.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/batch.c?rev…
==============================================================================
--- trunk/reactos/base/shell/cmd/batch.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/batch.c [iso-8859-1] Thu May 15 15:29:50 2008
@@ -170,7 +170,7 @@
VOID ExitBatch (LPTSTR msg)
{
- TRACE ("ExitBatch: (\'%s\')\n", msg);
+ TRACE ("ExitBatch: (\'%s\')\n", debugstr_aw(msg));
if (bc != NULL)
{
@@ -223,7 +223,7 @@
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 @@
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++)
Modified: trunk/reactos/base/shell/cmd/call.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/call.c?rev=…
==============================================================================
--- trunk/reactos/base/shell/cmd/call.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/call.c [iso-8859-1] Thu May 15 15:29:50 2008
@@ -44,7 +44,7 @@
{
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);
Modified: trunk/reactos/base/shell/cmd/cmd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/cmd.c?rev=3…
==============================================================================
--- trunk/reactos/base/shell/cmd/cmd.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/cmd.c [iso-8859-1] Thu May 15 15:29:50 2008
@@ -283,7 +283,7 @@
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 @@
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 @@
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 @@
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 @@
}
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 @@
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 @@
_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 @@
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 @@
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 @@
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 @@
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");
Modified: trunk/reactos/base/shell/cmd/cmddbg.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/cmddbg.c?re…
==============================================================================
--- trunk/reactos/base/shell/cmd/cmddbg.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/cmddbg.c [iso-8859-1] Thu May 15 15:29:50 2008
@@ -244,4 +244,4 @@
ExitProcess(code);
}
-#endif /* _DEBUG */
+#endif /* _DEBUG_MEM */
Modified: trunk/reactos/base/shell/cmd/config.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/config.h?re…
==============================================================================
--- trunk/reactos/base/shell/cmd/config.h [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/config.h [iso-8859-1] Thu May 15 15:29:50 2008
@@ -11,9 +11,6 @@
#ifndef _CONFIG_H_INCLUDED_
#define _CONFIG_H_INCLUDED_
-
-/* Define to enable debugging code */
-//#define _DEBUG
#define WIN32_LEAN_AND_MEAN
Modified: trunk/reactos/base/shell/cmd/copy.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/copy.c?rev=…
==============================================================================
--- trunk/reactos/base/shell/cmd/copy.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/copy.c [iso-8859-1] Thu May 15 15:29:50 2008
@@ -165,10 +165,10 @@
}
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);
Modified: trunk/reactos/base/shell/cmd/date.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/date.c?rev=…
==============================================================================
--- trunk/reactos/base/shell/cmd/date.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/date.c [iso-8859-1] Thu May 15 15:29:50 2008
@@ -226,7 +226,7 @@
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))
Modified: trunk/reactos/base/shell/cmd/del.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/del.c?rev=3…
==============================================================================
--- trunk/reactos/base/shell/cmd/del.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/del.c [iso-8859-1] Thu May 15 15:29:50 2008
@@ -251,9 +251,7 @@
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)
Modified: trunk/reactos/base/shell/cmd/dir.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/dir.c?rev=3…
==============================================================================
--- trunk/reactos/base/shell/cmd/dir.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/dir.c [iso-8859-1] Thu May 15 15:29:50 2008
@@ -1590,9 +1590,7 @@
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 @@
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 @@
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 @@
/* <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;
Modified: trunk/reactos/base/shell/cmd/echo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/echo.c?rev=…
==============================================================================
--- trunk/reactos/base/shell/cmd/echo.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/echo.c [iso-8859-1] Thu May 15 15:29:50 2008
@@ -34,7 +34,7 @@
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 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 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 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))
{
Modified: trunk/reactos/base/shell/cmd/for.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/for.c?rev=3…
==============================================================================
--- trunk/reactos/base/shell/cmd/for.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/for.c [iso-8859-1] Thu May 15 15:29:50 2008
@@ -54,7 +54,7 @@
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))
{
Modified: trunk/reactos/base/shell/cmd/goto.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/goto.c?rev=…
==============================================================================
--- trunk/reactos/base/shell/cmd/goto.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/goto.c [iso-8859-1] Thu May 15 15:29:50 2008
@@ -42,7 +42,7 @@
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))
{
Modified: trunk/reactos/base/shell/cmd/if.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/if.c?rev=33…
==============================================================================
--- trunk/reactos/base/shell/cmd/if.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/if.c [iso-8859-1] Thu May 15 15:29:50 2008
@@ -41,7 +41,7 @@
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))
{
Modified: trunk/reactos/base/shell/cmd/move.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/move.c?rev=…
==============================================================================
--- trunk/reactos/base/shell/cmd/move.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/move.c [iso-8859-1] Thu May 15 15:29:50 2008
@@ -191,7 +191,7 @@
/* 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 @@
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 @@
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 @@
}
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 @@
/* 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 @@
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 @@
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 @@
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);
Modified: trunk/reactos/base/shell/cmd/pause.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/pause.c?rev…
==============================================================================
--- trunk/reactos/base/shell/cmd/pause.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/pause.c [iso-8859-1] Thu May 15 15:29:50 2008
@@ -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))
{
Modified: trunk/reactos/base/shell/cmd/precomp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/precomp.h?r…
==============================================================================
--- trunk/reactos/base/shell/cmd/precomp.h [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/precomp.h [iso-8859-1] Thu May 15 15:29:50 2008
@@ -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 */
Modified: trunk/reactos/base/shell/cmd/ren.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/ren.c?rev=3…
==============================================================================
--- trunk/reactos/base/shell/cmd/ren.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/ren.c [iso-8859-1] Thu May 15 15:29:50 2008
@@ -148,10 +148,8 @@
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 @@
&& !(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 @@
}
*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);
Modified: trunk/reactos/base/shell/cmd/shift.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/shift.c?rev…
==============================================================================
--- trunk/reactos/base/shell/cmd/shift.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/shift.c [iso-8859-1] Thu May 15 15:29:50 2008
@@ -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))
{
Modified: trunk/reactos/base/shell/cmd/start.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/start.c?rev…
==============================================================================
--- trunk/reactos/base/shell/cmd/start.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/start.c [iso-8859-1] Thu May 15 15:29:50 2008
@@ -253,10 +253,10 @@
szFullCmdLine[_tcslen(szFullCmdLine)] = _T('\"');
}
- TRACE ("[BATCH: %s %s]\n", szFullName, rest);
-
-
- TRACE ("[EXEC: %s %s]\n", szFullName, rest);
+ TRACE ("[BATCH: %s %s]\n", debugstr_aw(szFullName), debugstr_aw(rest));
+
+
+ TRACE ("[EXEC: %s %s]\n", debugstr_aw(szFullName), debugstr_aw(rest));
/* build command line for CreateProcess() */
if (bBat == FALSE)
{
Modified: trunk/reactos/base/shell/cmd/time.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/time.c?rev=…
==============================================================================
--- trunk/reactos/base/shell/cmd/time.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/time.c [iso-8859-1] Thu May 15 15:29:50 2008
@@ -177,7 +177,7 @@
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');
Modified: trunk/reactos/base/shell/cmd/where.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/where.c?rev…
==============================================================================
--- trunk/reactos/base/shell/cmd/where.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/where.c [iso-8859-1] Thu May 15 15:29:50 2008
@@ -92,7 +92,8 @@
/* 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 @@
if (IsExistingFile (szPathBuffer))
{
- TRACE ("Found: \'%s\'\n", szPathBuffer);
+ TRACE ("Found: \'%s\'\n", debugstr_aw(szPathBuffer));
_tcscpy (pFullName, szPathBuffer);
return TRUE;
}
@@ -135,7 +136,7 @@
if (IsExistingFile (szPathBuffer))
{
- TRACE ("Found: \'%s\'\n", szPathBuffer);
+ TRACE ("Found: \'%s\'\n", debugstr_aw(szPathBuffer));
_tcscpy (pFullName, szPathBuffer);
return TRUE;
}
@@ -183,7 +184,7 @@
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 @@
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 @@
_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)
Modified: trunk/reactos/base/shell/cmd/window.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/window.c?re…
==============================================================================
--- trunk/reactos/base/shell/cmd/window.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/window.c [iso-8859-1] Thu May 15 15:29:50 2008
@@ -158,9 +158,7 @@
if (iAction & A_CLOSE)
{
-#ifdef _DEBUG
- ConErrPrintf(_T("!!!FIXME: CLOSE Not implemented!!!\n"));
-#endif
+ FIXME("!!!FIXME: CLOSE Not implemented!!!\n");
}
wp.length = sizeof(WINDOWPLACEMENT);