CATGETS(3C) — HP-UX
Series 300, 800 Only
NAME
catgets − get a program message
SYNOPSIS
#include <nl_types.h>
char *catgets (catd, set_num, msg_num, def_str)
nl_catd catd;
int set_num, msg_num;
char *def_str;
DESCRIPTION
Catgets reads message msg_num in set set_num from the message catalogue identified by catd. Catd is a catalogue descriptor returned from a previous call to catopen(3C). Def_str points to a default message string returned by catgets if the catalogue descriptor is invalid.
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 because the message catalogue identified by catd is unavailable, a pointer to def_str is returned. If the message catalogue is available but does not contain the identified message, a pointer to an empty (null) string is returned.
WARNINGS
Catgets returns a pointer to a static area that is overwritten on each call.
Set_num and msg_num are defined as integer values for maximum portability. However, it is recommended that programmers use symbolic names for message and set numbers wherever possible, rather than hard-coding integer values into their source programs.
AUTHOR
Catgets was developed by HP.
SEE ALSO
INTERNATIONAL SUPPORT
8- and 16-bit data.
Hewlett-Packard Company — Version B.1, May 11, 2021