Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ catopen(3C) — DG/UX 5.4.2A

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

gencat(1)

catexstr(1)

catgets(3C)

setlocale(3C)

environ(5)

mkmsgs(1)

gettxt(3C)



catopen(3C)                      DG/UX 5.4.2                     catopen(3C)


NAME
       catopen, catclose - open/close a message catalogue

SYNOPSIS
       #include <nltypes.h>

       nlcatd catopen (char *name, int oflag);

       int catclose (nlcatd catd);

DESCRIPTION
       catopen opens an X/Open-style message catalogue and returns a
       catalogue descriptor.  name specifies the name of the message
       catalogue to be opened.  If name contains a ``/'' then name specifies
       a pathname for the message catalogue.  Otherwise, the environment
       variable NLSPATH is used.  If NLSPATH does not exist in the
       environment, or if a message catalogue cannot be opened in any of the
       paths specified by NLSPATH, then the default path is used [see
       nltypes(5)].

       The names of message catalogues, and their location in the filestore,
       can vary from one system to another.  Individual applications can
       choose to name or locate message catalogues according to their own
       special needs.  A mechanism is therefore required to specify where
       the catalogue resides.

       The NLSPATH variable provides both the location of message
       catalogues, in the form of a search path, and the naming conventions
       associated with message catalogue files.  For example:

              NLSPATH=/usr/lib/nls/msg/%L/%N.cat:/usr/lib/nls/msg/%N/%L

       The metacharacter % introduces a substitution field, where %L
       substitutes the current setting of the LANG environment variable (see
       following section), and %N substitutes the value of the name
       parameter passed to catopen.  Thus, in the above example, catopen
       will search in /usr/lib/nls/msg/$LANG/name.cat, then in
       /usr/lib/nls/msg/name/$LANG, for the required message catalogue.

       NLSPATH will normally be set up on a system wide basis (e.g., in
       /etc/profile) and thus makes the location and naming conventions
       associated with message catalogues transparent to both programs and
       users.

       The full set of metacharacters is:

              %N   The value of the name parameter passed to catopen.

              %L   The value of LANG.

              %l   The value of the language element of LANG.

              %t   The value of the territory element of LANG.




Licensed material--property of copyright holder(s)                         1




catopen(3C)                      DG/UX 5.4.2                     catopen(3C)


              %c   The value of the codeset element of LANG.

              %%   A single %.

       The LANG environment variable provides the ability to specify the
       user's requirements for native languages, local customs and character
       set, as an ASCII string in the form
              LANG=language[territory[.codeset]]

       A user who speaks German as it is spoken in Austria and has a
       terminal which operates in the PC 850 codeset, would want the setting
       of the LANG variable to be

              LANG=deAT.850

       With this setting it should be possible for that user to find any
       relevant catalogues should they exist.

       Should the LANG variable not be set then the value of LCMESSAGES as
       returned by setlocale is used.  If this is NULL then the default path
       as defined in nltypes is used.

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

       catclose closes the message catalogue identified by catd.

DIAGNOSTICS
       If successful, catopen returns a message catalogue descriptor for use
       on subsequent calls to catgets and catclose.  Otherwise catopen
       returns (nlcatd) -1.

       catclose returns 0 if successful, otherwise -1.

SEE ALSO
       gencat(1), catexstr(1), catgets(3C), setlocale(3C), environ(5),
       nltypes(5).
       mkmsgs(1), gettxt(3C) -- AT&T-style message facilities.



















Licensed material--property of copyright holder(s)                         2


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