Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

catopen(3)

catclose(3)

dspcat(1)

dspmsg(1)

gencat(1)

mkcatdefs(1)

catgets(3)  —  Subroutines

OSF

NAME

catgets − Retrieves a message from a catalog

LIBRARY

Standard C Library (libc.a)

SYNOPSIS

#include <nl_types> char ∗catgets() (
    nl_catd cat_descriptor,
    int set_number,
    int message_number,
    char ∗string );

PARAMETERS

cat_descriptor
Specifies a catalog description that is returned by the catopen() function. 

set_numberSpecifies the set ID. 

message_number
Specifies the message ID. The set_number and message_number parameters specify a particular message in the catalog to retrieve. 

stringSpecifies the character string buffer. 

DESCRIPTION

The catgets() function retrieves a message from a catalog after a successful call to the catopen() function. If the catgets() function finds the specified message, it loads that message into a character string buffer, terminates the message string with a null character, and returns a pointer to the buffer.  The message in the buffer is overwritten by the next call to the catgets() function. 

NOTES

AES Support Level:
Trial use

RETURN VALUES

Upon successful completion, the catgets() function returns a pointer to an internal buffer area containing the null terminated message string.  Otherwise, string is returned. 

ERRORS

If the cat_descriptor parameter is not a valid catalog descriptor, the catgets() function returns a pointer to the user-supplied default message string specified by the string parameter. If the catgets() function cannot find the specified message in the catalog, it returns a pointer to a null string. 

RELATED INFORMATION

Functions: catopen(3), catclose(3)

Commands: dspcat(1), dspmsg(1), gencat(1), mkcatdefs(1)

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