unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

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

CATOPEN(3C)                                                        CATOPEN(3C)



NAME
       catopen, catclose - open/close a message catalog

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

       nl_catd catopen(name, oflag)
       char *name;
       int oflag;

       int catclose(catd)
       nl_catd catd;

DESCRIPTION
       catopen()  opens  a  message  catalog and returns a catalog descriptor.
       name specifies the name of the message catalog to be opened.   If  name
       contains  a `/' then name specifies a pathname for the message catalog.
       Otherwise, the environment variable NLSPATH is used with  name  substi-
       tuted  for  %N (see locale(5)).  If NLSPATH does not exist in the envi-
       ronment, or if a message catalog cannot be opened in any of  the  paths
       specified  by  NLSPATH, the /etc/locale/LC_MESSAGES/locale directory is
       searched for a message catalog with  filename  name,  followed  by  the
       /usr/share/lib/locale/LC_MESSAGES/locale   directory.   In  both  cases
       locale stands for the current setting of the  LC_MESSAGES  category  of
       locale.

       oflag  is  reserved  for future use and should be set to 0 (zero).  The
       results of setting this field to any other value are undefined.

       catclose() closes the message catalog identified by catd.   It  invali-
       dates any following references to the message catalog defined by catd.

RETURN VALUES
       catopen() returns a message catalog descriptor on success.  On failure,
       it returns -1.

       catclose() returns:

       0      on success.

       -1     on failure.

SEE ALSO
       catgets(3C), locale(5)

NOTES
       Using catopen() and catclose() in conjunction with gettext() or textdo-
       main() (see gettext(3)) is undefined.



                                22 January 1990                    CATOPEN(3C)