OSDN Git Service

fa0c27ac676b3310099a5b37d1400bba4b157e10
[linuxjm/LDP_man-pages.git] / draft / man3 / catgets.3
1 .\" Copyright 1993 Mitchum DSouza <m.dsouza@mrc-applied-psychology.cambridge.ac.uk>
2 .\"
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.
6 .\"
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.
11 .\"
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
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" Updated, aeb, 980809
24 .\"
25 .\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka
26 .\"     all rights reserved.
27 .\" Translated Tue Dec 16 19:43:01 JST 1997
28 .\"     by HIROFUMI Nishizuka <nishi@rpts.cl.nec.co.jp>
29 .\" Updated & Modified Mon Mar 1 1999
30 .\"       by NAKANO Takeo <nakano@apm.seikei.ac.jp>
31 .\"
32 .TH CATGETS 3 1998-08-09 "" "Linux Programmer's Manual"
33 .\"O .SH NAME
34 .\"O catgets \- get message from a message catalog
35 .SH 名前
36 catgets \- メッセージカタログからメッセージを取り出す
37 .\"O .SH SYNOPSIS
38 .SH 書式
39 .nf
40 .B #include <nl_types.h>
41
42 .BI "char *catgets(nl_catd " catalog ", int " set_number \
43 ", int " message_number ,
44 .BI "              const char *" message );
45 .fi
46 .\"O .SH DESCRIPTION
47 .SH 説明
48 .\"O .BR catgets ()
49 .\"O reads the message
50 .\"O .IR message_number ,
51 .\"O in set
52 .\"O .IR set_number ,
53 .\"O from the message catalog identified by
54 .\"O .IR catalog ,
55 .\"O where
56 .\"O .I catalog
57 .\"O is a catalog descriptor returned from an earlier call to
58 .\"O .BR catopen (3).
59 .BR catgets ()
60 は catalog で指定されたメッセージカタログから、
61 セット
62 .I set_number
63 のメッセージ
64 .I message_number
65 を読み取る。
66 .I catalog
67 は、
68 .BR catopen (3)
69 の呼び出しによって得られたカタログ
70 ディスクリプタを指定する。
71 .\"O The fourth argument
72 .\"O .I message
73 .\"O points to a default message string which will be returned by
74 .\"O .BR catgets ()
75 .\"O if the identified message catalog is not currently available.
76 .\"O The
77 .\"O message-text is contained in an internal buffer area and should be copied by
78 .\"O the application if it is to be saved or modified.
79 .\"O The return string is
80 .\"O always terminated with a null byte.
81 4番目の引数
82 .I message
83 は、指定のメッセージカタログが現在利用できない
84 場合に
85 .BR catgets ()
86 が返すデフォルトのメッセージを指す。
87 メッセージテキストは内部のバッファ領域に格納されており、
88 保存や変更を行う場合にはアプリケーション側でコピーする必要がある。
89 返される文字列は常にヌル文字で終端される。
90 .\"O .SH "RETURN VALUE"
91 .SH 返り値
92 .LP
93 .\"O On success,
94 .\"O .BR catgets ()
95 .\"O returns a pointer to an internal buffer area
96 .\"O containing the null-terminated message string.
97 成功した場合、
98 .BR catgets ()
99 は内部のバッファ領域へのポインタを返す。
100 ここにはヌル文字で終端されたメッセージ文字列が格納されている。
101 .\"O On failure,
102 .\"O .BR catgets ()
103 .\"O returns the value
104 .\"O .IR message .
105 失敗した場合は
106 .I message
107 を返す。
108 .\"O .SH "CONFORMING TO"
109 .SH 準拠
110 POSIX.1-2001.
111 .\"O .SH NOTES
112 .SH 注意
113 .\"O These functions are only available in libc.so.4.4.4c and above.
114 .\"O The Jan 1987 X/Open Portability Guide specifies a more subtle
115 .\"O error return:
116 .\"O .I message
117 .\"O is returned if the message catalog specified by
118 .\"O .I catalog
119 .\"O is not available, while an empty string is returned
120 .\"O when the message catalog is available but does not contain
121 .\"O the specified message.
122 これらの関数は libc.so.4.4.4c 以降でしか使えない。
123 Jan 1987 X/Open Portability Guide では、エラーの時に
124 返される値により微妙な指定をしている。
125 .I catalog
126 で指定されたメッセージカタログが利用できない場合は
127 .I message
128 を返し、一方メッセージカタログはあるが指定したメッセージがない場合は
129 空の文字列が返される。
130 .\"O These two possible error returns seem to be discarded in SUSv2
131 .\"O in favor of always returning
132 .\"O .IR message .
133 SUSv2 ではこの二種類のエラーリターンは廃止され、
134 常に
135 .I message
136 を返すことにしたようである。
137 .\"O .SH "SEE ALSO"
138 .SH 関連項目
139 .BR catopen (3),
140 .BR setlocale (3)