Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(339)

Side by Side Diff: src/hunspell/hunspell.cxx

Issue 11299291: Fixes non-working secondary Hunspell suggestion mechanism as reported here: http://code.google.com/… (Closed) Base URL: http://src.chromium.org/svn/trunk/deps/third_party/hunspell/
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « README.chromium ('k') | src/hunspell/suggestmgr.hxx » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « README.chromium ('k') | src/hunspell/suggestmgr.hxx » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698