Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

gencat(1int)

catopen(3int)

catgets(3int)

nl_types(5int)

catgetmsg(3int)

NAME

catgetmsg − get message from a message catalog

SYNTAX

#include <nl_types.h>

char *catgetmsg (catd, set_num, msg_num, buf, buflen)
nl_catd catd;
int set_num, msg_num, buflen;
char *buf;

DESCRIPTION

The function catgetmsg attempts to read up to buflen -1 bytes of a message string into the area pointed to by buf.  The parameter buflen is an integer value containing the size in bytes of buf.  The return string is always terminated with a null byte. 

The parameter catd is a catalog descriptor returned from an earlier call to catopen and identifies the message catalog containing the message set (set_num) and the program message (msg_num). 

The arguments set_num and msg_num are defined as integer values for maximum portability.  However, it is recommended that programmers should use symbolic names for message and set numbers, wherever possible, rather than having integer values hard-coded into their source programs.  In this case, the #include file created by gencat −h must be included in all the program modules.

RETURN VALUE

If successful, catgetmsg returns a pointer to the message string in buf.  Otherwise, if catd is invalid or set_num and/or msg_num are not in the message catalog, catgetmsg returns a pointer to an empty (null) string.

SEE ALSO

gencat(1int), catopen(3int), catgets(3int), nl_types(5int)

Subroutines

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026