summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2012-11-04 07:14:38 -0800
committerAnas Nashif <anas.nashif@intel.com>2012-11-04 07:14:38 -0800
commite28c3fb0c3efaee49f10d1aa87e5eb9170cdf17a (patch)
tree87c37522bc6462b73c5f327716e8063f8387ec34 /include
downloadlibthai-upstream/0.1.18.tar.gz
libthai-upstream/0.1.18.tar.bz2
libthai-upstream/0.1.18.zip
Imported Upstream version 0.1.18upstream/0.1.18upstream
Diffstat (limited to 'include')
-rw-r--r--include/Makefile.am4
-rw-r--r--include/Makefile.in589
-rw-r--r--include/thai/Makefile.am20
-rw-r--r--include/thai/Makefile.in512
-rw-r--r--include/thai/thailib.h54
-rw-r--r--include/thai/thbrk.h45
-rw-r--r--include/thai/thcell.h60
-rw-r--r--include/thai/thcoll.h44
-rw-r--r--include/thai/thctype.h427
-rw-r--r--include/thai/thinp.h63
-rw-r--r--include/thai/thrend.h76
-rw-r--r--include/thai/thstr.h42
-rw-r--r--include/thai/thwbrk.h46
-rw-r--r--include/thai/thwchar.h65
-rw-r--r--include/thai/thwcoll.h69
-rw-r--r--include/thai/thwctype.h101
-rw-r--r--include/thai/thwinp.h39
-rw-r--r--include/thai/thwrend.h55
-rw-r--r--include/thai/thwstr.h43
-rw-r--r--include/thai/tis.h123
-rw-r--r--include/thai/wtt.h133
21 files changed, 2610 insertions, 0 deletions
diff --git a/include/Makefile.am b/include/Makefile.am
new file mode 100644
index 0000000..7d0c75c
--- /dev/null
+++ b/include/Makefile.am
@@ -0,0 +1,4 @@
+SUBDIRS = thai
+
+MAINTAINERCLEANFILES = Makefile.in
+
diff --git a/include/Makefile.in b/include/Makefile.in
new file mode 100644
index 0000000..15ee6db
--- /dev/null
+++ b/include/Makefile.in
@@ -0,0 +1,589 @@
+# Makefile.in generated by automake 1.11.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = include
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ distdir
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATRIE_CFLAGS = @DATRIE_CFLAGS@
+DATRIE_LIBS = @DATRIE_LIBS@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOXYGEN = @DOXYGEN@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_AGE = @LT_AGE@
+LT_CURRENT = @LT_CURRENT@
+LT_REVISION = @LT_REVISION@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TRIETOOL = @TRIETOOL@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+htmldocdir = @htmldocdir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SUBDIRS = thai
+MAINTAINERCLEANFILES = Makefile.in
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu include/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+ install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am check check-am clean clean-generic clean-libtool \
+ ctags ctags-recursive distclean distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/include/thai/Makefile.am b/include/thai/Makefile.am
new file mode 100644
index 0000000..fcb5a6c
--- /dev/null
+++ b/include/thai/Makefile.am
@@ -0,0 +1,20 @@
+libthaiincludedir = $(includedir)/thai
+libthaiinclude_HEADERS = \
+ thailib.h \
+ thctype.h \
+ thstr.h \
+ thcoll.h \
+ thcell.h \
+ thinp.h \
+ thrend.h \
+ thbrk.h \
+ thwchar.h \
+ thwctype.h \
+ thwcoll.h \
+ thwinp.h \
+ thwrend.h \
+ thwstr.h \
+ thwbrk.h \
+ tis.h \
+ wtt.h
+
diff --git a/include/thai/Makefile.in b/include/thai/Makefile.in
new file mode 100644
index 0000000..be14e47
--- /dev/null
+++ b/include/thai/Makefile.in
@@ -0,0 +1,512 @@
+# Makefile.in generated by automake 1.11.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = include/thai
+DIST_COMMON = $(libthaiinclude_HEADERS) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(libthaiincludedir)"
+HEADERS = $(libthaiinclude_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATRIE_CFLAGS = @DATRIE_CFLAGS@
+DATRIE_LIBS = @DATRIE_LIBS@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOXYGEN = @DOXYGEN@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_AGE = @LT_AGE@
+LT_CURRENT = @LT_CURRENT@
+LT_REVISION = @LT_REVISION@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TRIETOOL = @TRIETOOL@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+htmldocdir = @htmldocdir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+libthaiincludedir = $(includedir)/thai
+libthaiinclude_HEADERS = \
+ thailib.h \
+ thctype.h \
+ thstr.h \
+ thcoll.h \
+ thcell.h \
+ thinp.h \
+ thrend.h \
+ thbrk.h \
+ thwchar.h \
+ thwctype.h \
+ thwcoll.h \
+ thwinp.h \
+ thwrend.h \
+ thwstr.h \
+ thwbrk.h \
+ tis.h \
+ wtt.h
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/thai/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu include/thai/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-libthaiincludeHEADERS: $(libthaiinclude_HEADERS)
+ @$(NORMAL_INSTALL)
+ @list='$(libthaiinclude_HEADERS)'; test -n "$(libthaiincludedir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libthaiincludedir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libthaiincludedir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libthaiincludedir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(libthaiincludedir)" || exit $$?; \
+ done
+
+uninstall-libthaiincludeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libthaiinclude_HEADERS)'; test -n "$(libthaiincludedir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(libthaiincludedir)'; $(am__uninstall_files_from_dir)
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(HEADERS)
+installdirs:
+ for dir in "$(DESTDIR)$(libthaiincludedir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-libthaiincludeHEADERS
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libthaiincludeHEADERS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool ctags distclean distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-libthaiincludeHEADERS install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-libthaiincludeHEADERS
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/include/thai/thailib.h b/include/thai/thailib.h
new file mode 100644
index 0000000..4d53771
--- /dev/null
+++ b/include/thai/thailib.h
@@ -0,0 +1,54 @@
+/*
+ * libthai - Thai Language Support Library
+ * Copyright (C) 2001 Theppitak Karoonboonyanan <thep@linux.thai.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/*
+ * thailib.h - general declarations for libthai
+ * Created: 2001-05-17
+ */
+
+#ifndef THAI_THAILIB_H
+#define THAI_THAILIB_H
+
+/**
+ * @file thailib.h
+ * @brief General declarations for libthai
+ */
+
+#include <stddef.h>
+
+#ifdef __cplusplus
+# define BEGIN_CDECL extern "C" {
+# define END_CDECL }
+#else /* !__cplusplus */
+# define BEGIN_CDECL
+# define END_CDECL
+#endif /* __cplusplus */
+
+/**
+ * @brief Character value indicating error
+ */
+#define THCHAR_ERR ((thchar_t)~0)
+
+/**
+ * @brief Thai character type for storing TIS-620 character
+ */
+typedef unsigned char thchar_t;
+
+#endif /* THAI_THAILIB_H */
+
diff --git a/include/thai/thbrk.h b/include/thai/thbrk.h
new file mode 100644
index 0000000..6cede25
--- /dev/null
+++ b/include/thai/thbrk.h
@@ -0,0 +1,45 @@
+/*
+ * libthai - Thai Language Support Library
+ * Copyright (C) 2001 Theppitak Karoonboonyanan <thep@linux.thai.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/*
+ * thbrk.h - Thai word segmentation
+ * Created: 2001-05-17
+ */
+
+#ifndef THAI_THBRK_H
+#define THAI_THBRK_H
+
+#include <thai/thailib.h>
+
+BEGIN_CDECL
+
+/**
+ * @file thbrk.h
+ * @brief Thai word segmentation
+ */
+
+extern int th_brk(const thchar_t *s, int pos[], size_t n);
+
+extern int th_brk_line(const thchar_t *in, thchar_t *out, size_t n,
+ const char *delim);
+
+END_CDECL
+
+#endif /* THAI_THBRK_H */
+
diff --git a/include/thai/thcell.h b/include/thai/thcell.h
new file mode 100644
index 0000000..55fcf72
--- /dev/null
+++ b/include/thai/thcell.h
@@ -0,0 +1,60 @@
+/*
+ * libthai - Thai Language Support Library
+ * Copyright (C) 2001 Theppitak Karoonboonyanan <thep@linux.thai.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/*
+ * thcell.h - Thai string cell custering
+ * Created: 2001-08-08 (split from thrend.h)
+ */
+
+#ifndef THAI_THCELL_H
+#define THAI_THCELL_H
+
+#include <thai/thailib.h>
+
+BEGIN_CDECL
+
+/**
+ * @file thcell.h
+ * @brief Thai string cell custering
+ */
+
+/**
+ * @brief Thai char cell representation
+ */
+struct thcell_t {
+ thchar_t base; /**< base character */
+ thchar_t hilo; /**< upper/lower vowel/diacritic */
+ thchar_t top; /**< top-level mark */
+};
+
+extern void th_init_cell(struct thcell_t *cell);
+
+extern size_t th_next_cell(const thchar_t *s, size_t len,
+ struct thcell_t *cell, int is_decomp_am);
+
+extern size_t th_prev_cell(const thchar_t *s, size_t pos,
+ struct thcell_t *cell, int is_decomp_am);
+extern size_t th_make_cells(const thchar_t *s, size_t len,
+ struct thcell_t cells[], size_t *ncells,
+ int is_decomp_am);
+
+END_CDECL
+
+#endif /* THAI_THCELL_H */
+
diff --git a/include/thai/thcoll.h b/include/thai/thcoll.h
new file mode 100644
index 0000000..c424e27
--- /dev/null
+++ b/include/thai/thcoll.h
@@ -0,0 +1,44 @@
+/*
+ * libthai - Thai Language Support Library
+ * Copyright (C) 2001 Theppitak Karoonboonyanan <thep@linux.thai.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/*
+ * thcoll.h - Thai string collation
+ * Created: 2001-05-17
+ */
+
+#ifndef THAI_THCOLL_H
+#define THAI_THCOLL_H
+
+#include <thai/thailib.h>
+
+BEGIN_CDECL
+
+/**
+ * @file thcoll.h
+ * @brief Thai string collation
+ */
+
+extern int th_strcoll(const thchar_t *s1, const thchar_t *s2);
+
+extern size_t th_strxfrm(thchar_t dest[], const thchar_t *src, size_t n);
+
+END_CDECL
+
+#endif /* THAI_THCOLL_H */
+
diff --git a/include/thai/thctype.h b/include/thai/thctype.h
new file mode 100644
index 0000000..2bd6632
--- /dev/null
+++ b/include/thai/thctype.h
@@ -0,0 +1,427 @@
+/*
+ * libthai - Thai Language Support Library
+ * Copyright (C) 2001 Theppitak Karoonboonyanan <thep@linux.thai.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/*
+ * thctype.h - Thai character classifications
+ * Created: 2001-05-17
+ * Author: Theppitak Karoonboonyanan <thep@linux.thai.net>
+ */
+
+#ifndef THAI_THCTYPE_H
+#define THAI_THCTYPE_H
+
+#include <thai/thailib.h>
+
+BEGIN_CDECL
+
+/**
+ * @file thctype.h
+ * @brief Thai character classifications
+ *
+ * The Thai Standard Industrial Standards Institute (TIS) defined the Thai
+ * character set for using with computer named TIS-620. This character set is
+ * 8-bit encoded including both English and Thai characters. Aliases of
+ * TIS-620 are TIS620, TIS620-0, TIS620.2529-1, TIS620.2533-0 and ISO-IR-166.
+ *
+ * The followings are the enconding values in hexadecimal, unicode values and
+ * their names.
+ *
+ * <pre>
+ * 0x00 &lt;U0000&gt; NULL (NUL)
+ * 0x01 &lt;U0001&gt; START OF HEADING (SOH)
+ * 0x02 &lt;U0002&gt; START OF TEXT (STX)
+ * 0x03 &lt;U0003&gt; END OF TEXT (ETX)
+ * 0x04 &lt;U0004&gt; END OF TRANSMISSION (EOT)
+ * 0x05 &lt;U0005&gt; ENQUIRY (ENQ)
+ * 0x06 &lt;U0006&gt; ACKNOWLEDGE (ACK)
+ * 0x07 &lt;U0007&gt; BELL (BEL)
+ * 0x08 &lt;U0008&gt; BACKSPACE (BS)
+ * 0x09 &lt;U0009&gt; CHARACTER TABULATION (HT)
+ * 0x0A &lt;U000A&gt; LINE FEED (LF)
+ * 0x0B &lt;U000B&gt; LINE TABULATION (VT)
+ * 0x0C &lt;U000C&gt; FORM FEED (FF)
+ * 0x0D &lt;U000D&gt; CARRIAGE RETURN (CR)
+ * 0x0E &lt;U000E&gt; SHIFT OUT (SO)
+ * 0x0F &lt;U000F&gt; SHIFT IN (SI)
+ * 0x10 &lt;U0010&gt; DATALINK ESCAPE (DLE)
+ * 0x11 &lt;U0011&gt; DEVICE CONTROL ONE (DC1)
+ * 0x12 &lt;U0012&gt; DEVICE CONTROL TWO (DC2)
+ * 0x13 &lt;U0013&gt; DEVICE CONTROL THREE (DC3)
+ * 0x14 &lt;U0014&gt; DEVICE CONTROL FOUR (DC4)
+ * 0x15 &lt;U0015&gt; NEGATIVE ACKNOWLEDGE (NAK)
+ * 0x16 &lt;U0016&gt; SYNCHRONOUS IDLE (SYN)
+ * 0x17 &lt;U0017&gt; END OF TRANSMISSION BLOCK (ETB)
+ * 0x18 &lt;U0018&gt; CANCEL (CAN)
+ * 0x19 &lt;U0019&gt; END OF MEDIUM (EM)
+ * 0x1A &lt;U001A&gt; SUBSTITUTE (SUB)
+ * 0x1B &lt;U001B&gt; ESCAPE (ESC)
+ * 0x1C &lt;U001C&gt; FILE SEPARATOR (IS4)
+ * 0x1D &lt;U001D&gt; GROUP SEPARATOR (IS3)
+ * 0x1E &lt;U001E&gt; RECORD SEPARATOR (IS2)
+ * 0x1F &lt;U001F&gt; UNIT SEPARATOR (IS1)
+ * 0x20 &lt;U0020&gt; SPACE
+ * 0x21 &lt;U0021&gt; EXCLAMATION MARK
+ * 0x22 &lt;U0022&gt; QUOTATION MARK
+ * 0x23 &lt;U0023&gt; NUMBER SIGN
+ * 0x24 &lt;U0024&gt; DOLLAR SIGN
+ * 0x25 &lt;U0025&gt; PERCENT SIGN
+ * 0x26 &lt;U0026&gt; AMPERSAND
+ * 0x27 &lt;U0027&gt; APOSTROPHE
+ * 0x28 &lt;U0028&gt; LEFT PARENTHESIS
+ * 0x29 &lt;U0029&gt; RIGHT PARENTHESIS
+ * 0x2A &lt;U002A&gt; ASTERISK
+ * 0x2B &lt;U002B&gt; PLUS SIGN
+ * 0x2C &lt;U002C&gt; COMMA
+ * 0x2D &lt;U002D&gt; HYPHEN-MINUS
+ * 0x2E &lt;U002E&gt; FULL STOP
+ * 0x2F &lt;U002F&gt; SOLIDUS
+ * 0x30 &lt;U0030&gt; DIGIT ZERO
+ * 0x31 &lt;U0031&gt; DIGIT ONE
+ * 0x32 &lt;U0032&gt; DIGIT TWO
+ * 0x33 &lt;U0033&gt; DIGIT THREE
+ * 0x34 &lt;U0034&gt; DIGIT FOUR
+ * 0x35 &lt;U0035&gt; DIGIT FIVE
+ * 0x36 &lt;U0036&gt; DIGIT SIX
+ * 0x37 &lt;U0037&gt; DIGIT SEVEN
+ * 0x38 &lt;U0038&gt; DIGIT EIGHT
+ * 0x39 &lt;U0039&gt; DIGIT NINE
+ * 0x3A &lt;U003A&gt; COLON
+ * 0x3B &lt;U003B&gt; SEMICOLON
+ * 0x3C &lt;U003C&gt; LESS-THAN SIGN
+ * 0x3D &lt;U003D&gt; EQUALS SIGN
+ * 0x3E &lt;U003E&gt; GREATER-THAN SIGN
+ * 0x3F &lt;U003F&gt; QUESTION MARK
+ * 0x40 &lt;U0040&gt; COMMERCIAL AT
+ * 0x41 &lt;U0041&gt; LATIN CAPITAL LETTER A
+ * 0x42 &lt;U0042&gt; LATIN CAPITAL LETTER B
+ * 0x43 &lt;U0043&gt; LATIN CAPITAL LETTER C
+ * 0x44 &lt;U0044&gt; LATIN CAPITAL LETTER D
+ * 0x45 &lt;U0045&gt; LATIN CAPITAL LETTER E
+ * 0x46 &lt;U0046&gt; LATIN CAPITAL LETTER F
+ * 0x47 &lt;U0047&gt; LATIN CAPITAL LETTER G
+ * 0x48 &lt;U0048&gt; LATIN CAPITAL LETTER H
+ * 0x49 &lt;U0049&gt; LATIN CAPITAL LETTER I
+ * 0x4A &lt;U004A&gt; LATIN CAPITAL LETTER J
+ * 0x4B &lt;U004B&gt; LATIN CAPITAL LETTER K
+ * 0x4C &lt;U004C&gt; LATIN CAPITAL LETTER L
+ * 0x4D &lt;U004D&gt; LATIN CAPITAL LETTER M
+ * 0x4E &lt;U004E&gt; LATIN CAPITAL LETTER N
+ * 0x4F &lt;U004F&gt; LATIN CAPITAL LETTER O
+ * 0x50 &lt;U0050&gt; LATIN CAPITAL LETTER P
+ * 0x51 &lt;U0051&gt; LATIN CAPITAL LETTER Q
+ * 0x52 &lt;U0052&gt; LATIN CAPITAL LETTER R
+ * 0x53 &lt;U0053&gt; LATIN CAPITAL LETTER S
+ * 0x54 &lt;U0054&gt; LATIN CAPITAL LETTER T
+ * 0x55 &lt;U0055&gt; LATIN CAPITAL LETTER U
+ * 0x56 &lt;U0056&gt; LATIN CAPITAL LETTER V
+ * 0x57 &lt;U0057&gt; LATIN CAPITAL LETTER W
+ * 0x58 &lt;U0058&gt; LATIN CAPITAL LETTER X
+ * 0x59 &lt;U0059&gt; LATIN CAPITAL LETTER Y
+ * 0x5A &lt;U005A&gt; LATIN CAPITAL LETTER Z
+ * 0x5B &lt;U005B&gt; LEFT SQUARE BRACKET
+ * 0x5C &lt;U005C&gt; REVERSE SOLIDUS
+ * 0x5D &lt;U005D&gt; RIGHT SQUARE BRACKET
+ * 0x5E &lt;U005E&gt; CIRCUMFLEX ACCENT
+ * 0x5F &lt;U005F&gt; LOW LINE
+ * 0x60 &lt;U0060&gt; GRAVE ACCENT
+ * 0x61 &lt;U0061&gt; LATIN SMALL LETTER A
+ * 0x62 &lt;U0062&gt; LATIN SMALL LETTER B
+ * 0x63 &lt;U0063&gt; LATIN SMALL LETTER C
+ * 0x64 &lt;U0064&gt; LATIN SMALL LETTER D
+ * 0x65 &lt;U0065&gt; LATIN SMALL LETTER E
+ * 0x66 &lt;U0066&gt; LATIN SMALL LETTER F
+ * 0x67 &lt;U0067&gt; LATIN SMALL LETTER G
+ * 0x68 &lt;U0068&gt; LATIN SMALL LETTER H
+ * 0x69 &lt;U0069&gt; LATIN SMALL LETTER I
+ * 0x6A &lt;U006A&gt; LATIN SMALL LETTER J
+ * 0x6B &lt;U006B&gt; LATIN SMALL LETTER K
+ * 0x6C &lt;U006C&gt; LATIN SMALL LETTER L
+ * 0x6D &lt;U006D&gt; LATIN SMALL LETTER M
+ * 0x6E &lt;U006E&gt; LATIN SMALL LETTER N
+ * 0x6F &lt;U006F&gt; LATIN SMALL LETTER O
+ * 0x70 &lt;U0070&gt; LATIN SMALL LETTER P
+ * 0x71 &lt;U0071&gt; LATIN SMALL LETTER Q
+ * 0x72 &lt;U0072&gt; LATIN SMALL LETTER R
+ * 0x73 &lt;U0073&gt; LATIN SMALL LETTER S
+ * 0x74 &lt;U0074&gt; LATIN SMALL LETTER T
+ * 0x75 &lt;U0075&gt; LATIN SMALL LETTER U
+ * 0x76 &lt;U0076&gt; LATIN SMALL LETTER V
+ * 0x77 &lt;U0077&gt; LATIN SMALL LETTER W
+ * 0x78 &lt;U0078&gt; LATIN SMALL LETTER X
+ * 0x79 &lt;U0079&gt; LATIN SMALL LETTER Y
+ * 0x7A &lt;U007A&gt; LATIN SMALL LETTER Z
+ * 0x7B &lt;U007B&gt; LEFT CURLY BRACKET
+ * 0x7C &lt;U007C&gt; VERTICAL LINE
+ * 0x7D &lt;U007D&gt; RIGHT CURLY BRACKET
+ * 0x7E &lt;U007E&gt; TILDE
+ * 0x7F &lt;U007F&gt; DELETE (DEL)
+ * 0xA1 &lt;U0E01&gt; THAI CHARACTER KO KAI
+ * 0xA2 &lt;U0E02&gt; THAI CHARACTER KHO KHAI
+ * 0xA3 &lt;U0E03&gt; THAI CHARACTER KHO KHUAT
+ * 0xA4 &lt;U0E04&gt; THAI CHARACTER KHO KHWAI
+ * 0xA5 &lt;U0E05&gt; THAI CHARACTER KHO KHON
+ * 0xA6 &lt;U0E06&gt; THAI CHARACTER KHO RAKHANG
+ * 0xA7 &lt;U0E07&gt; THAI CHARACTER NGO NGU
+ * 0xA8 &lt;U0E08&gt; THAI CHARACTER CHO CHAN
+ * 0xA9 &lt;U0E09&gt; THAI CHARACTER CHO CHING
+ * 0xAA &lt;U0E0A&gt; THAI CHARACTER CHO CHANG
+ * 0xAB &lt;U0E0B&gt; THAI CHARACTER SO SO
+ * 0xAC &lt;U0E0C&gt; THAI CHARACTER CHO CHOE
+ * 0xAD &lt;U0E0D&gt; THAI CHARACTER YO YING
+ * 0xAE &lt;U0E0E&gt; THAI CHARACTER DO CHADA
+ * 0xAF &lt;U0E0F&gt; THAI CHARACTER TO PATAK
+ * 0xB0 &lt;U0E10&gt; THAI CHARACTER THO THAN
+ * 0xB1 &lt;U0E11&gt; THAI CHARACTER THO NANGMONTHO
+ * 0xB2 &lt;U0E12&gt; THAI CHARACTER THO PHUTHAO
+ * 0xB3 &lt;U0E13&gt; THAI CHARACTER NO NEN
+ * 0xB4 &lt;U0E14&gt; THAI CHARACTER DO DEK
+ * 0xB5 &lt;U0E15&gt; THAI CHARACTER TO TAO
+ * 0xB6 &lt;U0E16&gt; THAI CHARACTER THO THUNG
+ * 0xB7 &lt;U0E17&gt; THAI CHARACTER THO THAHAN
+ * 0xB8 &lt;U0E18&gt; THAI CHARACTER THO THONG
+ * 0xB9 &lt;U0E19&gt; THAI CHARACTER NO NU
+ * 0xBA &lt;U0E1A&gt; THAI CHARACTER BO BAIMAI
+ * 0xBB &lt;U0E1B&gt; THAI CHARACTER PO PLA
+ * 0xBC &lt;U0E1C&gt; THAI CHARACTER PHO PHUNG
+ * 0xBD &lt;U0E1D&gt; THAI CHARACTER FO FA
+ * 0xBE &lt;U0E1E&gt; THAI CHARACTER PHO PHAN
+ * 0xBF &lt;U0E1F&gt; THAI CHARACTER FO FAN
+ * 0xC0 &lt;U0E20&gt; THAI CHARACTER PHO SAMPHAO
+ * 0xC1 &lt;U0E21&gt; THAI CHARACTER MO MA
+ * 0xC2 &lt;U0E22&gt; THAI CHARACTER YO YAK
+ * 0xC3 &lt;U0E23&gt; THAI CHARACTER RO RUA
+ * 0xC4 &lt;U0E24&gt; THAI CHARACTER RU
+ * 0xC5 &lt;U0E25&gt; THAI CHARACTER LO LING
+ * 0xC6 &lt;U0E26&gt; THAI CHARACTER LU
+ * 0xC7 &lt;U0E27&gt; THAI CHARACTER WO WAEN
+ * 0xC8 &lt;U0E28&gt; THAI CHARACTER SO SALA
+ * 0xC9 &lt;U0E29&gt; THAI CHARACTER SO RUSI
+ * 0xCA &lt;U0E2A&gt; THAI CHARACTER SO SUA
+ * 0xCB &lt;U0E2B&gt; THAI CHARACTER HO HIP
+ * 0xCC &lt;U0E2C&gt; THAI CHARACTER LO CHULA
+ * 0xCD &lt;U0E2D&gt; THAI CHARACTER O ANG
+ * 0xCE &lt;U0E2E&gt; THAI CHARACTER HO NOKHUK
+ * 0xCF &lt;U0E2F&gt; THAI CHARACTER PAIYANNOI
+ * 0xD0 &lt;U0E30&gt; THAI CHARACTER SARA A
+ * 0xD1 &lt;U0E31&gt; THAI CHARACTER MAI HAN-AKAT
+ * 0xD2 &lt;U0E32&gt; THAI CHARACTER SARA AA
+ * 0xD3 &lt;U0E33&gt; THAI CHARACTER SARA AM
+ * 0xD4 &lt;U0E34&gt; THAI CHARACTER SARA I
+ * 0xD5 &lt;U0E35&gt; THAI CHARACTER SARA II
+ * 0xD6 &lt;U0E36&gt; THAI CHARACTER SARA UE
+ * 0xD7 &lt;U0E37&gt; THAI CHARACTER SARA UEE
+ * 0xD8 &lt;U0E38&gt; THAI CHARACTER SARA U
+ * 0xD9 &lt;U0E39&gt; THAI CHARACTER SARA UU
+ * 0xDA &lt;U0E3A&gt; THAI CHARACTER PHINTHU
+ * 0xDF &lt;U0E3F&gt; THAI CHARACTER SYMBOL BAHT
+ * 0xE0 &lt;U0E40&gt; THAI CHARACTER SARA E
+ * 0xE1 &lt;U0E41&gt; THAI CHARACTER SARA AE
+ * 0xE2 &lt;U0E42&gt; THAI CHARACTER SARA O
+ * 0xE3 &lt;U0E43&gt; THAI CHARACTER SARA AI MAIMUAN
+ * 0xE4 &lt;U0E44&gt; THAI CHARACTER SARA AI MAIMALAI
+ * 0xE5 &lt;U0E45&gt; THAI CHARACTER LAKKHANGYAO
+ * 0xE6 &lt;U0E46&gt; THAI CHARACTER MAIYAMOK
+ * 0xE7 &lt;U0E47&gt; THAI CHARACTER MAITAIKHU
+ * 0xE8 &lt;U0E48&gt; THAI CHARACTER MAI EK
+ * 0xE9 &lt;U0E49&gt; THAI CHARACTER MAI THO
+ * 0xEA &lt;U0E4A&gt; THAI CHARACTER MAI TRI
+ * 0xEB &lt;U0E4B&gt; THAI CHARACTER MAI CHATTAWA
+ * 0xEC &lt;U0E4C&gt; THAI CHARACTER THANTHAKHAT
+ * 0xED &lt;U0E4D&gt; THAI CHARACTER NIKHAHIT
+ * 0xEE &lt;U0E4E&gt; THAI CHARACTER YAMAKKAN
+ * 0xEF &lt;U0E4F&gt; THAI CHARACTER FONGMAN
+ * 0xF0 &lt;U0E50&gt; THAI DIGIT ZERO
+ * 0xF1 &lt;U0E51&gt; THAI DIGIT ONE
+ * 0xF2 &lt;U0E52&gt; THAI DIGIT TWO
+ * 0xF3 &lt;U0E53&gt; THAI DIGIT THREE
+ * 0xF4 &lt;U0E54&gt; THAI DIGIT FOUR
+ * 0xF5 &lt;U0E55&gt; THAI DIGIT FIVE
+ * 0xF6 &lt;U0E56&gt; THAI DIGIT SIX
+ * 0xF7 &lt;U0E57&gt; THAI DIGIT SEVEN
+ * 0xF8 &lt;U0E58&gt; THAI DIGIT EIGHT
+ * 0xF9 &lt;U0E59&gt; THAI DIGIT NINE
+ * 0xFA &lt;U0E5A&gt; THAI CHARACTER ANGKHANKHU
+ * 0xFB &lt;U0E5B&gt; THAI CHARACTER KHOMUT
+ * </pre>
+ *
+ * Thai characters consist of 44 consonants, vowels, tonemarks, diacritics and
+ * Thai digits. Thai vowels are divided into 4 groups, Leading Vowels (LV),
+ * Following Vowels (FV), Below Vowels (BV) and Above Vowels (AV). There are 4
+ * tonemarks whose position is above a consonant. Diacritics are divided into
+ * 2 groups, Above Diacritics (AD) and Below Diacritics (BD).
+ *
+ * Libthai has defined 4 levels for the position of a character.
+ *
+ * @li Below level: a character is placed below the consonant.
+ * th_chlevel() will return the value -1 for these characters.
+ *
+ * @li Base level: this includes consonants, FV and LV. A character is
+ * placed on baseline.
+ * th_chlevel() will return the value 0 for these characters.
+ *
+ * @li Above level: a character is placed just above the consonant.
+ * th_chlevel() will return the value 1 for these characters.
+ *
+ * @li Top level: this includes tone marks and diacritics. For plain
+ * character cell rendering, it is safe to put these characters at
+ * top-most level. However, some rendering engines may lower them down
+ * on absence of character at Above level, for typographical quality.
+ * th_chlevel() will return the value 2 for these characters.
+ *
+ * There is an extra level value 3 for certain characters which are usually
+ * classified as characters at Above level, but are also allowed to be placed
+ * at Top level for some rare cases. Two characters fall in this category,
+ * namely MAITAIKHU and NIKHAHIT.
+ *
+ * MAITAIKHU can be placed at Top level when writing some minority languages
+ * such as Kuy, to shorten some syllables with compound vowels, such as Sara
+ * Ia and Sara Uea. NIKHAHIT can be placed at Top level in Pali/Sanskrit words,
+ * to represent -ng final sound above SARA I.
+ *
+ * The following figure illustrates a Thai word and characters' level.
+ *
+ * <pre>
+ * --------------------------- Top(2)
+ * ------*-------------------- Top(2)
+ * ------*-------------------- Top(2)
+ * <b>---------------------------</b>
+ * --------------------------- Above(1)
+ * ------*---------------*---- Above(1)
+ * ---****---------------*---- Above(1)
+ * --------------------------- Above(1)
+ * <b>---------------------------</b>
+ * --------------------------- Base(0)
+ * --*---*----***-----*--*---- Base(0)
+ * -*-*-*-*--*---*---*-*-*---- Base(0)
+ * --**-*-*------*---**--*---- Base(0)
+ * ---**--*---*--*---*---*---- Base(0)
+ * ---**--*--*-*-*----*--*---- Base(0)
+ * ---*---*--**--*---*---*---- Base(0)
+ * ---*---*--*---*---*---*---- Base(0)
+ * ---*---*--*****---*****---- Base(0)
+ * <b>--------------------------- Baseline</b>
+ * --------------------------- Below(-1)
+ * -------------------**-*---- Below(-1)
+ * --------------------***---- Below(-1)
+ * --------------------------- Below(-1)
+ * </pre>
+ *
+ * A character placed at below, above or top level is also called dead
+ * character. It is usually combined with a consonant, after a dead character
+ * is typed, the cursor will not be advanced to the next display cell. BV, BD,
+ * TONE, AD and AV are classified as dead character.
+ */
+
+extern int th_istis(thchar_t c);
+
+extern int th_isthai(thchar_t c);
+extern int th_iseng(thchar_t c);
+
+/* Thai letter classification */
+extern int th_isthcons(thchar_t c);
+extern int th_isthvowel(thchar_t c);
+extern int th_isthtone(thchar_t c);
+extern int th_isthdiac(thchar_t c);
+extern int th_isthdigit(thchar_t c);
+extern int th_isthpunct(thchar_t c);
+
+/* Thai consonant shapes classification */
+extern int th_istaillesscons(thchar_t c);
+extern int th_isovershootcons(thchar_t c);
+extern int th_isundershootcons(thchar_t c);
+extern int th_isundersplitcons(thchar_t c);
+
+/* Thai vowel classification */
+extern int th_isldvowel(thchar_t c);
+extern int th_isflvowel(thchar_t c);
+extern int th_isupvowel(thchar_t c);
+extern int th_isblvowel(thchar_t c);
+
+extern int th_chlevel(thchar_t c);
+
+extern int th_iscombchar(thchar_t c);
+
+/*
+ * implementation parts
+ */
+#include <ctype.h>
+#define _th_ISbit(bit) (1 << (bit))
+#define _th_bitfld(base, val) ((val) << (base))
+#define _th_bitmsk(base, bits) (~((~(unsigned short)0) << (bits)) << (base))
+
+enum {
+ _th_IStis = _th_ISbit(0), /* TIS-620 char */
+
+ _th_IScons = _th_ISbit(1), /* Thai consonant */
+ _th_CClassMsk = _th_bitmsk(1, 3), /* Thai consonant shape masks */
+ _th_CCtailless = _th_bitfld(2, 0)|_th_IScons, /* tailless cons */
+ _th_CCovershoot = _th_bitfld(2, 1)|_th_IScons, /* overshoot cons */
+ _th_CCundershoot = _th_bitfld(2, 2)|_th_IScons, /* undershoot cons */
+ _th_CCundersplit = _th_bitfld(2, 3)|_th_IScons, /* undersplit cons */
+ _th_ISvowel = _th_ISbit(4), /* Thai vowel */
+ _th_VClassMsk = _th_bitmsk(4, 3), /* Thai vowel class masks */
+ _th_VCflvowel = _th_bitfld(5, 0)|_th_ISvowel, /* Thai following vowel */
+ _th_VCldvowel = _th_bitfld(5, 1)|_th_ISvowel, /* Thai leading vowel */
+ _th_VCupvowel = _th_bitfld(5, 2)|_th_ISvowel, /* Thai upper vowel */
+ _th_VCblvowel = _th_bitfld(5, 3)|_th_ISvowel, /* Thai below vowel */
+ _th_IStone = _th_ISbit(7), /* Thai tone mark */
+ _th_ISdiac = _th_ISbit(8), /* Thai diacritic */
+ _th_ISdigit = _th_ISbit(9), /* digit */
+ _th_ISpunct = _th_ISbit(10) /* punctuation */
+};
+
+extern const unsigned short _th_ctype_tbl[];
+
+#define _th_isctype(c, type) (_th_ctype_tbl[c] & (type))
+#define _th_isbits(c, mask, val) ((_th_ctype_tbl[c] & (mask)) == (val))
+
+#define th_istis(c) _th_isctype((c), _th_IStis)
+
+#define th_isthai(c) (th_istis(c) && ((c) & 0x80))
+#define th_iseng(c) (!((c) & 0x80))
+
+/* Thai letter classification */
+#define th_isthcons(c) _th_isctype((c), _th_IScons)
+#define th_isthvowel(c) _th_isctype((c), _th_ISvowel)
+#define th_isthtone(c) _th_isctype((c), _th_IStone)
+#define th_isthdiac(c) _th_isctype((c), _th_ISdiac)
+#define th_isthdigit(c) _th_isctype((c), _th_ISdigit)
+#define th_isthpunct(c) _th_isctype((c), _th_ISpunct)
+
+/* Thai consonant shapes classification */
+#define th_istaillesscons(c) _th_isbits((c), _th_CClassMsk, _th_CCtailless)
+#define th_isovershootcons(c) _th_isbits((c), _th_CClassMsk, _th_CCovershoot)
+#define th_isundershootcons(c) _th_isbits((c), _th_CClassMsk, _th_CCundershoot)
+#define th_isundersplitcons(c) _th_isbits((c), _th_CClassMsk, _th_CCundersplit)
+
+/* Thai vowel classification */
+#define th_isldvowel(c) _th_isbits((c), _th_VClassMsk, _th_VCldvowel)
+#define th_isflvowel(c) _th_isbits((c), _th_VClassMsk, _th_VCflvowel)
+#define th_isupvowel(c) _th_isbits((c), _th_VClassMsk, _th_VCupvowel)
+#define th_isblvowel(c) _th_isbits((c), _th_VClassMsk, _th_VCblvowel)
+
+extern const int _th_chlevel_tbl[];
+
+#define th_chlevel(c) (_th_chlevel_tbl[c])
+#define th_iscombchar(c) (th_chlevel(c) != 0)
+
+END_CDECL
+
+#endif /* THAI_THCTYPE_H */
+
diff --git a/include/thai/thinp.h b/include/thai/thinp.h
new file mode 100644
index 0000000..bf9238e
--- /dev/null
+++ b/include/thai/thinp.h
@@ -0,0 +1,63 @@
+/*
+ * libthai - Thai Language Support Library
+ * Copyright (C) 2001 Theppitak Karoonboonyanan <thep@linux.thai.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/*
+ * thinp.h - Thai string input sequence filtering
+ * Created: 2001-05-17
+ */
+
+#ifndef THAI_THINP_H
+#define THAI_THINP_H
+
+#include <thai/thailib.h>
+#include <thai/thcell.h>
+
+BEGIN_CDECL
+
+/**
+ * @file thinp.h
+ * @brief Thai string input sequence filtering
+ */
+
+/**
+ * @brief Strictness of input sequence checking, according to WTT 2.0
+ */
+typedef enum {
+ ISC_PASSTHROUGH = 0, /**< No check */
+ ISC_BASICCHECK = 1, /**< Basic check */
+ ISC_STRICT = 2 /**< Strict check */
+} thstrict_t;
+
+extern int th_isaccept(thchar_t c1, thchar_t c2, thstrict_t s);
+
+/**
+ * @brief Input sequence correction info
+ */
+struct thinpconv_t {
+ thchar_t conv[4]; /**< (null-terminated) string to put into input buffer */
+ int offset; /**< offset (<=0) from cur pos where the conv begin */
+};
+
+extern int th_validate(struct thcell_t context, thchar_t c,
+ struct thinpconv_t *conv);
+
+END_CDECL
+
+#endif /* THAI_THINP_H */
+
diff --git a/include/thai/thrend.h b/include/thai/thrend.h
new file mode 100644
index 0000000..a8d4b27
--- /dev/null
+++ b/include/thai/thrend.h
@@ -0,0 +1,76 @@
+/*
+ * libthai - Thai Language Support Library
+ * Copyright (C) 2001 Theppitak Karoonboonyanan <thep@linux.thai.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/*
+ * thrend.h - Thai string rendering
+ * Created: 2001-05-17
+ */
+
+#ifndef THAI_THREND_H
+#define THAI_THREND_H
+
+#include <thai/thailib.h>
+#include <thai/thcell.h>
+
+BEGIN_CDECL
+
+/**
+ * @file thrend.h
+ * @brief Thai string rendering
+ */
+
+/**
+ * @brief Glyph code type
+ */
+typedef unsigned char thglyph_t;
+
+/**
+ * @brief Blank base glyph, for floating upper/lower vowel
+ */
+#define TH_BLANK_BASE_GLYPH 0xdd
+
+extern int th_render_cell_tis(struct thcell_t cell,
+ thglyph_t res[], size_t res_sz,
+ int is_decomp_am);
+
+extern int th_render_cell_win(struct thcell_t cell,
+ thglyph_t res[], size_t res_sz,
+ int is_decomp_am);
+
+extern int th_render_cell_mac(struct thcell_t cell,
+ thglyph_t res[], size_t res_sz,
+ int is_decomp_am);
+
+
+extern int th_render_text_tis(const thchar_t *s,
+ thglyph_t res[], size_t res_sz,
+ int is_decomp_am);
+
+extern int th_render_text_win(const thchar_t *s,
+ thglyph_t res[], size_t res_sz,
+ int is_decomp_am);
+
+extern int th_render_text_mac(const thchar_t *s,
+ thglyph_t res[], size_t res_sz,
+ int is_decomp_am);
+
+END_CDECL
+
+#endif /* THAI_THREND_H */
+
diff --git a/include/thai/thstr.h b/include/thai/thstr.h
new file mode 100644
index 0000000..66cdcea
--- /dev/null
+++ b/include/thai/thstr.h
@@ -0,0 +1,42 @@
+/*
+ * libthai - Thai Language Support Library
+ * Copyright (C) 2001 Theppitak Karoonboonyanan <thep@linux.thai.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/*
+ * thstr.h - Thai string manipulators
+ * Created: 2001-08-03
+ */
+
+#ifndef THAI_THSTR_H
+#define THAI_THSTR_H
+
+#include <thai/thailib.h>
+
+BEGIN_CDECL
+
+/**
+ * @file thstr.h
+ * @brief Thai string manipulators
+ */
+
+extern size_t th_normalize(thchar_t dest[], const thchar_t *src, size_t n);
+
+END_CDECL
+
+#endif /* THAI_THSTR_H */
+
diff --git a/include/thai/thwbrk.h b/include/thai/thwbrk.h
new file mode 100644
index 0000000..8c57cf4
--- /dev/null
+++ b/include/thai/thwbrk.h
@@ -0,0 +1,46 @@
+/*
+ * libthai - Thai Language Support Library
+ * Copyright (C) 2001 Theppitak Karoonboonyanan <thep@linux.thai.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/*
+ * thwbrk.h - Thai wide-char word segmentation
+ * Created: 2001-05-17
+ */
+
+#ifndef THAI_THWBRK_H
+#define THAI_THWBRK_H
+
+#include <thai/thailib.h>
+
+BEGIN_CDECL
+
+/**
+ * @file thwbrk.h
+ * @brief Thai wide-char word segmentation
+ */
+
+extern int th_wbrk(const thwchar_t *s, int pos[], size_t n);
+
+extern int th_wbrk_line(const thwchar_t *in, thwchar_t *out, size_t n,
+ const thwchar_t *delim);
+
+
+END_CDECL
+
+#endif /* THAI_THWBRK_H */
+
diff --git a/include/thai/thwchar.h b/include/thai/thwchar.h
new file mode 100644
index 0000000..4eeaa74
--- /dev/null
+++ b/include/thai/thwchar.h
@@ -0,0 +1,65 @@
+/*
+ * libthai - Thai Language Support Library
+ * Copyright (C) 2001 Theppitak Karoonboonyanan <thep@linux.thai.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/*
+ * thwchar.h - wide char support for Thai
+ * Created: 2001-05-17
+ */
+
+#ifndef THAI_THWCHAR_H
+#define THAI_THWCHAR_H
+
+#include <thai/thailib.h>
+#include <wchar.h>
+
+BEGIN_CDECL
+
+/**
+ * @file thwchar.h
+ * @brief Wide char support for Thai
+ */
+
+/**
+ * @brief Wide-character value indicating error
+ */
+#define THWCHAR_ERR (~(thwchar_t)0)
+
+/**
+ * @brief Thai character type for storing Unicode character
+ */
+typedef wchar_t thwchar_t;
+
+extern thwchar_t th_tis2uni(thchar_t c);
+
+extern int th_tis2uni_line(const thchar_t* s, thwchar_t* result, size_t n);
+
+extern thwchar_t th_winthai2uni(thchar_t c);
+extern thwchar_t th_macthai2uni(thchar_t c);
+
+extern thchar_t th_uni2tis(thwchar_t wc);
+
+extern int th_uni2tis_line(const thwchar_t* s, thchar_t* result, size_t n);
+
+extern thchar_t th_uni2winthai(thwchar_t wc);
+extern thchar_t th_uni2macthai(thwchar_t wc);
+
+END_CDECL
+
+#endif /* THAI_THWCHAR_H */
+
diff --git a/include/thai/thwcoll.h b/include/thai/thwcoll.h
new file mode 100644
index 0000000..cd3aaab
--- /dev/null
+++ b/include/thai/thwcoll.h
@@ -0,0 +1,69 @@
+/*
+ * libthai - Thai Language Support Library
+ * Copyright (C) 2001 Theppitak Karoonboonyanan <thep@linux.thai.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/*
+ * thwcoll.h - Thai wide-char string collation
+ * Created: 2001-05-17
+ */
+
+#ifndef THAI_THWCOLL_H
+#define THAI_THWCOLL_H
+
+#include <thai/thailib.h>
+
+BEGIN_CDECL
+
+/**
+ * @file thwcoll.h
+ * @brief Thai wide-char string collation
+ */
+
+
+/**
+ * @brief Compare two Thai wide-char strings for collation
+ *
+ * @param s1 : first wide-char string (null-terminated)
+ * @param s2 : second wide-char string (null-terminated)
+ *
+ * @return < 0 if @a s1 precedes @a s2; 0 if @a s1 equals @a s2;
+ * > 0 if @a s1 succeeds @a s2
+ */
+extern int th_wcstrcoll(const thwchar_t *s1, const thwchar_t *s2);
+
+/**
+ * @brief Transform wide-char string into collatable form
+ *
+ * @param dest : the destination wide-char string buffer
+ * @param src : the wide-char string to transform
+ * @param n : the size of @a dest buffer (as number of elements)
+ *
+ * @returns the number of elements required to store the result in @a dest,
+ * excluding the terminating '\\0'.
+ * If the return value >= @a n, @a dest is undefined.
+ *
+ * Transforms @a src into a form from which comparison using wcscmp() yields
+ * the same result as that from th_wcstrcoll(). At most @a n characters are
+ * put in @a dest.
+ */
+extern size_t th_wcstrxfrm(thwchar_t dest[], const thwchar_t *src, size_t n);
+
+END_CDECL
+
+#endif /* THAI_THCOLL_H */
+
diff --git a/include/thai/thwctype.h b/include/thai/thwctype.h
new file mode 100644
index 0000000..6f6422e
--- /dev/null
+++ b/include/thai/thwctype.h
@@ -0,0 +1,101 @@
+/*
+ * libthai - Thai Language Support Library
+ * Copyright (C) 2001 Theppitak Karoonboonyanan <thep@linux.thai.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/*
+ * thwctype.h - Thai wide-char character classifications
+ * Created: 2001-05-17
+ */
+
+#ifndef THAI_THWCTYPE_H
+#define THAI_THWCTYPE_H
+
+#include <thai/thailib.h>
+#include <thai/thwchar.h>
+
+BEGIN_CDECL
+
+/**
+ * @file thwctype.h
+ * @brief Thai wide-char character classifications
+ */
+
+extern int th_wcistis(thwchar_t wc);
+
+extern int th_wcisthai(thwchar_t wc);
+extern int th_wciseng(thwchar_t wc);
+
+/* Thai letter classification */
+extern int th_wcisthcons(thwchar_t wc);
+extern int th_wcisthvowel(thwchar_t wc);
+extern int th_wcisthtone(thwchar_t wc);
+extern int th_wcisthdiac(thwchar_t wc);
+extern int th_wcisthdigit(thwchar_t wc);
+extern int th_wcisthpunct(thwchar_t wc);
+
+/* Thai consonant shapes classification */
+extern int th_wcistaillesscons(thwchar_t wc);
+extern int th_wcisovershootcons(thwchar_t wc);
+extern int th_wcisundershootcons(thwchar_t wc);
+extern int th_wcisundersplitcons(thwchar_t wc);
+
+/* Thai vowel classification */
+extern int th_wcisldvowel(thwchar_t wc);
+extern int th_wcisflvowel(thwchar_t wc);
+extern int th_wcisupvowel(thwchar_t wc);
+extern int th_wcisblvowel(thwchar_t wc);
+
+extern int th_wcchlevel(thwchar_t wc);
+
+
+/*
+ * implementation parts
+ */
+#include <thai/thctype.h>
+
+#define th_wcistis(wc) th_istis(th_uni2tis(wc))
+
+#define th_wcisthai(wc) th_isthai(th_uni2tis(wc))
+#define th_wciseng(wc) th_iseng(th_uni2tis(wc))
+
+/* Thai letter classification */
+#define th_wcisthcons(wc) th_isthcons(th_uni2tis(wc))
+#define th_wcisthvowel(wc) th_isthvowel(th_uni2tis(wc))
+#define th_wcisthtone(wc) th_isthtone(th_uni2tis(wc))
+#define th_wcisthdigit(wc) th_isthdigit(th_uni2tis(wc))
+#define th_wcisthdiac(wc) th_isthdiac(th_uni2tis(wc))
+#define th_wcisthpunct(wc) th_isthpunct(th_uni2tis(wc))
+
+/* Thai consonant shapes classification */
+#define th_wcistaillesscons(wc) th_istaillesscons(th_uni2tis(wc))
+#define th_wcisovershootcons(wc) th_isovershootcons(th_uni2tis(wc))
+#define th_wcisundershootcons(wc) th_isundershootcons(th_uni2tis(wc))
+#define th_wcisundersplitcons(wc) th_isundersplitcons(th_uni2tis(wc))
+
+/* Thai vowel classification */
+#define th_wcisldvowel(wc) th_isldvowel(th_uni2tis(wc))
+#define th_wcisflvowel(wc) th_isflvowel(th_uni2tis(wc))
+#define th_wcisupvowel(wc) th_isupvowel(th_uni2tis(wc))
+#define th_wcisblvowel(wc) th_isblvowel(th_uni2tis(wc))
+
+#define th_wcchlevel(wc) th_chlevel(th_uni2tis(wc))
+
+END_CDECL
+
+#endif /* THAI_THWCTYPE_H */
+
diff --git a/include/thai/thwinp.h b/include/thai/thwinp.h
new file mode 100644
index 0000000..9960260
--- /dev/null
+++ b/include/thai/thwinp.h
@@ -0,0 +1,39 @@
+/*
+ * libthai - Thai Language Support Library
+ * Copyright (C) 2001 Theppitak Karoonboonyanan <thep@linux.thai.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/*
+ * thwinp.h - Thai wide-char string input sequence filtering
+ * Created: 2001-05-17
+ */
+
+#ifndef THAI_THWCINP_H
+#define THAI_THWCINP_H
+
+#include <thai/thailib.h>
+#include <thai/thinp.h>
+
+BEGIN_CDECL
+
+extern int th_wcisaccept(thwchar_t c1, thwchar_t c2, thstrict_t s);
+extern int th_wcvalidate(thwchar_t *c1, thwchar_t *c2, thstrict_t s);
+
+END_CDECL
+
+#endif /* THAI_THWCINP_H */
+
diff --git a/include/thai/thwrend.h b/include/thai/thwrend.h
new file mode 100644
index 0000000..360da6d
--- /dev/null
+++ b/include/thai/thwrend.h
@@ -0,0 +1,55 @@
+/*
+ * libthai - Thai Language Support Library
+ * Copyright (C) 2001 Theppitak Karoonboonyanan <thep@linux.thai.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/*
+ * thwrend.h - Thai wide-char string rendering
+ * Created: 2001-05-17
+ */
+
+#ifndef THAI_THWREND_H
+#define THAI_THWREND_H
+
+#include <thai/thailib.h>
+#include <thai/thrend.h>
+
+BEGIN_CDECL
+
+extern const thwchar_t *th_wcnext_cell(const thwchar_t *s, size_t len,
+ struct thcell *cell, size_t *nchars);
+extern const thwchar_t *th_wcmake_cells(const thwchar_t *s, size_t len,
+ struct thcell cells[], size_t *ncells);
+
+extern void th_wcrender_cell_tis(struct thcell cell,
+ thglyph_t res[], size_t res_sz);
+extern void th_wcrender_cell_win(struct thcell cell,
+ thglyph_t res[], size_t res_sz);
+extern void th_wcrender_cell_mac(struct thcell cell,
+ thglyph_t res[], size_t res_sz);
+
+extern int th_wcrender_text_tis(const thwchar_t *s,
+ thglyph_t res[], size_t res_sz);
+extern int th_wcrender_text_win(const thwchar_t *s,
+ thglyph_t res[], size_t res_sz);
+extern int th_wcrender_text_mac(const thwchar_t *s,
+ thglyph_t res[], size_t res_sz);
+
+END_CDECL
+
+#endif /* THAI_THWREND_H */
+
diff --git a/include/thai/thwstr.h b/include/thai/thwstr.h
new file mode 100644
index 0000000..fb00561
--- /dev/null
+++ b/include/thai/thwstr.h
@@ -0,0 +1,43 @@
+/*
+ * libthai - Thai Language Support Library
+ * Copyright (C) 2001 Theppitak Karoonboonyanan <thep@linux.thai.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/*
+ * thwstr.h - Thai wide-char string manipulators
+ * Created: 2001-08-03
+ */
+
+#ifndef THAI_THWSTR_H
+#define THAI_THWSTR_H
+
+#include <thai/thailib.h>
+#include <thai/thwchar.h>
+
+BEGIN_CDECL
+
+/**
+ * @file thwstr.h
+ * @brief Thai wide-char string manipulators
+ */
+
+extern size_t th_wnormalize(thwchar_t dest[], const thwchar_t *src, size_t n);
+
+END_CDECL
+
+#endif /* THAI_THWSTR_H */
+
diff --git a/include/thai/tis.h b/include/thai/tis.h
new file mode 100644
index 0000000..39c75fb
--- /dev/null
+++ b/include/thai/tis.h
@@ -0,0 +1,123 @@
+/*
+ * libthai - Thai Language Support Library
+ * Copyright (C) 2001 Theppitak Karoonboonyanan <thep@linux.thai.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/*
+ * tis.h - TIS-620 character names
+ * Created: 2010-02-24
+ */
+
+#ifndef THAI_TIS_H
+#define THAI_TIS_H
+
+/**
+ * @file tis.h
+ * @brief TIS-620 character names
+ */
+
+#define TIS_KO_KAI 0xa1
+#define TIS_KHO_KHAI 0xa2
+#define TIS_KHO_KHUAT 0xa3
+#define TIS_KHO_KHWAI 0xa4
+#define TIS_KHO_KHON 0xa5
+#define TIS_KHO_RAKHANG 0xa6
+#define TIS_NGO_NGU 0xa7
+#define TIS_CHO_CHAN 0xa8
+#define TIS_CHO_CHING 0xa9
+#define TIS_CHO_CHANG 0xaa
+#define TIS_SO_SO 0xab
+#define TIS_CHO_CHOE 0xac
+#define TIS_YO_YING 0xad
+#define TIS_DO_CHADA 0xae
+#define TIS_TO_PATAK 0xaf
+#define TIS_THO_THAN 0xb0
+#define TIS_THO_NANGMONTHO 0xb1
+#define TIS_THO_PHUTHAO 0xb2
+#define TIS_NO_NEN 0xb3
+#define TIS_DO_DEK 0xb4
+#define TIS_TO_TAO 0xb5
+#define TIS_THO_THUNG 0xb6
+#define TIS_THO_THAHAN 0xb7
+#define TIS_THO_THONG 0xb8
+#define TIS_NO_NU 0xb9
+#define TIS_BO_BAIMAI 0xba
+#define TIS_PO_PLA 0xbb
+#define TIS_PHO_PHUNG 0xbc
+#define TIS_FO_FA 0xbd
+#define TIS_PHO_PHAN 0xbe
+#define TIS_FO_FAN 0xbf
+#define TIS_PHO_SAMPHAO 0xc0
+#define TIS_MO_MA 0xc1
+#define TIS_YO_YAK 0xc2
+#define TIS_RO_RUA 0xc3
+#define TIS_RU 0xc4
+#define TIS_LO_LING 0xc5
+#define TIS_LU 0xc6
+#define TIS_WO_WAEN 0xc7
+#define TIS_SO_SALA 0xc8
+#define TIS_SO_RUSI 0xc9
+#define TIS_SO_SUA 0xca
+#define TIS_HO_HIP 0xcb
+#define TIS_LO_CHULA 0xcc
+#define TIS_O_ANG 0xcd
+#define TIS_HO_NOKHUK 0xce
+#define TIS_PAIYANNOI 0xcf
+#define TIS_SARA_A 0xd0
+#define TIS_MAI_HAN_AKAT 0xd1
+#define TIS_SARA_AA 0xd2
+#define TIS_SARA_AM 0xd3
+#define TIS_SARA_I 0xd4
+#define TIS_SARA_II 0xd5
+#define TIS_SARA_UE 0xd6
+#define TIS_SARA_UEE 0xd7
+#define TIS_SARA_U 0xd8
+#define TIS_SARA_UU 0xd9
+#define TIS_PHINTHU 0xda
+#define TIS_YMBOL_BAHT 0xdf
+#define TIS_SARA_E 0xe0
+#define TIS_SARA_AE 0xe1
+#define TIS_SARA_O 0xe2
+#define TIS_SARA_AI_MAIMUAN 0xe3
+#define TIS_SARA_AI_MAIMALAI 0xe4
+#define TIS_LAKKHANGYAO 0xe5
+#define TIS_MAIYAMOK 0xe6
+#define TIS_MAITAIKHU 0xe7
+#define TIS_MAI_EK 0xe8
+#define TIS_MAI_THO 0xe9
+#define TIS_MAI_TRI 0xea
+#define TIS_MAI_CHATTAWA 0xeb
+#define TIS_THANTHAKHAT 0xec
+#define TIS_NIKHAHIT 0xed
+#define TIS_YAMAKKAN 0xee
+#define TIS_FONGMAN 0xef
+#define TIS_THAI_DIGIT_ZERO 0xf0
+#define TIS_THAI_DIGIT_ONE 0xf1
+#define TIS_THAI_DIGIT_TWO 0xf2
+#define TIS_THAI_DIGIT_THREE 0xf3
+#define TIS_THAI_DIGIT_FOUR 0xf4
+#define TIS_THAI_DIGIT_FIVE 0xf5
+#define TIS_THAI_DIGIT_SIX 0xf6
+#define TIS_THAI_DIGIT_SEVEN 0xf7
+#define TIS_THAI_DIGIT_EIGHT 0xf8
+#define TIS_THAI_DIGIT_NINE 0xf9
+#define TIS_ANGKHANKHU 0xfa
+#define TIS_KHOMUT 0xfb
+
+#endif /* THAI_TIS_H */
+
+
diff --git a/include/thai/wtt.h b/include/thai/wtt.h
new file mode 100644
index 0000000..516a113
--- /dev/null
+++ b/include/thai/wtt.h
@@ -0,0 +1,133 @@
+/*
+ * libthai - Thai Language Support Library
+ * Copyright (C) 2001 Theppitak Karoonboonyanan <thep@linux.thai.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/*
+ * wtt.h - WTT I/O implementation
+ * Created: 2001-08-04
+ */
+
+#ifndef THAI_WTT_H
+#define THAI_WTT_H
+
+/**
+ * @file wtt.h
+ * @brief WTT I/O implementation
+ *
+ * WTT stands for Wing Tuk Tee (in Thai, Runs everywhere). It was defined by
+ * TACTIS (Thai API Consortium/Thai Industrial Standard) in the NECTEC Thai
+ * Software Standard Project (1989-1991), and later endorsed by Thai
+ * Industrial Standard Institute (TISI) as TIS 1566-2541 in 1998.
+ *
+ * WTT classifies Thai chracter(TIS-620) into 17 types below.
+ *
+ * <pre>
+ * <b>ITYPE VALUE SHORT_DESCRIPTION</b>
+ * CTRL 0 control characters
+ * NON 1 non composible characters
+ * CONS 2 consonants
+ * LV 3 leading vowels
+ * FV1 4 following vowels 1
+ * FV2 5 following vowels 2
+ * FV3 6 following vowels 3
+ * BV1 7 below vowels 1
+ * BV2 8 below vowels 2
+ * BD 9 below diacritics
+ * TONE 10 tonemarks
+ * AD1 11 above diacritics 1
+ * AD2 12 above diacritics 2
+ * AD3 13 above diacritics 3
+ * AV1 14 above vowels 1
+ * AV2 15 above vowels 2
+ * AV3 16 above vowels 3
+ * </pre>
+ *
+ * Functions in thctype.h do basic character classifications while
+ * wtt.h classifies a chracter in detail. Please refer to the reference.
+ *
+ * TACio_op() checks how to compose two given chracters. The possiblities are
+ * Composible (CP), Non-display (XC), Accept (AC), Reject (RJ) and Strict
+ * Reject (SR). The values of CP, XC, AC, RJ and SR are difined in wtt.h.
+ * And their meanings are:
+ *
+ * @li CP : second character is displayed in the same cell as the first,
+ * also implies an acceptance.
+ * @li XC : Do nothing.
+ * @li AC : Display second character in the next cell.
+ * @li RJ : Discard second character.
+ * @li SR : Reject second character only in strict mode.
+ *
+ */
+
+#include <thai/thailib.h>
+
+BEGIN_CDECL
+
+/**
+ * @brief Classification of characters in TIS620 according to WTT
+ */
+typedef enum {
+ CTRL = 0, /**< control chars */
+ NON = 1, /**< non composibles */
+ CONS = 2, /**< consonants */
+ LV = 3, /**< leading vowels */
+ FV1 = 4, /**< following vowels 1 */
+ FV2 = 5, /**< following vowels 2 */
+ FV3 = 6, /**< following vowels 3 */
+ BV1 = 7, /**< below vowels 1 */
+ BV2 = 8, /**< below vowels 2 */
+ BD = 9, /**< below diacritics */
+ TONE = 10, /**< tonemarks */
+ AD1 = 11, /**< above diacritics 1 */
+ AD2 = 12, /**< above diacritics 2 */
+ AD3 = 13, /**< above diacritics 3 */
+ AV1 = 14, /**< above vowels 1 */
+ AV2 = 15, /**< above vowels 2 */
+ AV3 = 16 /**< above vowels 3 */
+} WTTClass;
+
+/**
+ * @brief Composibility checking tables
+ */
+typedef enum {
+ CP = 1, /**< COMPOSIBLE - following char is displayed in the same cell
+ as leading char, also implies ACCEPT */
+ XC = 2, /**< Non-display */
+ AC = 3, /**< ACCEPT - display the following char in the next cell */
+ RJ = 4, /**< REJECT - discard that following char, ignore it */
+ SR = 5 /**< STRICT REJECT - REJECT only if in strict mode */
+} WTTOp;
+
+extern WTTClass TACchtype(thchar_t c);
+
+extern WTTOp TACio_op(thchar_t c1, thchar_t c2);
+
+/*
+ * implementation parts
+ */
+
+extern short TACchtype_[256];
+extern short TACio_op_[17][17];
+
+#define TACchtype(c) (TACchtype_[c])
+#define TACio_op(c1, c2) (TACio_op_[TACchtype(c1)][TACchtype(c2)])
+
+END_CDECL
+
+#endif /* THAI_WTT_H */
+