catgets(3int)
NAME
catgets − read a program message
SYNTAX
#include <nl_types.h>
char *catgets (catd, set_num, msg_num, s)
nl_catd catd;
int set_num, msg_num;
char *s;
DESCRIPTION
The function catgets attempts to read message msg_num in set set_num from the message catalog identified by catd. The parameter catd is a catalog descriptor returned from an earlier call to catopen. The pointer, s, points to a default message string which is returned by catgets if the identified message catalog is not currently available.
The message text is contained in an internal buffer area and should be copied by the application if it is to be saved or re-used after further calls to catgets.
It is recommended that programmers use symbolic names for message and set numbers wherever possible, rather than having integer values hard-coded into their source programs. In this case, the #include file generated by gencat −h must be included in all the program modules.
RETURN VALUE
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 for any reason, s is returned.
SEE ALSO
gencat(1int), catgetmsg(3int), catopen(3int), nl_types(5int)
Subroutines