1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-20 19:42:53 -08:00

(MAKE_CHAR_UNIBYTE, MAKE_CHAR_MULTIBYTE): New macros.

This commit is contained in:
Kenichi Handa 2002-08-20 03:59:11 +00:00
parent 2422e50a51
commit 3e41107450

View file

@ -68,6 +68,22 @@ Boston, MA 02111-1307, USA. */
that corresponds to a raw 8-bit byte. */
#define CHAR_BYTE8_HEAD_P(byte) ((byte) == 0xC0 || (byte) == 0xC1)
/* If C is not ASCII, make it unibyte. */
#define MAKE_CHAR_UNIBYTE(c) \
if (! ASCII_CHAR_P (c)) \
c = multibyte_char_to_unibyte (c, Qnil); \
else
/* If C is not ASCII, make it multibyte. */
#define MAKE_CHAR_MULTIBYTE(c) \
if (! ASCII_CHAR_P (c)) \
c = unibyte_char_to_multibyte (c); \
else
/* This is the maximum byte length of multibyte form. */
#define MAX_MULTIBYTE_LENGTH 5