diff options
Diffstat (limited to 'src/coding.c')
| -rw-r--r-- | src/coding.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/coding.c b/src/coding.c index be18ab80c3b..375839fb2bc 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -897,7 +897,6 @@ coding_set_source (coding) | |||
| 897 | else | 897 | else |
| 898 | { | 898 | { |
| 899 | struct buffer *buf = XBUFFER (coding->src_object); | 899 | struct buffer *buf = XBUFFER (coding->src_object); |
| 900 | EMACS_INT beg_byte = BUF_BEG_BYTE (buf); | ||
| 901 | EMACS_INT gpt_byte = BUF_GPT_BYTE (buf); | 900 | EMACS_INT gpt_byte = BUF_GPT_BYTE (buf); |
| 902 | unsigned char *beg_addr = BUF_BEG_ADDR (buf); | 901 | unsigned char *beg_addr = BUF_BEG_ADDR (buf); |
| 903 | 902 | ||
| @@ -4342,7 +4341,6 @@ encode_coding_charset (coding) | |||
| 4342 | unsigned char *dst_end = coding->destination + coding->dst_bytes; | 4341 | unsigned char *dst_end = coding->destination + coding->dst_bytes; |
| 4343 | int safe_room = MAX_MULTIBYTE_LENGTH; | 4342 | int safe_room = MAX_MULTIBYTE_LENGTH; |
| 4344 | int produced_chars = 0; | 4343 | int produced_chars = 0; |
| 4345 | struct charset *charset; | ||
| 4346 | Lisp_Object attrs, eol_type, charset_list; | 4344 | Lisp_Object attrs, eol_type, charset_list; |
| 4347 | int ascii_compatible; | 4345 | int ascii_compatible; |
| 4348 | int c; | 4346 | int c; |
| @@ -7319,10 +7317,16 @@ DEFUN ("define-coding-system-internal", Fdefine_coding_system_internal, | |||
| 7319 | for (tail = charset_list; CONSP (tail); tail = XCDR (tail)) | 7317 | for (tail = charset_list; CONSP (tail); tail = XCDR (tail)) |
| 7320 | { | 7318 | { |
| 7321 | struct charset *charset = CHARSET_FROM_ID (XINT (XCAR (tail))); | 7319 | struct charset *charset = CHARSET_FROM_ID (XINT (XCAR (tail))); |
| 7320 | int idx = (CHARSET_DIMENSION (charset) - 1) * 4; | ||
| 7322 | 7321 | ||
| 7323 | for (i = charset->code_space[0]; i <= charset->code_space[1]; i++) | 7322 | for (i = charset->code_space[idx]; |
| 7324 | if (NILP (AREF (val, i))) | 7323 | i <= charset->code_space[idx + 1]; i++) |
| 7325 | ASET (val, i, XCAR (tail)); | 7324 | { |
| 7325 | if (NILP (AREF (val, i))) | ||
| 7326 | ASET (val, i, XCAR (tail)); | ||
| 7327 | else | ||
| 7328 | error ("Charsets conflicts in the first byte"); | ||
| 7329 | } | ||
| 7326 | } | 7330 | } |
| 7327 | ASET (attrs, coding_attr_charset_valids, val); | 7331 | ASET (attrs, coding_attr_charset_valids, val); |
| 7328 | category = coding_category_charset; | 7332 | category = coding_category_charset; |
| @@ -7402,7 +7406,6 @@ DEFUN ("define-coding-system-internal", Fdefine_coding_system_internal, | |||
| 7402 | else if (EQ (coding_type, Qiso_2022)) | 7406 | else if (EQ (coding_type, Qiso_2022)) |
| 7403 | { | 7407 | { |
| 7404 | Lisp_Object initial, reg_usage, request, flags; | 7408 | Lisp_Object initial, reg_usage, request, flags; |
| 7405 | struct charset *charset; | ||
| 7406 | int i, id; | 7409 | int i, id; |
| 7407 | 7410 | ||
| 7408 | if (nargs < coding_arg_iso2022_max) | 7411 | if (nargs < coding_arg_iso2022_max) |