aboutsummaryrefslogtreecommitdiffstats
path: root/src/charset.c
diff options
context:
space:
mode:
authorPaul Eggert2012-09-26 13:00:29 -0700
committerPaul Eggert2012-09-26 13:00:29 -0700
commit41c8bfcfbe028fc559a7eabc0dfe0c6fcafcb7cf (patch)
treed491da2fa61a23c76088fb8447c66bc7fd197856 /src/charset.c
parent3a880af4a79688e90da45311a8d85bae2d59a811 (diff)
downloademacs-41c8bfcfbe028fc559a7eabc0dfe0c6fcafcb7cf.tar.gz
emacs-41c8bfcfbe028fc559a7eabc0dfe0c6fcafcb7cf.zip
* character.h (MAYBE_UNIFY_CHAR): Remove.
* charset.c, charset.h (maybe_unify_char): Now static. * charset.c (decode_char): Use maybe_unify_char, not MAYBE_UNIFY_CHAR. Since this stuff is now private to charset.c, there's no need for a public macro and no need to inline by hand.
Diffstat (limited to 'src/charset.c')
-rw-r--r--src/charset.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/charset.c b/src/charset.c
index d8c38e5ea3b..b0915ffde9c 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -1617,7 +1617,7 @@ only `ascii', `eight-bit-control', and `eight-bit-graphic'. */)
1617/* Return a unified character code for C (>= 0x110000). VAL is a 1617/* Return a unified character code for C (>= 0x110000). VAL is a
1618 value of Vchar_unify_table for C; i.e. it is nil, an integer, or a 1618 value of Vchar_unify_table for C; i.e. it is nil, an integer, or a
1619 charset symbol. */ 1619 charset symbol. */
1620int 1620static int
1621maybe_unify_char (int c, Lisp_Object val) 1621maybe_unify_char (int c, Lisp_Object val)
1622{ 1622{
1623 struct charset *charset; 1623 struct charset *charset;
@@ -1723,8 +1723,12 @@ decode_char (struct charset *charset, unsigned int code)
1723 { 1723 {
1724 c = char_index + CHARSET_CODE_OFFSET (charset); 1724 c = char_index + CHARSET_CODE_OFFSET (charset);
1725 if (CHARSET_UNIFIED_P (charset) 1725 if (CHARSET_UNIFIED_P (charset)
1726 && c > MAX_UNICODE_CHAR) 1726 && MAX_UNICODE_CHAR < c && c <= MAX_5_BYTE_CHAR)
1727 MAYBE_UNIFY_CHAR (c); 1727 {
1728 /* Unify C with a Unicode character if possible. */
1729 Lisp_Object val = CHAR_TABLE_REF (Vchar_unify_table, c);
1730 c = maybe_unify_char (c, val);
1731 }
1728 } 1732 }
1729 } 1733 }
1730 1734