the name GetCodePage and OutCodePage is a bit misleading, change it to
InputCodePage and OutputCodePage
Modified: trunk/reactos/subsys/system/cmd/chcp.c
Modified: trunk/reactos/subsys/system/cmd/cmd.c
Modified: trunk/reactos/subsys/system/cmd/cmd.h
Modified: trunk/reactos/subsys/system/cmd/console.c
Modified: trunk/reactos/subsys/system/cmd/start.c
_____
Modified: trunk/reactos/subsys/system/cmd/chcp.c
--- trunk/reactos/subsys/system/cmd/chcp.c 2005-05-07 11:14:58 UTC
(rev 15076)
+++ trunk/reactos/subsys/system/cmd/chcp.c 2005-05-07 11:54:22 UTC
(rev 15077)
@@ -77,7 +77,7 @@
SetConsoleOutputCP (uNewCodePage);
InitLocale ();
- GetCodePage = GetConsoleCP();
+ InputCodePage= GetConsoleCP();
}
freep (arg);
_____
Modified: trunk/reactos/subsys/system/cmd/cmd.c
--- trunk/reactos/subsys/system/cmd/cmd.c 2005-05-07 11:14:58 UTC
(rev 15076)
+++ trunk/reactos/subsys/system/cmd/cmd.c 2005-05-07 11:54:22 UTC
(rev 15077)
@@ -427,8 +427,8 @@
}
/* Get code page if it has been change */
- GetCodePage = GetConsoleCP();
- OutCodePage = GetConsoleOutputCP();
+ InputCodePage= GetConsoleCP();
+ OutputCodePage = GetConsoleOutputCP();
#ifndef __REACTOS__
SetConsoleTitle (szWindowTitle);
#endif
@@ -1419,8 +1419,8 @@
#endif
SetFileApisToOEM();
- GetCodePage = 0;
- OutCodePage = 0;
+ InputCodePage= 0;
+ OutputCodePage = 0;
hConsole = CreateFile(_T("CONOUT$"), GENERIC_READ|GENERIC_WRITE,
FILE_SHARE_READ|FILE_SHARE_WRITE, NULL,
@@ -1433,8 +1433,8 @@
wColor = Info.wAttributes;
wDefColor = wColor;
- GetCodePage = GetConsoleCP();
- OutCodePage = GetConsoleOutputCP();
+ InputCodePage= GetConsoleCP();
+ OutputCodePage = GetConsoleOutputCP();
/* check switches on command-line */
Initialize(argc, argv);
_____
Modified: trunk/reactos/subsys/system/cmd/cmd.h
--- trunk/reactos/subsys/system/cmd/cmd.h 2005-05-07 11:14:58 UTC
(rev 15076)
+++ trunk/reactos/subsys/system/cmd/cmd.h 2005-05-07 11:54:22 UTC
(rev 15077)
@@ -298,8 +298,8 @@
VOID PrintTime (VOID);
/* cache codepage */
-extern UINT GetCodePage;
-extern UINT OutCodePage;
+extern UINT InputCodePage;
+extern UINT OutputCodePage;
/* Prototypes for MEMORY.C */
INT CommandMemory (LPTSTR, LPTSTR);
_____
Modified: trunk/reactos/subsys/system/cmd/console.c
--- trunk/reactos/subsys/system/cmd/console.c 2005-05-07 11:14:58 UTC
(rev 15076)
+++ trunk/reactos/subsys/system/cmd/console.c 2005-05-07 11:54:22 UTC
(rev 15077)
@@ -20,8 +20,8 @@
#define OUTPUT_BUFFER_SIZE 4096
-UINT GetCodePage;
-UINT OutCodePage;
+UINT InputCodePage;
+UINT OutputCodePage;
VOID ConInDisable (VOID)
@@ -111,7 +111,7 @@
ReadFile (hFile, (PVOID)pBuf, dwLength, &dwRead, NULL);
#ifdef _UNICODE
- MultiByteToWideChar( GetCodePage, 0, pBuf, dwLength + 1,
lpInput, dwLength + 1);
+ MultiByteToWideChar( InputCodePage, 0, pBuf, dwLength + 1,
lpInput, dwLength + 1);
#endif
p = lpInput;
for (i = 0; i < dwRead; i++, p++)
@@ -139,7 +139,7 @@
WCHAR ws[2];
ws[0] = c;
ws[1] = 0;
- WideCharToMultiByte( OutCodePage, 0, ws, 2, as, 2, NULL, NULL);
+ WideCharToMultiByte( OutputCodePage, 0, ws, 2, as, 2, NULL,
NULL);
cc = as[0];
#else
cc = c;
@@ -165,7 +165,7 @@
len = _tcslen(szText);
#ifdef _UNICODE
pBuf = malloc(len + 1);
- len = WideCharToMultiByte( OutCodePage, 0, szText, len + 1,
pBuf, len + 1, NULL, NULL) - 1;
+ len = WideCharToMultiByte( OutputCodePage, 0, szText, len + 1,
pBuf, len + 1, NULL, NULL) - 1;
#else
pBuf = szText;
#endif
@@ -200,7 +200,7 @@
len = _vstprintf (szOut, szFormat, arg_ptr);
#ifdef _UNICODE
pBuf = malloc(len + 1);
- len = WideCharToMultiByte( OutCodePage, 0, szOut, len + 1, pBuf,
len + 1, NULL, NULL) - 1;
+ len = WideCharToMultiByte( OutputCodePage, 0, szOut, len + 1,
pBuf, len + 1, NULL, NULL) - 1;
#else
pBuf = szOut;
#endif
_____
Modified: trunk/reactos/subsys/system/cmd/start.c
--- trunk/reactos/subsys/system/cmd/start.c 2005-05-07 11:14:58 UTC
(rev 15076)
+++ trunk/reactos/subsys/system/cmd/start.c 2005-05-07 11:54:22 UTC
(rev 15077)
@@ -115,8 +115,8 @@
CloseHandle (prci.hThread);
CloseHandle (prci.hProcess);
/* Get New code page if it has change */
- GetCodePage = GetConsoleCP();
- OutCodePage = GetConsoleOutputCP();
+ InputCodePage= GetConsoleCP();
+ OutputCodePage = GetConsoleOutputCP();
}
else
{