X-Git-Url: https://git.hcoop.net/bpt/emacs.git/blobdiff_plain/5c156ace080f89b44c73cd78d404c7263fe2003e..66ebf9838b3b7744bcf2ad63d62e9cd6c7690066:/src/chartab.c diff --git a/src/chartab.c b/src/chartab.c index ec5b2ffab7..9ad182131e 100644 --- a/src/chartab.c +++ b/src/chartab.c @@ -215,7 +215,6 @@ sub_char_table_ref_and_range (Lisp_Object table, int c, int *from, int *to, Lisp struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table); int depth = XINT (tbl->depth); int min_char = XINT (tbl->min_char); - int max_char = min_char + chartab_chars[depth - 1] - 1; int chartab_idx = CHARTAB_IDX (c, depth, min_char), idx; Lisp_Object val; @@ -244,8 +243,9 @@ sub_char_table_ref_and_range (Lisp_Object table, int c, int *from, int *to, Lisp break; } } - while ((c = min_char + (chartab_idx + 1) * chartab_chars[depth]) <= max_char - && *to >= c) + while (((c = (chartab_idx + 1) * chartab_chars[depth]) + < chartab_chars[depth - 1]) + && (c += min_char) <= *to) { Lisp_Object this_val; @@ -331,20 +331,6 @@ char_table_ref_and_range (Lisp_Object table, int c, int *from, int *to) } -#define ASET_RANGE(ARRAY, FROM, TO, LIMIT, VAL) \ - do { \ - int limit = (TO) < (LIMIT) ? (TO) : (LIMIT); \ - for (; (FROM) < limit; (FROM)++) (ARRAY)->contents[(FROM)] = (VAL); \ - } while (0) - -#define GET_SUB_CHAR_TABLE(TABLE, SUBTABLE, IDX, DEPTH, MIN_CHAR) \ - do { \ - (SUBTABLE) = (TABLE)->contents[(IDX)]; \ - if (!SUB_CHAR_TABLE_P (SUBTABLE)) \ - (SUBTABLE) = make_sub_char_table ((DEPTH), (MIN_CHAR), (SUBTABLE)); \ - } while (0) - - static void sub_char_table_set (Lisp_Object table, int c, Lisp_Object val) {