Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2010-02-06 21:28:33 +0300
committerCorinna Vinschen <corinna@vinschen.de>2010-02-06 21:28:33 +0300
commit5eb556c8497ddd680c28e53e04c4badfe612004a (patch)
treea9d05f6982f2d8cf3b670e1e0d00655d8eaeea99 /newlib/libc/ctype
parent38d9821daf5c631d2c8f12bc772961973edaba0c (diff)
* libc/ctype/ctype_cp.h (_CTYPE_GEORGIAN_PS_128_254): Define.
(_CTYPE_GEORGIAN_PS_255): Define. (_CTYPE_PT154_128_254): Define. (_CTYPE_PT154_255): Define. (__ctype_cp): Add array members for above ctype definitions. * libc/locale/locale.c (loadlocale): Make TIS-620 charset name available for all targets. Add guards for setting the conversion function pointers. Add support for GEORGIAN-PS and PT154 charsets. Change documentation to reflect current behaviour more closely. * libc/locale/nl_langinfo.c (nl_langinfo): On Cygwin, translate "CP101" to "GEORGIAN-PS" and "CP102" to "PT154". * libc/stdlib/sb_charsets.c (__cp_conv): Add conversion arrays for GEORGIAN-PS and PT154. (__cp_index): Map invalid Windows codepage number 101 to GEORGIAN-PS conversion array, 102 to PT154 conversion array.
Diffstat (limited to 'newlib/libc/ctype')
-rw-r--r--newlib/libc/ctype/ctype_cp.h62
1 files changed, 60 insertions, 2 deletions
diff --git a/newlib/libc/ctype/ctype_cp.h b/newlib/libc/ctype/ctype_cp.h
index 40ecd206b..7ce0ab33d 100644
--- a/newlib/libc/ctype/ctype_cp.h
+++ b/newlib/libc/ctype/ctype_cp.h
@@ -433,6 +433,42 @@
_U, _U, _U, _U, _U, _U, _U, _U, \
_U, _U, _U, _U, _U, _U, _U
#define _CTYPE_CP21866_255 _U
+#define _CTYPE_GEORGIAN_PS_128_254 \
+ _P, 0, _P, _L, _P, _P, _P, _P, \
+ _P, _P, _U, _P, _U, _U, 0, 0, \
+ 0, _P, _P, _P, _P, _P, _P, _P, \
+ _P, _P, _L, _P, _L, 0, _L, _U, \
+ _S|_B, _P, _P, _P, _P, _P, _P, _P, \
+ _P, _P, _P, _P, _P, _P, _P, _P, \
+ _P, _P, _P, _P, _P, _P, _P, _P, \
+ _P, _P, _P, _P, _P, _P, _P, _P, \
+ _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, \
+ _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, \
+ _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, \
+ _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, \
+ _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _L, _L, \
+ _L, _L, _L, _L, _L, _L, _L, _L, \
+ _L, _L, _L, _L, _L, _L, _L, _P, \
+ _L, _L, _L, _L, _L, _L, _L
+#define _CTYPE_GEORGIAN_PS_255 _L
+#define _CTYPE_PT154_128_254 \
+ _U, _U, _U, _L, _P, _P, _U, _U, \
+ _U, _L, _U, _U, _U, _U, _U, _U, \
+ _L, _P, _P, _P, _P, _P, _P, _P, \
+ _L, _L, _L, _L, _L, _L, _L, _L, \
+ _S|_B, _U, _L, _U, _U, _U, _U, _P, \
+ _U, _P, _U, _P, _P, _L, _P, _U, \
+ _P, _L, _U, _L, _L, _L, _P, _P, \
+ _L, _P, _L, _P, _L, _U, _L, _L, \
+ _U, _U, _U, _U, _U, _U, _U, _U, \
+ _U, _U, _U, _U, _U, _U, _U, _U, \
+ _U, _U, _U, _U, _U, _U, _U, _U, \
+ _U, _U, _U, _U, _U, _U, _U, _U, \
+ _L, _L, _L, _L, _L, _L, _L, _L, \
+ _L, _L, _L, _L, _L, _L, _L, _L, \
+ _L, _L, _L, _L, _L, _L, _L, _L, \
+ _L, _L, _L, _L, _L, _L, _L
+#define _CTYPE_PT154_255 _L
extern int __cp_index (const char *charset_ext);
@@ -442,7 +478,7 @@ extern int __cp_index (const char *charset_ext);
#ifndef __CYGWIN__
static _CONST
#endif
-char __ctype_cp[24][128 + 256] = {
+char __ctype_cp[26][128 + 256] = {
{ _CTYPE_CP437_128_254,
0,
_CTYPE_DATA_0_127,
@@ -587,11 +623,23 @@ char __ctype_cp[24][128 + 256] = {
_CTYPE_CP21866_128_254,
_CTYPE_CP21866_255
},
+ { _CTYPE_GEORGIAN_PS_128_254,
+ 0,
+ _CTYPE_DATA_0_127,
+ _CTYPE_GEORGIAN_PS_128_254,
+ _CTYPE_GEORGIAN_PS_255
+ },
+ { _CTYPE_PT154_128_254,
+ 0,
+ _CTYPE_DATA_0_127,
+ _CTYPE_PT154_128_254,
+ _CTYPE_PT154_255
+ },
};
#else /* !defined(ALLOW_NEGATIVE_CTYPE_INDEX) */
-static _CONST char __ctype_cp[22][1 + 256] = {
+static _CONST char __ctype_cp[26][1 + 256] = {
{ 0,
_CTYPE_DATA_0_127,
_CTYPE_CP437_128_254,
@@ -712,6 +760,16 @@ static _CONST char __ctype_cp[22][1 + 256] = {
_CTYPE_CP21866_128_254,
_CTYPE_CP21866_255
},
+ { 0,
+ _CTYPE_DATA_0_127,
+ _CTYPE_GEORGIAN_PS_128_254,
+ _CTYPE_GEORGIAN_PS_255
+ },
+ { 0,
+ _CTYPE_DATA_0_127,
+ _CTYPE_PT154_128_254,
+ _CTYPE_PT154_255
+ },
};
#endif /* ALLOW_NEGATIVE_CTYPE_INDEX */