Datasheet

The C and C++ Libraries
4-30 Copyright © 1999-2001 ARM Limited. All rights reserved. ARM DUI 0067D
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))
4.6.4 _get_lc_ctype()
The ctype implementation is selected at link time to be either:
The C locale only. This is the default.
The ISO 8859 (Latin-1) locale.
You can define your own ctype attribute table with the following characteristics:
It must be read-only.
It is a byte array with indexes ranging from –1 to 255 inclusive (257 bytes in total)
Each byte is interpreted as eight attribute bits. The values are defined in
ctype.h
as follows:
__S white-space characters
__P punctuation characters
__B blank characters
__L lowercase letters
__U uppercase letters
__N decimal digits
__C control characters
__X hexadecimal-digit letters A-F and a-f.
The first element in the array, the element located at –1, must be zero. A skeletal
implementation of the functions that return CTYPE data is shown in Example 4-3.
Example 4-3 LC_CTYPE_DEF Table
__LC_CTYPE_DEF(lcctype_c, "C")
{
__C, __C, __C, __C, __C, __C, __C, __C, __C, /* 0x00-0x08 */
__C+__S,__C+__S,__C+__S,__C+__S,__C+__S, /* 0x09-0x0D (BS,LF,VT,FF,CR) */