+ /* For handling composition sequence. */
+#include "composite.h"
+
+enum composition_state
+ {
+ COMPOSING_NO,
+ COMPOSING_CHAR,
+ COMPOSING_RULE,
+ COMPOSING_COMPONENT_CHAR,
+ COMPOSING_COMPONENT_RULE
+ };
+
+/* Structure for the current composition status. */
+struct composition_status
+{
+ enum composition_state state;
+ enum composition_method method;
+ int old_form; /* 0:pre-21 form, 1:post-21 form */
+ int length; /* number of elements produced in charbuf */
+ int nchars; /* number of characters composed */
+ int ncomps; /* number of composition components */
+ /* Maximum carryover is for the case of COMPOSITION_WITH_RULE_ALTCHARS.
+ See the comment in coding.c. */
+ int carryover[4 /* annotation header */
+ + MAX_COMPOSITION_COMPONENTS * 3 - 2 /* ALTs and RULEs */
+ + 2 /* intermediate -1 -1 */
+ + MAX_COMPOSITION_COMPONENTS /* CHARs */
+ ];
+};
+
+