aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2002-08-21 02:27:07 +0000
committerKenichi Handa2002-08-21 02:27:07 +0000
commit1106ea2b1a042b7d7d3670a506d5738d7049c550 (patch)
treec3c8f019a1d255212a9312df330da2355cd7cace /src
parent927d47132eff0cd7b105f6e588c57d9e49b63387 (diff)
downloademacs-1106ea2b1a042b7d7d3670a506d5738d7049c550.tar.gz
emacs-1106ea2b1a042b7d7d3670a506d5738d7049c550.zip
(BYTE8_STRING): New macro.
Diffstat (limited to 'src')
-rw-r--r--src/character.h9
1 files changed, 9 insertions, 0 deletions
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. */
149 (p)[1] = (0x80 | ((c) & 0x3F)), \ 149 (p)[1] = (0x80 | ((c) & 0x3F)), \
150 2)) 150 2))
151 151
152/* Store multibyte form of eight-bit char B in P. The caller should
153 allocate at least MAX_MULTIBYTE_LENGTH bytes area at P in advance.
154 Returns the length of the multibyte form. */
155
156#define BYTE8_STRING(b, p) \
157 ((p)[0] = (0xC0 | (((b) >> 6) & 0x01)), \
158 (p)[1] = (0x80 | ((c) & 0x3F)), \
159 2)
160
152 161
153/* Store multibyte form of the character C in P. The caller should 162/* Store multibyte form of the character C in P. The caller should
154 allocate at least MAX_MULTIBYTE_LENGTH bytes area at P in advance. 163 allocate at least MAX_MULTIBYTE_LENGTH bytes area at P in advance.