1 .\" Copyright 1993 Mitchum DSouza <m.dsouza@mrc-applied-psychology.cambridge.ac.uk>
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date. The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein. The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" Modified Thu Dec 13 22:51:19 2001 by Martin Schulze <joey@infodrom.org>
24 .\" Modified 2001-12-14 aeb
26 .\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka
27 .\" all rights reserved.
28 .\" Translated Tue Dec 16 19:43:18 JST 1997
29 .\" by HIROFUMI Nishizuka <nishi@rpts.cl.nec.co.jp>
30 .\" Updated & Modified Mon Jan 14 06:48:39 JST 2002
31 .\" by Yuichi SATO <ysato@h4.dion.ne.jp>
33 .TH CATOPEN 3 2001-12-14 "GNU" "Linux Programmer's Manual"
36 .\"O catopen, catclose \- open/close a message catalog
37 catopen, catclose \- メッセージカタログのオープン/クローズ
40 .B #include <nl_types.h>
42 .BI "nl_catd catopen(const char *" name ", int " flag );
44 .BI "int catclose(nl_catd " catalog );
49 .\"O opens a message catalog and returns a catalog descriptor.
52 はメッセージカタログをオープンし、カタログディスクリプタを返す。
53 .\"O The descriptor remains valid until
57 .\"O If a file descriptor is used to implement catalog descriptors
60 .\"O flag will be set.
73 .\"O specifies the name of the message catalog to be opened.
76 はオープンするメッセージカタログの名前を指定する。
79 .\"O specifies and absolute path (i.e., contains a \(aq/\(aq),
82 .\"O specifies a pathname for the message catalog.
84 が絶対パスで指定されている場合 (すなわち \(aq/\(aq を含んでいる場合)、
87 .\"O Otherwise, the environment variable
104 .\"O It is unspecified whether
106 .\"O will be used when the process has root privileges.
107 プロセスが root 権限を持っているときに
112 .\"O does not exist in the environment,
113 .\"O or if a message catalog cannot be opened
114 .\"O in any of the paths specified by it,
115 .\"O then an implementation defined path is used.
120 どのパスにおいてもメッセージカタログをオープンできない場合、
122 .\"O This latter default path may depend on the
124 .\"O locale setting when the
127 .\"O .B NL_CAT_LOCALE
130 .\"O environment variable when the
146 .\"O part of the locale may invalidate
147 .\"O open catalog descriptors.
151 オープンされているカタログディスクリプタが無効になるかもしれない。
157 .\"O is used to indicate the source for the language to use.
161 引き数は、使用される言語のソースを示すために使われる。
163 .\"O .B NL_CAT_LOCALE
164 .\"O then it will use the current locale setting for
165 .\"O .BR LC_MESSAGES .
170 .\"O Otherwise it will use the
172 .\"O environment variable.
179 .\"O closes the message catalog identified by
185 で指定されたメッセージカタログをクローズする。
186 .\"O It invalidates any subsequent references to the message catalog
191 で指定されるメッセージカタログへの全ての参照を無効にする。
192 .\"O .SH "RETURN VALUE"
196 .\"O returns a message catalog descriptor of type
203 型のメッセージカタログディスクリプタを返す。
204 .\"O On failure, it returns \fI(nl_catd)\ \-1\fP
207 .\"O to indicate the error.
208 .\"O The possible error values include all
209 .\"O possible values for the
212 失敗した場合は \fI(nl_catdv) \-1\fP を返し、
217 の呼び出しの際に起こり得る全てのエラーの値が含まれる。
221 .\"O returns 0 on success, or \-1 on failure.
224 は、成功した場合 0 を、失敗した場合 \-1 を返す。
229 .\"O May be the source of the
231 .\"O locale setting, and thus
232 .\"O determine the language to use if
235 .\"O .BR NL_CAT_LOCALE .
237 ロケール設定のソースになることも可能なので、
241 に設定されている場合は、使用する言語を決定するのに使われる。
244 .\"O The language to use if
249 .\"O .SH "CONFORMING TO"
252 .\"O .\" In XPG 1987, Vol. 3 it says:
253 .\"O .\" .I "The flag argument of catopen is reserved for future use"
254 .\"O .\" .IR "and should be set to 0" .
255 .\"O It is unclear what the source was for the constants
260 .\" XPG 1987, Vol. 3 には、「\fIcatopen の flag 引き数は
261 .\" 将来使用するために予約されているので、
262 .\" 0 に設定しておくべきである。\fR」と書かれている。
267 に対応するソースが何であるのかがはっきりしていない (下記参照)。
270 .\"O The above is the POSIX.1-2001 description.
271 .\"O The glibc value for
272 .\"O .B NL_CAT_LOCALE
277 .\"O The default path varies, but usually looks at a number of places below
278 .\"O .IR /usr/share/locale .
279 以上は POSIX.1-2001 における説明である。
286 デフォルトのパスは場合によって様々であるが、通常は
291 .\"O These functions are available for Linux since libc 4.4.4c.
292 これらの関数は libc.so.4.4.4c 以降で使用可能である。
293 .\"O In the case of linux libc4 and libc5, the catalog descriptor
297 .\"O area of memory and not a file descriptor.
298 linux の libc4 と libc5 においては、カタログディスクリプタ
302 されたメモリの領域であってファイルディスクリプタではない。
307 .\"O should be either
320 .\"O The former value indicates that a set from the catalog is to be
321 .\"O loaded when needed, whereas the latter causes the initial call to
323 .\"O to load the entire catalog into memory.
324 前者の場合、カタログのセットは必要時にロードされる。
327 の呼び出しのときに全てのカタログがメモリ内にロードされる。
328 .\"O The default search path varies, but usually looks at a number of places below
331 .\"O .IR /usr/lib/locale .
332 デフォルトのパスは場合によって様々であるが、通常は