diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2012-12-09 13:13:14 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2012-12-09 13:13:14 +0100 |
commit | 5df24b640c4f1471eb6d7a38160e9d9330fbdc67 (patch) | |
tree | 2605c8f6206822531f8fb1c9ea08e89814f81823 /test | |
parent | 7a47cd331d30a780e7437b77aeb994c8ed2061b8 (diff) |
share hyphenators between windows/tabs
Diffstat (limited to 'test')
-rw-r--r-- | test/liang.cc | 4 | ||||
-rw-r--r-- | test/trie.cc | 5 |
2 files changed, 3 insertions, 6 deletions
diff --git a/test/liang.cc b/test/liang.cc index b1161d9f..a1bc2442 100644 --- a/test/liang.cc +++ b/test/liang.cc @@ -4,10 +4,10 @@ void hyphenateWord (dw::core::Platform *p, const char *word) { - dw::Hyphenator *h = dw::Hyphenator::getHyphenator (p, "de"); + dw::Hyphenator *h = dw::Hyphenator::getHyphenator ("de"); int numBreaks; - int *breakPos = h->hyphenateWord (word, &numBreaks); + int *breakPos = h->hyphenateWord (p, word, &numBreaks); for (int i = 0; i < numBreaks + 1; i++) { if (i != 0) printf (" \xc2\xad "); diff --git a/test/trie.cc b/test/trie.cc index 628daabf..41b56c70 100644 --- a/test/trie.cc +++ b/test/trie.cc @@ -1,10 +1,7 @@ -#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); @@ -12,6 +9,6 @@ int main (int argc, char *argv[]) /* Use pack = 1024 to create a really small trie - can take a while. */ - dw::Hyphenator hyphenator (&p, argv[1], NULL, 1024); + dw::Hyphenator hyphenator (argv[1], NULL, 1024); hyphenator.saveTrie (stdout); } |