8107 |
|
|
8108 |
if (EQ (coding_type, Qcharset)) |
if (EQ (coding_type, Qcharset)) |
8109 |
{ |
{ |
|
Lisp_Object list; |
|
8110 |
/* Generate a lisp vector of 256 elements. Each element is nil, |
/* Generate a lisp vector of 256 elements. Each element is nil, |
8111 |
integer, or a list of charset IDs. |
integer, or a list of charset IDs. |
8112 |
|
|
8118 |
|
|
8119 |
If Nth element is a list of charset IDs, N is the first byte |
If Nth element is a list of charset IDs, N is the first byte |
8120 |
of one of them. The list is sorted by dimensions of the |
of one of them. The list is sorted by dimensions of the |
8121 |
charsets. A charset of smaller dimension comes firtst. |
charsets. A charset of smaller dimension comes firtst. */ |
8122 |
*/ |
Lisp_Object list; |
8123 |
|
int maybe_ascii_compatible = 1; |
8124 |
|
|
8125 |
for (list = Qnil, tail = charset_list; CONSP (tail); tail = XCDR (tail)) |
for (list = Qnil, tail = charset_list; CONSP (tail); tail = XCDR (tail)) |
8126 |
{ |
{ |
8127 |
struct charset *charset = CHARSET_FROM_ID (XFASTINT (XCAR (tail))); |
struct charset *charset = CHARSET_FROM_ID (XFASTINT (XCAR (tail))); |
8131 |
val = CHARSET_SUPERSET (charset); |
val = CHARSET_SUPERSET (charset); |
8132 |
for (; CONSP (val); val = XCDR (val)) |
for (; CONSP (val); val = XCDR (val)) |
8133 |
list = Fcons (XCAR (XCAR (val)), list); |
list = Fcons (XCAR (XCAR (val)), list); |
8134 |
|
maybe_ascii_compatible = 0; |
8135 |
} |
} |
8136 |
else |
else |
8137 |
list = Fcons (XCAR (tail), list); |
list = Fcons (XCAR (tail), list); |
8145 |
int dim = CHARSET_DIMENSION (charset); |
int dim = CHARSET_DIMENSION (charset); |
8146 |
int idx = (dim - 1) * 4; |
int idx = (dim - 1) * 4; |
8147 |
|
|
8148 |
if (CHARSET_ASCII_COMPATIBLE_P (charset)) |
if (CHARSET_ASCII_COMPATIBLE_P (charset) |
8149 |
|
&& maybe_ascii_compatible) |
8150 |
CODING_ATTR_ASCII_COMPAT (attrs) = Qt; |
CODING_ATTR_ASCII_COMPAT (attrs) = Qt; |
8151 |
|
|
8152 |
for (i = charset->code_space[idx]; |
for (i = charset->code_space[idx]; |