catopen()

NAME

catopen() - open message catalog

SYNOPSIS

#include <nl_types.h>

nl_catd catopen (const char *name, int oflag)

DESCRIPTION

The catopen(3) function opens the message catalog specified by name and returns a message catalog descriptor. If name contains a /, name specifies the full path name for the message catalog. Otherwise, the value of the environment variable NLSPATH is used with name substituted for %N. Each path in NLSPATH is searched both as itself, and with the name of the Interix install directory prepended to it. Thus, with an NLSPATH of /usr/share/nls, both $INTERIX_ROOT/usr/share/nls and /usr/share/nls will be searched, in that order.

If oflag is set to 0, %L in NLSPATH is replaced with the value of LANG. If oflag is set to NL_CAT_LOCALE, %L is replaced with the value of LC_MESSAGES. If oflag is neither 0 nor NL_CAT_LOCALE, an error is returned.

RETURN VALUE

Upon successful completion, catopen(3) returns a message catalog descriptor. Otherwise, (nl_catd) -1 is returned and errno is set to indicate the error.

ERRORS

[ENOMEM]
Insufficient memory is available.

NOTES

This version parses but does not yet interpolate the %l, %t, and %c specifiers in NLSPATH as supported in XPG/4.

SEE ALSO

catclose(3)

catgets(3)