author | Ryan VanderMeulen <ryanvm@gmail.com> |
Mon, 19 Jul 2010 18:19:52 -0400 | |
changeset 47948 | 74c2b98ebb489472ed6abd3f81916d301a90f417 |
parent 47947 | 102fe68e84bf4bf5f5b8961e8bad8070217f7603 |
child 47949 | 9ba3b1ad737727c3a1765b0379a0ebfa86962147 |
push id | 14496 |
push user | eakhgari@mozilla.com |
push date | Mon, 19 Jul 2010 22:20:24 +0000 |
treeherder | mozilla-central@74c2b98ebb48 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | smaug |
bugs | 579649 |
milestone | 2.0b2pre |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/extensions/spellcheck/hunspell/src/README.hunspell +++ b/extensions/spellcheck/hunspell/src/README.hunspell @@ -30,17 +30,17 @@ * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * ******* END LICENSE BLOCK ******* -Hunspell Version: 1.2.11 +Hunspell Version: 1.2.12 Hunspell Author: László Németh MySpell Author: Kevin Hendricks & David Einstein Hunspell is a spell checker and morphological analyser library. Hunspell is based on OpenOffice.org's Myspell. Documentation, tests, and examples are available at http://hunspell.sourceforge.net.
--- a/extensions/spellcheck/hunspell/src/affixmgr.cpp +++ b/extensions/spellcheck/hunspell/src/affixmgr.cpp @@ -3781,17 +3781,17 @@ int AffixMgr::parse_defcpdtable(char * HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum()); numdefcpd = 0; return 1; } break; } case 1: { // handle parenthesized flags if (strchr(piece, '(')) { - defcpdtable[j].def = (FLAG *) malloc(sizeof(piece) * sizeof(FLAG)); + defcpdtable[j].def = (FLAG *) malloc(strlen(piece) * sizeof(FLAG)); defcpdtable[j].len = 0; int end = 0; FLAG * conv; while (!end) { char * par = piece + 1; while (*par != '(' && *par != ')' && *par != '\0') par++; if (*par == '\0') end = 1; else *par = '\0'; if (*piece == '(') piece++;
--- a/extensions/spellcheck/hunspell/src/csutil.cpp +++ b/extensions/spellcheck/hunspell/src/csutil.cpp @@ -267,32 +267,31 @@ int flag_bsearch(unsigned short flags[], } else { // don't use isspace() here, the string can be in some random charset // that's way different than the locale's for (dp = mp; (*dp && *dp != ' ' && *dp != '\t'); dp++); if (!*dp) dp = NULL; } if (dp) { *stringp = dp+1; - int nc = (int)((unsigned long)dp - (unsigned long)mp); - *(mp+nc) = '\0'; + *dp = '\0'; } else { *stringp = mp + strlen(mp); } return mp; } return NULL; } // replaces strdup with ansi version char * mystrdup(const char * s) { char * d = NULL; if (s) { - int sl = strlen(s)+1; + size_t sl = strlen(s)+1; d = (char *) malloc(sl); if (d) { memcpy(d,s,sl); } else { HUNSPELL_WARNING(stderr, "Can't allocate memory.\n"); } } return d; @@ -308,28 +307,28 @@ int flag_bsearch(unsigned short flags[], if (len + len2 + 1 > max) return dest; strcpy(dest + len, st); return dest; } // remove cross-platform text line end characters void mychomp(char * s) { - int k = strlen(s); + size_t k = strlen(s); if ((k > 0) && ((*(s+k-1)=='\r') || (*(s+k-1)=='\n'))) *(s+k-1) = '\0'; if ((k > 1) && (*(s+k-2) == '\r')) *(s+k-2) = '\0'; } // does an ansi strdup of the reverse of a string char * myrevstrdup(const char * s) { char * d = NULL; if (s) { - int sl = strlen(s); + size_t sl = strlen(s); d = (char *) malloc(sl+1); if (d) { const char * p = s + sl - 1; char * q = d; while (p >= s) *q++ = *p--; *q = '\0'; } else { HUNSPELL_WARNING(stderr, "Can't allocate memory.\n");
--- a/extensions/spellcheck/hunspell/src/dictmgr.cpp +++ b/extensions/spellcheck/hunspell/src/dictmgr.cpp @@ -161,22 +161,22 @@ int DictMgr::get_list(dictentry ** ppent // strip strings into token based on single char delimiter // acts like strsep() but only uses a delim char and not // a delim string char * DictMgr::mystrsep(char ** stringp, const char delim) { char * rv = NULL; char * mp = *stringp; - int n = strlen(mp); + size_t n = strlen(mp); if (n > 0) { char * dp = (char *)memchr(mp,(int)((unsigned char)delim),n); if (dp) { *stringp = dp+1; - int nc = (int)((unsigned long)dp - (unsigned long)mp); + size_t nc = dp - mp; rv = (char *) malloc(nc+1); if (rv) { memcpy(rv,mp,nc); *(rv+nc) = '\0'; } } else { rv = (char *) malloc(n+1); if (rv) {
--- a/extensions/spellcheck/hunspell/src/suggestmgr.cpp +++ b/extensions/spellcheck/hunspell/src/suggestmgr.cpp @@ -1136,17 +1136,17 @@ int SuggestMgr::ngsuggest(char** wlst, c for (j=0; j < MAX_ROOTS; j++) if (scoresphon[j] < lval) { lpphon = j; lval = scoresphon[j]; } } }} - // find minimum threshhold for a passable suggestion + // find minimum threshold for a passable suggestion // mangle original word three differnt ways // and score them to generate a minimum acceptable score int thresh = 0; for (int sp = 1; sp < 4; sp++) { if (utf8) { for (int k=sp; k < n; k+=4) *((unsigned short *) u8 + k) = '*'; u16_u8(mw, MAXSWUTF8L, u8, n); thresh = thresh + ngram(n, word, mw, NGRAM_ANY_MISMATCH + NGRAM_LOWERING);