4.6.3. Macros and utility functions

The macros and utility functions listed in Table 4.8 simplify the process of creating and using locale blocks. See the rt_locale.h file for more information.

Table 4.8. locale macros

Function or macroDescription
__LC_CTYPE_DEFUse this macro to create a block of values for the character set. See _get_lc_ctype().
__LC_COLLATE_DEFUse this macro to create a block of sorting values for the character set. See _get_lc_collate().
__LC_TIME_DEFUse this macro to create a block of time formatting values. See _get_lc_time().
__LC_NUMERIC_DEFUse this macro to create a block of numeric formatting values. See _get_lc_numeric().
__LC_MONETARY_DEFUse this macro to create a block of monetary formatting values. See _get_lc_monetary().
__LC_INDEX_ENDUse this macro to declare the end of an index of formatting values. See Using the macros.
_findlocale()Use this function to return the address of a locale block. See _findlocale().

Using the macros

The data blocks for a single locale category must be contiguous and the LC_INDEX_END macro must be the last macro in the sequence.

The examples in each locale category use two test macros that are defined as:

#define EQI(i,j) assert(i==j)
#define EQS(s,t) assert(!strcmp(s,t))
Copyright © 1999-2001 ARM Limited. All rights reserved.ARM DUI 0067D
Non-Confidential