RtlUpperChar (was: some ntdll functions) [Virus checked]

Dmitry Timoshkov dmitry at baikal.ru
Thu Feb 6 17:12:03 CST 2003


<thomas.mertes at t-mobile.at> wrote:

> I did a test on w2k trying to convert all chars between 0 and 255.
> The result was:
> 
> Just 'a' .. 'z' are converted to 'A' .. 'Z', all other characters remain
> unchanged.
> 
> I switched the machine between 'EN' (English) and 'DE' (German) and no
> difference.
> 
> My test Function is:
> 
> static void test_RtlUpperChar(void)
> {
>   int i;
>   CHAR ch;
>   CHAR upper_ch;
>   CHAR expected_upper_ch;
> 
>   for (i = 0; i <= 255; i++) {
>     ch = (CHAR) i;
>     upper_ch = pRtlUpperChar(ch);
>     if (ch >= 'a' && ch <= 'z') {
>       expected_upper_ch = ch - 'a' + 'A';
>     } else {
>       expected_upper_ch = ch;
>     } /* if */
>     ok(upper_ch == expected_upper_ch,
>        "RtlUpperChar('%c') has result '%c', expected '%c'",
>        ch, upper_ch, expected_upper_ch);
>   } /* for */
> }
> 
> ... and this test passed really under native w2k.

Thanks for the test case. It seems that you are right. Test passes
for me too under win2k (with russian locale). Please submit your patch
with the conformance test to wine-patches. Only one caveat: we should
make sure that we never use RtlUpperChar internally in Wine in
the cases where locale support is required.

-- 
Dmitry.






More information about the wine-devel mailing list