mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 01:25:41 +00:00
the name GetCodePage and OutCodePage is a bit misleading, change it to InputCodePage and OutputCodePage
svn path=/trunk/; revision=15077
This commit is contained in:
parent
e23d422877
commit
a418e5094f
5 changed files with 17 additions and 17 deletions
|
@ -77,7 +77,7 @@ INT CommandChcp (LPTSTR cmd, LPTSTR param)
|
||||||
|
|
||||||
SetConsoleOutputCP (uNewCodePage);
|
SetConsoleOutputCP (uNewCodePage);
|
||||||
InitLocale ();
|
InitLocale ();
|
||||||
GetCodePage = GetConsoleCP();
|
InputCodePage= GetConsoleCP();
|
||||||
}
|
}
|
||||||
|
|
||||||
freep (arg);
|
freep (arg);
|
||||||
|
|
|
@ -427,8 +427,8 @@ Execute (LPTSTR full, LPTSTR first, LPTSTR rest)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get code page if it has been change */
|
/* Get code page if it has been change */
|
||||||
GetCodePage = GetConsoleCP();
|
InputCodePage= GetConsoleCP();
|
||||||
OutCodePage = GetConsoleOutputCP();
|
OutputCodePage = GetConsoleOutputCP();
|
||||||
#ifndef __REACTOS__
|
#ifndef __REACTOS__
|
||||||
SetConsoleTitle (szWindowTitle);
|
SetConsoleTitle (szWindowTitle);
|
||||||
#endif
|
#endif
|
||||||
|
@ -1419,8 +1419,8 @@ int main (int argc, char *argv[])
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
SetFileApisToOEM();
|
SetFileApisToOEM();
|
||||||
GetCodePage = 0;
|
InputCodePage= 0;
|
||||||
OutCodePage = 0;
|
OutputCodePage = 0;
|
||||||
|
|
||||||
hConsole = CreateFile(_T("CONOUT$"), GENERIC_READ|GENERIC_WRITE,
|
hConsole = CreateFile(_T("CONOUT$"), GENERIC_READ|GENERIC_WRITE,
|
||||||
FILE_SHARE_READ|FILE_SHARE_WRITE, NULL,
|
FILE_SHARE_READ|FILE_SHARE_WRITE, NULL,
|
||||||
|
@ -1433,8 +1433,8 @@ int main (int argc, char *argv[])
|
||||||
wColor = Info.wAttributes;
|
wColor = Info.wAttributes;
|
||||||
wDefColor = wColor;
|
wDefColor = wColor;
|
||||||
|
|
||||||
GetCodePage = GetConsoleCP();
|
InputCodePage= GetConsoleCP();
|
||||||
OutCodePage = GetConsoleOutputCP();
|
OutputCodePage = GetConsoleOutputCP();
|
||||||
|
|
||||||
/* check switches on command-line */
|
/* check switches on command-line */
|
||||||
Initialize(argc, argv);
|
Initialize(argc, argv);
|
||||||
|
|
|
@ -298,8 +298,8 @@ VOID PrintDate (VOID);
|
||||||
VOID PrintTime (VOID);
|
VOID PrintTime (VOID);
|
||||||
|
|
||||||
/* cache codepage */
|
/* cache codepage */
|
||||||
extern UINT GetCodePage;
|
extern UINT InputCodePage;
|
||||||
extern UINT OutCodePage;
|
extern UINT OutputCodePage;
|
||||||
|
|
||||||
/* Prototypes for MEMORY.C */
|
/* Prototypes for MEMORY.C */
|
||||||
INT CommandMemory (LPTSTR, LPTSTR);
|
INT CommandMemory (LPTSTR, LPTSTR);
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
#define OUTPUT_BUFFER_SIZE 4096
|
#define OUTPUT_BUFFER_SIZE 4096
|
||||||
|
|
||||||
|
|
||||||
UINT GetCodePage;
|
UINT InputCodePage;
|
||||||
UINT OutCodePage;
|
UINT OutputCodePage;
|
||||||
|
|
||||||
|
|
||||||
VOID ConInDisable (VOID)
|
VOID ConInDisable (VOID)
|
||||||
|
@ -111,7 +111,7 @@ VOID ConInString (LPTSTR lpInput, DWORD dwLength)
|
||||||
ReadFile (hFile, (PVOID)pBuf, dwLength, &dwRead, NULL);
|
ReadFile (hFile, (PVOID)pBuf, dwLength, &dwRead, NULL);
|
||||||
|
|
||||||
#ifdef _UNICODE
|
#ifdef _UNICODE
|
||||||
MultiByteToWideChar( GetCodePage, 0, pBuf, dwLength + 1, lpInput, dwLength + 1);
|
MultiByteToWideChar( InputCodePage, 0, pBuf, dwLength + 1, lpInput, dwLength + 1);
|
||||||
#endif
|
#endif
|
||||||
p = lpInput;
|
p = lpInput;
|
||||||
for (i = 0; i < dwRead; i++, p++)
|
for (i = 0; i < dwRead; i++, p++)
|
||||||
|
@ -139,7 +139,7 @@ static VOID ConChar(TCHAR c, DWORD nStdHandle)
|
||||||
WCHAR ws[2];
|
WCHAR ws[2];
|
||||||
ws[0] = c;
|
ws[0] = c;
|
||||||
ws[1] = 0;
|
ws[1] = 0;
|
||||||
WideCharToMultiByte( OutCodePage, 0, ws, 2, as, 2, NULL, NULL);
|
WideCharToMultiByte( OutputCodePage, 0, ws, 2, as, 2, NULL, NULL);
|
||||||
cc = as[0];
|
cc = as[0];
|
||||||
#else
|
#else
|
||||||
cc = c;
|
cc = c;
|
||||||
|
@ -165,7 +165,7 @@ VOID ConPuts(LPTSTR szText, DWORD nStdHandle)
|
||||||
len = _tcslen(szText);
|
len = _tcslen(szText);
|
||||||
#ifdef _UNICODE
|
#ifdef _UNICODE
|
||||||
pBuf = malloc(len + 1);
|
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
|
#else
|
||||||
pBuf = szText;
|
pBuf = szText;
|
||||||
#endif
|
#endif
|
||||||
|
@ -200,7 +200,7 @@ VOID ConPrintf(LPTSTR szFormat, va_list arg_ptr, DWORD nStdHandle)
|
||||||
len = _vstprintf (szOut, szFormat, arg_ptr);
|
len = _vstprintf (szOut, szFormat, arg_ptr);
|
||||||
#ifdef _UNICODE
|
#ifdef _UNICODE
|
||||||
pBuf = malloc(len + 1);
|
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
|
#else
|
||||||
pBuf = szOut;
|
pBuf = szOut;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -115,8 +115,8 @@ INT cmd_start (LPTSTR first, LPTSTR rest)
|
||||||
CloseHandle (prci.hThread);
|
CloseHandle (prci.hThread);
|
||||||
CloseHandle (prci.hProcess);
|
CloseHandle (prci.hProcess);
|
||||||
/* Get New code page if it has change */
|
/* Get New code page if it has change */
|
||||||
GetCodePage = GetConsoleCP();
|
InputCodePage= GetConsoleCP();
|
||||||
OutCodePage = GetConsoleOutputCP();
|
OutputCodePage = GetConsoleOutputCP();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue