- More correct fix of tests

svn path=/trunk/; revision=40486
This commit is contained in:
Dmitry Chapyshev 2009-04-13 17:13:35 +00:00
parent 8ad7700db8
commit 864371fe84
2 changed files with 9 additions and 20 deletions

View file

@ -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))

View file

@ -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)