diff options
Diffstat (limited to 'src/coding.c')
-rw-r--r-- | src/coding.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/coding.c b/src/coding.c index c834f76a65e..a7b7c7d6b23 100644 --- a/src/coding.c +++ b/src/coding.c @@ -2053,7 +2053,7 @@ emacs_mule_char (struct coding_system *coding, const unsigned char *src, const unsigned char *src_end = coding->source + coding->src_bytes; const unsigned char *src_base = src; int multibytep = coding->src_multibyte; - struct charset *charset; + int charset_id; unsigned code; int c; int consumed_chars = 0; @@ -2063,7 +2063,7 @@ emacs_mule_char (struct coding_system *coding, const unsigned char *src, if (c < 0) { c = -c; - charset = emacs_mule_charset[0]; + charset_id = emacs_mule_charset[0]; } else { @@ -2099,7 +2099,7 @@ emacs_mule_char (struct coding_system *coding, const unsigned char *src, switch (emacs_mule_bytes[c]) { case 2: - if (! (charset = emacs_mule_charset[c])) + if ((charset_id = emacs_mule_charset[c]) < 0) goto invalid_code; ONE_MORE_BYTE (c); if (c < 0xA0) @@ -2112,7 +2112,7 @@ emacs_mule_char (struct coding_system *coding, const unsigned char *src, || c == EMACS_MULE_LEADING_CODE_PRIVATE_12) { ONE_MORE_BYTE (c); - if (c < 0xA0 || ! (charset = emacs_mule_charset[c])) + if (c < 0xA0 || (charset_id = emacs_mule_charset[c]) < 0) goto invalid_code; ONE_MORE_BYTE (c); if (c < 0xA0) @@ -2121,7 +2121,7 @@ emacs_mule_char (struct coding_system *coding, const unsigned char *src, } else { - if (! (charset = emacs_mule_charset[c])) + if ((charset_id = emacs_mule_charset[c]) < 0) goto invalid_code; ONE_MORE_BYTE (c); if (c < 0xA0) @@ -2136,7 +2136,7 @@ emacs_mule_char (struct coding_system *coding, const unsigned char *src, case 4: ONE_MORE_BYTE (c); - if (c < 0 || ! (charset = emacs_mule_charset[c])) + if (c < 0 || (charset_id = emacs_mule_charset[c]) < 0) goto invalid_code; ONE_MORE_BYTE (c); if (c < 0xA0) @@ -2150,21 +2150,21 @@ emacs_mule_char (struct coding_system *coding, const unsigned char *src, case 1: code = c; - charset = CHARSET_FROM_ID (ASCII_BYTE_P (code) - ? charset_ascii : charset_eight_bit); + charset_id = ASCII_BYTE_P (code) ? charset_ascii : charset_eight_bit; break; default: abort (); } - CODING_DECODE_CHAR (coding, src, src_base, src_end, charset, code, c); + CODING_DECODE_CHAR (coding, src, src_base, src_end, + CHARSET_FROM_ID (charset_id), code, c); if (c < 0) goto invalid_code; } *nbytes = src - src_base; *nchars = consumed_chars; if (id) - *id = charset->id; + *id = charset_id; return (mseq_found ? -c : c); no_more_source: |