From: tomo Date: Fri, 7 Sep 2001 05:45:33 +0000 (+0000) Subject: (put_char_id_table): Use `put_char_table'. X-Git-Tag: r21-2-41-utf-2000-0_18-1~532 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe869f6450e01b2afb274ecc9bbed9e0369191da;p=chise%2Fxemacs-chise.git (put_char_id_table): Use `put_char_table'. --- diff --git a/src/chartab.c b/src/chartab.c index 2174c14..8260714 100644 --- a/src/chartab.c +++ b/src/chartab.c @@ -866,93 +866,7 @@ put_char_id_table (Lisp_Char_Table* cit, struct chartab_range range; decode_char_table_range (character, &range); - switch (range.type) - { - case CHARTAB_RANGE_ALL: - cit->table = value; - break; - case CHARTAB_RANGE_DEFAULT: - cit->default_value = value; - break; - case CHARTAB_RANGE_CHARSET: - { - Emchar c; - Lisp_Object encoding_table = XCHARSET_ENCODING_TABLE (range.charset); - - if ( CHAR_TABLEP (encoding_table) ) - { - for (c = 0; c < 1 << 24; c++) - { - if ( INTP (get_char_id_table (XCHAR_TABLE(encoding_table), - c)) ) - put_char_id_table_0 (cit, c, value); - } - } - else - { - for (c = 0; c < 1 << 24; c++) - { - if ( charset_code_point (range.charset, c) >= 0 ) - put_char_id_table_0 (cit, c, value); - } - } - } - break; - case CHARTAB_RANGE_ROW: - { - int cell_min, cell_max, i; - - if (XCHARSET_DIMENSION (range.charset) < 2) - signal_simple_error ("Charset in row vector must be multi-byte", - range.charset); - else - { - switch (XCHARSET_CHARS (range.charset)) - { - case 94: - cell_min = 33; cell_max = 126; - break; - case 96: - cell_min = 32; cell_max = 127; - break; - case 128: - cell_min = 0; cell_max = 127; - break; - case 256: - cell_min = 0; cell_max = 255; - break; - default: - abort (); - } - } - if (XCHARSET_DIMENSION (range.charset) == 2) - check_int_range (range.row, cell_min, cell_max); - else if (XCHARSET_DIMENSION (range.charset) == 3) - { - check_int_range (range.row >> 8 , cell_min, cell_max); - check_int_range (range.row & 0xFF, cell_min, cell_max); - } - else if (XCHARSET_DIMENSION (range.charset) == 4) - { - check_int_range ( range.row >> 16 , cell_min, cell_max); - check_int_range ((range.row >> 8) & 0xFF, cell_min, cell_max); - check_int_range ( range.row & 0xFF, cell_min, cell_max); - } - else - abort (); - - for (i = cell_min; i <= cell_max; i++) - { - Emchar ch = DECODE_CHAR (range.charset, (range.row << 8) | i); - if ( charset_code_point (range.charset, ch) >= 0 ) - put_char_id_table_0 (cit, ch, value); - } - } - break; - case CHARTAB_RANGE_CHAR: - put_char_id_table_0 (cit, range.ch, value); - break; - } + put_char_table (cit, &range, value); }