From: Gerd Moellmann Date: Wed, 21 Jul 1999 21:43:52 +0000 (+0000) Subject: (CHAR_LEN): Moved here from dispextern.h. X-Git-Tag: emacs-pretest-21.0.90~7425 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3dc9587ac1feec789a32c21a2ad8a009f7b30170;p=emacs.git (CHAR_LEN): Moved here from dispextern.h. --- diff --git a/src/charset.h b/src/charset.h index d385e05bbb6..2cc0f0ce017 100644 --- a/src/charset.h +++ b/src/charset.h @@ -839,4 +839,12 @@ extern Lisp_Object Vauto_fill_chars; while (i--) *from_p++ = *to_p++; \ } while (0) +/* Length of C in bytes. */ + +#define CHAR_LEN(C) \ + (CHAR_CHARSET ((C)) == CHARSET_COMPOSITION \ + ? cmpchar_table[COMPOSITE_CHAR_ID ((C))]->len \ + : CHARSET_BYTES (CHAR_CHARSET ((C)))) + + #endif /* _CHARSET_H */