Mercurial > emacs
changeset 88477:5f974cbba7b3
(coding_set_source): Delete the local variable beg_byte.
(encode_coding_charset): Delete the local variable charset.
(Fdefine_coding_system_internal): Likewise.
(Fdefine_coding_system_internal): Setup
attrs[coding_attr_charset_valids] correctly.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Fri, 10 May 2002 03:55:40 +0000 |
parents | 47c2e6825a1e |
children | 91af7e96e66f |
files | src/coding.c |
diffstat | 1 files changed, 10 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/coding.c Fri May 10 03:55:12 2002 +0000 +++ b/src/coding.c Fri May 10 03:55:40 2002 +0000 @@ -897,7 +897,6 @@ else { struct buffer *buf = XBUFFER (coding->src_object); - EMACS_INT beg_byte = BUF_BEG_BYTE (buf); EMACS_INT gpt_byte = BUF_GPT_BYTE (buf); unsigned char *beg_addr = BUF_BEG_ADDR (buf); @@ -4342,7 +4341,6 @@ unsigned char *dst_end = coding->destination + coding->dst_bytes; int safe_room = MAX_MULTIBYTE_LENGTH; int produced_chars = 0; - struct charset *charset; Lisp_Object attrs, eol_type, charset_list; int ascii_compatible; int c; @@ -7319,10 +7317,16 @@ for (tail = charset_list; CONSP (tail); tail = XCDR (tail)) { struct charset *charset = CHARSET_FROM_ID (XINT (XCAR (tail))); - - for (i = charset->code_space[0]; i <= charset->code_space[1]; i++) - if (NILP (AREF (val, i))) - ASET (val, i, XCAR (tail)); + int idx = (CHARSET_DIMENSION (charset) - 1) * 4; + + for (i = charset->code_space[idx]; + i <= charset->code_space[idx + 1]; i++) + { + if (NILP (AREF (val, i))) + ASET (val, i, XCAR (tail)); + else + error ("Charsets conflicts in the first byte"); + } } ASET (attrs, coding_attr_charset_valids, val); category = coding_category_charset; @@ -7402,7 +7406,6 @@ else if (EQ (coding_type, Qiso_2022)) { Lisp_Object initial, reg_usage, request, flags; - struct charset *charset; int i, id; if (nargs < coding_arg_iso2022_max)