HP-UX Reference (11i v1 00/12) - 3 Library Functions A-M (vol 6)
__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man3/!!!intro.3c
________________________________________________________________
___ ___
c
catgets(3C) catgets(3C)
NAME
catgets() - get a program message
SYNOPSIS
#include <nl_types.h>
char *catgets(
nl_catd catd,
int set_num,
int msg_num,
const char *def_str
);
DESCRIPTION
The catgets() function reads message msg_num in set set_num from the message catalog identified
by catd, a catalog descriptor returned from a previous call to catopen() (see catopen(3C)). If the call
fails, def_str points to a default message string returned by catgets().
A message longer than NL_TEXTMAX bytes is truncated. The returned message string is always ter-
minated with a null byte. NL_TEXTMAX is defined in <
limits.h>.
APPLICATION USAGE.
catgets() is thread-safe. It is not async-cancel-safe. A cancellation point may occur when a thread is
executing catgets().
EXTERNAL INFLUENCES
International Code Set Support
Single- and multi-byte character code sets are supported.
RETURN VALUE
If the call is successful, catgets() returns a pointer to an internal buffer area containing the null-
terminated message string. If the call is unsuccessful,
catgets() returns a pointer to def_str.
ERRORS
catgets() fails and sets errno under any of the following conditions:
[EBADF] catd is not a valid catalog descriptor.
[EINTR] A signal was caught during the read(2) system call.
[EINVAL] The message catalog identified by
catd
is corrupted.
[ENOMSG] The message identified by
set_num
or msg_num is not in the message catalog.
[ERANGE] A message longer than
NL_TEXTMAX bytes was truncated.
WARNINGS
The catgets() function returns a pointer to a static area that is overwritten on each call.
AUTHOR
catgets() was developed by HP.
FILES
/usr/include/nl_types.h
SEE ALSO
dumpmsg(1), gencat(1), catclose(3C), catopen(3C).
STANDARDS CONFORMANCE
catgets(): AES, SVID3, XPG2, XPG3, XPG4
HP-UX Release 11i: December 2000 − 1 − Section 3−−59
___
___