catgets()

read message from message catalog 

Function


SYNOPSIS

#include <nl_types.h>

char *catgets(nl_catd catd, int set_num, int msg_num, char *s);


DESCRIPTION

The catgets() function 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(). The s parameter points to a default message string which may be returned by catgets() if it cannot retrieve the requested message from the catalog.


PARAMETERS

catd 

Identifies the message catalog (returned from catopen()).

set_num 

Is the set number where the desired message is located.

msg_num 

Is the numeric identifier for the message.

s 

Is the default message string (if message is not available).


RETURN VALUES

If the requested message is received successfully, catgets() returns a pointer to an internal buffer area containing the null-terminated message string. If the call is unsuccessful for any reason, catgets() returns s, and sets errno to one of the following values:

EBADF 

catd is not a valid message catalog descriptor.

EINTR 

A signal interrupted the call.


CONFORMANCE

UNIX 98.


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

None.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
catclose(), catopen()


PTC MKS Toolkit 10.4 Documentation Build 39.