catgetmsg(3int)catgetmsg(3int)Namecatgetmsg - get message from a message catalog
Syntax
#include <nl_types.h>
char *catgetmsg(catd, set_num, msg_num, buf, buflen)
nl_catd catd;
int set_num, msg_num, buflen;
char *buf;
Description
The function has been superceded by the function. You should use the
function to get messages from a message catalog. You might want to re‐
write calls to the function so that they use the function. The func‐
tion is available for compatibility with XPG-2 conformant software and
might not be available in the future. For more information on using
see the reference page.
The function attempts to read up to buflen -1 bytes of a message string
into the area pointed to by buf . The parameter is an integer value
containing the size in bytes of buf. The return string is always ter‐
minated with a null byte.
The parameter catd is a catalog descriptor returned from an earlier
call to and identifies the message catalog containing the message set (
set_num) and the program message ( msg_num).
The arguments set_num and msg_num are defined as integer values for
maximum portability. Where possible, you should use symbolic names for
message and set numbers, rather hard-coding integer values into your
source programs. If you use symbolic names, you must run prior to and
be sure the appropriate include file is used in your program.
Return Value
If successful, returns a pointer to the message string in buf. Other‐
wise, if catd is invalid or if set_num or msg_num are not in the mes‐
sage catalog, returns a pointer to an empty (null) string.
See Alsointro(3int), gencat(1int), catopen(3int), catgets(3int), nl_types(5int)
Guide to Developing International Software
catgetmsg(3int)