Author: spetreolle Date: Sat Apr 23 20:05:19 2011 New Revision: 51441
URL: http://svn.reactos.org/svn/reactos?rev=51441&view=rev Log: [CMAKE] * msvc compatibility fixes for doskey.
Modified: branches/cmake-bringup/base/applications/cmdutils/doskey/doskey.c
Modified: branches/cmake-bringup/base/applications/cmdutils/doskey/doskey.c URL: http://svn.reactos.org/svn/reactos/branches/cmake-bringup/base/applications/... ============================================================================== --- branches/cmake-bringup/base/applications/cmdutils/doskey/doskey.c [iso-8859-1] (original) +++ branches/cmake-bringup/base/applications/cmdutils/doskey/doskey.c [iso-8859-1] Sat Apr 23 20:05:19 2011 @@ -10,7 +10,7 @@ LPWSTR pszExeName = L"cmd.exe";
/* Function pointers */ -typedef DWORD (WINAPI *GetConsoleCommandHistoryW_t) (LPWSTR sCommands, DWORD nBufferLength, LPWSTR sExeName); +typedef DWORD (WINAPI *GetConsoleCommandHistoryW_t) (LPWSTR sCommands, DWORD nBufferLength, LPWSTR sExeName); typedef DWORD (WINAPI *GetConsoleCommandHistoryLengthW_t) (LPWSTR sExeName); typedef BOOL (WINAPI *SetConsoleNumberOfCommandsW_t)(DWORD nNumber, LPWSTR sExeName); typedef VOID (WINAPI *ExpungeConsoleCommandHistoryW_t)(LPWSTR sExeName); @@ -142,7 +142,7 @@ return; }
- while ( fgetws(line, MAX_PATH, fp) != NULL) + while ( fgetws(line, MAX_PATH, fp) != NULL) { /* Remove newline character */ WCHAR *end = &line[wcslen(line) - 1]; @@ -191,13 +191,16 @@ int wmain(VOID) { - setlocale(LC_ALL, ""); + WCHAR *pArgStart; + WCHAR *pArgEnd; + HMODULE hKernel32; + + setlocale(LC_ALL, "");
/* Get the full command line using GetCommandLine(). We can't just use argv, * because then a parameter like "gotoroot=cd " wouldn't be passed completely. */ - WCHAR *pArgStart; - WCHAR *pArgEnd = GetCommandLine(); - HMODULE hKernel32 = LoadLibraryW(L"kernel32.dll"); + pArgEnd = GetCommandLine(); + hKernel32 = LoadLibraryW(L"kernel32.dll");
/* Get function pointers */ pGetConsoleCommandHistoryW = (GetConsoleCommandHistoryW_t)GetProcAddress( hKernel32, "GetConsoleCommandHistoryW");