summaryrefslogtreecommitdiff
path: root/src/character.c
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2002-08-15 02:28:08 +0000
committerKenichi Handa <handa@m17n.org>2002-08-15 02:28:08 +0000
commit6c4b066d9bda14f80529b57049f5a984bdbf2e7e (patch)
tree0076d6d80d6fa1cc74ee71aa994fd13bde913191 /src/character.c
parent98f71c69e145bfde81988a477e04ffab3ea590ae (diff)
downloademacs-6c4b066d9bda14f80529b57049f5a984bdbf2e7e.tar.gz
(unibyte_char_to_multibyte): Refer to
charset_unibyte, not charset_primary. (multibyte_char_to_unibyte): Likewise. (Funibyte_char_to_multibyte): Likewise.
Diffstat (limited to 'src/character.c')
-rw-r--r--src/character.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/character.c b/src/character.c
index 6e2b28a495f..376b33ba982 100644
--- a/src/character.c
+++ b/src/character.c
@@ -181,14 +181,14 @@ translate_char (table, c)
}
/* Convert the unibyte character C to the corresponding multibyte
- character based on the current value of charset_primary. If C
+ character based on the current value of charset_unibyte. If C
can't be converted, return C. */
int
unibyte_char_to_multibyte (c)
int c;
{
- struct charset *charset = CHARSET_FROM_ID (charset_primary);
+ struct charset *charset = CHARSET_FROM_ID (charset_unibyte);
int c1 = DECODE_CHAR (charset, c);
return ((c1 >= 0) ? c1 : c);
@@ -196,8 +196,8 @@ unibyte_char_to_multibyte (c)
/* Convert the multibyte character C to unibyte 8-bit character based
- on the current value of charset_primary. If dimension of
- charset_primary is more than one, return (C & 0xFF).
+ on the current value of charset_unibyte. If dimension of
+ charset_unibyte is more than one, return (C & 0xFF).
The argument REV_TBL is now ignored. It will be removed in the
future. */
@@ -207,7 +207,7 @@ multibyte_char_to_unibyte (c, rev_tbl)
int c;
Lisp_Object rev_tbl;
{
- struct charset *charset = CHARSET_FROM_ID (charset_primary);
+ struct charset *charset = CHARSET_FROM_ID (charset_unibyte);
unsigned c1 = ENCODE_CHAR (charset, c);
return ((c1 != CHARSET_INVALID_CODE (charset)) ? c1 : c & 0xFF);
@@ -244,7 +244,7 @@ the current primary charset (value of `charset-primary'). */)
c = XFASTINT (ch);
if (c >= 0400)
error ("Invalid unibyte character: %d", c);
- charset = CHARSET_FROM_ID (charset_primary);
+ charset = CHARSET_FROM_ID (charset_unibyte);
c = DECODE_CHAR (charset, c);
if (c < 0)
c = BYTE8_TO_CHAR (XFASTINT (ch));
@@ -260,7 +260,6 @@ the current primary charset (value of `charset-primary'). */)
Lisp_Object ch;
{
int c;
- struct charset *charset;
CHECK_CHARACTER (ch);
c = XFASTINT (ch);