NAME

catinfo_getbypath - lookup using explicit path

SYNOPSIS

#include <cat/cat.h>

int catinfo_getbypath(const char **path, const char *name, char **result);

DESCRIPTION

catinfo_getbypath() is a combination of the functionality of catinfo_get() and catinfo_setpath().

This function will search for entry name in each of the paths specified in path until a match is found or path is exhausted.

path is a NULL-terminated list of strings, where each string contains a context to be searched. path[0] has the greatest precedence and will therefore be searched first.

name is a relative infopath.

result will contain the result of a successful lookup. The result is allocated and must be freed by the caller.

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

catinfo_getbypath() returns 0 if successful or a negative code on error.

SEE ALSO

cat, catinfo