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:
authorJeff Johnston <jjohnstn@redhat.com>2009-08-25 02:11:11 +0400
committerJeff Johnston <jjohnstn@redhat.com>2009-08-25 02:11:11 +0400
commit162a23c5049fc63373543f6edd60713d52530e4b (patch)
tree2a7597197d9444c71739774bcc251b75cd816243 /newlib/libc/ctype
parentce1831cb4e9b20b9042d9def8eeb3c8ceb0e6a1a (diff)
2009-08-24 Corinna Vinschen <corinna@vinschen.de>
* libc/locale/locale.c: Update documentation. (loadlocale): Map "KOI8-R" and "KOI8-U" to CP20866 and CP21866. 2009-08-24 Andy Koppe <andy.koppe@gmail.com> * libc/stdlib/sb_charsets.c (__cp_conv): Add KOI8-R (Russian, CP20866) and KOI8-U (Ukrainian, CP21866) to Windows codepage conversion tables. * libc/ctype/ctype_cp.h (__ctype_cp): Likewise for ctype tables.
Diffstat (limited to 'newlib/libc/ctype')
-rw-r--r--newlib/libc/ctype/ctype_cp.h61
1 files changed, 60 insertions, 1 deletions
diff --git a/newlib/libc/ctype/ctype_cp.h b/newlib/libc/ctype/ctype_cp.h
index 62057461f..40ecd206b 100644
--- a/newlib/libc/ctype/ctype_cp.h
+++ b/newlib/libc/ctype/ctype_cp.h
@@ -397,6 +397,43 @@
_L, _L, _P, _L, _L, _L, _L, _P, \
_L, _L, _L, _L, _L, _L, _P
#define _CTYPE_CP1258_255 _L
+#define _CTYPE_CP20866_128_254 \
+ _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, _S|_B, _P, _P, _P, _P, _P, \
+ _P, _P, _P, _L, _P, _P, _P, _P, \
+ _P, _P, _P, _P, _P, _P, _P, _P, \
+ _P, _P, _P, _U, _P, _P, _P, _P, \
+ _P, _P, _P, _P, _P, _P, _P, _P, \
+ _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, _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
+#define _CTYPE_CP20866_255 _U
+#define _CTYPE_CP21866_128_254 \
+ _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, _S|_B, _P, _P, _P, _P, _P, \
+ _P, _P, _P, _L, _L, _P, _L, _L, \
+ _P, _P, _P, _P, _P, _L, _P, _P, \
+ _P, _P, _P, _U, _U, _P, _U, _U, \
+ _P, _P, _P, _P, _P, _U, _P, _P, \
+ _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, _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
+#define _CTYPE_CP21866_255 _U
+
extern int __cp_index (const char *charset_ext);
@@ -405,7 +442,7 @@ extern int __cp_index (const char *charset_ext);
#ifndef __CYGWIN__
static _CONST
#endif
-char __ctype_cp[22][128 + 256] = {
+char __ctype_cp[24][128 + 256] = {
{ _CTYPE_CP437_128_254,
0,
_CTYPE_DATA_0_127,
@@ -538,6 +575,18 @@ char __ctype_cp[22][128 + 256] = {
_CTYPE_CP1258_128_254,
_CTYPE_CP1258_255
},
+ { _CTYPE_CP20866_128_254,
+ 0,
+ _CTYPE_DATA_0_127,
+ _CTYPE_CP20866_128_254,
+ _CTYPE_CP20866_255
+ },
+ { _CTYPE_CP21866_128_254,
+ 0,
+ _CTYPE_DATA_0_127,
+ _CTYPE_CP21866_128_254,
+ _CTYPE_CP21866_255
+ },
};
#else /* !defined(ALLOW_NEGATIVE_CTYPE_INDEX) */
@@ -653,6 +702,16 @@ static _CONST char __ctype_cp[22][1 + 256] = {
_CTYPE_CP1258_128_254,
_CTYPE_CP1258_255
},
+ { 0,
+ _CTYPE_DATA_0_127,
+ _CTYPE_CP20866_128_254,
+ _CTYPE_CP20866_255
+ },
+ { 0,
+ _CTYPE_DATA_0_127,
+ _CTYPE_CP21866_128_254,
+ _CTYPE_CP21866_255
+ },
};
#endif /* ALLOW_NEGATIVE_CTYPE_INDEX */