Retrieves a message from a catalog.
#include <nl_types>
char *catgets (CatalogDescriptor, SetNumber, MessageNumber, String)
nl_catd CatalogDescriptor;
int SetNumber, MessageNumber;
const char * String;
The catgets subroutine retrieves a message from a catalog after a successful call to the catopen subroutine. If the catgets subroutine finds the specified message, it loads it into an internal character string buffer, ends the message string with a null character, and returns a pointer to the buffer.
The catgets subroutine uses the returned pointer to reference the buffer and display the message. However, the buffer can not be referenced after the catalog is closed.
If the catgets subroutine is unsuccessful for any reason, it returns the user-supplied default message string specified by the String parameter.
This subroutine is part of Base Operating System (BOS) Runtime.
The catclose (catclose Subroutine) subroutine, catopen (catopen Subroutine) subroutine.
For more information about the Message Facility, see Message Facility Overview for Programming in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.
For more information about subroutines and libraries, see Subroutines Overview in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.