catgets(3C) catgets(3C)
NAME
catgets - read a program message
SYNOPSIS
#include <nltypes.h>
char *catgets(nlcatd catd, int setnum, int msgnum, const char *s);
DESCRIPTION
catgets() attempts to read message msgnum, in set setnum, from the
message catalog identified by catd. catd is a catalog descriptor
returned from an earlier call to catopen(). s points to a default mes-
sage string which will be returned by catgets() if the function fails.
RESULT
If the identified message is retrieved successfully, catgets() returns
a pointer to an internal buffer area containing the null terminated
message string. If the call is unsuccessful because the message cata-
log identified by catd is not currently available, a pointer to s is
returned and errno may be set to indicate the error.
ERRORS
The following error code descriptions are function-specific. You will
find a general description in introprm2(2) or in errno(5).
The catgets() function may fail if:
EBADF The catd argument is not a valid message catalogue descrip-
tor open for reading.
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 setnum and msgnum is not in the
message catalog.
SEE ALSO
catclose(3C), catopen(3C), nltypes(5).
Page 1 Reliant UNIX 5.44 Printed 11/98