зеркало из https://github.com/mozilla/gecko-dev.git
Bug 579649 - Update Hunspell to version 1.2.12. r=smaug
This commit is contained in:
Родитель
5b25bd71ff
Коммит
84362673fc
|
@ -35,7 +35,7 @@
|
|||
*
|
||||
******* 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
|
||||
|
|
|
@ -3786,7 +3786,7 @@ int AffixMgr::parse_defcpdtable(char * line, FileMgr * af)
|
|||
}
|
||||
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;
|
||||
|
|
|
@ -272,8 +272,7 @@ int flag_bsearch(unsigned short flags[], unsigned short flag, int length) {
|
|||
}
|
||||
if (dp) {
|
||||
*stringp = dp+1;
|
||||
int nc = (int)((unsigned long)dp - (unsigned long)mp);
|
||||
*(mp+nc) = '\0';
|
||||
*dp = '\0';
|
||||
} else {
|
||||
*stringp = mp + strlen(mp);
|
||||
}
|
||||
|
@ -287,7 +286,7 @@ int flag_bsearch(unsigned short flags[], unsigned short flag, int length) {
|
|||
{
|
||||
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);
|
||||
|
@ -313,7 +312,7 @@ int flag_bsearch(unsigned short flags[], unsigned short flag, int length) {
|
|||
// 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';
|
||||
}
|
||||
|
@ -324,7 +323,7 @@ int flag_bsearch(unsigned short flags[], unsigned short flag, int length) {
|
|||
{
|
||||
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;
|
||||
|
|
|
@ -166,12 +166,12 @@ 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);
|
||||
|
|
|
@ -1141,7 +1141,7 @@ int SuggestMgr::ngsuggest(char** wlst, char * w, int ns, HashMgr** pHMgr, int md
|
|||
}
|
||||
}}
|
||||
|
||||
// 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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче