CATOPEN(3C) SysV CATOPEN(3C)
NAME
catopen - Opens a specified message catalog
SYNOPSIS
#include <nl_types.h>
nl_catd catopen (name, oflag )
const char *name;
int oflag;
DESCRIPTION
The catopen function opens a specified message catalog and returns a
catalog descriptor that is used to retrieve messages from the catalog in
subsequent calls to catgets(3C).
The name argument specifies the name of the message catalog to be opened.
If name contains a / (slash), then name specifies a full pathname for the
message catalog. Otherwise, the environment variable NLSPATH is used
with name substituted for %N. If NLSPATH does not exist in the
environment, or if a message catalog cannot be opened in any of the
components specified by NLSPATH, then a default message catalog is used.
The default language, territory, and codeset for program localization is
defined by the LANG environment variable. Users (or system
administrators) must set the LANG environment variable in order to
specify default requirements for program localization.
If a file descriptor is used to implement message catalog descriptors,
the FD_CLOEXEC flag will be set.
oflag is included for compatibility with X/Open. The oflag argument is
reserved for future use and should be set to zero. The results of
setting this field to any other value are undefined.
NOTES
The special nl_catd data type is used for catalog descriptors. Since this
data type is defined in the nl_types.h header file, include this file in
your application program.
DIAGNOSTICS
Upon successful completion, catopen returns a message catalogue
descriptor for use on subsequent calls to catgets and catclose.
Otherwise catopen returns nl_catd -1.
SEE ALSO
catclose(3C), catgets(3C),
For more information on setting environment variables, see the "Overview
of Internationalization on Domain/OS" chapter in: Domain System
Software Release Notes, Software Release 10.4.