1 .\" Copyright 1993 Mitchum DSouza <m.dsouza@mrc-applied-psychology.cambridge.ac.uk>
3 .\" %%%LICENSE_START(VERBATIM)
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date. The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein. The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
25 .\" Modified Thu Dec 13 22:51:19 2001 by Martin Schulze <joey@infodrom.org>
26 .\" Modified 2001-12-14 aeb
28 .TH CATOPEN 3 2014-08-19 "GNU" "Linux Programmer's Manual"
30 catopen, catclose \- open/close a message catalog
32 .B #include <nl_types.h>
34 .BI "nl_catd catopen(const char *" name ", int " flag );
36 .BI "int catclose(nl_catd " catalog );
40 opens a message catalog and returns a catalog descriptor.
41 The descriptor remains valid until
45 If a file descriptor is used to implement catalog descriptors,
52 specifies the name of the message catalog to be opened.
55 specifies an absolute path (i.e., contains a \(aq/\(aq),
58 specifies a pathname for the message catalog.
59 Otherwise, the environment variable
67 It is unspecified whether
69 will be used when the process has root privileges.
72 does not exist in the environment,
73 or if a message catalog cannot be opened
74 in any of the paths specified by it,
75 then an implementation defined path is used.
76 This latter default path may depend on the
78 locale setting when the
84 environment variable when the
89 part of the locale may invalidate
90 open catalog descriptors.
96 is used to indicate the source for the language to use.
99 then it will use the current locale setting for
101 Otherwise, it will use the
103 environment variable.
107 closes the message catalog identified by
109 It invalidates any subsequent references to the message catalog
115 returns a message catalog descriptor of type
118 On failure, it returns
122 to indicate the error.
123 The possible error values include all
124 possible values for the
130 returns 0 on success, or \-1 on failure.
134 May be the source of the
136 locale setting, and thus
137 determine the language to use if
143 The language to use if
148 .\" In XPG 1987, Vol. 3 it says:
149 .\" .I "The flag argument of catopen is reserved for future use"
150 .\" .IR "and should be set to 0" .
152 .\" It is unclear what the source was for the constants
158 The above is the POSIX.1-2001 description.
165 The default path varies, but usually looks at a number of places below
166 .IR /usr/share/locale .
168 .\" These functions are available for Linux since libc 4.4.4c.
169 .\" In the case of linux libc4 and libc5, the catalog descriptor
173 .\" area of memory and not a file descriptor.
183 .\" The former value indicates that a set from the catalog is to be
184 .\" loaded when needed, whereas the latter causes the initial call to
186 .\" to load the entire catalog into memory.
187 .\" The default search path varies, but usually looks at a number of places below
190 .\" .IR /usr/lib/locale .