Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

catgets(3) [osf1 man page]

catgets(3)						     Library Functions Manual							catgets(3)

NAME
catgets - Retrieves a message from a catalog LIBRARY
Standard C Library (libc) SYNOPSIS
#include <nl_types.h> char *catgets( nl_catd cat_descriptor, int set_number, int message_number, const char *string); STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: catgets(): XSH5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. PARAMETERS
Specifies a catalog descriptor that is returned by the catopen() function. Identifies a message set. Identifies a message. In combina- tion, the set_number and message_number identify the particular message in the catalog to retrieve. Specifies the default message string to be returned if catgets() cannot retrieve the message from the catalog. DESCRIPTION
The catgets() function retrieves a message from a catalog after a successful call to the catopen() function. If the catgets() function finds the specified message, a pointer to the message text is returned. Otherwise, the function returns a pointer to the default message string. NOTES
The returned cat_descriptor pointer is not valid once the catclose() function has been called for that cat_descriptor. RETURN VALUES
On successful completion, the catgets() function returns a pointer to the null terminated message string retrieved from the catalog. Oth- erwise, the function returns a pointer to string and sets errno to indicate the error. ERRORS
If the catgets() function fails, it sets errno to one of the following values for the reason specified: [Tru64 UNIX] Search permission is denied for a component of the path to the message catalog or read permission is denied for the catalog. [Tru64 UNIX] This error may occur on the first invocation of catgets(). See catopen(3) for more information. The cat_descriptor value does not identify a message catalog that is open for reading. The cat_descriptor argument is corrupted. [Tru64 UNIX] The process limit for open file descriptors per process has already reached OPEN_MAX. [Tru64 UNIX] This error may occur on the first invocation of catgets(). See catopen(3) for more information. [Tru64 UNIX] The system limit for open file descriptors has been reached. [Tru64 UNIX] The message catalog does not exist. [Tru64 UNIX] This error may occur on the first invocation of catgets(). See catopen(3) for more information. [Tru64 UNIX] Insuf- ficient memory is available. [Tru64 UNIX] This error may occur on the first invocation of catgets(). See catopen(3) for more information. The message identi- fied by set_number and message_number is not in the catalog. RELATED INFORMATION
Functions: catopen(3), catclose(3) Commands: dspcat(1), dspmsg(1), extract(1), gencat(1), mkcatdefs(1), strextract(1), strmerge(1), trans(1) Others: i18n_intro(5), l10n_intro(5), standards(5) Writing Software for the International Market delim off catgets(3)

Check Out this Related Man Page

catgets(3C)						   Standard C Library Functions 					       catgets(3C)

NAME
catgets - read a program message SYNOPSIS
#include <nl_types.h> char *catgets(nl_catd catd, int set_num, int msg_num, const char *s); DESCRIPTION
The catgets() function attempts to read message msg_num, in set set_num, from the message catalog identified by catd. The catd argument is a catalog descriptor returned from an earlier call to catopen(). The s argument points to a default message string which will be returned by catgets() if the identified message catalog is not currently available. RETURN VALUES
If the identified message is retrieved successfully, catgets() returns a pointer to an internal buffer area containing the null termi- nated message string. If the call is unsuccessful for any reason, catgets() returns a pointer to s and errno may be set to indicate the error. ERRORS
The catgets() function may fail if: EBADF The catd argument is not a valid message catalogue descriptor open for reading. EBADMSG The number of %n specifiers that appear in the message string specified by s does not match the number of %n specifiers that appear in the message identified by set_id and msg_id in the specified message catalog. EINTR The read operation was terminated due to the receipt of a signal, and no data was transferred. EINVAL The message catalog identified by catd is corrupted. ENOMSG The message identified by set_id and msg_id is not in the message catalog. USAGE
The catgets() function can be used safely in multithreaded applications as long as setlocale(3C) is not being called to change the locale. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
gencat(1), catclose(3C), catopen(3C), gettext(3C), setlocale(3C), attributes(5), standards(5) International Language Environments Guide SunOS 5.10 22 Mar 2002 catgets(3C)
Man Page