Datasheet

The C and C++ Libraries
4-42 Copyright © 1999-2001 ARM Limited. All rights reserved. ARM DUI 0067D
If
category
is LC_ALL and the most recent successful locale-setting call uses a category
other than LC_ALL, a composite string might be returned. The string returned is such
that a subsequent call with that string and its associated category restores that part the
program locale. The string returned is not modified by the program, but might be
overwritten by a subsequent call to
setlocale()
.
4.6.12 _findlocale()
_findlocale()
searches the locale database and returns a pointer to the data block for the
requested category and locale.
Syntax
void const* _findlocale(void const* index, char const *name)
Returns
Returns a pointer to the requested data block.
4.6.13 __LC_CTYPE_DEF
This macro is used to create CTYPE blocks. The definitionfrom
rt_locale.h
and
sample code are shown in Example 4-9.
Example 4-9 LC_CTYPE_DEF
#define __LC_CTYPE_DEF(sym,ln) \
static const int sym##_index = ~3 & (3 + (268+(~3 & (3 + sizeof(ln))))); \
static const char sym##_lname[~3 & (3 + sizeof(ln))] = ln; \
static const int sym##_pname = -4-(~3 & (3 + sizeof(ln))); \
static const char sym##_start = 0; \
static const char sym##_table[256] =
For all the macros, the first two arguments are a symbol prefix and a locale name. The
resulting locale block is addressed by the expression
&symprefix_start
, and the index
entry by the expression
&symprefix_index
.
Usage
See _get_lc_ctype() on page 4-30.