comparison src/coding.c @ 89653:cbaa9fd1aa5c

(Fdefine_coding_system_internal): Fix previous change.
author Kenichi Handa <handa@m17n.org>
date Mon, 24 Nov 2003 02:21:55 +0000
parents d5641a606e08
children 9010cefe8d29
comparison
equal deleted inserted replaced
89652:2f3d681a7eae 89653:cbaa9fd1aa5c
8117 charset whose ID is NUM. 8117 charset whose ID is NUM.
8118 8118
8119 If Nth element is a list of charset IDs, N is the first byte 8119 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 8120 of one of them. The list is sorted by dimensions of the
8121 charsets. A charset of smaller dimension comes firtst. */ 8121 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))
8126 {
8127 struct charset *charset = CHARSET_FROM_ID (XFASTINT (XCAR (tail)));
8128
8129 if (charset->method == CHARSET_METHOD_SUPERSET)
8130 {
8131 val = CHARSET_SUPERSET (charset);
8132 for (; CONSP (val); val = XCDR (val))
8133 list = Fcons (XCAR (XCAR (val)), list);
8134 maybe_ascii_compatible = 0;
8135 }
8136 else
8137 list = Fcons (XCAR (tail), list);
8138 }
8139
8140 val = Fmake_vector (make_number (256), Qnil); 8122 val = Fmake_vector (make_number (256), Qnil);
8141 8123
8142 for (tail = Fnreverse (list); CONSP (tail); tail = XCDR (tail)) 8124 for (tail = charset_list; CONSP (tail); tail = XCDR (tail))
8143 { 8125 {
8144 struct charset *charset = CHARSET_FROM_ID (XFASTINT (XCAR (tail))); 8126 struct charset *charset = CHARSET_FROM_ID (XFASTINT (XCAR (tail)));
8145 int dim = CHARSET_DIMENSION (charset); 8127 int dim = CHARSET_DIMENSION (charset);
8146 int idx = (dim - 1) * 4; 8128 int idx = (dim - 1) * 4;
8147 8129
8148 if (CHARSET_ASCII_COMPATIBLE_P (charset) 8130 if (CHARSET_ASCII_COMPATIBLE_P (charset))
8149 && maybe_ascii_compatible)
8150 CODING_ATTR_ASCII_COMPAT (attrs) = Qt; 8131 CODING_ATTR_ASCII_COMPAT (attrs) = Qt;
8151 8132
8152 for (i = charset->code_space[idx]; 8133 for (i = charset->code_space[idx];
8153 i <= charset->code_space[idx + 1]; i++) 8134 i <= charset->code_space[idx + 1]; i++)
8154 { 8135 {