NAME

catlog_loadspecfile - read log message definitions from ELS definition file

SYNOPSIS

#include <cat/cat.h>

#include <cat/log.h>

int catlog_loadspecfile(const char *filename, catlog_mklabelfunc *func);

DESCRIPTION

This function reads a message specification file filename (as used by ELS) and calls the supplied function func for each label found.

The callback function func should behave in the same way as catlog_mklabel().

The message file should normally be the file for ``en_US''. It can be encoded as plain ASCII, UCS-2 (2-byte UNICODE, any byte order) or utf-8. In the last case, the first characters in the file must be ``#UTF''.

See elsfile for details of the ELS specification file format.

The function returns the number of labels successfully registered, or a negative code on error.

NOTES

The security server will understand only definition files encoded in UCS-2.

SEE ALSO

cat, catlog, catlog_mklabel, elsfile