From a7a06a7ccfe0af1e134357678b8fa6cf87dff3b0 Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Sat, 7 Feb 2009 16:32:56 +0000 Subject: anthy-9100h --- src-util/rkconv.h | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 src-util/rkconv.h (limited to 'src-util/rkconv.h') diff --git a/src-util/rkconv.h b/src-util/rkconv.h new file mode 100644 index 0000000..8220699 --- /dev/null +++ b/src-util/rkconv.h @@ -0,0 +1,51 @@ +#ifndef RKCONV_H_INCLUDED +#define RKCONV_H_INCLUDED + +struct rk_map; +struct rk_rule +{ + const char* lhs; + const char* rhs; + const char* follow; +}; +struct rk_conv_context; + +struct rk_map* +rk_map_create(const struct rk_rule* rules); +struct rk_conv_context* +rk_context_create(int brk); +struct rk_map* +rk_select_map(struct rk_conv_context* cc, struct rk_map* map); +int +rk_push_key(struct rk_conv_context* cc, int c); +int +rk_result(struct rk_conv_context* cc, char* buf, int size); +void +rk_context_free(struct rk_conv_context* cc); +int +rk_map_free(struct rk_map* map); +int +rk_partial_result(struct rk_conv_context* cc, char* buf, int size); + +void +rk_flush(struct rk_conv_context* cc); +void +rk_terminate(struct rk_conv_context* cc); +int +rk_get_pending_str(struct rk_conv_context* cc, char* buf, int size); +struct rk_map* +rk_register_map(struct rk_conv_context* cc, int mapn, struct rk_map* map); +void +rk_select_registered_map(struct rk_conv_context* cc, int mapn); +int +rk_selected_map(struct rk_conv_context* cc); + +struct rk_rule* +rk_merge_rules(const struct rk_rule* r1, const struct rk_rule* r2); +void +rk_rules_free(struct rk_rule* rules); + +const char *brk_roman_get_previous_pending(struct rk_conv_context *); +int brk_roman_get_decided_len(struct rk_conv_context *); + +#endif /* RKCONV_H_INCLUDED */ -- cgit v1.2.1