Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (SunOS-4.1.3)
Apropos / Subsearch:
optional field

CATGETS(3C)                                                        CATGETS(3C)

       catgets, catgetmsg - get message from a message catalog

       #include <&lt;nl_types.h>&gt;

       char *catgets(catd, set_num, msg_num, s)
       nl_catd catd;
       int set_num, msg_num;
       char *s;

       char *catgetmsg(catd, set_num, msg_num, buf, buflen)
       nl_catd catd;
       int set_num;
       int msg_num;
       int buflen;

       catgets()  reads  the message msg_num, in set set_num, from the message
       catalog identified by catd.  catd is a catalog descriptor returned from
       an  earlier  call to catopen(3C).  s points to a default message string
       which will be returned by catgets() if the identified  message  catalog
       is not currently available.  The message-text is contained in an inter-
       nal buffer area and should be copied by the application if it is to  be
       saved or re-used after further calls to catgets().

       catgetmsg()  attempts to read up to buflen -1 bytes of a message string
       into the area pointed to by buf.  buflen is an integer value containing
       the  size in bytes of buf.  The return string is always terminated with
       a null byte.

       On success, catgets() returns a pointer to an internal buffer area con-
       taining  the  null-terminated  message  string.   catgets()  returns  a
       pointer to s if it fails because the message catalog specified by  catd
       is  not currently available.  Otherwise, catgets() returns a pointer to
       an empty string if the message catalog is available but does  not  con-
       tain the specified message.

       On success, catgetmsg() returns a pointer to the message string in buf.
       If catd is invalid or if set_num or msg_num is not in the message cata-
       log, catgetmsg() returns a pointer to an empty string.

       catopen(3C), locale(5)

                                22 January 1990                    CATGETS(3C)