[ros-diffs] [fireball] 49873: [CMD] - Carlo Bramix: MultiByteToWideChar() has just 6 and not 8 parameters, probably it's a forgetten copy/past from WideCharToMultiByte(). - Carlo Bramix: ConvertULargeInteger()...

fireball at svn.reactos.org fireball at svn.reactos.org
Tue Nov 30 16:38:54 UTC 2010


Author: fireball
Date: Tue Nov 30 16:38:53 2010
New Revision: 49873

URL: http://svn.reactos.org/svn/reactos?rev=49873&view=rev
Log:
[CMD]
- Carlo Bramix: MultiByteToWideChar() has just 6 and not 8 parameters, probably it's a forgetten copy/past from WideCharToMultiByte().
- Carlo Bramix: ConvertULargeInteger() should have its parameter 'Len' declared as UINT rather than 'INT'. This fixes a signed/unsigned mismatch warning.
See issue #5678 for more details.

Modified:
    trunk/reactos/base/shell/cmd/cmd.c
    trunk/reactos/base/shell/cmd/cmd.h
    trunk/reactos/base/shell/cmd/console.c
    trunk/reactos/base/shell/cmd/precomp.h

Modified: trunk/reactos/base/shell/cmd/cmd.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/cmd.c?rev=49873&r1=49872&r2=49873&view=diff
==============================================================================
--- trunk/reactos/base/shell/cmd/cmd.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/cmd.c [iso-8859-1] Tue Nov 30 16:38:53 2010
@@ -180,7 +180,7 @@
  * insert commas into a number
  */
 INT
-ConvertULargeInteger(ULONGLONG num, LPTSTR des, INT len, BOOL bPutSeperator)
+ConvertULargeInteger(ULONGLONG num, LPTSTR des, UINT len, BOOL bPutSeperator)
 {
 	TCHAR temp[39];   /* maximum length with nNumberGroups == 1 */
 	UINT  n, iTarget;

Modified: trunk/reactos/base/shell/cmd/cmd.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/cmd.h?rev=49873&r1=49872&r2=49873&view=diff
==============================================================================
--- trunk/reactos/base/shell/cmd/cmd.h [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/cmd.h [iso-8859-1] Tue Nov 30 16:38:53 2010
@@ -99,7 +99,7 @@
 
 
 /* Prototypes for CMD.C */
-INT ConvertULargeInteger(ULONGLONG num, LPTSTR des, INT len, BOOL bPutSeperator);
+INT ConvertULargeInteger(ULONGLONG num, LPTSTR des, UINT len, BOOL bPutSeperator);
 HANDLE RunFile(DWORD, LPTSTR, LPTSTR, LPTSTR, INT);
 INT ParseCommandLine(LPTSTR);
 struct _PARSED_COMMAND;

Modified: trunk/reactos/base/shell/cmd/console.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/console.c?rev=49873&r1=49872&r2=49873&view=diff
==============================================================================
--- trunk/reactos/base/shell/cmd/console.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/console.c [iso-8859-1] Tue Nov 30 16:38:53 2010
@@ -131,7 +131,7 @@
 			error_out_of_memory();
 			return;
 		}
-		len = MultiByteToWideChar(OutputCodePage, 0, str, len, buffer, len, NULL, NULL);
+		len = MultiByteToWideChar(OutputCodePage, 0, str, len, buffer, len);
 		str = (PVOID)buffer;
 #endif
 		WriteFile(hOutput, str, len * sizeof(WCHAR), &dwWritten, NULL);

Modified: trunk/reactos/base/shell/cmd/precomp.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/precomp.h?rev=49873&r1=49872&r2=49873&view=diff
==============================================================================
--- trunk/reactos/base/shell/cmd/precomp.h [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/precomp.h [iso-8859-1] Tue Nov 30 16:38:53 2010
@@ -23,6 +23,7 @@
 #include <stdarg.h>
 #include <math.h>
 #include <time.h>
+#include <assert.h>
 
 #define NTOS_MODE_USER
 #include <ndk/ntndk.h>




More information about the Ros-diffs mailing list