up | Inhaltsverzeichniss | Kommentar

Manual page for CATOPEN(3C)

catopen, catclose - open/close a message catalog

SYNOPSIS

#include <nl_types.h>

nl_catd catopen(name, oflag)
char *name;
int oflag;

int catclose(catd)
nl_catd catd;

DESCRIPTION

catopen() opens a message catalog and returns a catalog descriptor. name specifies the name of the message catalog to be opened. If name contains a `/' then name specifies a pathname for the message catalog. Otherwise, the environment variable NLSPATH is used with name substituted for %N (see locale.5 If NLSPATH does not exist in the environment, or if a message catalog cannot be opened in any of the paths specified by NLSPATH, the /etc/locale/LC_MESSAGES/locale directory is searched for a message catalog with filename name, followed by the /usr/share/lib/locale/LC_MESSAGES/locale directory. In both cases locale stands for the current setting of the LC_MESSAGES category of locale.

oflag is reserved for future use and should be set to 0 (zero). The results of setting this field to any other value are undefined.

catclose() closes the message catalog identified by catd. It invalidates any following references to the message catalog defined by catd.

RETURN VALUES

catopen() returns a message catalog descriptor on success. On failure, it returns -1.

catclose() returns:

0
on success.
-1
on failure.

SEE ALSO

catgets.3c locale.5

NOTES

Using catopen() and catclose() in conjunction with gettext() or textdomain() (see gettext.3 is undefined.


index | Inhaltsverzeichniss | Kommentar

Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97