catgets

Reads a program message.

Library:LibC
Classification:Single UNIX
Service:Message Catalogs

Syntax

  #include <nl_types.h> 
   
  char *catgets (
     nl_catd       catd,
     int           set_id,
     int           msg_id,
     const char   *string);
  

Parameters

catd

(IN) Specifies the message catalog, which is returned from catopen.

set_id

(IN) Specifies the set number where the message is located. This parameter must be set to NL_SETD (1).

msg_id

(IN) Specifies the numeric identifier for the message.

string

(IN) Points to a default message string.

Return Values

If successful, returns a pointer to the message string. Otherwise, returns a pointer to the string parameter and sets errno to the following:

Decimal

Constant

Description

4

EBADF

Invalid message catalog descriptor.

9

EINVAL

Invalid set_id parameter.

90

ENOMSG

The requested message is not in the table.

105

ENOCONTEXT

No thread context is present.

Remarks

The string parameter points to a default message that can be used if catgets cannot retrieve the requested message.

See Also