diff options
| author | Kenichi Handa | 2002-07-31 07:05:33 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2002-07-31 07:05:33 +0000 |
| commit | 8bc28f69bac6280a3b33ecffebe93c5d7b67b4ad (patch) | |
| tree | fa102b45cd32e182ffdb96c390d3d2791e31abd0 | |
| parent | bb4a388429ea9bf8ed5978cf7322c2f8f635d115 (diff) | |
| download | emacs-8bc28f69bac6280a3b33ecffebe93c5d7b67b4ad.tar.gz emacs-8bc28f69bac6280a3b33ecffebe93c5d7b67b4ad.zip | |
(CHAR_TO_BYTE8): If C is not eight-bit char, call
multibyte_char_to_unibyte.
| -rw-r--r-- | src/character.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/character.h b/src/character.h index b83a51d4e82..c2ac15bfc80 100644 --- a/src/character.h +++ b/src/character.h | |||
| @@ -51,15 +51,18 @@ Boston, MA 02111-1307, USA. */ | |||
| 51 | #define MAX_4_BYTE_CHAR 0x1FFFFF | 51 | #define MAX_4_BYTE_CHAR 0x1FFFFF |
| 52 | #define MAX_5_BYTE_CHAR 0x3FFF7F | 52 | #define MAX_5_BYTE_CHAR 0x3FFF7F |
| 53 | 53 | ||
| 54 | /* Nonzero iff C is a character that corresponds to a raw 8-bit | ||
| 55 | byte. */ | ||
| 56 | #define CHAR_BYTE8_P(c) ((c) > MAX_5_BYTE_CHAR) | ||
| 57 | |||
| 54 | /* Return the character code for raw 8-bit byte BYTE. */ | 58 | /* Return the character code for raw 8-bit byte BYTE. */ |
| 55 | #define BYTE8_TO_CHAR(byte) ((byte) + 0x3FFF00) | 59 | #define BYTE8_TO_CHAR(byte) ((byte) + 0x3FFF00) |
| 56 | 60 | ||
| 57 | /* Return the raw 8-bit byte for character C. */ | 61 | /* Return the raw 8-bit byte for character C. */ |
| 58 | #define CHAR_TO_BYTE8(c) ((c) - 0x3FFF00) | 62 | #define CHAR_TO_BYTE8(c) \ |
| 59 | 63 | (CHAR_BYTE8_P (c) \ | |
| 60 | /* Nonzero iff C is a character that corresponds to a raw 8-bit | 64 | ? (c) - 0x3FFF00 \ |
| 61 | byte. */ | 65 | : multibyte_char_to_unibyte (c, Qnil)) |
| 62 | #define CHAR_BYTE8_P(c) ((c) > MAX_5_BYTE_CHAR) | ||
| 63 | 66 | ||
| 64 | /* Nonzero iff BYTE is the 1st byte of a multibyte form of a character | 67 | /* Nonzero iff BYTE is the 1st byte of a multibyte form of a character |
| 65 | that corresponds to a raw 8-bit byte. */ | 68 | that corresponds to a raw 8-bit byte. */ |