diff options
-rw-r--r-- | test/Makefile.am | 10 | ||||
-rw-r--r-- | test/trie.cc | 17 |
2 files changed, 27 insertions, 0 deletions
diff --git a/test/Makefile.am b/test/Makefile.am index 15ab227b..dbf2a25f 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -23,6 +23,7 @@ noinst_PROGRAMS = \ shapes \ cookies \ liang \ + trie \ notsosimplevector dw_anchors_test_SOURCES = dw_anchors_test.cc @@ -171,6 +172,15 @@ liang_LDADD = \ $(top_builddir)/lout/liblout.a \ @LIBFLTK_LIBS@ +trie_SOURCES = trie.cc + +trie_LDADD = \ + $(top_builddir)/dw/libDw-widgets.a \ + $(top_builddir)/dw/libDw-fltk.a \ + $(top_builddir)/dw/libDw-core.a \ + $(top_builddir)/lout/liblout.a \ + @LIBFLTK_LIBS@ + notsosimplevector_SOURCES = notsosimplevector.cc notsosimplevector_LDADD = $(top_builddir)/lout/liblout.a diff --git a/test/trie.cc b/test/trie.cc new file mode 100644 index 00000000..943b8045 --- /dev/null +++ b/test/trie.cc @@ -0,0 +1,17 @@ +#include "../dw/fltkcore.hh" +#include "../dw/hyphenator.hh" + +int main (int argc, char *argv[]) +{ + dw::fltk::FltkPlatform p; + + if (argc < 2) { + fprintf(stderr, "Usage: trie <pattern file>\n"); + exit (1); + } + + /* Use pack = 1024 to create a really small trie - can take a while. + */ + dw::Hyphenator hyphenator (&p, argv[1], NULL, 1024); + hyphenator.saveTrie (stdout); +} |