Lisp_Object Vcharset_chinese_cns11643_2;
#ifdef UTF2000
Lisp_Object Vcharset_ucs_bmp;
+Lisp_Object Vcharset_latin_viscii;
Lisp_Object Vcharset_latin_viscii_lower;
Lisp_Object Vcharset_latin_viscii_upper;
+Lisp_Object Vcharset_ideograph_daikanwa;
+Lisp_Object Vcharset_ethiopic_ucs;
#endif
Lisp_Object Vcharset_chinese_big5_1;
Lisp_Object Vcharset_chinese_big5_2;
#endif
#ifdef UTF2000
-Emchar_to_byte_table*
-make_byte_from_character_table ()
+
+static Lisp_Object
+mark_char_byte_table (Lisp_Object obj, void (*markobj) (Lisp_Object))
{
- Emchar_to_byte_table* table
- = (Emchar_to_byte_table*) xmalloc (sizeof (Emchar_to_byte_table));
+ struct Lisp_Char_Byte_Table *cte = XCHAR_BYTE_TABLE (obj);
+ int i;
- table->base = NULL;
- return table;
+ for (i = 0; i < 256; i++)
+ {
+ markobj (cte->property[i]);
+ }
+ return Qnil;
}
-void
-put_byte_from_character_table (Emchar ch, unsigned char val,
- Emchar_to_byte_table* table)
+static int
+char_byte_table_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
+{
+ struct Lisp_Char_Byte_Table *cte1 = XCHAR_BYTE_TABLE (obj1);
+ struct Lisp_Char_Byte_Table *cte2 = XCHAR_BYTE_TABLE (obj2);
+ int i;
+
+ for (i = 0; i < 256; i++)
+ if (CHAR_BYTE_TABLE_P (cte1->property[i]))
+ {
+ if (CHAR_BYTE_TABLE_P (cte2->property[i]))
+ {
+ if (!char_byte_table_equal (cte1->property[i],
+ cte2->property[i], depth + 1))
+ return 0;
+ }
+ else
+ return 0;
+ }
+ else
+ if (!internal_equal (cte1->property[i], cte2->property[i], depth + 1))
+ return 0;
+ return 1;
+}
+
+static unsigned long
+char_byte_table_hash (Lisp_Object obj, int depth)
+{
+ struct Lisp_Char_Byte_Table *cte = XCHAR_BYTE_TABLE (obj);
+
+ return internal_array_hash (cte->property, 256, depth);
+}
+
+static const struct lrecord_description char_byte_table_description[] = {
+ { XD_LISP_OBJECT, offsetof(struct Lisp_Char_Byte_Table, property), 256 },
+ { XD_END }
+};
+
+DEFINE_LRECORD_IMPLEMENTATION ("char-byte-table", char_byte_table,
+ mark_char_byte_table,
+ internal_object_printer,
+ 0, char_byte_table_equal,
+ char_byte_table_hash,
+ char_byte_table_description,
+ struct Lisp_Char_Byte_Table);
+
+static Lisp_Object
+make_char_byte_table (Lisp_Object initval)
{
- if (table->base == NULL)
+ Lisp_Object obj;
+ int i;
+ struct Lisp_Char_Byte_Table *cte =
+ alloc_lcrecord_type (struct Lisp_Char_Byte_Table,
+ &lrecord_char_byte_table);
+
+ for (i = 0; i < 256; i++)
+ cte->property[i] = initval;
+
+ XSETCHAR_BYTE_TABLE (obj, cte);
+ return obj;
+}
+
+static Lisp_Object
+copy_char_byte_table (Lisp_Object entry)
+{
+ struct Lisp_Char_Byte_Table *cte = XCHAR_BYTE_TABLE (entry);
+ Lisp_Object obj;
+ int i;
+ struct Lisp_Char_Byte_Table *ctenew =
+ alloc_lcrecord_type (struct Lisp_Char_Byte_Table,
+ &lrecord_char_byte_table);
+
+ for (i = 0; i < 256; i++)
{
- table->base = xmalloc (128);
- table->offset = ch - (ch % 128);
- table->size = 128;
- table->base[ch - table->offset] = val;
+ Lisp_Object new = cte->property[i];
+ if (CHAR_BYTE_TABLE_P (new))
+ ctenew->property[i] = copy_char_byte_table (new);
+ else
+ ctenew->property[i] = new;
}
+
+ XSETCHAR_BYTE_TABLE (obj, ctenew);
+ return obj;
+}
+
+
+static Lisp_Object
+mark_char_code_table (Lisp_Object obj, void (*markobj) (Lisp_Object))
+{
+ struct Lisp_Char_Code_Table *cte = XCHAR_CODE_TABLE (obj);
+
+ return cte->table;
+}
+
+static int
+char_code_table_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
+{
+ struct Lisp_Char_Code_Table *cte1 = XCHAR_CODE_TABLE (obj1);
+ struct Lisp_Char_Code_Table *cte2 = XCHAR_CODE_TABLE (obj2);
+
+ return char_byte_table_equal (cte1->table, cte2->table, depth + 1);
+}
+
+static unsigned long
+char_code_table_hash (Lisp_Object obj, int depth)
+{
+ struct Lisp_Char_Code_Table *cte = XCHAR_CODE_TABLE (obj);
+
+ return char_code_table_hash (cte->table, depth + 1);
+}
+
+static const struct lrecord_description char_code_table_description[] = {
+ { XD_LISP_OBJECT, offsetof(struct Lisp_Char_Code_Table, table), 1 },
+ { XD_END }
+};
+
+DEFINE_LRECORD_IMPLEMENTATION ("char-code-table", char_code_table,
+ mark_char_code_table,
+ internal_object_printer,
+ 0, char_code_table_equal,
+ char_code_table_hash,
+ char_code_table_description,
+ struct Lisp_Char_Code_Table);
+
+static Lisp_Object
+make_char_code_table (Lisp_Object initval)
+{
+ Lisp_Object obj;
+ struct Lisp_Char_Code_Table *cte =
+ alloc_lcrecord_type (struct Lisp_Char_Code_Table,
+ &lrecord_char_code_table);
+
+ cte->table = make_char_byte_table (initval);
+
+ XSETCHAR_CODE_TABLE (obj, cte);
+ return obj;
+}
+
+static Lisp_Object
+copy_char_code_table (Lisp_Object entry)
+{
+ struct Lisp_Char_Code_Table *cte = XCHAR_CODE_TABLE (entry);
+ Lisp_Object obj;
+ struct Lisp_Char_Code_Table *ctenew =
+ alloc_lcrecord_type (struct Lisp_Char_Code_Table,
+ &lrecord_char_code_table);
+
+ ctenew->table = copy_char_byte_table (cte->table);
+ XSETCHAR_CODE_TABLE (obj, ctenew);
+ return obj;
+}
+
+
+Lisp_Object
+get_char_code_table (Emchar ch, Lisp_Object table)
+{
+ unsigned int code = ch;
+ struct Lisp_Char_Byte_Table* cpt
+ = XCHAR_BYTE_TABLE (XCHAR_CODE_TABLE (table)->table);
+ Lisp_Object ret = cpt->property [(unsigned char)(code >> 24)];
+
+ if (CHAR_BYTE_TABLE_P (ret))
+ cpt = XCHAR_BYTE_TABLE (ret);
else
- {
- int i = ch - table->offset;
+ return ret;
+
+ ret = cpt->property [(unsigned char) (code >> 16)];
+ if (CHAR_BYTE_TABLE_P (ret))
+ cpt = XCHAR_BYTE_TABLE (ret);
+ else
+ return ret;
- if (i < 0)
+ ret = cpt->property [(unsigned char) (code >> 8)];
+ if (CHAR_BYTE_TABLE_P (ret))
+ cpt = XCHAR_BYTE_TABLE (ret);
+ else
+ return ret;
+
+ return cpt->property [(unsigned char) code];
+}
+
+void
+put_char_code_table (Emchar ch, Lisp_Object value, Lisp_Object table)
+{
+ unsigned int code = ch;
+ struct Lisp_Char_Byte_Table* cpt1
+ = XCHAR_BYTE_TABLE (XCHAR_CODE_TABLE (table)->table);
+ Lisp_Object ret = cpt1->property[(unsigned char)(code >> 24)];
+
+ if (CHAR_BYTE_TABLE_P (ret))
+ {
+ struct Lisp_Char_Byte_Table* cpt2 = XCHAR_BYTE_TABLE (ret);
+
+ ret = cpt2->property[(unsigned char)(code >> 16)];
+ if (CHAR_BYTE_TABLE_P (ret))
{
- size_t new_size = table->size - i;
- size_t j;
-
- new_size += 128 - (new_size % 128);
- table->base = xrealloc (table->base, new_size);
- memmove (table->base + (new_size - table->size), table->base,
- table->size);
- for (j = 0; j < (new_size - table->size); j++)
- table->base[j] = 0;
- table->offset -= (new_size - table->size);
- table->base[ch - table->offset] = val;
- table->size = new_size;
+ struct Lisp_Char_Byte_Table* cpt3 = XCHAR_BYTE_TABLE (ret);
+
+ ret = cpt3->property[(unsigned char)(code >> 8)];
+ if (CHAR_BYTE_TABLE_P (ret))
+ {
+ struct Lisp_Char_Byte_Table* cpt4
+ = XCHAR_BYTE_TABLE (ret);
+
+ cpt4->property[(unsigned char)code] = value;
+ }
+ else if (!EQ (ret, value))
+ {
+ Lisp_Object cpt4 = make_char_byte_table (ret);
+
+ XCHAR_BYTE_TABLE(cpt4)->property[(unsigned char)code] = value;
+ cpt3->property[(unsigned char)(code >> 8)] = cpt4;
+ }
}
- else if (i >= table->size)
+ else if (!EQ (ret, value))
{
- size_t new_size = i + 1;
- size_t j;
-
- new_size += 128 - (new_size % 128);
- table->base = xrealloc (table->base, new_size);
- for (j = table->size; j < new_size; j++)
- table->base[j] = 0;
- table->base[i] = val;
- table->size = new_size;
+ Lisp_Object cpt3 = make_char_byte_table (ret);
+ Lisp_Object cpt4 = make_char_byte_table (ret);
+
+ XCHAR_BYTE_TABLE(cpt4)->property[(unsigned char)code] = value;
+ XCHAR_BYTE_TABLE(cpt3)->property[(unsigned char)(code >> 8)]
+ = cpt4;
+ cpt2->property[(unsigned char)(code >> 16)] = cpt3;
}
- else
+ }
+ else if (!EQ (ret, value))
+ {
+ Lisp_Object cpt2 = make_char_byte_table (ret);
+ Lisp_Object cpt3 = make_char_byte_table (ret);
+ Lisp_Object cpt4 = make_char_byte_table (ret);
+
+ XCHAR_BYTE_TABLE(cpt4)->property[(unsigned char)code] = value;
+ XCHAR_BYTE_TABLE(cpt3)->property[(unsigned char)(code >> 8)] = cpt4;
+ XCHAR_BYTE_TABLE(cpt2)->property[(unsigned char)(code >> 16)] = cpt3;
+ cpt1->property[(unsigned char)(code >> 24)] = cpt2;
+ }
+}
+
+
+Lisp_Object Vcharacter_attribute_table;
+Lisp_Object Vcharacter_composition_table;
+Lisp_Object Vcharacter_variant_table;
+
+Lisp_Object Q_decomposition;
+Lisp_Object Q_ucs;
+Lisp_Object Qcompat;
+Lisp_Object QnoBreak;
+Lisp_Object Qfraction;
+Lisp_Object Qsuper;
+Lisp_Object Qsub;
+Lisp_Object Qcircle;
+Lisp_Object Qsquare;
+Lisp_Object Qwide;
+Lisp_Object Qnarrow;
+Lisp_Object Qfont;
+
+Emchar
+to_char_code (Lisp_Object v, char* err_msg, Lisp_Object err_arg)
+{
+ if (INTP (v))
+ return XINT (v);
+ if (CHARP (v))
+ return XCHAR (v);
+ else if (EQ (v, Qcompat))
+ return -1;
+ else if (EQ (v, QnoBreak))
+ return -2;
+ else if (EQ (v, Qfraction))
+ return -3;
+ else if (EQ (v, Qsuper))
+ return -4;
+ else if (EQ (v, Qsub))
+ return -5;
+ else if (EQ (v, Qcircle))
+ return -6;
+ else if (EQ (v, Qsquare))
+ return -7;
+ else if (EQ (v, Qwide))
+ return -8;
+ else if (EQ (v, Qnarrow))
+ return -9;
+ else if (EQ (v, Qfont))
+ return -10;
+ else
+ signal_simple_error (err_msg, err_arg);
+}
+
+DEFUN ("get-composite-char", Fget_composite_char, 1, 1, 0, /*
+Return character corresponding with list.
+*/
+ (list))
+{
+ Lisp_Object table = Vcharacter_composition_table;
+ Lisp_Object rest = list;
+
+ while (CONSP (rest))
+ {
+ Lisp_Object v = Fcar (rest);
+ Lisp_Object ret;
+ Emchar c = to_char_code (v, "Invalid value for composition", list);
+
+ ret = get_char_code_table (c, table);
+
+ rest = Fcdr (rest);
+ if (NILP (rest))
{
- table->base[i] = val;
+ if (!CHAR_CODE_TABLE_P (ret))
+ return ret;
+ else
+ return Qt;
}
+ else if (!CONSP (rest))
+ break;
+ else if (CHAR_CODE_TABLE_P (ret))
+ table = ret;
+ else
+ signal_simple_error ("Invalid table is found with", list);
}
+ signal_simple_error ("Invalid value for composition", list);
}
-unsigned char
-get_byte_from_character_table (Emchar ch, Emchar_to_byte_table* table)
+DEFUN ("char-variants", Fchar_variants, 1, 1, 0, /*
+Return variants of CHARACTER.
+*/
+ (character))
{
- size_t i = ch - table->offset;
- if (i < table->size)
- return table->base[i];
- else
- return 0;
+ CHECK_CHAR (character);
+ return Fcopy_list (get_char_code_table (XCHAR (character),
+ Vcharacter_variant_table));
}
-#define CHAR96(ft,b) (MIN_CHAR_96 + (ft - '0') * 96 + (b & 0x7f) - 32)
-
-Emchar latin_jisx0201_to_ucs[94] =
-{
- 0x0021 /* 0x21 EXCLAMATION MARK */,
- 0x0022 /* 0x22 QUOTATION MARK */,
- 0x0023 /* 0x23 NUMBER SIGN */,
- 0x0024 /* 0x24 DOLLAR SIGN */,
- 0x0025 /* 0x25 PERCENT SIGN */,
- 0x0026 /* 0x26 AMPERSAND */,
- 0x0027 /* 0x27 APOSTROPHE */,
- 0x0028 /* 0x28 LEFT PARENTHESIS */,
- 0x0029 /* 0x29 RIGHT PARENTHESIS */,
- 0x002A /* 0x2A ASTERISK */,
- 0x002B /* 0x2B PLUS SIGN */,
- 0x002C /* 0x2C COMMA */,
- 0x002D /* 0x2D HYPHEN-MINUS */,
- 0x002E /* 0x2E FULL STOP */,
- 0x002F /* 0x2F SOLIDUS */,
- 0x0030 /* 0x30 DIGIT ZERO */,
- 0x0031 /* 0x31 DIGIT ONE */,
- 0x0032 /* 0x32 DIGIT TWO */,
- 0x0033 /* 0x33 DIGIT THREE */,
- 0x0034 /* 0x34 DIGIT FOUR */,
- 0x0035 /* 0x35 DIGIT FIVE */,
- 0x0036 /* 0x36 DIGIT SIX */,
- 0x0037 /* 0x37 DIGIT SEVEN */,
- 0x0038 /* 0x38 DIGIT EIGHT */,
- 0x0039 /* 0x39 DIGIT NINE */,
- 0x003A /* 0x3A COLON */,
- 0x003B /* 0x3B SEMICOLON */,
- 0x003C /* 0x3C LESS-THAN SIGN */,
- 0x003D /* 0x3D EQUALS SIGN */,
- 0x003E /* 0x3E GREATER-THAN SIGN */,
- 0x003F /* 0x3F QUESTION MARK */,
- 0x0040 /* 0x40 COMMERCIAL AT */,
- 0x0041 /* 0x41 LATIN CAPITAL LETTER A */,
- 0x0042 /* 0x42 LATIN CAPITAL LETTER B */,
- 0x0043 /* 0x43 LATIN CAPITAL LETTER C */,
- 0x0044 /* 0x44 LATIN CAPITAL LETTER D */,
- 0x0045 /* 0x45 LATIN CAPITAL LETTER E */,
- 0x0046 /* 0x46 LATIN CAPITAL LETTER F */,
- 0x0047 /* 0x47 LATIN CAPITAL LETTER G */,
- 0x0048 /* 0x48 LATIN CAPITAL LETTER H */,
- 0x0049 /* 0x49 LATIN CAPITAL LETTER I */,
- 0x004A /* 0x4A LATIN CAPITAL LETTER J */,
- 0x004B /* 0x4B LATIN CAPITAL LETTER K */,
- 0x004C /* 0x4C LATIN CAPITAL LETTER L */,
- 0x004D /* 0x4D LATIN CAPITAL LETTER M */,
- 0x004E /* 0x4E LATIN CAPITAL LETTER N */,
- 0x004F /* 0x4F LATIN CAPITAL LETTER O */,
- 0x0050 /* 0x50 LATIN CAPITAL LETTER P */,
- 0x0051 /* 0x51 LATIN CAPITAL LETTER Q */,
- 0x0052 /* 0x52 LATIN CAPITAL LETTER R */,
- 0x0053 /* 0x53 LATIN CAPITAL LETTER S */,
- 0x0054 /* 0x54 LATIN CAPITAL LETTER T */,
- 0x0055 /* 0x55 LATIN CAPITAL LETTER U */,
- 0x0056 /* 0x56 LATIN CAPITAL LETTER V */,
- 0x0057 /* 0x57 LATIN CAPITAL LETTER W */,
- 0x0058 /* 0x58 LATIN CAPITAL LETTER X */,
- 0x0059 /* 0x59 LATIN CAPITAL LETTER Y */,
- 0x005A /* 0x5A LATIN CAPITAL LETTER Z */,
- 0x005B /* 0x5B LEFT SQUARE BRACKET */,
- 0x00A5 /* 0x5C YEN SIGN */,
- 0x005D /* 0x5D RIGHT SQUARE BRACKET */,
- 0x005E /* 0x5E CIRCUMFLEX ACCENT */,
- 0x005F /* 0x5F LOW LINE */,
- 0x0060 /* 0x60 GRAVE ACCENT */,
- 0x0061 /* 0x61 LATIN SMALL LETTER A */,
- 0x0062 /* 0x62 LATIN SMALL LETTER B */,
- 0x0063 /* 0x63 LATIN SMALL LETTER C */,
- 0x0064 /* 0x64 LATIN SMALL LETTER D */,
- 0x0065 /* 0x65 LATIN SMALL LETTER E */,
- 0x0066 /* 0x66 LATIN SMALL LETTER F */,
- 0x0067 /* 0x67 LATIN SMALL LETTER G */,
- 0x0068 /* 0x68 LATIN SMALL LETTER H */,
- 0x0069 /* 0x69 LATIN SMALL LETTER I */,
- 0x006A /* 0x6A LATIN SMALL LETTER J */,
- 0x006B /* 0x6B LATIN SMALL LETTER K */,
- 0x006C /* 0x6C LATIN SMALL LETTER L */,
- 0x006D /* 0x6D LATIN SMALL LETTER M */,
- 0x006E /* 0x6E LATIN SMALL LETTER N */,
- 0x006F /* 0x6F LATIN SMALL LETTER O */,
- 0x0070 /* 0x70 LATIN SMALL LETTER P */,
- 0x0071 /* 0x71 LATIN SMALL LETTER Q */,
- 0x0072 /* 0x72 LATIN SMALL LETTER R */,
- 0x0073 /* 0x73 LATIN SMALL LETTER S */,
- 0x0074 /* 0x74 LATIN SMALL LETTER T */,
- 0x0075 /* 0x75 LATIN SMALL LETTER U */,
- 0x0076 /* 0x76 LATIN SMALL LETTER V */,
- 0x0077 /* 0x77 LATIN SMALL LETTER W */,
- 0x0078 /* 0x78 LATIN SMALL LETTER X */,
- 0x0079 /* 0x79 LATIN SMALL LETTER Y */,
- 0x007A /* 0x7A LATIN SMALL LETTER Z */,
- 0x007B /* 0x7B LEFT CURLY BRACKET */,
- 0x007C /* 0x7C VERTICAL LINE */,
- 0x007D /* 0x7D RIGHT CURLY BRACKET */,
- 0x203E /* 0x7E OVERLINE */
-};
+DEFUN ("char-attribute-alist", Fchar_attribute_alist, 1, 1, 0, /*
+Return the alist of attributes of CHARACTER.
+*/
+ (character))
+{
+ CHECK_CHAR (character);
+ return Fcopy_alist (get_char_code_table (XCHAR (character),
+ Vcharacter_attribute_table));
+}
-Emchar latin_iso8859_2_to_ucs[96] =
-{
- 0x00A0 /* 0xA0 NO-BREAK SPACE */,
- 0x0104 /* 0xA1 LATIN CAPITAL LETTER A WITH OGONEK */,
- 0x02D8 /* 0xA2 BREVE */,
- 0x0141 /* 0xA3 LATIN CAPITAL LETTER L WITH STROKE */,
- 0x00A4 /* 0xA4 CURRENCY SIGN */,
- 0x013D /* 0xA5 LATIN CAPITAL LETTER L WITH CARON */,
- 0x015A /* 0xA6 LATIN CAPITAL LETTER S WITH ACUTE */,
- 0x00A7 /* 0xA7 SECTION SIGN */,
- 0x00A8 /* 0xA8 DIAERESIS */,
- 0x0160 /* 0xA9 LATIN CAPITAL LETTER S WITH CARON */,
- 0x015E /* 0xAA LATIN CAPITAL LETTER S WITH CEDILLA */,
- 0x0164 /* 0xAB LATIN CAPITAL LETTER T WITH CARON */,
- 0x0179 /* 0xAC LATIN CAPITAL LETTER Z WITH ACUTE */,
- 0x00AD /* 0xAD SOFT HYPHEN */,
- 0x017D /* 0xAE LATIN CAPITAL LETTER Z WITH CARON */,
- 0x017B /* 0xAF LATIN CAPITAL LETTER Z WITH DOT ABOVE */,
- 0x00B0 /* 0xB0 DEGREE SIGN */,
- 0x0105 /* 0xB1 LATIN SMALL LETTER A WITH OGONEK */,
- 0x02DB /* 0xB2 OGONEK */,
- 0x0142 /* 0xB3 LATIN SMALL LETTER L WITH STROKE */,
- 0x00B4 /* 0xB4 ACUTE ACCENT */,
- 0x013E /* 0xB5 LATIN SMALL LETTER L WITH CARON */,
- 0x015B /* 0xB6 LATIN SMALL LETTER S WITH ACUTE */,
- 0x02C7 /* 0xB7 CARON */,
- 0x00B8 /* 0xB8 CEDILLA */,
- 0x0161 /* 0xB9 LATIN SMALL LETTER S WITH CARON */,
- 0x015F /* 0xBA LATIN SMALL LETTER S WITH CEDILLA */,
- 0x0165 /* 0xBB LATIN SMALL LETTER T WITH CARON */,
- 0x017A /* 0xBC LATIN SMALL LETTER Z WITH ACUTE */,
- 0x02DD /* 0xBD DOUBLE ACUTE ACCENT */,
- 0x017E /* 0xBE LATIN SMALL LETTER Z WITH CARON */,
- 0x017C /* 0xBF LATIN SMALL LETTER Z WITH DOT ABOVE */,
- 0x0154 /* 0xC0 LATIN CAPITAL LETTER R WITH ACUTE */,
- 0x00C1 /* 0xC1 LATIN CAPITAL LETTER A WITH ACUTE */,
- 0x00C2 /* 0xC2 LATIN CAPITAL LETTER A WITH CIRCUMFLEX */,
- 0x0102 /* 0xC3 LATIN CAPITAL LETTER A WITH BREVE */,
- 0x00C4 /* 0xC4 LATIN CAPITAL LETTER A WITH DIAERESIS */,
- 0x0139 /* 0xC5 LATIN CAPITAL LETTER L WITH ACUTE */,
- 0x0106 /* 0xC6 LATIN CAPITAL LETTER C WITH ACUTE */,
- 0x00C7 /* 0xC7 LATIN CAPITAL LETTER C WITH CEDILLA */,
- 0x010C /* 0xC8 LATIN CAPITAL LETTER C WITH CARON */,
- 0x00C9 /* 0xC9 LATIN CAPITAL LETTER E WITH ACUTE */,
- 0x0118 /* 0xCA LATIN CAPITAL LETTER E WITH OGONEK */,
- 0x00CB /* 0xCB LATIN CAPITAL LETTER E WITH DIAERESIS */,
- 0x011A /* 0xCC LATIN CAPITAL LETTER E WITH CARON */,
- 0x00CD /* 0xCD LATIN CAPITAL LETTER I WITH ACUTE */,
- 0x00CE /* 0xCE LATIN CAPITAL LETTER I WITH CIRCUMFLEX */,
- 0x010E /* 0xCF LATIN CAPITAL LETTER D WITH CARON */,
- 0x0110 /* 0xD0 LATIN CAPITAL LETTER D WITH STROKE */,
- 0x0143 /* 0xD1 LATIN CAPITAL LETTER N WITH ACUTE */,
- 0x0147 /* 0xD2 LATIN CAPITAL LETTER N WITH CARON */,
- 0x00D3 /* 0xD3 LATIN CAPITAL LETTER O WITH ACUTE */,
- 0x00D4 /* 0xD4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX */,
- 0x0150 /* 0xD5 LATIN CAPITAL LETTER O WITH DOUBLE ACUTE */,
- 0x00D6 /* 0xD6 LATIN CAPITAL LETTER O WITH DIAERESIS */,
- 0x00D7 /* 0xD7 MULTIPLICATION SIGN */,
- 0x0158 /* 0xD8 LATIN CAPITAL LETTER R WITH CARON */,
- 0x016E /* 0xD9 LATIN CAPITAL LETTER U WITH RING ABOVE */,
- 0x00DA /* 0xDA LATIN CAPITAL LETTER U WITH ACUTE */,
- 0x0170 /* 0xDB LATIN CAPITAL LETTER U WITH DOUBLE ACUTE */,
- 0x00DC /* 0xDC LATIN CAPITAL LETTER U WITH DIAERESIS */,
- 0x00DD /* 0xDD LATIN CAPITAL LETTER Y WITH ACUTE */,
- 0x0162 /* 0xDE LATIN CAPITAL LETTER T WITH CEDILLA */,
- 0x00DF /* 0xDF LATIN SMALL LETTER SHARP S */,
- 0x0155 /* 0xE0 LATIN SMALL LETTER R WITH ACUTE */,
- 0x00E1 /* 0xE1 LATIN SMALL LETTER A WITH ACUTE */,
- 0x00E2 /* 0xE2 LATIN SMALL LETTER A WITH CIRCUMFLEX */,
- 0x0103 /* 0xE3 LATIN SMALL LETTER A WITH BREVE */,
- 0x00E4 /* 0xE4 LATIN SMALL LETTER A WITH DIAERESIS */,
- 0x013A /* 0xE5 LATIN SMALL LETTER L WITH ACUTE */,
- 0x0107 /* 0xE6 LATIN SMALL LETTER C WITH ACUTE */,
- 0x00E7 /* 0xE7 LATIN SMALL LETTER C WITH CEDILLA */,
- 0x010D /* 0xE8 LATIN SMALL LETTER C WITH CARON */,
- 0x00E9 /* 0xE9 LATIN SMALL LETTER E WITH ACUTE */,
- 0x0119 /* 0xEA LATIN SMALL LETTER E WITH OGONEK */,
- 0x00EB /* 0xEB LATIN SMALL LETTER E WITH DIAERESIS */,
- 0x011B /* 0xEC LATIN SMALL LETTER E WITH CARON */,
- 0x00ED /* 0xED LATIN SMALL LETTER I WITH ACUTE */,
- 0x00EE /* 0xEE LATIN SMALL LETTER I WITH CIRCUMFLEX */,
- 0x010F /* 0xEF LATIN SMALL LETTER D WITH CARON */,
- 0x0111 /* 0xF0 LATIN SMALL LETTER D WITH STROKE */,
- 0x0144 /* 0xF1 LATIN SMALL LETTER N WITH ACUTE */,
- 0x0148 /* 0xF2 LATIN SMALL LETTER N WITH CARON */,
- 0x00F3 /* 0xF3 LATIN SMALL LETTER O WITH ACUTE */,
- 0x00F4 /* 0xF4 LATIN SMALL LETTER O WITH CIRCUMFLEX */,
- 0x0151 /* 0xF5 LATIN SMALL LETTER O WITH DOUBLE ACUTE */,
- 0x00F6 /* 0xF6 LATIN SMALL LETTER O WITH DIAERESIS */,
- 0x00F7 /* 0xF7 DIVISION SIGN */,
- 0x0159 /* 0xF8 LATIN SMALL LETTER R WITH CARON */,
- 0x016F /* 0xF9 LATIN SMALL LETTER U WITH RING ABOVE */,
- 0x00FA /* 0xFA LATIN SMALL LETTER U WITH ACUTE */,
- 0x0171 /* 0xFB LATIN SMALL LETTER U WITH DOUBLE ACUTE */,
- 0x00FC /* 0xFC LATIN SMALL LETTER U WITH DIAERESIS */,
- 0x00FD /* 0xFD LATIN SMALL LETTER Y WITH ACUTE */,
- 0x0163 /* 0xFE LATIN SMALL LETTER T WITH CEDILLA */,
- 0x02D9 /* 0xFF DOT ABOVE */
-};
+DEFUN ("get-char-attribute", Fget_char_attribute, 2, 2, 0, /*
+Return the value of CHARACTER's ATTRIBUTE.
+*/
+ (character, attribute))
+{
+ Lisp_Object ret
+ = get_char_code_table (XCHAR (character), Vcharacter_attribute_table);
+ Lisp_Object ccs;
-Emchar latin_iso8859_3_to_ucs[96] =
-{
- 0x00A0 /* 0xA0 NO-BREAK SPACE */,
- 0x0126 /* 0xA1 LATIN CAPITAL LETTER H WITH STROKE */,
- 0x02D8 /* 0xA2 BREVE */,
- 0x00A3 /* 0xA3 POUND SIGN */,
- 0x00A4 /* 0xA4 CURRENCY SIGN */,
- CHAR96('C', 0xA5),
- 0x0124 /* 0xA6 LATIN CAPITAL LETTER H WITH CIRCUMFLEX */,
- 0x00A7 /* 0xA7 SECTION SIGN */,
- 0x00A8 /* 0xA8 DIAERESIS */,
- 0x0130 /* 0xA9 LATIN CAPITAL LETTER I WITH DOT ABOVE */,
- 0x015E /* 0xAA LATIN CAPITAL LETTER S WITH CEDILLA */,
- 0x011E /* 0xAB LATIN CAPITAL LETTER G WITH BREVE */,
- 0x0134 /* 0xAC LATIN CAPITAL LETTER J WITH CIRCUMFLEX */,
- 0x00AD /* 0xAD SOFT HYPHEN */,
- CHAR96('C', 0xAE),
- 0x017B /* 0xAF LATIN CAPITAL LETTER Z WITH DOT ABOVE */,
- 0x00B0 /* 0xB0 DEGREE SIGN */,
- 0x0127 /* 0xB1 LATIN SMALL LETTER H WITH STROKE */,
- 0x00B2 /* 0xB2 SUPERSCRIPT TWO */,
- 0x00B3 /* 0xB3 SUPERSCRIPT THREE */,
- 0x00B4 /* 0xB4 ACUTE ACCENT */,
- 0x00B5 /* 0xB5 MICRO SIGN */,
- 0x0125 /* 0xB6 LATIN SMALL LETTER H WITH CIRCUMFLEX */,
- 0x00B7 /* 0xB7 MIDDLE DOT */,
- 0x00B8 /* 0xB8 CEDILLA */,
- 0x0131 /* 0xB9 LATIN SMALL LETTER DOTLESS I */,
- 0x015F /* 0xBA LATIN SMALL LETTER S WITH CEDILLA */,
- 0x011F /* 0xBB LATIN SMALL LETTER G WITH BREVE */,
- 0x0135 /* 0xBC LATIN SMALL LETTER J WITH CIRCUMFLEX */,
- 0x00BD /* 0xBD VULGAR FRACTION ONE HALF */,
- CHAR96('C', 0xBE),
- 0x017C /* 0xBF LATIN SMALL LETTER Z WITH DOT ABOVE */,
- 0x00C0 /* 0xC0 LATIN CAPITAL LETTER A WITH GRAVE */,
- 0x00C1 /* 0xC1 LATIN CAPITAL LETTER A WITH ACUTE */,
- 0x00C2 /* 0xC2 LATIN CAPITAL LETTER A WITH CIRCUMFLEX */,
- CHAR96('C', 0xC3),
- 0x00C4 /* 0xC4 LATIN CAPITAL LETTER A WITH DIAERESIS */,
- 0x010A /* 0xC5 LATIN CAPITAL LETTER C WITH DOT ABOVE */,
- 0x0108 /* 0xC6 LATIN CAPITAL LETTER C WITH CIRCUMFLEX */,
- 0x00C7 /* 0xC7 LATIN CAPITAL LETTER C WITH CEDILLA */,
- 0x00C8 /* 0xC8 LATIN CAPITAL LETTER E WITH GRAVE */,
- 0x00C9 /* 0xC9 LATIN CAPITAL LETTER E WITH ACUTE */,
- 0x00CA /* 0xCA LATIN CAPITAL LETTER E WITH CIRCUMFLEX */,
- 0x00CB /* 0xCB LATIN CAPITAL LETTER E WITH DIAERESIS */,
- 0x00CC /* 0xCC LATIN CAPITAL LETTER I WITH GRAVE */,
- 0x00CD /* 0xCD LATIN CAPITAL LETTER I WITH ACUTE */,
- 0x00CE /* 0xCE LATIN CAPITAL LETTER I WITH CIRCUMFLEX */,
- 0x00CF /* 0xCF LATIN CAPITAL LETTER I WITH DIAERESIS */,
- CHAR96('C', 0xD0),
- 0x00D1 /* 0xD1 LATIN CAPITAL LETTER N WITH TILDE */,
- 0x00D2 /* 0xD2 LATIN CAPITAL LETTER O WITH GRAVE */,
- 0x00D3 /* 0xD3 LATIN CAPITAL LETTER O WITH ACUTE */,
- 0x00D4 /* 0xD4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX */,
- 0x0120 /* 0xD5 LATIN CAPITAL LETTER G WITH DOT ABOVE */,
- 0x00D6 /* 0xD6 LATIN CAPITAL LETTER O WITH DIAERESIS */,
- 0x00D7 /* 0xD7 MULTIPLICATION SIGN */,
- 0x011C /* 0xD8 LATIN CAPITAL LETTER G WITH CIRCUMFLEX */,
- 0x00D9 /* 0xD9 LATIN CAPITAL LETTER U WITH GRAVE */,
- 0x00DA /* 0xDA LATIN CAPITAL LETTER U WITH ACUTE */,
- 0x00DB /* 0xDB LATIN CAPITAL LETTER U WITH CIRCUMFLEX */,
- 0x00DC /* 0xDC LATIN CAPITAL LETTER U WITH DIAERESIS */,
- 0x016C /* 0xDD LATIN CAPITAL LETTER U WITH BREVE */,
- 0x015C /* 0xDE LATIN CAPITAL LETTER S WITH CIRCUMFLEX */,
- 0x00DF /* 0xDF LATIN SMALL LETTER SHARP S */,
- 0x00E0 /* 0xE0 LATIN SMALL LETTER A WITH GRAVE */,
- 0x00E1 /* 0xE1 LATIN SMALL LETTER A WITH ACUTE */,
- 0x00E2 /* 0xE2 LATIN SMALL LETTER A WITH CIRCUMFLEX */,
- CHAR96('C', 0xE3),
- 0x00E4 /* 0xE4 LATIN SMALL LETTER A WITH DIAERESIS */,
- 0x010B /* 0xE5 LATIN SMALL LETTER C WITH DOT ABOVE */,
- 0x0109 /* 0xE6 LATIN SMALL LETTER C WITH CIRCUMFLEX */,
- 0x00E7 /* 0xE7 LATIN SMALL LETTER C WITH CEDILLA */,
- 0x00E8 /* 0xE8 LATIN SMALL LETTER E WITH GRAVE */,
- 0x00E9 /* 0xE9 LATIN SMALL LETTER E WITH ACUTE */,
- 0x00EA /* 0xEA LATIN SMALL LETTER E WITH CIRCUMFLEX */,
- 0x00EB /* 0xEB LATIN SMALL LETTER E WITH DIAERESIS */,
- 0x00EC /* 0xEC LATIN SMALL LETTER I WITH GRAVE */,
- 0x00ED /* 0xED LATIN SMALL LETTER I WITH ACUTE */,
- 0x00EE /* 0xEE LATIN SMALL LETTER I WITH CIRCUMFLEX */,
- 0x00EF /* 0xEF LATIN SMALL LETTER I WITH DIAERESIS */,
- CHAR96('C', 0xF0),
- 0x00F1 /* 0xF1 LATIN SMALL LETTER N WITH TILDE */,
- 0x00F2 /* 0xF2 LATIN SMALL LETTER O WITH GRAVE */,
- 0x00F3 /* 0xF3 LATIN SMALL LETTER O WITH ACUTE */,
- 0x00F4 /* 0xF4 LATIN SMALL LETTER O WITH CIRCUMFLEX */,
- 0x0121 /* 0xF5 LATIN SMALL LETTER G WITH DOT ABOVE */,
- 0x00F6 /* 0xF6 LATIN SMALL LETTER O WITH DIAERESIS */,
- 0x00F7 /* 0xF7 DIVISION SIGN */,
- 0x011D /* 0xF8 LATIN SMALL LETTER G WITH CIRCUMFLEX */,
- 0x00F9 /* 0xF9 LATIN SMALL LETTER U WITH GRAVE */,
- 0x00FA /* 0xFA LATIN SMALL LETTER U WITH ACUTE */,
- 0x00FB /* 0xFB LATIN SMALL LETTER U WITH CIRCUMFLEX */,
- 0x00FC /* 0xFC LATIN SMALL LETTER U WITH DIAERESIS */,
- 0x016D /* 0xFD LATIN SMALL LETTER U WITH BREVE */,
- 0x015D /* 0xFE LATIN SMALL LETTER S WITH CIRCUMFLEX */,
- 0x02D9 /* 0xFF DOT ABOVE */
-};
+ if (EQ (ret, Qnil))
+ return Qnil;
-Emchar latin_iso8859_4_to_ucs[96] =
-{
- 0x00A0 /* 0xA0 NO-BREAK SPACE */,
- 0x0104 /* 0xA1 LATIN CAPITAL LETTER A WITH OGONEK */,
- 0x0138 /* 0xA2 LATIN SMALL LETTER KRA */,
- 0x0156 /* 0xA3 LATIN CAPITAL LETTER R WITH CEDILLA */,
- 0x00A4 /* 0xA4 CURRENCY SIGN */,
- 0x0128 /* 0xA5 LATIN CAPITAL LETTER I WITH TILDE */,
- 0x013B /* 0xA6 LATIN CAPITAL LETTER L WITH CEDILLA */,
- 0x00A7 /* 0xA7 SECTION SIGN */,
- 0x00A8 /* 0xA8 DIAERESIS */,
- 0x0160 /* 0xA9 LATIN CAPITAL LETTER S WITH CARON */,
- 0x0112 /* 0xAA LATIN CAPITAL LETTER E WITH MACRON */,
- 0x0122 /* 0xAB LATIN CAPITAL LETTER G WITH CEDILLA */,
- 0x0166 /* 0xAC LATIN CAPITAL LETTER T WITH STROKE */,
- 0x00AD /* 0xAD SOFT HYPHEN */,
- 0x017D /* 0xAE LATIN CAPITAL LETTER Z WITH CARON */,
- 0x00AF /* 0xAF MACRON */,
- 0x00B0 /* 0xB0 DEGREE SIGN */,
- 0x0105 /* 0xB1 LATIN SMALL LETTER A WITH OGONEK */,
- 0x02DB /* 0xB2 OGONEK */,
- 0x0157 /* 0xB3 LATIN SMALL LETTER R WITH CEDILLA */,
- 0x00B4 /* 0xB4 ACUTE ACCENT */,
- 0x0129 /* 0xB5 LATIN SMALL LETTER I WITH TILDE */,
- 0x013C /* 0xB6 LATIN SMALL LETTER L WITH CEDILLA */,
- 0x02C7 /* 0xB7 CARON */,
- 0x00B8 /* 0xB8 CEDILLA */,
- 0x0161 /* 0xB9 LATIN SMALL LETTER S WITH CARON */,
- 0x0113 /* 0xBA LATIN SMALL LETTER E WITH MACRON */,
- 0x0123 /* 0xBB LATIN SMALL LETTER G WITH CEDILLA */,
- 0x0167 /* 0xBC LATIN SMALL LETTER T WITH STROKE */,
- 0x014A /* 0xBD LATIN CAPITAL LETTER ENG */,
- 0x017E /* 0xBE LATIN SMALL LETTER Z WITH CARON */,
- 0x014B /* 0xBF LATIN SMALL LETTER ENG */,
- 0x0100 /* 0xC0 LATIN CAPITAL LETTER A WITH MACRON */,
- 0x00C1 /* 0xC1 LATIN CAPITAL LETTER A WITH ACUTE */,
- 0x00C2 /* 0xC2 LATIN CAPITAL LETTER A WITH CIRCUMFLEX */,
- 0x00C3 /* 0xC3 LATIN CAPITAL LETTER A WITH TILDE */,
- 0x00C4 /* 0xC4 LATIN CAPITAL LETTER A WITH DIAERESIS */,
- 0x00C5 /* 0xC5 LATIN CAPITAL LETTER A WITH RING ABOVE */,
- 0x00C6 /* 0xC6 LATIN CAPITAL LETTER AE */,
- 0x012E /* 0xC7 LATIN CAPITAL LETTER I WITH OGONEK */,
- 0x010C /* 0xC8 LATIN CAPITAL LETTER C WITH CARON */,
- 0x00C9 /* 0xC9 LATIN CAPITAL LETTER E WITH ACUTE */,
- 0x0118 /* 0xCA LATIN CAPITAL LETTER E WITH OGONEK */,
- 0x00CB /* 0xCB LATIN CAPITAL LETTER E WITH DIAERESIS */,
- 0x0116 /* 0xCC LATIN CAPITAL LETTER E WITH DOT ABOVE */,
- 0x00CD /* 0xCD LATIN CAPITAL LETTER I WITH ACUTE */,
- 0x00CE /* 0xCE LATIN CAPITAL LETTER I WITH CIRCUMFLEX */,
- 0x012A /* 0xCF LATIN CAPITAL LETTER I WITH MACRON */,
- 0x0110 /* 0xD0 LATIN CAPITAL LETTER D WITH STROKE */,
- 0x0145 /* 0xD1 LATIN CAPITAL LETTER N WITH CEDILLA */,
- 0x014C /* 0xD2 LATIN CAPITAL LETTER O WITH MACRON */,
- 0x0136 /* 0xD3 LATIN CAPITAL LETTER K WITH CEDILLA */,
- 0x00D4 /* 0xD4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX */,
- 0x00D5 /* 0xD5 LATIN CAPITAL LETTER O WITH TILDE */,
- 0x00D6 /* 0xD6 LATIN CAPITAL LETTER O WITH DIAERESIS */,
- 0x00D7 /* 0xD7 MULTIPLICATION SIGN */,
- 0x00D8 /* 0xD8 LATIN CAPITAL LETTER O WITH STROKE */,
- 0x0172 /* 0xD9 LATIN CAPITAL LETTER U WITH OGONEK */,
- 0x00DA /* 0xDA LATIN CAPITAL LETTER U WITH ACUTE */,
- 0x00DB /* 0xDB LATIN CAPITAL LETTER U WITH CIRCUMFLEX */,
- 0x00DC /* 0xDC LATIN CAPITAL LETTER U WITH DIAERESIS */,
- 0x0168 /* 0xDD LATIN CAPITAL LETTER U WITH TILDE */,
- 0x016A /* 0xDE LATIN CAPITAL LETTER U WITH MACRON */,
- 0x00DF /* 0xDF LATIN SMALL LETTER SHARP S */,
- 0x0101 /* 0xE0 LATIN SMALL LETTER A WITH MACRON */,
- 0x00E1 /* 0xE1 LATIN SMALL LETTER A WITH ACUTE */,
- 0x00E2 /* 0xE2 LATIN SMALL LETTER A WITH CIRCUMFLEX */,
- 0x00E3 /* 0xE3 LATIN SMALL LETTER A WITH TILDE */,
- 0x00E4 /* 0xE4 LATIN SMALL LETTER A WITH DIAERESIS */,
- 0x00E5 /* 0xE5 LATIN SMALL LETTER A WITH RING ABOVE */,
- 0x00E6 /* 0xE6 LATIN SMALL LETTER AE */,
- 0x012F /* 0xE7 LATIN SMALL LETTER I WITH OGONEK */,
- 0x010D /* 0xE8 LATIN SMALL LETTER C WITH CARON */,
- 0x00E9 /* 0xE9 LATIN SMALL LETTER E WITH ACUTE */,
- 0x0119 /* 0xEA LATIN SMALL LETTER E WITH OGONEK */,
- 0x00EB /* 0xEB LATIN SMALL LETTER E WITH DIAERESIS */,
- 0x0117 /* 0xEC LATIN SMALL LETTER E WITH DOT ABOVE */,
- 0x00ED /* 0xED LATIN SMALL LETTER I WITH ACUTE */,
- 0x00EE /* 0xEE LATIN SMALL LETTER I WITH CIRCUMFLEX */,
- 0x012B /* 0xEF LATIN SMALL LETTER I WITH MACRON */,
- 0x0111 /* 0xF0 LATIN SMALL LETTER D WITH STROKE */,
- 0x0146 /* 0xF1 LATIN SMALL LETTER N WITH CEDILLA */,
- 0x014D /* 0xF2 LATIN SMALL LETTER O WITH MACRON */,
- 0x0137 /* 0xF3 LATIN SMALL LETTER K WITH CEDILLA */,
- 0x00F4 /* 0xF4 LATIN SMALL LETTER O WITH CIRCUMFLEX */,
- 0x00F5 /* 0xF5 LATIN SMALL LETTER O WITH TILDE */,
- 0x00F6 /* 0xF6 LATIN SMALL LETTER O WITH DIAERESIS */,
- 0x00F7 /* 0xF7 DIVISION SIGN */,
- 0x00F8 /* 0xF8 LATIN SMALL LETTER O WITH STROKE */,
- 0x0173 /* 0xF9 LATIN SMALL LETTER U WITH OGONEK */,
- 0x00FA /* 0xFA LATIN SMALL LETTER U WITH ACUTE */,
- 0x00FB /* 0xFB LATIN SMALL LETTER U WITH CIRCUMFLEX */,
- 0x00FC /* 0xFC LATIN SMALL LETTER U WITH DIAERESIS */,
- 0x0169 /* 0xFD LATIN SMALL LETTER U WITH TILDE */,
- 0x016B /* 0xFE LATIN SMALL LETTER U WITH MACRON */,
- 0x02D9 /* 0xFF DOT ABOVE */
-};
+ if (!NILP (ccs = Ffind_charset (attribute)))
+ attribute = ccs;
-Emchar latin_iso8859_9_to_ucs[96] =
-{
- 0x00A0 /* 0xA0 NO-BREAK SPACE */,
- 0x00A1 /* 0xA1 INVERTED EXCLAMATION MARK */,
- 0x00A2 /* 0xA2 CENT SIGN */,
- 0x00A3 /* 0xA3 POUND SIGN */,
- 0x00A4 /* 0xA4 CURRENCY SIGN */,
- 0x00A5 /* 0xA5 YEN SIGN */,
- 0x00A6 /* 0xA6 BROKEN BAR */,
- 0x00A7 /* 0xA7 SECTION SIGN */,
- 0x00A8 /* 0xA8 DIAERESIS */,
- 0x00A9 /* 0xA9 COPYRIGHT SIGN */,
- 0x00AA /* 0xAA FEMININE ORDINAL INDICATOR */,
- 0x00AB /* 0xAB LEFT-POINTING DOUBLE ANGLE QUOTATION MARK */,
- 0x00AC /* 0xAC NOT SIGN */,
- 0x00AD /* 0xAD SOFT HYPHEN */,
- 0x00AE /* 0xAE REGISTERED SIGN */,
- 0x00AF /* 0xAF MACRON */,
- 0x00B0 /* 0xB0 DEGREE SIGN */,
- 0x00B1 /* 0xB1 PLUS-MINUS SIGN */,
- 0x00B2 /* 0xB2 SUPERSCRIPT TWO */,
- 0x00B3 /* 0xB3 SUPERSCRIPT THREE */,
- 0x00B4 /* 0xB4 ACUTE ACCENT */,
- 0x00B5 /* 0xB5 MICRO SIGN */,
- 0x00B6 /* 0xB6 PILCROW SIGN */,
- 0x00B7 /* 0xB7 MIDDLE DOT */,
- 0x00B8 /* 0xB8 CEDILLA */,
- 0x00B9 /* 0xB9 SUPERSCRIPT ONE */,
- 0x00BA /* 0xBA MASCULINE ORDINAL INDICATOR */,
- 0x00BB /* 0xBB RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK */,
- 0x00BC /* 0xBC VULGAR FRACTION ONE QUARTER */,
- 0x00BD /* 0xBD VULGAR FRACTION ONE HALF */,
- 0x00BE /* 0xBE VULGAR FRACTION THREE QUARTERS */,
- 0x00BF /* 0xBF INVERTED QUESTION MARK */,
- 0x00C0 /* 0xC0 LATIN CAPITAL LETTER A WITH GRAVE */,
- 0x00C1 /* 0xC1 LATIN CAPITAL LETTER A WITH ACUTE */,
- 0x00C2 /* 0xC2 LATIN CAPITAL LETTER A WITH CIRCUMFLEX */,
- 0x00C3 /* 0xC3 LATIN CAPITAL LETTER A WITH TILDE */,
- 0x00C4 /* 0xC4 LATIN CAPITAL LETTER A WITH DIAERESIS */,
- 0x00C5 /* 0xC5 LATIN CAPITAL LETTER A WITH RING ABOVE */,
- 0x00C6 /* 0xC6 LATIN CAPITAL LETTER AE */,
- 0x00C7 /* 0xC7 LATIN CAPITAL LETTER C WITH CEDILLA */,
- 0x00C8 /* 0xC8 LATIN CAPITAL LETTER E WITH GRAVE */,
- 0x00C9 /* 0xC9 LATIN CAPITAL LETTER E WITH ACUTE */,
- 0x00CA /* 0xCA LATIN CAPITAL LETTER E WITH CIRCUMFLEX */,
- 0x00CB /* 0xCB LATIN CAPITAL LETTER E WITH DIAERESIS */,
- 0x00CC /* 0xCC LATIN CAPITAL LETTER I WITH GRAVE */,
- 0x00CD /* 0xCD LATIN CAPITAL LETTER I WITH ACUTE */,
- 0x00CE /* 0xCE LATIN CAPITAL LETTER I WITH CIRCUMFLEX */,
- 0x00CF /* 0xCF LATIN CAPITAL LETTER I WITH DIAERESIS */,
- 0x011E /* 0xD0 LATIN CAPITAL LETTER G WITH BREVE */,
- 0x00D1 /* 0xD1 LATIN CAPITAL LETTER N WITH TILDE */,
- 0x00D2 /* 0xD2 LATIN CAPITAL LETTER O WITH GRAVE */,
- 0x00D3 /* 0xD3 LATIN CAPITAL LETTER O WITH ACUTE */,
- 0x00D4 /* 0xD4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX */,
- 0x00D5 /* 0xD5 LATIN CAPITAL LETTER O WITH TILDE */,
- 0x00D6 /* 0xD6 LATIN CAPITAL LETTER O WITH DIAERESIS */,
- 0x00D7 /* 0xD7 MULTIPLICATION SIGN */,
- 0x00D8 /* 0xD8 LATIN CAPITAL LETTER O WITH STROKE */,
- 0x00D9 /* 0xD9 LATIN CAPITAL LETTER U WITH GRAVE */,
- 0x00DA /* 0xDA LATIN CAPITAL LETTER U WITH ACUTE */,
- 0x00DB /* 0xDB LATIN CAPITAL LETTER U WITH CIRCUMFLEX */,
- 0x00DC /* 0xDC LATIN CAPITAL LETTER U WITH DIAERESIS */,
- 0x0130 /* 0xDD LATIN CAPITAL LETTER I WITH DOT ABOVE */,
- 0x015E /* 0xDE LATIN CAPITAL LETTER S WITH CEDILLA */,
- 0x00DF /* 0xDF LATIN SMALL LETTER SHARP S */,
- 0x00E0 /* 0xE0 LATIN SMALL LETTER A WITH GRAVE */,
- 0x00E1 /* 0xE1 LATIN SMALL LETTER A WITH ACUTE */,
- 0x00E2 /* 0xE2 LATIN SMALL LETTER A WITH CIRCUMFLEX */,
- 0x00E3 /* 0xE3 LATIN SMALL LETTER A WITH TILDE */,
- 0x00E4 /* 0xE4 LATIN SMALL LETTER A WITH DIAERESIS */,
- 0x00E5 /* 0xE5 LATIN SMALL LETTER A WITH RING ABOVE */,
- 0x00E6 /* 0xE6 LATIN SMALL LETTER AE */,
- 0x00E7 /* 0xE7 LATIN SMALL LETTER C WITH CEDILLA */,
- 0x00E8 /* 0xE8 LATIN SMALL LETTER E WITH GRAVE */,
- 0x00E9 /* 0xE9 LATIN SMALL LETTER E WITH ACUTE */,
- 0x00EA /* 0xEA LATIN SMALL LETTER E WITH CIRCUMFLEX */,
- 0x00EB /* 0xEB LATIN SMALL LETTER E WITH DIAERESIS */,
- 0x00EC /* 0xEC LATIN SMALL LETTER I WITH GRAVE */,
- 0x00ED /* 0xED LATIN SMALL LETTER I WITH ACUTE */,
- 0x00EE /* 0xEE LATIN SMALL LETTER I WITH CIRCUMFLEX */,
- 0x00EF /* 0xEF LATIN SMALL LETTER I WITH DIAERESIS */,
- 0x011F /* 0xF0 LATIN SMALL LETTER G WITH BREVE */,
- 0x00F1 /* 0xF1 LATIN SMALL LETTER N WITH TILDE */,
- 0x00F2 /* 0xF2 LATIN SMALL LETTER O WITH GRAVE */,
- 0x00F3 /* 0xF3 LATIN SMALL LETTER O WITH ACUTE */,
- 0x00F4 /* 0xF4 LATIN SMALL LETTER O WITH CIRCUMFLEX */,
- 0x00F5 /* 0xF5 LATIN SMALL LETTER O WITH TILDE */,
- 0x00F6 /* 0xF6 LATIN SMALL LETTER O WITH DIAERESIS */,
- 0x00F7 /* 0xF7 DIVISION SIGN */,
- 0x00F8 /* 0xF8 LATIN SMALL LETTER O WITH STROKE */,
- 0x00F9 /* 0xF9 LATIN SMALL LETTER U WITH GRAVE */,
- 0x00FA /* 0xFA LATIN SMALL LETTER U WITH ACUTE */,
- 0x00FB /* 0xFB LATIN SMALL LETTER U WITH CIRCUMFLEX */,
- 0x00FC /* 0xFC LATIN SMALL LETTER U WITH DIAERESIS */,
- 0x0131 /* 0xFD LATIN SMALL LETTER DOTLESS I */,
- 0x015F /* 0xFE LATIN SMALL LETTER S WITH CEDILLA */,
- 0x00FF /* 0xFF LATIN SMALL LETTER Y WITH DIAERESIS */,
-};
+ return Fcdr (Fassq (attribute, ret));
+}
-Emchar latin_viscii_lower_to_ucs[96] =
-{
- CHAR96('1', 0x20),
- 0x1eaf /* 0x21 */,
- 0x1eb1 /* 0x22 */,
- 0x1eb7 /* 0x23 */,
- 0x1ea5 /* 0x24 */,
- 0x1ea7 /* 0x25 */,
- 0x1ea9 /* 0x26 */,
- 0x1ead /* 0x27 */,
- 0x1ebd /* 0x28 */,
- 0x1eb9 /* 0x29 */,
- 0x1ebf /* 0x2a */,
- 0x1ec1 /* 0x2b */,
- 0x1ec3 /* 0x2c */,
- 0x1ec5 /* 0x2d */,
- 0x1ec7 /* 0x2e */,
- 0x1ed1 /* 0x2f */,
- 0x1ed3 /* 0x30 */,
- 0x1ed5 /* 0x31 */,
- 0x1ed7 /* 0x32 */,
- CHAR96('1', 0x33),
- CHAR96('1', 0x34),
- 0x1ed9 /* 0x35 */,
- 0x1edd /* 0x36 */,
- 0x1edf /* 0x37 */,
- 0x1ecb /* 0x38 */,
- CHAR96('1', 0x39),
- CHAR96('1', 0x3A),
- CHAR96('1', 0x3B),
- CHAR96('1', 0x3C),
- 0x01a1 /* 0x3d */,
- 0x1edb /* 0x3e */,
- CHAR96('1', 0x3F),
- CHAR96('1', 0x40),
- CHAR96('1', 0x41),
- CHAR96('1', 0x42),
- CHAR96('1', 0x43),
- CHAR96('1', 0x44),
- CHAR96('1', 0x45),
- 0x1eb3 /* 0x46 */,
- 0x1eb5 /* 0x47 */,
- CHAR96('1', 0x48),
- CHAR96('1', 0x49),
- CHAR96('1', 0x4A),
- CHAR96('1', 0x4B),
- CHAR96('1', 0x4C),
- CHAR96('1', 0x4D),
- CHAR96('1', 0x4E),
- 0x1ef3 /* 0x4f */,
- CHAR96('1', 0x50),
- 0x1ee9 /* 0x51 */,
- CHAR96('1', 0x52),
- CHAR96('1', 0x53),
- CHAR96('1', 0x54),
- 0x1ea1 /* 0x55 */,
- 0x1ef7 /* 0x56 */,
- 0x1eeb /* 0x57 */,
- 0x1eed /* 0x58 */,
- CHAR96('1', 0x59),
- CHAR96('1', 0x5A),
- 0x1ef9 /* 0x5b */,
- 0x1ef5 /* 0x5c */,
- CHAR96('1', 0x5D),
- 0x1ee1 /* 0x5e */,
- 0x01b0 /* 0x5f */,
- 0x00e0 /* 0x60 */,
- 0x00e1 /* 0x61 */,
- 0x00e2 /* 0x62 */,
- 0x00e3 /* 0x63 */,
- 0x1ea3 /* 0x64 */,
- 0x0103 /* 0x65 */,
- 0x1eef /* 0x66 */,
- 0x1eab /* 0x67 */,
- 0x00e8 /* 0x68 */,
- 0x00e9 /* 0x69 */,
- 0x00ea /* 0x6a */,
- 0x1ebb /* 0x6b */,
- 0x00ec /* 0x6c */,
- 0x00ed /* 0x6d */,
- 0x0129 /* 0x6e */,
- 0x1ec9 /* 0x6f */,
- 0x0111 /* 0x70 */,
- 0x1ef1 /* 0x71 */,
- 0x00f2 /* 0x72 */,
- 0x00f3 /* 0x73 */,
- 0x00f4 /* 0x74 */,
- 0x00f5 /* 0x75 */,
- 0x1ecf /* 0x76 */,
- 0x1ecd /* 0x77 */,
- 0x1ee5 /* 0x78 */,
- 0x00f9 /* 0x79 */,
- 0x00fa /* 0x7a */,
- 0x0169 /* 0x7b */,
- 0x1ee7 /* 0x7c */,
- 0x00fd /* 0x7d */,
- 0x1ee3 /* 0x7e */,
- CHAR96('1', 0x7F)
-};
+Lisp_Object
+put_char_attribute (Lisp_Object character, Lisp_Object attribute,
+ Lisp_Object value)
+{
+ Emchar char_code = XCHAR (character);
+ Lisp_Object ret
+ = get_char_code_table (char_code, Vcharacter_attribute_table);
+ Lisp_Object cell;
-Emchar latin_viscii_upper_to_ucs[96] =
-{
- CHAR96('2', 0x20),
- 0x1eae /* 0x21 */,
- 0x1eb0 /* 0x22 */,
- 0x1eb6 /* 0x23 */,
- 0x1ea4 /* 0x24 */,
- 0x1ea6 /* 0x25 */,
- 0x1ea8 /* 0x26 */,
- 0x1eac /* 0x27 */,
- 0x1ebc /* 0x28 */,
- 0x1eb8 /* 0x29 */,
- 0x1ebe /* 0x2a */,
- 0x1ec0 /* 0x2b */,
- 0x1ec2 /* 0x2c */,
- 0x1ec4 /* 0x2d */,
- 0x1ec6 /* 0x2e */,
- 0x1ed0 /* 0x2f */,
- 0x1ed2 /* 0x30 */,
- 0x1ed4 /* 0x31 */,
- 0x1ed6 /* 0x32 */,
- CHAR96('2', 0x33),
- CHAR96('2', 0x34),
- 0x1ed8 /* 0x35 */,
- 0x1edc /* 0x36 */,
- 0x1ede /* 0x37 */,
- 0x1eca /* 0x38 */,
- CHAR96('2', 0x39),
- CHAR96('2', 0x3a),
- CHAR96('2', 0x3b),
- CHAR96('2', 0x3c),
- 0x01a0 /* 0x3d */,
- 0x1eda /* 0x3e */,
- CHAR96('2', 0x3f),
- CHAR96('2', 0x40),
- CHAR96('2', 0x41),
- CHAR96('2', 0x42),
- CHAR96('2', 0x43),
- CHAR96('2', 0x44),
- CHAR96('2', 0x45),
- 0x1eb2 /* 0x46 */,
- 0x1eb4 /* 0x47 */,
- CHAR96('2', 0x48),
- CHAR96('2', 0x49),
- CHAR96('2', 0x4a),
- CHAR96('2', 0x4b),
- CHAR96('2', 0x4c),
- CHAR96('2', 0x4d),
- CHAR96('2', 0x4e),
- 0x1ef2 /* 0x4f */,
- CHAR96('2', 0x50),
- 0x1ee8 /* 0x51 */,
- CHAR96('2', 0x52),
- CHAR96('2', 0x53),
- CHAR96('2', 0x54),
- 0x1ea0 /* 0x55 */,
- 0x1ef6 /* 0x56 */,
- 0x1eea /* 0x57 */,
- 0x1eec /* 0x58 */,
- CHAR96('2', 0x59),
- CHAR96('2', 0x5a),
- 0x1ef8 /* 0x5b */,
- 0x1ef4 /* 0x5c */,
- CHAR96('2', 0x5d),
- 0x1ee0 /* 0x5e */,
- 0x01af /* 0x5f */,
- 0x00c0 /* 0x60 */,
- 0x00c1 /* 0x61 */,
- 0x00c2 /* 0x62 */,
- 0x00c3 /* 0x63 */,
- 0x1ea2 /* 0x64 */,
- 0x0102 /* 0x65 */,
- 0x1eee /* 0x66 */,
- 0x1eaa /* 0x67 */,
- 0x00c8 /* 0x68 */,
- 0x00c9 /* 0x69 */,
- 0x00ca /* 0x6a */,
- 0x1eba /* 0x6b */,
- 0x00cc /* 0x6c */,
- 0x00cd /* 0x6d */,
- 0x0128 /* 0x6e */,
- 0x1ec8 /* 0x6f */,
- 0x0110 /* 0x70 */,
- 0x1ef0 /* 0x71 */,
- 0x00d2 /* 0x72 */,
- 0x00d3 /* 0x73 */,
- 0x00d4 /* 0x74 */,
- 0x00d5 /* 0x75 */,
- 0x1ece /* 0x76 */,
- 0x1ecc /* 0x77 */,
- 0x1ee4 /* 0x78 */,
- 0x00d9 /* 0x79 */,
- 0x00da /* 0x7a */,
- 0x0168 /* 0x7b */,
- 0x1ee6 /* 0x7c */,
- 0x00dd /* 0x7d */,
- 0x1ee2 /* 0x7e */,
- CHAR96('2', 0x7f)
-};
+ cell = Fassq (attribute, ret);
-Emchar latin_tcvn5712_to_ucs[96] =
-{
- 0x00A0 /* 0xA0 NO-BREAK SPACE */,
- 0x0102 /* 0xA1 LATIN CAPITAL LETTER A WITH BREVE */,
- 0x00C2 /* 0xA2 LATIN CAPITAL LETTER A WITH CIRCUMFLEX */,
- 0x00CA /* 0xA3 LATIN CAPITAL LETTER E WITH CIRCUMFLEX */,
- 0x00D4 /* 0xA4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX */,
- 0x01A0 /* 0xA5 LATIN CAPITAL LETTER O WITH HORN */,
- 0x01AF /* 0xA6 LATIN CAPITAL LETTER U WITH HORN */,
- 0x0110 /* 0xA7 LATIN CAPITAL LETTER D WITH STROKE */,
- 0x0103 /* 0xA8 LATIN SMALL LETTER A WITH BREVE */,
- 0x00E2 /* 0xA9 LATIN SMALL LETTER A WITH CIRCUMFLEX */,
- 0x00EA /* 0xAA LATIN SMALL LETTER E WITH CIRCUMFLEX */,
- 0x00F4 /* 0xAB LATIN SMALL LETTER O WITH CIRCUMFLEX */,
- 0x01A1 /* 0xAC LATIN SMALL LETTER O WITH HORN */,
- 0x01B0 /* 0xAD LATIN SMALL LETTER U WITH HORN */,
- 0x0111 /* 0xAE LATIN SMALL LETTER D WITH STROKE */,
- 0x1EB0 /* 0xAF LATIN CAPITAL LETTER A WITH BREVE AND GRAVE */,
- 0x0300 /* 0xB0 COMBINING GRAVE ACCENT */,
- 0x0309 /* 0xB1 COMBINING HOOK ABOVE */,
- 0x0303 /* 0xB2 COMBINING TILDE */,
- 0x0301 /* 0xB3 COMBINING ACUTE ACCENT */,
- 0x0323 /* 0xB4 COMBINING DOT BELOW */,
- 0x00E0 /* 0xB5 LATIN SMALL LETTER A WITH GRAVE */,
- 0x1EA3 /* 0xB6 LATIN SMALL LETTER A WITH HOOK ABOVE */,
- 0x00E3 /* 0xB7 LATIN SMALL LETTER A WITH TILDE */,
- 0x00E1 /* 0xB8 LATIN SMALL LETTER A WITH ACUTE */,
- 0x1EA1 /* 0xB9 LATIN SMALL LETTER A WITH DOT BELOW */,
- 0x1EB2 /* 0xBA LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE */,
- 0x1EB1 /* 0xBB LATIN SMALL LETTER A WITH BREVE AND GRAVE */,
- 0x1EB3 /* 0xBC LATIN SMALL LETTER A WITH BREVE AND HOOK ABOVE */,
- 0x1EB5 /* 0xBD LATIN SMALL LETTER A WITH BREVE AND TILDE */,
- 0x1EAF /* 0xBE LATIN SMALL LETTER A WITH BREVE AND ACUTE */,
- 0x1EB4 /* 0xBF LATIN CAPITAL LETTER A WITH BREVE AND TILDE */,
- 0x1EAE /* 0xC0 LATIN CAPITAL LETTER A WITH BREVE AND ACUTE */,
- 0x1EA6 /* 0xC1 LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND GRAVE */,
- 0x1EA8 /* 0xC2 LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE */,
- 0x1EAA /* 0xC3 LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND TILDE */,
- 0x1EA4 /* 0xC4 LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE */,
- 0x1EC0 /* 0xC5 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND GRAVE */,
- 0x1EB7 /* 0xC6 LATIN SMALL LETTER A WITH BREVE AND DOT BELOW */,
- 0x1EA7 /* 0xC7 LATIN SMALL LETTER A WITH CIRCUMFLEX AND GRAVE */,
- 0x1EA9 /* 0xC8 LATIN SMALL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE */,
- 0x1EAB /* 0xC9 LATIN SMALL LETTER A WITH CIRCUMFLEX AND TILDE */,
- 0x1EA5 /* 0xCA LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE */,
- 0x1EAD /* 0xCB LATIN SMALL LETTER A WITH CIRCUMFLEX AND DOT BELOW */,
- 0x00E8 /* 0xCC LATIN SMALL LETTER E WITH GRAVE */,
- 0x1EC2 /* 0xCD LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE */,
- 0x1EBB /* 0xCE LATIN SMALL LETTER E WITH HOOK ABOVE */,
- 0x1EBD /* 0xCF LATIN SMALL LETTER E WITH TILDE */,
- 0x00E9 /* 0xD0 LATIN SMALL LETTER E WITH ACUTE */,
- 0x1EB9 /* 0xD1 LATIN SMALL LETTER E WITH DOT BELOW */,
- 0x1EC1 /* 0xD2 LATIN SMALL LETTER E WITH CIRCUMFLEX AND GRAVE */,
- 0x1EC3 /* 0xD3 LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE */,
- 0x1EC5 /* 0xD4 LATIN SMALL LETTER E WITH CIRCUMFLEX AND TILDE */,
- 0x1EBF /* 0xD5 LATIN SMALL LETTER E WITH CIRCUMFLEX AND ACUTE */,
- 0x1EC7 /* 0xD6 LATIN SMALL LETTER E WITH CIRCUMFLEX AND DOT BELOW */,
- 0x00EC /* 0xD7 LATIN SMALL LETTER I WITH GRAVE */,
- 0x1EC9 /* 0xD8 LATIN SMALL LETTER I WITH HOOK ABOVE */,
- 0x1EC4 /* 0xD9 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND TILDE */,
- 0x1EBE /* 0xDA LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE */,
- 0x1ED2 /* 0xDB LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND GRAVE */,
- 0x0129 /* 0xDC LATIN SMALL LETTER I WITH TILDE */,
- 0x00ED /* 0xDD LATIN SMALL LETTER I WITH ACUTE */,
- 0x1ECB /* 0xDE LATIN SMALL LETTER I WITH DOT BELOW */,
- 0x00F2 /* 0xDF LATIN SMALL LETTER O WITH GRAVE */,
- 0x1ED4 /* 0xE0 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE */,
- 0x1ECF /* 0xE1 LATIN SMALL LETTER O WITH HOOK ABOVE */,
- 0x00F5 /* 0xE2 LATIN SMALL LETTER O WITH TILDE */,
- 0x00F3 /* 0xE3 LATIN SMALL LETTER O WITH ACUTE */,
- 0x1ECD /* 0xE4 LATIN SMALL LETTER O WITH DOT BELOW */,
- 0x1ED3 /* 0xE5 LATIN SMALL LETTER O WITH CIRCUMFLEX AND GRAVE */,
- 0x1ED5 /* 0xE6 LATIN SMALL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE */,
- 0x1ED7 /* 0xE7 LATIN SMALL LETTER O WITH CIRCUMFLEX AND TILDE */,
- 0x1ED1 /* 0xE8 LATIN SMALL LETTER O WITH CIRCUMFLEX AND ACUTE */,
- 0x1ED9 /* 0xE9 LATIN SMALL LETTER O WITH CIRCUMFLEX AND DOT BELOW */,
- 0x1EDD /* 0xEA LATIN SMALL LETTER O WITH HORN AND GRAVE */,
- 0x1EDF /* 0xEB LATIN SMALL LETTER O WITH HORN AND HOOK ABOVE */,
- 0x1EE1 /* 0xEC LATIN SMALL LETTER O WITH HORN AND TILDE */,
- 0x1EDB /* 0xED LATIN SMALL LETTER O WITH HORN AND ACUTE */,
- 0x1EE3 /* 0xEE LATIN SMALL LETTER O WITH HORN AND DOT BELOW */,
- 0x00F9 /* 0xEF LATIN SMALL LETTER U WITH GRAVE */,
- 0x1ED6 /* 0xF0 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND TILDE */,
- 0x1EE7 /* 0xF1 LATIN SMALL LETTER U WITH HOOK ABOVE */,
- 0x0169 /* 0xF2 LATIN SMALL LETTER U WITH TILDE */,
- 0x00FA /* 0xF3 LATIN SMALL LETTER U WITH ACUTE */,
- 0x1EE5 /* 0xF4 LATIN SMALL LETTER U WITH DOT BELOW */,
- 0x1EEB /* 0xF5 LATIN SMALL LETTER U WITH HORN AND GRAVE */,
- 0x1EED /* 0xF6 LATIN SMALL LETTER U WITH HORN AND HOOK ABOVE */,
- 0x1EEF /* 0xF7 LATIN SMALL LETTER U WITH HORN AND TILDE */,
- 0x1EE9 /* 0xF8 LATIN SMALL LETTER U WITH HORN AND ACUTE */,
- 0x1EF1 /* 0xF9 LATIN SMALL LETTER U WITH HORN AND DOT BELOW */,
- 0x1EF3 /* 0xFA LATIN SMALL LETTER Y WITH GRAVE */,
- 0x1EF7 /* 0xFB LATIN SMALL LETTER Y WITH HOOK ABOVE */,
- 0x1EF9 /* 0xFC LATIN SMALL LETTER Y WITH TILDE */,
- 0x00FD /* 0xFD LATIN SMALL LETTER Y WITH ACUTE */,
- 0x1EF5 /* 0xFE LATIN SMALL LETTER Y WITH DOT BELOW */,
- 0x1ED0 /* 0xFF LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE */
-};
+ if (NILP (cell))
+ {
+ ret = Fcons (Fcons (attribute, value), ret);
+ }
+ else if (!EQ (Fcdr (cell), value))
+ {
+ Fsetcdr (cell, value);
+ }
+ put_char_code_table (char_code, ret, Vcharacter_attribute_table);
+ return ret;
+}
+
+DEFUN ("put-char-attribute", Fput_char_attribute, 3, 3, 0, /*
+Store CHARACTER's ATTRIBUTE with VALUE.
+*/
+ (character, attribute, value))
+{
+ Lisp_Object ccs;
+
+ CHECK_CHAR (character);
+ ccs = Ffind_charset (attribute);
+ if (!NILP (ccs))
+ {
+ Lisp_Object rest;
+ Lisp_Object v = XCHARSET_DECODING_TABLE (ccs);
+ Lisp_Object nv;
+ int i = -1;
+ int ccs_len;
+
+ /* ad-hoc method for `ascii' */
+ if ((XCHARSET_CHARS (ccs) == 94) &&
+ (XCHARSET_BYTE_OFFSET (ccs) != 33))
+ ccs_len = 128 - XCHARSET_BYTE_OFFSET (ccs);
+ else
+ ccs_len = XCHARSET_CHARS (ccs);
+
+ if (!CONSP (value))
+ signal_simple_error ("Invalid value for coded-charset",
+ value);
+
+ attribute = ccs;
+ rest = Fget_char_attribute (character, attribute);
+ if (VECTORP (v))
+ {
+ if (!NILP (rest))
+ {
+ while (!NILP (rest))
+ {
+ Lisp_Object ei = Fcar (rest);
+
+ i = XINT (ei) - XCHARSET_BYTE_OFFSET (ccs);
+ nv = XVECTOR_DATA(v)[i];
+ if (!VECTORP (nv))
+ break;
+ v = nv;
+ rest = Fcdr (rest);
+ }
+ if (i >= 0)
+ XVECTOR_DATA(v)[i] = Qnil;
+ v = XCHARSET_DECODING_TABLE (ccs);
+ }
+ }
+ else
+ {
+ XCHARSET_DECODING_TABLE (ccs) = v = make_vector (ccs_len, Qnil);
+ }
+
+ if (XCHARSET_GRAPHIC (ccs) == 1)
+ value = Fcopy_list (value);
+ rest = value;
+ i = -1;
+ while (CONSP (rest))
+ {
+ Lisp_Object ei = Fcar (rest);
+
+ if (!INTP (ei))
+ signal_simple_error ("Invalid value for coded-charset", value);
+ i = XINT (ei);
+ if ((i < 0) || (255 < i))
+ signal_simple_error ("Invalid value for coded-charset", value);
+ if (XCHARSET_GRAPHIC (ccs) == 1)
+ {
+ i &= 0x7F;
+ Fsetcar (rest, make_int (i));
+ }
+ i -= XCHARSET_BYTE_OFFSET (ccs);
+ nv = XVECTOR_DATA(v)[i];
+ rest = Fcdr (rest);
+ if (CONSP (rest))
+ {
+ if (!VECTORP (nv))
+ {
+ nv = (XVECTOR_DATA(v)[i] = make_vector (ccs_len, Qnil));
+ }
+ v = nv;
+ }
+ else
+ break;
+ }
+ XVECTOR_DATA(v)[i] = character;
+ }
+ else if (EQ (attribute, Q_decomposition))
+ {
+ Lisp_Object rest = value;
+ Lisp_Object table = Vcharacter_composition_table;
+
+ if (!CONSP (value))
+ signal_simple_error ("Invalid value for ->decomposition",
+ value);
+
+ while (CONSP (rest))
+ {
+ Lisp_Object v = Fcar (rest);
+ Lisp_Object ntable;
+ Emchar c
+ = to_char_code (v, "Invalid value for ->decomposition", value);
+
+ rest = Fcdr (rest);
+ if (!CONSP (rest))
+ {
+ put_char_code_table (c, character, table);
+ break;
+ }
+ else
+ {
+ ntable = get_char_code_table (c, table);
+ if (!CHAR_CODE_TABLE_P (ntable))
+ {
+ ntable = make_char_code_table (Qnil);
+ put_char_code_table (c, ntable, table);
+ }
+ table = ntable;
+ }
+ }
+ }
+ else if (EQ (attribute, Q_ucs))
+ {
+ Lisp_Object ret;
+ Emchar c;
+
+ if (!INTP (value))
+ signal_simple_error ("Invalid value for ->ucs", value);
+
+ c = XINT (value);
+
+ ret = get_char_code_table (c, Vcharacter_variant_table);
+ if (NILP (Fmemq (character, ret)))
+ {
+ put_char_code_table (c, Fcons (character, ret),
+ Vcharacter_variant_table);
+ }
+ }
+ return put_char_attribute (character, attribute, value);
+}
+
+Lisp_Object Qucs;
+
+DEFUN ("define-char", Fdefine_char, 1, 1, 0, /*
+Store character's ATTRIBUTES.
+*/
+ (attributes))
+{
+ Lisp_Object rest = attributes;
+ Lisp_Object code = Fcdr (Fassq (Qucs, attributes));
+ Lisp_Object character;
+
+ if (NILP (code))
+ {
+ while (CONSP (rest))
+ {
+ Lisp_Object cell = Fcar (rest);
+ Lisp_Object ccs;
+
+ if (!LISTP (cell))
+ signal_simple_error ("Invalid argument", attributes);
+ if (!NILP (ccs = Ffind_charset (Fcar (cell)))
+ && XCHARSET_FINAL (ccs))
+ {
+ Emchar code;
+
+ if (XCHARSET_DIMENSION (ccs) == 1)
+ {
+ Lisp_Object eb1 = Fcar (Fcdr (cell));
+ int b1;
+
+ if (!INTP (eb1))
+ signal_simple_error ("Invalid argument", attributes);
+ b1 = XINT (eb1);
+ switch (XCHARSET_CHARS (ccs))
+ {
+ case 94:
+ code = MIN_CHAR_94
+ + (XCHARSET_FINAL (ccs) - '0') * 94 + (b1 - 33);
+ break;
+ case 96:
+ code = MIN_CHAR_96
+ + (XCHARSET_FINAL (ccs) - '0') * 96 + (b1 - 32);
+ break;
+ default:
+ abort ();
+ }
+ }
+ else if (XCHARSET_DIMENSION (ccs) == 2)
+ {
+ Lisp_Object eb1 = Fcar (Fcdr (cell));
+ Lisp_Object eb2 = Fcar (Fcdr (Fcdr (cell)));
+ int b1, b2;
+
+ if (!INTP (eb1))
+ signal_simple_error ("Invalid argument", attributes);
+ b1 = XINT (eb1);
+ if (!INTP (eb2))
+ signal_simple_error ("Invalid argument", attributes);
+ b2 = XINT (eb2);
+ switch (XCHARSET_CHARS (ccs))
+ {
+ case 94:
+ code = MIN_CHAR_94x94
+ + (XCHARSET_FINAL (ccs) - '0') * 94 * 94
+ + (b1 - 33) * 94 + (b2 - 33);
+ break;
+ case 96:
+ code = MIN_CHAR_96x96
+ + (XCHARSET_FINAL (ccs) - '0') * 96 * 96
+ + (b1 - 32) * 96 + (b2 - 32);
+ break;
+ default:
+ abort ();
+ }
+ }
+ else
+ {
+ rest = Fcdr (rest);
+ continue;
+ }
+ character = make_char (code);
+ goto setup_attributes;
+ }
+ rest = Fcdr (rest);
+ }
+ return Qnil;
+ }
+ else if (!INTP (code))
+ signal_simple_error ("Invalid argument", attributes);
+ else
+ character = make_char (XINT (code));
+
+ setup_attributes:
+ rest = attributes;
+ while (CONSP (rest))
+ {
+ Lisp_Object cell = Fcar (rest);
+
+ if (!LISTP (cell))
+ signal_simple_error ("Invalid argument", attributes);
+ Fput_char_attribute (character, Fcar (cell), Fcdr (cell));
+ rest = Fcdr (rest);
+ }
+ return
+ get_char_code_table (XCHAR (character), Vcharacter_attribute_table);
+}
Lisp_Object Vutf_2000_version;
#endif
Qchinese_cns11643_2,
#ifdef UTF2000
Qucs_bmp,
+ Qlatin_viscii,
Qlatin_viscii_lower,
Qlatin_viscii_upper,
+ Qvietnamese_viscii_lower,
+ Qvietnamese_viscii_upper,
+ Qideograph_daikanwa,
+ Qethiopic_ucs,
#endif
Qchinese_big5_1,
Qchinese_big5_2,
Lisp_Object Vcharset_hash_table;
+#ifdef UTF2000
+static Charset_ID next_allocated_leading_byte;
+#else
static Charset_ID next_allocated_1_byte_leading_byte;
static Charset_ID next_allocated_2_byte_leading_byte;
+#endif
/* Composite characters are characters constructed by overstriking two
or more regular characters.
markobj (cs->doc_string);
markobj (cs->registry);
markobj (cs->ccl_program);
+#ifdef UTF2000
+ markobj (cs->decoding_table);
+#endif
return cs->name;
}
static const struct lrecord_description charset_description[] = {
{ XD_LISP_OBJECT, offsetof(struct Lisp_Charset, name), 7 },
+#ifdef UTF2000
+ { XD_LISP_OBJECT, offsetof(struct Lisp_Charset, decoding_table), 2 },
+#endif
{ XD_END }
};
mark_charset, print_charset, 0, 0, 0,
charset_description,
struct Lisp_Charset);
+
/* Make a new charset. */
static Lisp_Object
Bufbyte final, unsigned char direction, Lisp_Object short_name,
Lisp_Object long_name, Lisp_Object doc,
Lisp_Object reg,
- Emchar* decoding_table,
- Emchar ucs_min, Emchar ucs_max, Emchar code_offset)
+ Lisp_Object decoding_table,
+ Emchar ucs_min, Emchar ucs_max,
+ Emchar code_offset, unsigned char byte_offset)
{
Lisp_Object obj;
struct Lisp_Charset *cs =
CHARSET_CCL_PROGRAM (cs) = Qnil;
CHARSET_REVERSE_DIRECTION_CHARSET (cs) = Qnil;
#ifdef UTF2000
- CHARSET_DECODING_TABLE(cs) = decoding_table;
+ CHARSET_DECODING_TABLE(cs) = Qnil;
CHARSET_UCS_MIN(cs) = ucs_min;
CHARSET_UCS_MAX(cs) = ucs_max;
CHARSET_CODE_OFFSET(cs) = code_offset;
+ CHARSET_BYTE_OFFSET(cs) = byte_offset;
#endif
-
- switch ( CHARSET_TYPE (cs) )
+
+ switch (CHARSET_TYPE (cs))
{
case CHARSET_TYPE_94:
CHARSET_DIMENSION (cs) = 1;
CHARSET_CHARS (cs) = 94;
-#ifdef UTF2000
- if (decoding_table != NULL)
- {
- size_t i;
- CHARSET_TO_BYTE1_TABLE(cs) = make_byte_from_character_table();
- for (i = 0; i < 94; i++)
- {
- Emchar c = decoding_table[i];
-
- if (c <= 0xffff)
- put_byte_from_character_table (c, i + 33,
- CHARSET_TO_BYTE1_TABLE(cs));
- }
- }
- else
- CHARSET_TO_BYTE1_TABLE(cs) = NULL;
- CHARSET_TO_BYTE2_TABLE(cs) = NULL;
-#endif
break;
case CHARSET_TYPE_96:
CHARSET_DIMENSION (cs) = 1;
CHARSET_CHARS (cs) = 96;
-#ifdef UTF2000
- if (decoding_table != NULL)
- {
- size_t i;
- CHARSET_TO_BYTE1_TABLE(cs) = make_byte_from_character_table();
- for (i = 0; i < 96; i++)
- {
- Emchar c = decoding_table[i];
-
- if (c <= 0xffff)
- put_byte_from_character_table (c, i + 32,
- CHARSET_TO_BYTE1_TABLE(cs));
- }
- }
- else
- CHARSET_TO_BYTE1_TABLE(cs) = NULL;
- CHARSET_TO_BYTE2_TABLE(cs) = NULL;
-#endif
break;
case CHARSET_TYPE_94X94:
CHARSET_DIMENSION (cs) = 2;
CHARSET_CHARS (cs) = 94;
-#ifdef UTF2000
- CHARSET_TO_BYTE1_TABLE(cs) = NULL;
- CHARSET_TO_BYTE2_TABLE(cs) = NULL;
-#endif
break;
case CHARSET_TYPE_96X96:
CHARSET_DIMENSION (cs) = 2;
CHARSET_CHARS (cs) = 96;
-#ifdef UTF2000
- CHARSET_TO_BYTE1_TABLE(cs) = NULL;
- CHARSET_TO_BYTE2_TABLE(cs) = NULL;
-#endif
break;
#ifdef UTF2000
+ case CHARSET_TYPE_128:
+ CHARSET_DIMENSION (cs) = 1;
+ CHARSET_CHARS (cs) = 128;
+ break;
case CHARSET_TYPE_128X128:
CHARSET_DIMENSION (cs) = 2;
CHARSET_CHARS (cs) = 128;
-#ifdef UTF2000
- CHARSET_TO_BYTE1_TABLE(cs) = NULL;
- CHARSET_TO_BYTE2_TABLE(cs) = NULL;
-#endif
+ break;
+ case CHARSET_TYPE_256:
+ CHARSET_DIMENSION (cs) = 1;
+ CHARSET_CHARS (cs) = 256;
break;
case CHARSET_TYPE_256X256:
CHARSET_DIMENSION (cs) = 2;
CHARSET_CHARS (cs) = 256;
-#ifdef UTF2000
- CHARSET_TO_BYTE1_TABLE(cs) = NULL;
- CHARSET_TO_BYTE2_TABLE(cs) = NULL;
-#endif
break;
#endif
}
ASCII, Control-1, Composite, and the two faux private
charsets. */
#if UTF2000
- assert (NILP (charset_by_attributes[type][final]));
- charset_by_attributes[type][final] = obj;
+ if (code_offset == 0)
+ {
+ assert (NILP (charset_by_attributes[type][final]));
+ charset_by_attributes[type][final] = obj;
+ }
#else
assert (NILP (charset_by_attributes[type][final][direction]));
charset_by_attributes[type][final][direction] = obj;
{
Charset_ID lb;
+#ifdef UTF2000
+ if (next_allocated_leading_byte > MAX_LEADING_BYTE_PRIVATE)
+ lb = 0;
+ else
+ lb = next_allocated_leading_byte++;
+#else
if (dimension == 1)
{
if (next_allocated_1_byte_leading_byte > MAX_LEADING_BYTE_PRIVATE_1)
else
lb = next_allocated_2_byte_leading_byte++;
}
+#endif
if (!lb)
signal_simple_error
}
#ifdef UTF2000
-unsigned char
-charset_get_byte1 (Lisp_Object charset, Emchar ch)
+Lisp_Object
+range_charset_code_point (Lisp_Object charset, Emchar ch)
{
- Emchar_to_byte_table* table;
int d;
- if ((table = XCHARSET_TO_BYTE1_TABLE (charset)) != NULL)
- return get_byte_from_character_table (ch, table);
- else if ((CHARSET_UCS_MIN (XCHARSET (charset)) <= ch)
- && (ch <= CHARSET_UCS_MAX (XCHARSET (charset))))
- return ch - CHARSET_UCS_MIN (XCHARSET (charset))
- + CHARSET_CODE_OFFSET (XCHARSET (charset));
- else if (XCHARSET_DIMENSION (charset) == 1)
+ if ((XCHARSET_UCS_MIN (charset) <= ch)
+ && (ch <= XCHARSET_UCS_MAX (charset)))
+ {
+ d = ch - XCHARSET_UCS_MIN (charset) + XCHARSET_CODE_OFFSET (charset);
+
+ if (XCHARSET_DIMENSION (charset) == 1)
+ return list1 (make_int (d + XCHARSET_BYTE_OFFSET (charset)));
+ else if (XCHARSET_DIMENSION (charset) == 2)
+ return list2 (make_int (d / XCHARSET_CHARS (charset)
+ + XCHARSET_BYTE_OFFSET (charset)),
+ make_int (d % XCHARSET_CHARS (charset)
+ + XCHARSET_BYTE_OFFSET (charset)));
+ else if (XCHARSET_DIMENSION (charset) == 3)
+ return list3 (make_int (d / (XCHARSET_CHARS (charset)
+ * XCHARSET_CHARS (charset))
+ + XCHARSET_BYTE_OFFSET (charset)),
+ make_int (d / XCHARSET_CHARS (charset)
+ % XCHARSET_CHARS (charset)
+ + XCHARSET_BYTE_OFFSET (charset)),
+ make_int (d % XCHARSET_CHARS (charset)
+ + XCHARSET_BYTE_OFFSET (charset)));
+ else /* if (XCHARSET_DIMENSION (charset) == 4) */
+ return list4 (make_int (d / (XCHARSET_CHARS (charset)
+ * XCHARSET_CHARS (charset)
+ * XCHARSET_CHARS (charset))
+ + XCHARSET_BYTE_OFFSET (charset)),
+ make_int (d / (XCHARSET_CHARS (charset)
+ * XCHARSET_CHARS (charset))
+ % XCHARSET_CHARS (charset)
+ + XCHARSET_BYTE_OFFSET (charset)),
+ make_int (d / XCHARSET_CHARS (charset)
+ % XCHARSET_CHARS (charset)
+ + XCHARSET_BYTE_OFFSET (charset)),
+ make_int (d % XCHARSET_CHARS (charset)
+ + XCHARSET_BYTE_OFFSET (charset)));
+ }
+ else if (XCHARSET_CODE_OFFSET (charset) == 0)
{
- if (XCHARSET_CHARS (charset) == 94)
+ if (XCHARSET_DIMENSION (charset) == 1)
{
- if (((d = ch - (MIN_CHAR_94
- + (XCHARSET_FINAL (charset) - '0') * 94)) >= 0)
- && (d < 94))
- return d + 33;
+ if (XCHARSET_CHARS (charset) == 94)
+ {
+ if (((d = ch - (MIN_CHAR_94
+ + (XCHARSET_FINAL (charset) - '0') * 94)) >= 0)
+ && (d < 94))
+ return list1 (make_int (d + 33));
+ }
+ else if (XCHARSET_CHARS (charset) == 96)
+ {
+ if (((d = ch - (MIN_CHAR_96
+ + (XCHARSET_FINAL (charset) - '0') * 96)) >= 0)
+ && (d < 96))
+ return list1 (make_int (d + 32));
+ }
+ else
+ return Qnil;
}
- else if (XCHARSET_CHARS (charset) == 96)
+ else if (XCHARSET_DIMENSION (charset) == 2)
{
- if (((d = ch - (MIN_CHAR_96
- + (XCHARSET_FINAL (charset) - '0') * 96)) >= 0)
- && (d < 96))
- return d + 32;
+ if (XCHARSET_CHARS (charset) == 94)
+ {
+ if (((d = ch - (MIN_CHAR_94x94
+ + (XCHARSET_FINAL (charset) - '0') * 94 * 94))
+ >= 0)
+ && (d < 94 * 94))
+ return list2 (make_int ((d / 94) + 33),
+ make_int (d % 94 + 33));
+ }
+ else if (XCHARSET_CHARS (charset) == 96)
+ {
+ if (((d = ch - (MIN_CHAR_96x96
+ + (XCHARSET_FINAL (charset) - '0') * 96 * 96))
+ >= 0)
+ && (d < 96 * 96))
+ return list2 (make_int ((d / 96) + 32),
+ make_int (d % 96 + 32));
+ }
}
- else
- return 0;
}
- else if (XCHARSET_DIMENSION (charset) == 2)
+ return Qnil;
+}
+
+Lisp_Object
+split_builtin_char (Emchar c)
+{
+ if (c < MIN_CHAR_OBS_94x94)
{
- if (XCHARSET_CHARS (charset) == 94)
+ if (c <= MAX_CHAR_BASIC_LATIN)
{
- if (((d = ch - (MIN_CHAR_94x94
- + (XCHARSET_FINAL (charset) - '0') * 94 * 94)) >= 0)
- && (d < 94 * 94))
- return (d / 94) + 33;
+ return list2 (Vcharset_ascii, make_int (c));
}
- else if (XCHARSET_CHARS (charset) == 96)
+ else if (c < 0xA0)
+ {
+ return list2 (Vcharset_control_1, make_int (c & 0x7F));
+ }
+ else if (c <= 0xff)
+ {
+ return list2 (Vcharset_latin_iso8859_1, make_int (c & 0x7F));
+ }
+ else if ((MIN_CHAR_GREEK <= c) && (c <= MAX_CHAR_GREEK))
+ {
+ return list2 (Vcharset_greek_iso8859_7,
+ make_int (c - MIN_CHAR_GREEK + 0x20));
+ }
+ else if ((MIN_CHAR_CYRILLIC <= c) && (c <= MAX_CHAR_CYRILLIC))
+ {
+ return list2 (Vcharset_cyrillic_iso8859_5,
+ make_int (c - MIN_CHAR_CYRILLIC + 0x20));
+ }
+ else if ((MIN_CHAR_HEBREW <= c) && (c <= MAX_CHAR_HEBREW))
+ {
+ return list2 (Vcharset_hebrew_iso8859_8,
+ make_int (c - MIN_CHAR_HEBREW + 0x20));
+ }
+ else if ((MIN_CHAR_THAI <= c) && (c <= MAX_CHAR_THAI))
+ {
+ return list2 (Vcharset_thai_tis620,
+ make_int (c - MIN_CHAR_THAI + 0x20));
+ }
+ else if ((MIN_CHAR_HALFWIDTH_KATAKANA <= c)
+ && (c <= MAX_CHAR_HALFWIDTH_KATAKANA))
+ {
+ return list2 (Vcharset_katakana_jisx0201,
+ make_int (c - MIN_CHAR_HALFWIDTH_KATAKANA + 33));
+ }
+ else
{
- if (((d = ch - (MIN_CHAR_96x96
- + (XCHARSET_FINAL (charset) - '0') * 96 * 96)) >= 0)
- && (d < 96 * 96))
- return (d / 96) + 32;
+ return list3 (Vcharset_ucs_bmp,
+ make_int (c >> 8), make_int (c & 0xff));
}
}
- return 0;
+ else if (c <= MAX_CHAR_OBS_94x94)
+ {
+ return list3 (CHARSET_BY_ATTRIBUTES
+ (CHARSET_TYPE_94X94,
+ ((c - MIN_CHAR_OBS_94x94) / (94 * 94)) + '@',
+ CHARSET_LEFT_TO_RIGHT),
+ make_int ((((c - MIN_CHAR_OBS_94x94) / 94) % 94) + 33),
+ make_int (((c - MIN_CHAR_OBS_94x94) % 94) + 33));
+ }
+ else if (c <= MAX_CHAR_DAIKANWA)
+ {
+ return list3 (Vcharset_ideograph_daikanwa,
+ make_int ((c - MIN_CHAR_DAIKANWA) >> 8),
+ make_int ((c - MIN_CHAR_DAIKANWA) & 255));
+ }
+ else if (c <= MAX_CHAR_94)
+ {
+ return list2 (CHARSET_BY_ATTRIBUTES (CHARSET_TYPE_94,
+ ((c - MIN_CHAR_94) / 94) + '0',
+ CHARSET_LEFT_TO_RIGHT),
+ make_int (((c - MIN_CHAR_94) % 94) + 33));
+ }
+ else if (c <= MAX_CHAR_96)
+ {
+ return list2 (CHARSET_BY_ATTRIBUTES (CHARSET_TYPE_96,
+ ((c - MIN_CHAR_96) / 96) + '0',
+ CHARSET_LEFT_TO_RIGHT),
+ make_int (((c - MIN_CHAR_96) % 96) + 32));
+ }
+ else if (c <= MAX_CHAR_94x94)
+ {
+ return list3 (CHARSET_BY_ATTRIBUTES
+ (CHARSET_TYPE_94X94,
+ ((c - MIN_CHAR_94x94) / (94 * 94)) + '0',
+ CHARSET_LEFT_TO_RIGHT),
+ make_int ((((c - MIN_CHAR_94x94) / 94) % 94) + 33),
+ make_int (((c - MIN_CHAR_94x94) % 94) + 33));
+ }
+ else if (c <= MAX_CHAR_96x96)
+ {
+ return list3 (CHARSET_BY_ATTRIBUTES
+ (CHARSET_TYPE_96X96,
+ ((c - MIN_CHAR_96x96) / (96 * 96)) + '0',
+ CHARSET_LEFT_TO_RIGHT),
+ make_int ((((c - MIN_CHAR_96x96) / 96) % 96) + 32),
+ make_int (((c - MIN_CHAR_96x96) % 96) + 32));
+ }
+ else
+ {
+ return Qnil;
+ }
}
-unsigned char
-charset_get_byte2 (Lisp_Object charset, Emchar ch)
+Lisp_Object
+charset_code_point (Lisp_Object charset, Emchar ch)
{
- if (XCHARSET_DIMENSION (charset) == 1)
- return 0;
- else
+ Lisp_Object cdef = get_char_code_table (ch, Vcharacter_attribute_table);
+
+ if (!EQ (cdef, Qnil))
{
- Emchar_to_byte_table* table;
-
- if ((table = XCHARSET_TO_BYTE2_TABLE (charset)) != NULL)
- return get_byte_from_character_table (ch, table);
- else if (EQ (charset, Vcharset_ucs_bmp))
- return (ch >> 8) & 0xff;
- else if (XCHARSET_CHARS (charset) == 94)
- return (MIN_CHAR_94x94
- + (XCHARSET_FINAL (charset) - '0') * 94 * 94 <= ch)
- && (ch < MIN_CHAR_94x94
- + (XCHARSET_FINAL (charset) - '0' + 1) * 94 * 94) ?
- ((ch - MIN_CHAR_94x94) % 94) + 33 : 0;
- else /* if (XCHARSET_CHARS (charset) == 96) */
- return (MIN_CHAR_96x96
- + (XCHARSET_FINAL (charset) - '0') * 96 * 96 <= ch)
- && (ch < MIN_CHAR_96x96
- + (XCHARSET_FINAL (charset) - '0' + 1) * 96 * 96) ?
- ((ch - MIN_CHAR_96x96) % 96) + 32 : 0;
+ Lisp_Object field = Fassq (charset, cdef);
+
+ if (!EQ (field, Qnil))
+ return Fcdr (field);
}
+ return range_charset_code_point (charset, ch);
}
Lisp_Object Vdefault_coded_charset_priority_list;
Lisp_Object rest, keyword, value;
Lisp_Object ccl_program = Qnil;
Lisp_Object short_name = Qnil, long_name = Qnil;
+ int byte_offset = -1;
CHECK_SYMBOL (name);
if (!NILP (doc_string))
{
CHECK_INT (value);
graphic = XINT (value);
+#ifdef UTF2000
+ if (graphic < 0 || graphic > 2)
+#else
if (graphic < 0 || graphic > 1)
+#endif
signal_simple_error ("Invalid value for 'graphic", value);
}
error
("Character set already defined for this DIMENSION/CHARS/FINAL combo");
-#ifdef UTF2000
- if (dimension == 1)
- {
- if (chars == 94)
- {
- /* id = CHARSET_ID_OFFSET_94 + final; */
- id = get_unallocated_leading_byte (dimension);
- }
- else if (chars == 96)
- {
- id = get_unallocated_leading_byte (dimension);
- }
- else
- {
- abort ();
- }
- }
- else if (dimension == 2)
- {
- if (chars == 94)
- {
- id = get_unallocated_leading_byte (dimension);
- }
- else if (chars == 96)
- {
- id = get_unallocated_leading_byte (dimension);
- }
- else
- {
- abort ();
- }
- }
- else
- {
- abort ();
- }
-#else
id = get_unallocated_leading_byte (dimension);
-#endif
if (NILP (doc_string))
doc_string = build_string ("");
if (columns == -1)
columns = dimension;
+
+ if (byte_offset < 0)
+ {
+ if (chars == 94)
+ byte_offset = 33;
+ else if (chars == 96)
+ byte_offset = 32;
+ else
+ byte_offset = 0;
+ }
+
charset = make_charset (id, name, type, columns, graphic,
final, direction, short_name, long_name,
doc_string, registry,
- NULL, 0, 0, 0);
+ Qnil, 0, 0, 0, byte_offset);
if (!NILP (ccl_program))
XCHARSET_CCL_PROGRAM (charset) = ccl_program;
return charset;
CHARSET_DECODING_TABLE(cs),
CHARSET_UCS_MIN(cs),
CHARSET_UCS_MAX(cs),
- CHARSET_CODE_OFFSET(cs)
+ CHARSET_CODE_OFFSET(cs),
+ CHARSET_BYTE_OFFSET(cs)
#else
- NULL, 0, 0, 0
+ Qnil, 0, 0, 0, 0
#endif
);
return new_charset;
}
+DEFUN ("define-charset-alias", Fdefine_charset_alias, 2, 2, 0, /*
+Define symbol ALIAS as an alias for CHARSET.
+*/
+ (alias, charset))
+{
+ CHECK_SYMBOL (alias);
+ charset = Fget_charset (charset);
+ return Fputhash (alias, charset, Vcharset_hash_table);
+}
+
/* #### Reverse direction charsets not yet implemented. */
#if 0
DEFUN ("charset-reverse-direction-charset", Fcharset_reverse_direction_charset,
}
}
-/* Japanese folks may want to (set-charset-registry 'ascii "jisx0201") */
DEFUN ("set-charset-registry", Fset_charset_registry, 2, 2, 0, /*
Set the 'registry property of CHARSET to REGISTRY.
*/
return Qnil;
}
+#ifdef UTF2000
+DEFUN ("charset-mapping-table", Fcharset_mapping_table, 1, 1, 0, /*
+Return mapping-table of CHARSET.
+*/
+ (charset))
+{
+ return XCHARSET_DECODING_TABLE (Fget_charset (charset));
+}
+
+DEFUN ("set-charset-mapping-table", Fset_charset_mapping_table, 2, 2, 0, /*
+Set mapping-table of CHARSET to TABLE.
+*/
+ (charset, table))
+{
+ struct Lisp_Charset *cs;
+ Lisp_Object old_table;
+ size_t i;
+
+ charset = Fget_charset (charset);
+ cs = XCHARSET (charset);
+
+ if (EQ (table, Qnil))
+ {
+ CHARSET_DECODING_TABLE(cs) = table;
+ return table;
+ }
+ else if (VECTORP (table))
+ {
+ int ccs_len;
+
+ /* ad-hoc method for `ascii' */
+ if ((CHARSET_CHARS (cs) == 94) &&
+ (CHARSET_BYTE_OFFSET (cs) != 33))
+ ccs_len = 128 - CHARSET_BYTE_OFFSET (cs);
+ else
+ ccs_len = CHARSET_CHARS (cs);
+
+ if (XVECTOR_LENGTH (table) > ccs_len)
+ args_out_of_range (table, make_int (CHARSET_CHARS (cs)));
+ old_table = CHARSET_DECODING_TABLE(cs);
+ CHARSET_DECODING_TABLE(cs) = table;
+ }
+ else
+ signal_error (Qwrong_type_argument,
+ list2 (build_translated_string ("vector-or-nil-p"),
+ table));
+ /* signal_simple_error ("Wrong type argument: vector-or-nil-p", table); */
+
+ switch (CHARSET_DIMENSION (cs))
+ {
+ case 1:
+ for (i = 0; i < XVECTOR_LENGTH (table); i++)
+ {
+ Lisp_Object c = XVECTOR_DATA(table)[i];
+
+ if (CHARP (c))
+ put_char_attribute
+ (c, charset,
+ list1 (make_int (i + CHARSET_BYTE_OFFSET (cs))));
+ }
+ break;
+ case 2:
+ for (i = 0; i < XVECTOR_LENGTH (table); i++)
+ {
+ Lisp_Object v = XVECTOR_DATA(table)[i];
+
+ if (VECTORP (v))
+ {
+ size_t j;
+
+ if (XVECTOR_LENGTH (v) > CHARSET_CHARS (cs))
+ {
+ CHARSET_DECODING_TABLE(cs) = old_table;
+ args_out_of_range (v, make_int (CHARSET_CHARS (cs)));
+ }
+ for (j = 0; j < XVECTOR_LENGTH (v); j++)
+ {
+ Lisp_Object c = XVECTOR_DATA(v)[j];
+
+ if (CHARP (c))
+ put_char_attribute (c, charset,
+ list2
+ (make_int
+ (i + CHARSET_BYTE_OFFSET (cs)),
+ make_int
+ (j + CHARSET_BYTE_OFFSET (cs))));
+ }
+ }
+ else if (CHARP (v))
+ put_char_attribute (v, charset,
+ list1
+ (make_int (i + CHARSET_BYTE_OFFSET (cs))));
+ }
+ break;
+ }
+ return table;
+}
+#endif
+
\f
/************************************************************************/
/* Lisp primitives for working with characters */
*/
(character))
{
+#ifdef UTF2000
+ Lisp_Object ret;
+ Lisp_Object charset;
+
+ CHECK_CHAR_COERCE_INT (character);
+ ret = SPLIT_CHAR (XCHAR (character));
+ charset = Fcar (ret);
+ if (CHARSETP (charset))
+ return Fcons (XCHARSET_NAME (charset), Fcopy_list (Fcdr (ret)));
+ else
+ return ret;
+#else
/* This function can GC */
struct gcpro gcpro1, gcpro2;
Lisp_Object charset = Qnil;
rc = list2 (XCHARSET_NAME (charset), make_int (c1));
}
UNGCPRO;
-
return rc;
+#endif
}
\f
DEFSUBR (Fmake_charset);
DEFSUBR (Fmake_reverse_direction_charset);
/* DEFSUBR (Freverse_direction_charset); */
+ DEFSUBR (Fdefine_charset_alias);
DEFSUBR (Fcharset_from_attributes);
DEFSUBR (Fcharset_short_name);
DEFSUBR (Fcharset_long_name);
DEFSUBR (Fcharset_id);
DEFSUBR (Fset_charset_ccl_program);
DEFSUBR (Fset_charset_registry);
+#ifdef UTF2000
+ DEFSUBR (Fchar_attribute_alist);
+ DEFSUBR (Fget_char_attribute);
+ DEFSUBR (Fput_char_attribute);
+ DEFSUBR (Fdefine_char);
+ DEFSUBR (Fchar_variants);
+ DEFSUBR (Fget_composite_char);
+ DEFSUBR (Fcharset_mapping_table);
+ DEFSUBR (Fset_charset_mapping_table);
+#endif
DEFSUBR (Fmake_char);
DEFSUBR (Fchar_charset);
defsymbol (&Qchinese_cns11643_1, "chinese-cns11643-1");
defsymbol (&Qchinese_cns11643_2, "chinese-cns11643-2");
#ifdef UTF2000
+ defsymbol (&Q_ucs, "->ucs");
+ defsymbol (&Q_decomposition, "->decomposition");
+ defsymbol (&Qcompat, "compat");
+ defsymbol (&QnoBreak, "noBreak");
+ defsymbol (&Qfraction, "fraction");
+ defsymbol (&Qsuper, "super");
+ defsymbol (&Qsub, "sub");
+ defsymbol (&Qcircle, "circle");
+ defsymbol (&Qsquare, "square");
+ defsymbol (&Qwide, "wide");
+ defsymbol (&Qnarrow, "narrow");
+ defsymbol (&Qfont, "font");
+ defsymbol (&Qucs, "ucs");
defsymbol (&Qucs_bmp, "ucs-bmp");
- defsymbol (&Qlatin_viscii_lower, "vietnamese-viscii-lower");
- defsymbol (&Qlatin_viscii_upper, "vietnamese-viscii-upper");
+ defsymbol (&Qlatin_viscii, "latin-viscii");
+ defsymbol (&Qlatin_viscii_lower, "latin-viscii-lower");
+ defsymbol (&Qlatin_viscii_upper, "latin-viscii-upper");
+ defsymbol (&Qvietnamese_viscii_lower, "vietnamese-viscii-lower");
+ defsymbol (&Qvietnamese_viscii_upper, "vietnamese-viscii-upper");
+ defsymbol (&Qideograph_daikanwa, "ideograph-daikanwa");
+ defsymbol (&Qethiopic_ucs, "ethiopic-ucs");
#endif
defsymbol (&Qchinese_big5_1, "chinese-big5-1");
defsymbol (&Qchinese_big5_2, "chinese-big5-2");
charset_by_attributes[i][j][k] = Qnil;
#endif
- next_allocated_1_byte_leading_byte = MIN_LEADING_BYTE_PRIVATE_1;
#ifdef UTF2000
- next_allocated_2_byte_leading_byte = LEADING_BYTE_CHINESE_BIG5_2 + 1;
+ next_allocated_leading_byte = MIN_LEADING_BYTE_PRIVATE;
#else
+ next_allocated_1_byte_leading_byte = MIN_LEADING_BYTE_PRIVATE_1;
next_allocated_2_byte_leading_byte = MIN_LEADING_BYTE_PRIVATE_2;
#endif
#endif
#ifdef UTF2000
- Vutf_2000_version = build_string("0.8 (Kami)");
+ Vutf_2000_version = build_string("0.12 (Kashiwara)");
DEFVAR_LISP ("utf-2000-version", &Vutf_2000_version /*
Version number of UTF-2000.
*/ );
+ staticpro (&Vcharacter_attribute_table);
+ Vcharacter_attribute_table = make_char_code_table (Qnil);
+
+ staticpro (&Vcharacter_composition_table);
+ Vcharacter_composition_table = make_char_code_table (Qnil);
+
+ staticpro (&Vcharacter_variant_table);
+ Vcharacter_variant_table = make_char_code_table (Qnil);
+
Vdefault_coded_charset_priority_list = Qnil;
DEFVAR_LISP ("default-coded-charset-priority-list",
&Vdefault_coded_charset_priority_list /*
-Default order of preferred coded-character-set.
+Default order of preferred coded-character-sets.
*/ );
#endif
}
#ifdef UTF2000
Vcharset_ucs_bmp =
make_charset (LEADING_BYTE_UCS_BMP, Qucs_bmp,
- CHARSET_TYPE_256X256, 1, 0, 0,
+ CHARSET_TYPE_256X256, 1, 2, 0,
CHARSET_LEFT_TO_RIGHT,
build_string ("BMP"),
build_string ("BMP"),
- build_string ("BMP"),
- build_string (""),
- NULL, 0, 0xFFFF, 0);
+ build_string ("ISO/IEC 10646 Group 0 Plane 0 (BMP)"),
+ build_string ("\\(ISO10646.*-1\\|UNICODE[23]?-0\\)"),
+ Qnil, 0, 0xFFFF, 0, 0);
#else
-# define latin_iso8859_2_to_ucs NULL
-# define latin_iso8859_3_to_ucs NULL
-# define latin_iso8859_4_to_ucs NULL
-# define latin_iso8859_9_to_ucs NULL
-# define latin_jisx0201_to_ucs NULL
# define MIN_CHAR_THAI 0
# define MAX_CHAR_THAI 0
# define MIN_CHAR_GREEK 0
build_string ("ASCII)"),
build_string ("ASCII (ISO646 IRV)"),
build_string ("\\(iso8859-[0-9]*\\|-ascii\\)"),
- NULL, 0, 0x7F, 0);
+ Qnil, 0, 0x7F, 0, 0);
Vcharset_control_1 =
make_charset (LEADING_BYTE_CONTROL_1, Qcontrol_1,
CHARSET_TYPE_94, 1, 1, 0,
build_string ("Control characters"),
build_string ("Control characters 128-191"),
build_string (""),
- NULL, 0x80, 0x9F, 0);
+ Qnil, 0x80, 0x9F, 0, 0);
Vcharset_latin_iso8859_1 =
make_charset (LEADING_BYTE_LATIN_ISO8859_1, Qlatin_iso8859_1,
CHARSET_TYPE_96, 1, 1, 'A',
build_string ("ISO8859-1 (Latin-1)"),
build_string ("ISO8859-1 (Latin-1)"),
build_string ("iso8859-1"),
- NULL, 0xA0, 0xFF, 32);
+ Qnil, 0xA0, 0xFF, 0, 32);
Vcharset_latin_iso8859_2 =
make_charset (LEADING_BYTE_LATIN_ISO8859_2, Qlatin_iso8859_2,
CHARSET_TYPE_96, 1, 1, 'B',
build_string ("ISO8859-2 (Latin-2)"),
build_string ("ISO8859-2 (Latin-2)"),
build_string ("iso8859-2"),
- latin_iso8859_2_to_ucs, 0, 0, 32);
+ Qnil, 0, 0, 0, 32);
Vcharset_latin_iso8859_3 =
make_charset (LEADING_BYTE_LATIN_ISO8859_3, Qlatin_iso8859_3,
CHARSET_TYPE_96, 1, 1, 'C',
build_string ("ISO8859-3 (Latin-3)"),
build_string ("ISO8859-3 (Latin-3)"),
build_string ("iso8859-3"),
- latin_iso8859_3_to_ucs, 0, 0, 32);
+ Qnil, 0, 0, 0, 32);
Vcharset_latin_iso8859_4 =
make_charset (LEADING_BYTE_LATIN_ISO8859_4, Qlatin_iso8859_4,
CHARSET_TYPE_96, 1, 1, 'D',
build_string ("ISO8859-4 (Latin-4)"),
build_string ("ISO8859-4 (Latin-4)"),
build_string ("iso8859-4"),
- latin_iso8859_4_to_ucs, 0, 0, 32);
+ Qnil, 0, 0, 0, 32);
Vcharset_thai_tis620 =
make_charset (LEADING_BYTE_THAI_TIS620, Qthai_tis620,
CHARSET_TYPE_96, 1, 1, 'T',
build_string ("TIS620 (Thai)"),
build_string ("TIS620.2529 (Thai)"),
build_string ("tis620"),
- NULL, MIN_CHAR_THAI, MAX_CHAR_THAI, 32);
+ Qnil, MIN_CHAR_THAI, MAX_CHAR_THAI, 0, 32);
Vcharset_greek_iso8859_7 =
make_charset (LEADING_BYTE_GREEK_ISO8859_7, Qgreek_iso8859_7,
CHARSET_TYPE_96, 1, 1, 'F',
build_string ("ISO8859-7 (Greek)"),
build_string ("ISO8859-7 (Greek)"),
build_string ("iso8859-7"),
- NULL, MIN_CHAR_GREEK, MAX_CHAR_GREEK, 32);
+ Qnil, MIN_CHAR_GREEK, MAX_CHAR_GREEK, 0, 32);
Vcharset_arabic_iso8859_6 =
make_charset (LEADING_BYTE_ARABIC_ISO8859_6, Qarabic_iso8859_6,
CHARSET_TYPE_96, 1, 1, 'G',
build_string ("ISO8859-6 (Arabic)"),
build_string ("ISO8859-6 (Arabic)"),
build_string ("iso8859-6"),
- NULL, 0, 0, 32);
+ Qnil, 0, 0, 0, 32);
Vcharset_hebrew_iso8859_8 =
make_charset (LEADING_BYTE_HEBREW_ISO8859_8, Qhebrew_iso8859_8,
CHARSET_TYPE_96, 1, 1, 'H',
build_string ("ISO8859-8 (Hebrew)"),
build_string ("ISO8859-8 (Hebrew)"),
build_string ("iso8859-8"),
- NULL, MIN_CHAR_HEBREW, MAX_CHAR_HEBREW, 32);
+ Qnil, MIN_CHAR_HEBREW, MAX_CHAR_HEBREW, 0, 32);
Vcharset_katakana_jisx0201 =
make_charset (LEADING_BYTE_KATAKANA_JISX0201, Qkatakana_jisx0201,
CHARSET_TYPE_94, 1, 1, 'I',
build_string ("JISX0201 Kana"),
build_string ("JISX0201.1976 (Japanese Kana)"),
build_string ("JISX0201.1976 Japanese Kana"),
- build_string ("jisx0201.1976"),
- NULL,
+ build_string ("jisx0201\\.1976"),
+ Qnil,
MIN_CHAR_HALFWIDTH_KATAKANA,
- MAX_CHAR_HALFWIDTH_KATAKANA, 33);
+ MAX_CHAR_HALFWIDTH_KATAKANA, 0, 33);
Vcharset_latin_jisx0201 =
make_charset (LEADING_BYTE_LATIN_JISX0201, Qlatin_jisx0201,
CHARSET_TYPE_94, 1, 0, 'J',
build_string ("JISX0201 Roman"),
build_string ("JISX0201.1976 (Japanese Roman)"),
build_string ("JISX0201.1976 Japanese Roman"),
- build_string ("jisx0201.1976"),
- latin_jisx0201_to_ucs, 0, 0, 33);
+ build_string ("jisx0201\\.1976"),
+ Qnil, 0, 0, 0, 33);
Vcharset_cyrillic_iso8859_5 =
make_charset (LEADING_BYTE_CYRILLIC_ISO8859_5, Qcyrillic_iso8859_5,
CHARSET_TYPE_96, 1, 1, 'L',
build_string ("ISO8859-5 (Cyrillic)"),
build_string ("ISO8859-5 (Cyrillic)"),
build_string ("iso8859-5"),
- NULL, MIN_CHAR_CYRILLIC, MAX_CHAR_CYRILLIC, 32);
+ Qnil, MIN_CHAR_CYRILLIC, MAX_CHAR_CYRILLIC, 0, 32);
Vcharset_latin_iso8859_9 =
make_charset (LEADING_BYTE_LATIN_ISO8859_9, Qlatin_iso8859_9,
CHARSET_TYPE_96, 1, 1, 'M',
build_string ("ISO8859-9 (Latin-5)"),
build_string ("ISO8859-9 (Latin-5)"),
build_string ("iso8859-9"),
- latin_iso8859_9_to_ucs, 0, 0, 32);
+ Qnil, 0, 0, 0, 32);
Vcharset_japanese_jisx0208_1978 =
make_charset (LEADING_BYTE_JAPANESE_JISX0208_1978, Qjapanese_jisx0208_1978,
CHARSET_TYPE_94X94, 2, 0, '@',
CHARSET_LEFT_TO_RIGHT,
- build_string ("JISX0208.1978"),
- build_string ("JISX0208.1978 (Japanese)"),
+ build_string ("JIS X0208:1978"),
+ build_string ("JIS X0208:1978 (Japanese)"),
build_string
- ("JISX0208.1978 Japanese Kanji (so called \"old JIS\")"),
+ ("JIS X0208:1978 Japanese Kanji (so called \"old JIS\")"),
build_string ("\\(jisx0208\\|jisc6226\\)\\.1978"),
- NULL, 0, 0, 33);
+ Qnil, 0, 0, 0, 33);
Vcharset_chinese_gb2312 =
make_charset (LEADING_BYTE_CHINESE_GB2312, Qchinese_gb2312,
CHARSET_TYPE_94X94, 2, 0, 'A',
build_string ("GB2312)"),
build_string ("GB2312 Chinese simplified"),
build_string ("gb2312"),
- NULL, 0, 0, 33);
+ Qnil, 0, 0, 0, 33);
Vcharset_japanese_jisx0208 =
make_charset (LEADING_BYTE_JAPANESE_JISX0208, Qjapanese_jisx0208,
CHARSET_TYPE_94X94, 2, 0, 'B',
CHARSET_LEFT_TO_RIGHT,
build_string ("JISX0208"),
- build_string ("JISX0208.1983/1990 (Japanese)"),
- build_string ("JISX0208.1983/1990 Japanese Kanji"),
- build_string ("jisx0208.19\\(83\\|90\\)"),
- NULL, 0, 0, 33);
+ build_string ("JIS X0208:1983 (Japanese)"),
+ build_string ("JIS X0208:1983 Japanese Kanji"),
+ build_string ("jisx0208\\.1983"),
+ Qnil, 0, 0, 0, 33);
Vcharset_korean_ksc5601 =
make_charset (LEADING_BYTE_KOREAN_KSC5601, Qkorean_ksc5601,
CHARSET_TYPE_94X94, 2, 0, 'C',
build_string ("KSC5601 (Korean"),
build_string ("KSC5601 Korean Hangul and Hanja"),
build_string ("ksc5601"),
- NULL, 0, 0, 33);
+ Qnil, 0, 0, 0, 33);
Vcharset_japanese_jisx0212 =
make_charset (LEADING_BYTE_JAPANESE_JISX0212, Qjapanese_jisx0212,
CHARSET_TYPE_94X94, 2, 0, 'D',
build_string ("JISX0212 (Japanese)"),
build_string ("JISX0212 Japanese Supplement"),
build_string ("jisx0212"),
- NULL, 0, 0, 33);
+ Qnil, 0, 0, 0, 33);
#define CHINESE_CNS_PLANE_RE(n) "cns11643[.-]\\(.*[.-]\\)?" n "$"
Vcharset_chinese_cns11643_1 =
build_string
("CNS 11643 Plane 1 Chinese traditional"),
build_string (CHINESE_CNS_PLANE_RE("1")),
- NULL, 0, 0, 33);
+ Qnil, 0, 0, 0, 33);
Vcharset_chinese_cns11643_2 =
make_charset (LEADING_BYTE_CHINESE_CNS11643_2, Qchinese_cns11643_2,
CHARSET_TYPE_94X94, 2, 0, 'H',
build_string
("CNS 11643 Plane 2 Chinese traditional"),
build_string (CHINESE_CNS_PLANE_RE("2")),
- NULL, 0, 0, 33);
+ Qnil, 0, 0, 0, 33);
#ifdef UTF2000
Vcharset_latin_viscii_lower =
make_charset (LEADING_BYTE_LATIN_VISCII_LOWER, Qlatin_viscii_lower,
build_string ("VISCII lower"),
build_string ("VISCII lower (Vietnamese)"),
build_string ("VISCII lower (Vietnamese)"),
- build_string ("VISCII1.1"),
- latin_viscii_lower_to_ucs, 0, 0, 32);
+ build_string ("MULEVISCII-LOWER"),
+ Qnil, 0, 0, 0, 32);
Vcharset_latin_viscii_upper =
make_charset (LEADING_BYTE_LATIN_VISCII_UPPER, Qlatin_viscii_upper,
CHARSET_TYPE_96, 1, 1, '2',
build_string ("VISCII upper"),
build_string ("VISCII upper (Vietnamese)"),
build_string ("VISCII upper (Vietnamese)"),
- build_string ("VISCII1.1"),
- latin_viscii_upper_to_ucs, 0, 0, 32);
+ build_string ("MULEVISCII-UPPER"),
+ Qnil, 0, 0, 0, 32);
+ Vcharset_latin_viscii =
+ make_charset (LEADING_BYTE_LATIN_VISCII, Qlatin_viscii,
+ CHARSET_TYPE_256, 1, 2, 0,
+ CHARSET_LEFT_TO_RIGHT,
+ build_string ("VISCII"),
+ build_string ("VISCII 1.1 (Vietnamese)"),
+ build_string ("VISCII 1.1 (Vietnamese)"),
+ build_string ("VISCII1\\.1"),
+ Qnil, 0, 0, 0, 0);
+ Vcharset_ideograph_daikanwa =
+ make_charset (LEADING_BYTE_DAIKANWA, Qideograph_daikanwa,
+ CHARSET_TYPE_256X256, 2, 2, 0,
+ CHARSET_LEFT_TO_RIGHT,
+ build_string ("Daikanwa"),
+ build_string ("Morohashi's Daikanwa"),
+ build_string ("Daikanwa dictionary by MOROHASHI Tetsuji"),
+ build_string ("Daikanwa"),
+ Qnil, MIN_CHAR_DAIKANWA, MAX_CHAR_DAIKANWA, 0, 0);
+ Vcharset_ethiopic_ucs =
+ make_charset (LEADING_BYTE_ETHIOPIC_UCS, Qethiopic_ucs,
+ CHARSET_TYPE_256X256, 2, 2, 0,
+ CHARSET_LEFT_TO_RIGHT,
+ build_string ("Ethiopic (UCS)"),
+ build_string ("Ethiopic (UCS)"),
+ build_string ("Ethiopic of UCS"),
+ build_string ("Ethiopic-Unicode"),
+ Qnil, 0x1200, 0x137F, 0x1200, 0);
#endif
Vcharset_chinese_big5_1 =
make_charset (LEADING_BYTE_CHINESE_BIG5_1, Qchinese_big5_1,
build_string
("Big5 Level-1 Chinese traditional"),
build_string ("big5"),
- NULL, 0, 0, 33);
+ Qnil, 0, 0, 0, 33);
Vcharset_chinese_big5_2 =
make_charset (LEADING_BYTE_CHINESE_BIG5_2, Qchinese_big5_2,
CHARSET_TYPE_94X94, 2, 0, '1',
build_string
("Big5 Level-2 Chinese traditional"),
build_string ("big5"),
- NULL, 0, 0, 33);
+ Qnil, 0, 0, 0, 33);
#ifdef ENABLE_COMPOSITE_CHARS
/* #### For simplicity, we put composite chars into a 96x96 charset.