mirror of
https://github.com/reactos/reactos.git
synced 2024-07-17 18:06:11 +00:00
- More correct fix of tests
svn path=/trunk/; revision=40486
This commit is contained in:
parent
8ad7700db8
commit
864371fe84
|
@ -1252,6 +1252,7 @@ BOOL
|
|||
WINAPI
|
||||
IsValidCodePage(UINT CodePage)
|
||||
{
|
||||
if (CodePage == 0) return FALSE;
|
||||
if (CodePage == CP_UTF8 || CodePage == CP_UTF7)
|
||||
return TRUE;
|
||||
if (IntGetLoadedCodePageEntry(CodePage))
|
||||
|
|
|
@ -2970,22 +2970,16 @@ CSR_API(CsrSetConsoleCodePage)
|
|||
|
||||
Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
|
||||
Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) - sizeof(PORT_MESSAGE);
|
||||
if (Request->Data.SetConsoleCodePage.CodePage == 0)
|
||||
{
|
||||
ConioUnlockConsole(Console);
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (IsValidCodePage(Request->Data.SetConsoleCodePage.CodePage))
|
||||
|
||||
if (IsValidCodePage(Request->Data.SetConsoleCodePage.CodePage))
|
||||
{
|
||||
Console->CodePage = Request->Data.SetConsoleCodePage.CodePage;
|
||||
ConioUnlockConsole(Console);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
ConioUnlockConsole(Console);
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
CSR_API(CsrGetConsoleOutputCodePage)
|
||||
|
@ -3023,22 +3017,16 @@ CSR_API(CsrSetConsoleOutputCodePage)
|
|||
|
||||
Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
|
||||
Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) - sizeof(PORT_MESSAGE);
|
||||
if (Request->Data.SetConsoleOutputCodePage.CodePage == 0)
|
||||
{
|
||||
ConioUnlockConsole(Console);
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (IsValidCodePage(Request->Data.SetConsoleOutputCodePage.CodePage))
|
||||
|
||||
if (IsValidCodePage(Request->Data.SetConsoleOutputCodePage.CodePage))
|
||||
{
|
||||
Console->OutputCodePage = Request->Data.SetConsoleOutputCodePage.CodePage;
|
||||
ConioUnlockConsole(Console);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
ConioUnlockConsole(Console);
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
CSR_API(CsrGetProcessList)
|
||||
|
|
Loading…
Reference in a new issue