+#define MIN_CHAR_GT 0x61000000
+#define MAX_CHAR_GT (MIN_CHAR_GT + 66773)
+#define MIN_CHAR_BIG5_CDP 0x62000000
+#define MAX_CHAR_BIG5_CDP 0x6200FFFF
+#define MIN_CHAR_HANZIKU_1 (0x62000000 + 65536 * 1)
+#define MAX_CHAR_HANZIKU_1 (0x62000000 + 65536 * 1 + 65535)
+#define MIN_CHAR_HANZIKU_2 (0x62000000 + 65536 * 2)
+#define MAX_CHAR_HANZIKU_2 (0x62000000 + 65536 * 2 + 65535)
+#define MIN_CHAR_HANZIKU_3 (0x62000000 + 65536 * 3)
+#define MAX_CHAR_HANZIKU_3 (0x62000000 + 65536 * 3 + 65535)
+#define MIN_CHAR_HANZIKU_4 (0x62000000 + 65536 * 4)
+#define MAX_CHAR_HANZIKU_4 (0x62000000 + 65536 * 4 + 65535)
+#define MIN_CHAR_HANZIKU_5 (0x62000000 + 65536 * 5)
+#define MAX_CHAR_HANZIKU_5 (0x62000000 + 65536 * 5 + 65535)
+#define MIN_CHAR_HANZIKU_6 (0x62000000 + 65536 * 6)
+#define MAX_CHAR_HANZIKU_6 (0x62000000 + 65536 * 6 + 65535)
+#define MIN_CHAR_HANZIKU_7 (0x62000000 + 65536 * 7)
+#define MAX_CHAR_HANZIKU_7 (0x62000000 + 65536 * 7 + 65535)
+#define MIN_CHAR_HANZIKU_8 (0x62000000 + 65536 * 8)
+#define MAX_CHAR_HANZIKU_8 (0x62000000 + 65536 * 8 + 65535)
+#define MIN_CHAR_HANZIKU_9 (0x62000000 + 65536 * 9)
+#define MAX_CHAR_HANZIKU_9 (0x62000000 + 65536 * 9 + 65535)
+#define MIN_CHAR_HANZIKU_10 (0x62000000 + 65536 * 10)
+#define MAX_CHAR_HANZIKU_10 (0x62000000 + 65536 * 10 + 65535)
+#define MIN_CHAR_HANZIKU_11 (0x62000000 + 65536 * 11)
+#define MAX_CHAR_HANZIKU_11 (0x62000000 + 65536 * 11 + 65535)
+#define MIN_CHAR_HANZIKU_12 (0x62000000 + 65536 * 12)
+#define MAX_CHAR_HANZIKU_12 (0x62000000 + 65536 * 12 + 65535)
+
+Emchar decode_builtin_char (Lisp_Object charset, int code_point);
+
+INLINE_HEADER Lisp_Object
+get_ccs_octet_table (Lisp_Object table, Lisp_Object ccs, int code);
+INLINE_HEADER Lisp_Object
+get_ccs_octet_table (Lisp_Object table, Lisp_Object ccs, int code)
+{
+ int byte_offset = XCHARSET_BYTE_OFFSET (ccs);
+
+ if (VECTORP (table))
+ {
+ int idx = code - byte_offset;
+
+ if (idx < XVECTOR_LENGTH(table))
+ return XVECTOR_DATA(table)[idx];
+ else
+ return Qunbound;
+ }
+ else
+ return table;
+}
+
+INLINE_HEADER Lisp_Object
+put_ccs_octet_table (Lisp_Object table, Lisp_Object ccs, int code,
+ Lisp_Object value);
+INLINE_HEADER Lisp_Object
+put_ccs_octet_table (Lisp_Object table, Lisp_Object ccs, int code,
+ Lisp_Object value)
+{
+ int byte_offset = XCHARSET_BYTE_OFFSET (ccs);
+ int ccs_len = XCHARSET_BYTE_SIZE (ccs);
+
+ if (VECTORP (table))
+ {
+ XVECTOR_DATA(table)[code - byte_offset] = value;
+ return table;
+ }
+ else if (EQ (table, value))
+ return table;
+ else
+ {
+ table = make_vector (ccs_len, table);
+ XVECTOR_DATA(table)[code - byte_offset] = value;
+ return table;
+ }
+}
+
+INLINE_HEADER void
+decoding_table_put_char (Lisp_Object ccs,
+ int code_point, Lisp_Object character);
+INLINE_HEADER void
+decoding_table_put_char (Lisp_Object ccs,
+ int code_point, Lisp_Object character)
+{
+ Lisp_Object table1 = XCHARSET_DECODING_TABLE (ccs);
+ int dim = XCHARSET_DIMENSION (ccs);