From 1106ea2b1a042b7d7d3670a506d5738d7049c550 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Wed, 21 Aug 2002 02:27:07 +0000 Subject: [PATCH] (BYTE8_STRING): New macro. --- src/character.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/character.h b/src/character.h index f193dcd6906..f603140e769 100644 --- a/src/character.h +++ b/src/character.h @@ -149,6 +149,15 @@ Boston, MA 02111-1307, USA. */ (p)[1] = (0x80 | ((c) & 0x3F)), \ 2)) +/* Store multibyte form of eight-bit char B in P. The caller should + allocate at least MAX_MULTIBYTE_LENGTH bytes area at P in advance. + Returns the length of the multibyte form. */ + +#define BYTE8_STRING(b, p) \ + ((p)[0] = (0xC0 | (((b) >> 6) & 0x01)), \ + (p)[1] = (0x80 | ((c) & 0x3F)), \ + 2) + /* Store multibyte form of the character C in P. The caller should allocate at least MAX_MULTIBYTE_LENGTH bytes area at P in advance. -- 2.39.5