NAME

catinfo_set - add or delete values to the catinfo tree

SYNOPSIS

#include <cat/cat.h>

int catinfo_set(const char *name, const char *value);

DESCRIPTION

catinfo_set() adds or removes data in the catinfo tree.

If value is NULL, the corresponding node is deleted from the tree. If the deleted node is internal to the tree, all subordinate nodes will be removed.

name must be an absolute infopath. There must be an immediate parent node to the value that is to be inserted.

If a value with the same name already exists, this value will be overwritten.

A successful call to catinfo_init() must have been made prior to any call to this function.

catinfo_set() returns 0 if successful or a negative code on error. Specifically, the function will return CAT_ENOPARENT if name has no immediate parent node in the tree.

SEE ALSO

cat, catinfo

catinfo_get