catread [ HP C/iX Library Reference Manual ] MPE/iX 5.0 Documentation
HP C/iX Library Reference Manual
catread
Returns a message from a message catalog file in HP-UX format.
Syntax
int catread (int fd, int set_num, int msg_num, char *msg_buf,
int buflen [,char *arg]....);
Parameters
fd An integer containing a file descriptor of the message
catalog.
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.
msg_buf A pointer to a character array in which the message is
returned.
buflen An integer containing the length of buffer pointed to by
msg_buf.
arg1..n Optional pointers to character strings that can be inserted
into the error message.
Return Values
>=0 The number of non-null bytes placed in the msg_buf.
Indicates success.
<0 Indicates set_num or msg_num is not found in the catalog.
Description
The catread function retrieves messages from message catalogs created on
HP-UX or formatted according to the HP-UX message catalog conventions.
The catread function is layered on getmsg.
This function 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, refer to the descriptions of the
MPE/iX intrinsics CATOPEN, CATCLOSE, and CATREAD which are documented in
the MPE/iX Intrinsics Reference Manual.
The message read from the catalog may have embedded formatting
information in the form ![n], where n is a digit. An exclamation mark
followed by n is replaced by the nth argument string. If exclamation
marks are not numbered, they are replaced by the arguments in serial
order. Either all or none must be numbered.
See Also
getmsg()
MPE/iX 5.0 Documentation