OLD | NEW |
1 #include "license.hunspell" | 1 #include "license.hunspell" |
2 #include "license.myspell" | 2 #include "license.myspell" |
3 | 3 |
4 #include <stdlib.h> | 4 #include <stdlib.h> |
5 #include <string.h> | 5 #include <string.h> |
6 #include <stdio.h> | 6 #include <stdio.h> |
7 | 7 |
8 #include "hunspell.hxx" | 8 #include "hunspell.hxx" |
9 #include "hunspell.h" | 9 #include "hunspell.h" |
10 #ifndef HUNSPELL_CHROME_CLIENT | 10 #ifndef HUNSPELL_CHROME_CLIENT |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 char * try_string = pAMgr->get_try_string(); | 52 char * try_string = pAMgr->get_try_string(); |
53 encoding = pAMgr->get_encoding(); | 53 encoding = pAMgr->get_encoding(); |
54 langnum = pAMgr->get_langnum(); | 54 langnum = pAMgr->get_langnum(); |
55 utf8 = pAMgr->get_utf8(); | 55 utf8 = pAMgr->get_utf8(); |
56 if (!utf8) | 56 if (!utf8) |
57 csconv = get_current_cs(encoding); | 57 csconv = get_current_cs(encoding); |
58 complexprefixes = pAMgr->get_complexprefixes(); | 58 complexprefixes = pAMgr->get_complexprefixes(); |
59 wordbreak = pAMgr->get_breaktable(); | 59 wordbreak = pAMgr->get_breaktable(); |
60 | 60 |
61 /* and finally set up the suggestion manager */ | 61 /* and finally set up the suggestion manager */ |
| 62 #ifdef HUNSPELL_CHROME_CLIENT |
| 63 pSMgr = new SuggestMgr(bdict_reader, try_string, MAXSUGGESTION, pAMgr); |
| 64 #else |
62 pSMgr = new SuggestMgr(try_string, MAXSUGGESTION, pAMgr); | 65 pSMgr = new SuggestMgr(try_string, MAXSUGGESTION, pAMgr); |
| 66 #endif |
63 if (try_string) free(try_string); | 67 if (try_string) free(try_string); |
64 } | 68 } |
65 | 69 |
66 Hunspell::~Hunspell() | 70 Hunspell::~Hunspell() |
67 { | 71 { |
68 if (pSMgr) delete pSMgr; | 72 if (pSMgr) delete pSMgr; |
69 if (pAMgr) delete pAMgr; | 73 if (pAMgr) delete pAMgr; |
70 for (int i = 0; i < maxdic; i++) delete pHMgr[i]; | 74 for (int i = 0; i < maxdic; i++) delete pHMgr[i]; |
71 maxdic = 0; | 75 maxdic = 0; |
72 pSMgr = NULL; | 76 pSMgr = NULL; |
(...skipping 1970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2043 | 2047 |
2044 /* remove word from the run-time dictionary */ | 2048 /* remove word from the run-time dictionary */ |
2045 | 2049 |
2046 int Hunspell_remove(Hunhandle *pHunspell, const char * word) { | 2050 int Hunspell_remove(Hunhandle *pHunspell, const char * word) { |
2047 return ((Hunspell*)pHunspell)->remove(word); | 2051 return ((Hunspell*)pHunspell)->remove(word); |
2048 } | 2052 } |
2049 | 2053 |
2050 void Hunspell_free_list(Hunhandle *, char *** slst, int n) { | 2054 void Hunspell_free_list(Hunhandle *, char *** slst, int n) { |
2051 freelist(slst, n); | 2055 freelist(slst, n); |
2052 } | 2056 } |
OLD | NEW |