Commit b4571a8f authored by Ulrich Sibiller's avatar Ulrich Sibiller

update lcUniConv subdir to libX11 1.3.4

parent 687d44b6
...@@ -206,11 +206,13 @@ typedef struct { ...@@ -206,11 +206,13 @@ typedef struct {
} Summary16; } Summary16;
#include "lcUniConv/gb2312.h" #include "lcUniConv/gb2312.h"
#include "lcUniConv/gbk.h"
#include "lcUniConv/jisx0208.h" #include "lcUniConv/jisx0208.h"
#include "lcUniConv/jisx0212.h" #include "lcUniConv/jisx0212.h"
#include "lcUniConv/ksc5601.h" #include "lcUniConv/ksc5601.h"
#include "lcUniConv/big5.h" #include "lcUniConv/big5.h"
#include "lcUniConv/big5_emacs.h" #include "lcUniConv/big5_emacs.h"
#include "lcUniConv/big5hkscs.h"
static Utf8ConvRec all_charsets[] = { static Utf8ConvRec all_charsets[] = {
/* The ISO10646-1/UTF-8 entry occurs twice, once at the beginning /* The ISO10646-1/UTF-8 entry occurs twice, once at the beginning
......
/* $XFree86$ */
/* /*
* ASCII * ASCII
......
/* $XFree86$ */
/* /*
* BIG5-0 and BIG5-1 * BIG5-0 and BIG5-1
......
This source diff could not be displayed because it is too large. You can view the blob instead.
/* $XFree86$ */
/* /*
* Generates a CJK character set table from a .TXT table as found on * Generates a CJK character set table from a .TXT table as found on
...@@ -18,6 +17,8 @@ ...@@ -18,6 +17,8 @@
* ./cjk_tab_to_h BIG5 big5 > big5.h < BIG5.TXT * ./cjk_tab_to_h BIG5 big5 > big5.h < BIG5.TXT
* *
* ./cjk_tab_to_h JOHAB johab > johab.h < JOHAB.TXT * ./cjk_tab_to_h JOHAB johab > johab.h < JOHAB.TXT
*
* ./cjk_tab_to_h BIG5HKSCS-0 big5hkscs >big5hkscs.h < BIG5HKSCS.TXT
*/ */
#include <stdio.h> #include <stdio.h>
...@@ -892,6 +893,49 @@ static void do_big5 (const char* name) ...@@ -892,6 +893,49 @@ static void do_big5 (const char* name)
invert(&enc); output_uni2charset_sparse(name,&enc); invert(&enc); output_uni2charset_sparse(name,&enc);
} }
/* Big5-HKSCS specifics */
static int row_byte_big5hkscs (int row) {
return 0x81+row;
}
static int col_byte_big5hkscs (int col) {
return (col >= 0x3f ? 0x62 : 0x40) + col;
}
static int byte_row_big5hkscs (int byte) {
if (byte >= 0x81 && byte < 0xff)
return byte-0x81;
else
return -1;
}
static int byte_col_big5hkscs (int byte) {
if (byte >= 0x40 && byte < 0x7f)
return byte-0x40;
else if (byte >= 0xa1 && byte < 0xff)
return byte-0x62;
else
return -1;
}
static void do_big5hkscs (const char* name)
{
Encoding enc;
enc.rows = 126;
enc.cols = 157;
enc.row_byte = row_byte_big5hkscs;
enc.col_byte = col_byte_big5hkscs;
enc.byte_row = byte_row_big5hkscs;
enc.byte_col = byte_col_big5hkscs;
enc.check_row_expr = "%1$s >= 0x81 && %1$s < 0xff";
enc.check_col_expr = "(%1$s >= 0x40 && %1$s < 0x7f) || (%1$s >= 0xa1 && %1$s < 0xff)";
enc.byte_row_expr = "%1$s - 0x81";
enc.byte_col_expr = "%1$s - (%1$s >= 0xa1 ? 0x62 : 0x40)";
read_table(&enc);
output_charset2uni(name,&enc);
invert(&enc); output_uni2charset_sparse(name,&enc);
}
/* Johab Hangul specifics */ /* Johab Hangul specifics */
static int row_byte_johab_hangul (int row) { static int row_byte_johab_hangul (int row) {
...@@ -1014,6 +1058,8 @@ int main (int argc, char *argv[]) ...@@ -1014,6 +1058,8 @@ int main (int argc, char *argv[])
do_ksc5601(name); do_ksc5601(name);
else if (!strcmp(name,"big5") || !strcmp(name,"cp950ext")) else if (!strcmp(name,"big5") || !strcmp(name,"cp950ext"))
do_big5(name); do_big5(name);
else if (!strcmp(name,"big5hkscs"))
do_big5hkscs(name);
else if (!strcmp(name,"johab_hangul")) else if (!strcmp(name,"johab_hangul"))
do_johab_hangul(name); do_johab_hangul(name);
else if (!strcmp(name,"cp932ext")) else if (!strcmp(name,"cp932ext"))
......
/* $XFree86$ */
/* /*
* IBM-CP1133 * IBM-CP1133
......
/* $XFree86$ */
/* /*
* CP1251 * CP1251
......
/* $XFree86$ */
/* /*
* CP1255 * CP1255
......
/* $XFree86$ */
/* /*
* CP1256 * CP1256
......
This source diff could not be displayed because it is too large. You can view the blob instead.
/* $XFree86$ */
/* /*
* GEORGIAN-ACADEMY * GEORGIAN-ACADEMY
......
/* $XFree86$ */
/* /*
* GEORGIAN-PS * GEORGIAN-PS
......
/* $XFree86$ */
/* /*
* ISO-8859-1 * ISO-8859-1
......
/* $XFree86$ */
/* /*
* ISO-8859-10 * ISO-8859-10
......
/* $XFree86$ */
/* /*
* ISO-8859-14 * ISO-8859-14
......
/* $XFree86$ */
/* /*
* ISO-8859-15 * ISO-8859-15
......
/* $XFree86$ */
/* /*
* ISO-8859-2 * ISO-8859-2
......
/* $XFree86$ */
/* /*
* ISO-8859-3 * ISO-8859-3
......
/* $XFree86$ */
/* /*
* ISO-8859-4 * ISO-8859-4
......
/* $XFree86$ */
/* /*
* ISO-8859-5 * ISO-8859-5
......
/* $XFree86$ */
/* /*
* ISO-8859-6 * ISO-8859-6
......
/* $XFree86$ */
/* /*
* ISO-8859-7 * ISO-8859-7
......
/* $XFree86$ */
/* /*
* ISO-8859-8 * ISO-8859-8
......
/* $XFree86$ */
/* /*
* ISO-8859-9 * ISO-8859-9
......
/* $XFree86$ */
/* /*
* JISX0201.1976-0 * JISX0201.1976-0
......
/* $XFree86$ */
/* /*
* KOI8-R * KOI8-R
......
/* $XFree86$ */
/* /*
* KOI8-U * KOI8-U
......
...@@ -2967,17 +2967,17 @@ ksc5601_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) ...@@ -2967,17 +2967,17 @@ ksc5601_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
const Summary16 *summary = NULL; const Summary16 *summary = NULL;
if (wc < 0x0460) if (wc < 0x0460)
summary = &ksc5601_uni2indx_page00[(wc>>4)]; summary = &ksc5601_uni2indx_page00[(wc>>4)];
else if (wc >= 0x2000 && wc < 0x2670) else if (wc >= 0x2000 && wc < 0x2670) /* General Punctuation (2000, 206F) */
summary = &ksc5601_uni2indx_page20[(wc>>4)-0x200]; summary = &ksc5601_uni2indx_page20[(wc>>4)-0x200];
else if (wc >= 0x3000 && wc < 0x33e0) else if (wc >= 0x3000 && wc < 0x33e0) /* CJK Symbols and Punctuation (3000, 303F) */
summary = &ksc5601_uni2indx_page30[(wc>>4)-0x300]; summary = &ksc5601_uni2indx_page30[(wc>>4)-0x300];
else if (wc >= 0x4e00 && wc < 0x9fa0) else if (wc >= 0x4e00 && wc < 0x9fa0) /* CJK Unified Ideographs (4E00, 9FFF) */
summary = &ksc5601_uni2indx_page4e[(wc>>4)-0x4e0]; summary = &ksc5601_uni2indx_page4e[(wc>>4)-0x4e0];
else if (wc >= 0xac00 && wc < 0xd7a0) else if (wc >= 0xac00 && wc < 0xd7a0) /* Hangul Syllables (AC00, D7AF) 11183 */
summary = &ksc5601_uni2indx_pageac[(wc>>4)-0xac0]; summary = &ksc5601_uni2indx_pageac[(wc>>4)-0xac0];
else if (wc >= 0xf900 && wc < 0xfa10) else if (wc >= 0xf900 && wc < 0xfa10) /* CJK Compatibility Ideographs (F900, FAFF) */
summary = &ksc5601_uni2indx_pagef9[(wc>>4)-0xf90]; summary = &ksc5601_uni2indx_pagef9[(wc>>4)-0xf90];
else if (wc >= 0xff00 && wc < 0xfff0) else if (wc >= 0xff00 && wc < 0xfff0) /* Halfwidth and Fullwidth Forms (FF00, FFEF) */
summary = &ksc5601_uni2indx_pageff[(wc>>4)-0xff0]; summary = &ksc5601_uni2indx_pageff[(wc>>4)-0xff0];
if (summary) { if (summary) {
unsigned short used = summary->used; unsigned short used = summary->used;
......
/* $XFree86$ */
/* /*
* MULELAO-1 * MULELAO-1
......
/* $XFree86$ */
/* /*
* TCVN-5712 * TCVN-5712
......
/* /*
* UCS-2BE = UCS-2 big endian * UCS-2BE = UCS-2 big endian
*/ */
/* $XFree86$ */
static int static int
ucs2be_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) ucs2be_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
......
/* $XFree86$ */
/* /*
* VISCII1.1-1 * VISCII1.1-1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment