Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ catgetmsg(3C) — HP-UX 7.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

catopen(3C)

catgets(3C)

read(2)

CATGETMSG(3C)

NAME

catgetmsg − get message from a message catalog

SYNOPSIS

#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

Catgetmsg reads message msg_num in set set_num from the message catalog indentified by catd, a catalog descriptor returned from a previous call to catopen(3C). The return message is stored in buf, a buffer of length buflen bytes. 

A message longer than buflen-1 bytes is silently truncated. The return message is always terminated with a null byte.

RETURN VALUE

If successful, catgetmsg returns a pointer to the message in buf. Otherwise, catgetmsg returns a pointer to an empty (null) string and sets errno to indicate the error.  If buflen is greater than zero, the pointer returned is buf.

ERRORS

Catgetmsg fails and errno is set if one of the following conditions is true:

­[EBADF] Catd is not a valid catalog descriptor. 

­[EINVAL] Buflen is less than 1. 

­[EINVAL] Set_num and/or msg_num are not in the message catalog. 

­[EINVAL] The message catalog identified by catd is corrupted. 

­[EINTR] A signal was caught during the read(2) system call.

­[EFAULT] Buf points outside the allocated address space.  The reliable detection of this error is implementation dependent. 

­[ERANGE] A message longer than buflen-1 bytes was truncated.

AUTHOR

Catgetmsg was developed by HP. 

SEE ALSO

catopen(3C), catgets(3C), read(2). 

EXTERNAL INFLUENCES

International Code Set Support

Single- and multi-byte character code sets are supported. 

STANDARDS CONFORMANCE

catgetmsg: XPG2

Hewlett-Packard Company  —  HP-UX Release 7.0: Sept 1989

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