From 7c78e5423a65db9b20f9eb5d90ea94ab00d4af23 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Mon, 22 Jul 2002 06:40:36 +0000 Subject: [PATCH] (LEADING_CODE_PRIVATE_11, LEADING_CODE_PRIVATE_12, LEADING_CODE_PRIVATE_21, LEADING_CODE_PRIVATE_22): Macros deleted. Callers changes to use EMACS_MULE_LEADING_CODE_PRIVATE_11, etc. (decode_coding_ccl): Add `const' to local variables. (consume_chars): Likewise. (Ffind_coding_systems_region_internal): Likewise. (Fcheck_coding_systems_region): Likewise. --- src/ChangeLog | 38 ++++++++++++++++++++++++++++++++++++++ src/coding.c | 29 +++++++++++------------------ 2 files changed, 49 insertions(+), 18 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 6b777088a12..fa3828089bf 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,41 @@ +2002-07-22 Kenichi Handa + + * character.h (TRAILING_CODE_P): New macro. + (MAYBE_UNIFY_CHAR): Adjusted for the change of Funify_charset. + (string_char_with_unification): Fix prototype. + (Vscript_alist): Extern it. + + * charset.h (Vcharset_ordered_list): Extern it. + (charset_ordered_list_tick): Extern it. + (EMACS_MULE_LEADING_CODE_PRIVATE_11, + EMACS_MULE_LEADING_CODE_PRIVATE_12, + EMACS_MULE_LEADING_CODE_PRIVATE_21, + EMACS_MULE_LEADING_CODE_PRIVATE_22): New macros + (Funify_charset): Adjusted for the change of Funify_charset. + + * charset.c (charset_ordered_list_tick): New variable. + (Fdefine_charset_internal): Increment charset_ordered_list_tick. + (Funify_charset): New optional arg DEUNIFY. If it is non-nil, + deunify intead of unify a charset. + (string_xstring_p): Add `const' to local variables. + (find_charsets_in_text): Add `const' to arguemnts and local + variables. + (encode_char): Adjusted for the change of Funify_charset. Fix + detecting of invalid code. + (Fset_charset_priority): Increment charset_ordered_list_tick. + + * coding.c (LEADING_CODE_PRIVATE_11, LEADING_CODE_PRIVATE_12, + LEADING_CODE_PRIVATE_21, LEADING_CODE_PRIVATE_22): Macros + deleted. Callers changes to use + EMACS_MULE_LEADING_CODE_PRIVATE_11, etc. + (decode_coding_ccl): Add `const' to local variables. + (consume_chars): Likewise. + (Ffind_coding_systems_region_internal): Likewise. + (Fcheck_coding_systems_region): Likewise. + + * print.c (print_object): Use octal form for printing the + contents of a bool vector. + 2002-07-18 Dave Love * lread.c (Fload) : Don't leak fd. diff --git a/src/coding.c b/src/coding.c index bd548799a17..c307b2aca25 100644 --- a/src/coding.c +++ b/src/coding.c @@ -1537,13 +1537,6 @@ encode_coding_utf_16 (coding) char emacs_mule_bytes[256]; -/* Leading-code followed by extended leading-code. */ -#define LEADING_CODE_PRIVATE_11 0x9A /* for private DIMENSION1 of 1-column */ -#define LEADING_CODE_PRIVATE_12 0x9B /* for private DIMENSION1 of 2-column */ -#define LEADING_CODE_PRIVATE_21 0x9C /* for private DIMENSION2 of 1-column */ -#define LEADING_CODE_PRIVATE_22 0x9D /* for private DIMENSION2 of 2-column */ - - int emacs_mule_char (coding, src, nbytes, nchars) struct coding_system *coding; @@ -1569,8 +1562,8 @@ emacs_mule_char (coding, src, nbytes, nchars) break; case 3: - if (c == LEADING_CODE_PRIVATE_11 - || c == LEADING_CODE_PRIVATE_12) + if (c == EMACS_MULE_LEADING_CODE_PRIVATE_11 + || c == EMACS_MULE_LEADING_CODE_PRIVATE_12) { ONE_MORE_BYTE (c); if (! (charset = emacs_mule_charset[c])) @@ -4102,7 +4095,7 @@ static void decode_coding_ccl (coding) struct coding_system *coding; { - unsigned char *src = coding->source + coding->consumed; + const unsigned char *src = coding->source + coding->consumed; unsigned char *src_end = coding->source + coding->src_bytes; int *charbuf = coding->charbuf; int *charbuf_end = charbuf + coding->charbuf_size; @@ -4116,7 +4109,7 @@ decode_coding_ccl (coding) while (src < src_end) { - unsigned char *p = src; + const unsigned char *p = src; int *source, *source_end; int i = 0; @@ -5619,7 +5612,7 @@ consume_chars (coding) int *buf = coding->charbuf; /* -1 is to compensate for CRLF. */ int *buf_end = coding->charbuf + coding->charbuf_size - 1; - unsigned char *src = coding->source + coding->consumed; + const unsigned char *src = coding->source + coding->consumed; int pos = coding->src_pos + coding->consumed_char; int end_pos = coding->src_pos + coding->src_chars; int multibytep = coding->src_multibyte; @@ -6457,7 +6450,7 @@ DEFUN ("find-coding-systems-region-internal", { Lisp_Object coding_attrs_list, safe_codings; EMACS_INT start_byte, end_byte; - unsigned char *p, *pbeg, *pend; + const unsigned char *p, *pbeg, *pend; int c; Lisp_Object tail, elt; @@ -6587,7 +6580,7 @@ buffer positions. END is ignored. */) Lisp_Object list; EMACS_INT start_byte, end_byte; int pos; - unsigned char *p, *pbeg, *pend; + const unsigned char *p, *pbeg, *pend; int c; Lisp_Object tail, elt; @@ -7890,10 +7883,10 @@ init_coding_once () { emacs_mule_bytes[i] = 1; } - emacs_mule_bytes[LEADING_CODE_PRIVATE_11] = 3; - emacs_mule_bytes[LEADING_CODE_PRIVATE_12] = 3; - emacs_mule_bytes[LEADING_CODE_PRIVATE_21] = 4; - emacs_mule_bytes[LEADING_CODE_PRIVATE_22] = 4; + emacs_mule_bytes[EMACS_MULE_LEADING_CODE_PRIVATE_11] = 3; + emacs_mule_bytes[EMACS_MULE_LEADING_CODE_PRIVATE_12] = 3; + emacs_mule_bytes[EMACS_MULE_LEADING_CODE_PRIVATE_21] = 4; + emacs_mule_bytes[EMACS_MULE_LEADING_CODE_PRIVATE_22] = 4; } #ifdef emacs -- 2.39.5