ReactOS 0.4.16-dev-927-g467dec4
locale.c File Reference
#include <rtl.h>
#include <debug.h>
Include dependency graph for locale.c:

Go to the source code of this file.

Classes

struct  _LOCALE_ENTRY
 
struct  _SORT_ENTRY
 

Macros

#define NDEBUG
 
#define MAX_PRIMARY_LANGUAGE   0x3FF
 
#define MAX_BASIC_LCID   0x5FFF
 
#define LCID_ALT_NAME   0x00100000
 
#define LOWERCASE_CHAR(Char)    (((Char) >= 'A' && (Char) <= 'Z') ? ((Char) + ('a' - 'A')) : (Char))
 

Typedefs

typedef struct _LOCALE_ENTRY LOCALE_ENTRY
 
typedef struct _SORT_ENTRY SORT_ENTRY
 
typedef struct _SORT_ENTRYPSORT_ENTRY
 

Functions

static int __cdecl LcidSortEntryCompare (const void *a, const void *b)
 
NTSTATUS NTAPI RtlpInitializeLocaleTable (VOID)
 
static _Must_inspect_result_ ULONG FindIndexByLcid (_In_ LCID Lcid)
 
static _Must_inspect_result_ INT CompareLocaleNames (_In_ PCSTR AsciiLocaleName, _In_ PCUNICODE_STRING UnicodeLocaleName)
 
static _Must_inspect_result_ ULONG FindIndexByLocaleName (_In_ PCUNICODE_STRING LocaleName)
 
static _Must_inspect_result_ BOOLEAN CopyAsciizToUnicodeString (_Inout_ PUNICODE_STRING UnicodeString, _In_ PCSTR AsciiString)
 
static BOOLEAN IsNeutralLocale (_In_ LCID Lcid)
 
NTSTATUS NTAPI RtlLcidToLocaleName (_In_ LCID Lcid, _Inout_ PUNICODE_STRING LocaleName, _In_ ULONG Flags, _In_ BOOLEAN AllocateDestinationString)
 
static _Must_inspect_result_ NTSTATUS RtlpLocaleNameToLcidInternal (_In_ PCUNICODE_STRING LocaleName, _Out_ PLCID Lcid, _In_ ULONG Flags)
 
NTSTATUS NTAPI RtlLocaleNameToLcid (_In_ PCWSTR LocaleName, _Out_ PLCID Lcid, _In_ ULONG Flags)
 
 _Success_ (return !=FALSE)
 
BOOLEAN NTAPI RtlIsValidLocaleName (_In_ LPCWSTR LocaleName, _In_ ULONG Flags)
 
NTSTATUS NTAPI RtlConvertLCIDToString (_In_ LCID LcidValue, _In_ ULONG Base, _In_ ULONG Padding, _Out_writes_(Size) PWSTR pResultBuf, _In_ ULONG Size)
 

Variables

LCID RtlpUserDefaultLcid
 
LCID RtlpSystemDefaultLcid
 
static const LOCALE_ENTRY RtlpLocaleTable []
 
static USHORT RtlpLocaleIndexTable [_ARRAYSIZE(RtlpLocaleTable)]
 

Macro Definition Documentation

◆ LCID_ALT_NAME

#define LCID_ALT_NAME   0x00100000

Definition at line 21 of file locale.c.

◆ LOWERCASE_CHAR

#define LOWERCASE_CHAR (   Char)     (((Char) >= 'A' && (Char) <= 'Z') ? ((Char) + ('a' - 'A')) : (Char))

Definition at line 607 of file locale.c.

◆ MAX_BASIC_LCID

#define MAX_BASIC_LCID   0x5FFF

Definition at line 19 of file locale.c.

◆ MAX_PRIMARY_LANGUAGE

#define MAX_PRIMARY_LANGUAGE   0x3FF

Definition at line 18 of file locale.c.

◆ NDEBUG

#define NDEBUG

Definition at line 10 of file locale.c.

Typedef Documentation

◆ LOCALE_ENTRY

◆ PSORT_ENTRY

◆ SORT_ENTRY

Function Documentation

◆ _Success_()

_Success_ ( return = FALSE)

Definition at line 886 of file locale.c.

892{
894
895 /* Forward to RtlLcidToLocaleName, include neutral names */
896 Status = RtlLcidToLocaleName(Lcid, String, RTL_LOCALE_ALLOW_NEUTRAL_NAMES, FALSE);
897 if (!NT_SUCCESS(Status))
898 {
899 DPRINT1("RtlLcidToLocaleName failed with status 0x%lx\n", Status);
900 return FALSE;
901 }
902
903 return TRUE;
904}
LONG NTSTATUS
Definition: precomp.h:26
#define DPRINT1
Definition: precomp.h:8
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
Status
Definition: gdiplustypes.h:25
NTSTATUS NTAPI RtlLcidToLocaleName(_In_ LCID Lcid, _Inout_ PUNICODE_STRING LocaleName, _In_ ULONG Flags, _In_ BOOLEAN AllocateDestinationString)
Definition: locale.c:735
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
Definition: wdfdevice.h:2433
_In_ CONST DEVPROPKEY _In_ LCID Lcid
Definition: iofuncs.h:2415

◆ CompareLocaleNames()

static _Must_inspect_result_ INT CompareLocaleNames ( _In_ PCSTR  AsciiLocaleName,
_In_ PCUNICODE_STRING  UnicodeLocaleName 
)
static

Definition at line 613 of file locale.c.

616{
617 ULONG i;
618
619 /* Do a case-insensitive comparison. */
620 for (i = 0; i < UnicodeLocaleName->Length / sizeof(WCHAR); i++)
621 {
622 /* Make the 2 chars lower case for comparison */
623 CHAR Char1 = LOWERCASE_CHAR(AsciiLocaleName[i]);
624 WCHAR Char2 = LOWERCASE_CHAR(UnicodeLocaleName->Buffer[i]);
625
626 /* Keep comparing, while they are equal */
627 if (Char1 == Char2)
628 {
629 continue;
630 }
631
632 /* Check if the ASCII string ends first */
633 if (AsciiLocaleName[i] == '\0')
634 {
635 /* The 1st string is shorter than the 2nd, i.e. smaller */
636 return -1;
637 }
638
639 /* Return the difference between the two characters */
640 return (INT)Char1 - (INT)Char2;
641 }
642
643 /* The strings match up to the lenth of the unicode string.
644 If the ASCII string ends here, they are equal. */
645 if (AsciiLocaleName[i] == '\0')
646 {
647 return 0;
648 }
649
650 /* The 1st string is longer than the 2nd, i.e. larger */
651 return 1;
652}
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define INT
Definition: polytest.cpp:20
#define LOWERCASE_CHAR(Char)
Definition: locale.c:607
int32_t INT
Definition: typedefs.h:58
uint32_t ULONG
Definition: typedefs.h:59
__wchar_t WCHAR
Definition: xmlstorage.h:180
char CHAR
Definition: xmlstorage.h:175

Referenced by FindIndexByLocaleName().

◆ CopyAsciizToUnicodeString()

static _Must_inspect_result_ BOOLEAN CopyAsciizToUnicodeString ( _Inout_ PUNICODE_STRING  UnicodeString,
_In_ PCSTR  AsciiString 
)
static

Definition at line 692 of file locale.c.

695{
696 SIZE_T AsciiLength = strlen(AsciiString);
697
698 /* Make sure we can copy the full string, including the terminating 0 */
699 if (UnicodeString->MaximumLength < (AsciiLength + 1) * sizeof(WCHAR))
700 {
701 return FALSE;
702 }
703
704 /* Copy the string manually */
705 for (SIZE_T i = 0; i < AsciiLength; i++)
706 {
707 UnicodeString->Buffer[i] = (WCHAR)AsciiString[i];
708 }
709
710 /* Add the terminating 0 and update the Length */
711 UnicodeString->Buffer[AsciiLength] = UNICODE_NULL;
712 UnicodeString->Length = (USHORT)(AsciiLength * sizeof(WCHAR));
713
714 return TRUE;
715}
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
#define UNICODE_NULL
unsigned short USHORT
Definition: pedump.c:61
ULONG_PTR SIZE_T
Definition: typedefs.h:80

Referenced by RtlLcidToLocaleName().

◆ FindIndexByLcid()

static _Must_inspect_result_ ULONG FindIndexByLcid ( _In_ LCID  Lcid)
static

Definition at line 571 of file locale.c.

573{
574 USHORT TableIndex;
575 LONG Low = 0;
577 LONG Middle;
578 LCID CurrentLcid;
579
580 while (Low <= High)
581 {
582 Middle = (Low + High) / 2;
583
584 /* Use the indirection table to get the real table entry */
585 TableIndex = RtlpLocaleIndexTable[Middle];
586 ASSERT(TableIndex < ARRAYSIZE(RtlpLocaleTable));
587
588 /* Compare the LCID (including the alternative name flag!) */
589 CurrentLcid = RtlpLocaleTable[TableIndex].Lcid;
590 if (CurrentLcid < Lcid)
591 {
592 Low = Middle + 1;
593 }
594 else if (CurrentLcid > Lcid)
595 {
596 High = Middle - 1;
597 }
598 else /* CurrentLcid == Lcid */
599 {
600 return RtlpLocaleIndexTable[Middle];
601 }
602 }
603
604 return MAXULONG;
605}
#define ARRAYSIZE(array)
Definition: filtermapper.c:47
#define ASSERT(a)
Definition: mode.c:44
long LONG
Definition: pedump.c:60
DWORD LCID
Definition: nls.h:13
static USHORT RtlpLocaleIndexTable[_ARRAYSIZE(RtlpLocaleTable)]
Definition: locale.c:506
static const LOCALE_ENTRY RtlpLocaleTable[]
Definition: locale.c:34
@ High
Definition: strmini.h:378
@ Low
Definition: strmini.h:380
LCID Lcid
Definition: locale.c:29
#define MAXULONG
Definition: typedefs.h:251

Referenced by RtlLcidToLocaleName().

◆ FindIndexByLocaleName()

static _Must_inspect_result_ ULONG FindIndexByLocaleName ( _In_ PCUNICODE_STRING  LocaleName)
static

Definition at line 657 of file locale.c.

659{
660 LONG Low = 0;
662 LONG Middle;
663 PCSTR CurrentLocaleName;
664 INT CompareResult;
665
666 while (Low <= High)
667 {
668 Middle = (Low + High) / 2;
669
670 CurrentLocaleName = RtlpLocaleTable[Middle].Locale;
671 CompareResult = CompareLocaleNames(CurrentLocaleName, LocaleName);
672 if (CompareResult < 0)
673 {
674 Low = Middle + 1;
675 }
676 else if (CompareResult > 0)
677 {
678 High = Middle - 1;
679 }
680 else /* CompareResult == 0 */
681 {
682 return Middle;
683 }
684 }
685
686 return MAXULONG;
687}
static _In_ LPCWSTR LocaleName
static _Must_inspect_result_ INT CompareLocaleNames(_In_ PCSTR AsciiLocaleName, _In_ PCUNICODE_STRING UnicodeLocaleName)
Definition: locale.c:613
const CHAR Locale[16]
Definition: locale.c:28
const char * PCSTR
Definition: typedefs.h:52

Referenced by RtlpLocaleNameToLcidInternal().

◆ IsNeutralLocale()

static BOOLEAN IsNeutralLocale ( _In_ LCID  Lcid)
static

Definition at line 719 of file locale.c.

721{
722 /* Check if the LCID is within the neutral locale range */
723 if (((Lcid <= MAX_PRIMARY_LANGUAGE) && (Lcid != LOCALE_INVARIANT)) ||
724 (Lcid == 0x0460) /* ks-Arab */ ||
725 ((Lcid & 0xFFFF) > MAX_BASIC_LCID))
726 {
727 return TRUE;
728 }
729
730 return FALSE;
731}
#define LOCALE_INVARIANT
#define MAX_PRIMARY_LANGUAGE
Definition: locale.c:18
#define MAX_BASIC_LCID
Definition: locale.c:19

Referenced by RtlLcidToLocaleName(), and RtlpLocaleNameToLcidInternal().

◆ LcidSortEntryCompare()

static int __cdecl LcidSortEntryCompare ( const void a,
const void b 
)
static

Definition at line 515 of file locale.c.

516{
517 PSORT_ENTRY SortEntryA = (PSORT_ENTRY)a;
518 PSORT_ENTRY SortEntryB = (PSORT_ENTRY)b;
519 return SortEntryA->Lcid - SortEntryB->Lcid;
520}
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
struct _SORT_ENTRY * PSORT_ENTRY
Definition: locale.c:509
LCID Lcid
Definition: locale.c:510

Referenced by RtlpInitializeLocaleTable().

◆ RtlConvertLCIDToString()

NTSTATUS NTAPI RtlConvertLCIDToString ( _In_ LCID  LcidValue,
_In_ ULONG  Base,
_In_ ULONG  Padding,
_Out_writes_(Size) PWSTR  pResultBuf,
_In_ ULONG  Size 
)

Definition at line 945 of file locale.c.

951{
954}
#define UNIMPLEMENTED
Definition: ntoskrnl.c:15
#define STATUS_NOT_IMPLEMENTED
Definition: d3dkmdt.h:42

◆ RtlIsValidLocaleName()

BOOLEAN NTAPI RtlIsValidLocaleName ( _In_ LPCWSTR  LocaleName,
_In_ ULONG  Flags 
)

Definition at line 935 of file locale.c.

938{
940 return TRUE;
941}

◆ RtlLcidToLocaleName()

NTSTATUS NTAPI RtlLcidToLocaleName ( _In_ LCID  Lcid,
_Inout_ PUNICODE_STRING  LocaleName,
_In_ ULONG  Flags,
_In_ BOOLEAN  AllocateDestinationString 
)

Definition at line 735 of file locale.c.

740{
741 ULONG LocaleIndex;
742
743 /* Check for invalid flags */
744 if (Flags & ~0x2)
745 {
746 DPRINT1("RtlLcidToLocaleName: Invalid flags: 0x%lx\n", Flags);
748 }
749
750 /* Check if the LocaleName buffer is valid */
751 if ((LocaleName == NULL) || (LocaleName->Buffer == NULL))
752 {
753 DPRINT1("RtlLcidToLocaleName: Invalid buffer\n");
755 }
756
757 /* Validate LCID */
759 {
760 DPRINT1("RtlLcidToLocaleName: Invalid LCID: 0x%lx\n", Lcid);
762 }
763
764 /* Check if neutral locales were requested */
765 if ((Flags & RTL_LOCALE_ALLOW_NEUTRAL_NAMES) == 0)
766 {
767 /* Check if this is a neutral locale */
769 {
770 DPRINT("RtlLcidToLocaleName: Neutral LCID: 0x%lx\n", Lcid);
772 }
773 }
774
775 /* Handle special LCIDs */
776 switch (Lcid)
777 {
780 break;
781
785 break;
786
788 return STATUS_UNSUCCESSFUL;
789 }
790
791 /* Try to find the locale by LCID */
792 LocaleIndex = FindIndexByLcid(Lcid);
793 if (LocaleIndex == MAXULONG)
794 {
795 DPRINT("RtlLcidToLocaleName: LCID 0x%lx not found\n", Lcid);
797 }
798
799 /* Copy the locale name to the buffer */
800 if (!CopyAsciizToUnicodeString(LocaleName, RtlpLocaleTable[LocaleIndex].Locale))
801 {
802 DPRINT("RtlLcidToLocaleName: Buffer too small\n");
804 }
805
806 return STATUS_SUCCESS;
807}
#define NULL
Definition: types.h:112
#define LOCALE_USER_DEFAULT
#define LOCALE_CUSTOM_DEFAULT
#define LOCALE_SYSTEM_DEFAULT
#define LOCALE_CUSTOM_UI_DEFAULT
#define NLS_VALID_LOCALE_MASK
#define STATUS_INVALID_PARAMETER_2
Definition: ntstatus.h:476
#define STATUS_INVALID_PARAMETER_1
Definition: ntstatus.h:475
#define STATUS_INVALID_PARAMETER_3
Definition: ntstatus.h:477
LCID RtlpUserDefaultLcid
Definition: locale.c:23
LCID RtlpSystemDefaultLcid
Definition: locale.c:24
static _Must_inspect_result_ ULONG FindIndexByLcid(_In_ LCID Lcid)
Definition: locale.c:571
static BOOLEAN IsNeutralLocale(_In_ LCID Lcid)
Definition: locale.c:719
static _Must_inspect_result_ BOOLEAN CopyAsciizToUnicodeString(_Inout_ PUNICODE_STRING UnicodeString, _In_ PCSTR AsciiString)
Definition: locale.c:692
#define STATUS_SUCCESS
Definition: shellext.h:65
#define STATUS_BUFFER_TOO_SMALL
Definition: shellext.h:69
#define DPRINT
Definition: sndvol32.h:73
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170

Referenced by _Success_().

◆ RtlLocaleNameToLcid()

NTSTATUS NTAPI RtlLocaleNameToLcid ( _In_ PCWSTR  LocaleName,
_Out_ PLCID  Lcid,
_In_ ULONG  Flags 
)

Definition at line 872 of file locale.c.

876{
877 UNICODE_STRING LocaleNameString;
878
879 /* Convert the string to a UNICODE_STRING */
880 RtlInitUnicodeString(&LocaleNameString, LocaleName);
881
882 /* Forward to internal function */
883 return RtlpLocaleNameToLcidInternal(&LocaleNameString, Lcid, Flags);
884}
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
static _Must_inspect_result_ NTSTATUS RtlpLocaleNameToLcidInternal(_In_ PCUNICODE_STRING LocaleName, _Out_ PLCID Lcid, _In_ ULONG Flags)
Definition: locale.c:812

◆ RtlpInitializeLocaleTable()

NTSTATUS NTAPI RtlpInitializeLocaleTable ( VOID  )

Definition at line 529 of file locale.c.

530{
531 PSORT_ENTRY SortTable;
532 SIZE_T SortTableSize;
533
536
537 SortTableSize = sizeof(SortTable[0]) * ARRAYSIZE(RtlpLocaleTable);
538 SortTable = RtlAllocateHeap(RtlGetProcessHeap(), 0, SortTableSize);
539 if (SortTable == NULL)
540 {
542 }
543
544 /* Copy the LCIDs and the index */
545 for (USHORT i = 0; i < ARRAYSIZE(RtlpLocaleTable); i++)
546 {
547 SortTable[i].Lcid = RtlpLocaleTable[i].Lcid;
548 SortTable[i].Index = i;
549 }
550
551 /* Sort the table by LCID */
552 qsort(SortTable,
554 sizeof(SortTable[0]),
556
557 /* Copy the sorted indices to the global table */
558 for (USHORT i = 0; i < ARRAYSIZE(RtlpLocaleTable); i++)
559 {
560 RtlpLocaleIndexTable[i] = SortTable[i].Index;
561 }
562
563 RtlFreeHeap(RtlGetProcessHeap(), 0, SortTable);
564
565 return STATUS_SUCCESS;
566}
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:616
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
Definition: heap.c:634
void __cdecl qsort(_Inout_updates_bytes_(_NumOfElements *_SizeOfElements) void *_Base, _In_ size_t _NumOfElements, _In_ size_t _SizeOfElements, _In_ int(__cdecl *_PtFuncCompare)(const void *, const void *))
NTSTATUS NTAPI NtQueryDefaultLocale(IN BOOLEAN UserProfile, OUT PLCID DefaultLocaleId)
Definition: locale.c:396
static int __cdecl LcidSortEntryCompare(const void *a, const void *b)
Definition: locale.c:515
USHORT Index
Definition: locale.c:511
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158

Referenced by LdrpInitializeProcess().

◆ RtlpLocaleNameToLcidInternal()

static _Must_inspect_result_ NTSTATUS RtlpLocaleNameToLcidInternal ( _In_ PCUNICODE_STRING  LocaleName,
_Out_ PLCID  Lcid,
_In_ ULONG  Flags 
)
static

Definition at line 812 of file locale.c.

816{
817 ULONG LocaleIndex;
818 LCID FoundLcid;
819
820 /* Check if LocaleName points to a valid unicode string */
821 if ((LocaleName == NULL) || (LocaleName->Buffer == NULL))
822 {
823 DPRINT1("RtlpLocaleNameToLcidInternal: Invalid buffer\n");
825 }
826
827 /* Check if the Lcid pointer is valid */
828 if (Lcid == NULL)
829 {
830 DPRINT1("RtlpLocaleNameToLcidInternal: Lcid is NULL\n");
832 }
833
834 /* Check for invalid flags */
835 if (Flags & ~0x3)
836 {
837 DPRINT1("RtlpLocaleNameToLcidInternal: Invalid flags: 0x%lx\n", Flags);
839 }
840
841 /* Try to find the locale */
842 LocaleIndex = FindIndexByLocaleName(LocaleName);
843 if (LocaleIndex == MAXULONG)
844 {
845 DPRINT("RtlpLocaleNameToLcidInternal: Locale name not found\n");
847 }
848
849 /* Extract the LCID without the flags */
850 FoundLcid = RtlpLocaleTable[LocaleIndex].Lcid & NLS_VALID_LOCALE_MASK;
851
852 /* Check if neutral locales were requested */
853 if ((Flags & RTL_LOCALE_ALLOW_NEUTRAL_NAMES) == 0)
854 {
855 /* Check if this is a neutral locale */
856 if (IsNeutralLocale(FoundLcid))
857 {
858 DPRINT("RtlpLocaleNameToLcidInternal: Neutral LCID: 0x%lx\n", FoundLcid);
860 }
861 }
862
863 /* Copy the LCID to the output buffer */
864 *Lcid = FoundLcid;
865
866 return STATUS_SUCCESS;
867}
static _Must_inspect_result_ ULONG FindIndexByLocaleName(_In_ PCUNICODE_STRING LocaleName)
Definition: locale.c:657

Referenced by RtlLocaleNameToLcid().

Variable Documentation

◆ RtlpLocaleIndexTable

USHORT RtlpLocaleIndexTable[_ARRAYSIZE(RtlpLocaleTable)]
static

Definition at line 506 of file locale.c.

Referenced by FindIndexByLcid(), and RtlpInitializeLocaleTable().

◆ RtlpLocaleTable

◆ RtlpSystemDefaultLcid

LCID RtlpSystemDefaultLcid

Definition at line 24 of file locale.c.

Referenced by RtlLcidToLocaleName(), and RtlpInitializeLocaleTable().

◆ RtlpUserDefaultLcid

LCID RtlpUserDefaultLcid

Definition at line 23 of file locale.c.

Referenced by RtlLcidToLocaleName(), and RtlpInitializeLocaleTable().