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

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

Issue 11778031: [hunspell] Spellcheck 99-character words. (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/hunspell.git@master
Patch Set: Created 7 years, 11 months 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
« no previous file with comments | « google.patch ('k') | src/hunspell/suggestmgr.cxx » ('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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 *p = '\0'; 130 *p = '\0';
131 return 0; 131 return 0;
132 } 132 }
133 133
134 strncpy(dest, (char *) q, nl); 134 strncpy(dest, (char *) q, nl);
135 *(dest + nl) = '\0'; 135 *(dest + nl) = '\0';
136 nl = strlen(dest); 136 nl = strlen(dest);
137 if (utf8) { 137 if (utf8) {
138 *nc = u8_u16(dest_utf, MAXWORDLEN, dest); 138 *nc = u8_u16(dest_utf, MAXWORDLEN, dest);
139 // don't check too long words 139 // don't check too long words
140 // TODO(rouslan): Remove the interim change below when this patch lands: 140 if (*nc >= MAXWORDLEN) return 0;
141 // http://sf.net/tracker/?func=detail&aid=3595024&group_id=143754&atid=756 395.
142 if (*nc >= MAXWORDLEN - 1) return 0;
143 if (*nc == -1) { // big Unicode character (non BMP area) 141 if (*nc == -1) { // big Unicode character (non BMP area)
144 *pcaptype = NOCAP; 142 *pcaptype = NOCAP;
145 return nl; 143 return nl;
146 } 144 }
147 *pcaptype = get_captype_utf8(dest_utf, *nc, langnum); 145 *pcaptype = get_captype_utf8(dest_utf, *nc, langnum);
148 } else { 146 } else {
149 *pcaptype = get_captype(dest, nl, csconv); 147 *pcaptype = get_captype(dest, nl, csconv);
150 *nc = nl; 148 *nc = nl;
151 } 149 }
152 return nl; 150 return nl;
(...skipping 1896 matching lines...) Expand 10 before | Expand all | Expand 10 after
2049 2047
2050 /* remove word from the run-time dictionary */ 2048 /* remove word from the run-time dictionary */
2051 2049
2052 int Hunspell_remove(Hunhandle *pHunspell, const char * word) { 2050 int Hunspell_remove(Hunhandle *pHunspell, const char * word) {
2053 return ((Hunspell*)pHunspell)->remove(word); 2051 return ((Hunspell*)pHunspell)->remove(word);
2054 } 2052 }
2055 2053
2056 void Hunspell_free_list(Hunhandle *, char *** slst, int n) { 2054 void Hunspell_free_list(Hunhandle *, char *** slst, int n) {
2057 freelist(slst, n); 2055 freelist(slst, n);
2058 } 2056 }
OLDNEW
« no previous file with comments | « google.patch ('k') | src/hunspell/suggestmgr.cxx » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698