#include <nl_types.h>
char *catgets(catd, set_num, msg_num, s) nl_catd catd; int set_num, msg_num; char *s;
char *catgetmsg(catd, set_num, msg_num, buf, buflen) nl_catd catd; int set_num; int msg_num; int buflen;
catgets() reads the message msg_num, in set set_num, from the message catalog identified by catd. catd is a catalog descriptor returned from an earlier call to catopen.3c s points to a default message string which will be 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().
catgetmsg() attempts to read up to buflen -1 bytes of a message string into the area pointed to by buf. buflen is an integer value containing the size in bytes of buf. The return string is always terminated with a null byte.
On success, catgets() returns a pointer to an internal buffer area containing the null-terminated message string. catgets() returns a pointer to s if it fails because the message catalog specified by catd is not currently available. Otherwise, catgets() returns a pointer to an empty string if the message catalog is available but does not contain the specified message.
On success, catgetmsg() returns a pointer to the message string in buf. If catd is invalid or if set_num or msg_num is not in the message catalog, catgetmsg() returns a pointer to an empty string.
Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97