Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

catopen(3C)

catgets(3C)

read(2)

CATGETMSG(3C)  —  HP-UX

Series 300, 800 Only

NAME

catgetmsg − get message from a message catalogue

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 a maximum of buflen-1 bytes of a message string into the location indicated by buf. Buflen is an integer value containing the size in bytes of buf. The return string is always terminated with a null byte.

Catd is a catalogue descriptor returned from an earlier call to catopen(3C) and identifies the message catalogue containing the message set (set_num) and the program message (msg_num).

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 catalogue, catgetmsg returns a pointer to an empty (null) string and sets errno to indicate the error. 

ERRORS

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

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

­[EINVAL] Buflen is less than 1. 

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

­[EINVAL] The message catalogue 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 will be implementation-dependent. 

WARNINGS

Set_num and msg_num are defined as integer values for maximum portability.  However, it is recommended that programmers use symbolic names for message and set numbers, wherever possible, rather than hard-coding integer values into their source programs. 

AUTHOR

Catgetmsg was developed by HP. 

SEE ALSO

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

INTERNATIONAL SUPPORT

8- and 16-bit data. 

Hewlett-Packard Company  —  Version B.1,  May 11, 2021

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