From 05a950739424ae6f79c0c2ec5b71f79eb420f794 Mon Sep 17 00:00:00 2001 From: Dmitry Chapyshev Date: Mon, 5 Sep 2016 17:32:06 +0000 Subject: [PATCH] [RTL] - NlsDbcsUnicodeToAnsiTable -> NlsUnicodeToMbAnsiTable, NlsDbcsUnicodeToOemTable -> NlsUnicodeToMbOemTable - Change types to USHORT (its not PWCHAR's) svn path=/trunk/; revision=72584 --- reactos/sdk/lib/rtl/nls.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/reactos/sdk/lib/rtl/nls.c b/reactos/sdk/lib/rtl/nls.c index 0704fae8978..0fd41d7e46a 100644 --- a/reactos/sdk/lib/rtl/nls.c +++ b/reactos/sdk/lib/rtl/nls.c @@ -20,17 +20,16 @@ PUSHORT NlsUnicodeLowercaseTable = NULL; USHORT NlsAnsiCodePage = 0; /* exported */ BOOLEAN NlsMbCodePageTag = FALSE; /* exported */ -PWCHAR NlsAnsiToUnicodeTable = NULL; +PUSHORT NlsAnsiToUnicodeTable = NULL; PCHAR NlsUnicodeToAnsiTable = NULL; -PWCHAR NlsDbcsUnicodeToAnsiTable = NULL; +PUSHORT NlsUnicodeToMbAnsiTable = NULL; PUSHORT NlsLeadByteInfo = NULL; /* exported */ - USHORT NlsOemCodePage = 0; BOOLEAN NlsMbOemCodePageTag = FALSE; /* exported */ -PWCHAR NlsOemToUnicodeTable = NULL; +PUSHORT NlsOemToUnicodeTable = NULL; PCHAR NlsUnicodeToOemTable = NULL; -PWCHAR NlsDbcsUnicodeToOemTable = NULL; +PUSHORT NlsUnicodeToMbOemTable = NULL; PUSHORT NlsOemLeadByteInfo = NULL; /* exported */ USHORT NlsOemDefaultChar = '\0'; @@ -444,18 +443,18 @@ RtlResetRtlTranslations(IN PNLSTABLEINFO NlsTable) DPRINT("RtlResetRtlTranslations() called\n"); /* Set ANSI data */ - NlsAnsiToUnicodeTable = (PWCHAR)NlsTable->AnsiTableInfo.MultiByteTable; /* Real type is PUSHORT */ + NlsAnsiToUnicodeTable = (PUSHORT)NlsTable->AnsiTableInfo.MultiByteTable; NlsUnicodeToAnsiTable = NlsTable->AnsiTableInfo.WideCharTable; - NlsDbcsUnicodeToAnsiTable = (PWCHAR)NlsTable->AnsiTableInfo.WideCharTable; + NlsUnicodeToMbAnsiTable = (PUSHORT)NlsTable->AnsiTableInfo.WideCharTable; NlsMbCodePageTag = (NlsTable->AnsiTableInfo.DBCSCodePage != 0); NlsLeadByteInfo = NlsTable->AnsiTableInfo.DBCSOffsets; NlsAnsiCodePage = NlsTable->AnsiTableInfo.CodePage; DPRINT("Ansi codepage %hu\n", NlsAnsiCodePage); /* Set OEM data */ - NlsOemToUnicodeTable = (PWCHAR)NlsTable->OemTableInfo.MultiByteTable; /* Real type is PUSHORT */ + NlsOemToUnicodeTable = (PUSHORT)NlsTable->OemTableInfo.MultiByteTable; NlsUnicodeToOemTable = NlsTable->OemTableInfo.WideCharTable; - NlsDbcsUnicodeToOemTable = (PWCHAR)NlsTable->OemTableInfo.WideCharTable; + NlsUnicodeToMbOemTable = (PUSHORT)NlsTable->OemTableInfo.WideCharTable; NlsMbOemCodePageTag = (NlsTable->OemTableInfo.DBCSCodePage != 0); NlsOemLeadByteInfo = NlsTable->OemTableInfo.DBCSOffsets; NlsOemCodePage = NlsTable->OemTableInfo.CodePage; @@ -566,7 +565,7 @@ RtlUnicodeToMultiByteN (PCHAR MbString, continue; } - MbChar = NlsDbcsUnicodeToAnsiTable[WideChar]; + MbChar = NlsUnicodeToMbAnsiTable[WideChar]; if (!HIBYTE(MbChar)) { @@ -616,7 +615,7 @@ RtlUnicodeToMultiByteSize(PULONG MbSize, { USHORT WideChar = *UnicodeString++; - if (WideChar >= 0x80 && HIBYTE(NlsDbcsUnicodeToAnsiTable[WideChar])) + if (WideChar >= 0x80 && HIBYTE(NlsUnicodeToMbAnsiTable[WideChar])) { MbLength += sizeof(WCHAR); } @@ -682,7 +681,7 @@ RtlUnicodeToOemN (PCHAR OemString, continue; } - OemChar = NlsDbcsUnicodeToOemTable[WideChar]; + OemChar = NlsUnicodeToMbOemTable[WideChar]; if (!HIBYTE(OemChar)) { @@ -879,7 +878,7 @@ RtlUpcaseUnicodeToOemN (PCHAR OemString, continue; } - OemChar = NlsDbcsUnicodeToOemTable[WideChar]; + OemChar = NlsUnicodeToMbOemTable[WideChar]; if (!HIBYTE(OemChar)) {