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

Side by Side Diff: third_party/hunspell/google.patch

Issue 2263263003: hunspell: Changed signed char* to unsigned char* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Unformatting Created 4 years, 3 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 | « no previous file | third_party/hunspell/src/hunspell/csutil.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 Index: src/hunspell/affixmgr.cxx 1 Index: src/hunspell/affixmgr.cxx
2 =================================================================== 2 ===================================================================
3 RCS file: /cvsroot/hunspell/hunspell/src/hunspell/affixmgr.cxx,v 3 RCS file: /cvsroot/hunspell/hunspell/src/hunspell/affixmgr.cxx,v
4 retrieving revision 1.41 4 retrieving revision 1.41
5 diff -u -r1.41 affixmgr.cxx 5 diff -u -r1.41 affixmgr.cxx
6 --- src/hunspell/affixmgr.cxx 16 Dec 2011 09:15:34 -0000 1.41 6 --- src/hunspell/affixmgr.cxx 16 Dec 2011 09:15:34 -0000 1.41
7 +++ src/hunspell/affixmgr.cxx 29 May 2014 01:05:07 -0000 7 +++ src/hunspell/affixmgr.cxx 29 May 2014 01:05:07 -0000
8 @@ -14,8 +14,14 @@ 8 @@ -14,8 +14,14 @@
9 9
10 #include "csutil.hxx" 10 #include "csutil.hxx"
(...skipping 1334 matching lines...) Expand 10 before | Expand all | Expand 10 after
1345 char * suggest_morph_for_spelling_error(const char * word); 1345 char * suggest_morph_for_spelling_error(const char * word);
1346 1346
1347 private: 1347 private:
1348 +#ifdef HUNSPELL_CHROME_CLIENT 1348 +#ifdef HUNSPELL_CHROME_CLIENT
1349 + // Not owned by us, owned by the Hunspell object. 1349 + // Not owned by us, owned by the Hunspell object.
1350 + hunspell::BDictReader* bdict_reader; 1350 + hunspell::BDictReader* bdict_reader;
1351 +#endif 1351 +#endif
1352 int testsug(char** wlst, const char * candidate, int wl, int ns, int cpdsugg est, 1352 int testsug(char** wlst, const char * candidate, int wl, int ns, int cpdsugg est,
1353 int * timer, clock_t * timelimit); 1353 int * timer, clock_t * timelimit);
1354 int checkword(const char *, int, int, int *, clock_t *); 1354 int checkword(const char *, int, int, int *, clock_t *);
1355 diff --git a/third_party/hunspell/src/hunspell/csutil.cxx b/third_party/hunspell /src/hunspell/csutil.cxx
1356 index 2be9027..0f2267f 100644
1357 --- a/third_party/hunspell/src/hunspell/csutil.cxx
1358 +++ b/third_party/hunspell/src/hunspell/csutil.cxx
1359 @@ -96,10 +96,10 @@ char * u16_u8(char * dest, int size, const w_char * src, int srclen) {
1360
1361 /* only UTF-16 (BMP) implementation */
1362 int u8_u16(w_char * dest, int size, const char * src) {
1363 - const signed char * u8 = (const signed char *)src;
1364 + const unsigned char * u8 = (const unsigned char*)src;
1365 w_char * u2 = dest;
1366 w_char * u2_max = u2 + size;
1367 -
1368 +
1369 while ((u2 < u2_max) && *u8) {
1370 switch ((*u8) & 0xf0) {
1371 case 0x00:
1372 @@ -118,7 +118,7 @@ int u8_u16(w_char * dest, int size, const char * src) {
1373 case 0x90:
1374 case 0xa0:
1375 case 0xb0: {
1376 - HUNSPELL_WARNING(stderr, "UTF-8 encoding error. Unexpected continua tion bytes in %ld. character position\n%s\n", static_cast<long>(u8 - (signed cha r *)src), src);
1377 + HUNSPELL_WARNING(stderr, "UTF-8 encoding error. Unexpected continua tion bytes in %ld. character position\n%s\n", static_cast<long>(u8 - (const unsi gned char*)src), src);
1378 u2->h = 0xff;
1379 u2->l = 0xfd;
1380 break;
1381 @@ -130,7 +130,7 @@ int u8_u16(w_char * dest, int size, const char * src) {
1382 u2->l = (*u8 << 6) + (*(u8+1) & 0x3f);
1383 u8++;
1384 } else {
1385 - HUNSPELL_WARNING(stderr, "UTF-8 encoding error. Missing continu ation byte in %ld. character position:\n%s\n", static_cast<long>(u8 - (signed ch ar *)src), src);
1386 + HUNSPELL_WARNING(stderr, "UTF-8 encoding error. Missing continu ation byte in %ld. character position:\n%s\n", static_cast<long>(u8 - (const uns igned char*)src), src);
1387 u2->h = 0xff;
1388 u2->l = 0xfd;
1389 }
1390 @@ -144,12 +144,12 @@ int u8_u16(w_char * dest, int size, const char * src) {
1391 u2->l = (*u8 << 6) + (*(u8+1) & 0x3f);
1392 u8++;
1393 } else {
1394 - HUNSPELL_WARNING(stderr, "UTF-8 encoding error. Missing con tinuation byte in %ld. character position:\n%s\n", static_cast<long>(u8 - (signe d char *)src), src);
1395 + HUNSPELL_WARNING(stderr, "UTF-8 encoding error. Missing con tinuation byte in %ld. character position:\n%s\n", static_cast<long>(u8 - (const unsigned char*)src), src);
1396 u2->h = 0xff;
1397 u2->l = 0xfd;
1398 }
1399 } else {
1400 - HUNSPELL_WARNING(stderr, "UTF-8 encoding error. Missing continu ation byte in %ld. character position:\n%s\n", static_cast<long>(u8 - (signed ch ar *)src), src);
1401 + HUNSPELL_WARNING(stderr, "UTF-8 encoding error. Missing continu ation byte in %ld. character position:\n%s\n", static_cast<long>(u8 - (const uns igned char*)src), src);
1402 u2->h = 0xff;
1403 u2->l = 0xfd;
1404 }
OLDNEW
« no previous file with comments | « no previous file | third_party/hunspell/src/hunspell/csutil.cxx » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698