diff options
author | marha <marha@users.sourceforge.net> | 2012-06-08 14:29:46 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-06-08 14:50:37 +0200 |
commit | 72ec0e3bb2d7fc6b77b2a75873792f781679da6a (patch) | |
tree | 0a736ab9a8c26276929ab077dc661e3625b54884 /libX11/src/xlibi18n/lcUniConv/cp1133.h | |
parent | 5e865910f0ce672295bd60460631339be5e311a0 (diff) | |
parent | 990bc3f015a4f8fce2eb918375defcd44980a845 (diff) | |
download | vcxsrv-72ec0e3bb2d7fc6b77b2a75873792f781679da6a.tar.gz vcxsrv-72ec0e3bb2d7fc6b77b2a75873792f781679da6a.tar.bz2 vcxsrv-72ec0e3bb2d7fc6b77b2a75873792f781679da6a.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
fontconfig/.gitignore
libX11/src/ConvSel.c
libX11/src/CrGlCur.c
libX11/src/CrWindow.c
libX11/src/GetDflt.c
libX11/src/Window.c
libX11/src/xlibi18n/XimProto.h
libX11/src/xlibi18n/lcDynamic.c
libxcb/src/.gitignore
libxcb/src/xcb_ext.c
libxcb/src/xcb_xid.c
mesalib/src/glsl/.gitignore
mesalib/src/glsl/glcpp/.gitignore
mesalib/src/mapi/glapi/gen/glX_API.xml
mesalib/src/mapi/glapi/glapi_getproc.c
mesalib/src/mesa/main/.gitignore
mesalib/src/mesa/main/syncobj.c
mesalib/src/mesa/program/.gitignore
xkbcomp/listing.c
xkbcomp/xkbpath.c
xorg-server/.gitignore
xorg-server/Xext/xvmain.c
xorg-server/dix/dispatch.c
xorg-server/hw/xwin/glx/winpriv.h
xorg-server/hw/xwin/winprefsyacc.y
xorg-server/hw/xwin/winscrinit.c
xorg-server/xkeyboard-config/rules/bin/ml1_s.sh
xorg-server/xkeyboard-config/rules/bin/ml1v1_s.sh
xorg-server/xkeyboard-config/rules/bin/ml1v_s.sh
xorg-server/xkeyboard-config/rules/bin/ml_s.sh
xorg-server/xkeyboard-config/rules/bin/mlv_s.sh
xorg-server/xkeyboard-config/rules/compat/.gitignore
Diffstat (limited to 'libX11/src/xlibi18n/lcUniConv/cp1133.h')
-rw-r--r-- | libX11/src/xlibi18n/lcUniConv/cp1133.h | 182 |
1 files changed, 91 insertions, 91 deletions
diff --git a/libX11/src/xlibi18n/lcUniConv/cp1133.h b/libX11/src/xlibi18n/lcUniConv/cp1133.h index cf79b7aa1..01e77392e 100644 --- a/libX11/src/xlibi18n/lcUniConv/cp1133.h +++ b/libX11/src/xlibi18n/lcUniConv/cp1133.h @@ -1,91 +1,91 @@ - -/* - * IBM-CP1133 - */ - -static const unsigned short cp1133_2uni_1[64] = { - /* 0xa0 */ - 0x00a0, 0x0e81, 0x0e82, 0x0e84, 0x0e87, 0x0e88, 0x0eaa, 0x0e8a, - 0x0e8d, 0x0e94, 0x0e95, 0x0e96, 0x0e97, 0x0e99, 0x0e9a, 0x0e9b, - /* 0xb0 */ - 0x0e9c, 0x0e9d, 0x0e9e, 0x0e9f, 0x0ea1, 0x0ea2, 0x0ea3, 0x0ea5, - 0x0ea7, 0x0eab, 0x0ead, 0x0eae, 0xfffd, 0xfffd, 0xfffd, 0x0eaf, - /* 0xc0 */ - 0x0eb0, 0x0eb2, 0x0eb3, 0x0eb4, 0x0eb5, 0x0eb6, 0x0eb7, 0x0eb8, - 0x0eb9, 0x0ebc, 0x0eb1, 0x0ebb, 0x0ebd, 0xfffd, 0xfffd, 0xfffd, - /* 0xd0 */ - 0x0ec0, 0x0ec1, 0x0ec2, 0x0ec3, 0x0ec4, 0x0ec8, 0x0ec9, 0x0eca, - 0x0ecb, 0x0ecc, 0x0ecd, 0x0ec6, 0xfffd, 0x0edc, 0x0edd, 0x20ad, -}; -static const unsigned short cp1133_2uni_2[16] = { - /* 0xf0 */ - 0x0ed0, 0x0ed1, 0x0ed2, 0x0ed3, 0x0ed4, 0x0ed5, 0x0ed6, 0x0ed7, - 0x0ed8, 0x0ed9, 0xfffd, 0xfffd, 0x00a2, 0x00ac, 0x00a6, 0xfffd, -}; - -static int -cp1133_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) -{ - unsigned char c = *s; - if (c < 0xa0) { - *pwc = (ucs4_t) c; - return 1; - } - else if (c < 0xe0) { - unsigned short wc = cp1133_2uni_1[c-0xa0]; - if (wc != 0xfffd) { - *pwc = (ucs4_t) wc; - return 1; - } - } - else if (c < 0xf0) { - } - else { - unsigned short wc = cp1133_2uni_2[c-0xf0]; - if (wc != 0xfffd) { - *pwc = (ucs4_t) wc; - return 1; - } - } - return RET_ILSEQ; -} - -static const unsigned char cp1133_page00[16] = { - 0xa0, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfe, 0x00, /* 0xa0-0xa7 */ - 0x00, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x00, 0x00, /* 0xa8-0xaf */ -}; -static const unsigned char cp1133_page0e[96] = { - 0x00, 0xa1, 0xa2, 0x00, 0xa3, 0x00, 0x00, 0xa4, /* 0x80-0x87 */ - 0xa5, 0x00, 0xa7, 0x00, 0x00, 0xa8, 0x00, 0x00, /* 0x88-0x8f */ - 0x00, 0x00, 0x00, 0x00, 0xa9, 0xaa, 0xab, 0xac, /* 0x90-0x97 */ - 0x00, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, /* 0x98-0x9f */ - 0x00, 0xb4, 0xb5, 0xb6, 0x00, 0xb7, 0x00, 0xb8, /* 0xa0-0xa7 */ - 0x00, 0x00, 0xa6, 0xb9, 0x00, 0xba, 0xbb, 0xbf, /* 0xa8-0xaf */ - 0xc0, 0xca, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, /* 0xb0-0xb7 */ - 0xc7, 0xc8, 0x00, 0xcb, 0xc9, 0xcc, 0x00, 0x00, /* 0xb8-0xbf */ - 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0x00, 0xdb, 0x00, /* 0xc0-0xc7 */ - 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0x00, 0x00, /* 0xc8-0xcf */ - 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, /* 0xd0-0xd7 */ - 0xf8, 0xf9, 0x00, 0x00, 0xdd, 0xde, 0x00, 0x00, /* 0xd8-0xdf */ -}; - -static int -cp1133_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) -{ - unsigned char c = 0; - if (wc < 0x00a0) { - *r = wc; - return 1; - } - else if (wc >= 0x00a0 && wc < 0x00b0) - c = cp1133_page00[wc-0x00a0]; - else if (wc >= 0x0e80 && wc < 0x0ee0) - c = cp1133_page0e[wc-0x0e80]; - else if (wc == 0x20ad) - c = 0xdf; - if (c != 0) { - *r = c; - return 1; - } - return RET_ILSEQ; -} +
+/*
+ * IBM-CP1133
+ */
+
+static const unsigned short cp1133_2uni_1[64] = {
+ /* 0xa0 */
+ 0x00a0, 0x0e81, 0x0e82, 0x0e84, 0x0e87, 0x0e88, 0x0eaa, 0x0e8a,
+ 0x0e8d, 0x0e94, 0x0e95, 0x0e96, 0x0e97, 0x0e99, 0x0e9a, 0x0e9b,
+ /* 0xb0 */
+ 0x0e9c, 0x0e9d, 0x0e9e, 0x0e9f, 0x0ea1, 0x0ea2, 0x0ea3, 0x0ea5,
+ 0x0ea7, 0x0eab, 0x0ead, 0x0eae, 0xfffd, 0xfffd, 0xfffd, 0x0eaf,
+ /* 0xc0 */
+ 0x0eb0, 0x0eb2, 0x0eb3, 0x0eb4, 0x0eb5, 0x0eb6, 0x0eb7, 0x0eb8,
+ 0x0eb9, 0x0ebc, 0x0eb1, 0x0ebb, 0x0ebd, 0xfffd, 0xfffd, 0xfffd,
+ /* 0xd0 */
+ 0x0ec0, 0x0ec1, 0x0ec2, 0x0ec3, 0x0ec4, 0x0ec8, 0x0ec9, 0x0eca,
+ 0x0ecb, 0x0ecc, 0x0ecd, 0x0ec6, 0xfffd, 0x0edc, 0x0edd, 0x20ad,
+};
+static const unsigned short cp1133_2uni_2[16] = {
+ /* 0xf0 */
+ 0x0ed0, 0x0ed1, 0x0ed2, 0x0ed3, 0x0ed4, 0x0ed5, 0x0ed6, 0x0ed7,
+ 0x0ed8, 0x0ed9, 0xfffd, 0xfffd, 0x00a2, 0x00ac, 0x00a6, 0xfffd,
+};
+
+static int
+cp1133_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
+{
+ unsigned char c = *s;
+ if (c < 0xa0) {
+ *pwc = (ucs4_t) c;
+ return 1;
+ }
+ else if (c < 0xe0) {
+ unsigned short wc = cp1133_2uni_1[c-0xa0];
+ if (wc != 0xfffd) {
+ *pwc = (ucs4_t) wc;
+ return 1;
+ }
+ }
+ else if (c < 0xf0) {
+ }
+ else {
+ unsigned short wc = cp1133_2uni_2[c-0xf0];
+ if (wc != 0xfffd) {
+ *pwc = (ucs4_t) wc;
+ return 1;
+ }
+ }
+ return RET_ILSEQ;
+}
+
+static const unsigned char cp1133_page00[16] = {
+ 0xa0, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfe, 0x00, /* 0xa0-0xa7 */
+ 0x00, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x00, 0x00, /* 0xa8-0xaf */
+};
+static const unsigned char cp1133_page0e[96] = {
+ 0x00, 0xa1, 0xa2, 0x00, 0xa3, 0x00, 0x00, 0xa4, /* 0x80-0x87 */
+ 0xa5, 0x00, 0xa7, 0x00, 0x00, 0xa8, 0x00, 0x00, /* 0x88-0x8f */
+ 0x00, 0x00, 0x00, 0x00, 0xa9, 0xaa, 0xab, 0xac, /* 0x90-0x97 */
+ 0x00, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, /* 0x98-0x9f */
+ 0x00, 0xb4, 0xb5, 0xb6, 0x00, 0xb7, 0x00, 0xb8, /* 0xa0-0xa7 */
+ 0x00, 0x00, 0xa6, 0xb9, 0x00, 0xba, 0xbb, 0xbf, /* 0xa8-0xaf */
+ 0xc0, 0xca, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, /* 0xb0-0xb7 */
+ 0xc7, 0xc8, 0x00, 0xcb, 0xc9, 0xcc, 0x00, 0x00, /* 0xb8-0xbf */
+ 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0x00, 0xdb, 0x00, /* 0xc0-0xc7 */
+ 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0x00, 0x00, /* 0xc8-0xcf */
+ 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, /* 0xd0-0xd7 */
+ 0xf8, 0xf9, 0x00, 0x00, 0xdd, 0xde, 0x00, 0x00, /* 0xd8-0xdf */
+};
+
+static int
+cp1133_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
+{
+ unsigned char c = 0;
+ if (wc < 0x00a0) {
+ *r = wc;
+ return 1;
+ }
+ else if (wc >= 0x00a0 && wc < 0x00b0)
+ c = cp1133_page00[wc-0x00a0];
+ else if (wc >= 0x0e80 && wc < 0x0ee0)
+ c = cp1133_page0e[wc-0x0e80];
+ else if (wc == 0x20ad)
+ c = 0xdf;
+ if (c != 0) {
+ *r = c;
+ return 1;
+ }
+ return RET_ILSEQ;
+}
|