fixed errors introduced in last change
This commit is contained in:
parent
cf266fc49f
commit
3d3884fc6f
|
@ -409,9 +409,13 @@ psl_ctx_t *psl_load_fp(FILE *fp)
|
||||||
// add to exceptions
|
// add to exceptions
|
||||||
if (_suffix_init(&suffix, p + 1, linep - p - 1) == 0)
|
if (_suffix_init(&suffix, p + 1, linep - p - 1) == 0)
|
||||||
suffixp = _vector_get(psl->suffix_exceptions, _vector_add(psl->suffix_exceptions, &suffix));
|
suffixp = _vector_get(psl->suffix_exceptions, _vector_add(psl->suffix_exceptions, &suffix));
|
||||||
|
else
|
||||||
|
suffixp = NULL;
|
||||||
} else {
|
} else {
|
||||||
if (_suffix_init(&suffix, p, linep - p) == 0)
|
if (_suffix_init(&suffix, p, linep - p) == 0)
|
||||||
suffixp = _vector_get(psl->suffixes, _vector_add(psl->suffixes, &suffix));
|
suffixp = _vector_get(psl->suffixes, _vector_add(psl->suffixes, &suffix));
|
||||||
|
else
|
||||||
|
suffixp = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (suffixp)
|
if (suffixp)
|
||||||
|
@ -448,6 +452,8 @@ int psl_suffix_count(const psl_ctx_t *psl)
|
||||||
return countof(suffixes);
|
return countof(suffixes);
|
||||||
else if (psl)
|
else if (psl)
|
||||||
return _vector_size(psl->suffixes);
|
return _vector_size(psl->suffixes);
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* just counts exceptions */
|
/* just counts exceptions */
|
||||||
|
@ -457,6 +463,8 @@ int psl_suffix_exception_count(const psl_ctx_t *psl)
|
||||||
return countof(suffix_exceptions);
|
return countof(suffix_exceptions);
|
||||||
else if (psl)
|
else if (psl)
|
||||||
return _vector_size(psl->suffix_exceptions);
|
return _vector_size(psl->suffix_exceptions);
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// returns compilation time
|
// returns compilation time
|
||||||
|
|
Loading…
Reference in New Issue