+#else /* not BYTE_COMBINING_DEBUG */
+
+#define PARSE_MULTIBYTE_SEQ(str, length, bytes) \
+ (bytes) = BYTES_BY_CHAR_HEAD ((str)[0])
+
+#endif /* not BYTE_COMBINING_DEBUG */
+
+/* Return 1 iff the byte sequence at unibyte string STR (LENGTH bytes)
+ is valid as a multibyte form. If valid, by a side effect, BYTES is
+ set to the byte length of the multibyte form. */
+
+#define UNIBYTE_STR_AS_MULTIBYTE_P(str, length, bytes) \
+ (((str)[0] < 0x80 || (str)[0] >= 0xA0) \
+ ? ((bytes) = 1) \
+ : (((bytes) = BYTES_BY_CHAR_HEAD ((str)[0])), \
+ ((bytes) > 1 && (bytes) <= (length) \
+ && (str)[0] != LEADING_CODE_8_BIT_CONTROL \
+ && !CHAR_HEAD_P ((str)[1]) \
+ && ((bytes) == 2 \
+ || (!CHAR_HEAD_P ((str)[2]) \
+ && ((bytes) == 3 \
+ || !CHAR_HEAD_P ((str)[3])))))))
+
+/* Return 1 iff the byte sequence at multibyte string STR is valid as
+ a unibyte form. By a side effect, BYTES is set to the byte length
+ of one character at STR. */
+
+#define MULTIBYTE_STR_AS_UNIBYTE_P(str, bytes) \
+ ((bytes) = BYTES_BY_CHAR_HEAD ((str)[0]), \
+ (str)[0] != LEADING_CODE_8_BIT_CONTROL)
+
+/* The charset of character C is stored in CHARSET, and the
+ position-codes of C are stored in C1 and C2.
+ We store -1 in C2 if the dimension of the charset is 1. */
+
+#define SPLIT_CHAR(c, charset, c1, c2) \
+ (SINGLE_BYTE_CHAR_P (c) \
+ ? ((charset \
+ = (ASCII_BYTE_P (c) \
+ ? CHARSET_ASCII \
+ : ((c) < 0xA0 ? CHARSET_8_BIT_CONTROL : CHARSET_8_BIT_GRAPHIC))), \
+ c1 = (c), c2 = -1) \
+ : ((c) & CHAR_FIELD1_MASK \
+ ? (charset = (CHAR_FIELD1 (c) \
+ + ((c) < MIN_CHAR_PRIVATE_DIMENSION2 ? 0x8F : 0xE0)), \
+ c1 = CHAR_FIELD2 (c), \
+ c2 = CHAR_FIELD3 (c)) \
+ : (charset = CHAR_FIELD2 (c) + 0x70, \
+ c1 = CHAR_FIELD3 (c), \
+ c2 = -1)))
+
+/* Return 1 iff character C has valid printable glyph. */
+#define CHAR_PRINTABLE_P(c) (ASCII_BYTE_P (c) || char_printable_p (c))
+
+/* The charset of the character at STR is stored in CHARSET, and the
+ position-codes are stored in C1 and C2.
+ We store -1 in C2 if the character is just 2 bytes. */
+
+#define SPLIT_STRING(str, len, charset, c1, c2) \
+ ((BYTES_BY_CHAR_HEAD ((unsigned char) *(str)) < 2 \
+ || BYTES_BY_CHAR_HEAD ((unsigned char) *(str)) > len \
+ || split_string (str, len, &charset, &c1, &c2) < 0) \
+ ? c1 = *(str), charset = CHARSET_ASCII \
+ : charset)