summaryrefslogtreecommitdiff
path: root/src-diclib/diclib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src-diclib/diclib.c')
-rw-r--r--src-diclib/diclib.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/src-diclib/diclib.c b/src-diclib/diclib.c
new file mode 100644
index 0000000..dfe8bb9
--- /dev/null
+++ b/src-diclib/diclib.c
@@ -0,0 +1,42 @@
+#include <sys/types.h>
+#include <netinet/in.h>
+
+/**/
+#include <anthy/diclib.h>
+#include <anthy/xstr.h>
+#include <anthy/alloc.h>
+#include <anthy/conf.h>
+#include "diclib_inner.h"
+
+
+unsigned int
+anthy_dic_ntohl(unsigned int a)
+{
+ return ntohl(a);
+}
+
+unsigned int
+anthy_dic_htonl(unsigned int a)
+{
+ return htonl(a);
+}
+
+int
+anthy_init_diclib()
+{
+ anthy_do_conf_init();
+ if (anthy_init_file_dic() == -1) {
+ return -1;
+ }
+ anthy_init_xchar_tab();
+ anthy_init_xstr();
+ return 0;
+}
+
+void
+anthy_quit_diclib()
+{
+ anthy_quit_allocator();
+ anthy_quit_xstr();
+ anthy_conf_free();
+}