- 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.

svn path=/trunk/; revision=49873
This commit is contained in:
Aleksey Bragin 2010-11-30 16:38:53 +00:00
parent 76b3ad6788
commit 7ca7ff0cbd
4 changed files with 4 additions and 3 deletions

View file

@ -180,7 +180,7 @@ WORD wDefColor; /* default color */
* insert commas into a number * insert commas into a number
*/ */
INT 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 */ TCHAR temp[39]; /* maximum length with nNumberGroups == 1 */
UINT n, iTarget; UINT n, iTarget;

View file

@ -99,7 +99,7 @@ INT cmd_cls (LPTSTR);
/* Prototypes for CMD.C */ /* 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); HANDLE RunFile(DWORD, LPTSTR, LPTSTR, LPTSTR, INT);
INT ParseCommandLine(LPTSTR); INT ParseCommandLine(LPTSTR);
struct _PARSED_COMMAND; struct _PARSED_COMMAND;

View file

@ -131,7 +131,7 @@ static VOID ConWrite(TCHAR *str, DWORD len, DWORD nStdHandle)
error_out_of_memory(); error_out_of_memory();
return; return;
} }
len = MultiByteToWideChar(OutputCodePage, 0, str, len, buffer, len, NULL, NULL); len = MultiByteToWideChar(OutputCodePage, 0, str, len, buffer, len);
str = (PVOID)buffer; str = (PVOID)buffer;
#endif #endif
WriteFile(hOutput, str, len * sizeof(WCHAR), &dwWritten, NULL); WriteFile(hOutput, str, len * sizeof(WCHAR), &dwWritten, NULL);

View file

@ -23,6 +23,7 @@
#include <stdarg.h> #include <stdarg.h>
#include <math.h> #include <math.h>
#include <time.h> #include <time.h>
#include <assert.h>
#define NTOS_MODE_USER #define NTOS_MODE_USER
#include <ndk/ntndk.h> #include <ndk/ntndk.h>