Skip to content

Commit

Permalink
checks for new parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
rieck committed Mar 10, 2015
1 parent 96c9e67 commit 25e9eae
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/sally.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,20 @@ static void sally_load_config(int argc, char **argv)
fatal("Your configuration is missing the new 'granularity' "
"parameter. Please consult the manual page and upgrade "
"your configuration.");

/* Check for old ngram_delim parameter */
ret = config_lookup_string(&cfg, "features.ngram_delim", &str);
if (ret == CONFIG_TRUE)
fatal("The 'ngram_delim' parameter in your configuration "
"is obsolete. Please consult the manual page and use "
"'token_delim' instead.");

/* Check for new token_delim parameter */
ret = config_lookup_string(&cfg, "features.token_delim", &str);
if (ret == CONFIG_FALSE)
fatal("Your configuration is missing the new 'token_delim' "
"parameter. Please consult the manual page and upgrade "
"your configuration.");
}

/* Check configuration */
Expand Down

0 comments on commit 25e9eae

Please sign in to comment.