From: Kenichi Handa Date: Wed, 21 Aug 2002 02:27:07 +0000 (+0000) Subject: (BYTE8_STRING): New macro. X-Git-Tag: emacs-pretest-23.0.90~8295^2~1864^2~401 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1106ea2b1a042b7d7d3670a506d5738d7049c550;p=emacs.git (BYTE8_STRING): New macro. --- 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.