aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2002-05-10 03:56:05 +0000
committerKenichi Handa2002-05-10 03:56:05 +0000
commit15d143f7583a5cf8ba6d333df6fcd2955bea84f7 (patch)
tree558b4ba634379bdce00cdc6c71c0d38e3dd132dd /src
parentac6a8028669701ce4836595fe73c8a757cc4ca70 (diff)
downloademacs-15d143f7583a5cf8ba6d333df6fcd2955bea84f7.tar.gz
emacs-15d143f7583a5cf8ba6d333df6fcd2955bea84f7.zip
(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.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog25
-rw-r--r--src/coding.c15
2 files changed, 34 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index dff8f6abe2d..bf34746cf90 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,28 @@
12002-05-10 Yong Lu <lyongu@asia-infonet.com>
2
3 * charset.c (load_charset_map): Fix previous change.
4 (read_hex): Don't treat SPC as a comment starter.
5 (decode_char): If CODE_POINT_TO_INDEX retruns -1, always return
6 -1.
7 (Fdecode_char): Fix typo.
8
92002-05-10 Kenichi Handa <handa@etl.go.jp>
10
11 * charset.h (struct charset): New member `code_space_mask'.
12
13 * coding.c (coding_set_source): Delete the local variable
14 beg_byte.
15 (encode_coding_charset): Delete the local variable charset.
16 (Fdefine_coding_system_internal): Likewise.
17 (Fdefine_coding_system_internal): Setup
18 attrs[coding_attr_charset_valids] correctly.
19
20 * charset.c (CODE_POINT_TO_INDEX): Utilize `code_space_mask'
21 member to check if CODE is valid or not.
22 (Fdefine_charset_internal): Initialize `code_space_mask' member.
23 (encode_char): Before calling CODE_POINT_TO_INDEX, check if CODE
24 is within the range of charset->min_code and carset->max_code.
25
12002-05-09 Dave Love <fx@gnu.org> 262002-05-09 Dave Love <fx@gnu.org>
2 27
3 * syntax.h (syntax_temp) [!__GNUC__]: Declare. 28 * syntax.h (syntax_temp) [!__GNUC__]: Declare.
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)