rulexdb_remove_rule3
Remove specified rule from the rulex database
Usage
#include <rulexdb.h> int rulexdb_remove_rule(RULEXDB *rulexdb, int rule_type, int position);
Overview
The rulexdb_remove_rule() function removes a rule identified by its type and position in the ruleset from the rulex database referenced by rulexdb argument.
The argument rule_type specifies the rule type. It may accept one of the following values:
|
The rule is the word classifier and belongs to the |
|---|---|
|
The requested rule should be removed from the Prefix detectors ruleset. |
|
The requested rule should be removed from the |
|
The rule is a correction rule that belongs to the |
The argument position defines position of the requested rule in the ruleset.
Return value
The rulexdb_remove_rule() function returns RULEXDB_SUCCESS which is zero when specified rule was successfully removed, positive value RULEXDB_SPECIAL when there is no rule with such number in specified ruleset, or negative error code otherwise.
Errors
RULEXDB_FAILURE-
Referenced database has not been opened, internal data structures are corrupted or some other general failure has occurred.
RULEXDB_EPARM-
The argument rulexdb or rule_type has an invalid value.
RULEXDB_EACCESS-
The database is not opened for updating.