4.6.16. __LC_NUMERIC_DEF

This macro is used to create blocks used when formatting numbers. The definition from rt_locale.h and sample code are shown in Example 4.13.

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.

Example 4.13. LC_NUMERIC_DEF

#define __LC_NUMERIC_DEF(sym,ln,dp,ts,gr) \
static const int sym##_index = ~3 & (3 + (sizeof(dp)+sizeof(ts)+sizeof(gr)+ \
20) + (~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 int sym##_start = 12; \
static const int sym##_tsoff = (sizeof(dp)+12); \
static const int sym##_groff = (sizeof(dp)+sizeof(ts)+12); \
static const char sym##_dptxt[] = dp; \
static const char sym##_tstxt[] = ts; \
static const char sym##_grtxt[] = gr;

Usage

See _get_lc_numeric(). See also __LC_CTYPE_DEF for details of the side-effects of compiler optimizations.

Copyright © 1999-2001 ARM Limited. All rights reserved.ARM DUI 0067D
Non-Confidential