summaryrefslogtreecommitdiff
path: root/src/charset.h
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>1998-08-28 12:22:39 +0000
committerKenichi Handa <handa@m17n.org>1998-08-28 12:22:39 +0000
commit3124bc0ed3b0182f1c339dc0fe85a79f2474415a (patch)
tree37ea770111f6d3f987c10f80b080a6f468e12fc2 /src/charset.h
parent6d0b4facd2fa9385ec9b332ebd78c41840f4075f (diff)
downloademacs-3124bc0ed3b0182f1c339dc0fe85a79f2474415a.tar.gz
(CHAR_BYTES): New macro.
Diffstat (limited to 'src/charset.h')
-rw-r--r--src/charset.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/charset.h b/src/charset.h
index 34540c3d201..d2fd94e6ade 100644
--- a/src/charset.h
+++ b/src/charset.h
@@ -553,6 +553,9 @@ extern int iso_charset_table[2][2][128];
#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 cmpchar_component P_ ((unsigned int, unsigned int));
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;