2 .\" Copyright 1993 Mitchum DSouza <m.dsouza@mrc-applied-psychology.cambridge.ac.uk>
4 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
6 .\" Modified Thu Dec 13 22:51:19 2001 by Martin Schulze <joey@infodrom.org>
7 .\" Modified 2001-12-14 aeb
9 .TH catopen 3 (date) "Linux man-pages (unreleased)"
11 catopen, catclose \- open/close a message catalog
14 .RI ( libc ", " \-lc )
17 .B #include <nl_types.h>
19 .BI "nl_catd catopen(const char *" name ", int " flag );
20 .BI "int catclose(nl_catd " catalog );
25 opens a message catalog and returns a catalog descriptor.
26 The descriptor remains valid until
30 If a file descriptor is used to implement catalog descriptors,
37 specifies the name of the message catalog to be opened.
40 specifies an absolute path (i.e., contains a \[aq]/\[aq]),
43 specifies a pathname for the message catalog.
44 Otherwise, the environment variable
52 It is unspecified whether
54 will be used when the process has root privileges.
57 does not exist in the environment,
58 or if a message catalog cannot be opened
59 in any of the paths specified by it,
60 then an implementation defined path is used.
61 This latter default path may depend on the
63 locale setting when the
69 environment variable when the
74 part of the locale may invalidate
75 open catalog descriptors.
81 is used to indicate the source for the language to use.
84 then it will use the current locale setting for
86 Otherwise, it will use the
92 closes the message catalog identified by
94 It invalidates any subsequent references to the message catalog
100 returns a message catalog descriptor of type
103 On failure, it returns
107 to indicate the error.
108 The possible error values include all
109 possible values for the
115 returns 0 on success, or \-1 on failure.
119 May be the source of the
121 locale setting, and thus
122 determine the language to use if
128 The language to use if
132 For an explanation of the terms used in this section, see
138 Interface Attribute Value
143 T} Thread safety MT-Safe env
148 T} Thread safety MT-Safe
151 The above is the POSIX.1 description.
158 The default path varies, but usually looks at a number of places below
159 .IR /usr/share/locale .
161 .\" These functions are available for Linux since libc 4.4.4c.
162 .\" In the case of linux libc4 and libc5, the catalog descriptor
166 .\" area of memory and not a file descriptor.
176 .\" The former value indicates that a set from the catalog is to be
177 .\" loaded when needed, whereas the latter causes the initial call to
179 .\" to load the entire catalog into memory.
180 .\" The default search path varies, but usually looks at a number of places below
183 .\" .IR /usr/lib/locale .
188 .\" In XPG 1987, Vol. 3 it says:
189 .\" .I "The flag argument of catopen is reserved for future use"
190 .\" .IR "and should be set to 0" .
192 .\" It is unclear what the source was for the constants