Print message and exit when no suffixes are found

This commit is contained in:
Tim Rühsen 2016-02-12 12:27:25 +01:00
parent d19c46c003
commit 811513f17e
1 changed files with 5 additions and 0 deletions

View File

@ -256,6 +256,11 @@ int main(int argc, const char **argv)
if (!(psl = psl_load_file(argv[argpos]))) if (!(psl = psl_load_file(argv[argpos])))
return 2; return 2;
if (!psl->suffixes || !psl->nsuffixes) {
fprintf(stderr, "Failed to load PSL. Please check content of '%s'.\n", argv[argpos]);
return 5;
}
/* look for ambiguous or double entries */ /* look for ambiguous or double entries */
/* if (_check_psl(psl)) { /* if (_check_psl(psl)) {
psl_free(psl); psl_free(psl);