Datasheet

The C and C++ Libraries
4-32 Copyright © 1999-2001 ARM Limited. All rights reserved. ARM DUI 0067D
* - 0xc0-0xdf are uppercase chars except times sign at 0xd7
* - 0xe0-0xff are lowercase chars except divide sign at 0xf7 */
__C,__C,__C,__C,__C,__C,__C,__C, /* 0x80 - 0x87 */
__C,__C,__C,__C,__C,__C,__C,__C, /* 0x88 - 0x8f */
__C,__C,__C,__C,__C,__C,__C,__C, /* 0x90 - 0x97 */
__C,__C,__C,__C,__C,__C,__C,__C, /* 0x98 - 0x9f */
__B+__S,__P,__P,__P,__P,__P,__P,__P, /* 0xa0 - 0xa7 */
__P,__P,__P,__P,__P,__P,__P,__P, /* 0xa8 - 0xaf */
__P,__P,__P,__P,__P,__P,__P,__P, /* 0xb0 - 0xb7 */
__P,__P,__P,__P,__P,__P,__P,__P, /* 0xb8 - 0xbf */
__U,__U,__U,__U,__U,__U,__U,__U, /* 0xc0 - 0xc7 */
__U,__U,__U,__U,__U,__U,__U,__U, /* 0xc8 - 0xcf */
__U,__U,__U,__U,__U,__U,__U,__P, /* 0xd0 - 0xd7 */
__U,__U,__U,__U,__U,__U,__U,__U, /* 0xd8 - 0xdf */
__L,__L,__L,__L,__L,__L,__L,__L, /* 0xe0 - 0xe7 */
__L,__L,__L,__L,__L,__L,__L,__L, /* 0xe8 - 0xef */
__L,__L,__L,__L,__L,__L,__L,__P, /* 0xf0 - 0xf7 */
__L,__L,__L,__L,__L,__L,__L,__L, /* 0xf8 - 0xff */
};
_LC_INDEX_END(lcctype_dummy)
void const *_get_lc_ctype(void const *null, char const *name) {
return _findlocale(&lcctype_c_index, name);
}
void test_lc_ctype(void) {
EQS(setlocale(LC_CTYPE, NULL), "C"); /* verify starting point */
EQI(!!isalpha('@'), 0); /* test off-by-one */
EQI(!!isalpha('A'), 1);
EQI(!!isalpha('\xc1'), 0); /* C locale: isalpha(Aacute)==0 */
EQI(!setlocale(LC_CTYPE, "ISO8859-1"), 0); /* setlocale should work */
EQS(setlocale(LC_CTYPE, NULL), "ISO8859-1");
EQI(!!isalpha('@'), 0); /* test off-by-one */
EQI(!!isalpha('A'), 1);
EQI(!!isalpha('\xc1'), 1); /* ISO8859 locale: isalpha(Aacute)!=0
*/
EQI(!setlocale(LC_CTYPE, "C"), 0); /* setlocale should work */
EQS(setlocale(LC_CTYPE, NULL), "C");
EQI(!!isalpha('@'), 0); /* test off-by-one */
EQI(!!isalpha('A'), 1);
EQI(!!isalpha('\xc1'), 0); /* C locale: isalpha(Aacute)==0 */
}
4.6.5 _get_lc_collate()
_get_lc_collate()
must return a pointer to the 0th entry in an array of unsigned bytes
whose indexes range from 0 to 255 inclusive (256 bytes total).