Mercurial > emacs
changeset 23130:f2cee3bcef78
(CHAR_BYTES): New macro.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Fri, 28 Aug 1998 12:22:39 +0000 |
parents | 1d223a4bf4de |
children | f7e486faa1ad |
files | src/charset.h |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/charset.h Fri Aug 28 12:22:39 1998 +0000 +++ b/src/charset.h Fri Aug 28 12:22:39 1998 +0000 @@ -553,6 +553,9 @@ #define BASE_LEADING_CODE_P(c) (BYTES_BY_CHAR_HEAD ((unsigned char) (c)) > 1) +/* Return how many bytes C will occupy in a multibyte buffer. */ +#define CHAR_BYTES(c) (SINGLE_BYTE_CHAR_P (c) ? 1 : char_bytes (c)) + /* The following two macros CHAR_STRING and STRING_CHAR are the main entry points to convert between Emacs two types of character representations: multi-byte form and single-word form (character @@ -815,6 +818,7 @@ extern int find_charset_in_str P_ ((unsigned char *, int, int *, Lisp_Object, int)); extern int strwidth P_ ((unsigned char *, int)); +extern int char_bytes P_ ((int)); extern Lisp_Object Vtranslation_table_vector;