diff options
| author | Kenichi Handa | 2002-08-20 03:59:11 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2002-08-20 03:59:11 +0000 |
| commit | 3e411074503a75b3cb85da2bdb6d5b42bbf64a38 (patch) | |
| tree | 88d6e945cb612cefb44e6d7742792cf3c7de8494 /src | |
| parent | 2422e50a5174bac265f12c7888bf29366dc44a6d (diff) | |
| download | emacs-3e411074503a75b3cb85da2bdb6d5b42bbf64a38.tar.gz emacs-3e411074503a75b3cb85da2bdb6d5b42bbf64a38.zip | |
(MAKE_CHAR_UNIBYTE, MAKE_CHAR_MULTIBYTE): New macros.
Diffstat (limited to 'src')
| -rw-r--r-- | src/character.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/character.h b/src/character.h index c2ac15bfc80..f193dcd6906 100644 --- a/src/character.h +++ b/src/character.h | |||
| @@ -68,6 +68,22 @@ Boston, MA 02111-1307, USA. */ | |||
| 68 | that corresponds to a raw 8-bit byte. */ | 68 | that corresponds to a raw 8-bit byte. */ |
| 69 | #define CHAR_BYTE8_HEAD_P(byte) ((byte) == 0xC0 || (byte) == 0xC1) | 69 | #define CHAR_BYTE8_HEAD_P(byte) ((byte) == 0xC0 || (byte) == 0xC1) |
| 70 | 70 | ||
| 71 | /* If C is not ASCII, make it unibyte. */ | ||
| 72 | |||
| 73 | #define MAKE_CHAR_UNIBYTE(c) \ | ||
| 74 | if (! ASCII_CHAR_P (c)) \ | ||
| 75 | c = multibyte_char_to_unibyte (c, Qnil); \ | ||
| 76 | else | ||
| 77 | |||
| 78 | |||
| 79 | /* If C is not ASCII, make it multibyte. */ | ||
| 80 | |||
| 81 | #define MAKE_CHAR_MULTIBYTE(c) \ | ||
| 82 | if (! ASCII_CHAR_P (c)) \ | ||
| 83 | c = unibyte_char_to_multibyte (c); \ | ||
| 84 | else | ||
| 85 | |||
| 86 | |||
| 71 | /* This is the maximum byte length of multibyte form. */ | 87 | /* This is the maximum byte length of multibyte form. */ |
| 72 | #define MAX_MULTIBYTE_LENGTH 5 | 88 | #define MAX_MULTIBYTE_LENGTH 5 |
| 73 | 89 | ||