From: tomo Date: Wed, 7 Jun 2000 08:59:38 +0000 (+0000) Subject: (find_charsets_in_bufbyte_string): Use `Charset_ID' instead of X-Git-Tag: r21-2-34-tomo-Charset_ID~15 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=19eb343e562673aaf5689b80630f23c28eec9228;p=chise%2Fxemacs-chise.git- (find_charsets_in_bufbyte_string): Use `Charset_ID' instead of `unsigned char'; use `MIN_LEADING_BYTE' instead of 128. (find_charsets_in_emchar_string): Likewise. --- diff --git a/src/insdel.c b/src/insdel.c index ac443cd..28df127 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -3072,7 +3072,7 @@ barf_if_buffer_read_only (struct buffer *buf, Bufpos from, Bufpos to) } void -find_charsets_in_bufbyte_string (unsigned char *charsets, const Bufbyte *str, +find_charsets_in_bufbyte_string (Charset_ID *charsets, const Bufbyte *str, Bytecount len) { #ifndef MULE @@ -3080,25 +3080,26 @@ find_charsets_in_bufbyte_string (unsigned char *charsets, const Bufbyte *str, charsets[0] = 1; #else const Bufbyte *strend = str + len; - memset (charsets, 0, NUM_LEADING_BYTES); + memset (charsets, 0, NUM_LEADING_BYTES * sizeof(Charset_ID)); /* #### SJT doesn't like this. */ if (len == 0) { - charsets[XCHARSET_LEADING_BYTE (Vcharset_ascii) - 128] = 1; + charsets[XCHARSET_LEADING_BYTE (Vcharset_ascii) - MIN_LEADING_BYTE] = 1; return; } while (str < strend) { - charsets[CHAR_LEADING_BYTE (charptr_emchar (str)) - 128] = 1; + charsets[CHAR_LEADING_BYTE (charptr_emchar (str)) + - MIN_LEADING_BYTE] = 1; INC_CHARPTR (str); } #endif } void -find_charsets_in_emchar_string (unsigned char *charsets, const Emchar *str, +find_charsets_in_emchar_string (Charset_ID *charsets, const Emchar *str, Charcount len) { #ifndef MULE @@ -3107,18 +3108,18 @@ find_charsets_in_emchar_string (unsigned char *charsets, const Emchar *str, #else int i; - memset (charsets, 0, NUM_LEADING_BYTES); + memset (charsets, 0, NUM_LEADING_BYTES * sizeof(Charset_ID)); /* #### SJT doesn't like this. */ if (len == 0) { - charsets[XCHARSET_LEADING_BYTE (Vcharset_ascii) - 128] = 1; + charsets[XCHARSET_LEADING_BYTE (Vcharset_ascii) - MIN_LEADING_BYTE] = 1; return; } for (i = 0; i < len; i++) { - charsets[CHAR_LEADING_BYTE (str[i]) - 128] = 1; + charsets[CHAR_LEADING_BYTE (str[i]) - MIN_LEADING_BYTE] = 1; } #endif }