From 434964f61daad690452d3e39913c1e97be1d0edf Mon Sep 17 00:00:00 2001 From: Dmitry Chapyshev Date: Thu, 15 Sep 2016 20:40:29 +0000 Subject: [PATCH] [RTL] Add internal RtlpDowncaseUnicodeChar function and use instead RtlDowncaseUnicodeChar internally in RTL. RtlMultiAppendUnicodeStringBuffer parameters are specified (it is documented on: http://undoc.airesoft.co.uk/ntdll.dll/RtlMultiAppendUnicodeStringBuffer.php) svn path=/trunk/; revision=72692 --- reactos/sdk/lib/rtl/nls.c | 13 ++++++++++++- reactos/sdk/lib/rtl/path.c | 4 ++-- reactos/sdk/lib/rtl/rtlp.h | 4 ++++ reactos/sdk/lib/rtl/unicode.c | 8 ++++---- 4 files changed, 22 insertions(+), 7 deletions(-) diff --git a/reactos/sdk/lib/rtl/nls.c b/reactos/sdk/lib/rtl/nls.c index 735e532cd21..fc4e8440460 100644 --- a/reactos/sdk/lib/rtl/nls.c +++ b/reactos/sdk/lib/rtl/nls.c @@ -86,7 +86,7 @@ RtlCustomCPToUnicodeN(IN PCPTABLEINFO CustomCP, * @implemented */ WCHAR NTAPI -RtlDowncaseUnicodeChar(IN WCHAR Source) +RtlpDowncaseUnicodeChar(IN WCHAR Source) { USHORT Offset; @@ -124,6 +124,17 @@ RtlDowncaseUnicodeChar(IN WCHAR Source) return Source + (SHORT)Offset; } +/* + * @implemented + */ +WCHAR NTAPI +RtlDowncaseUnicodeChar(IN WCHAR Source) +{ + PAGED_CODE_RTL(); + + return RtlpDowncaseUnicodeChar(Source); +} + /* * @implemented */ diff --git a/reactos/sdk/lib/rtl/path.c b/reactos/sdk/lib/rtl/path.c index 79cd9692790..9c972d2ac30 100644 --- a/reactos/sdk/lib/rtl/path.c +++ b/reactos/sdk/lib/rtl/path.c @@ -163,7 +163,7 @@ RtlIsDosDeviceName_Ustr(IN PCUNICODE_STRING PathString) { /* Get the next lower case character */ End++; - c = RtlDowncaseUnicodeChar(*End); + c = RtlpDowncaseUnicodeChar(*End); /* Check if it's a DOS device (LPT, COM, PRN, AUX, or NUL) */ if ((End < &PathCopy.Buffer[OriginalLength / sizeof(WCHAR)]) && @@ -189,7 +189,7 @@ RtlIsDosDeviceName_Ustr(IN PCUNICODE_STRING PathString) } /* Get the next lower case character and check if it's a DOS device */ - c = RtlDowncaseUnicodeChar(*PathCopy.Buffer); + c = RtlpDowncaseUnicodeChar(*PathCopy.Buffer); if ((c != L'l') && (c != L'c') && (c != L'p') && (c != L'a') && (c != L'n')) { /* Not LPT, COM, PRN, AUX, or NUL */ diff --git a/reactos/sdk/lib/rtl/rtlp.h b/reactos/sdk/lib/rtl/rtlp.h index 34cff06919a..6942e18fdec 100644 --- a/reactos/sdk/lib/rtl/rtlp.h +++ b/reactos/sdk/lib/rtl/rtlp.h @@ -235,4 +235,8 @@ WCHAR NTAPI RtlpUpcaseUnicodeChar(IN WCHAR Source); +WCHAR +NTAPI +RtlpDowncaseUnicodeChar(IN WCHAR Source); + /* EOF */ diff --git a/reactos/sdk/lib/rtl/unicode.c b/reactos/sdk/lib/rtl/unicode.c index 5922f1e8a5a..a12e9566569 100644 --- a/reactos/sdk/lib/rtl/unicode.c +++ b/reactos/sdk/lib/rtl/unicode.c @@ -34,9 +34,9 @@ extern PUSHORT NlsUnicodeToMbOemTable; NTSTATUS NTAPI -RtlMultiAppendUnicodeStringBuffer(IN PVOID Unknown, - IN ULONG Unknown2, - IN PVOID Unknown3) +RtlMultiAppendUnicodeStringBuffer(OUT PRTL_UNICODE_STRING_BUFFER StringBuffer, + IN ULONG NumberOfAddends, + IN PCUNICODE_STRING Addends) { UNIMPLEMENTED; return STATUS_NOT_IMPLEMENTED; @@ -2376,7 +2376,7 @@ RtlDowncaseUnicodeString( } else { - UniDest->Buffer[i] = RtlDowncaseUnicodeChar(UniSource->Buffer[i]); + UniDest->Buffer[i] = RtlpDowncaseUnicodeChar(UniSource->Buffer[i]); } }