Index of Section 3 Manual Pages
| Interix / SUA | catopen.3 | Interix / SUA |
catopen(3) catopen(3)
catopen()
NAME
catopen() - open message catalog
SYNOPSIS
#include
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 slash (/), 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.
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. If NLSPATH does not exist in the environment, or if a message
catalog cannot be opened for any NLSPATH-specified path, catopen(3) uses a
system-wide default path. The default is affected by LC_MESSAGES if the
value of oflag is NL_CAT_LOCALE. If the value of oflag is zero, the
default is affected by the environment variable LANG.
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)
USAGE NOTES
The catopen function is thread safe.
The catopen function is not async-signal safe.