rulexdb_remove_item(3)

rulexdb_remove_item3

Remove specified item from the rulex dictionary

Usage

#include <rulexdb.h>

int rulexdb_remove_item(RULEXDB *rulexdb, const char *key, int item_type);

Overview

The rulexdb_remove_item() function removes lexical item for specified key from the dictionary dataset defined by item_type argument that may accept one of the following values:

RULEXDB_LEXBASE

Remove item from the Implicit dictionary.

RULEXDB_EXCEPTION

Remove item from the Explicit dictionary.

Note that the data type must be specified explicitly. The value RULEXDB_DEFAULT is not allowed here.

The argument rulexdb references the database to deal with.

Return value

The rulexdb_remove_item() function returns RULEXDB_SUCCESS which is zero when specified item was successfully removed, positive value RULEXDB_SPECIAL when no record exists for specified key, or negative error code in the case of other failure.

Errors

RULEXDB_FAILURE

Referenced database has not been opened, internal data structures are corrupted or some other general failure has occurred.

RULEXDB_EINVKEY

Invalid key specified.

RULEXDB_EPARM

The argument rulexdb or item_type has an invalid value.

RULEXDB_EACCESS

The database is not opened for updating.

Author

Igor B. Poretsky <[email protected]>.

From librulexdb-dev 3.8.6-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.