getmsg [ HP C/iX Library Reference Manual ] MPE/iX 5.0 Documentation
HP C/iX Library Reference Manual
getmsg
Gets a message from a catalog. This function provides support for
message catalogs that are created on HP-UX and moved to an MPE/iX system.
Syntax
char *getmsg (int fd, int set_num, int msg_num, char *buf,
int buflen);
Parameters
fd An integer containing a file descriptor of an open message
catalog file.
set_num An integer containing the message set number where the
message to be read is located.
msg_num An integer containing the message number within the set to
read from the message catalog.
buf A pointer to a character array in which the message is
returned.
buflen An integer containing the length of buffer pointed to by
buf.
Return Values
x A pointer to the returned string. This is the same value
as buf.
NULL Indicates failure. The file descriptor may be invalid, or
the message indicated by set_num and msg_num may not be in
the catalog.
Description
The getmsg function gets messages from an HP-UX message catalog. It
provides interoperability support for message catalogs ported to MPE/iX
from HP-UX systems. For information on how to read message catalogs
created on MPE/iX with the GENCAT utility, refer to the descriptions of
the MPE/iX intrinsics CATOPEN, CATCLOSE, and CATREAD which are documented
in the MPE/iX Intrinsics Reference Manual.
The getmsg function attempts to read up to buflen-1 bytes of the
specified message in the message catalog into the area pointed to by buf.
A null byte is inserted to terminate the string placed in the buffer.
A message catalog is a specially formatted file containing numbered
messages that are grouped together in message sets. The file contains an
index allowing fast access to the messages. The calling program must
open the message catalog before calling getmsg.
See Also
catread()
MPE/iX 5.0 Documentation